From 65172138addb03d7a8f7604aae550117e0772aea Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Thu, 7 Feb 2013 19:15:59 +0400 Subject: [PATCH 001/151] 8007014: Improve image handling Reviewed-by: prr, mschoene, jgodinez --- .../sun/awt/image/ByteComponentRaster.java | 12 +++- .../sun/awt/image/BytePackedRaster.java | 26 ++++++- .../sun/awt/image/IntegerComponentRaster.java | 71 ++++++++++++++----- .../awt/image/IntegerInterleavedRaster.java | 27 +------ .../sun/awt/image/ShortComponentRaster.java | 12 +++- .../native/sun/awt/image/awt_parseImage.c | 1 + .../native/sun/awt/medialib/awt_ImagingLib.c | 32 ++++++++- .../sun/awt/medialib/mlib_ImageCreate.c | 33 +++++++-- .../native/sun/awt/medialib/safe_alloc.h | 6 -- .../share/native/sun/awt/medialib/safe_math.h | 35 +++++++++ 10 files changed, 196 insertions(+), 59 deletions(-) create mode 100644 jdk/src/share/native/sun/awt/medialib/safe_math.h diff --git a/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java b/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java index 49c642e37db..f2675dbf97d 100644 --- a/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java +++ b/jdk/src/share/classes/sun/awt/image/ByteComponentRaster.java @@ -868,6 +868,15 @@ public class ByteComponentRaster extends SunWritableRaster { * or if data buffer has not enough capacity. */ protected final void verify() { + /* Need to re-verify the dimensions since a sample model may be + * specified to the constructor + */ + if (width <= 0 || height <= 0 || + height > (Integer.MAX_VALUE / width)) + { + throw new RasterFormatException("Invalid raster dimension"); + } + for (int i = 0; i < dataOffsets.length; i++) { if (dataOffsets[i] < 0) { throw new RasterFormatException("Data offsets for band " + i @@ -905,13 +914,14 @@ public class ByteComponentRaster extends SunWritableRaster { lastPixelOffset += lastScanOffset; for (int i = 0; i < numDataElements; i++) { - size = lastPixelOffset + dataOffsets[i]; if (dataOffsets[i] > (Integer.MAX_VALUE - lastPixelOffset)) { throw new RasterFormatException("Incorrect band offset: " + dataOffsets[i]); } + size = lastPixelOffset + dataOffsets[i]; + if (size > maxSize) { maxSize = size; } diff --git a/jdk/src/share/classes/sun/awt/image/BytePackedRaster.java b/jdk/src/share/classes/sun/awt/image/BytePackedRaster.java index 8fec29e90b7..598d68dce47 100644 --- a/jdk/src/share/classes/sun/awt/image/BytePackedRaster.java +++ b/jdk/src/share/classes/sun/awt/image/BytePackedRaster.java @@ -1368,11 +1368,35 @@ public class BytePackedRaster extends SunWritableRaster { throw new RasterFormatException("Data offsets must be >= 0"); } + /* Need to re-verify the dimensions since a sample model may be + * specified to the constructor + */ + if (width <= 0 || height <= 0 || + height > (Integer.MAX_VALUE / width)) + { + throw new RasterFormatException("Invalid raster dimension"); + } + + + /* + * pixelBitstride was verified in constructor, so just make + * sure that it is safe to multiply it by width. + */ + if ((width - 1) > Integer.MAX_VALUE / pixelBitStride) { + throw new RasterFormatException("Invalid raster dimension"); + } + + if (scanlineStride < 0 || + scanlineStride > (Integer.MAX_VALUE / height)) + { + throw new RasterFormatException("Invalid scanline stride"); + } + int lastbit = (dataBitOffset + (height-1) * scanlineStride * 8 + (width-1) * pixelBitStride + pixelBitStride - 1); - if (lastbit / 8 >= data.length) { + if (lastbit < 0 || lastbit / 8 >= data.length) { throw new RasterFormatException("raster dimensions overflow " + "array bounds"); } diff --git a/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java b/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java index 1f2c569b5bf..92bec9f944a 100644 --- a/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java +++ b/jdk/src/share/classes/sun/awt/image/IntegerComponentRaster.java @@ -208,7 +208,7 @@ public class IntegerComponentRaster extends SunWritableRaster { " SinglePixelPackedSampleModel"); } - verify(false); + verify(); } @@ -629,16 +629,26 @@ public class IntegerComponentRaster extends SunWritableRaster { } /** - * Verify that the layout parameters are consistent with - * the data. If strictCheck - * is false, this method will check for ArrayIndexOutOfBounds conditions. If - * strictCheck is true, this method will check for additional error - * conditions such as line wraparound (width of a line greater than - * the scanline stride). - * @return String Error string, if the layout is incompatible with - * the data. Otherwise returns null. + * Verify that the layout parameters are consistent with the data. + * + * The method verifies whether scanline stride and pixel stride do not + * cause an integer overflow during calculation of a position of the pixel + * in data buffer. It also verifies whether the data buffer has enough data + * to correspond the raster layout attributes. + * + * @throws RasterFormatException if an integer overflow is detected, + * or if data buffer has not enough capacity. */ - private void verify (boolean strictCheck) { + protected final void verify() { + /* Need to re-verify the dimensions since a sample model may be + * specified to the constructor + */ + if (width <= 0 || height <= 0 || + height > (Integer.MAX_VALUE / width)) + { + throw new RasterFormatException("Invalid raster dimension"); + } + if (dataOffsets[0] < 0) { throw new RasterFormatException("Data offset ("+dataOffsets[0]+ ") must be >= 0"); @@ -647,17 +657,46 @@ public class IntegerComponentRaster extends SunWritableRaster { int maxSize = 0; int size; - for (int i=0; i < numDataElements; i++) { - size = (height-1)*scanlineStride + (width-1)*pixelStride + - dataOffsets[i]; + // we can be sure that width and height are greater than 0 + if (scanlineStride < 0 || + scanlineStride > (Integer.MAX_VALUE / height)) + { + // integer overflow + throw new RasterFormatException("Incorrect scanline stride: " + + scanlineStride); + } + int lastScanOffset = (height - 1) * scanlineStride; + + if (pixelStride < 0 || + pixelStride > (Integer.MAX_VALUE / width)) + { + // integer overflow + throw new RasterFormatException("Incorrect pixel stride: " + + pixelStride); + } + int lastPixelOffset = (width - 1) * pixelStride; + + if (lastPixelOffset > (Integer.MAX_VALUE - lastScanOffset)) { + // integer overflow + throw new RasterFormatException("Incorrect raster attributes"); + } + lastPixelOffset += lastScanOffset; + + for (int i = 0; i < numDataElements; i++) { + if (dataOffsets[i] > (Integer.MAX_VALUE - lastPixelOffset)) { + throw new RasterFormatException("Incorrect band offset: " + + dataOffsets[i]); + } + + size = lastPixelOffset + dataOffsets[i]; + if (size > maxSize) { maxSize = size; } } if (data.length < maxSize) { - throw new RasterFormatException("Data array too small (should be "+ - maxSize - +" but is "+data.length+" )"); + throw new RasterFormatException("Data array too small (should be " + + maxSize + " )"); } } diff --git a/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java b/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java index 90238f4cc4e..2d0d22ec59c 100644 --- a/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java +++ b/jdk/src/share/classes/sun/awt/image/IntegerInterleavedRaster.java @@ -151,7 +151,7 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster { throw new RasterFormatException("IntegerInterleavedRasters must have"+ " SinglePixelPackedSampleModel"); } - verify(false); + verify(); } @@ -540,31 +540,6 @@ public class IntegerInterleavedRaster extends IntegerComponentRaster { return createCompatibleWritableRaster(width,height); } - /** - * Verify that the layout parameters are consistent with - * the data. If strictCheck - * is false, this method will check for ArrayIndexOutOfBounds conditions. If - * strictCheck is true, this method will check for additional error - * conditions such as line wraparound (width of a line greater than - * the scanline stride). - * @return String Error string, if the layout is incompatible with - * the data. Otherwise returns null. - */ - private void verify (boolean strictCheck) { - int maxSize = 0; - int size; - - size = (height-1)*scanlineStride + (width-1) + dataOffsets[0]; - if (size > maxSize) { - maxSize = size; - } - if (data.length < maxSize) { - throw new RasterFormatException("Data array too small (should be "+ - maxSize - +" but is "+data.length+" )"); - } - } - public String toString() { return new String ("IntegerInterleavedRaster: width = "+width +" height = " + height diff --git a/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java b/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java index df2c0f7d663..3b33595c129 100644 --- a/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java +++ b/jdk/src/share/classes/sun/awt/image/ShortComponentRaster.java @@ -802,6 +802,15 @@ public class ShortComponentRaster extends SunWritableRaster { * or if data buffer has not enough capacity. */ protected final void verify() { + /* Need to re-verify the dimensions since a sample model may be + * specified to the constructor + */ + if (width <= 0 || height <= 0 || + height > (Integer.MAX_VALUE / width)) + { + throw new RasterFormatException("Invalid raster dimension"); + } + for (int i = 0; i < dataOffsets.length; i++) { if (dataOffsets[i] < 0) { throw new RasterFormatException("Data offsets for band " + i @@ -839,12 +848,13 @@ public class ShortComponentRaster extends SunWritableRaster { lastPixelOffset += lastScanOffset; for (int i = 0; i < numDataElements; i++) { - size = lastPixelOffset + dataOffsets[i]; if (dataOffsets[i] > (Integer.MAX_VALUE - lastPixelOffset)) { throw new RasterFormatException("Incorrect band offset: " + dataOffsets[i]); } + size = lastPixelOffset + dataOffsets[i]; + if (size > maxSize) { maxSize = size; } diff --git a/jdk/src/share/native/sun/awt/image/awt_parseImage.c b/jdk/src/share/native/sun/awt/image/awt_parseImage.c index 498ac717913..310866acba3 100644 --- a/jdk/src/share/native/sun/awt/image/awt_parseImage.c +++ b/jdk/src/share/native/sun/awt/image/awt_parseImage.c @@ -34,6 +34,7 @@ #include "java_awt_color_ColorSpace.h" #include "awt_Mlib.h" #include "safe_alloc.h" +#include "safe_math.h" static int setHints(JNIEnv *env, BufImageS_t *imageP); diff --git a/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c b/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c index 4f1a2e1609a..5730734cefa 100644 --- a/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c +++ b/jdk/src/share/native/sun/awt/medialib/awt_ImagingLib.c @@ -42,6 +42,7 @@ #include "awt_Mlib.h" #include "gdefs.h" #include "safe_alloc.h" +#include "safe_math.h" /*************************************************************************** * Definitions * @@ -1993,13 +1994,23 @@ cvtCustomToDefault(JNIEnv *env, BufImageS_t *imageP, int component, unsigned char *dP = dataP; #define NUM_LINES 10 int numLines = NUM_LINES; - int nbytes = rasterP->width*4*NUM_LINES; + /* it is safe to calculate the scan length, because width has been verified + * on creation of the mlib image + */ + int scanLength = rasterP->width * 4; + + int nbytes = 0; + if (!SAFE_TO_MULT(numLines, scanLength)) { + return -1; + } + + nbytes = numLines * scanLength; for (y=0; y < rasterP->height; y+=numLines) { /* getData, one scanline at a time */ if (y+numLines > rasterP->height) { numLines = rasterP->height - y; - nbytes = rasterP->width*4*numLines; + nbytes = numLines * scanLength; } jpixels = (*env)->CallObjectMethod(env, imageP->jimage, g_BImgGetRGBMID, 0, y, @@ -2129,8 +2140,14 @@ allocateArray(JNIEnv *env, BufImageS_t *imageP, if (cvtToDefault) { int status = 0; *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, 4, width, height); + if (*mlibImagePP == NULL) { + return -1; + } cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); - /* Make sure the image is cleared */ + /* Make sure the image is cleared. + * NB: the image dimension is already verified, so we can + * safely calculate the length of the buffer. + */ memset(cDataP, 0, width*height*4); if (!isSrc) { @@ -2380,6 +2397,9 @@ allocateRasterArray(JNIEnv *env, RasterS_t *rasterP, case sun_awt_image_IntegerComponentRaster_TYPE_BYTE_PACKED_SAMPLES: *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands, width, height); + if (*mlibImagePP == NULL) { + return -1; + } if (!isSrc) return 0; cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); return expandPackedBCR(env, rasterP, -1, cDataP); @@ -2388,6 +2408,9 @@ allocateRasterArray(JNIEnv *env, RasterS_t *rasterP, if (rasterP->sppsm.maxBitSize <= 8) { *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands, width, height); + if (*mlibImagePP == NULL) { + return -1; + } if (!isSrc) return 0; cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); return expandPackedSCR(env, rasterP, -1, cDataP); @@ -2397,6 +2420,9 @@ allocateRasterArray(JNIEnv *env, RasterS_t *rasterP, if (rasterP->sppsm.maxBitSize <= 8) { *mlibImagePP = (*sMlibSysFns.createFP)(MLIB_BYTE, rasterP->numBands, width, height); + if (*mlibImagePP == NULL) { + return -1; + } if (!isSrc) return 0; cDataP = (unsigned char *) mlib_ImageGetData(*mlibImagePP); return expandPackedICR(env, rasterP, -1, cDataP); diff --git a/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c b/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c index 40662d6b8cc..97caaa4bf43 100644 --- a/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c +++ b/jdk/src/share/native/sun/awt/medialib/mlib_ImageCreate.c @@ -120,6 +120,7 @@ #include "mlib_image.h" #include "mlib_ImageRowTable.h" #include "mlib_ImageCreate.h" +#include "safe_math.h" /***************************************************************/ mlib_image* mlib_ImageSet(mlib_image *image, @@ -247,28 +248,50 @@ mlib_image *mlib_ImageCreate(mlib_type type, return NULL; }; + if (!SAFE_TO_MULT(width, channels)) { + return NULL; + } + + wb = width * channels; + switch (type) { case MLIB_DOUBLE: - wb = width * channels * 8; + if (!SAFE_TO_MULT(wb, 8)) { + return NULL; + } + wb *= 8; break; case MLIB_FLOAT: case MLIB_INT: - wb = width * channels * 4; + if (!SAFE_TO_MULT(wb, 4)) { + return NULL; + } + wb *= 4; break; case MLIB_USHORT: case MLIB_SHORT: - wb = width * channels * 2; + if (!SAFE_TO_MULT(wb, 4)) { + return NULL; + } + wb *= 2; break; case MLIB_BYTE: - wb = width * channels; + // wb is ready break; case MLIB_BIT: - wb = (width * channels + 7) / 8; + if (!SAFE_TO_ADD(7, wb)) { + return NULL; + } + wb = (wb + 7) / 8; break; default: return NULL; } + if (!SAFE_TO_MULT(wb, height)) { + return NULL; + } + data = mlib_malloc(wb * height); if (data == NULL) { return NULL; diff --git a/jdk/src/share/native/sun/awt/medialib/safe_alloc.h b/jdk/src/share/native/sun/awt/medialib/safe_alloc.h index 579d98638dc..6a0320e2179 100644 --- a/jdk/src/share/native/sun/awt/medialib/safe_alloc.h +++ b/jdk/src/share/native/sun/awt/medialib/safe_alloc.h @@ -41,10 +41,4 @@ (((w) > 0) && ((h) > 0) && ((sz) > 0) && \ (((0xffffffffu / ((juint)(w))) / ((juint)(h))) > ((juint)(sz)))) -#define SAFE_TO_MULT(a, b) \ - (((a) > 0) && ((b) >= 0) && ((0x7fffffff / (a)) > (b))) - -#define SAFE_TO_ADD(a, b) \ - (((a) >= 0) && ((b) >= 0) && ((0x7fffffff - (a)) > (b))) - #endif // __SAFE_ALLOC_H__ diff --git a/jdk/src/share/native/sun/awt/medialib/safe_math.h b/jdk/src/share/native/sun/awt/medialib/safe_math.h new file mode 100644 index 00000000000..34c1fc56e9a --- /dev/null +++ b/jdk/src/share/native/sun/awt/medialib/safe_math.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +#ifndef __SAFE_MATH_H__ +#define __SAFE_MATH_H__ + +#define SAFE_TO_MULT(a, b) \ + (((a) > 0) && ((b) >= 0) && ((0x7fffffff / (a)) > (b))) + +#define SAFE_TO_ADD(a, b) \ + (((a) >= 0) && ((b) >= 0) && ((0x7fffffff - (a)) > (b))) + +#endif // __SAFE_MATH_H__ From 9f917b11d6fb6f4dd914d56b65053d094f5e4331 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Fri, 8 Feb 2013 17:32:25 +0400 Subject: [PATCH 002/151] 7200507: Refactor Introspector internals Reviewed-by: ahgross, art --- .../java/beans/ThreadGroupContext.java | 7 +- .../classes/java/beans/WeakIdentityMap.java | 181 ++++++++++++++++++ 2 files changed, 185 insertions(+), 3 deletions(-) create mode 100644 jdk/src/share/classes/java/beans/WeakIdentityMap.java diff --git a/jdk/src/share/classes/java/beans/ThreadGroupContext.java b/jdk/src/share/classes/java/beans/ThreadGroupContext.java index dc1d38a1457..6236ec2b38c 100644 --- a/jdk/src/share/classes/java/beans/ThreadGroupContext.java +++ b/jdk/src/share/classes/java/beans/ThreadGroupContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,6 @@ import com.sun.beans.finder.BeanInfoFinder; import com.sun.beans.finder.PropertyEditorFinder; import java.awt.GraphicsEnvironment; -import java.util.HashMap; import java.util.Map; import java.util.WeakHashMap; @@ -42,7 +41,7 @@ import java.util.WeakHashMap; */ final class ThreadGroupContext { - private static final Map contexts = new WeakHashMap<>(); + private static final WeakIdentityMap contexts = new WeakIdentityMap<>(); /** * Returns the appropriate {@code AppContext} for the caller, @@ -69,6 +68,8 @@ final class ThreadGroupContext { private BeanInfoFinder beanInfoFinder; private PropertyEditorFinder propertyEditorFinder; + private ThreadGroupContext() { + } boolean isDesignTime() { return this.isDesignTime; diff --git a/jdk/src/share/classes/java/beans/WeakIdentityMap.java b/jdk/src/share/classes/java/beans/WeakIdentityMap.java new file mode 100644 index 00000000000..42ac821a392 --- /dev/null +++ b/jdk/src/share/classes/java/beans/WeakIdentityMap.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package java.beans; + +import java.lang.ref.ReferenceQueue; +import java.lang.ref.WeakReference; + +/** + * Hash table based mapping, which uses weak references to store keys + * and reference-equality in place of object-equality to compare them. + * An entry will automatically be removed when its key is no longer + * in ordinary use. Both null values and the null key are supported. + * + * @see java.util.IdentityHashMap + * @see java.util.WeakHashMap + */ +final class WeakIdentityMap { + + private static final int MAXIMUM_CAPACITY = 1 << 30; // it MUST be a power of two + private static final Object NULL = new Object(); // special object for null key + + private final ReferenceQueue queue = new ReferenceQueue(); + + private Entry[] table = newTable(1<<3); // table's length MUST be a power of two + private int threshold = 6; // the next size value at which to resize + private int size = 0; // the number of key-value mappings + + public T get(Object key) { + removeStaleEntries(); + if (key == null) { + key = NULL; + } + int hash = key.hashCode(); + int index = getIndex(this.table, hash); + for (Entry entry = this.table[index]; entry != null; entry = entry.next) { + if (entry.isMatched(key, hash)) { + return entry.value; + } + } + return null; + } + + public T put(Object key, T value) { + removeStaleEntries(); + if (key == null) { + key = NULL; + } + int hash = key.hashCode(); + int index = getIndex(this.table, hash); + for (Entry entry = this.table[index]; entry != null; entry = entry.next) { + if (entry.isMatched(key, hash)) { + T oldValue = entry.value; + entry.value = value; + return oldValue; + } + } + this.table[index] = new Entry(key, hash, value, this.queue, this.table[index]); + if (++this.size >= this.threshold) { + if (this.table.length == MAXIMUM_CAPACITY) { + this.threshold = Integer.MAX_VALUE; + } + else { + removeStaleEntries(); + Entry[] table = newTable(this.table.length * 2); + transfer(this.table, table); + + // If ignoring null elements and processing ref queue caused massive + // shrinkage, then restore old table. This should be rare, but avoids + // unbounded expansion of garbage-filled tables. + if (this.size >= this.threshold / 2) { + this.table = table; + this.threshold *= 2; + } + else { + transfer(table, this.table); + } + } + } + return null; + } + + private void removeStaleEntries() { + for (Object ref = this.queue.poll(); ref != null; ref = this.queue.poll()) { + @SuppressWarnings("unchecked") + Entry entry = (Entry) ref; + int index = getIndex(this.table, entry.hash); + + Entry prev = this.table[index]; + Entry current = prev; + while (current != null) { + Entry next = current.next; + if (current == entry) { + if (prev == entry) { + this.table[index] = next; + } + else { + prev.next = next; + } + entry.value = null; // Help GC + entry.next = null; // Help GC + this.size--; + break; + } + prev = current; + current = next; + } + } + } + + private void transfer(Entry[] oldTable, Entry[] newTable) { + for (int i = 0; i < oldTable.length; i++) { + Entry entry = oldTable[i]; + oldTable[i] = null; + while (entry != null) { + Entry next = entry.next; + Object key = entry.get(); + if (key == null) { + entry.value = null; // Help GC + entry.next = null; // Help GC + this.size--; + } + else { + int index = getIndex(newTable, entry.hash); + entry.next = newTable[index]; + newTable[index] = entry; + } + entry = next; + } + } + } + + + @SuppressWarnings("unchecked") + private Entry[] newTable(int length) { + return (Entry[]) new Entry[length]; + } + + private static int getIndex(Entry[] table, int hash) { + return hash & (table.length - 1); + } + + private static class Entry extends WeakReference { + private final int hash; + private T value; + private Entry next; + + Entry(Object key, int hash, T value, ReferenceQueue queue, Entry next) { + super(key, queue); + this.hash = hash; + this.value = value; + this.next = next; + } + + boolean isMatched(Object key, int hash) { + return (this.hash == hash) && (key == get()); + } + } +} From 724cfc189779e7c03392b69d635580d1c2aa91b9 Mon Sep 17 00:00:00 2001 From: Michael McMahon Date: Wed, 13 Feb 2013 10:40:31 +0000 Subject: [PATCH 003/151] 8000724: Improve networking serialization Delegate InetAddress fields to a holder object Reviewed-by: alanb, chegar --- .../net/AbstractPlainDatagramSocketImpl.java | 2 +- .../share/classes/java/net/Inet4Address.java | 39 +++--- .../classes/java/net/Inet4AddressImpl.java | 2 +- .../share/classes/java/net/Inet6Address.java | 19 ++- .../classes/java/net/Inet6AddressImpl.java | 2 +- .../share/classes/java/net/InetAddress.java | 121 ++++++++++++++---- .../classes/java/net/InetSocketAddress.java | 4 +- jdk/src/share/native/java/net/InetAddress.c | 23 +++- jdk/src/share/native/java/net/net_util.c | 70 ++++++++-- jdk/src/share/native/java/net/net_util.h | 12 +- .../native/java/net/Inet4AddressImpl.c | 19 +-- .../native/java/net/Inet6AddressImpl.c | 13 +- .../native/java/net/NetworkInterface.c | 13 +- .../native/java/net/PlainDatagramSocketImpl.c | 51 +++----- jdk/src/solaris/native/java/net/net_util_md.c | 6 +- .../net/TwoStacksPlainDatagramSocketImpl.java | 2 +- .../native/java/net/Inet4AddressImpl.c | 14 +- .../native/java/net/Inet6AddressImpl.c | 13 +- .../native/java/net/NetworkInterface.c | 9 +- .../native/java/net/NetworkInterface.h | 1 - .../native/java/net/NetworkInterface_winXP.c | 6 +- .../net/TwoStacksPlainDatagramSocketImpl.c | 52 ++------ .../java/net/TwoStacksPlainSocketImpl.c | 9 +- jdk/src/windows/native/java/net/net_util_md.c | 6 +- 24 files changed, 289 insertions(+), 219 deletions(-) diff --git a/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java b/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java index 349c9a00836..1ef64fbf0b4 100644 --- a/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java +++ b/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java @@ -122,7 +122,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl * not connected already. */ protected void disconnect() { - disconnect0(connectedAddress.family); + disconnect0(connectedAddress.holder().getFamily()); connected = false; connectedAddress = null; connectedPort = -1; diff --git a/jdk/src/share/classes/java/net/Inet4Address.java b/jdk/src/share/classes/java/net/Inet4Address.java index a9d8dfcb69f..529257fa90d 100644 --- a/jdk/src/share/classes/java/net/Inet4Address.java +++ b/jdk/src/share/classes/java/net/Inet4Address.java @@ -100,27 +100,28 @@ class Inet4Address extends InetAddress { Inet4Address() { super(); - hostName = null; - address = 0; - family = IPv4; + holder().hostName = null; + holder().address = 0; + holder().family = IPv4; } Inet4Address(String hostName, byte addr[]) { - this.hostName = hostName; - this.family = IPv4; + holder().hostName = hostName; + holder().family = IPv4; if (addr != null) { if (addr.length == INADDRSZ) { - address = addr[3] & 0xFF; + int address = addr[3] & 0xFF; address |= ((addr[2] << 8) & 0xFF00); address |= ((addr[1] << 16) & 0xFF0000); address |= ((addr[0] << 24) & 0xFF000000); + holder().address = address; } } } Inet4Address(String hostName, int address) { - this.hostName = hostName; - this.family = IPv4; - this.address = address; + holder().hostName = hostName; + holder().family = IPv4; + holder().address = address; } /** @@ -134,8 +135,8 @@ class Inet4Address extends InetAddress { private Object writeReplace() throws ObjectStreamException { // will replace the to be serialized 'this' object InetAddress inet = new InetAddress(); - inet.hostName = this.hostName; - inet.address = this.address; + inet.holder().hostName = holder().getHostName(); + inet.holder().address = holder().getAddress(); /** * Prior to 1.4 an InetAddress was created with a family @@ -143,7 +144,7 @@ class Inet4Address extends InetAddress { * For compatibility reasons we must therefore write the * the InetAddress with this family. */ - inet.family = 2; + inet.holder().family = 2; return inet; } @@ -157,7 +158,7 @@ class Inet4Address extends InetAddress { * @since JDK1.1 */ public boolean isMulticastAddress() { - return ((address & 0xf0000000) == 0xe0000000); + return ((holder().getAddress() & 0xf0000000) == 0xe0000000); } /** @@ -167,7 +168,7 @@ class Inet4Address extends InetAddress { * @since 1.4 */ public boolean isAnyLocalAddress() { - return address == 0; + return holder().getAddress() == 0; } /** @@ -195,6 +196,7 @@ class Inet4Address extends InetAddress { // defined in "Documenting Special Use IPv4 Address Blocks // that have been Registered with IANA" by Bill Manning // draft-manning-dsua-06.txt + int address = holder().getAddress(); return (((address >>> 24) & 0xFF) == 169) && (((address >>> 16) & 0xFF) == 254); } @@ -211,6 +213,7 @@ class Inet4Address extends InetAddress { // 10/8 prefix // 172.16/12 prefix // 192.168/16 prefix + int address = holder().getAddress(); return (((address >>> 24) & 0xFF) == 10) || ((((address >>> 24) & 0xFF) == 172) && (((address >>> 16) & 0xF0) == 16)) @@ -257,6 +260,7 @@ class Inet4Address extends InetAddress { */ public boolean isMCLinkLocal() { // 224.0.0/24 prefix and ttl == 1 + int address = holder().getAddress(); return (((address >>> 24) & 0xFF) == 224) && (((address >>> 16) & 0xFF) == 0) && (((address >>> 8) & 0xFF) == 0); @@ -272,6 +276,7 @@ class Inet4Address extends InetAddress { */ public boolean isMCSiteLocal() { // 239.255/16 prefix or ttl < 32 + int address = holder().getAddress(); return (((address >>> 24) & 0xFF) == 239) && (((address >>> 16) & 0xFF) == 255); } @@ -287,6 +292,7 @@ class Inet4Address extends InetAddress { */ public boolean isMCOrgLocal() { // 239.192 - 239.195 + int address = holder().getAddress(); return (((address >>> 24) & 0xFF) == 239) && (((address >>> 16) & 0xFF) >= 192) && (((address >>> 16) & 0xFF) <= 195); @@ -300,6 +306,7 @@ class Inet4Address extends InetAddress { * @return the raw IP address of this object. */ public byte[] getAddress() { + int address = holder().getAddress(); byte[] addr = new byte[INADDRSZ]; addr[0] = (byte) ((address >>> 24) & 0xFF); @@ -325,7 +332,7 @@ class Inet4Address extends InetAddress { * @return a hash code value for this IP address. */ public int hashCode() { - return address; + return holder().getAddress(); } /** @@ -346,7 +353,7 @@ class Inet4Address extends InetAddress { */ public boolean equals(Object obj) { return (obj != null) && (obj instanceof Inet4Address) && - (((InetAddress)obj).address == address); + (((InetAddress)obj).holder().getAddress() == holder().getAddress()); } // Utilities diff --git a/jdk/src/share/classes/java/net/Inet4AddressImpl.java b/jdk/src/share/classes/java/net/Inet4AddressImpl.java index 367ca22b9aa..6ca2d5c7bf0 100644 --- a/jdk/src/share/classes/java/net/Inet4AddressImpl.java +++ b/jdk/src/share/classes/java/net/Inet4AddressImpl.java @@ -40,7 +40,7 @@ class Inet4AddressImpl implements InetAddressImpl { public synchronized InetAddress anyLocalAddress() { if (anyLocalAddress == null) { anyLocalAddress = new Inet4Address(); // {0x00,0x00,0x00,0x00} - anyLocalAddress.hostName = "0.0.0.0"; + anyLocalAddress.holder().hostName = "0.0.0.0"; } return anyLocalAddress; } diff --git a/jdk/src/share/classes/java/net/Inet6Address.java b/jdk/src/share/classes/java/net/Inet6Address.java index 7329b2de687..a2e66f09b70 100644 --- a/jdk/src/share/classes/java/net/Inet6Address.java +++ b/jdk/src/share/classes/java/net/Inet6Address.java @@ -210,18 +210,18 @@ class Inet6Address extends InetAddress { Inet6Address() { super(); - hostName = null; + holder().hostName = null; ipaddress = new byte[INADDRSZ]; - family = IPv6; + holder().family = IPv6; } /* checking of value for scope_id should be done by caller * scope_id must be >= 0, or -1 to indicate not being set */ Inet6Address(String hostName, byte addr[], int scope_id) { - this.hostName = hostName; + holder().hostName = hostName; if (addr.length == INADDRSZ) { // normal IPv6 address - family = IPv6; + holder().family = IPv6; ipaddress = addr.clone(); } if (scope_id >= 0) { @@ -335,9 +335,9 @@ class Inet6Address extends InetAddress { private void initif(String hostName, byte addr[],NetworkInterface nif) throws UnknownHostException { - this.hostName = hostName; + holder().hostName = hostName; if (addr.length == INADDRSZ) { // normal IPv6 address - family = IPv6; + holder().family = IPv6; ipaddress = addr.clone(); } if (nif != null) { @@ -420,6 +420,11 @@ class Inet6Address extends InetAddress { */ private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException { + + if (getClass().getClassLoader() != null) { + throw new SecurityException ("invalid address type"); + } + s.defaultReadObject(); if (ifname != null && !ifname.equals("")) { @@ -447,7 +452,7 @@ class Inet6Address extends InetAddress { ipaddress.length); } - if (family != IPv6) { + if (holder().getFamily() != IPv6) { throw new InvalidObjectException("invalid address family type"); } } diff --git a/jdk/src/share/classes/java/net/Inet6AddressImpl.java b/jdk/src/share/classes/java/net/Inet6AddressImpl.java index 663c77ebccc..6512b998712 100644 --- a/jdk/src/share/classes/java/net/Inet6AddressImpl.java +++ b/jdk/src/share/classes/java/net/Inet6AddressImpl.java @@ -81,7 +81,7 @@ class Inet6AddressImpl implements InetAddressImpl { if (anyLocalAddress == null) { if (InetAddress.preferIPv6Address) { anyLocalAddress = new Inet6Address(); - anyLocalAddress.hostName = "::"; + anyLocalAddress.holder().hostName = "::"; } else { anyLocalAddress = (new Inet4AddressImpl()).anyLocalAddress(); } diff --git a/jdk/src/share/classes/java/net/InetAddress.java b/jdk/src/share/classes/java/net/InetAddress.java index e29d1dbc0d9..1154c9a80f4 100644 --- a/jdk/src/share/classes/java/net/InetAddress.java +++ b/jdk/src/share/classes/java/net/InetAddress.java @@ -35,8 +35,12 @@ import java.util.ArrayList; import java.util.ServiceLoader; import java.security.AccessController; import java.io.ObjectStreamException; +import java.io.ObjectStreamField; import java.io.IOException; import java.io.ObjectInputStream; +import java.io.ObjectInputStream.GetField; +import java.io.ObjectOutputStream; +import java.io.ObjectOutputStream.PutField; import sun.security.action.*; import sun.net.InetAddressCachePolicy; import sun.net.util.IPAddressUtil; @@ -199,25 +203,48 @@ class InetAddress implements java.io.Serializable { /* Specify address family preference */ static transient boolean preferIPv6Address = false; - /** - * @serial - */ - String hostName; + static class InetAddressHolder { - /** - * Holds a 32-bit IPv4 address. - * - * @serial - */ - int address; + InetAddressHolder() {} - /** - * Specifies the address family type, for instance, '1' for IPv4 - * addresses, and '2' for IPv6 addresses. - * - * @serial - */ - int family; + InetAddressHolder(String hostName, int address, int family) { + this.hostName = hostName; + this.address = address; + this.family = family; + } + + String hostName; + + String getHostName() { + return hostName; + } + + /** + * Holds a 32-bit IPv4 address. + */ + int address; + + int getAddress() { + return address; + } + + /** + * Specifies the address family type, for instance, '1' for IPv4 + * addresses, and '2' for IPv6 addresses. + */ + int family; + + int getFamily() { + return family; + } + } + + /* Used to store the serializable fields of InetAddress */ + private final transient InetAddressHolder holder; + + InetAddressHolder holder() { + return holder; + } /* Used to store the name service provider */ private static List nameServices = null; @@ -251,6 +278,7 @@ class InetAddress implements java.io.Serializable { * put in the address cache, since it is not created by name. */ InetAddress() { + holder = new InetAddressHolder(); } /** @@ -263,7 +291,7 @@ class InetAddress implements java.io.Serializable { */ private Object readResolve() throws ObjectStreamException { // will replace the deserialized 'this' object - return new Inet4Address(this.hostName, this.address); + return new Inet4Address(holder().getHostName(), holder().getAddress()); } /** @@ -500,10 +528,10 @@ class InetAddress implements java.io.Serializable { * @see SecurityManager#checkConnect */ String getHostName(boolean check) { - if (hostName == null) { - hostName = InetAddress.getHostFromNameService(this, check); + if (holder().getHostName() == null) { + holder().hostName = InetAddress.getHostFromNameService(this, check); } - return hostName; + return holder().getHostName(); } /** @@ -666,6 +694,7 @@ class InetAddress implements java.io.Serializable { * @return a string representation of this IP address. */ public String toString() { + String hostName = holder().getHostName(); return ((hostName != null) ? hostName : "") + "/" + getHostAddress(); } @@ -1522,14 +1551,58 @@ class InetAddress implements java.io.Serializable { } } + private static final long FIELDS_OFFSET; + private static final sun.misc.Unsafe UNSAFE; + + static { + try { + sun.misc.Unsafe unsafe = sun.misc.Unsafe.getUnsafe(); + FIELDS_OFFSET = unsafe.objectFieldOffset( + InetAddress.class.getDeclaredField("holder") + ); + UNSAFE = unsafe; + } catch (ReflectiveOperationException e) { + throw new Error(e); + } + } + private void readObject (ObjectInputStream s) throws IOException, ClassNotFoundException { - s.defaultReadObject (); if (getClass().getClassLoader() != null) { - hostName = null; - address = 0; throw new SecurityException ("invalid address type"); } + GetField gf = s.readFields(); + String host = (String)gf.get("hostName", null); + int address= gf.get("address", 0); + int family= gf.get("family", 0); + InetAddressHolder h = new InetAddressHolder(host, address, family); + UNSAFE.putObject(this, FIELDS_OFFSET, h); + } + + /* needed because the serializable fields no longer exist */ + + /** + * @serialField hostName String + * @serialField address int + * @serialField family int + */ + private static final ObjectStreamField[] serialPersistentFields = { + new ObjectStreamField("hostName", String.class), + new ObjectStreamField("address", int.class), + new ObjectStreamField("family", int.class), + }; + + private void writeObject (ObjectOutputStream s) throws + IOException { + if (getClass().getClassLoader() != null) { + throw new SecurityException ("invalid address type"); + } + PutField pf = s.putFields(); + pf.put("hostName", holder().getHostName()); + pf.put("address", holder().getAddress()); + pf.put("family", holder().getFamily()); + s.writeFields(); + s.flush(); } } diff --git a/jdk/src/share/classes/java/net/InetSocketAddress.java b/jdk/src/share/classes/java/net/InetSocketAddress.java index d4322e9b427..4ad95043470 100644 --- a/jdk/src/share/classes/java/net/InetSocketAddress.java +++ b/jdk/src/share/classes/java/net/InetSocketAddress.java @@ -87,8 +87,8 @@ public class InetSocketAddress if (hostname != null) return hostname; if (addr != null) { - if (addr.hostName != null) - return addr.hostName; + if (addr.holder().getHostName() != null) + return addr.holder().getHostName(); else return addr.getHostAddress(); } diff --git a/jdk/src/share/native/java/net/InetAddress.c b/jdk/src/share/native/java/net/InetAddress.c index 27a4a93d4d6..31115739b7e 100644 --- a/jdk/src/share/native/java/net/InetAddress.c +++ b/jdk/src/share/native/java/net/InetAddress.c @@ -33,8 +33,11 @@ */ jclass ia_class; -jfieldID ia_addressID; -jfieldID ia_familyID; +jclass iac_class; +jfieldID ia_holderID; +jfieldID iac_addressID; +jfieldID iac_familyID; +jfieldID iac_hostNameID; jfieldID ia_preferIPv6AddressID; /* @@ -48,10 +51,18 @@ Java_java_net_InetAddress_init(JNIEnv *env, jclass cls) { CHECK_NULL(c); ia_class = (*env)->NewGlobalRef(env, c); CHECK_NULL(ia_class); - ia_addressID = (*env)->GetFieldID(env, ia_class, "address", "I"); - CHECK_NULL(ia_addressID); - ia_familyID = (*env)->GetFieldID(env, ia_class, "family", "I"); - CHECK_NULL(ia_familyID); + c = (*env)->FindClass(env,"java/net/InetAddress$InetAddressHolder"); + CHECK_NULL(c); + iac_class = (*env)->NewGlobalRef(env, c); + ia_holderID = (*env)->GetFieldID(env, ia_class, "holder", "Ljava/net/InetAddress$InetAddressHolder;"); + CHECK_NULL(ia_holderID); ia_preferIPv6AddressID = (*env)->GetStaticFieldID(env, ia_class, "preferIPv6Address", "Z"); CHECK_NULL(ia_preferIPv6AddressID); + + iac_addressID = (*env)->GetFieldID(env, iac_class, "address", "I"); + CHECK_NULL(iac_addressID); + iac_familyID = (*env)->GetFieldID(env, iac_class, "family", "I"); + CHECK_NULL(iac_familyID); + iac_hostNameID = (*env)->GetFieldID(env, iac_class, "hostName", "Ljava/lang/String;"); + CHECK_NULL(iac_hostNameID); } diff --git a/jdk/src/share/native/java/net/net_util.c b/jdk/src/share/native/java/net/net_util.c index d7a6de2073d..5d15f9d9b0e 100644 --- a/jdk/src/share/native/java/net/net_util.c +++ b/jdk/src/share/native/java/net/net_util.c @@ -84,6 +84,58 @@ void init(JNIEnv *env) { } } +/* The address, and family fields used to be in InetAddress + * but are now in an implementation object. So, there is an extra + * level of indirection to access them now. + */ + +extern jclass iac_class; +extern jfieldID ia_holderID; +extern jfieldID iac_addressID; +extern jfieldID iac_familyID; + +void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address) { + jobject holder; + init(env); + holder = (*env)->GetObjectField(env, iaObj, ia_holderID); + (*env)->SetIntField(env, holder, iac_addressID, address); +} + +void setInetAddress_family(JNIEnv *env, jobject iaObj, int family) { + jobject holder; + init(env); + holder = (*env)->GetObjectField(env, iaObj, ia_holderID); + (*env)->SetIntField(env, holder, iac_familyID, family); +} + +void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject host) { + jobject holder; + init(env); + holder = (*env)->GetObjectField(env, iaObj, ia_holderID); + (*env)->SetObjectField(env, holder, iac_hostNameID, host); +} + +int getInetAddress_addr(JNIEnv *env, jobject iaObj) { + jobject holder; + init(env); + holder = (*env)->GetObjectField(env, iaObj, ia_holderID); + return (*env)->GetIntField(env, holder, iac_addressID); +} + +int getInetAddress_family(JNIEnv *env, jobject iaObj) { + jobject holder; + init(env); + holder = (*env)->GetObjectField(env, iaObj, ia_holderID); + return (*env)->GetIntField(env, holder, iac_familyID); +} + +jobject getInetAddress_hostName(JNIEnv *env, jobject iaObj) { + jobject holder; + init(env); + holder = (*env)->GetObjectField(env, iaObj, ia_holderID); + return (*env)->GetObjectField(env, holder, iac_hostNameID); +} + JNIEXPORT jobject JNICALL NET_SockaddrToInetAddress(JNIEnv *env, struct sockaddr *him, int *port) { jobject iaObj; @@ -110,8 +162,8 @@ NET_SockaddrToInetAddress(JNIEnv *env, struct sockaddr *him, int *port) { iaObj = (*env)->NewObject(env, inet4Cls, ia4_ctrID); CHECK_NULL_RETURN(iaObj, NULL); address = NET_IPv4MappedToIPv4(caddr); - (*env)->SetIntField(env, iaObj, ia_addressID, address); - (*env)->SetIntField(env, iaObj, ia_familyID, IPv4); + setInetAddress_addr(env, iaObj, address); + setInetAddress_family(env, iaObj, IPv4); } else { static jclass inet6Cls = 0; jint scope; @@ -131,7 +183,7 @@ NET_SockaddrToInetAddress(JNIEnv *env, struct sockaddr *him, int *port) { (*env)->SetObjectField(env, iaObj, ia6_ipaddressID, ipaddress); - (*env)->SetIntField(env, iaObj, ia_familyID, IPv6); + setInetAddress_family(env, iaObj, IPv6); scope = getScopeID(him); (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope); if (scope > 0) @@ -153,9 +205,8 @@ NET_SockaddrToInetAddress(JNIEnv *env, struct sockaddr *him, int *port) { } iaObj = (*env)->NewObject(env, inet4Cls, ia4_ctrID); CHECK_NULL_RETURN(iaObj, NULL); - (*env)->SetIntField(env, iaObj, ia_familyID, IPv4); - (*env)->SetIntField(env, iaObj, ia_addressID, - ntohl(him4->sin_addr.s_addr)); + setInetAddress_family(env, iaObj, IPv4); + setInetAddress_addr(env, iaObj, ntohl(him4->sin_addr.s_addr)); *port = ntohs(him4->sin_port); } return iaObj; @@ -167,8 +218,7 @@ NET_SockaddrEqualsInetAddress(JNIEnv *env, struct sockaddr *him, jobject iaObj) jint family = AF_INET; #ifdef AF_INET6 - family = (*env)->GetIntField(env, iaObj, ia_familyID) == IPv4? - AF_INET : AF_INET6; + family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6; if (him->sa_family == AF_INET6) { #ifdef WIN32 struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him; @@ -183,7 +233,7 @@ NET_SockaddrEqualsInetAddress(JNIEnv *env, struct sockaddr *him, jobject iaObj) return JNI_FALSE; } addrNew = NET_IPv4MappedToIPv4(caddrNew); - addrCur = (*env)->GetIntField(env, iaObj, ia_addressID); + addrCur = getInetAddress_addr(env, iaObj); if (addrNew == addrCur) { return JNI_TRUE; } else { @@ -215,7 +265,7 @@ NET_SockaddrEqualsInetAddress(JNIEnv *env, struct sockaddr *him, jobject iaObj) return JNI_FALSE; } addrNew = ntohl(him4->sin_addr.s_addr); - addrCur = (*env)->GetIntField(env, iaObj, ia_addressID); + addrCur = getInetAddress_addr(env, iaObj); if (addrNew == addrCur) { return JNI_TRUE; } else { diff --git a/jdk/src/share/native/java/net/net_util.h b/jdk/src/share/native/java/net/net_util.h index 6f040fa3ff6..0fd5b6c427f 100644 --- a/jdk/src/share/native/java/net/net_util.h +++ b/jdk/src/share/native/java/net/net_util.h @@ -53,10 +53,18 @@ * i.e. psi_timeoutID is PlainSocketImpl's timeout field's ID. */ extern jclass ia_class; -extern jfieldID ia_addressID; -extern jfieldID ia_familyID; +extern jfieldID iac_addressID; +extern jfieldID iac_familyID; +extern jfieldID iac_hostNameID; extern jfieldID ia_preferIPv6AddressID; +extern void setInetAddress_addr(JNIEnv *env, jobject iaObj, int address); +extern void setInetAddress_family(JNIEnv *env, jobject iaObj, int family); +extern void setInetAddress_hostName(JNIEnv *env, jobject iaObj, jobject h); +extern int getInetAddress_addr(JNIEnv *env, jobject iaObj); +extern int getInetAddress_family(JNIEnv *env, jobject iaObj); +extern jobject getInetAddress_hostName(JNIEnv *env, jobject iaObj); + extern jclass ia4_class; extern jmethodID ia4_ctrID; diff --git a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c index 71acfcdb5b1..3c75f781e25 100644 --- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c @@ -135,9 +135,6 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); - ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); - ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;"); initialized = 1; } @@ -238,9 +235,8 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl(((struct sockaddr_in*)(iterator->ai_addr))->sin_addr.s_addr)); - (*env)->SetObjectField(env, iaObj, ni_iahostID, name); + setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)(iterator->ai_addr))->sin_addr.s_addr)); + setInetAddress_hostName(env, iaObj, name); (*env)->SetObjectArrayElement(env, ret, retLen - i -1, iaObj); i++; iterator = iterator->ai_next; @@ -372,9 +368,6 @@ Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv *env, jobject this) { static jclass ni_iacls; static jclass ni_ia4cls; static jmethodID ni_ia4ctrID; -static jfieldID ni_iaaddressID; -static jfieldID ni_iahostID; -static jfieldID ni_iafamilyID; static int initialized = 0; /* @@ -403,9 +396,6 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); - ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); - ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;"); initialized = 1; } @@ -499,9 +489,8 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); + setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, i++, iaObj); iterator = iterator->ai_next; } diff --git a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c index 6b7e233d940..4fc64867f8b 100644 --- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c +++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c @@ -120,9 +120,6 @@ static jclass ni_ia4cls; static jclass ni_ia6cls; static jmethodID ni_ia4ctrID; static jmethodID ni_ia6ctrID; -static jfieldID ni_iaaddressID; -static jfieldID ni_iahostID; -static jfieldID ni_iafamilyID; static jfieldID ni_ia6ipaddressID; static int initialized = 0; @@ -159,9 +156,6 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); - ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); - ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); - ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;"); ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); initialized = 1; } @@ -315,9 +309,8 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); + setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); inetIndex++; } else if (iterator->ai_family == AF_INET6) { @@ -342,7 +335,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); } (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); inet6Index++; } diff --git a/jdk/src/solaris/native/java/net/NetworkInterface.c b/jdk/src/solaris/native/java/net/NetworkInterface.c index 55c131cf339..af979b03fd9 100644 --- a/jdk/src/solaris/native/java/net/NetworkInterface.c +++ b/jdk/src/solaris/native/java/net/NetworkInterface.c @@ -118,8 +118,6 @@ static jclass ni_ibcls; static jmethodID ni_ia4ctrID; static jmethodID ni_ia6ctrID; static jmethodID ni_ibctrID; -static jfieldID ni_iaaddressID; -static jfieldID ni_iafamilyID; static jfieldID ni_ia6ipaddressID; static jfieldID ni_ibaddressID; static jfieldID ni_ib4broadcastID; @@ -195,8 +193,6 @@ Java_java_net_NetworkInterface_init(JNIEnv *env, jclass cls) { ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); ni_ibctrID = (*env)->GetMethodID(env, ni_ibcls, "", "()V"); - ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); - ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); ni_ibaddressID = (*env)->GetFieldID(env, ni_ibcls, "address", "Ljava/net/InetAddress;"); ni_ib4broadcastID = (*env)->GetFieldID(env, ni_ibcls, "broadcast", "Ljava/net/Inet4Address;"); @@ -300,7 +296,7 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByInetAddress0 netif *ifs, *curr; #ifdef AF_INET6 - int family = ( (*env)->GetIntField(env, iaObj, ni_iafamilyID) == IPv4 ) ? AF_INET : AF_INET6; + int family = (getInetAddress_family(env, iaObj) == IPv4) ? AF_INET : AF_INET6; #else int family = AF_INET; #endif @@ -325,7 +321,7 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByInetAddress0 if (family == addrP->family) { if (family == AF_INET) { int address1 = htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr); - int address2 = (*env)->GetIntField(env, iaObj, ni_iaaddressID); + int address2 = getInetAddress_addr(env, iaObj); if (address1 == address2) { match = JNI_TRUE; @@ -651,7 +647,7 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs) { if (addrP->family == AF_INET) { iaObj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); if (iaObj) { - (*env)->SetIntField(env, iaObj, ni_iaaddressID, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr)); + setInetAddress_addr(env, iaObj, htonl(((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr)); } ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); if (ibObj) { @@ -660,8 +656,7 @@ jobject createNetworkInterface(JNIEnv *env, netif *ifs) { jobject ia2Obj = NULL; ia2Obj = (*env)->NewObject(env, ni_ia4cls, ni_ia4ctrID); if (ia2Obj) { - (*env)->SetIntField(env, ia2Obj, ni_iaaddressID, - htonl(((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr)); + setInetAddress_addr(env, ia2Obj, htonl(((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr)); (*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj); (*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask); } diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c index e5607af9132..27c78f23a42 100644 --- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c +++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c @@ -552,14 +552,13 @@ Java_java_net_PlainDatagramSocketImpl_peek(JNIEnv *env, jobject this, iaObj = NET_SockaddrToInetAddress(env, (struct sockaddr *)&remote_addr, &port); #ifdef AF_INET6 - family = (*env)->GetIntField(env, iaObj, ia_familyID) == IPv4? - AF_INET : AF_INET6; + family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6; #else family = AF_INET; #endif if (family == AF_INET) { /* this API can't handle IPV6 addresses */ - int address = (*env)->GetIntField(env, iaObj, ia_addressID); - (*env)->SetIntField(env, addressObj, ia_addressID, address); + int address = getInetAddress_addr(env, iaObj); + setInetAddress_addr(env, addressObj, address); } return port; } @@ -1028,23 +1027,18 @@ Java_java_net_PlainDatagramSocketImpl_datagramSocketClose(JNIEnv *env, */ static void mcast_set_if_by_if_v4(JNIEnv *env, jobject this, int fd, jobject value) { static jfieldID ni_addrsID; - static jfieldID ia_addressID; struct in_addr in; jobjectArray addrArray; jsize len; jobject addr; int i; - if (ni_addrsID == NULL || ia_addressID == NULL) { + if (ni_addrsID == NULL ) { jclass c = (*env)->FindClass(env, "java/net/NetworkInterface"); CHECK_NULL(c); ni_addrsID = (*env)->GetFieldID(env, c, "addrs", "[Ljava/net/InetAddress;"); CHECK_NULL(ni_addrsID); - c = (*env)->FindClass(env,"java/net/InetAddress"); - CHECK_NULL(c); - ia_addressID = (*env)->GetFieldID(env, c, "address", "I"); - CHECK_NULL(ia_addressID); } addrArray = (*env)->GetObjectField(env, value, ni_addrsID); @@ -1065,8 +1059,8 @@ static void mcast_set_if_by_if_v4(JNIEnv *env, jobject this, int fd, jobject val */ for (i = 0; i < len; i++) { addr = (*env)->GetObjectArrayElement(env, addrArray, i); - if ((*env)->GetIntField(env, addr, ia_familyID) == IPv4) { - in.s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID)); + if (getInetAddress_family(env, addr) == IPv4) { + in.s_addr = htonl(getInetAddress_addr(env, addr)); break; } } @@ -1116,17 +1110,9 @@ static void mcast_set_if_by_if_v6(JNIEnv *env, jobject this, int fd, jobject val * Throw exception if failed. */ static void mcast_set_if_by_addr_v4(JNIEnv *env, jobject this, int fd, jobject value) { - static jfieldID ia_addressID; struct in_addr in; - if (ia_addressID == NULL) { - jclass c = (*env)->FindClass(env,"java/net/InetAddress"); - CHECK_NULL(c); - ia_addressID = (*env)->GetFieldID(env, c, "address", "I"); - CHECK_NULL(ia_addressID); - } - - in.s_addr = htonl( (*env)->GetIntField(env, value, ia_addressID) ); + in.s_addr = htonl( getInetAddress_addr(env, value) ); if (JVM_SetSockOpt(fd, IPPROTO_IP, IP_MULTICAST_IF, (const char*)&in, sizeof(in)) < 0) { @@ -1456,7 +1442,6 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, jint opt) { if (isIPV4) { static jclass inet4_class; static jmethodID inet4_ctrID; - static jfieldID inet4_addrID; static jclass ni_class; static jmethodID ni_ctrID; @@ -1486,15 +1471,13 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, jint opt) { CHECK_NULL_RETURN(c, NULL); inet4_ctrID = (*env)->GetMethodID(env, c, "", "()V"); CHECK_NULL_RETURN(inet4_ctrID, NULL); - inet4_addrID = (*env)->GetFieldID(env, c, "address", "I"); - CHECK_NULL_RETURN(inet4_addrID, NULL); inet4_class = (*env)->NewGlobalRef(env, c); CHECK_NULL_RETURN(inet4_class, NULL); } addr = (*env)->NewObject(env, inet4_class, inet4_ctrID, 0); CHECK_NULL_RETURN(addr, NULL); - (*env)->SetIntField(env, addr, inet4_addrID, ntohl(in.s_addr)); + setInetAddress_addr(env, addr, ntohl(in.s_addr)); /* * For IP_MULTICAST_IF return InetAddress @@ -1942,7 +1925,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this, ipv6_join_leave = ipv6_available(); #ifdef __linux__ - if ((*env)->GetIntField(env, iaObj, ia_familyID) == IPv4) { + if (getInetAddress_family(env, iaObj) == IPv4) { ipv6_join_leave = JNI_FALSE; } #endif @@ -1989,7 +1972,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this, CHECK_NULL(ni_indexID); } - mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID)); + mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj)); mname.imr_address.s_addr = 0; mname.imr_ifindex = (*env)->GetIntField(env, niObj, ni_indexID); mname_len = sizeof(struct ip_mreqn); @@ -2007,11 +1990,11 @@ static void mcast_join_leave(JNIEnv *env, jobject this, } addr = (*env)->GetObjectArrayElement(env, addrArray, 0); - mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID)); + mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj)); #ifdef __linux__ - mname.imr_address.s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID)); + mname.imr_address.s_addr = htonl(getInetAddress_addr(env, addr)); #else - mname.imr_interface.s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID)); + mname.imr_interface.s_addr = htonl(getInetAddress_addr(env, addr)); #endif mname_len = sizeof(struct ip_mreq); } @@ -2046,7 +2029,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this, return; } - mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID)); + mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj)); mname.imr_address.s_addr = 0 ; mname.imr_ifindex = index; mname_len = sizeof(struct ip_mreqn); @@ -2068,7 +2051,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this, #else mname.imr_interface.s_addr = in.s_addr; #endif - mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID)); + mname.imr_multiaddr.s_addr = htonl(getInetAddress_addr(env, iaObj)); mname_len = sizeof(struct ip_mreq); } } @@ -2133,10 +2116,10 @@ static void mcast_join_leave(JNIEnv *env, jobject this, jbyte caddr[16]; jint family; jint address; - family = (*env)->GetIntField(env, iaObj, ia_familyID) == IPv4? AF_INET : AF_INET6; + family = getInetAddress_family(env, iaObj) == IPv4? AF_INET : AF_INET6; if (family == AF_INET) { /* will convert to IPv4-mapped address */ memset((char *) caddr, 0, 16); - address = (*env)->GetIntField(env, iaObj, ia_addressID); + address = getInetAddress_addr(env, iaObj); caddr[10] = 0xff; caddr[11] = 0xff; diff --git a/jdk/src/solaris/native/java/net/net_util_md.c b/jdk/src/solaris/native/java/net/net_util_md.c index c700cfd0b75..004b6aa5d92 100644 --- a/jdk/src/solaris/native/java/net/net_util_md.c +++ b/jdk/src/solaris/native/java/net/net_util_md.c @@ -777,7 +777,7 @@ JNIEXPORT int JNICALL NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him, int *len, jboolean v4MappedAddress) { jint family; - family = (*env)->GetIntField(env, iaObj, ia_familyID); + family = getInetAddress_family(env, iaObj); #ifdef AF_INET6 /* needs work. 1. family 2. clean up him6 etc deallocate memory */ if (ipv6_available() && !(family == IPv4 && v4MappedAddress == JNI_FALSE)) { @@ -789,7 +789,7 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr if (family == IPv4) { /* will convert to IPv4-mapped address */ memset((char *) caddr, 0, 16); - address = (*env)->GetIntField(env, iaObj, ia_addressID); + address = getInetAddress_addr(env, iaObj); if (address == INADDR_ANY) { /* we would always prefer IPv6 wildcard address caddr[10] = 0xff; @@ -898,7 +898,7 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr return -1; } memset((char *) him4, 0, sizeof(struct sockaddr_in)); - address = (*env)->GetIntField(env, iaObj, ia_addressID); + address = getInetAddress_addr(env, iaObj); him4->sin_port = htons((short) port); him4->sin_addr.s_addr = (uint32_t) htonl(address); him4->sin_family = AF_INET; diff --git a/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java b/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java index 5fa9dbf285b..2d89d601869 100644 --- a/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java +++ b/jdk/src/windows/classes/java/net/TwoStacksPlainDatagramSocketImpl.java @@ -102,7 +102,7 @@ class TwoStacksPlainDatagramSocketImpl extends AbstractPlainDatagramSocketImpl if ((fd != null && fd1 != null) && !connected) { return anyLocalBoundAddr; } - int family = connectedAddress == null ? -1 : connectedAddress.family; + int family = connectedAddress == null ? -1 : connectedAddress.holder().getFamily(); return socketLocalAddress(family); } else return super.getOption(optID); diff --git a/jdk/src/windows/native/java/net/Inet4AddressImpl.c b/jdk/src/windows/native/java/net/Inet4AddressImpl.c index 4bbcfc782b3..d7cf8e5a395 100644 --- a/jdk/src/windows/native/java/net/Inet4AddressImpl.c +++ b/jdk/src/windows/native/java/net/Inet4AddressImpl.c @@ -114,9 +114,6 @@ Java_java_net_Inet4AddressImpl_getLocalHostName (JNIEnv *env, jobject this) { static jclass ni_iacls; static jclass ni_ia4cls; static jmethodID ni_ia4ctrID; -static jfieldID ni_iaaddressID; -static jfieldID ni_iahostID; -static jfieldID ni_iafamilyID; static int initialized = 0; /* @@ -149,9 +146,6 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); - ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); - ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); - ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;"); initialized = 1; } @@ -208,8 +202,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl(address)); + setInetAddress_addr(env, iaObj, ntohl(address)); (*env)->SetObjectArrayElement(env, ret, 0, iaObj); JNU_ReleaseStringPlatformChars(env, host, hostname); return ret; @@ -242,9 +235,8 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl((*addrp)->s_addr)); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + setInetAddress_addr(env, iaObj, ntohl((*addrp)->s_addr)); + setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, i, iaObj); addrp++; i++; diff --git a/jdk/src/windows/native/java/net/Inet6AddressImpl.c b/jdk/src/windows/native/java/net/Inet6AddressImpl.c index 20b42b18508..6f46d7eb642 100644 --- a/jdk/src/windows/native/java/net/Inet6AddressImpl.c +++ b/jdk/src/windows/native/java/net/Inet6AddressImpl.c @@ -77,9 +77,6 @@ static jclass ni_ia4cls; static jclass ni_ia6cls; static jmethodID ni_ia4ctrID; static jmethodID ni_ia6ctrID; -static jfieldID ni_iaaddressID; -static jfieldID ni_iahostID; -static jfieldID ni_iafamilyID; static jfieldID ni_ia6ipaddressID; static int initialized = 0; @@ -104,9 +101,6 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ni_ia6cls = (*env)->NewGlobalRef(env, ni_ia6cls); ni_ia4ctrID = (*env)->GetMethodID(env, ni_ia4cls, "", "()V"); ni_ia6ctrID = (*env)->GetMethodID(env, ni_ia6cls, "", "()V"); - ni_iaaddressID = (*env)->GetFieldID(env, ni_iacls, "address", "I"); - ni_iafamilyID = (*env)->GetFieldID(env, ni_iacls, "family", "I"); - ni_iahostID = (*env)->GetFieldID(env, ni_iacls, "hostName", "Ljava/lang/String;"); ni_ia6ipaddressID = (*env)->GetFieldID(env, ni_ia6cls, "ipaddress", "[B"); initialized = 1; } @@ -243,9 +237,8 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, ret = NULL; goto cleanupAndReturn; } - (*env)->SetIntField(env, iaObj, ni_iaaddressID, - ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + setInetAddress_addr(env, iaObj, ntohl(((struct sockaddr_in*)iterator->ai_addr)->sin_addr.s_addr)); + setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, inetIndex, iaObj); inetIndex ++; } else if (iterator->ai_family == AF_INET6) { @@ -269,7 +262,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this, (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE); } (*env)->SetObjectField(env, iaObj, ni_ia6ipaddressID, ipaddress); - (*env)->SetObjectField(env, iaObj, ni_iahostID, host); + setInetAddress_hostName(env, iaObj, host); (*env)->SetObjectArrayElement(env, ret, inet6Index, iaObj); inet6Index ++; } diff --git a/jdk/src/windows/native/java/net/NetworkInterface.c b/jdk/src/windows/native/java/net/NetworkInterface.c index 6d144659235..429dfee9bdb 100644 --- a/jdk/src/windows/native/java/net/NetworkInterface.c +++ b/jdk/src/windows/native/java/net/NetworkInterface.c @@ -66,7 +66,6 @@ jfieldID ni_nameID; /* NetworkInterface.name */ jfieldID ni_displayNameID; /* NetworkInterface.displayName */ jfieldID ni_childsID; /* NetworkInterface.childs */ jclass ni_iacls; /* InetAddress */ -jfieldID ni_iaAddr; /* InetAddress.address */ jclass ni_ia4cls; /* Inet4Address */ jmethodID ni_ia4Ctor; /* Inet4Address() */ @@ -480,7 +479,6 @@ Java_java_net_NetworkInterface_init(JNIEnv *env, jclass cls) ni_iacls = (*env)->FindClass(env, "java/net/InetAddress"); ni_iacls = (*env)->NewGlobalRef(env, ni_iacls); - ni_iaAddr = (*env)->GetFieldID(env, ni_iacls, "address", "I"); ni_ia4cls = (*env)->FindClass(env, "java/net/Inet4Address"); ni_ia4cls = (*env)->NewGlobalRef(env, ni_ia4cls); @@ -568,7 +566,7 @@ jobject createNetworkInterface } /* default ctor will set family to AF_INET */ - (*env)->SetIntField(env, iaObj, ni_iaAddr, ntohl(addrs->addr.him4.sin_addr.s_addr)); + setInetAddress_addr(env, iaObj, ntohl(addrs->addr.him4.sin_addr.s_addr)); if (addrs->mask != -1) { ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); if (ibObj == NULL) { @@ -581,8 +579,7 @@ jobject createNetworkInterface free_netaddr(netaddrP); return NULL; } - (*env)->SetIntField(env, ia2Obj, ni_iaAddr, - ntohl(addrs->brdcast.him4.sin_addr.s_addr)); + setInetAddress_addr(env, ia2Obj, ntohl(addrs->brdcast.him4.sin_addr.s_addr)); (*env)->SetObjectField(env, ibObj, ni_ibbroadcastID, ia2Obj); (*env)->SetShortField(env, ibObj, ni_ibmaskID, addrs->mask); (*env)->SetObjectArrayElement(env, bindsArr, bind_index++, ibObj); @@ -736,7 +733,7 @@ JNIEXPORT jobject JNICALL Java_java_net_NetworkInterface_getByInetAddress0 (JNIEnv *env, jclass cls, jobject iaObj) { netif *ifList, *curr; - jint addr = (*env)->GetIntField(env, iaObj, ni_iaAddr); + jint addr = getInetAddress_addr(env, iaObj); jobject netifObj = NULL; // Retained for now to support IPv4 only stack, java.net.preferIPv4Stack diff --git a/jdk/src/windows/native/java/net/NetworkInterface.h b/jdk/src/windows/native/java/net/NetworkInterface.h index 22744c1eb6c..a73c62c66b3 100644 --- a/jdk/src/windows/native/java/net/NetworkInterface.h +++ b/jdk/src/windows/native/java/net/NetworkInterface.h @@ -71,7 +71,6 @@ extern jfieldID ni_displayNameID; /* NetworkInterface.displayName */ extern jfieldID ni_childsID; /* NetworkInterface.childs */ extern jclass ni_iacls; /* InetAddress */ -extern jfieldID ni_iaAddr; /* InetAddress.address */ extern jclass ni_ia4cls; /* Inet4Address */ extern jmethodID ni_ia4Ctor; /* Inet4Address() */ diff --git a/jdk/src/windows/native/java/net/NetworkInterface_winXP.c b/jdk/src/windows/native/java/net/NetworkInterface_winXP.c index afc31abcd5f..fbe744c6fe2 100644 --- a/jdk/src/windows/native/java/net/NetworkInterface_winXP.c +++ b/jdk/src/windows/native/java/net/NetworkInterface_winXP.c @@ -33,6 +33,7 @@ #include "jni_util.h" #include "NetworkInterface.h" +#include "net_util.h" /* * Windows implementation of the java.net.NetworkInterface native methods. @@ -477,7 +478,7 @@ static jobject createNetworkInterfaceXP(JNIEnv *env, netif *ifs) } /* default ctor will set family to AF_INET */ - (*env)->SetIntField(env, iaObj, ni_iaAddr, ntohl(addrs->addr.him4.sin_addr.s_addr)); + setInetAddress_addr(env, iaObj, ntohl(addrs->addr.him4.sin_addr.s_addr)); ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID); if (ibObj == NULL) { @@ -490,8 +491,7 @@ static jobject createNetworkInterfaceXP(JNIEnv *env, netif *ifs) free_netaddr(netaddrP); return NULL; } - (*env)->SetIntField(env, ia2Obj, ni_iaAddr, - ntohl(addrs->brdcast.him4.sin_addr.s_addr)); + setInetAddress_addr(env, ia2Obj, ntohl(addrs->brdcast.him4.sin_addr.s_addr)); (*env)->SetObjectField(env, ibObj, ni_ibbroadcastID, ia2Obj); (*env)->SetShortField(env, ibObj, ni_ibmaskID, addrs->mask); (*env)->SetObjectArrayElement(env, bindsArr, bind_index++, ibObj); diff --git a/jdk/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c b/jdk/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c index ce6bfbd8c57..e81f408b3c4 100644 --- a/jdk/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c +++ b/jdk/src/windows/native/java/net/TwoStacksPlainDatagramSocketImpl.c @@ -432,7 +432,7 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_bind0(JNIEnv *env, jobject this, int lcladdrlen; int address; - family = (*env)->GetIntField(env, addressObj, ia_familyID); + family = getInetAddress_family(env, addressObj); if (family == IPv6 && !ipv6_supported) { JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family not supported"); @@ -452,7 +452,7 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_bind0(JNIEnv *env, jobject this, JNU_ThrowNullPointerException(env, "argument address"); return; } else { - address = (*env)->GetIntField(env, addressObj, ia_addressID); + address = getInetAddress_addr(env, addressObj); } if (NET_InetAddressToSockaddr(env, addressObj, port, (struct sockaddr *)&lcladdr, &lcladdrlen, JNI_FALSE) != 0) { @@ -552,9 +552,9 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_connect0(JNIEnv *env, jobject thi return; } - addr = (*env)->GetIntField(env, address, ia_addressID); + addr = getInetAddress_addr(env, address); - family = (*env)->GetIntField(env, address, ia_familyID); + family = getInetAddress_family(env, address); if (family == IPv6 && !ipv6_supported) { JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family not supported"); @@ -670,7 +670,7 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_send(JNIEnv *env, jobject this, return; } - family = (*env)->GetIntField(env, iaObj, ia_familyID); + family = getInetAddress_family(env, iaObj); if (family == IPv4) { fdObj = (*env)->GetObjectField(env, this, pdsi_fdID); } else { @@ -714,7 +714,7 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_send(JNIEnv *env, jobject this, if (!w2k_or_later) { /* avoid this check on Win 2K or better. Does not work with IPv6. * Check is not necessary on these OSes */ if (connected) { - address = (*env)->GetIntField(env, iaObj, ia_addressID); + address = getInetAddress_addr(env, iaObj); } else { address = ntohl(rmtaddr.him4.sin_addr.s_addr); } @@ -823,7 +823,7 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_peek(JNIEnv *env, jobject this, if (IS_NULL(addressObj)) { JNU_ThrowNullPointerException(env, "Null address in peek()"); } else { - address = (*env)->GetIntField(env, addressObj, ia_addressID); + address = getInetAddress_addr(env, addressObj); /* We only handle IPv4 for now. Will support IPv6 once its in the os */ family = AF_INET; } @@ -905,9 +905,8 @@ Java_java_net_TwoStacksPlainDatagramSocketImpl_peek(JNIEnv *env, jobject this, JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", 0); return 0; } - (*env)->SetIntField(env, addressObj, ia_addressID, - ntohl(remote_addr.sin_addr.s_addr)); - (*env)->SetIntField(env, addressObj, ia_familyID, IPv4); + setInetAddress_addr(env, addressObj, ntohl(remote_addr.sin_addr.s_addr)); + setInetAddress_family(env, addressObj, IPv4); /* return port */ return ntohs(remote_addr.sin_port); @@ -1574,21 +1573,16 @@ static int getInetAddrFromIf (JNIEnv *env, int family, jobject nif, jobject *iad { jobjectArray addrArray; static jfieldID ni_addrsID=0; - static jfieldID ia_familyID=0; jsize len; jobject addr; int i; - if (ni_addrsID == NULL || ia_familyID == NULL) { + if (ni_addrsID == NULL ) { jclass c = (*env)->FindClass(env, "java/net/NetworkInterface"); CHECK_NULL_RETURN (c, -1); ni_addrsID = (*env)->GetFieldID(env, c, "addrs", "[Ljava/net/InetAddress;"); CHECK_NULL_RETURN (ni_addrsID, -1); - c = (*env)->FindClass(env,"java/net/InetAddress"); - CHECK_NULL_RETURN (c, -1); - ia_familyID = (*env)->GetFieldID(env, c, "family", "I"); - CHECK_NULL_RETURN (ia_familyID, -1); } addrArray = (*env)->GetObjectField(env, nif, ni_addrsID); @@ -1606,7 +1600,7 @@ static int getInetAddrFromIf (JNIEnv *env, int family, jobject nif, jobject *iad for (i=0; iGetObjectArrayElement(env, addrArray, i); - fam = (*env)->GetIntField(env, addr, ia_familyID); + fam = getInetAddress_family(env, addr); if (fam == family) { *iaddr = addr; return 0; @@ -1618,20 +1612,13 @@ static int getInetAddrFromIf (JNIEnv *env, int family, jobject nif, jobject *iad static int getInet4AddrFromIf (JNIEnv *env, jobject nif, struct in_addr *iaddr) { jobject addr; - static jfieldID ia_addressID; int ret = getInetAddrFromIf (env, IPv4, nif, &addr); if (ret == -1) { return -1; } - if (ia_addressID == 0) { - jclass c = (*env)->FindClass(env,"java/net/InetAddress"); - CHECK_NULL_RETURN (c, -1); - ia_addressID = (*env)->GetFieldID(env, c, "address", "I"); - CHECK_NULL_RETURN (ia_addressID, -1); - } - iaddr->s_addr = htonl((*env)->GetIntField(env, addr, ia_addressID)); + iaddr->s_addr = htonl(getInetAddress_addr(env, addr)); return 0; } @@ -1706,17 +1693,9 @@ static void setMulticastInterface(JNIEnv *env, jobject this, int fd, int fd1, } opt = java_net_SocketOptions_IP_MULTICAST_IF2; } else { - static jfieldID ia_addressID; struct in_addr in; - if (ia_addressID == NULL) { - jclass c = (*env)->FindClass(env,"java/net/InetAddress"); - CHECK_NULL(c); - ia_addressID = (*env)->GetFieldID(env, c, "address", "I"); - CHECK_NULL(ia_addressID); - } - - in.s_addr = htonl((*env)->GetIntField(env, value, ia_addressID)); + in.s_addr = htonl(getInetAddress_addr(env, value)); if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, (const char*)&in, sizeof(in)) < 0) { @@ -1945,7 +1924,6 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, int fd1, jint o if (isIPV4) { static jclass inet4_class; static jmethodID inet4_ctrID; - static jfieldID inet4_addrID; static jclass ni_class; static jmethodID ni_ctrID; @@ -1975,15 +1953,13 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, int fd1, jint o CHECK_NULL_RETURN(c, NULL); inet4_ctrID = (*env)->GetMethodID(env, c, "", "()V"); CHECK_NULL_RETURN(inet4_ctrID, NULL); - inet4_addrID = (*env)->GetFieldID(env, c, "address", "I"); - CHECK_NULL_RETURN(inet4_addrID, NULL); inet4_class = (*env)->NewGlobalRef(env, c); CHECK_NULL_RETURN(inet4_class, NULL); } addr = (*env)->NewObject(env, inet4_class, inet4_ctrID, 0); CHECK_NULL_RETURN(addr, NULL); - (*env)->SetIntField(env, addr, inet4_addrID, ntohl(in.s_addr)); + setInetAddress_addr(env, addr, ntohl(in.s_addr)); /* * For IP_MULTICAST_IF return InetAddress diff --git a/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c b/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c index 4b34384ab1f..73a799f6055 100644 --- a/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c +++ b/jdk/src/windows/native/java/net/TwoStacksPlainSocketImpl.c @@ -411,7 +411,7 @@ Java_java_net_TwoStacksPlainSocketImpl_socketBind(JNIEnv *env, jobject this, fdObj = (*env)->GetObjectField(env, this, psi_fdID); fd1Obj = (*env)->GetObjectField(env, this, psi_fd1ID); - family = (*env)->GetIntField(env, iaObj, ia_familyID); + family = getInetAddress_family(env, iaObj); if (family == IPv6 && !ipv6_supported) { JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", @@ -724,9 +724,8 @@ Java_java_net_TwoStacksPlainSocketImpl_socketAccept(JNIEnv *env, jobject this, return; } - (*env)->SetIntField(env, socketAddressObj, ia_addressID, - ntohl(him.him4.sin_addr.s_addr)); - (*env)->SetIntField(env, socketAddressObj, ia_familyID, IPv4); + setInetAddress_addr(env, socketAddressObj, ntohl(him.him4.sin_addr.s_addr)); + setInetAddress_family(env, socketAddressObj, IPv4); (*env)->SetObjectField(env, socket, psi_addressID, socketAddressObj); } else { jbyteArray addr; @@ -754,7 +753,7 @@ Java_java_net_TwoStacksPlainSocketImpl_socketAccept(JNIEnv *env, jobject this, } addr = (*env)->GetObjectField (env, socketAddressObj, ia6_ipaddressID); (*env)->SetByteArrayRegion (env, addr, 0, 16, (const char *)&him.him6.sin6_addr); - (*env)->SetIntField(env, socketAddressObj, ia_familyID, IPv6); + setInetAddress_family(env, socketAddressObj, IPv6); scope = him.him6.sin6_scope_id; (*env)->SetIntField(env, socketAddressObj, ia6_scopeidID, scope); if(scope>0) { diff --git a/jdk/src/windows/native/java/net/net_util_md.c b/jdk/src/windows/native/java/net/net_util_md.c index c0c44d74eb7..99629ba85ac 100644 --- a/jdk/src/windows/native/java/net/net_util_md.c +++ b/jdk/src/windows/native/java/net/net_util_md.c @@ -804,7 +804,7 @@ JNIEXPORT int JNICALL NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr *him, int *len, jboolean v4MappedAddress) { jint family, iafam; - iafam = (*env)->GetIntField(env, iaObj, ia_familyID); + iafam = getInetAddress_family(env, iaObj); family = (iafam == IPv4)? AF_INET : AF_INET6; if (ipv6_available() && !(family == AF_INET && v4MappedAddress == JNI_FALSE)) { struct SOCKADDR_IN6 *him6 = (struct SOCKADDR_IN6 *)him; @@ -815,7 +815,7 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr if (family == AF_INET) { /* will convert to IPv4-mapped address */ memset((char *) caddr, 0, 16); - address = (*env)->GetIntField(env, iaObj, ia_addressID); + address = getInetAddress_addr(env, iaObj); if (address == INADDR_ANY) { /* we would always prefer IPv6 wildcard address caddr[10] = 0xff; @@ -854,7 +854,7 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr return -1; } memset((char *) him4, 0, sizeof(struct sockaddr_in)); - address = (int)(*env)->GetIntField(env, iaObj, ia_addressID); + address = getInetAddress_addr(env, iaObj); him4->sin_port = htons((short) port); him4->sin_addr.s_addr = (u_long) htonl(address); him4->sin_family = AF_INET; From 009c674511cb17c1aa21c7148cfc2b70759a8a3a Mon Sep 17 00:00:00 2001 From: Valerie Peng Date: Tue, 26 Feb 2013 11:12:40 -0800 Subject: [PATCH 004/151] 8000897: VM crash in CompileBroker Fixed to use the corresponding digest length when generating output. Reviewed-by: mullan --- jdk/src/share/classes/sun/security/provider/SHA2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/classes/sun/security/provider/SHA2.java b/jdk/src/share/classes/sun/security/provider/SHA2.java index 54f34545918..23007c96527 100644 --- a/jdk/src/share/classes/sun/security/provider/SHA2.java +++ b/jdk/src/share/classes/sun/security/provider/SHA2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -101,7 +101,7 @@ abstract class SHA2 extends DigestBase { i2bBig4((int)bitsProcessed, buffer, 60); implCompress(buffer, 0); - i2bBig(state, 0, out, ofs, 32); + i2bBig(state, 0, out, ofs, engineGetDigestLength()); } /** From d4eb03976492c1781ba3033e5e13319d9e3f389f Mon Sep 17 00:00:00 2001 From: Stuart Marks Date: Wed, 27 Feb 2013 14:17:05 -0800 Subject: [PATCH 005/151] 8001040: Rework RMI model Reviewed-by: alanb, ahgross, coffeys, dmocek --- .../sun/rmi/server/MarshalInputStream.java | 14 ++- .../classPathCodebase/ClassPathCodebase.java | 3 +- .../java/rmi/registry/readTest/readTest.sh | 3 +- .../DownloadArrayClass.java | 4 + .../downloadArrayClass/security.policy | 2 + .../loadProxyClasses/LoadProxyClasses.java | 3 +- .../UseCodebaseOnlyDefault.java | 100 ++++++++++++++++++ jdk/test/java/rmi/testlibrary/RMID.java | 3 + 8 files changed, 125 insertions(+), 7 deletions(-) create mode 100644 jdk/test/java/rmi/server/RMIClassLoader/useCodebaseOnlyDefault/UseCodebaseOnlyDefault.java diff --git a/jdk/src/share/classes/sun/rmi/server/MarshalInputStream.java b/jdk/src/share/classes/sun/rmi/server/MarshalInputStream.java index e24a8fb3fdb..4f67941a5d5 100644 --- a/jdk/src/share/classes/sun/rmi/server/MarshalInputStream.java +++ b/jdk/src/share/classes/sun/rmi/server/MarshalInputStream.java @@ -55,13 +55,19 @@ import java.rmi.server.RMIClassLoader; public class MarshalInputStream extends ObjectInputStream { /** - * value of "java.rmi.server.useCodebaseOnly" property, + * Value of "java.rmi.server.useCodebaseOnly" property, * as cached at class initialization time. + * + * The default value is true. That is, the value is true + * if the property is absent or is not equal to "false". + * The value is only false when the property is present + * and is equal to "false". */ private static final boolean useCodebaseOnlyProperty = - java.security.AccessController.doPrivileged( - new sun.security.action.GetBooleanAction( - "java.rmi.server.useCodebaseOnly")).booleanValue(); + ! java.security.AccessController.doPrivileged( + new sun.security.action.GetPropertyAction( + "java.rmi.server.useCodebaseOnly", "true")) + .equalsIgnoreCase("false"); /** table to hold sun classes to which access is explicitly permitted */ protected static Map> permittedSunClasses diff --git a/jdk/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java b/jdk/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java index 99ac5f091a6..b4be7376298 100644 --- a/jdk/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java +++ b/jdk/test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java @@ -31,7 +31,8 @@ * * @library ../../testlibrary * @build TestLibrary Dummy - * @run main/othervm/policy=security.policy ClassPathCodebase + * @run main/othervm/policy=security.policy + * -Djava.rmi.server.useCodebaseOnly=false ClassPathCodebase */ import java.io.*; diff --git a/jdk/test/java/rmi/registry/readTest/readTest.sh b/jdk/test/java/rmi/registry/readTest/readTest.sh index dad6847f304..bb37f65b4cc 100644 --- a/jdk/test/java/rmi/registry/readTest/readTest.sh +++ b/jdk/test/java/rmi/registry/readTest/readTest.sh @@ -61,7 +61,8 @@ RMIREG_OUT=rmi.out #start rmiregistry without any local classes on classpath cd rmi_tmp # NOTE: This RMI Registry port must match TestLibrary.READTEST_REGISTRY_PORT -${TESTJAVA}${FS}bin${FS}rmiregistry ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 & +${TESTJAVA}${FS}bin${FS}rmiregistry -J-Djava.rmi.server.useCodebaseOnly=false \ + ${TESTTOOLVMOPTS} 64005 > ..${FS}${RMIREG_OUT} 2>&1 & RMIREG_PID=$! # allow some time to start sleep 3 diff --git a/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java b/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java index 9df187ab3a3..c0a94697053 100644 --- a/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java +++ b/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java @@ -64,6 +64,10 @@ public class DownloadArrayClass TestLibrary.bomb(e); } + System.err.println("Setting codebase property to: " + remoteCodebase); + System.setProperty("java.rmi.server.codebase", + remoteCodebase.toString()); + /* * Load Foo from a non-RMI class loader so that it won't be already * loaded by an RMI class loader in this VM (for whatever that's diff --git a/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy b/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy index 706a3cdfcbc..ac4ce020733 100644 --- a/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy +++ b/jdk/test/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy @@ -7,6 +7,8 @@ grant codeBase "file:${java.home}/lib/ext/*" { }; grant { + permission java.util.PropertyPermission + "java.rmi.server.codebase", "read,write"; // permissions needed to move classes into separate codebase directories permission java.io.FilePermission diff --git a/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java b/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java index 6d29cb2468f..b5bfcac63f1 100644 --- a/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java +++ b/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/LoadProxyClasses.java @@ -32,7 +32,8 @@ * @library ../../../testlibrary * @build TestLibrary FnnClass FnnUnmarshal NonpublicInterface * NonpublicInterface1 PublicInterface PublicInterface1 - * @run main/othervm/policy=security.policy LoadProxyClasses + * @run main/othervm/policy=security.policy + * -Djava.rmi.server.useCodebaseOnly=false LoadProxyClasses */ import java.rmi.server.RMIClassLoader; diff --git a/jdk/test/java/rmi/server/RMIClassLoader/useCodebaseOnlyDefault/UseCodebaseOnlyDefault.java b/jdk/test/java/rmi/server/RMIClassLoader/useCodebaseOnlyDefault/UseCodebaseOnlyDefault.java new file mode 100644 index 00000000000..80dfd7d704a --- /dev/null +++ b/jdk/test/java/rmi/server/RMIClassLoader/useCodebaseOnlyDefault/UseCodebaseOnlyDefault.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8001040 + * @summary Tests proper parsing and defaulting of the + * "java.rmi.server.useCodebaseOnly" property. + * + * @run main/othervm UseCodebaseOnlyDefault true + * @run main/othervm -Djava.rmi.server.useCodebaseOnly=xyzzy UseCodebaseOnlyDefault true + * @run main/othervm -Djava.rmi.server.useCodebaseOnly UseCodebaseOnlyDefault true + * @run main/othervm -Djava.rmi.server.useCodebaseOnly=true UseCodebaseOnlyDefault true + * @run main/othervm -Djava.rmi.server.useCodebaseOnly=false UseCodebaseOnlyDefault false + */ + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectOutputStream; +import java.lang.reflect.Field; +import sun.rmi.server.MarshalInputStream; + +/** + * usage: UseCodebaseOnlyDefault expected + * + * 'expected' is the expected value of useCodebaseOnly, which + * must be "true" or "false". + */ +public class UseCodebaseOnlyDefault { + static final String USAGE = "usage: UseCodebaseOnlyDefault boolean"; + static final String PROPNAME = "java.rmi.server.useCodebaseOnly"; + + /** + * Gets the actual useCodebaseOnly value by creating an instance + * of MarshalInputStream and reflecting on the useCodebaseOnly field. + */ + static boolean getActualValue() throws Exception { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream oos = new ObjectOutputStream(baos); + oos.writeObject("foo"); + oos.close(); + + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + MarshalInputStream mis = new MarshalInputStream(bais); + + Field f = MarshalInputStream.class.getDeclaredField("useCodebaseOnly"); + f.setAccessible(true); + return f.getBoolean(mis); + } + + public static void main(String[] args) throws Exception { + if (args.length != 1) { + throw new IllegalArgumentException(USAGE); + } + + boolean expected; + if (args[0].equals("true")) { + expected = true; + } else if (args[0].equals("false")) { + expected = false; + } else { + throw new IllegalArgumentException(USAGE); + } + System.out.println("expected = " + expected); + + String prop = System.getProperty(PROPNAME); + System.out.print("Property " + PROPNAME); + if (prop == null) { + System.out.println(" is not set"); + } else { + System.out.println(" = '" + prop + "'"); + } + + boolean actual = getActualValue(); + System.out.println("actual = " + actual); + + if (expected != actual) + throw new AssertionError("actual does not match expected value"); + } +} diff --git a/jdk/test/java/rmi/testlibrary/RMID.java b/jdk/test/java/rmi/testlibrary/RMID.java index 8b0f3e26bd4..f528b2058fe 100644 --- a/jdk/test/java/rmi/testlibrary/RMID.java +++ b/jdk/test/java/rmi/testlibrary/RMID.java @@ -108,6 +108,9 @@ public class RMID extends JavaVM { if (!TestParams.testClasses.equals("")) { args += " -C-Dtest.classes=" + TestParams.testClasses; } + + args += " -C-Djava.rmi.server.useCodebaseOnly=false "; + args += " " + getCodeCoverageArgs(); return args; } From e064f7ea781f8b6358e73f048701d7c746f6f788 Mon Sep 17 00:00:00 2001 From: Daniel Fuchs Date: Thu, 14 Mar 2013 13:10:32 +0100 Subject: [PATCH 006/151] 8001322: Refactor deserialization Reviewed-by: mchung, skoivu, smarks --- .../classes/java/io/ObjectInputStream.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/jdk/src/share/classes/java/io/ObjectInputStream.java b/jdk/src/share/classes/java/io/ObjectInputStream.java index 0a530dd6db6..ca0400539f9 100644 --- a/jdk/src/share/classes/java/io/ObjectInputStream.java +++ b/jdk/src/share/classes/java/io/ObjectInputStream.java @@ -41,6 +41,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicBoolean; import static java.io.ObjectStreamClass.processQueue; +import sun.reflect.misc.ReflectUtil; /** * An ObjectInputStream deserializes primitive data and objects previously @@ -1519,6 +1520,12 @@ public class ObjectInputStream } } + private boolean isCustomSubclass() { + // Return true if this class is a custom subclass of ObjectInputStream + return getClass().getClassLoader() + != ObjectInputStream.class.getClassLoader(); + } + /** * Reads in and returns class descriptor for a dynamic proxy class. Sets * passHandle to proxy class descriptor's assigned handle. If proxy class @@ -1548,6 +1555,15 @@ public class ObjectInputStream try { if ((cl = resolveProxyClass(ifaces)) == null) { resolveEx = new ClassNotFoundException("null class"); + } else if (!Proxy.isProxyClass(cl)) { + throw new InvalidClassException("Not a proxy"); + } else { + // ReflectUtil.checkProxyPackageAccess makes a test + // equivalent to isCustomSubclass so there's no need + // to condition this call to isCustomSubclass == true here. + ReflectUtil.checkProxyPackageAccess( + getClass().getClassLoader(), + cl.getInterfaces()); } } catch (ClassNotFoundException ex) { resolveEx = ex; @@ -1589,9 +1605,12 @@ public class ObjectInputStream Class cl = null; ClassNotFoundException resolveEx = null; bin.setBlockDataMode(true); + final boolean checksRequired = isCustomSubclass(); try { if ((cl = resolveClass(readDesc)) == null) { resolveEx = new ClassNotFoundException("null class"); + } else if (checksRequired) { + ReflectUtil.checkPackageAccess(cl); } } catch (ClassNotFoundException ex) { resolveEx = ex; From 1bb9122f6983ff0a4234c4d5d98eeb3d23187bde Mon Sep 17 00:00:00 2001 From: Darryl Mocek Date: Tue, 5 Feb 2013 16:38:25 -0800 Subject: [PATCH 007/151] 8001329: Augment RMI logging Reviewed-by: smarks, hawtin, alanb --- jdk/src/share/classes/java/rmi/server/LogStream.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/rmi/server/LogStream.java b/jdk/src/share/classes/java/rmi/server/LogStream.java index 625e841ce8f..60adea3d965 100644 --- a/jdk/src/share/classes/java/rmi/server/LogStream.java +++ b/jdk/src/share/classes/java/rmi/server/LogStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -120,6 +120,13 @@ public class LogStream extends PrintStream { */ @Deprecated public static synchronized void setDefaultStream(PrintStream newDefault) { + SecurityManager sm = System.getSecurityManager(); + + if (sm != null) { + sm.checkPermission( + new java.util.logging.LoggingPermission("control", null)); + } + defaultStream = newDefault; } From 3b34f3b493b277f5442a812fb7a1cdf218a2bc35 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 20 Dec 2012 13:40:27 +0000 Subject: [PATCH 008/151] 8003335: Better handling of Finalizer thread Reviewed-by: alanb, ahgross --- .../share/classes/java/lang/ref/Finalizer.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/java/lang/ref/Finalizer.java b/jdk/src/share/classes/java/lang/ref/Finalizer.java index 4e148c28fdc..cdba65e4820 100644 --- a/jdk/src/share/classes/java/lang/ref/Finalizer.java +++ b/jdk/src/share/classes/java/lang/ref/Finalizer.java @@ -38,9 +38,9 @@ final class Finalizer extends FinalReference { /* Package-private; must be in */ static native void invokeFinalizeMethod(Object o) throws Throwable; - static private ReferenceQueue queue = new ReferenceQueue(); - static private Finalizer unfinalized = null; - static private Object lock = new Object(); + private static ReferenceQueue queue = new ReferenceQueue(); + private static Finalizer unfinalized = null; + private static final Object lock = new Object(); private Finalizer next = null, @@ -142,7 +142,11 @@ final class Finalizer extends FinalReference { /* Package-private; must be in /* Called by Runtime.runFinalization() */ static void runFinalization() { forkSecondaryFinalizer(new Runnable() { + private volatile boolean running; public void run() { + if (running) + return; + running = true; for (;;) { Finalizer f = (Finalizer)queue.poll(); if (f == null) break; @@ -155,7 +159,11 @@ final class Finalizer extends FinalReference { /* Package-private; must be in /* Invoked by java.lang.Shutdown */ static void runAllFinalizers() { forkSecondaryFinalizer(new Runnable() { + private volatile boolean running; public void run() { + if (running) + return; + running = true; for (;;) { Finalizer f; synchronized (lock) { @@ -168,10 +176,14 @@ final class Finalizer extends FinalReference { /* Package-private; must be in } private static class FinalizerThread extends Thread { + private volatile boolean running; FinalizerThread(ThreadGroup g) { super(g, "Finalizer"); } public void run() { + if (running) + return; + running = true; for (;;) { try { Finalizer f = (Finalizer)queue.remove(); From 0c8b65724ac9ef86c2f3a585010ebc8506afd55d Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Fri, 15 Feb 2013 13:49:38 +0400 Subject: [PATCH 009/151] 8004261: Improve input validation Reviewed-by: art, mschoene, amenkov --- .../sun/media/sound/AbstractMidiDevice.java | 25 ++++++++++--------- .../com/sun/media/sound/FastShortMessage.java | 2 +- .../com/sun/media/sound/FastSysexMessage.java | 2 +- .../com/sun/media/sound/MidiOutDevice.java | 16 +++++++----- .../sun/media/sound/RealTimeSequencer.java | 2 +- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java b/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java index a0f06c3ed07..dacefba8f49 100644 --- a/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java +++ b/jdk/src/share/classes/com/sun/media/sound/AbstractMidiDevice.java @@ -56,7 +56,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice // from simultaneous creation and destruction // reduces possibility of deadlock, compared to // synchronizing to the class instance - private Object traRecLock = new Object(); + private final Object traRecLock = new Object(); // DEVICE ATTRIBUTES @@ -474,7 +474,7 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice This is necessary for Receivers retrieved via MidiSystem.getReceiver() (which opens the device implicitely). */ - protected abstract class AbstractReceiver implements MidiDeviceReceiver { + abstract class AbstractReceiver implements MidiDeviceReceiver { private boolean open = true; @@ -483,24 +483,24 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice Receiver. Therefore, subclasses should not override this method. Instead, they should implement implSend(). */ - public synchronized void send(MidiMessage message, long timeStamp) { - if (open) { - implSend(message, timeStamp); - } else { + @Override + public final synchronized void send(final MidiMessage message, + final long timeStamp) { + if (!open) { throw new IllegalStateException("Receiver is not open"); } + implSend(message, timeStamp); } - - protected abstract void implSend(MidiMessage message, long timeStamp); - + abstract void implSend(MidiMessage message, long timeStamp); /** Close the Receiver. * Here, the call to the magic method closeInternal() takes place. * Therefore, subclasses that override this method must call * 'super.close()'. */ - public void close() { + @Override + public final void close() { open = false; synchronized (AbstractMidiDevice.this.traRecLock) { AbstractMidiDevice.this.getReceiverList().remove(this); @@ -508,11 +508,12 @@ abstract class AbstractMidiDevice implements MidiDevice, ReferenceCountingDevice AbstractMidiDevice.this.closeInternal(this); } - public MidiDevice getMidiDevice() { + @Override + public final MidiDevice getMidiDevice() { return AbstractMidiDevice.this; } - protected boolean isOpen() { + final boolean isOpen() { return open; } diff --git a/jdk/src/share/classes/com/sun/media/sound/FastShortMessage.java b/jdk/src/share/classes/com/sun/media/sound/FastShortMessage.java index b4ca9c82ce8..39f85da154c 100644 --- a/jdk/src/share/classes/com/sun/media/sound/FastShortMessage.java +++ b/jdk/src/share/classes/com/sun/media/sound/FastShortMessage.java @@ -32,7 +32,7 @@ import javax.sound.midi.*; * * @author Florian Bomers */ -class FastShortMessage extends ShortMessage { +final class FastShortMessage extends ShortMessage { private int packedMsg; public FastShortMessage(int packedMsg) throws InvalidMidiDataException { diff --git a/jdk/src/share/classes/com/sun/media/sound/FastSysexMessage.java b/jdk/src/share/classes/com/sun/media/sound/FastSysexMessage.java index d00ec68aa63..7f2e2def2ee 100644 --- a/jdk/src/share/classes/com/sun/media/sound/FastSysexMessage.java +++ b/jdk/src/share/classes/com/sun/media/sound/FastSysexMessage.java @@ -32,7 +32,7 @@ import javax.sound.midi.*; * * @author Florian Bomers */ -class FastSysexMessage extends SysexMessage { +final class FastSysexMessage extends SysexMessage { FastSysexMessage(byte[] data) throws InvalidMidiDataException { super(data); diff --git a/jdk/src/share/classes/com/sun/media/sound/MidiOutDevice.java b/jdk/src/share/classes/com/sun/media/sound/MidiOutDevice.java index e1ada68a80e..a9193005e5f 100644 --- a/jdk/src/share/classes/com/sun/media/sound/MidiOutDevice.java +++ b/jdk/src/share/classes/com/sun/media/sound/MidiOutDevice.java @@ -103,9 +103,9 @@ class MidiOutDevice extends AbstractMidiDevice { class MidiOutReceiver extends AbstractReceiver { - protected void implSend(MidiMessage message, long timeStamp) { - int length = message.getLength(); - int status = message.getStatus(); + void implSend(final MidiMessage message, final long timeStamp) { + final int length = message.getLength(); + final int status = message.getStatus(); if (length <= 3 && status != 0xF0 && status != 0xF7) { int packedMsg; if (message instanceof ShortMessage) { @@ -140,11 +140,15 @@ class MidiOutDevice extends AbstractMidiDevice { } nSendShortMessage(id, packedMsg, timeStamp); } else { + final byte[] data; if (message instanceof FastSysexMessage) { - nSendLongMessage(id, ((FastSysexMessage) message).getReadOnlyMessage(), - length, timeStamp); + data = ((FastSysexMessage) message).getReadOnlyMessage(); } else { - nSendLongMessage(id, message.getMessage(), length, timeStamp); + data = message.getMessage(); + } + final int dataLength = Math.min(length, data.length); + if (dataLength > 0) { + nSendLongMessage(id, data, dataLength, timeStamp); } } } diff --git a/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java b/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java index 8b4ae6e7ad1..93b7b0612eb 100644 --- a/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java +++ b/jdk/src/share/classes/com/sun/media/sound/RealTimeSequencer.java @@ -1026,7 +1026,7 @@ class RealTimeSequencer extends AbstractMidiDevice implements Sequencer, AutoCon class SequencerReceiver extends AbstractReceiver { - protected void implSend(MidiMessage message, long timeStamp) { + void implSend(MidiMessage message, long timeStamp) { if (recording) { long tickPos = 0; From 3c0be232bebc9b31b903a2b3bc58a5aefa89a79c Mon Sep 17 00:00:00 2001 From: Alexey Utkin Date: Fri, 22 Feb 2013 17:49:15 +0400 Subject: [PATCH 010/151] 8005942: (process) Improved Runtime.exec Reviewed-by: alanb, ahgross --- .../classes/java/lang/ProcessBuilder.java | 16 ++- .../classes/java/lang/ProcessImpl.java | 125 +++++++++++++++--- 2 files changed, 118 insertions(+), 23 deletions(-) diff --git a/jdk/src/share/classes/java/lang/ProcessBuilder.java b/jdk/src/share/classes/java/lang/ProcessBuilder.java index 4af24b6430b..64f56d77829 100644 --- a/jdk/src/share/classes/java/lang/ProcessBuilder.java +++ b/jdk/src/share/classes/java/lang/ProcessBuilder.java @@ -30,6 +30,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.FileOutputStream; +import java.security.AccessControlException; import java.util.Arrays; import java.util.ArrayList; import java.util.List; @@ -1024,13 +1025,24 @@ public final class ProcessBuilder redirects, redirectErrorStream); } catch (IOException e) { + String exceptionInfo = ": " + e.getMessage(); + Throwable cause = e; + if (security != null) { + // Can not disclose the fail reason for read-protected files. + try { + security.checkRead(prog); + } catch (AccessControlException ace) { + exceptionInfo = ""; + cause = ace; + } + } // It's much easier for us to create a high-quality error // message than the low-level C code which found the problem. throw new IOException( "Cannot run program \"" + prog + "\"" + (dir == null ? "" : " (in directory \"" + dir + "\")") - + ": " + e.getMessage(), - e); + + exceptionInfo, + cause); } } } diff --git a/jdk/src/windows/classes/java/lang/ProcessImpl.java b/jdk/src/windows/classes/java/lang/ProcessImpl.java index d4cdc6c7eec..87c89bb11e6 100644 --- a/jdk/src/windows/classes/java/lang/ProcessImpl.java +++ b/jdk/src/windows/classes/java/lang/ProcessImpl.java @@ -145,6 +145,88 @@ final class ProcessImpl extends Process { } + // We guarantee the only command file execution for implicit [cmd.exe] run. + // http://technet.microsoft.com/en-us/library/bb490954.aspx + private static final char CMD_BAT_ESCAPE[] = {' ', '\t', '<', '>', '&', '|', '^'}; + private static final char WIN32_EXECUTABLE_ESCAPE[] = {' ', '\t', '<', '>'}; + + private static boolean isQuoted(boolean noQuotesInside, String arg, + String errorMessage) { + int lastPos = arg.length() - 1; + if (lastPos >=1 && arg.charAt(0) == '"' && arg.charAt(lastPos) == '"') { + // The argument has already been quoted. + if (noQuotesInside) { + if (arg.indexOf('"', 1) != lastPos) { + // There is ["] inside. + throw new IllegalArgumentException(errorMessage); + } + } + return true; + } + if (noQuotesInside) { + if (arg.indexOf('"') >= 0) { + // There is ["] inside. + throw new IllegalArgumentException(errorMessage); + } + } + return false; + } + + private static boolean needsEscaping(boolean isCmdFile, String arg) { + // Switch off MS heuristic for internal ["]. + // Please, use the explicit [cmd.exe] call + // if you need the internal ["]. + // Example: "cmd.exe", "/C", "Extended_MS_Syntax" + + // For [.exe] or [.com] file the unpaired/internal ["] + // in the argument is not a problem. + boolean argIsQuoted = isQuoted(isCmdFile, arg, + "Argument has embedded quote, use the explicit CMD.EXE call."); + + if (!argIsQuoted) { + char testEscape[] = isCmdFile + ? CMD_BAT_ESCAPE + : WIN32_EXECUTABLE_ESCAPE; + for (int i = 0; i < testEscape.length; ++i) { + if (arg.indexOf(testEscape[i]) >= 0) { + return true; + } + } + } + return false; + } + + private static String getExecutablePath(String path) + throws IOException + { + boolean pathIsQuoted = isQuoted(true, path, + "Executable name has embedded quote, split the arguments"); + + // Win32 CreateProcess requires path to be normalized + File fileToRun = new File(pathIsQuoted + ? path.substring(1, path.length() - 1) + : path); + + // From the [CreateProcess] function documentation: + // + // "If the file name does not contain an extension, .exe is appended. + // Therefore, if the file name extension is .com, this parameter + // must include the .com extension. If the file name ends in + // a period (.) with no extension, or if the file name contains a path, + // .exe is not appended." + // + // "If the file name !does not contain a directory path!, + // the system searches for the executable file in the following + // sequence:..." + // + // In practice ANY non-existent path is extended by [.exe] extension + // in the [CreateProcess] funcion with the only exception: + // the path ends by (.) + + return fileToRun.getPath(); + } + + private long handle = 0; private OutputStream stdin_stream; private InputStream stdout_stream; @@ -157,30 +239,31 @@ final class ProcessImpl extends Process { final boolean redirectErrorStream) throws IOException { - // Win32 CreateProcess requires cmd[0] to be normalized - cmd[0] = new File(cmd[0]).getPath(); + // The [executablePath] is not quoted for any case. + String executablePath = getExecutablePath(cmd[0]); + + // We need to extend the argument verification procedure + // to guarantee the only command file execution for implicit [cmd.exe] + // run. + String upPath = executablePath.toUpperCase(); + boolean isCmdFile = (upPath.endsWith(".CMD") || upPath.endsWith(".BAT")); StringBuilder cmdbuf = new StringBuilder(80); - for (int i = 0; i < cmd.length; i++) { - if (i > 0) { - cmdbuf.append(' '); - } + + // Quotation protects from interpretation of the [path] argument as + // start of longer path with spaces. Quotation has no influence to + // [.exe] extension heuristic. + cmdbuf.append('"'); + cmdbuf.append(executablePath); + cmdbuf.append('"'); + + for (int i = 1; i < cmd.length; i++) { + cmdbuf.append(' '); String s = cmd[i]; - if (s.indexOf(' ') >= 0 || s.indexOf('\t') >= 0) { - if (s.charAt(0) != '"') { - cmdbuf.append('"'); - cmdbuf.append(s); - if (s.endsWith("\\")) { - cmdbuf.append("\\"); - } - cmdbuf.append('"'); - } else if (s.endsWith("\"")) { - /* The argument has already been quoted. */ - cmdbuf.append(s); - } else { - /* Unmatched quote for the argument. */ - throw new IllegalArgumentException(); - } + if (needsEscaping(isCmdFile, s)) { + cmdbuf.append('"'); + cmdbuf.append(s); + cmdbuf.append('"'); } else { cmdbuf.append(s); } From e3fdd3983dda996ad8ab347b05e0c641985b9fdd Mon Sep 17 00:00:00 2001 From: Dmitry Samersoff Date: Tue, 5 Mar 2013 00:02:24 +0400 Subject: [PATCH 011/151] 8006435: Improvements in JMX Improvements in JMX Reviewed-by: dfuchs, skoivu, alanb, mchung --- .../sun/jmx/mbeanserver/MBeanInstantiator.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java b/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java index ab62660be49..1adb4dd9373 100644 --- a/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java +++ b/jdk/src/share/classes/com/sun/jmx/mbeanserver/MBeanInstantiator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import java.io.IOException; import java.io.ObjectInputStream; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Modifier; import java.security.Permission; import java.util.Map; import java.util.logging.Level; @@ -213,7 +214,6 @@ public class MBeanInstantiator { Object moi; - // ------------------------------ // ------------------------------ Constructor cons = findConstructor(theClass, null); @@ -224,6 +224,7 @@ public class MBeanInstantiator { // Instantiate the new object try { ReflectUtil.checkPackageAccess(theClass); + ensureClassAccess(theClass); moi= cons.newInstance(); } catch (InvocationTargetException e) { // Wrap the exception. @@ -270,7 +271,6 @@ public class MBeanInstantiator { checkMBeanPermission(theClass, null, null, "instantiate"); // Instantiate the new object - // ------------------------------ // ------------------------------ final Class[] tab; @@ -300,6 +300,7 @@ public class MBeanInstantiator { } try { ReflectUtil.checkPackageAccess(theClass); + ensureClassAccess(theClass); moi = cons.newInstance(params); } catch (NoSuchMethodError error) { @@ -741,4 +742,13 @@ public class MBeanInstantiator { sm.checkPermission(perm); } } + + private static void ensureClassAccess(Class clazz) + throws IllegalAccessException + { + int mod = clazz.getModifiers(); + if (!Modifier.isPublic(mod)) { + throw new IllegalAccessException("Class is not public and can't be instantiated"); + } + } } From 46a46798f151197d66b135cb0b4a16351899efb2 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 8 Feb 2013 09:15:01 -0800 Subject: [PATCH 012/151] 8006795: Improve font warning messages Reviewed-by: bae, jgodinez --- jdk/src/share/classes/sun/font/CMap.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/jdk/src/share/classes/sun/font/CMap.java b/jdk/src/share/classes/sun/font/CMap.java index 0dd595ceb9f..f2554bd3b6c 100644 --- a/jdk/src/share/classes/sun/font/CMap.java +++ b/jdk/src/share/classes/sun/font/CMap.java @@ -841,7 +841,6 @@ abstract class CMap { CMapFormat6(ByteBuffer bbuffer, int offset, char[] xlat) { - System.err.println("WARNING: CMapFormat8 is untested."); bbuffer.position(offset+6); CharBuffer buffer = bbuffer.asCharBuffer(); firstCode = buffer.get(); @@ -884,7 +883,6 @@ abstract class CMap { CMapFormat8(ByteBuffer bbuffer, int offset, char[] xlat) { - System.err.println("WARNING: CMapFormat8 is untested."); bbuffer.position(12); bbuffer.get(is32); nGroups = bbuffer.getInt(); @@ -915,7 +913,6 @@ abstract class CMap { CMapFormat10(ByteBuffer bbuffer, int offset, char[] xlat) { - System.err.println("WARNING: CMapFormat10 is untested."); firstCode = bbuffer.getInt() & INTMASK; entryCount = bbuffer.getInt() & INTMASK; bbuffer.position(offset+20); From 243470f47e03e5da719471e185506014784f798a Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Tue, 19 Feb 2013 11:47:42 +0400 Subject: [PATCH 013/151] 8007617: Better validation of images Reviewed-by: prr, mschoene, jgodinez --- .../sun/awt/image/ImageRepresentation.java | 19 +- .../share/native/sun/awt/image/awt_ImageRep.c | 173 +++++++++++++++--- 2 files changed, 156 insertions(+), 36 deletions(-) diff --git a/jdk/src/share/classes/sun/awt/image/ImageRepresentation.java b/jdk/src/share/classes/sun/awt/image/ImageRepresentation.java index 23b33212602..18fb13ed69b 100644 --- a/jdk/src/share/classes/sun/awt/image/ImageRepresentation.java +++ b/jdk/src/share/classes/sun/awt/image/ImageRepresentation.java @@ -333,10 +333,10 @@ public class ImageRepresentation extends ImageWatched implements ImageConsumer hints = h; } - private native void setICMpixels(int x, int y, int w, int h, int[] lut, + private native boolean setICMpixels(int x, int y, int w, int h, int[] lut, byte[] pix, int off, int scansize, IntegerComponentRaster ict); - private native int setDiffICM(int x, int y, int w, int h, int[] lut, + private native boolean setDiffICM(int x, int y, int w, int h, int[] lut, int transPix, int numLut, IndexColorModel icm, byte[] pix, int off, int scansize, ByteComponentRaster bct, int chanOff); @@ -426,10 +426,10 @@ public class ImageRepresentation extends ImageWatched implements ImageConsumer IndexColorModel icm = (IndexColorModel) model; ByteComponentRaster bct = (ByteComponentRaster) biRaster; int numlut = numSrcLUT; - if (setDiffICM(x, y, w, h, srcLUT, srcLUTtransIndex, + if (!setDiffICM(x, y, w, h, srcLUT, srcLUTtransIndex, numSrcLUT, icm, pix, off, scansize, bct, - bct.getDataOffset(0)) == 0) { + bct.getDataOffset(0))) { convertToRGB(); } else { @@ -470,9 +470,14 @@ public class ImageRepresentation extends ImageWatched implements ImageConsumer if (s_useNative) { // Note that setICMpixels modifies the raster directly // so we must mark it as changed afterwards - setICMpixels(x, y, w, h, srcLUT, pix, off, scansize, - iraster); - iraster.markDirty(); + if (setICMpixels(x, y, w, h, srcLUT, pix, off, scansize, + iraster)) + { + iraster.markDirty(); + } else { + abort(); + return; + } } else { int[] storage = new int[w*h]; diff --git a/jdk/src/share/native/sun/awt/image/awt_ImageRep.c b/jdk/src/share/native/sun/awt/image/awt_ImageRep.c index aa1521e42a4..e091be36eab 100644 --- a/jdk/src/share/native/sun/awt/image/awt_ImageRep.c +++ b/jdk/src/share/native/sun/awt/image/awt_ImageRep.c @@ -45,6 +45,53 @@ static int findIdx(unsigned int rgb, unsigned int *lut, int numLut1); # define TRUE 1 #endif +#define CHECK_STRIDE(yy, hh, ss) \ + if ((ss) != 0) { \ + int limit = 0x7fffffff / ((ss) > 0 ? (ss) : -(ss)); \ + if (limit < (yy) || limit < ((yy) + (hh) - 1)) { \ + /* integer oveflow */ \ + return JNI_FALSE; \ + } \ + } \ + +#define CHECK_SRC() \ + do { \ + int pixeloffset; \ + if (off < 0 || off >= srcDataLength) { \ + return JNI_FALSE; \ + } \ + CHECK_STRIDE(0, h, scansize); \ + \ + /* check scansize */ \ + pixeloffset = scansize * (h - 1); \ + if ((w - 1) > (0x7fffffff - pixeloffset)) { \ + return JNI_FALSE; \ + } \ + pixeloffset += (w - 1); \ + \ + if (off > (0x7fffffff - pixeloffset)) { \ + return JNI_FALSE; \ + } \ + } while (0) \ + +#define CHECK_DST(xx, yy) \ + do { \ + int soffset = (yy) * sStride; \ + int poffset = (xx) * pixelStride; \ + if (poffset > (0x7fffffff - soffset)) { \ + return JNI_FALSE; \ + } \ + poffset += soffset; \ + if (dstDataOff > (0x7fffffff - poffset)) { \ + return JNI_FALSE; \ + } \ + poffset += dstDataOff; \ + \ + if (poffset < 0 || poffset >= dstDataLength) { \ + return JNI_FALSE; \ + } \ + } while (0) \ + static jfieldID s_JnumSrcLUTID; static jfieldID s_JsrcLUTtransIndexID; @@ -58,7 +105,7 @@ Java_sun_awt_image_ImageRepresentation_initIDs(JNIEnv *env, jclass cls) { /* * This routine is used to draw ICM pixels into a default color model */ -JNIEXPORT void JNICALL +JNIEXPORT jboolean JNICALL Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls, jint x, jint y, jint w, jint h, jintArray jlut, @@ -67,7 +114,10 @@ Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls, jobject jict) { unsigned char *srcData = NULL; + jint srcDataLength; int *dstData; + jint dstDataLength; + jint dstDataOff; int *dstP, *dstyP; unsigned char *srcyP, *srcP; int *srcLUT = NULL; @@ -80,12 +130,20 @@ Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls, if (JNU_IsNull(env, jlut)) { JNU_ThrowNullPointerException(env, "NullPointerException"); - return; + return JNI_FALSE; } if (JNU_IsNull(env, jpix)) { JNU_ThrowNullPointerException(env, "NullPointerException"); - return; + return JNI_FALSE; + } + + if (x < 0 || w < 1 || (0x7fffffff - x) < w) { + return JNI_FALSE; + } + + if (y < 0 || h < 1 || (0x7fffffff - y) < h) { + return JNI_FALSE; } sStride = (*env)->GetIntField(env, jict, g_ICRscanstrID); @@ -93,10 +151,47 @@ Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls, joffs = (*env)->GetObjectField(env, jict, g_ICRdataOffsetsID); jdata = (*env)->GetObjectField(env, jict, g_ICRdataID); + if (JNU_IsNull(env, jdata)) { + /* no destination buffer */ + return JNI_FALSE; + } + + if (JNU_IsNull(env, joffs) || (*env)->GetArrayLength(env, joffs) < 1) { + /* invalid data offstes in raster */ + return JNI_FALSE; + } + + srcDataLength = (*env)->GetArrayLength(env, jpix); + dstDataLength = (*env)->GetArrayLength(env, jdata); + + cOffs = (int *) (*env)->GetPrimitiveArrayCritical(env, joffs, NULL); + if (cOffs == NULL) { + JNU_ThrowNullPointerException(env, "Null channel offset array"); + return JNI_FALSE; + } + + dstDataOff = cOffs[0]; + + /* the offset array is not needed anymore and can be released */ + (*env)->ReleasePrimitiveArrayCritical(env, joffs, cOffs, JNI_ABORT); + joffs = NULL; + cOffs = NULL; + + /* do basic validation: make sure that offsets for + * first pixel and for last pixel are safe to calculate and use */ + CHECK_STRIDE(y, h, sStride); + CHECK_STRIDE(x, w, pixelStride); + + CHECK_DST(x, y); + CHECK_DST(x + w -1, y + h - 1); + + /* check source array */ + CHECK_SRC(); + srcLUT = (int *) (*env)->GetPrimitiveArrayCritical(env, jlut, NULL); if (srcLUT == NULL) { JNU_ThrowNullPointerException(env, "Null IndexColorModel LUT"); - return; + return JNI_FALSE; } srcData = (unsigned char *) (*env)->GetPrimitiveArrayCritical(env, jpix, @@ -104,27 +199,18 @@ Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls, if (srcData == NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT); JNU_ThrowNullPointerException(env, "Null data array"); - return; - } - - cOffs = (int *) (*env)->GetPrimitiveArrayCritical(env, joffs, NULL); - if (cOffs == NULL) { - (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT); - (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT); - JNU_ThrowNullPointerException(env, "Null channel offset array"); - return; + return JNI_FALSE; } dstData = (int *) (*env)->GetPrimitiveArrayCritical(env, jdata, NULL); if (dstData == NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT); (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT); - (*env)->ReleasePrimitiveArrayCritical(env, joffs, cOffs, JNI_ABORT); JNU_ThrowNullPointerException(env, "Null tile data array"); - return; + return JNI_FALSE; } - dstyP = dstData + cOffs[0] + y*sStride + x*pixelStride; + dstyP = dstData + dstDataOff + y*sStride + x*pixelStride; srcyP = srcData + off; for (yIdx = 0; yIdx < h; yIdx++, srcyP += scansize, dstyP+=sStride) { srcP = srcyP; @@ -137,12 +223,12 @@ Java_sun_awt_image_ImageRepresentation_setICMpixels(JNIEnv *env, jclass cls, /* Release the locked arrays */ (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT); (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT); - (*env)->ReleasePrimitiveArrayCritical(env, joffs, cOffs, JNI_ABORT); (*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, JNI_ABORT); + return JNI_TRUE; } -JNIEXPORT jint JNICALL +JNIEXPORT jboolean JNICALL Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, jint x, jint y, jint w, jint h, jintArray jlut, @@ -150,7 +236,7 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, jobject jicm, jbyteArray jpix, jint off, jint scansize, - jobject jbct, jint chanOff) + jobject jbct, jint dstDataOff) { unsigned int *srcLUT = NULL; unsigned int *newLUT = NULL; @@ -159,6 +245,8 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, int mapSize; jobject jdata = NULL; jobject jnewlut = NULL; + jint srcDataLength; + jint dstDataLength; unsigned char *srcData; unsigned char *dstData; unsigned char *dataP; @@ -174,14 +262,23 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, if (JNU_IsNull(env, jlut)) { JNU_ThrowNullPointerException(env, "NullPointerException"); - return 0; + return JNI_FALSE; } if (JNU_IsNull(env, jpix)) { JNU_ThrowNullPointerException(env, "NullPointerException"); - return 0; + return JNI_FALSE; } + if (x < 0 || w < 1 || (0x7fffffff - x) < w) { + return JNI_FALSE; + } + + if (y < 0 || h < 1 || (0x7fffffff - y) < h) { + return JNI_FALSE; + } + + sStride = (*env)->GetIntField(env, jbct, g_BCRscanstrID); pixelStride =(*env)->GetIntField(env, jbct, g_BCRpixstrID); jdata = (*env)->GetObjectField(env, jbct, g_BCRdataID); @@ -193,13 +290,31 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, of byte data type, so we have to convert the image data to default representation. */ - return 0; + return JNI_FALSE; } + + if (JNU_IsNull(env, jdata)) { + /* no destination buffer */ + return JNI_FALSE; + } + + srcDataLength = (*env)->GetArrayLength(env, jpix); + dstDataLength = (*env)->GetArrayLength(env, jdata); + + CHECK_STRIDE(y, h, sStride); + CHECK_STRIDE(x, w, pixelStride); + + CHECK_DST(x, y); + CHECK_DST(x + w -1, y + h - 1); + + /* check source array */ + CHECK_SRC(); + srcLUT = (unsigned int *) (*env)->GetPrimitiveArrayCritical(env, jlut, NULL); if (srcLUT == NULL) { /* out of memory error already thrown */ - return 0; + return JNI_FALSE; } newLUT = (unsigned int *) (*env)->GetPrimitiveArrayCritical(env, jnewlut, @@ -208,7 +323,7 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT); /* out of memory error already thrown */ - return 0; + return JNI_FALSE; } newNumLut = numLut; @@ -219,7 +334,7 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, (*env)->ReleasePrimitiveArrayCritical(env, jlut, srcLUT, JNI_ABORT); (*env)->ReleasePrimitiveArrayCritical(env, jnewlut, newLUT, JNI_ABORT); - return 0; + return JNI_FALSE; } /* Don't need these any more */ @@ -239,7 +354,7 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, NULL); if (srcData == NULL) { /* out of memory error already thrown */ - return 0; + return JNI_FALSE; } dstData = (unsigned char *) (*env)->GetPrimitiveArrayCritical(env, jdata, @@ -247,10 +362,10 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, if (dstData == NULL) { (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT); /* out of memory error already thrown */ - return 0; + return JNI_FALSE; } - ydataP = dstData + chanOff + y*sStride + x*pixelStride; + ydataP = dstData + dstDataOff + y*sStride + x*pixelStride; ypixP = srcData + off; for (i=0; i < h; i++) { @@ -268,7 +383,7 @@ Java_sun_awt_image_ImageRepresentation_setDiffICM(JNIEnv *env, jclass cls, (*env)->ReleasePrimitiveArrayCritical(env, jpix, srcData, JNI_ABORT); (*env)->ReleasePrimitiveArrayCritical(env, jdata, dstData, JNI_ABORT); - return 1; + return JNI_TRUE; } static int compareLUTs(unsigned int *lut1, int numLut1, int transIdx, From 57d870834fed69a5cc13f639499faee4d9414181 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Tue, 26 Feb 2013 00:41:40 +0400 Subject: [PATCH 014/151] 8007667: Better image reading Reviewed-by: prr, jgodinez, mschoene --- .../imageio/plugins/jpeg/JPEGImageReader.java | 291 +++++++++++++----- .../native/sun/awt/image/jpeg/imageioJPEG.c | 27 +- 2 files changed, 231 insertions(+), 87 deletions(-) diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java index 219f5bf5873..d69200c1408 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java @@ -243,12 +243,17 @@ public class JPEGImageReader extends ImageReader { * sending warnings to listeners. */ protected void warningOccurred(int code) { - if ((code < 0) || (code > MAX_WARNING)){ - throw new InternalError("Invalid warning index"); + cbLock.lock(); + try { + if ((code < 0) || (code > MAX_WARNING)){ + throw new InternalError("Invalid warning index"); + } + processWarningOccurred + ("com.sun.imageio.plugins.jpeg.JPEGImageReaderResources", + Integer.toString(code)); + } finally { + cbLock.unlock(); } - processWarningOccurred - ("com.sun.imageio.plugins.jpeg.JPEGImageReaderResources", - Integer.toString(code)); } /** @@ -265,7 +270,12 @@ public class JPEGImageReader extends ImageReader { * library warnings from being printed to stderr. */ protected void warningWithMessage(String msg) { - processWarningOccurred(msg); + cbLock.lock(); + try { + processWarningOccurred(msg); + } finally { + cbLock.unlock(); + } } public void setInput(Object input, @@ -274,18 +284,55 @@ public class JPEGImageReader extends ImageReader { { setThreadLock(); try { + cbLock.check(); + super.setInput(input, seekForwardOnly, ignoreMetadata); this.ignoreMetadata = ignoreMetadata; resetInternalState(); iis = (ImageInputStream) input; // Always works - setSource(structPointer, iis); + setSource(structPointer); } finally { clearThreadLock(); } } - private native void setSource(long structPointer, - ImageInputStream source); + /** + * This method is called from native code in order to fill + * native input buffer. + * + * We block any attempt to change the reading state during this + * method, in order to prevent a corruption of the native decoder + * state. + * + * @return number of bytes read from the stream. + */ + private int readInputData(byte[] buf, int off, int len) throws IOException { + cbLock.lock(); + try { + return iis.read(buf, off, len); + } finally { + cbLock.unlock(); + } + } + + /** + * This method is called from the native code in order to + * skip requested number of bytes in the input stream. + * + * @param n + * @return + * @throws IOException + */ + private long skipInputBytes(long n) throws IOException { + cbLock.lock(); + try { + return iis.skipBytes(n); + } finally { + cbLock.unlock(); + } + } + + private native void setSource(long structPointer); private void checkTablesOnly() throws IOException { if (debug) { @@ -337,6 +384,8 @@ public class JPEGImageReader extends ImageReader { public int getNumImages(boolean allowSearch) throws IOException { setThreadLock(); try { // locked thread + cbLock.check(); + return getNumImagesOnThread(allowSearch); } finally { clearThreadLock(); @@ -536,8 +585,13 @@ public class JPEGImageReader extends ImageReader { if (debug) { System.out.println("pushing back " + num + " bytes"); } - iis.seek(iis.getStreamPosition()-num); - // The buffer is clear after this, so no need to set haveSeeked. + cbLock.lock(); + try { + iis.seek(iis.getStreamPosition()-num); + // The buffer is clear after this, so no need to set haveSeeked. + } finally { + cbLock.unlock(); + } } /** @@ -644,7 +698,12 @@ public class JPEGImageReader extends ImageReader { * Ignore this profile. */ iccCS = null; - warningOccurred(WARNING_IGNORE_INVALID_ICC); + cbLock.lock(); + try { + warningOccurred(WARNING_IGNORE_INVALID_ICC); + } finally { + cbLock.unlock(); + } } } } @@ -653,6 +712,7 @@ public class JPEGImageReader extends ImageReader { setThreadLock(); try { if (currentImage != imageIndex) { + cbLock.check(); readHeader(imageIndex, true); } return width; @@ -665,6 +725,7 @@ public class JPEGImageReader extends ImageReader { setThreadLock(); try { if (currentImage != imageIndex) { + cbLock.check(); readHeader(imageIndex, true); } return height; @@ -693,6 +754,8 @@ public class JPEGImageReader extends ImageReader { setThreadLock(); try { if (currentImage != imageIndex) { + cbLock.check(); + readHeader(imageIndex, true); } @@ -716,6 +779,7 @@ public class JPEGImageReader extends ImageReader { private Iterator getImageTypesOnThread(int imageIndex) throws IOException { if (currentImage != imageIndex) { + cbLock.check(); readHeader(imageIndex, true); } @@ -931,6 +995,7 @@ public class JPEGImageReader extends ImageReader { setThreadLock(); try { if (!tablesOnlyChecked) { + cbLock.check(); checkTablesOnly(); } return streamMetadata; @@ -951,6 +1016,8 @@ public class JPEGImageReader extends ImageReader { return imageMetadata; } + cbLock.check(); + gotoImage(imageIndex); imageMetadata = new JPEGMetadata(false, false, iis, this); @@ -967,6 +1034,7 @@ public class JPEGImageReader extends ImageReader { throws IOException { setThreadLock(); try { + cbLock.check(); try { readInternal(imageIndex, param, false); } catch (RuntimeException e) { @@ -1196,58 +1264,63 @@ public class JPEGImageReader extends ImageReader { } target.setRect(destROI.x, destROI.y + y, raster); - processImageUpdate(image, - destROI.x, destROI.y+y, - raster.getWidth(), 1, - 1, 1, - destinationBands); - if ((y > 0) && (y%progInterval == 0)) { - int height = target.getHeight()-1; - float percentOfPass = ((float)y)/height; - if (progressive) { - if (knownPassCount != UNKNOWN) { - processImageProgress((pass + percentOfPass)*100.0F - / knownPassCount); - } else if (maxProgressivePass != Integer.MAX_VALUE) { - // Use the range of allowed progressive passes - processImageProgress((pass + percentOfPass)*100.0F - / (maxProgressivePass - minProgressivePass + 1)); - } else { - // Assume there are a minimum of MIN_ESTIMATED_PASSES - // and that there is always one more pass - // Compute the percentage as the percentage at the end - // of the previous pass, plus the percentage of this - // pass scaled to be the percentage of the total remaining, - // assuming a minimum of MIN_ESTIMATED_PASSES passes and - // that there is always one more pass. This is monotonic - // and asymptotic to 1.0, which is what we need. - int remainingPasses = // including this one - Math.max(2, MIN_ESTIMATED_PASSES-pass); - int totalPasses = pass + remainingPasses-1; - progInterval = Math.max(height/20*totalPasses, - totalPasses); - if (y%progInterval == 0) { - percentToDate = previousPassPercentage + - (1.0F - previousPassPercentage) - * (percentOfPass)/remainingPasses; - if (debug) { - System.out.print("pass= " + pass); - System.out.print(", y= " + y); - System.out.print(", progInt= " + progInterval); - System.out.print(", % of pass: " + percentOfPass); - System.out.print(", rem. passes: " - + remainingPasses); - System.out.print(", prev%: " - + previousPassPercentage); - System.out.print(", %ToDate: " + percentToDate); - System.out.print(" "); + cbLock.lock(); + try { + processImageUpdate(image, + destROI.x, destROI.y+y, + raster.getWidth(), 1, + 1, 1, + destinationBands); + if ((y > 0) && (y%progInterval == 0)) { + int height = target.getHeight()-1; + float percentOfPass = ((float)y)/height; + if (progressive) { + if (knownPassCount != UNKNOWN) { + processImageProgress((pass + percentOfPass)*100.0F + / knownPassCount); + } else if (maxProgressivePass != Integer.MAX_VALUE) { + // Use the range of allowed progressive passes + processImageProgress((pass + percentOfPass)*100.0F + / (maxProgressivePass - minProgressivePass + 1)); + } else { + // Assume there are a minimum of MIN_ESTIMATED_PASSES + // and that there is always one more pass + // Compute the percentage as the percentage at the end + // of the previous pass, plus the percentage of this + // pass scaled to be the percentage of the total remaining, + // assuming a minimum of MIN_ESTIMATED_PASSES passes and + // that there is always one more pass. This is monotonic + // and asymptotic to 1.0, which is what we need. + int remainingPasses = // including this one + Math.max(2, MIN_ESTIMATED_PASSES-pass); + int totalPasses = pass + remainingPasses-1; + progInterval = Math.max(height/20*totalPasses, + totalPasses); + if (y%progInterval == 0) { + percentToDate = previousPassPercentage + + (1.0F - previousPassPercentage) + * (percentOfPass)/remainingPasses; + if (debug) { + System.out.print("pass= " + pass); + System.out.print(", y= " + y); + System.out.print(", progInt= " + progInterval); + System.out.print(", % of pass: " + percentOfPass); + System.out.print(", rem. passes: " + + remainingPasses); + System.out.print(", prev%: " + + previousPassPercentage); + System.out.print(", %ToDate: " + percentToDate); + System.out.print(" "); + } + processImageProgress(percentToDate*100.0F); } - processImageProgress(percentToDate*100.0F); } + } else { + processImageProgress(percentOfPass * 100.0F); } - } else { - processImageProgress(percentOfPass * 100.0F); } + } finally { + cbLock.unlock(); } } @@ -1260,33 +1333,58 @@ public class JPEGImageReader extends ImageReader { } private void passStarted (int pass) { - this.pass = pass; - previousPassPercentage = percentToDate; - processPassStarted(image, - pass, - minProgressivePass, - maxProgressivePass, - 0, 0, - 1,1, - destinationBands); + cbLock.lock(); + try { + this.pass = pass; + previousPassPercentage = percentToDate; + processPassStarted(image, + pass, + minProgressivePass, + maxProgressivePass, + 0, 0, + 1,1, + destinationBands); + } finally { + cbLock.unlock(); + } } private void passComplete () { - processPassComplete(image); + cbLock.lock(); + try { + processPassComplete(image); + } finally { + cbLock.unlock(); + } } void thumbnailStarted(int thumbnailIndex) { - processThumbnailStarted(currentImage, thumbnailIndex); + cbLock.lock(); + try { + processThumbnailStarted(currentImage, thumbnailIndex); + } finally { + cbLock.unlock(); + } } // Provide access to protected superclass method void thumbnailProgress(float percentageDone) { - processThumbnailProgress(percentageDone); + cbLock.lock(); + try { + processThumbnailProgress(percentageDone); + } finally { + cbLock.unlock(); + } } // Provide access to protected superclass method void thumbnailComplete() { - processThumbnailComplete(); + cbLock.lock(); + try { + processThumbnailComplete(); + } finally { + cbLock.unlock(); + } } /** @@ -1310,6 +1408,11 @@ public class JPEGImageReader extends ImageReader { public void abort() { setThreadLock(); try { + /** + * NB: we do not check the call back lock here, + * we allow to abort the reader any time. + */ + super.abort(); abortRead(structPointer); } finally { @@ -1332,6 +1435,7 @@ public class JPEGImageReader extends ImageReader { setThreadLock(); Raster retval = null; try { + cbLock.check(); /* * This could be further optimized by not resetting the dest. * offset and creating a translated raster in readInternal() @@ -1371,6 +1475,8 @@ public class JPEGImageReader extends ImageReader { public int getNumThumbnails(int imageIndex) throws IOException { setThreadLock(); try { + cbLock.check(); + getImageMetadata(imageIndex); // checks iis state for us // Now check the jfif segments JFIFMarkerSegment jfif = @@ -1391,6 +1497,8 @@ public class JPEGImageReader extends ImageReader { throws IOException { setThreadLock(); try { + cbLock.check(); + if ((thumbnailIndex < 0) || (thumbnailIndex >= getNumThumbnails(imageIndex))) { throw new IndexOutOfBoundsException("No such thumbnail"); @@ -1409,6 +1517,8 @@ public class JPEGImageReader extends ImageReader { throws IOException { setThreadLock(); try { + cbLock.check(); + if ((thumbnailIndex < 0) || (thumbnailIndex >= getNumThumbnails(imageIndex))) { throw new IndexOutOfBoundsException("No such thumbnail"); @@ -1428,6 +1538,8 @@ public class JPEGImageReader extends ImageReader { throws IOException { setThreadLock(); try { + cbLock.check(); + if ((thumbnailIndex < 0) || (thumbnailIndex >= getNumThumbnails(imageIndex))) { throw new IndexOutOfBoundsException("No such thumbnail"); @@ -1468,6 +1580,7 @@ public class JPEGImageReader extends ImageReader { public void reset() { setThreadLock(); try { + cbLock.check(); super.reset(); } finally { clearThreadLock(); @@ -1479,6 +1592,8 @@ public class JPEGImageReader extends ImageReader { public void dispose() { setThreadLock(); try { + cbLock.check(); + if (structPointer != 0) { disposerRecord.dispose(); structPointer = 0; @@ -1540,6 +1655,36 @@ public class JPEGImageReader extends ImageReader { theThread = null; } } + + private CallBackLock cbLock = new CallBackLock(); + + private static class CallBackLock { + + private State lockState; + + CallBackLock() { + lockState = State.Unlocked; + } + + void check() { + if (lockState != State.Unlocked) { + throw new IllegalStateException("Access to the reader is not allowed"); + } + } + + private void lock() { + lockState = State.Locked; + } + + private void unlock() { + lockState = State.Unlocked; + } + + private static enum State { + Unlocked, + Locked + } + } } /** diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c index b405618be98..be90087d108 100644 --- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c +++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c @@ -57,8 +57,8 @@ #define MAX(a,b) ((a) > (b) ? (a) : (b)) /* Cached Java method ids */ -static jmethodID ImageInputStream_readID; -static jmethodID ImageInputStream_skipBytesID; +static jmethodID JPEGImageReader_readInputDataID; +static jmethodID JPEGImageReader_skipInputBytesID; static jmethodID JPEGImageReader_warningOccurredID; static jmethodID JPEGImageReader_warningWithMessageID; static jmethodID JPEGImageReader_setImageDataID; @@ -923,7 +923,7 @@ imageio_fill_input_buffer(j_decompress_ptr cinfo) RELEASE_ARRAYS(env, data, src->next_input_byte); ret = (*env)->CallIntMethod(env, sb->stream, - ImageInputStream_readID, + JPEGImageReader_readInputDataID, sb->hstreamBuffer, 0, sb->bufferLength); if ((*env)->ExceptionOccurred(env) @@ -1013,7 +1013,7 @@ imageio_fill_suspended_buffer(j_decompress_ptr cinfo) } ret = (*env)->CallIntMethod(env, sb->stream, - ImageInputStream_readID, + JPEGImageReader_readInputDataID, sb->hstreamBuffer, offset, buflen); if ((*env)->ExceptionOccurred(env) @@ -1107,7 +1107,7 @@ imageio_skip_input_data(j_decompress_ptr cinfo, long num_bytes) RELEASE_ARRAYS(env, data, src->next_input_byte); ret = (*env)->CallLongMethod(env, sb->stream, - ImageInputStream_skipBytesID, + JPEGImageReader_skipInputBytesID, (jlong) num_bytes); if ((*env)->ExceptionOccurred(env) || !GET_ARRAYS(env, data, &(src->next_input_byte))) { @@ -1382,13 +1382,13 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_initReaderIDs jclass qTableClass, jclass huffClass) { - ImageInputStream_readID = (*env)->GetMethodID(env, - ImageInputStreamClass, - "read", + JPEGImageReader_readInputDataID = (*env)->GetMethodID(env, + cls, + "readInputData", "([BII)I"); - ImageInputStream_skipBytesID = (*env)->GetMethodID(env, - ImageInputStreamClass, - "skipBytes", + JPEGImageReader_skipInputBytesID = (*env)->GetMethodID(env, + cls, + "skipInputBytes", "(J)J"); JPEGImageReader_warningOccurredID = (*env)->GetMethodID(env, cls, @@ -1531,8 +1531,7 @@ JNIEXPORT void JNICALL Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource (JNIEnv *env, jobject this, - jlong ptr, - jobject source) { + jlong ptr) { imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); j_common_ptr cinfo; @@ -1546,7 +1545,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_setSource cinfo = data->jpegObj; - imageio_set_stream(env, cinfo, data, source); + imageio_set_stream(env, cinfo, data, this); imageio_init_source((j_decompress_ptr) cinfo); } From b15549ed0b002939f3714dfebdc91b2a7a4d49d1 Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Tue, 26 Feb 2013 01:41:36 +0400 Subject: [PATCH 015/151] 8007918: Better image writing Reviewed-by: mschoene, prr, jgodinez --- .../imageio/plugins/jpeg/JPEGImageWriter.java | 147 +++++++++++++++--- .../native/sun/awt/image/jpeg/imageioJPEG.c | 18 +-- 2 files changed, 131 insertions(+), 34 deletions(-) diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java index bc8d435d464..b8564176df8 100644 --- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java +++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java @@ -183,8 +183,7 @@ public class JPEGImageWriter extends ImageWriter { return null; } }); - initWriterIDs(ImageOutputStream.class, - JPEGQTable.class, + initWriterIDs(JPEGQTable.class, JPEGHuffmanTable.class); } @@ -200,11 +199,13 @@ public class JPEGImageWriter extends ImageWriter { public void setOutput(Object output) { setThreadLock(); try { + cbLock.check(); + super.setOutput(output); // validates output resetInternalState(); ios = (ImageOutputStream) output; // so this will always work // Set the native destination - setDest(structPointer, ios); + setDest(structPointer); } finally { clearThreadLock(); } @@ -359,6 +360,8 @@ public class JPEGImageWriter extends ImageWriter { ImageWriteParam param) throws IOException { setThreadLock(); try { + cbLock.check(); + writeOnThread(streamMetadata, image, param); } finally { clearThreadLock(); @@ -1082,13 +1085,18 @@ public class JPEGImageWriter extends ImageWriter { haveMetadata, restartInterval); - if (aborted) { - processWriteAborted(); - } else { - processImageComplete(); - } + cbLock.lock(); + try { + if (aborted) { + processWriteAborted(); + } else { + processImageComplete(); + } - ios.flush(); + ios.flush(); + } finally { + cbLock.unlock(); + } currentImage++; // After a successful write } @@ -1096,6 +1104,8 @@ public class JPEGImageWriter extends ImageWriter { throws IOException { setThreadLock(); try { + cbLock.check(); + prepareWriteSequenceOnThread(streamMetadata); } finally { clearThreadLock(); @@ -1175,6 +1185,8 @@ public class JPEGImageWriter extends ImageWriter { throws IOException { setThreadLock(); try { + cbLock.check(); + if (sequencePrepared == false) { throw new IllegalStateException("sequencePrepared not called!"); } @@ -1188,6 +1200,8 @@ public class JPEGImageWriter extends ImageWriter { public void endWriteSequence() throws IOException { setThreadLock(); try { + cbLock.check(); + if (sequencePrepared == false) { throw new IllegalStateException("sequencePrepared not called!"); } @@ -1200,6 +1214,10 @@ public class JPEGImageWriter extends ImageWriter { public synchronized void abort() { setThreadLock(); try { + /** + * NB: we do not check the call back lock here, we allow to abort + * the reader any time. + */ super.abort(); abortWrite(structPointer); } finally { @@ -1223,6 +1241,8 @@ public class JPEGImageWriter extends ImageWriter { public void reset() { setThreadLock(); try { + cbLock.check(); + super.reset(); } finally { clearThreadLock(); @@ -1232,6 +1252,8 @@ public class JPEGImageWriter extends ImageWriter { public void dispose() { setThreadLock(); try { + cbLock.check(); + if (structPointer != 0) { disposerRecord.dispose(); structPointer = 0; @@ -1251,13 +1273,18 @@ public class JPEGImageWriter extends ImageWriter { * sending warnings to listeners. */ void warningOccurred(int code) { - if ((code < 0) || (code > MAX_WARNING)){ - throw new InternalError("Invalid warning index"); + cbLock.lock(); + try { + if ((code < 0) || (code > MAX_WARNING)){ + throw new InternalError("Invalid warning index"); + } + processWarningOccurred + (currentImage, + "com.sun.imageio.plugins.jpeg.JPEGImageWriterResources", + Integer.toString(code)); + } finally { + cbLock.unlock(); } - processWarningOccurred - (currentImage, - "com.sun.imageio.plugins.jpeg.JPEGImageWriterResources", - Integer.toString(code)); } /** @@ -1274,21 +1301,41 @@ public class JPEGImageWriter extends ImageWriter { * library warnings from being printed to stderr. */ void warningWithMessage(String msg) { - processWarningOccurred(currentImage, msg); + cbLock.lock(); + try { + processWarningOccurred(currentImage, msg); + } finally { + cbLock.unlock(); + } } void thumbnailStarted(int thumbnailIndex) { - processThumbnailStarted(currentImage, thumbnailIndex); + cbLock.lock(); + try { + processThumbnailStarted(currentImage, thumbnailIndex); + } finally { + cbLock.unlock(); + } } // Provide access to protected superclass method void thumbnailProgress(float percentageDone) { - processThumbnailProgress(percentageDone); + cbLock.lock(); + try { + processThumbnailProgress(percentageDone); + } finally { + cbLock.unlock(); + } } // Provide access to protected superclass method void thumbnailComplete() { - processThumbnailComplete(); + cbLock.lock(); + try { + processThumbnailComplete(); + } finally { + cbLock.unlock(); + } } ///////// End of Package-access API @@ -1615,16 +1662,14 @@ public class JPEGImageWriter extends ImageWriter { ////////////// Native methods and callbacks /** Sets up static native structures. */ - private static native void initWriterIDs(Class iosClass, - Class qTableClass, + private static native void initWriterIDs(Class qTableClass, Class huffClass); /** Sets up per-writer native structure and returns a pointer to it. */ private native long initJPEGImageWriter(); /** Sets up native structures for output stream */ - private native void setDest(long structPointer, - ImageOutputStream ios); + private native void setDest(long structPointer); /** * Returns true if the write was aborted. @@ -1749,7 +1794,12 @@ public class JPEGImageWriter extends ImageWriter { } raster.setRect(sourceLine); if ((y > 7) && (y%8 == 0)) { // Every 8 scanlines - processImageProgress((float) y / (float) sourceHeight * 100.0F); + cbLock.lock(); + try { + processImageProgress((float) y / (float) sourceHeight * 100.0F); + } finally { + cbLock.unlock(); + } } } @@ -1777,6 +1827,25 @@ public class JPEGImageWriter extends ImageWriter { } } + /** + * This method is called from native code in order to write encoder + * output to the destination. + * + * We block any attempt to change the writer state during this + * method, in order to prevent a corruption of the native encoder + * state. + */ + private void writeOutputData(byte[] data, int offset, int len) + throws IOException + { + cbLock.lock(); + try { + ios.write(data, offset, len); + } finally { + cbLock.unlock(); + } + } + private Thread theThread = null; private int theLockCount = 0; @@ -1811,4 +1880,34 @@ public class JPEGImageWriter extends ImageWriter { theThread = null; } } + + private CallBackLock cbLock = new CallBackLock(); + + private static class CallBackLock { + + private State lockState; + + CallBackLock() { + lockState = State.Unlocked; + } + + void check() { + if (lockState != State.Unlocked) { + throw new IllegalStateException("Access to the writer is not allowed"); + } + } + + private void lock() { + lockState = State.Locked; + } + + private void unlock() { + lockState = State.Unlocked; + } + + private static enum State { + Unlocked, + Locked + } + } } diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c index be90087d108..7411c34bb83 100644 --- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c +++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c @@ -66,7 +66,7 @@ static jmethodID JPEGImageReader_acceptPixelsID; static jmethodID JPEGImageReader_pushBackID; static jmethodID JPEGImageReader_passStartedID; static jmethodID JPEGImageReader_passCompleteID; -static jmethodID ImageOutputStream_writeID; +static jmethodID JPEGImageWriter_writeOutputDataID; static jmethodID JPEGImageWriter_warningOccurredID; static jmethodID JPEGImageWriter_warningWithMessageID; static jmethodID JPEGImageWriter_writeMetadataID; @@ -2290,7 +2290,7 @@ imageio_empty_output_buffer (j_compress_ptr cinfo) (*env)->CallVoidMethod(env, sb->stream, - ImageOutputStream_writeID, + JPEGImageWriter_writeOutputDataID, sb->hstreamBuffer, 0, sb->bufferLength); @@ -2327,7 +2327,7 @@ imageio_term_destination (j_compress_ptr cinfo) (*env)->CallVoidMethod(env, sb->stream, - ImageOutputStream_writeID, + JPEGImageWriter_writeOutputDataID, sb->hstreamBuffer, 0, datacount); @@ -2365,13 +2365,12 @@ JNIEXPORT void JNICALL Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_initWriterIDs (JNIEnv *env, jclass cls, - jclass IOSClass, jclass qTableClass, jclass huffClass) { - ImageOutputStream_writeID = (*env)->GetMethodID(env, - IOSClass, - "write", + JPEGImageWriter_writeOutputDataID = (*env)->GetMethodID(env, + cls, + "writeOutputData", "([BII)V"); JPEGImageWriter_warningOccurredID = (*env)->GetMethodID(env, @@ -2495,8 +2494,7 @@ JNIEXPORT void JNICALL Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest (JNIEnv *env, jobject this, - jlong ptr, - jobject destination) { + jlong ptr) { imageIODataPtr data = (imageIODataPtr)jlong_to_ptr(ptr); j_compress_ptr cinfo; @@ -2510,7 +2508,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageWriter_setDest cinfo = (j_compress_ptr) data->jpegObj; - imageio_set_stream(env, data->jpegObj, data, destination); + imageio_set_stream(env, data->jpegObj, data, this); // Don't call the init method, as that depends on pinned arrays From 046d36e089c078ae418d42db3eda28e8477ac688 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Sun, 3 Mar 2013 10:07:52 +0000 Subject: [PATCH 016/151] 8009063: Improve reliability of ConcurrentHashMap Reviewed-by: alanb, ahgross --- .../util/concurrent/ConcurrentHashMap.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java b/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java index 66ae51667d5..b7c8bde6ba7 100644 --- a/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java +++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentHashMap.java @@ -34,6 +34,7 @@ */ package java.util.concurrent; +import java.io.ObjectInputStream; import java.util.concurrent.locks.*; import java.util.*; import java.io.Serializable; @@ -1483,7 +1484,23 @@ public class ConcurrentHashMap extends AbstractMap @SuppressWarnings("unchecked") private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException { - s.defaultReadObject(); + // Don't call defaultReadObject() + ObjectInputStream.GetField oisFields = s.readFields(); + final Segment[] oisSegments = (Segment[])oisFields.get("segments", null); + + final int ssize = oisSegments.length; + if (ssize < 1 || ssize > MAX_SEGMENTS + || (ssize & (ssize-1)) != 0 ) // ssize not power of two + throw new java.io.InvalidObjectException("Bad number of segments:" + + ssize); + int sshift = 0, ssizeTmp = ssize; + while (ssizeTmp > 1) { + ++sshift; + ssizeTmp >>>= 1; + } + UNSAFE.putIntVolatile(this, SEGSHIFT_OFFSET, 32 - sshift); + UNSAFE.putIntVolatile(this, SEGMASK_OFFSET, ssize - 1); + UNSAFE.putObjectVolatile(this, SEGMENTS_OFFSET, oisSegments); // set hashMask UNSAFE.putIntVolatile(this, HASHSEED_OFFSET, @@ -1517,6 +1534,9 @@ public class ConcurrentHashMap extends AbstractMap private static final long TBASE; private static final int TSHIFT; private static final long HASHSEED_OFFSET; + private static final long SEGSHIFT_OFFSET; + private static final long SEGMASK_OFFSET; + private static final long SEGMENTS_OFFSET; static { int ss, ts; @@ -1530,6 +1550,12 @@ public class ConcurrentHashMap extends AbstractMap ss = UNSAFE.arrayIndexScale(sc); HASHSEED_OFFSET = UNSAFE.objectFieldOffset( ConcurrentHashMap.class.getDeclaredField("hashSeed")); + SEGSHIFT_OFFSET = UNSAFE.objectFieldOffset( + ConcurrentHashMap.class.getDeclaredField("segmentShift")); + SEGMASK_OFFSET = UNSAFE.objectFieldOffset( + ConcurrentHashMap.class.getDeclaredField("segmentMask")); + SEGMENTS_OFFSET = UNSAFE.objectFieldOffset( + ConcurrentHashMap.class.getDeclaredField("segments")); } catch (Exception e) { throw new Error(e); } From 78478633f93b2ce40b85a0fbac095ad7d27c935a Mon Sep 17 00:00:00 2001 From: Daniel Fuchs Date: Thu, 14 Mar 2013 18:41:42 +0100 Subject: [PATCH 017/151] 8009305: Improve AWT data transfer Reviewed-by: art, skoivu, smarks, ant --- .../awt/datatransfer/TransferableProxy.java | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/jdk/src/share/classes/sun/awt/datatransfer/TransferableProxy.java b/jdk/src/share/classes/sun/awt/datatransfer/TransferableProxy.java index 295aa20d6a8..ed688aa3362 100644 --- a/jdk/src/share/classes/sun/awt/datatransfer/TransferableProxy.java +++ b/jdk/src/share/classes/sun/awt/datatransfer/TransferableProxy.java @@ -102,11 +102,11 @@ public class TransferableProxy implements Transferable { protected final boolean isLocal; } -class ClassLoaderObjectOutputStream extends ObjectOutputStream { +final class ClassLoaderObjectOutputStream extends ObjectOutputStream { private final Map, ClassLoader> map = new HashMap, ClassLoader>(); - public ClassLoaderObjectOutputStream(OutputStream os) throws IOException { + ClassLoaderObjectOutputStream(OutputStream os) throws IOException { super(os); } @@ -140,16 +140,16 @@ class ClassLoaderObjectOutputStream extends ObjectOutputStream { map.put(s, classLoader); } - public Map, ClassLoader> getClassLoaderMap() { + Map, ClassLoader> getClassLoaderMap() { return new HashMap(map); } } -class ClassLoaderObjectInputStream extends ObjectInputStream { +final class ClassLoaderObjectInputStream extends ObjectInputStream { private final Map, ClassLoader> map; - public ClassLoaderObjectInputStream(InputStream is, - Map, ClassLoader> map) + ClassLoaderObjectInputStream(InputStream is, + Map, ClassLoader> map) throws IOException { super(is); if (map == null) { @@ -166,8 +166,11 @@ class ClassLoaderObjectInputStream extends ObjectInputStream { s.add(className); ClassLoader classLoader = map.get(s); - - return Class.forName(className, false, classLoader); + if (classLoader != null) { + return Class.forName(className, false, classLoader); + } else { + return super.resolveClass(classDesc); + } } protected Class resolveProxyClass(String[] interfaces) @@ -179,6 +182,9 @@ class ClassLoaderObjectInputStream extends ObjectInputStream { } ClassLoader classLoader = map.get(s); + if (classLoader == null) { + return super.resolveProxyClass(interfaces); + } // The code below is mostly copied from the superclass. ClassLoader nonPublicLoader = null; From 28441d3ff34daf829b21757473421d6e6b6fbbc4 Mon Sep 17 00:00:00 2001 From: Alexey Utkin Date: Fri, 8 Mar 2013 13:35:15 +0400 Subject: [PATCH 018/151] 8009463: Regression test test\java\lang\Runtime\exec\ArgWithSpaceAndFinalBackslash.java failing Reviewed-by: alanb, ahgross --- .../windows/classes/java/lang/ProcessImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/jdk/src/windows/classes/java/lang/ProcessImpl.java b/jdk/src/windows/classes/java/lang/ProcessImpl.java index 87c89bb11e6..5f772aee8fb 100644 --- a/jdk/src/windows/classes/java/lang/ProcessImpl.java +++ b/jdk/src/windows/classes/java/lang/ProcessImpl.java @@ -263,6 +263,22 @@ final class ProcessImpl extends Process { if (needsEscaping(isCmdFile, s)) { cmdbuf.append('"'); cmdbuf.append(s); + + // The code protects the [java.exe] and console command line + // parser, that interprets the [\"] combination as an escape + // sequence for the ["] char. + // http://msdn.microsoft.com/en-us/library/17w5ykft.aspx + // + // If the argument is an FS path, doubling of the tail [\] + // char is not a problem for non-console applications. + // + // The [\"] sequence is not an escape sequence for the [cmd.exe] + // command line parser. The case of the [""] tail escape + // sequence could not be realized due to the argument validation + // procedure. + if (!isCmdFile && s.endsWith("\\")) { + cmdbuf.append('\\'); + } cmdbuf.append('"'); } else { cmdbuf.append(s); From c5d72546c0f102eebccecaf608b1b1b3848a49da Mon Sep 17 00:00:00 2001 From: Valerie Peng Date: Mon, 11 Mar 2013 20:18:32 -0700 Subject: [PATCH 019/151] 8009610: Blacklist certificate used with malware Updated the black list and the reg test with the new cert. Reviewed-by: weijun --- .../security/util/UntrustedCertificates.java | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java b/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java index 03fdbc78332..73495df5bcc 100644 --- a/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java +++ b/jdk/src/share/classes/sun/security/util/UntrustedCertificates.java @@ -843,5 +843,52 @@ public final class UntrustedCertificates { "zCOfhbsRWdMLYepauaNZOIMZXmFwcrIl0TGMkTAtATz+XmZc\n" + "-----END CERTIFICATE-----"); + // + // Revoked code signing certificate w/ a stolen key issued by GoDaddy + // used to sign malware + // + + // Subject: CN=CLEARESULT CONSULTING INC., OU=Corporate IT, + // O=CLEARESULT CONSULTING INC., L=Austin, ST=TX, C=US + // Issuer: SERIALNUMBER=07969287, + // CN=Go Daddy Secure Certification Authority, + // OU=http://certificates.godaddy.com/repository, + // O="GoDaddy.com, Inc.", + // L=Scottsdale, + // ST=Arizona, + // C=US + // Serial: 2b:73:43:2a:a8:4f:44 + add("clearesult-consulting-inc-2AA84F44", + "-----BEGIN CERTIFICATE-----\n" + + "MIIFYjCCBEqgAwIBAgIHK3NDKqhPRDANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE\n" + + "BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY\n" + + "BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydGlm\n" + + "aWNhdGVzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkxMDAuBgNVBAMTJ0dvIERhZGR5\n" + + "IFNlY3VyZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTERMA8GA1UEBRMIMDc5Njky\n" + + "ODcwHhcNMTIwMjE1MjEwOTA2WhcNMTQwMjE1MjEwOTA2WjCBjDELMAkGA1UEBgwC\n" + + "VVMxCzAJBgNVBAgMAlRYMQ8wDQYDVQQHDAZBdXN0aW4xIzAhBgNVBAoMGkNMRUFS\n" + + "RVNVTFQgQ09OU1VMVElORyBJTkMuMRUwEwYDVQQLDAxDb3Jwb3JhdGUgSVQxIzAh\n" + + "BgNVBAMMGkNMRUFSRVNVTFQgQ09OU1VMVElORyBJTkMuMIIBIjANBgkqhkiG9w0B\n" + + "AQEFAAOCAQ8AMIIBCgKCAQEAtIOjCKeAicull+7ZIzt0/4ya3IeXUFlfypqKMLkU\n" + + "IbKjn0P5uMj6VE3rlbZr44RCegxvdnR6umBh1c0ZXoN3o+yc0JKcKcLiApmJJ277\n" + + "p7IbLwYDhBXRQNoIJm187IOMRPIxsKN4hL91txn9jGBmW+9zKlJlNhR5R7vjwU2E\n" + + "jrH/6oqsc9EM2yYpfjlNv6+3jSwAYZCkSWr+27PQOV+YHKmIxtJjX0upFz5FdIrV\n" + + "9CCX+L2Kji1THOkSgG4QTbYxmEcHqGViWz8hXLeNXjcbEsPuIiAu3hknxRHfUTE/\n" + + "U0Lh0Ug1e3LrJu+WnxM2SmUY4krsZ22c0yWUW9hzWITIjQIDAQABo4IBhzCCAYMw\n" + + "DwYDVR0TAQH/BAUwAwEBADATBgNVHSUEDDAKBggrBgEFBQcDAzAOBgNVHQ8BAf8E\n" + + "BAMCB4AwMwYDVR0fBCwwKjAooCagJIYiaHR0cDovL2NybC5nb2RhZGR5LmNvbS9n\n" + + "ZHM1LTE2LmNybDBTBgNVHSAETDBKMEgGC2CGSAGG/W0BBxcCMDkwNwYIKwYBBQUH\n" + + "AgEWK2h0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5jb20vcmVwb3NpdG9yeS8w\n" + + "gYAGCCsGAQUFBwEBBHQwcjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZ29kYWRk\n" + + "eS5jb20vMEoGCCsGAQUFBzAChj5odHRwOi8vY2VydGlmaWNhdGVzLmdvZGFkZHku\n" + + "Y29tL3JlcG9zaXRvcnkvZ2RfaW50ZXJtZWRpYXRlLmNydDAfBgNVHSMEGDAWgBT9\n" + + "rGEyk2xF1uLuhV+auud2mWjM5zAdBgNVHQ4EFgQUDtdeKqeN2QkcbEp1HovFieNB\n" + + "XiowDQYJKoZIhvcNAQEFBQADggEBAD74Agw5tvi2aBl4/f/s7/VE/BClzDsKMb9K\n" + + "v9qpeC45ZA/jelxV11HKbQnVF194gDb7D2H9OsAsRUy8HVKbXEcc/8dKvwOqb+BC\n" + + "2i/EmfjLgmCfezNFtLq8xcPxF3zIRc44vPrK0z4YZsaHdH+yTEJ51p5EMdTqaLaP\n" + + "4n5m8LX3RfqlQB9dYFe6dUoYZjKm9d/pIRww3VqfOzjl42Edi1w6dWmBVMx1NZuR\n" + + "DBabJH1vJ9Gd+KwxMCmBZ6pQPl28JDimhJhI2LNqU349uADQVV0HJosddN/ARyyI\n" + + "LSIQO7BnNVKVG9Iujf33bvPNeg0qNz5qw+rKKq97Pqeum+L5oKU=\n" + + "-----END CERTIFICATE-----"); } } From d059d367eb459a65c77d5cc875945f9fa55e3f9e Mon Sep 17 00:00:00 2001 From: Lance Andersen Date: Mon, 18 Mar 2013 13:30:20 -0400 Subject: [PATCH 020/151] 8009814: Better driver management Reviewed-by: alanb, skoivu --- jdk/src/share/classes/java/sql/DriverManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdk/src/share/classes/java/sql/DriverManager.java b/jdk/src/share/classes/java/sql/DriverManager.java index b0ca1cd4dea..a97595da5d1 100644 --- a/jdk/src/share/classes/java/sql/DriverManager.java +++ b/jdk/src/share/classes/java/sql/DriverManager.java @@ -556,7 +556,7 @@ public class DriverManager { */ try{ while(driversIterator.hasNext()) { - println(" Loading done by the java.util.ServiceLoader : "+driversIterator.next()); + driversIterator.next(); } } catch(Throwable t) { // Do nothing From 3a4936696cfb9be500a5dd250bd513bba0758065 Mon Sep 17 00:00:00 2001 From: Stuart Marks Date: Mon, 18 Mar 2013 18:15:59 -0700 Subject: [PATCH 021/151] 8009857: Problem with plugin Reviewed-by: jdn, mchung --- .../classes/sun/reflect/misc/MethodUtil.java | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/jdk/src/share/classes/sun/reflect/misc/MethodUtil.java b/jdk/src/share/classes/sun/reflect/misc/MethodUtil.java index 9d9c5ab6015..24abe866761 100644 --- a/jdk/src/share/classes/sun/reflect/misc/MethodUtil.java +++ b/jdk/src/share/classes/sun/reflect/misc/MethodUtil.java @@ -46,8 +46,28 @@ import sun.misc.IOUtils; class Trampoline { + static { + if (Trampoline.class.getClassLoader() == null) { + throw new Error( + "Trampoline must not be defined by the bootstrap classloader"); + } + } + + private static void ensureInvocableMethod(Method m) + throws InvocationTargetException + { + Class clazz = m.getDeclaringClass(); + if (clazz.equals(AccessController.class) || + clazz.equals(Method.class) || + clazz.getName().startsWith("java.lang.invoke.")) + throw new InvocationTargetException( + new UnsupportedOperationException("invocation not supported")); + } + private static Object invoke(Method m, Object obj, Object[] params) - throws InvocationTargetException, IllegalAccessException { + throws InvocationTargetException, IllegalAccessException + { + ensureInvocableMethod(m); return m.invoke(obj, params); } } @@ -251,16 +271,6 @@ public final class MethodUtil extends SecureClassLoader { */ public static Object invoke(Method m, Object obj, Object[] params) throws InvocationTargetException, IllegalAccessException { - if (m.getDeclaringClass().equals(AccessController.class) || - (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.class) - && m.getName().equals("lookup")) || - (m.getDeclaringClass().equals(java.lang.invoke.MethodHandles.Lookup.class) - && (m.getName().startsWith("find") || - m.getName().startsWith("bind") || - m.getName().startsWith("unreflect"))) || - m.getDeclaringClass().equals(Method.class)) - throw new InvocationTargetException( - new UnsupportedOperationException("invocation not supported")); try { return bounce.invoke(null, new Object[] {m, obj, params}); } catch (InvocationTargetException ie) { @@ -293,10 +303,10 @@ public final class MethodUtil extends SecureClassLoader { Method.class, Object.class, Object[].class }; Method b = t.getDeclaredMethod("invoke", types); - ((AccessibleObject)b).setAccessible(true); - return b; - } - }); + b.setAccessible(true); + return b; + } + }); } catch (Exception e) { throw new InternalError("bouncer cannot be found", e); } From ae5b3c931010c11cb25d6ece1e9bb1cad1382705 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Fri, 15 Feb 2013 13:07:17 -0800 Subject: [PATCH 022/151] 8008249: Sync ICU into JDK Reviewed-by: bae, jgodinez --- jdk/make/sun/font/FILES_c.gmk | 16 +- .../font/layout/ContextualGlyphInsertion.h | 15 +- .../layout/ContextualGlyphInsertionProc2.cpp | 168 +++++++ .../layout/ContextualGlyphInsertionProc2.h | 89 ++++ .../font/layout/ContextualGlyphSubstProc2.cpp | 160 +++++++ .../font/layout/ContextualGlyphSubstProc2.h | 92 ++++ .../font/layout/ContextualGlyphSubstitution.h | 13 +- .../sun/font/layout/GXLayoutEngine2.cpp | 91 ++++ .../native/sun/font/layout/GXLayoutEngine2.h | 149 ++++++ .../sun/font/layout/IndicClassTables.cpp | 6 +- .../sun/font/layout/IndicRearrangement.h | 10 +- .../layout/IndicRearrangementProcessor2.cpp | 423 ++++++++++++++++++ .../layout/IndicRearrangementProcessor2.h | 88 ++++ .../sun/font/layout/IndicReordering.cpp | 10 +- .../native/sun/font/layout/IndicReordering.h | 6 +- .../native/sun/font/layout/LEFontInstance.h | 19 + .../native/sun/font/layout/LEGlyphFilter.h | 4 +- .../native/sun/font/layout/LEInsertionList.h | 4 +- .../share/native/sun/font/layout/LEScripts.h | 23 +- .../share/native/sun/font/layout/LETypes.h | 132 +++++- .../native/sun/font/layout/LayoutEngine.cpp | 63 ++- .../native/sun/font/layout/LayoutEngine.h | 17 +- .../sun/font/layout/LigatureSubstProc2.cpp | 141 ++++++ .../sun/font/layout/LigatureSubstProc2.h | 96 ++++ .../sun/font/layout/LigatureSubstitution.h | 19 +- .../sun/font/layout/LookupProcessor.cpp | 23 +- .../native/sun/font/layout/MPreFixups.cpp | 6 +- .../native/sun/font/layout/MorphStateTables.h | 7 +- .../native/sun/font/layout/MorphTables.h | 297 ++++++++++++ .../native/sun/font/layout/MorphTables2.cpp | 229 ++++++++++ .../sun/font/layout/NonContextualGlyphSubst.h | 7 +- .../layout/NonContextualGlyphSubstProc2.cpp | 85 ++++ .../layout/NonContextualGlyphSubstProc2.h | 68 +++ .../sun/font/layout/OpenTypeLayoutEngine.cpp | 142 +++++- .../sun/font/layout/ScriptAndLanguageTags.cpp | 15 +- .../sun/font/layout/ScriptAndLanguageTags.h | 13 +- .../font/layout/SegmentArrayProcessor2.cpp | 85 ++++ .../sun/font/layout/SegmentArrayProcessor2.h | 82 ++++ .../font/layout/SegmentSingleProcessor2.cpp | 79 ++++ .../sun/font/layout/SegmentSingleProcessor2.h | 82 ++++ .../sun/font/layout/SimpleArrayProcessor2.cpp | 76 ++++ .../sun/font/layout/SimpleArrayProcessor2.h | 82 ++++ .../sun/font/layout/SingleTableProcessor2.cpp | 76 ++++ .../sun/font/layout/SingleTableProcessor2.h | 82 ++++ .../sun/font/layout/StateTableProcessor2.cpp | 193 ++++++++ .../sun/font/layout/StateTableProcessor2.h | 84 ++++ .../native/sun/font/layout/StateTables.h | 18 +- .../sun/font/layout/SubtableProcessor2.cpp | 56 +++ .../sun/font/layout/SubtableProcessor2.h | 70 +++ .../font/layout/TrimmedArrayProcessor2.cpp | 80 ++++ .../sun/font/layout/TrimmedArrayProcessor2.h | 84 ++++ 51 files changed, 3878 insertions(+), 97 deletions(-) create mode 100644 jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h create mode 100644 jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h create mode 100644 jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h create mode 100644 jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h create mode 100644 jdk/src/share/native/sun/font/layout/MorphTables2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h create mode 100644 jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/StateTableProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/SubtableProcessor2.h create mode 100644 jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp create mode 100644 jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h diff --git a/jdk/make/sun/font/FILES_c.gmk b/jdk/make/sun/font/FILES_c.gmk index c9437064216..b1895c50f16 100644 --- a/jdk/make/sun/font/FILES_c.gmk +++ b/jdk/make/sun/font/FILES_c.gmk @@ -106,7 +106,21 @@ FILES_cpp_shared = \ OpenTypeLayoutEngine.cpp \ ThaiLayoutEngine.cpp \ ScriptAndLanguageTags.cpp \ - FontInstanceAdapter.cpp + FontInstanceAdapter.cpp \ + ContextualGlyphInsertionProc2.cpp \ + ContextualGlyphSubstProc2.cpp \ + GXLayoutEngine2.cpp \ + IndicRearrangementProcessor2.cpp \ + LigatureSubstProc2.cpp \ + MorphTables2.cpp \ + NonContextualGlyphSubstProc2.cpp \ + SegmentArrayProcessor2.cpp \ + SegmentSingleProcessor2.cpp \ + SimpleArrayProcessor2.cpp \ + SingleTableProcessor2.cpp \ + StateTableProcessor2.cpp \ + SubtableProcessor2.cpp \ + TrimmedArrayProcessor2.cpp ifeq ($(PLATFORM),windows) diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertion.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertion.h index 40f47afcc0e..2285711b0a7 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertion.h +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertion.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -49,6 +49,11 @@ struct ContextualGlyphInsertionHeader : MorphStateTableHeader { }; +struct ContextualGlyphInsertionHeader2 : MorphStateTableHeader2 +{ + le_uint32 insertionTableOffset; +}; + enum ContextualGlyphInsertionFlags { cgiSetMark = 0x8000, @@ -61,11 +66,17 @@ enum ContextualGlyphInsertionFlags cgiMarkedInsertCountMask = 0x001F }; -struct LigatureSubstitutionStateEntry : StateEntry +struct ContextualGlyphInsertionStateEntry : StateEntry { ByteOffset currentInsertionListOffset; ByteOffset markedInsertionListOffset; }; +struct ContextualGlyphInsertionStateEntry2 : StateEntry2 +{ + le_uint16 currentInsertionListIndex; + le_uint16 markedInsertionListIndex; +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp new file mode 100644 index 00000000000..a7a2386fa3c --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp @@ -0,0 +1,168 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "StateTables.h" +#include "MorphStateTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "ContextualGlyphInsertionProc2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphInsertionProcessor2) + +ContextualGlyphInsertionProcessor2::ContextualGlyphInsertionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : StateTableProcessor2(morphSubtableHeader) +{ + contextualGlyphHeader = (const ContextualGlyphInsertionHeader2 *) morphSubtableHeader; + le_uint32 insertionTableOffset = SWAPL(contextualGlyphHeader->insertionTableOffset); + insertionTable = ((le_uint16 *) ((char *)&stateTableHeader->stHeader + insertionTableOffset)); + entryTable = (const ContextualGlyphInsertionStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); +} + +ContextualGlyphInsertionProcessor2::~ContextualGlyphInsertionProcessor2() +{ +} + +void ContextualGlyphInsertionProcessor2::beginStateTable() +{ + markGlyph = 0; +} + +le_uint16 ContextualGlyphInsertionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +{ + const ContextualGlyphInsertionStateEntry2 *entry = &entryTable[index]; + le_uint16 newState = SWAPW(entry->newStateIndex); + le_uint16 flags = SWAPW(entry->flags); + le_int16 currIndex = SWAPW(entry->currentInsertionListIndex); + le_int16 markIndex = SWAPW(entry->markedInsertionListIndex); + int i = 0; + + if (markIndex > 0) { + le_int16 count = (flags & cgiMarkedInsertCountMask) >> 5; + if (!(flags & cgiMarkedIsKashidaLike)) { + // extra glyph(s) will be added directly before/after the specified marked glyph + if (!(flags & cgiMarkInsertBefore)) { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); + for (i = 0; i < count; i++, markIndex++) { + insertGlyphs[i] = insertionTable[markIndex]; + } + insertGlyphs[i] = glyphStorage[markGlyph]; + glyphStorage.applyInsertions(); + } else { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); + insertGlyphs[0] = glyphStorage[markGlyph]; + for (i = 1; i < count + 1; i++, markIndex++) { + insertGlyphs[i] = insertionTable[markIndex]; + } + glyphStorage.applyInsertions(); + } + } else { + // inserted as a split-vowel-like insertion + // extra glyph(s) will be inserted some distance away from the marked glyph + if (!(flags & cgiMarkInsertBefore)) { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); + for (i = 0; i < count; i++, markIndex++) { + insertGlyphs[i] = insertionTable[markIndex]; + } + insertGlyphs[i] = glyphStorage[markGlyph]; + glyphStorage.applyInsertions(); + } else { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); + insertGlyphs[0] = glyphStorage[markGlyph]; + for (i = 1; i < count + 1; i++, markIndex++) { + insertGlyphs[i] = insertionTable[markIndex]; + } + glyphStorage.applyInsertions(); + } + } + } + + if (currIndex > 0) { + le_int16 count = flags & cgiCurrentInsertCountMask; + if (!(flags & cgiCurrentIsKashidaLike)) { + // extra glyph(s) will be added directly before/after the specified current glyph + if (!(flags & cgiCurrentInsertBefore)) { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); + for (i = 0; i < count; i++, currIndex++) { + insertGlyphs[i] = insertionTable[currIndex]; + } + insertGlyphs[i] = glyphStorage[currGlyph]; + glyphStorage.applyInsertions(); + } else { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); + insertGlyphs[0] = glyphStorage[currGlyph]; + for (i = 1; i < count + 1; i++, currIndex++) { + insertGlyphs[i] = insertionTable[currIndex]; + } + glyphStorage.applyInsertions(); + } + } else { + // inserted as a split-vowel-like insertion + // extra glyph(s) will be inserted some distance away from the current glyph + if (!(flags & cgiCurrentInsertBefore)) { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); + for (i = 0; i < count; i++, currIndex++) { + insertGlyphs[i] = insertionTable[currIndex]; + } + insertGlyphs[i] = glyphStorage[currGlyph]; + glyphStorage.applyInsertions(); + } else { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); + insertGlyphs[0] = glyphStorage[currGlyph]; + for (i = 1; i < count + 1; i++, currIndex++) { + insertGlyphs[i] = insertionTable[currIndex]; + } + glyphStorage.applyInsertions(); + } + } + } + + if (flags & cgiSetMark) { + markGlyph = currGlyph; + } + + if (!(flags & cgiDontAdvance)) { + currGlyph += dir; + } + + return newState; +} + +void ContextualGlyphInsertionProcessor2::endStateTable() +{ +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h new file mode 100644 index 00000000000..c53c4c9352b --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h @@ -0,0 +1,89 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 2013 - All Rights Reserved + * + */ + +#ifndef __CONTEXTUALGLYPHINSERTIONPROCESSOR2_H +#define __CONTEXTUALGLYPHINSERTIONPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "ContextualGlyphInsertionProc2.h" +#include "ContextualGlyphInsertion.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class ContextualGlyphInsertionProcessor2 : public StateTableProcessor2 +{ +public: + virtual void beginStateTable(); + + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + + virtual void endStateTable(); + + ContextualGlyphInsertionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + virtual ~ContextualGlyphInsertionProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + ContextualGlyphInsertionProcessor2(); + +protected: + le_int32 markGlyph; + const le_uint16* insertionTable; + const ContextualGlyphInsertionStateEntry2 *entryTable; + const ContextualGlyphInsertionHeader2 *contextualGlyphHeader; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp new file mode 100644 index 00000000000..1d7bc399a9b --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp @@ -0,0 +1,160 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "StateTables.h" +#include "MorphStateTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "ContextualGlyphSubstProc2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" +#include + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor2) + +ContextualGlyphSubstitutionProcessor2::ContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : StateTableProcessor2(morphSubtableHeader) +{ + contextualGlyphHeader = (const ContextualGlyphHeader2 *) morphSubtableHeader; + le_uint32 perGlyphTableOffset = SWAPL(contextualGlyphHeader->perGlyphTableOffset); + perGlyphTable = ((le_uint32 *) ((char *)&stateTableHeader->stHeader + perGlyphTableOffset)); + entryTable = (const ContextualGlyphStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); +} + +ContextualGlyphSubstitutionProcessor2::~ContextualGlyphSubstitutionProcessor2() +{ +} + +void ContextualGlyphSubstitutionProcessor2::beginStateTable() +{ + markGlyph = 0; +} + +le_uint16 ContextualGlyphSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +{ + const ContextualGlyphStateEntry2 *entry = &entryTable[index]; + le_uint16 newState = SWAPW(entry->newStateIndex); + le_uint16 flags = SWAPW(entry->flags); + le_int16 markIndex = SWAPW(entry->markIndex); + le_int16 currIndex = SWAPW(entry->currIndex); + + if (markIndex != -1) { + le_uint32 offset = SWAPL(perGlyphTable[markIndex]); + LEGlyphID mGlyph = glyphStorage[markGlyph]; + TTGlyphID newGlyph = lookup(offset, mGlyph); + glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph); + } + + if (currIndex != -1) { + le_uint32 offset = SWAPL(perGlyphTable[currIndex]); + LEGlyphID thisGlyph = glyphStorage[currGlyph]; + TTGlyphID newGlyph = lookup(offset, thisGlyph); + glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } + + if (flags & cgsSetMark) { + markGlyph = currGlyph; + } + + if (!(flags & cgsDontAdvance)) { + currGlyph += dir; + } + + return newState; +} + +TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyphID gid) +{ + LookupTable *lookupTable = ((LookupTable *) ((char *)perGlyphTable + offset)); + le_int16 format = SWAPW(lookupTable->format); + TTGlyphID newGlyph = 0xFFFF; + + switch (format) { + case ltfSimpleArray: { +#ifdef TEST_FORMAT + // Disabled pending for design review + SimpleArrayLookupTable *lookupTable0 = (SimpleArrayLookupTable *) lookupTable; + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); + newGlyph = SWAPW(lookupTable0->valueArray[glyphCode]); +#endif + break; + } + case ltfSegmentSingle: { +#ifdef TEST_FORMAT + // Disabled pending for design review + SegmentSingleLookupTable *lookupTable2 = (SegmentSingleLookupTable *) lookupTable; + const LookupSegment *segment = lookupTable2->lookupSegment(lookupTable2->segments, gid); + if (segment != NULL) { + newGlyph = SWAPW(segment->value); + } +#endif + break; + } + case ltfSegmentArray: { + printf("Context Lookup Table Format4: specific interpretation needed!\n"); + break; + } + case ltfSingleTable: + { +#ifdef TEST_FORMAT + // Disabled pending for design review + SingleTableLookupTable *lookupTable6 = (SingleTableLookupTable *) lookupTable; + const LookupSingle *segment = lookupTable6->lookupSingle(lookupTable6->entries, gid); + if (segment != NULL) { + newGlyph = SWAPW(segment->value); + } +#endif + break; + } + case ltfTrimmedArray: { + TrimmedArrayLookupTable *lookupTable8 = (TrimmedArrayLookupTable *) lookupTable; + TTGlyphID firstGlyph = SWAPW(lookupTable8->firstGlyph); + TTGlyphID lastGlyph = firstGlyph + SWAPW(lookupTable8->glyphCount); + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); + if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) { + newGlyph = SWAPW(lookupTable8->valueArray[glyphCode - firstGlyph]); + } + } + default: + break; + } + return newGlyph; +} + +void ContextualGlyphSubstitutionProcessor2::endStateTable() +{ +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h new file mode 100644 index 00000000000..0f63012c7f5 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h @@ -0,0 +1,92 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H +#define __CONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "ContextualGlyphSubstitution.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class ContextualGlyphSubstitutionProcessor2 : public StateTableProcessor2 +{ +public: + virtual void beginStateTable(); + + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + + virtual void endStateTable(); + + ContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + virtual ~ContextualGlyphSubstitutionProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + ContextualGlyphSubstitutionProcessor2(); + TTGlyphID lookup(le_uint32 offset, LEGlyphID gid); + +protected: + const le_uint32* perGlyphTable; + const ContextualGlyphStateEntry2 *entryTable; + + le_int16 perGlyphTableFormat; + le_int32 markGlyph; + + const ContextualGlyphHeader2 *contextualGlyphHeader; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h index e4e5b3ab6ba..531be23695c 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstitution.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -49,6 +49,11 @@ struct ContextualGlyphSubstitutionHeader : MorphStateTableHeader ByteOffset substitutionTableOffset; }; +struct ContextualGlyphHeader2 : MorphStateTableHeader2 +{ + le_uint32 perGlyphTableOffset; // no more substitution tables +}; + enum ContextualGlyphSubstitutionFlags { cgsSetMark = 0x8000, @@ -62,5 +67,11 @@ struct ContextualGlyphSubstitutionStateEntry : StateEntry WordOffset currOffset; }; +struct ContextualGlyphStateEntry2 : StateEntry2 +{ + le_uint16 markIndex; + le_uint16 currIndex; +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp new file mode 100644 index 00000000000..ae070c2f6ff --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp @@ -0,0 +1,91 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "LayoutEngine.h" +#include "GXLayoutEngine2.h" +#include "LEGlyphStorage.h" +#include "MorphTables.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine2) + +GXLayoutEngine2::GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader2 *morphTable, le_int32 typoFlags, LEErrorCode &success) + : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fMorphTable(morphTable) +{ + // nothing else to do? +} + +GXLayoutEngine2::~GXLayoutEngine2() +{ + reset(); +} + +// apply 'morx' table +le_int32 GXLayoutEngine2::computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, LEGlyphStorage &glyphStorage, LEErrorCode &success) +{ + if (LE_FAILURE(success)) { + return 0; + } + + if (chars == NULL || offset < 0 || count < 0 || max < 0 || offset >= max || offset + count > max) { + success = LE_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + + mapCharsToGlyphs(chars, offset, count, rightToLeft, rightToLeft, glyphStorage, success); + + if (LE_FAILURE(success)) { + return 0; + } + + fMorphTable->process(glyphStorage, fTypoFlags); + return count; +} + +// apply positional tables +void GXLayoutEngine2::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool /*reverse*/, + LEGlyphStorage &/*glyphStorage*/, LEErrorCode &success) +{ + if (LE_FAILURE(success)) { + return; + } + + if (chars == NULL || offset < 0 || count < 0) { + success = LE_ILLEGAL_ARGUMENT_ERROR; + return; + } + + // FIXME: no positional processing yet... +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h new file mode 100644 index 00000000000..9eded230c13 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h @@ -0,0 +1,149 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __GXLAYOUTENGINE2_H +#define __GXLAYOUTENGINE2_H + +#include "LETypes.h" +#include "LayoutEngine.h" + +#include "MorphTables.h" + +U_NAMESPACE_BEGIN + +class LEFontInstance; +class LEGlyphStorage; + +/** + * This class implements layout for QuickDraw GX or Apple Advanced Typograyph (AAT) + * fonts. A font is a GX or AAT font if it contains a 'mort' table. See Apple's + * TrueType Reference Manual (http://fonts.apple.com/TTRefMan/index.html) for details. + * Information about 'mort' tables is in the chapter titled "Font Files." + * + * @internal + */ +class GXLayoutEngine2 : public LayoutEngine +{ +public: + /** + * This is the main constructor. It constructs an instance of GXLayoutEngine for + * a particular font, script and language. It takes the 'mort' table as a parameter since + * LayoutEngine::layoutEngineFactory has to read the 'mort' table to know that it has a + * GX font. + * + * Note: GX and AAT fonts don't contain any script and language specific tables, so + * the script and language are ignored. + * + * @param fontInstance - the font + * @param scriptCode - the script + * @param langaugeCode - the language + * @param morphTable - the 'mort' table + * @param success - set to an error code if the operation fails + * + * @see LayoutEngine::layoutEngineFactory + * @see ScriptAndLangaugeTags.h for script and language codes + * + * @internal + */ + GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader2 *morphTable, le_int32 typoFlags, LEErrorCode &success); + + /** + * The destructor, virtual for correct polymorphic invocation. + * + * @internal + */ + virtual ~GXLayoutEngine2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +protected: + + /** + * The address of the 'mort' table + * + * @internal + */ + const MorphTableHeader2 *fMorphTable; + + /** + * This method does GX layout using the font's 'mort' table. It converts the + * input character codes to glyph indices using mapCharsToGlyphs, and then + * applies the 'mort' table. + * + * Input parameters: + * @param chars - the input character context + * @param offset - the index of the first character to process + * @param count - the number of characters to process + * @param max - the number of characters in the input context + * @param rightToLeft - TRUE if the text is in a right to left directional run + * @param glyphStorage - the glyph storage object. The glyph and char index arrays will be set. + * + * Output parameters: + * @param success - set to an error code if the operation fails + * + * @return the number of glyphs in the glyph index array + * + * @internal + */ + virtual le_int32 computeGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, + LEGlyphStorage &glyphStorage, LEErrorCode &success); + + /** + * This method adjusts the glyph positions using the font's + * 'kern', 'trak', 'bsln', 'opbd' and 'just' tables. + * + * Input parameters: + * @param glyphStorage - the object holding the glyph storage. The positions will be updated as needed. + * + * Output parameters: + * @param success - set to an error code if the operation fails + * + * @internal + */ + virtual void adjustGlyphPositions(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, + LEGlyphStorage &glyphStorage, LEErrorCode &success); + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp b/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp index 73cd2cfd718..8b499f8a37a 100644 --- a/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicClassTables.cpp @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -186,13 +186,15 @@ static const IndicClassTable::CharClass tamlCharClasses[] = }; // FIXME: Should some of the bb's be pb's? (KA, NA, MA, YA, VA, etc. (approx 13)) +// U+C43 and U+C44 are _lm here not _dr. Similar to the situation with U+CC3 and +// U+CC4 in Kannada below. static const IndicClassTable::CharClass teluCharClasses[] = { _xx, _mp, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _iv, _iv, // 0C00 - 0C0F _iv, _xx, _iv, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, // 0C10 - 0C1F _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _bb, // 0C20 - 0C2F _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _xx, _xx, _xx, _xx, _da, _da, // 0C30 - 0C3F - _da, _dr, _dr, _dr, _dr, _xx, _a1, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, // 0C40 - 0C4F + _da, _dr, _dr, _lm, _lm, _xx, _a1, _da, _s1, _xx, _da, _da, _da, _vr, _xx, _xx, // 0C40 - 0C4F _xx, _xx, _xx, _xx, _xx, _da, _m2, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, // 0C50 - 0C5F _iv, _iv, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx, _xx // 0C60 - 0C6F }; diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangement.h b/jdk/src/share/native/sun/font/layout/IndicRearrangement.h index 881e2521bca..72d5eb20530 100644 --- a/jdk/src/share/native/sun/font/layout/IndicRearrangement.h +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangement.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -49,6 +49,10 @@ struct IndicRearrangementSubtableHeader : MorphStateTableHeader { }; +struct IndicRearrangementSubtableHeader2 : MorphStateTableHeader2 +{ +}; + enum IndicRearrangementFlags { irfMarkFirst = 0x8000, @@ -85,6 +89,10 @@ struct IndicRearrangementStateEntry : StateEntry { }; +struct IndicRearrangementStateEntry2 : StateEntry2 +{ +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp new file mode 100644 index 00000000000..35d6e43ac6b --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp @@ -0,0 +1,423 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "StateTables.h" +#include "MorphStateTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "IndicRearrangementProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor2) + +IndicRearrangementProcessor2::IndicRearrangementProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : StateTableProcessor2(morphSubtableHeader) +{ + indicRearrangementSubtableHeader = (const IndicRearrangementSubtableHeader2 *) morphSubtableHeader; + entryTable = (const IndicRearrangementStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); +} + +IndicRearrangementProcessor2::~IndicRearrangementProcessor2() +{ +} + +void IndicRearrangementProcessor2::beginStateTable() +{ + firstGlyph = 0; + lastGlyph = 0; +} + +le_uint16 IndicRearrangementProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +{ + const IndicRearrangementStateEntry2 *entry = &entryTable[index]; + le_uint16 newState = SWAPW(entry->newStateIndex); // index to the new state + IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags); + + if (flags & irfMarkFirst) { + firstGlyph = currGlyph; + } + + if (flags & irfMarkLast) { + lastGlyph = currGlyph; + } + + doRearrangementAction(glyphStorage, (IndicRearrangementVerb) (flags & irfVerbMask)); + + if (!(flags & irfDontAdvance)) { + currGlyph += dir; + } + + return newState; // index to new state +} + +void IndicRearrangementProcessor2::endStateTable() +{ +} + +void IndicRearrangementProcessor2::doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const +{ + LEGlyphID a, b, c, d; + le_int32 ia, ib, ic, id, ix, x; + LEErrorCode success = LE_NO_ERROR; + + switch(verb) + { + case irvNoAction: + break; + + case irvxA: + a = glyphStorage[firstGlyph]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + x = firstGlyph + 1; + + while (x <= lastGlyph) { + glyphStorage[x - 1] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x - 1, ix, success); + x += 1; + } + + glyphStorage[lastGlyph] = a; + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvDx: + d = glyphStorage[lastGlyph]; + id = glyphStorage.getCharIndex(lastGlyph, success); + x = lastGlyph - 1; + + while (x >= firstGlyph) { + glyphStorage[x + 1] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x + 1, ix, success); + x -= 1; + } + + glyphStorage[firstGlyph] = d; + glyphStorage.setCharIndex(firstGlyph, id, success); + break; + + case irvDxA: + a = glyphStorage[firstGlyph]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + + glyphStorage[firstGlyph] = glyphStorage[lastGlyph]; + glyphStorage[lastGlyph] = a; + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvxAB: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + x = firstGlyph + 2; + + while (x <= lastGlyph) { + glyphStorage[x - 2] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x - 2, ix, success); + x += 1; + } + + glyphStorage[lastGlyph - 1] = a; + glyphStorage[lastGlyph] = b; + + glyphStorage.setCharIndex(lastGlyph - 1, ia, success); + glyphStorage.setCharIndex(lastGlyph, ib, success); + break; + + case irvxBA: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + x = firstGlyph + 2; + + while (x <= lastGlyph) { + glyphStorage[x - 2] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x - 2, ix, success); + x += 1; + } + + glyphStorage[lastGlyph - 1] = b; + glyphStorage[lastGlyph] = a; + + glyphStorage.setCharIndex(lastGlyph - 1, ib, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvCDx: + c = glyphStorage[lastGlyph - 1]; + d = glyphStorage[lastGlyph]; + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + x = lastGlyph - 2; + + while (x >= firstGlyph) { + glyphStorage[x + 2] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x + 2, ix, success); + x -= 1; + } + + glyphStorage[firstGlyph] = c; + glyphStorage[firstGlyph + 1] = d; + + glyphStorage.setCharIndex(firstGlyph, ic, success); + glyphStorage.setCharIndex(firstGlyph + 1, id, success); + break; + + case irvDCx: + c = glyphStorage[lastGlyph - 1]; + d = glyphStorage[lastGlyph]; + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + x = lastGlyph - 2; + + while (x >= firstGlyph) { + glyphStorage[x + 2] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x + 2, ix, success); + x -= 1; + } + + glyphStorage[firstGlyph] = d; + glyphStorage[firstGlyph + 1] = c; + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(firstGlyph + 1, ic, success); + break; + + case irvCDxA: + a = glyphStorage[firstGlyph]; + c = glyphStorage[lastGlyph - 1]; + d = glyphStorage[lastGlyph]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + x = lastGlyph - 2; + + while (x > firstGlyph) { + glyphStorage[x + 1] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x + 1, ix, success); + x -= 1; + } + + glyphStorage[firstGlyph] = c; + glyphStorage[firstGlyph + 1] = d; + glyphStorage[lastGlyph] = a; + + glyphStorage.setCharIndex(firstGlyph, ic, success); + glyphStorage.setCharIndex(firstGlyph + 1, id, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvDCxA: + a = glyphStorage[firstGlyph]; + c = glyphStorage[lastGlyph - 1]; + d = glyphStorage[lastGlyph]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + x = lastGlyph - 2; + + while (x > firstGlyph) { + glyphStorage[x + 1] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x + 1, ix, success); + x -= 1; + } + + glyphStorage[firstGlyph] = d; + glyphStorage[firstGlyph + 1] = c; + glyphStorage[lastGlyph] = a; + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(firstGlyph + 1, ic, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvDxAB: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + d = glyphStorage[lastGlyph]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + x = firstGlyph + 2; + + while (x < lastGlyph) { + glyphStorage[x - 2] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x - 2, ix, success); + x += 1; + } + + glyphStorage[firstGlyph] = d; + glyphStorage[lastGlyph - 1] = a; + glyphStorage[lastGlyph] = b; + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(lastGlyph - 1, ia, success); + glyphStorage.setCharIndex(lastGlyph, ib, success); + break; + + case irvDxBA: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + d = glyphStorage[lastGlyph]; + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + x = firstGlyph + 2; + + while (x < lastGlyph) { + glyphStorage[x - 2] = glyphStorage[x]; + ix = glyphStorage.getCharIndex(x, success); + glyphStorage.setCharIndex(x - 2, ix, success); + x += 1; + } + + glyphStorage[firstGlyph] = d; + glyphStorage[lastGlyph - 1] = b; + glyphStorage[lastGlyph] = a; + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(lastGlyph - 1, ib, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvCDxAB: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + + glyphStorage[firstGlyph] = glyphStorage[lastGlyph - 1]; + glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph]; + + glyphStorage[lastGlyph - 1] = a; + glyphStorage[lastGlyph] = b; + + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + + glyphStorage.setCharIndex(firstGlyph, ic, success); + glyphStorage.setCharIndex(firstGlyph + 1, id, success); + + glyphStorage.setCharIndex(lastGlyph - 1, ia, success); + glyphStorage.setCharIndex(lastGlyph, ib, success); + break; + + case irvCDxBA: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + + glyphStorage[firstGlyph] = glyphStorage[lastGlyph - 1]; + glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph]; + + glyphStorage[lastGlyph - 1] = b; + glyphStorage[lastGlyph] = a; + + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + + glyphStorage.setCharIndex(firstGlyph, ic, success); + glyphStorage.setCharIndex(firstGlyph + 1, id, success); + + glyphStorage.setCharIndex(lastGlyph - 1, ib, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + case irvDCxAB: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + + glyphStorage[firstGlyph] = glyphStorage[lastGlyph]; + glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph - 1]; + + glyphStorage[lastGlyph - 1] = a; + glyphStorage[lastGlyph] = b; + + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(firstGlyph + 1, ic, success); + + glyphStorage.setCharIndex(lastGlyph - 1, ia, success); + glyphStorage.setCharIndex(lastGlyph, ib, success); + break; + + case irvDCxBA: + a = glyphStorage[firstGlyph]; + b = glyphStorage[firstGlyph + 1]; + + glyphStorage[firstGlyph] = glyphStorage[lastGlyph]; + glyphStorage[firstGlyph + 1] = glyphStorage[lastGlyph - 1]; + + glyphStorage[lastGlyph - 1] = b; + glyphStorage[lastGlyph] = a; + + ia = glyphStorage.getCharIndex(firstGlyph, success); + ib = glyphStorage.getCharIndex(firstGlyph + 1, success); + ic = glyphStorage.getCharIndex(lastGlyph - 1, success); + id = glyphStorage.getCharIndex(lastGlyph, success); + + glyphStorage.setCharIndex(firstGlyph, id, success); + glyphStorage.setCharIndex(firstGlyph + 1, ic, success); + + glyphStorage.setCharIndex(lastGlyph - 1, ib, success); + glyphStorage.setCharIndex(lastGlyph, ia, success); + break; + + default: + break; + } + +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h new file mode 100644 index 00000000000..3d83f21ce3b --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h @@ -0,0 +1,88 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __INDICREARRANGEMENTPROCESSOR2_H +#define __INDICREARRANGEMENTPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor.h" +#include "StateTableProcessor2.h" +#include "IndicRearrangement.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class IndicRearrangementProcessor2 : public StateTableProcessor2 +{ +public: + virtual void beginStateTable(); + + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + + virtual void endStateTable(); + + void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const; + + IndicRearrangementProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + virtual ~IndicRearrangementProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +protected: + le_int32 firstGlyph; + le_int32 lastGlyph; + + const IndicRearrangementStateEntry2 *entryTable; + const IndicRearrangementSubtableHeader2 *indicRearrangementSubtableHeader; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp index 9b28ada355d..9bf3a2a5c65 100644 --- a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp @@ -266,7 +266,7 @@ public: le_uint32 saveAuxData = fGlyphStorage.getAuxData(i+inv_count,success); const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass); int j; - for (j = 0 ; *(splitMatra)[j] != 0 ; j++) { + for (j = 0 ; j < SM_MAX_PIECES && *(splitMatra)[j] != 0 ; j++) { LEUnicode piece = (*splitMatra)[j]; if ( j == 0 ) { fOutChars[i+inv_count] = piece; @@ -357,7 +357,7 @@ public: const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass); int i; - for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) { + for (i = 0; i < SM_MAX_PIECES && (*splitMatra)[i] != 0; i += 1) { LEUnicode piece = (*splitMatra)[i]; IndicClassTable::CharClass pieceClass = classTable->getCharClass(piece); @@ -1224,7 +1224,6 @@ void IndicReordering::getDynamicProperties( DynamicProperties *, const IndicClas LEUnicode currentChar; - LEUnicode virama; LEUnicode workChars[2]; LEGlyphStorage workGlyphs; @@ -1232,14 +1231,17 @@ void IndicReordering::getDynamicProperties( DynamicProperties *, const IndicClas //le_int32 offset = 0; +#if 0 +// TODO: Should this section of code have actually been doing something? // First find the relevant virama for the script we are dealing with - + LEUnicode virama; for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) { if ( classTable->isVirama(currentChar)) { virama = currentChar; break; } } +#endif for ( currentChar = classTable->firstChar ; currentChar <= classTable->lastChar ; currentChar++ ) { if ( classTable->isConsonant(currentChar)) { diff --git a/jdk/src/share/native/sun/font/layout/IndicReordering.h b/jdk/src/share/native/sun/font/layout/IndicReordering.h index 2a5b10e9369..36f7276c792 100644 --- a/jdk/src/share/native/sun/font/layout/IndicReordering.h +++ b/jdk/src/share/native/sun/font/layout/IndicReordering.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -96,7 +96,9 @@ U_NAMESPACE_BEGIN #define SF_POST_BASE_LIMIT_MASK 0x0000FFFFU #define SF_NO_POST_BASE_LIMIT 0x00007FFFU -typedef LEUnicode SplitMatra[3]; +#define SM_MAX_PIECES 3 + +typedef LEUnicode SplitMatra[SM_MAX_PIECES]; class MPreFixups; class LEGlyphStorage; diff --git a/jdk/src/share/native/sun/font/layout/LEFontInstance.h b/jdk/src/share/native/sun/font/layout/LEFontInstance.h index 1f1d415b820..c03b77c8cd4 100644 --- a/jdk/src/share/native/sun/font/layout/LEFontInstance.h +++ b/jdk/src/share/native/sun/font/layout/LEFontInstance.h @@ -190,6 +190,25 @@ public: */ virtual const void *getFontTable(LETag tableTag) const = 0; + /** + * This method reads a table from the font. Note that in general, + * it only makes sense to call this method on an LEFontInstance + * which represents a physical font - i.e. one which has been returned by + * getSubFont(). This is because each subfont in a composite font + * will have different tables, and there's no way to know which subfont to access. + * + * Subclasses which represent composite fonts should always return NULL. + * + * This version sets a length, for range checking. + * + * @param tableTag - the four byte table tag. (e.g. 'cmap') + * @param length - ignored on entry, on exit will be the length of the table if known, or -1 if unknown. + * @return the address of the table in memory, or NULL + * if the table doesn't exist. + * @internal + */ + virtual const void* getFontTable(LETag tableTag, size_t &length) const { length=-1; return getFontTable(tableTag); } /* -1 = unknown length */ + virtual void *getKernPairs() const = 0; virtual void setKernPairs(void *pairs) const = 0; diff --git a/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h b/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h index 3fdafe4bdc1..7f1662a0050 100644 --- a/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h +++ b/jdk/src/share/native/sun/font/layout/LEGlyphFilter.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -36,6 +36,7 @@ U_NAMESPACE_BEGIN +#ifndef U_HIDE_INTERNAL_API /** * This is a helper class that is used to * recognize a set of glyph indices. @@ -63,6 +64,7 @@ public: */ virtual le_bool accept(LEGlyphID glyph) const = 0; }; +#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/LEInsertionList.h b/jdk/src/share/native/sun/font/layout/LEInsertionList.h index 6a48227973e..231b5f63304 100644 --- a/jdk/src/share/native/sun/font/layout/LEInsertionList.h +++ b/jdk/src/share/native/sun/font/layout/LEInsertionList.h @@ -25,7 +25,7 @@ /* ********************************************************************** - * Copyright (C) 1998-2008, International Business Machines + * Copyright (C) 1998-2013, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** */ @@ -39,6 +39,7 @@ U_NAMESPACE_BEGIN struct InsertionRecord; +#ifndef U_HIDE_INTERNAL_API /** * This class encapsulates the callback used by LEInsertionList * to apply an insertion from the insertion list. @@ -194,6 +195,7 @@ private: */ le_bool append; }; +#endif /* U_HIDE_INTERNAL_API */ U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/LEScripts.h b/jdk/src/share/native/sun/font/layout/LEScripts.h index ed25b604413..beb3bbedc6e 100644 --- a/jdk/src/share/native/sun/font/layout/LEScripts.h +++ b/jdk/src/share/native/sun/font/layout/LEScripts.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010. All Rights Reserved. + * (C) Copyright IBM Corp. 1998-2013. All Rights Reserved. * * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS * YOU REALLY KNOW WHAT YOU'RE DOING. @@ -241,8 +241,27 @@ enum ScriptCodes { palmScriptCode = 144, sindScriptCode = 145, waraScriptCode = 146, +/** + * @stable ICU 4.8 + */ - scriptCodeCount = 147 + afakScriptCode = 147, + jurcScriptCode = 148, + mrooScriptCode = 149, + nshuScriptCode = 150, + shrdScriptCode = 151, + soraScriptCode = 152, + takrScriptCode = 153, + tangScriptCode = 154, + woleScriptCode = 155, +/** + * @stable ICU 49 + */ + + khojScriptCode = 156, + tirhScriptCode = 157, + + scriptCodeCount = 158 }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/LETypes.h b/jdk/src/share/native/sun/font/layout/LETypes.h index be0441b538f..26cbeb363f1 100644 --- a/jdk/src/share/native/sun/font/layout/LETypes.h +++ b/jdk/src/share/native/sun/font/layout/LETypes.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -50,14 +50,15 @@ #endif #include "unicode/utypes.h" + +#ifdef __cplusplus #include "unicode/uobject.h" +#endif + #ifdef LE_USE_CMEMORY #include "cmemory.h" #endif -#endif /* not standalone */ - - -U_NAMESPACE_BEGIN +#endif /*! * \file @@ -296,12 +297,14 @@ typedef UChar LEUnicode16; */ typedef UChar32 LEUnicode32; +#ifndef U_HIDE_DEPRECATED_API /** * Used to represent 16-bit Unicode code points. * * @deprecated since ICU 2.4. Use LEUnicode16 instead */ typedef UChar LEUnicode; +#endif /* U_HIDE_DEPRECATED_API */ /** * Used to hold a pair of (x, y) values which represent a point. @@ -325,7 +328,7 @@ struct LEPoint float fY; }; -#ifndef XP_CPLUSPLUS +#ifndef __cplusplus /** * Used to hold a pair of (x, y) values which represent a point. * @@ -335,6 +338,7 @@ typedef struct LEPoint LEPoint; #endif +#ifndef U_HIDE_INTERNAL_API /** * A convenience macro to get the length of an array. * @@ -373,7 +377,52 @@ typedef struct LEPoint LEPoint; * @internal */ #define LE_DELETE_ARRAY(array) uprv_free((void *) (array)) -#endif +#else +/* !LE_USE_CMEMORY - Not using ICU memory - use C std lib versions */ + +#include +#include + +/** + * A convenience macro to get the length of an array. + * + * @internal + */ +#define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0]) + +/** + * A convenience macro for copying an array. + * + * @internal + */ +#define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0]) + +/** + * Allocate an array of basic types. This is used to isolate the rest of + * the LayoutEngine code from cmemory.h. + * + * @internal + */ +#define LE_NEW_ARRAY(type, count) (type *) malloc((count) * sizeof(type)) + +/** + * Re-allocate an array of basic types. This is used to isolate the rest of + * the LayoutEngine code from cmemory.h. + * + * @internal + */ +#define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0]) + + /** + * Free an array of basic types. This is used to isolate the rest of + * the LayoutEngine code from cmemory.h. + * + * @internal + */ +#define LE_DELETE_ARRAY(array) free((void *) (array)) + +#endif /* LE_USE_CMEMORY */ +#endif /* U_HIDE_INTERNAL_API */ /** * A macro to construct the four-letter tags used to @@ -536,7 +585,7 @@ enum LEFeatureTags { LE_RAND_FEATURE_TAG = 0x72616E64UL, /**< 'rand' */ LE_RLIG_FEATURE_TAG = 0x726C6967UL, /**< 'rlig' */ LE_RPHF_FEATURE_TAG = 0x72706866UL, /**< 'rphf' */ - LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */ + LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */ LE_RTBD_FEATURE_TAG = 0x72746264UL, /**< 'rtbd' */ LE_RTLA_FEATURE_TAG = 0x72746C61UL, /**< 'rtla' */ LE_RUBY_FEATURE_TAG = 0x72756279UL, /**< 'ruby' */ @@ -587,6 +636,66 @@ enum LEFeatureTags { LE_ZERO_FEATURE_TAG = 0x7A65726FUL /**< 'zero' */ }; +/** + * @internal + */ +enum LEFeatureENUMs { + LE_Kerning_FEATURE_ENUM = 0, /**< Requests Kerning. Formerly LayoutEngine::kTypoFlagKern */ + LE_Ligatures_FEATURE_ENUM = 1, /**< Requests Ligatures. Formerly LayoutEngine::kTypoFlagLiga */ + LE_NoCanon_FEATURE_ENUM = 2, /**< Requests No Canonical Processing */ + LE_CLIG_FEATURE_ENUM, /**< Feature specific enum */ + LE_DLIG_FEATURE_ENUM, /**< Feature specific enum */ + LE_HLIG_FEATURE_ENUM, /**< Feature specific enum */ + LE_LIGA_FEATURE_ENUM, /**< Feature specific enum */ + LE_RLIG_FEATURE_ENUM, /**< Feature specific enum */ + LE_SMCP_FEATURE_ENUM, /**< Feature specific enum */ + LE_FRAC_FEATURE_ENUM, /**< Feature specific enum */ + LE_AFRC_FEATURE_ENUM, /**< Feature specific enum */ + LE_ZERO_FEATURE_ENUM, /**< Feature specific enum */ + LE_SWSH_FEATURE_ENUM, /**< Feature specific enum */ + LE_CSWH_FEATURE_ENUM, /**< Feature specific enum */ + LE_SALT_FEATURE_ENUM, /**< Feature specific enum */ + LE_NALT_FEATURE_ENUM, /**< Feature specific enum */ + LE_RUBY_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS01_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS02_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS03_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS04_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS05_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS06_FEATURE_ENUM, /**< Feature specific enum */ + LE_SS07_FEATURE_ENUM, /**< Feature specific enum */ + + LE_CHAR_FILTER_FEATURE_ENUM = 31, /**< Apply CharSubstitutionFilter */ + LE_FEATURE_ENUM_MAX = LE_CHAR_FILTER_FEATURE_ENUM +}; + +#define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM) +#define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM) +#define LE_NoCanon_FEATURE_FLAG (1 << LE_NoCanon_FEATURE_ENUM) +#define LE_CLIG_FEATURE_FLAG (1 << LE_CLIG_FEATURE_ENUM) +#define LE_DLIG_FEATURE_FLAG (1 << LE_DLIG_FEATURE_ENUM) +#define LE_HLIG_FEATURE_FLAG (1 << LE_HLIG_FEATURE_ENUM) +#define LE_LIGA_FEATURE_FLAG (1 << LE_LIGA_FEATURE_ENUM) +#define LE_RLIG_FEATURE_FLAG (1 << LE_RLIG_FEATURE_ENUM) +#define LE_SMCP_FEATURE_FLAG (1 << LE_SMCP_FEATURE_ENUM) +#define LE_FRAC_FEATURE_FLAG (1 << LE_FRAC_FEATURE_ENUM) +#define LE_AFRC_FEATURE_FLAG (1 << LE_AFRC_FEATURE_ENUM) +#define LE_ZERO_FEATURE_FLAG (1 << LE_ZERO_FEATURE_ENUM) +#define LE_SWSH_FEATURE_FLAG (1 << LE_SWSH_FEATURE_ENUM) +#define LE_CSWH_FEATURE_FLAG (1 << LE_CSWH_FEATURE_ENUM) +#define LE_SALT_FEATURE_FLAG (1 << LE_SALT_FEATURE_ENUM) +#define LE_NALT_FEATURE_FLAG (1 << LE_NALT_FEATURE_ENUM) +#define LE_RUBY_FEATURE_FLAG (1 << LE_RUBY_FEATURE_ENUM) +#define LE_SS01_FEATURE_FLAG (1 << LE_SS01_FEATURE_ENUM) +#define LE_SS02_FEATURE_FLAG (1 << LE_SS02_FEATURE_ENUM) +#define LE_SS03_FEATURE_FLAG (1 << LE_SS03_FEATURE_ENUM) +#define LE_SS04_FEATURE_FLAG (1 << LE_SS04_FEATURE_ENUM) +#define LE_SS05_FEATURE_FLAG (1 << LE_SS05_FEATURE_ENUM) +#define LE_SS06_FEATURE_FLAG (1 << LE_SS06_FEATURE_ENUM) +#define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM) + +#define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM) + /** * Error codes returned by the LayoutEngine. * @@ -611,7 +720,7 @@ enum LEErrorCode { }; #endif -#ifndef XP_CPLUSPLUS +#ifndef __cplusplus /** * Error codes returned by the LayoutEngine. * @@ -638,7 +747,4 @@ typedef enum LEErrorCode LEErrorCode; #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) #endif -U_NAMESPACE_END -#endif - - +#endif /* __LETYPES_H */ diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp index 90aafde2a80..689b85cd2e7 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp @@ -33,6 +33,7 @@ #include "LETypes.h" #include "LEScripts.h" #include "LELanguages.h" +#include "LESwaps.h" #include "LayoutEngine.h" #include "ArabicLayoutEngine.h" @@ -44,6 +45,8 @@ #include "ThaiLayoutEngine.h" #include "TibetanLayoutEngine.h" #include "GXLayoutEngine.h" +#include "GXLayoutEngine2.h" + #include "ScriptAndLanguageTags.h" #include "CharSubstitutionFilter.h" @@ -63,6 +66,10 @@ U_NAMESPACE_BEGIN /* Leave this copyright notice here! It needs to go somewhere in this library. */ static const char copyright[] = U_COPYRIGHT_STRING; +/* TODO: remove these? */ +const le_int32 LayoutEngine::kTypoFlagKern = LE_Kerning_FEATURE_FLAG; +const le_int32 LayoutEngine::kTypoFlagLiga = LE_Ligatures_FEATURE_FLAG; + const LEUnicode32 DefaultCharMapper::controlChars[] = { 0x0009, 0x000A, 0x000D, /*0x200C, 0x200D,*/ 0x200E, 0x200F, @@ -251,7 +258,7 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off return 0; } - if ((fTypoFlags & 0x4) == 0) { // no canonical processing + if ((fTypoFlags & LE_NoCanon_FEATURE_FLAG) == 0) { // no canonical processing return count; } @@ -572,6 +579,7 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan { static const le_uint32 gsubTableTag = LE_GSUB_TABLE_TAG; static const le_uint32 mortTableTag = LE_MORT_TABLE_TAG; + static const le_uint32 morxTableTag = LE_MORX_TABLE_TAG; if (LE_FAILURE(success)) { return NULL; @@ -608,6 +616,11 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan result = new ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success); break; + case hebrScriptCode: + // Disable hebrew ligatures since they have only archaic uses, see ticket #8318 + result = new OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags & ~kTypoFlagLiga, gsubTable, success); + break; + case hangScriptCode: result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success); break; @@ -646,26 +659,29 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan break; } } else { - const MorphTableHeader *morphTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag); - - if (morphTable != NULL) { - result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, morphTable, success); + MorphTableHeader2 *morxTable = (MorphTableHeader2 *)fontInstance->getFontTable(morxTableTag); + if (morxTable != NULL) { + result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success); } else { - switch (scriptCode) { - case bengScriptCode: - case devaScriptCode: - case gujrScriptCode: - case kndaScriptCode: - case mlymScriptCode: - case oryaScriptCode: - case guruScriptCode: - case tamlScriptCode: - case teluScriptCode: - case sinhScriptCode: - { - result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); - break; - } + const MorphTableHeader *mortTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag); + if (mortTable != NULL) { // mort + result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, mortTable, success); + } else { + switch (scriptCode) { + case bengScriptCode: + case devaScriptCode: + case gujrScriptCode: + case kndaScriptCode: + case mlymScriptCode: + case oryaScriptCode: + case guruScriptCode: + case tamlScriptCode: + case teluScriptCode: + case sinhScriptCode: + { + result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); + break; + } case arabScriptCode: //case hebrScriptCode: @@ -683,9 +699,10 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan result = new HangulOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); break; - default: - result = new LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); - break; + default: + result = new LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success); + break; + } } } } diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.h b/jdk/src/share/native/sun/font/layout/LayoutEngine.h index 4334ce355d4..9293167dba6 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.h @@ -26,7 +26,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -90,6 +90,14 @@ class LEGlyphStorage; * @stable ICU 2.8 */ class U_LAYOUT_API LayoutEngine : public UObject { +public: +#ifndef U_HIDE_INTERNAL_API + /** @internal Flag to request kerning. Use LE_Kerning_FEATURE_FLAG instead. */ + static const le_int32 kTypoFlagKern; + /** @internal Flag to request ligatures. Use LE_Ligatures_FEATURE_FLAG instead. */ + static const le_int32 kTypoFlagLiga; +#endif /* U_HIDE_INTERNAL_API */ + protected: /** * The object which holds the glyph storage @@ -140,6 +148,7 @@ protected: */ le_bool fFilterZeroWidth; +#ifndef U_HIDE_INTERNAL_API /** * This constructs an instance for a given font, script and language. Subclass constructors * must call this constructor. @@ -161,7 +170,10 @@ protected: le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success); +#endif /* U_HIDE_INTERNAL_API */ + // Do not enclose the protected default constructor with #ifndef U_HIDE_INTERNAL_API + // or else the compiler will create a public default constructor. /** * This overrides the default no argument constructor to make it * difficult for clients to call it. Clients are expected to call @@ -302,6 +314,7 @@ protected: */ virtual void mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, LEGlyphStorage &glyphStorage, LEErrorCode &success); +#ifndef U_HIDE_INTERNAL_API /** * This is a convenience method that forces the advance width of mark * glyphs to be zero, which is required for proper selection and highlighting. @@ -336,7 +349,7 @@ protected: * @internal */ static void adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, le_bool reverse, LEGlyphStorage &glyphStorage, LEGlyphFilter *markFilter, LEErrorCode &success); - +#endif /* U_HIDE_INTERNAL_API */ public: /** diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp new file mode 100644 index 00000000000..c26442da723 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp @@ -0,0 +1,141 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp and Others. 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "StateTables.h" +#include "MorphStateTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "LigatureSubstProc2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +#define ExtendedComplement(m) ((le_int32) (~((le_uint32) (m)))) +#define SignBit(m) ((ExtendedComplement(m) >> 1) & (le_int32)(m)) +#define SignExtend(v,m) (((v) & SignBit(m))? ((v) | ExtendedComplement(m)): (v)) + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor2) + +LigatureSubstitutionProcessor2::LigatureSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : StateTableProcessor2(morphSubtableHeader) +{ + ligatureSubstitutionHeader = (const LigatureSubstitutionHeader2 *) morphSubtableHeader; + ligActionOffset = SWAPL(ligatureSubstitutionHeader->ligActionOffset); + componentOffset = SWAPL(ligatureSubstitutionHeader->componentOffset); + ligatureOffset = SWAPL(ligatureSubstitutionHeader->ligatureOffset); + + entryTable = (const LigatureSubstitutionStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); +} + +LigatureSubstitutionProcessor2::~LigatureSubstitutionProcessor2() +{ +} + +void LigatureSubstitutionProcessor2::beginStateTable() +{ + m = -1; +} + +le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +{ + const LigatureSubstitutionStateEntry2 *entry = &entryTable[index]; + le_uint16 nextStateIndex = SWAPW(entry->nextStateIndex); + le_uint16 flags = SWAPW(entry->entryFlags); + le_uint16 ligActionIndex = SWAPW(entry->ligActionIndex); + + if (flags & lsfSetComponent) { + if (++m >= nComponents) { + m = 0; + } + componentStack[m] = currGlyph; + } + + ByteOffset actionOffset = flags & lsfPerformAction; + + if (actionOffset != 0) { + const LigatureActionEntry *ap = (const LigatureActionEntry *) ((char *) &ligatureSubstitutionHeader->stHeader + ligActionOffset) + ligActionIndex; + const TTGlyphID *ligatureTable = (const TTGlyphID *) ((char *) &ligatureSubstitutionHeader->stHeader + ligatureOffset); + LigatureActionEntry action; + le_int32 offset, i = 0; + le_int32 stack[nComponents]; + le_int16 mm = -1; + + const le_uint16 *componentTable = (const le_uint16 *)((char *) &ligatureSubstitutionHeader->stHeader + componentOffset); + + do { + le_uint32 componentGlyph = componentStack[m--]; // pop off + + action = SWAPL(*ap++); + + if (m < 0) { + m = nComponents - 1; + } + + offset = action & lafComponentOffsetMask; + if (offset != 0) { + + i += SWAPW(componentTable[LE_GET_GLYPH(glyphStorage[componentGlyph]) + (SignExtend(offset, lafComponentOffsetMask))]); + + if (action & (lafLast | lafStore)) { + TTGlyphID ligatureGlyph = SWAPW(ligatureTable[i]); + glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); + stack[++mm] = componentGlyph; + i = 0; + } else { + glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); + } + } + } while (!(action & lafLast)); + + while (mm >= 0) { + if (++m >= nComponents) { + m = 0; + } + + componentStack[m] = stack[mm--]; + } + } + + if (!(flags & lsfDontAdvance)) { + currGlyph += dir; + } + + return nextStateIndex; +} + +void LigatureSubstitutionProcessor2::endStateTable() +{ +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h new file mode 100644 index 00000000000..81ab8b56e8a --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h @@ -0,0 +1,96 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __LIGATURESUBSTITUTIONPROCESSOR2_H +#define __LIGATURESUBSTITUTIONPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "LigatureSubstitution.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +#define nComponents 16 + +class LigatureSubstitutionProcessor2 : public StateTableProcessor2 +{ +public: + virtual void beginStateTable(); + + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + + virtual void endStateTable(); + + LigatureSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + virtual ~LigatureSubstitutionProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + LigatureSubstitutionProcessor2(); + +protected: + le_uint32 ligActionOffset; + le_uint32 componentOffset; + le_uint32 ligatureOffset; + + const LigatureSubstitutionStateEntry2 *entryTable; + + le_int32 componentStack[nComponents]; + le_int16 m; + + const LigatureSubstitutionHeader2 *ligatureSubstitutionHeader; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstitution.h b/jdk/src/share/native/sun/font/layout/LigatureSubstitution.h index e58a739d264..b45d56e8c78 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstitution.h +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstitution.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -52,17 +52,32 @@ struct LigatureSubstitutionHeader : MorphStateTableHeader ByteOffset ligatureTableOffset; }; +struct LigatureSubstitutionHeader2 : MorphStateTableHeader2 +{ + le_uint32 ligActionOffset; + le_uint32 componentOffset; + le_uint32 ligatureOffset; +}; + enum LigatureSubstitutionFlags { lsfSetComponent = 0x8000, lsfDontAdvance = 0x4000, - lsfActionOffsetMask = 0x3FFF + lsfActionOffsetMask = 0x3FFF, // N/A in morx + lsfPerformAction = 0x2000 }; struct LigatureSubstitutionStateEntry : StateEntry { }; +struct LigatureSubstitutionStateEntry2 +{ + le_uint16 nextStateIndex; + le_uint16 entryFlags; + le_uint16 ligActionIndex; +}; + typedef le_uint32 LigatureActionEntry; enum LigatureActionFlags diff --git a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp index 88e9f25ddeb..6e74130989b 100644 --- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -95,10 +95,9 @@ le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdj if (selectMask != 0) { const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup); - - if (!lookupTable) + if (!lookupTable) { continue; - + } le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags); glyphIterator.reset(lookupFlags, selectMask); @@ -143,9 +142,9 @@ le_int32 LookupProcessor::selectLookups(const FeatureTable *featureTable, Featur for (le_uint16 lookup = 0; lookup < lookupCount; lookup += 1) { le_uint16 lookupListIndex = SWAPW(featureTable->lookupListIndexArray[lookup]); - - if (lookupListIndex >= lookupSelectCount) + if (lookupListIndex >= lookupSelectCount) { continue; + } lookupSelectArray[lookupListIndex] |= featureMask; lookupOrderArray[store++] = lookupListIndex; @@ -224,13 +223,17 @@ LookupProcessor::LookupProcessor(const char *baseAddress, le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]); featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag); - - if (!featureTable) - continue; - + if (!featureTable) { + continue; + } featureReferences += SWAPW(featureTable->lookupCount); } + if (!featureTable) { + success = LE_INTERNAL_ERROR; + return; + } + if (requiredFeatureIndex != 0xFFFF) { requiredFeatureTable = featureListTable->getFeatureTable(requiredFeatureIndex, &requiredFeatureTag); featureReferences += SWAPW(featureTable->lookupCount); diff --git a/jdk/src/share/native/sun/font/layout/MPreFixups.cpp b/jdk/src/share/native/sun/font/layout/MPreFixups.cpp index 254b3b01ace..add1613dc85 100644 --- a/jdk/src/share/native/sun/font/layout/MPreFixups.cpp +++ b/jdk/src/share/native/sun/font/layout/MPreFixups.cpp @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 2002-2008 - All Rights Reserved + * (C) Copyright IBM Corp. 2002-2013 - All Rights Reserved * */ @@ -65,9 +65,9 @@ void MPreFixups::add(le_int32 baseIndex, le_int32 mpreIndex) } } -void MPreFixups::apply(LEGlyphStorage &glyphStorage, LEErrorCode& leSuccess) +void MPreFixups::apply(LEGlyphStorage &glyphStorage, LEErrorCode& success) { - if (LE_FAILURE(leSuccess)) { + if (LE_FAILURE(success)) { return; } diff --git a/jdk/src/share/native/sun/font/layout/MorphStateTables.h b/jdk/src/share/native/sun/font/layout/MorphStateTables.h index 11644ca5f65..e3c9c72b038 100644 --- a/jdk/src/share/native/sun/font/layout/MorphStateTables.h +++ b/jdk/src/share/native/sun/font/layout/MorphStateTables.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -49,5 +49,10 @@ struct MorphStateTableHeader : MorphSubtableHeader StateTableHeader stHeader; }; +struct MorphStateTableHeader2 : MorphSubtableHeader2 +{ + StateTableHeader2 stHeader; +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/MorphTables.h b/jdk/src/share/native/sun/font/layout/MorphTables.h index c9bbf8750f4..f58c1985a64 100644 --- a/jdk/src/share/native/sun/font/layout/MorphTables.h +++ b/jdk/src/share/native/sun/font/layout/MorphTables.h @@ -76,6 +76,7 @@ struct MorphTableHeader }; typedef le_int16 SubtableCoverage; +typedef le_uint32 SubtableCoverage2; enum SubtableCoverageFlags { @@ -105,6 +106,302 @@ struct MorphSubtableHeader void process(LEGlyphStorage &glyphStorage) const; }; +enum SubtableCoverageFlags2 +{ + scfVertical2 = 0x80000000, + scfReverse2 = 0x40000000, + scfIgnoreVt2 = 0x20000000, + scfReserved2 = 0x1FFFFF00, + scfTypeMask2 = 0x000000FF +}; + +struct MorphSubtableHeader2 +{ + le_uint32 length; + SubtableCoverage2 coverage; + FeatureFlags subtableFeatures; + + void process(LEGlyphStorage &glyphStorage) const; +}; + +struct ChainHeader2 +{ + FeatureFlags defaultFlags; + le_uint32 chainLength; + le_uint32 nFeatureEntries; + le_uint32 nSubtables; + FeatureTableEntry featureTable[ANY_NUMBER]; +}; + +struct MorphTableHeader2 +{ + le_int32 version; + le_uint32 nChains; + ChainHeader2 chains[ANY_NUMBER]; + + void process(LEGlyphStorage &glyphStorage, le_int32 typoFlags) const; +}; + +/* + * AAT Font Features + * source: https://developer.apple.com/fonts/registry/ + * (plus addition from ATS/SFNTLayoutTypes.h) + */ + +enum { + + allTypographicFeaturesType = 0, + + allTypeFeaturesOnSelector = 0, + allTypeFeaturesOffSelector = 1, + + ligaturesType = 1, + + requiredLigaturesOnSelector = 0, + requiredLigaturesOffSelector = 1, + commonLigaturesOnSelector = 2, + commonLigaturesOffSelector = 3, + rareLigaturesOnSelector = 4, + rareLigaturesOffSelector = 5, + logosOnSelector = 6, + logosOffSelector = 7, + rebusPicturesOnSelector = 8, + rebusPicturesOffSelector = 9, + diphthongLigaturesOnSelector = 10, + diphthongLigaturesOffSelector = 11, + squaredLigaturesOnSelector = 12, + squaredLigaturesOffSelector = 13, + abbrevSquaredLigaturesOnSelector = 14, + abbrevSquaredLigaturesOffSelector = 15, + symbolLigaturesOnSelector = 16, + symbolLigaturesOffSelector = 17, + contextualLigaturesOnSelector = 18, + contextualLigaturesOffSelector = 19, + historicalLigaturesOnSelector = 20, + historicalLigaturesOffSelector = 21, + + cursiveConnectionType = 2, + + unconnectedSelector = 0, + partiallyConnectedSelector = 1, + cursiveSelector = 2, + + letterCaseType = 3, + + upperAndLowerCaseSelector = 0, + allCapsSelector = 1, + allLowerCaseSelector = 2, + smallCapsSelector = 3, + initialCapsSelector = 4, + initialCapsAndSmallCapsSelector = 5, + + verticalSubstitutionType = 4, + + substituteVerticalFormsOnSelector = 0, + substituteVerticalFormsOffSelector = 1, + + linguisticRearrangementType = 5, + + linguisticRearrangementOnSelector = 0, + linguisticRearrangementOffSelector = 1, + + numberSpacingType = 6, + + monospacedNumbersSelector = 0, + proportionalNumbersSelector = 1, + + /* + appleReserved1Type = 7, + */ + + smartSwashType = 8, + + wordInitialSwashesOnSelector = 0, + wordInitialSwashesOffSelector = 1, + wordFinalSwashesOnSelector = 2, + wordFinalSwashesOffSelector = 3, + lineInitialSwashesOnSelector = 4, + lineInitialSwashesOffSelector = 5, + lineFinalSwashesOnSelector = 6, + lineFinalSwashesOffSelector = 7, + nonFinalSwashesOnSelector = 8, + nonFinalSwashesOffSelector = 9, + + diacriticsType = 9, + + showDiacriticsSelector = 0, + hideDiacriticsSelector = 1, + decomposeDiacriticsSelector = 2, + + verticalPositionType = 10, + + normalPositionSelector = 0, + superiorsSelector = 1, + inferiorsSelector = 2, + ordinalsSelector = 3, + + fractionsType = 11, + + noFractionsSelector = 0, + verticalFractionsSelector = 1, + diagonalFractionsSelector = 2, + + /* + appleReserved2Type = 12, + */ + + overlappingCharactersType = 13, + + preventOverlapOnSelector = 0, + preventOverlapOffSelector = 1, + + typographicExtrasType = 14, + + hyphensToEmDashOnSelector = 0, + hyphensToEmDashOffSelector = 1, + hyphenToEnDashOnSelector = 2, + hyphenToEnDashOffSelector = 3, + unslashedZeroOnSelector = 4, + slashedZeroOffSelector = 4, + unslashedZeroOffSelector = 5, + slashedZeroOnSelector = 5, + formInterrobangOnSelector = 6, + formInterrobangOffSelector = 7, + smartQuotesOnSelector = 8, + smartQuotesOffSelector = 9, + periodsToEllipsisOnSelector = 10, + periodsToEllipsisOffSelector = 11, + + mathematicalExtrasType = 15, + + hyphenToMinusOnSelector = 0, + hyphenToMinusOffSelector = 1, + asteriskToMultiplyOnSelector = 2, + asteriskToMultiplyOffSelector = 3, + slashToDivideOnSelector = 4, + slashToDivideOffSelector = 5, + inequalityLigaturesOnSelector = 6, + inequalityLigaturesOffSelector = 7, + exponentsOnSelector = 8, + exponentsOffSelector = 9, + + ornamentSetsType = 16, + + noOrnamentsSelector = 0, + dingbatsSelector = 1, + piCharactersSelector = 2, + fleuronsSelector = 3, + decorativeBordersSelector = 4, + internationalSymbolsSelector = 5, + mathSymbolsSelector = 6, + + characterAlternativesType = 17, + + noAlternatesSelector = 0, + + designComplexityType = 18, + + designLevel1Selector = 0, + designLevel2Selector = 1, + designLevel3Selector = 2, + designLevel4Selector = 3, + designLevel5Selector = 4, + designLevel6Selector = 5, + designLevel7Selector = 6, + + styleOptionsType = 19, + + noStyleOptionsSelector = 0, + displayTextSelector = 1, + engravedTextSelector = 2, + illuminatedCapsSelector = 3, + titlingCapsSelector = 4, + tallCapsSelector = 5, + + characterShapeType = 20, + + traditionalCharactersSelector = 0, + simplifiedCharactersSelector = 1, + jis1978CharactersSelector = 2, + jis1983CharactersSelector = 3, + jis1990CharactersSelector = 4, + traditionalAltOneSelector = 5, + traditionalAltTwoSelector = 6, + traditionalAltThreeSelector = 7, + traditionalAltFourSelector = 8, + traditionalAltFiveSelector = 9, + expertCharactersSelector = 10, + + numberCaseType = 21, + + lowerCaseNumbersSelector = 0, + upperCaseNumbersSelector = 1, + + textSpacingType = 22, + + proportionalTextSelector = 0, + monospacedTextSelector = 1, + halfWidthTextSelector = 2, + normallySpacedTextSelector = 3, + + transliterationType = 23, + + noTransliterationSelector = 0, + hanjaToHangulSelector = 1, + hiraganaToKatakanaSelector = 2, + katakanaToHiraganaSelector = 3, + kanaToRomanizationSelector = 4, + romanizationToHiraganaSelector = 5, + romanizationToKatakanaSelector = 6, + hanjaToHangulAltOneSelector = 7, + hanjaToHangulAltTwoSelector = 8, + hanjaToHangulAltThreeSelector = 9, + + annotationType = 24, + + noAnnotationSelector = 0, + boxAnnotationSelector = 1, + roundedBoxAnnotationSelector = 2, + circleAnnotationSelector = 3, + invertedCircleAnnotationSelector = 4, + parenthesisAnnotationSelector = 5, + periodAnnotationSelector = 6, + romanNumeralAnnotationSelector = 7, + diamondAnnotationSelector = 8, + + kanaSpacingType = 25, + + fullWidthKanaSelector = 0, + proportionalKanaSelector = 1, + + ideographicSpacingType = 26, + + fullWidthIdeographsSelector = 0, + proportionalIdeographsSelector = 1, + + cjkRomanSpacingType = 103, + + halfWidthCJKRomanSelector = 0, + proportionalCJKRomanSelector = 1, + defaultCJKRomanSelector = 2, + fullWidthCJKRomanSelector = 3, + + rubyKanaType = 28, + + rubyKanaOnSelector = 2, + rubyKanaOffSelector = 3, + +/* The following types are provided for compatibility; note that + their use is deprecated. */ + + adobeCharacterSpacingType = 100, /* prefer 22 */ + adobeKanaSpacingType = 101, /* prefer 25 */ + adobeKanjiSpacingType = 102, /* prefer 26 */ + adobeSquareLigatures = 104, /* prefer 1 */ + + lastFeatureType = -1 +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/MorphTables2.cpp b/jdk/src/share/native/sun/font/layout/MorphTables2.cpp new file mode 100644 index 00000000000..c9951a5f411 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/MorphTables2.cpp @@ -0,0 +1,229 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * (C) Copyright IBM Corp. and others 1998 - 2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "LayoutTables.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "IndicRearrangementProcessor2.h" +#include "ContextualGlyphSubstProc2.h" +#include "LigatureSubstProc2.h" +#include "NonContextualGlyphSubstProc2.h" +#include "ContextualGlyphInsertionProc2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +void MorphTableHeader2::process(LEGlyphStorage &glyphStorage, le_int32 typoFlags) const +{ + const ChainHeader2 *chainHeader = chains; + le_uint32 chainCount = SWAPL(this->nChains); + le_uint32 chain; + + for (chain = 0; chain < chainCount; chain++) { + FeatureFlags flag = SWAPL(chainHeader->defaultFlags); + le_uint32 chainLength = SWAPL(chainHeader->chainLength); + le_uint32 nFeatureEntries = SWAPL(chainHeader->nFeatureEntries); + le_uint32 nSubtables = SWAPL(chainHeader->nSubtables); + const MorphSubtableHeader2 *subtableHeader = + (const MorphSubtableHeader2 *)&chainHeader->featureTable[nFeatureEntries]; + le_uint32 subtable; + + if (typoFlags != 0) { + le_uint32 featureEntry; + + // Feature subtables + for (featureEntry = 0; featureEntry < nFeatureEntries; featureEntry++) { + FeatureTableEntry featureTableEntry = chains->featureTable[featureEntry]; + le_int16 featureType = SWAPW(featureTableEntry.featureType); + le_int16 featureSetting = SWAPW(featureTableEntry.featureSetting); + le_uint32 enableFlags = SWAPL(featureTableEntry.enableFlags); + le_uint32 disableFlags = SWAPL(featureTableEntry.disableFlags); + switch (featureType) { + case ligaturesType: + if ((typoFlags & LE_Ligatures_FEATURE_ENUM ) && (featureSetting ^ 0x1)){ + flag &= disableFlags; + flag |= enableFlags; + } else { + if (((typoFlags & LE_RLIG_FEATURE_FLAG) && featureSetting == requiredLigaturesOnSelector) || + ((typoFlags & LE_CLIG_FEATURE_FLAG) && featureSetting == contextualLigaturesOnSelector) || + ((typoFlags & LE_HLIG_FEATURE_FLAG) && featureSetting == historicalLigaturesOnSelector) || + ((typoFlags & LE_LIGA_FEATURE_FLAG) && featureSetting == commonLigaturesOnSelector)) { + flag &= disableFlags; + flag |= enableFlags; + } + } + break; + case letterCaseType: + if ((typoFlags & LE_SMCP_FEATURE_FLAG) && featureSetting == smallCapsSelector) { + flag &= disableFlags; + flag |= enableFlags; + } + break; + case verticalSubstitutionType: + break; + case linguisticRearrangementType: + break; + case numberSpacingType: + break; + case smartSwashType: + if ((typoFlags & LE_SWSH_FEATURE_FLAG) && (featureSetting ^ 0x1)){ + flag &= disableFlags; + flag |= enableFlags; + } + break; + case diacriticsType: + break; + case verticalPositionType: + break; + case fractionsType: + if (((typoFlags & LE_FRAC_FEATURE_FLAG) && featureSetting == diagonalFractionsSelector) || + ((typoFlags & LE_AFRC_FEATURE_FLAG) && featureSetting == verticalFractionsSelector)) { + flag &= disableFlags; + flag |= enableFlags; + } else { + flag &= disableFlags; + } + break; + case typographicExtrasType: + if ((typoFlags & LE_ZERO_FEATURE_FLAG) && featureSetting == slashedZeroOnSelector) { + flag &= disableFlags; + flag |= enableFlags; + } + break; + case mathematicalExtrasType: + break; + case ornamentSetsType: + break; + case characterAlternativesType: + break; + case designComplexityType: + if (((typoFlags & LE_SS01_FEATURE_FLAG) && featureSetting == designLevel1Selector) || + ((typoFlags & LE_SS02_FEATURE_FLAG) && featureSetting == designLevel2Selector) || + ((typoFlags & LE_SS03_FEATURE_FLAG) && featureSetting == designLevel3Selector) || + ((typoFlags & LE_SS04_FEATURE_FLAG) && featureSetting == designLevel4Selector) || + ((typoFlags & LE_SS05_FEATURE_FLAG) && featureSetting == designLevel5Selector) || + ((typoFlags & LE_SS06_FEATURE_FLAG) && featureSetting == designLevel6Selector) || + ((typoFlags & LE_SS07_FEATURE_FLAG) && featureSetting == designLevel7Selector)) { + + flag &= disableFlags; + flag |= enableFlags; + } + break; + case styleOptionsType: + break; + case characterShapeType: + break; + case numberCaseType: + break; + case textSpacingType: + break; + case transliterationType: + break; + case annotationType: + if ((typoFlags & LE_NALT_FEATURE_FLAG) && featureSetting == circleAnnotationSelector) { + flag &= disableFlags; + flag |= enableFlags; + } + break; + case kanaSpacingType: + break; + case ideographicSpacingType: + break; + case rubyKanaType: + if ((typoFlags & LE_RUBY_FEATURE_FLAG) && featureSetting == rubyKanaOnSelector) { + flag &= disableFlags; + flag |= enableFlags; + } + break; + case cjkRomanSpacingType: + break; + default: + break; + } + } + } + + for (subtable = 0; subtable < nSubtables; subtable++) { + le_uint32 length = SWAPL(subtableHeader->length); + le_uint32 coverage = SWAPL(subtableHeader->coverage); + FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures); + // should check coverage more carefully... + if (((coverage & scfIgnoreVt2) || !(coverage & scfVertical2)) && (subtableFeatures & flag) != 0) { + subtableHeader->process(glyphStorage); + } + subtableHeader = (const MorphSubtableHeader2 *) ((char *)subtableHeader + length); + } + chainHeader = (const ChainHeader2 *)((char *)chainHeader + chainLength); + } +} + +void MorphSubtableHeader2::process(LEGlyphStorage &glyphStorage) const +{ + SubtableProcessor2 *processor = NULL; + + switch (SWAPL(coverage) & scfTypeMask2) + { + case mstIndicRearrangement: + processor = new IndicRearrangementProcessor2(this); + break; + + case mstContextualGlyphSubstitution: + processor = new ContextualGlyphSubstitutionProcessor2(this); + break; + + case mstLigatureSubstitution: + processor = new LigatureSubstitutionProcessor2(this); + break; + + case mstReservedUnused: + break; + + case mstNonContextualGlyphSubstitution: + processor = NonContextualGlyphSubstitutionProcessor2::createInstance(this); + break; + + + case mstContextualGlyphInsertion: + processor = new ContextualGlyphInsertionProcessor2(this); + break; + + default: + break; + } + + if (processor != NULL) { + processor->process(glyphStorage); + delete processor; + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubst.h b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubst.h index 3c30dd84d90..47428b45d0a 100644 --- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubst.h +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubst.h @@ -26,7 +26,7 @@ /* * * - * (C) Copyright IBM Corp. 1998-2003 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -50,6 +50,11 @@ struct NonContextualGlyphSubstitutionHeader : MorphSubtableHeader LookupTable table; }; +struct NonContextualGlyphSubstitutionHeader2 : MorphSubtableHeader2 +{ + LookupTable table; +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp new file mode 100644 index 00000000000..8c304912400 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp @@ -0,0 +1,85 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" +#include "SimpleArrayProcessor2.h" +#include "SegmentSingleProcessor2.h" +#include "SegmentArrayProcessor2.h" +#include "SingleTableProcessor2.h" +#include "TrimmedArrayProcessor2.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2() +{ +} + +NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : SubtableProcessor2(morphSubtableHeader) +{ +} + +NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcessor2() +{ +} + +SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(const MorphSubtableHeader2 *morphSubtableHeader) +{ + const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + + switch (SWAPW(header->table.format)) + { + case ltfSimpleArray: + return new SimpleArrayProcessor2(morphSubtableHeader); + + case ltfSegmentSingle: + return new SegmentSingleProcessor2(morphSubtableHeader); + + case ltfSegmentArray: + return new SegmentArrayProcessor2(morphSubtableHeader); + + case ltfSingleTable: + return new SingleTableProcessor2(morphSubtableHeader); + + case ltfTrimmedArray: + return new TrimmedArrayProcessor2(morphSubtableHeader); + + default: + return NULL; + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h new file mode 100644 index 00000000000..6354bc92069 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h @@ -0,0 +1,68 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H +#define __NONCONTEXTUALGLYPHSUBSTITUTIONPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class NonContextualGlyphSubstitutionProcessor2 : public SubtableProcessor2 +{ +public: + virtual void process(LEGlyphStorage &glyphStorage) = 0; + + static SubtableProcessor2 *createInstance(const MorphSubtableHeader2 *morphSubtableHeader); + +protected: + NonContextualGlyphSubstitutionProcessor2(); + NonContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + virtual ~NonContextualGlyphSubstitutionProcessor2(); + +private: + NonContextualGlyphSubstitutionProcessor2(const NonContextualGlyphSubstitutionProcessor2 &other); // forbid copying of this class + NonContextualGlyphSubstitutionProcessor2 &operator=(const NonContextualGlyphSubstitutionProcessor2 &other); // forbid copying of this class +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp index 45eaadf4b7a..375327b55da 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp @@ -26,7 +26,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -64,11 +64,27 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OpenTypeLayoutEngine) #define loclFeatureTag LE_LOCL_FEATURE_TAG #define caltFeatureTag LE_CALT_FEATURE_TAG -// 'dlig' not used at the moment -#define dligFeatureTag 0x646C6967 +#define dligFeatureTag LE_DLIG_FEATURE_TAG +#define rligFeatureTag LE_RLIG_FEATURE_TAG +#define paltFeatureTag LE_PALT_FEATURE_TAG -// 'palt' -#define paltFeatureTag 0x70616C74 +#define hligFeatureTag LE_HLIG_FEATURE_TAG +#define smcpFeatureTag LE_SMCP_FEATURE_TAG +#define fracFeatureTag LE_FRAC_FEATURE_TAG +#define afrcFeatureTag LE_AFRC_FEATURE_TAG +#define zeroFeatureTag LE_ZERO_FEATURE_TAG +#define swshFeatureTag LE_SWSH_FEATURE_TAG +#define cswhFeatureTag LE_CSWH_FEATURE_TAG +#define saltFeatureTag LE_SALT_FEATURE_TAG +#define naltFeatureTag LE_NALT_FEATURE_TAG +#define rubyFeatureTag LE_RUBY_FEATURE_TAG +#define ss01FeatureTag LE_SS01_FEATURE_TAG +#define ss02FeatureTag LE_SS02_FEATURE_TAG +#define ss03FeatureTag LE_SS03_FEATURE_TAG +#define ss04FeatureTag LE_SS04_FEATURE_TAG +#define ss05FeatureTag LE_SS05_FEATURE_TAG +#define ss06FeatureTag LE_SS06_FEATURE_TAG +#define ss07FeatureTag LE_SS07_FEATURE_TAG #define ccmpFeatureMask 0x80000000UL #define ligaFeatureMask 0x40000000UL @@ -80,10 +96,27 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OpenTypeLayoutEngine) #define loclFeatureMask 0x01000000UL #define caltFeatureMask 0x00800000UL +#define dligFeatureMask 0x00400000UL +#define rligFeatureMask 0x00200000UL +#define hligFeatureMask 0x00100000UL +#define smcpFeatureMask 0x00080000UL +#define fracFeatureMask 0x00040000UL +#define afrcFeatureMask 0x00020000UL +#define zeroFeatureMask 0x00010000UL +#define swshFeatureMask 0x00008000UL +#define cswhFeatureMask 0x00004000UL +#define saltFeatureMask 0x00002000UL +#define naltFeatureMask 0x00001000UL +#define rubyFeatureMask 0x00000800UL +#define ss01FeatureMask 0x00000400UL +#define ss02FeatureMask 0x00000200UL +#define ss03FeatureMask 0x00000100UL +#define ss04FeatureMask 0x00000080UL +#define ss05FeatureMask 0x00000040UL +#define ss06FeatureMask 0x00000020UL +#define ss07FeatureMask 0x00000010UL + #define minimalFeatures (ccmpFeatureMask | markFeatureMask | mkmkFeatureMask | loclFeatureMask | caltFeatureMask) -#define ligaFeatures (ligaFeatureMask | cligFeatureMask | minimalFeatures) -#define kernFeatures (kernFeatureMask | paltFeatureMask | minimalFeatures) -#define kernAndLigaFeatures (ligaFeatures | kernFeatures) static const FeatureMap featureMap[] = { @@ -95,7 +128,24 @@ static const FeatureMap featureMap[] = {markFeatureTag, markFeatureMask}, {mkmkFeatureTag, mkmkFeatureMask}, {loclFeatureTag, loclFeatureMask}, - {caltFeatureTag, caltFeatureMask} + {caltFeatureTag, caltFeatureMask}, + {hligFeatureTag, hligFeatureMask}, + {smcpFeatureTag, smcpFeatureMask}, + {fracFeatureTag, fracFeatureMask}, + {afrcFeatureTag, afrcFeatureMask}, + {zeroFeatureTag, zeroFeatureMask}, + {swshFeatureTag, swshFeatureMask}, + {cswhFeatureTag, cswhFeatureMask}, + {saltFeatureTag, saltFeatureMask}, + {naltFeatureTag, naltFeatureMask}, + {rubyFeatureTag, rubyFeatureMask}, + {ss01FeatureTag, ss01FeatureMask}, + {ss02FeatureTag, ss02FeatureMask}, + {ss03FeatureTag, ss03FeatureMask}, + {ss04FeatureTag, ss04FeatureMask}, + {ss05FeatureTag, ss05FeatureMask}, + {ss06FeatureTag, ss06FeatureMask}, + {ss07FeatureTag, ss07FeatureMask} }; static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap); @@ -110,17 +160,65 @@ OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, l static const le_uint32 gposTableTag = LE_GPOS_TABLE_TAG; const GlyphPositioningTableHeader *gposTable = (const GlyphPositioningTableHeader *) getFontTable(gposTableTag); - // todo: switch to more flags and bitfield rather than list of feature tags? - switch (typoFlags & ~0x80000000L) { - case 0: break; // default - case 1: fFeatureMask = kernFeatures; break; - case 2: fFeatureMask = ligaFeatures; break; - case 3: fFeatureMask = kernAndLigaFeatures; break; - default: break; + switch (typoFlags & (LE_SS01_FEATURE_FLAG + | LE_SS02_FEATURE_FLAG + | LE_SS03_FEATURE_FLAG + | LE_SS04_FEATURE_FLAG + | LE_SS05_FEATURE_FLAG + | LE_SS06_FEATURE_FLAG + | LE_SS07_FEATURE_FLAG)) { + case LE_SS01_FEATURE_FLAG: + fFeatureMask |= ss01FeatureMask; + break; + case LE_SS02_FEATURE_FLAG: + fFeatureMask |= ss02FeatureMask; + break; + case LE_SS03_FEATURE_FLAG: + fFeatureMask |= ss03FeatureMask; + break; + case LE_SS04_FEATURE_FLAG: + fFeatureMask |= ss04FeatureMask; + break; + case LE_SS05_FEATURE_FLAG: + fFeatureMask |= ss05FeatureMask; + break; + case LE_SS06_FEATURE_FLAG: + fFeatureMask |= ss06FeatureMask; + break; + case LE_SS07_FEATURE_FLAG: + fFeatureMask |= ss07FeatureMask; + break; } - if (typoFlags & 0x80000000L) { - fSubstitutionFilter = new CharSubstitutionFilter(fontInstance); + if (typoFlags & LE_Kerning_FEATURE_FLAG) { + fFeatureMask |= (kernFeatureMask | paltFeatureMask); + // Convenience. + } + if (typoFlags & LE_Ligatures_FEATURE_FLAG) { + fFeatureMask |= (ligaFeatureMask | cligFeatureMask); + // Convenience TODO: should add: .. dligFeatureMask | rligFeatureMask ? + } + if (typoFlags & LE_CLIG_FEATURE_FLAG) fFeatureMask |= cligFeatureMask; + if (typoFlags & LE_DLIG_FEATURE_FLAG) fFeatureMask |= dligFeatureMask; + if (typoFlags & LE_HLIG_FEATURE_FLAG) fFeatureMask |= hligFeatureMask; + if (typoFlags & LE_LIGA_FEATURE_FLAG) fFeatureMask |= ligaFeatureMask; + if (typoFlags & LE_RLIG_FEATURE_FLAG) fFeatureMask |= rligFeatureMask; + if (typoFlags & LE_SMCP_FEATURE_FLAG) fFeatureMask |= smcpFeatureMask; + if (typoFlags & LE_FRAC_FEATURE_FLAG) fFeatureMask |= fracFeatureMask; + if (typoFlags & LE_AFRC_FEATURE_FLAG) fFeatureMask |= afrcFeatureMask; + if (typoFlags & LE_ZERO_FEATURE_FLAG) fFeatureMask |= zeroFeatureMask; + if (typoFlags & LE_SWSH_FEATURE_FLAG) fFeatureMask |= swshFeatureMask; + if (typoFlags & LE_CSWH_FEATURE_FLAG) fFeatureMask |= cswhFeatureMask; + if (typoFlags & LE_SALT_FEATURE_FLAG) fFeatureMask |= saltFeatureMask; + if (typoFlags & LE_RUBY_FEATURE_FLAG) fFeatureMask |= rubyFeatureMask; + if (typoFlags & LE_NALT_FEATURE_FLAG) { + // Mutually exclusive with ALL other features. http://www.microsoft.com/typography/otspec/features_ko.htm + fFeatureMask = naltFeatureMask; + } + + if (typoFlags & LE_CHAR_FILTER_FEATURE_FLAG) { + // This isn't a font feature, but requests a Char Substitution Filter + fSubstitutionFilter = new CharSubstitutionFilter(fontInstance); } setScriptAndLanguageTags(); @@ -325,7 +423,7 @@ le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 o { LEUnicode *outChars = NULL; LEGlyphStorage fakeGlyphStorage; - le_int32 outCharCount, outGlyphCount, fakeGlyphCount; + le_int32 outCharCount, outGlyphCount; if (LE_FAILURE(success)) { return 0; @@ -343,11 +441,13 @@ le_int32 OpenTypeLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 o } if (outChars != NULL) { - fakeGlyphCount = glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success); + // le_int32 fakeGlyphCount = + glyphProcessing(outChars, 0, outCharCount, outCharCount, rightToLeft, fakeGlyphStorage, success); LE_DELETE_ARRAY(outChars); // FIXME: a subclass may have allocated this, in which case this delete might not work... //adjustGlyphs(outChars, 0, outCharCount, rightToLeft, fakeGlyphs, fakeGlyphCount); } else { - fakeGlyphCount = glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success); + // le_int32 fakeGlyphCount = + glyphProcessing(chars, offset, count, max, rightToLeft, fakeGlyphStorage, success); //adjustGlyphs(chars, offset, count, rightToLeft, fakeGlyphs, fakeGlyphCount); } diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp index c7d46c631bc..3f89c46e4da 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.cpp @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010. All Rights Reserved. + * (C) Copyright IBM Corp. 1998-2013. All Rights Reserved. * * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS * YOU REALLY KNOW WHAT YOU'RE DOING. @@ -186,7 +186,18 @@ const LETag OpenTypeLayoutEngine::scriptTags[] = { nbatScriptTag, /* 'nbat' (NBAT) */ palmScriptTag, /* 'palm' (PALM) */ sindScriptTag, /* 'sind' (SIND) */ - waraScriptTag /* 'wara' (WARA) */ + waraScriptTag, /* 'wara' (WARA) */ + afakScriptTag, /* 'afak' (AFAK) */ + jurcScriptTag, /* 'jurc' (JURC) */ + mrooScriptTag, /* 'mroo' (MROO) */ + nshuScriptTag, /* 'nshu' (NSHU) */ + shrdScriptTag, /* 'shrd' (SHARADA) */ + soraScriptTag, /* 'sora' (SORA_SOMPENG) */ + takrScriptTag, /* 'takr' (TAKRI) */ + tangScriptTag, /* 'tang' (TANG) */ + woleScriptTag, /* 'wole' (WOLE) */ + khojScriptTag, /* 'khoj' (KHOJ) */ + tirhScriptTag /* 'tirh' (TIRH) */ }; const LETag OpenTypeLayoutEngine::languageTags[] = { diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h index 885b50c0da2..d70a3e49ee9 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguageTags.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2010. All Rights Reserved. + * (C) Copyright IBM Corp. 1998-2013. All Rights Reserved. * * WARNING: THIS FILE IS MACHINE GENERATED. DO NOT HAND EDIT IT UNLESS * YOU REALLY KNOW WHAT YOU'RE DOING. @@ -201,6 +201,17 @@ const LETag nbatScriptTag = 0x6E626174; /* 'nbat' (NBAT) */ const LETag palmScriptTag = 0x70616C6D; /* 'palm' (PALM) */ const LETag sindScriptTag = 0x73696E64; /* 'sind' (SIND) */ const LETag waraScriptTag = 0x77617261; /* 'wara' (WARA) */ +const LETag afakScriptTag = 0x6166616B; /* 'afak' (AFAK) */ +const LETag jurcScriptTag = 0x6A757263; /* 'jurc' (JURC) */ +const LETag mrooScriptTag = 0x6D726F6F; /* 'mroo' (MROO) */ +const LETag nshuScriptTag = 0x6E736875; /* 'nshu' (NSHU) */ +const LETag shrdScriptTag = 0x73687264; /* 'shrd' (SHARADA) */ +const LETag soraScriptTag = 0x736F7261; /* 'sora' (SORA_SOMPENG) */ +const LETag takrScriptTag = 0x74616B72; /* 'takr' (TAKRI) */ +const LETag tangScriptTag = 0x74616E67; /* 'tang' (TANG) */ +const LETag woleScriptTag = 0x776F6C65; /* 'wole' (WOLE) */ +const LETag khojScriptTag = 0x6B686F6A; /* 'khoj' (KHOJ) */ +const LETag tirhScriptTag = 0x74697268; /* 'tirh' (TIRH) */ const LETag nullScriptTag = 0x00000000; /* '' (NULL) */ diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp new file mode 100644 index 00000000000..e50fdf0604e --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp @@ -0,0 +1,85 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" +#include "SegmentArrayProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentArrayProcessor2) + +SegmentArrayProcessor2::SegmentArrayProcessor2() +{ +} + +SegmentArrayProcessor2::SegmentArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +{ + const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + + segmentArrayLookupTable = (const SegmentArrayLookupTable *) &header->table; +} + +SegmentArrayProcessor2::~SegmentArrayProcessor2() +{ +} + +void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage) +{ + const LookupSegment *segments = segmentArrayLookupTable->segments; + le_int32 glyphCount = glyphStorage.getGlyphCount(); + le_int32 glyph; + + for (glyph = 0; glyph < glyphCount; glyph += 1) { + LEGlyphID thisGlyph = glyphStorage[glyph]; + const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segments, thisGlyph); + + if (lookupSegment != NULL) { + TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph); + le_int16 offset = SWAPW(lookupSegment->value); + + if (offset != 0) { + TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader + offset); + TTGlyphID newGlyph = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]); + + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } + } + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h new file mode 100644 index 00000000000..71999b76a8a --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h @@ -0,0 +1,82 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __SEGMENTARRAYPROCESSOR_H +#define __SEGMENTARRAYPROCESSOR_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class SegmentArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2 +{ +public: + virtual void process(LEGlyphStorage &glyphStorage); + + SegmentArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + virtual ~SegmentArrayProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + SegmentArrayProcessor2(); + +protected: + const SegmentArrayLookupTable *segmentArrayLookupTable; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp new file mode 100644 index 00000000000..e571cce9b87 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp @@ -0,0 +1,79 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" +#include "SegmentSingleProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SegmentSingleProcessor2) + +SegmentSingleProcessor2::SegmentSingleProcessor2() +{ +} + +SegmentSingleProcessor2::SegmentSingleProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +{ + const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + + segmentSingleLookupTable = (const SegmentSingleLookupTable *) &header->table; +} + +SegmentSingleProcessor2::~SegmentSingleProcessor2() +{ +} + +void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage) +{ + const LookupSegment *segments = segmentSingleLookupTable->segments; + le_int32 glyphCount = glyphStorage.getGlyphCount(); + le_int32 glyph; + + for (glyph = 0; glyph < glyphCount; glyph += 1) { + LEGlyphID thisGlyph = glyphStorage[glyph]; + const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segments, thisGlyph); + + if (lookupSegment != NULL) { + TTGlyphID newGlyph = (TTGlyphID) LE_GET_GLYPH(thisGlyph) + SWAPW(lookupSegment->value); + + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h new file mode 100644 index 00000000000..00def985133 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h @@ -0,0 +1,82 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __SEGMENTSINGLEPROCESSOR_H +#define __SEGMENTSINGLEPROCESSOR_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class SegmentSingleProcessor2 : public NonContextualGlyphSubstitutionProcessor2 +{ +public: + virtual void process(LEGlyphStorage &glyphStorage); + + SegmentSingleProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + virtual ~SegmentSingleProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + SegmentSingleProcessor2(); + +protected: + const SegmentSingleLookupTable *segmentSingleLookupTable; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp new file mode 100644 index 00000000000..fa15b71215e --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp @@ -0,0 +1,76 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" +#include "SimpleArrayProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SimpleArrayProcessor2) + +SimpleArrayProcessor2::SimpleArrayProcessor2() +{ +} + +SimpleArrayProcessor2::SimpleArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +{ + const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + + simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table; +} + +SimpleArrayProcessor2::~SimpleArrayProcessor2() +{ +} + +void SimpleArrayProcessor2::process(LEGlyphStorage &glyphStorage) +{ + le_int32 glyphCount = glyphStorage.getGlyphCount(); + le_int32 glyph; + + for (glyph = 0; glyph < glyphCount; glyph += 1) { + LEGlyphID thisGlyph = glyphStorage[glyph]; + if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) { + TTGlyphID newGlyph = SWAPW(simpleArrayLookupTable->valueArray[LE_GET_GLYPH(thisGlyph)]); + + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h new file mode 100644 index 00000000000..94bbbad858c --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h @@ -0,0 +1,82 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __SIMPLEARRAYPROCESSOR2_H +#define __SIMPLEARRAYPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class SimpleArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2 +{ +public: + virtual void process(LEGlyphStorage &glyphStorage); + + SimpleArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + virtual ~SimpleArrayProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + SimpleArrayProcessor2(); + +protected: + const SimpleArrayLookupTable *simpleArrayLookupTable; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp new file mode 100644 index 00000000000..dc0b8fc53c4 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp @@ -0,0 +1,76 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" +#include "SingleTableProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(SingleTableProcessor2) + +SingleTableProcessor2::SingleTableProcessor2() +{ +} + +SingleTableProcessor2::SingleTableProcessor2(const MorphSubtableHeader2 *moprhSubtableHeader) + : NonContextualGlyphSubstitutionProcessor2(moprhSubtableHeader) +{ + const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) moprhSubtableHeader; + + singleTableLookupTable = (const SingleTableLookupTable *) &header->table; +} + +SingleTableProcessor2::~SingleTableProcessor2() +{ +} + +void SingleTableProcessor2::process(LEGlyphStorage &glyphStorage) +{ + const LookupSingle *entries = singleTableLookupTable->entries; + le_int32 glyph; + le_int32 glyphCount = glyphStorage.getGlyphCount(); + + for (glyph = 0; glyph < glyphCount; glyph += 1) { + const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(entries, glyphStorage[glyph]); + + if (lookupSingle != NULL) { + glyphStorage[glyph] = SWAPW(lookupSingle->value); + } + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h new file mode 100644 index 00000000000..e52d819a4b0 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h @@ -0,0 +1,82 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __SINGLETABLEPROCESSOR2_H +#define __SINGLETABLEPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class SingleTableProcessor2 : public NonContextualGlyphSubstitutionProcessor2 +{ +public: + virtual void process(LEGlyphStorage &glyphStorage); + + SingleTableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + virtual ~SingleTableProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + SingleTableProcessor2(); + +protected: + const SingleTableLookupTable *singleTableLookupTable; + +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp new file mode 100644 index 00000000000..d4766cb0bf3 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp @@ -0,0 +1,193 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "StateTables.h" +#include "MorphStateTables.h" +#include "SubtableProcessor2.h" +#include "StateTableProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" +#include "LookupTables.h" +#include + +U_NAMESPACE_BEGIN + +StateTableProcessor2::StateTableProcessor2() +{ +} + +StateTableProcessor2::StateTableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : SubtableProcessor2(morphSubtableHeader) +{ + stateTableHeader = (const MorphStateTableHeader2 *) morphSubtableHeader; + nClasses = SWAPL(stateTableHeader->stHeader.nClasses); + classTableOffset = SWAPL(stateTableHeader->stHeader.classTableOffset); + stateArrayOffset = SWAPL(stateTableHeader->stHeader.stateArrayOffset); + entryTableOffset = SWAPL(stateTableHeader->stHeader.entryTableOffset); + + classTable = (LookupTable *) ((char *) &stateTableHeader->stHeader + classTableOffset); + format = SWAPW(classTable->format); + + stateArray = (const EntryTableIndex2 *) ((char *) &stateTableHeader->stHeader + stateArrayOffset); +} + +StateTableProcessor2::~StateTableProcessor2() +{ +} + +void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) +{ + // Start at state 0 + // XXX: How do we know when to start at state 1? + le_uint16 currentState = 0; + le_int32 glyphCount = glyphStorage.getGlyphCount(); + + le_int32 currGlyph = 0; + if ((coverage & scfReverse2) != 0) { // process glyphs in descending order + currGlyph = glyphCount - 1; + dir = -1; + } else { + dir = 1; + } + + beginStateTable(); + switch (format) { + case ltfSimpleArray: { +#ifdef TEST_FORMAT + SimpleArrayLookupTable *lookupTable0 = (SimpleArrayLookupTable *) classTable; + while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + LookupValue classCode = classCodeOOB; + if (currGlyph == glyphCount || currGlyph == -1) { + // XXX: How do we handle EOT vs. EOL? + classCode = classCodeEOT; + } else { + LEGlyphID gid = glyphStorage[currGlyph]; + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); + + if (glyphCode == 0xFFFF) { + classCode = classCodeDEL; + } else { + classCode = SWAPW(lookupTable0->valueArray[gid]); + } + } + EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); // return a zero-based index instead of a byte offset + } +#endif + break; + } + case ltfSegmentSingle: { + SegmentSingleLookupTable *lookupTable2 = (SegmentSingleLookupTable *) classTable; + while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + LookupValue classCode = classCodeOOB; + if (currGlyph == glyphCount || currGlyph == -1) { + // XXX: How do we handle EOT vs. EOL? + classCode = classCodeEOT; + } else { + LEGlyphID gid = glyphStorage[currGlyph]; + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); + + if (glyphCode == 0xFFFF) { + classCode = classCodeDEL; + } else { + const LookupSegment *segment = lookupTable2->lookupSegment(lookupTable2->segments, gid); + if (segment != NULL) { + classCode = SWAPW(segment->value); + } + } + } + EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + } + break; + } + case ltfSegmentArray: { + printf("Lookup Table Format4: specific interpretation needed!\n"); + break; + } + case ltfSingleTable: { + SingleTableLookupTable *lookupTable6 = (SingleTableLookupTable *) classTable; + while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + LookupValue classCode = classCodeOOB; + if (currGlyph == glyphCount || currGlyph == -1) { + // XXX: How do we handle EOT vs. EOL? + classCode = classCodeEOT; + } else { + LEGlyphID gid = glyphStorage[currGlyph]; + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); + + if (glyphCode == 0xFFFF) { + classCode = classCodeDEL; + } else { + const LookupSingle *segment = lookupTable6->lookupSingle(lookupTable6->entries, gid); + if (segment != NULL) { + classCode = SWAPW(segment->value); + } + } + } + EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + } + break; + } + case ltfTrimmedArray: { + TrimmedArrayLookupTable *lookupTable8 = (TrimmedArrayLookupTable *) classTable; + TTGlyphID firstGlyph = SWAPW(lookupTable8->firstGlyph); + TTGlyphID lastGlyph = firstGlyph + SWAPW(lookupTable8->glyphCount); + + while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + LookupValue classCode = classCodeOOB; + if (currGlyph == glyphCount || currGlyph == -1) { + // XXX: How do we handle EOT vs. EOL? + classCode = classCodeEOT; + } else { + TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(glyphStorage[currGlyph]); + if (glyphCode == 0xFFFF) { + classCode = classCodeDEL; + } else if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) { + classCode = SWAPW(lookupTable8->valueArray[glyphCode - firstGlyph]); + } + } + EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + } + break; + } + default: + break; + } + + endStateTable(); +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h new file mode 100644 index 00000000000..5b5c6c18baf --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h @@ -0,0 +1,84 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __STATETABLEPROCESSOR2_H +#define __STATETABLEPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "MorphStateTables.h" +#include "SubtableProcessor2.h" +#include "LookupTables.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class StateTableProcessor2 : public SubtableProcessor2 +{ +public: + void process(LEGlyphStorage &glyphStorage); + + virtual void beginStateTable() = 0; + + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) = 0; + + virtual void endStateTable() = 0; + +protected: + StateTableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + virtual ~StateTableProcessor2(); + + StateTableProcessor2(); + + le_int32 dir; + le_uint16 format; + le_uint32 nClasses; + le_uint32 classTableOffset; + le_uint32 stateArrayOffset; + le_uint32 entryTableOffset; + + const LookupTable *classTable; + const EntryTableIndex2 *stateArray; + const MorphStateTableHeader2 *stateTableHeader; + +private: + StateTableProcessor2(const StateTableProcessor2 &other); // forbid copying of this class + StateTableProcessor2 &operator=(const StateTableProcessor2 &other); // forbid copying of this class +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/StateTables.h b/jdk/src/share/native/sun/font/layout/StateTables.h index fbd316bcae9..13177f5498a 100644 --- a/jdk/src/share/native/sun/font/layout/StateTables.h +++ b/jdk/src/share/native/sun/font/layout/StateTables.h @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -50,6 +50,14 @@ struct StateTableHeader ByteOffset entryTableOffset; }; +struct StateTableHeader2 +{ + le_uint32 nClasses; + le_uint32 classTableOffset; + le_uint32 stateArrayOffset; + le_uint32 entryTableOffset; +}; + enum ClassCodes { classCodeEOT = 0, @@ -85,6 +93,14 @@ struct StateEntry le_int16 flags; }; +typedef le_uint16 EntryTableIndex2; + +struct StateEntry2 // same struct different interpretation +{ + le_uint16 newStateIndex; + le_uint16 flags; +}; + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp new file mode 100644 index 00000000000..30d1426679c --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp @@ -0,0 +1,56 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +SubtableProcessor2::SubtableProcessor2() +{ +} + +SubtableProcessor2::SubtableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) +{ + subtableHeader = morphSubtableHeader; + + length = SWAPL(subtableHeader->length); + coverage = SWAPL(subtableHeader->coverage); + subtableFeatures = SWAPL(subtableHeader->subtableFeatures); +} + +SubtableProcessor2::~SubtableProcessor2() +{ +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h new file mode 100644 index 00000000000..13af854666a --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h @@ -0,0 +1,70 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __SUBTABLEPROCESSOR2_H +#define __SUBTABLEPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class SubtableProcessor2 : public UMemory { +public: + virtual void process(LEGlyphStorage &glyphStorage) = 0; + virtual ~SubtableProcessor2(); + +protected: + SubtableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + SubtableProcessor2(); + + le_uint32 length; + SubtableCoverage2 coverage; + FeatureFlags subtableFeatures; + + const MorphSubtableHeader2 *subtableHeader; + +private: + + SubtableProcessor2(const SubtableProcessor2 &other); // forbid copying of this class + SubtableProcessor2 &operator=(const SubtableProcessor2 &other); // forbid copying of this class +}; + +U_NAMESPACE_END +#endif diff --git a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp new file mode 100644 index 00000000000..f32b216326a --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp @@ -0,0 +1,80 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" +#include "TrimmedArrayProcessor2.h" +#include "LEGlyphStorage.h" +#include "LESwaps.h" + +U_NAMESPACE_BEGIN + +UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TrimmedArrayProcessor2) + +TrimmedArrayProcessor2::TrimmedArrayProcessor2() +{ +} + +TrimmedArrayProcessor2::TrimmedArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +{ + const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + + trimmedArrayLookupTable = (const TrimmedArrayLookupTable *) &header->table; + firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph); + lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount); +} + +TrimmedArrayProcessor2::~TrimmedArrayProcessor2() +{ +} + +void TrimmedArrayProcessor2::process(LEGlyphStorage &glyphStorage) +{ + le_int32 glyphCount = glyphStorage.getGlyphCount(); + le_int32 glyph; + + for (glyph = 0; glyph < glyphCount; glyph += 1) { + LEGlyphID thisGlyph = glyphStorage[glyph]; + TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(thisGlyph); + + if ((ttGlyph > firstGlyph) && (ttGlyph < lastGlyph)) { + TTGlyphID newGlyph = SWAPW(trimmedArrayLookupTable->valueArray[ttGlyph - firstGlyph]); + + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } + } +} + +U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h new file mode 100644 index 00000000000..1ebe4187784 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h @@ -0,0 +1,84 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + * + */ + +/* + * + * (C) Copyright IBM Corp. and others 1998-2013 - All Rights Reserved + * + */ + +#ifndef __TRIMMEDARRAYPROCESSOR2_H +#define __TRIMMEDARRAYPROCESSOR2_H + +/** + * \file + * \internal + */ + +#include "LETypes.h" +#include "MorphTables.h" +#include "SubtableProcessor2.h" +#include "NonContextualGlyphSubst.h" +#include "NonContextualGlyphSubstProc2.h" + +U_NAMESPACE_BEGIN + +class LEGlyphStorage; + +class TrimmedArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2 +{ +public: + virtual void process(LEGlyphStorage &glyphStorage); + + TrimmedArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + + virtual ~TrimmedArrayProcessor2(); + + /** + * ICU "poor man's RTTI", returns a UClassID for the actual class. + * + * @stable ICU 2.8 + */ + virtual UClassID getDynamicClassID() const; + + /** + * ICU "poor man's RTTI", returns a UClassID for this class. + * + * @stable ICU 2.8 + */ + static UClassID getStaticClassID(); + +private: + TrimmedArrayProcessor2(); + +protected: + TTGlyphID firstGlyph; + TTGlyphID lastGlyph; + const TrimmedArrayLookupTable *trimmedArrayLookupTable; + +}; + +U_NAMESPACE_END +#endif From ae2454b3e56c1b7376a547b7ad8e957bde9e4fff Mon Sep 17 00:00:00 2001 From: Phil Race Date: Tue, 26 Feb 2013 10:07:26 -0800 Subject: [PATCH 023/151] 8004986: Better handling of glyph table 8004987: Improve font layout 8004994: Improve checking of glyph table Reviewed-by: srl, jgodinez --- .../sun/font/layout/ArabicLayoutEngine.cpp | 9 +++-- .../font/layout/ContextualGlyphSubstProc2.cpp | 3 +- .../share/native/sun/font/layout/LETypes.h | 35 +++++++++++++++++-- .../native/sun/font/layout/LayoutEngine.cpp | 10 +++--- .../sun/font/layout/LigatureSubstProc.cpp | 31 ++++++++++++++-- .../sun/font/layout/LigatureSubstProc2.cpp | 32 +++++++++++++++-- .../sun/font/layout/LookupProcessor.cpp | 4 +-- .../sun/font/layout/OpenTypeLayoutEngine.cpp | 34 +++++++++++------- .../sun/font/layout/OpenTypeLayoutEngine.h | 7 +++- .../sun/font/layout/StateTableProcessor.cpp | 7 +++- .../sun/font/layout/StateTableProcessor2.cpp | 34 ++++++++++++++++-- .../native/sun/font/layout/StateTables.h | 35 +++++++++++++++++++ 12 files changed, 205 insertions(+), 36 deletions(-) diff --git a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp index 807a072410c..dabcf880ba8 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp @@ -26,7 +26,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -152,17 +152,16 @@ void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], l } UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) - : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success) + : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success) { fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable; fGDEFTable = (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; - - fSubstitutionFilter = new CharSubstitutionFilter(fontInstance); + /* OpenTypeLayoutEngine will allocate a substitution filter */ } UnicodeArabicOpenTypeLayoutEngine::~UnicodeArabicOpenTypeLayoutEngine() { - delete fSubstitutionFilter; + /* OpenTypeLayoutEngine will cleanup the substitution filter */ } // "glyphs", "indices" -> glyphs, indices diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp index 1d7bc399a9b..0bd09752cc3 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp @@ -38,7 +38,6 @@ #include "ContextualGlyphSubstProc2.h" #include "LEGlyphStorage.h" #include "LESwaps.h" -#include U_NAMESPACE_BEGIN @@ -123,7 +122,7 @@ TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyp break; } case ltfSegmentArray: { - printf("Context Lookup Table Format4: specific interpretation needed!\n"); + //printf("Context Lookup Table Format4: specific interpretation needed!\n"); break; } case ltfSingleTable: diff --git a/jdk/src/share/native/sun/font/layout/LETypes.h b/jdk/src/share/native/sun/font/layout/LETypes.h index 26cbeb363f1..d3801fc2450 100644 --- a/jdk/src/share/native/sun/font/layout/LETypes.h +++ b/jdk/src/share/native/sun/font/layout/LETypes.h @@ -339,6 +339,35 @@ typedef struct LEPoint LEPoint; #ifndef U_HIDE_INTERNAL_API + +#ifndef LE_ASSERT_BAD_FONT +#define LE_ASSERT_BAD_FONT 0 +#endif + +#if LE_ASSERT_BAD_FONT +#include +#define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x)); +#else +#define LE_DEBUG_BAD_FONT(x) +#endif + +/** + * Max value representable by a uintptr + */ +#ifndef UINTPTR_MAX +#ifndef UINT32_MAX +#define LE_UINTPTR_MAX 0xFFFFFFFFU +#else +#define LE_UINTPTR_MAX UINT32_MAX +#endif +#else +#define LE_UINTPTR_MAX UINTPTR_MAX +#endif + +/** + * Range check for overflow + */ +#define LE_RANGE_CHECK(type, count, ptrfn) (( (LE_UINTPTR_MAX / sizeof(type)) < count ) ? NULL : (ptrfn)) /** * A convenience macro to get the length of an array. * @@ -360,7 +389,7 @@ typedef struct LEPoint LEPoint; * * @internal */ -#define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type)) +#define LE_NEW_ARRAY(type, count) (type *) LE_RANGE_CHECK(type,count,uprv_malloc((count) * sizeof(type))) /** * Re-allocate an array of basic types. This is used to isolate the rest of @@ -403,7 +432,7 @@ typedef struct LEPoint LEPoint; * * @internal */ -#define LE_NEW_ARRAY(type, count) (type *) malloc((count) * sizeof(type)) +#define LE_NEW_ARRAY(type, count) LE_RANGE_CHECK(type,count,(type *) malloc((count) * sizeof(type))) /** * Re-allocate an array of basic types. This is used to isolate the rest of @@ -696,6 +725,8 @@ enum LEFeatureENUMs { #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM) +#define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG) /**< default features */ + /** * Error codes returned by the LayoutEngine. * diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp index 689b85cd2e7..1fadbf9f792 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp @@ -428,7 +428,7 @@ void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); - if (fTypoFlags & 0x1) { /* kerning enabled */ + if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG; KernTable kt(fFontInstance, getFontTable(kernTableTag)); @@ -571,8 +571,8 @@ void LayoutEngine::reset() LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success) { - // 3 -> kerning and ligatures - return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, 3, success); + //kerning and ligatures - by default + return LayoutEngine::layoutEngineFactory(fontInstance, scriptCode, languageCode, LE_DEFAULT_FEATURE_FLAG, success); } LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) @@ -660,11 +660,11 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan } } else { MorphTableHeader2 *morxTable = (MorphTableHeader2 *)fontInstance->getFontTable(morxTableTag); - if (morxTable != NULL) { + if (morxTable != NULL && SWAPL(morxTable->version)==0x00020000) { result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success); } else { const MorphTableHeader *mortTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag); - if (mortTable != NULL) { // mort + if (mortTable != NULL && SWAPL(mortTable->version)==0x00010000) { // mort result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, mortTable, success); } else { switch (scriptCode) { diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp index 6fabb6e749d..842b095e085 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp @@ -25,7 +25,7 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -79,6 +79,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp } componentStack[m] = currGlyph; + } else if ( m == -1) { + // bad font- skip this glyph. + currGlyph++; + return newState; } ByteOffset actionOffset = flags & lsfActionOffsetMask; @@ -102,7 +106,21 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp offset = action & lafComponentOffsetMask; if (offset != 0) { const le_int16 *offsetTable = (const le_int16 *)((char *) &ligatureSubstitutionHeader->stHeader + 2 * SignExtend(offset, lafComponentOffsetMask)); + const le_int16 *tableEnd = (const le_int16 *)((char *) &ligatureSubstitutionHeader + 1 * SWAPW(ligatureSubstitutionHeader->length)); + // Check if the font is internally consistent + if(tableEnd < (const le_int16*)&ligatureSubstitutionHeader // stated end wrapped around? + || offsetTable > tableEnd) { // offset past end of stated length? + currGlyph++; + LE_DEBUG_BAD_FONT("off end of ligature substitution header"); + return newState; // get out! bad font + } + + if(componentGlyph > glyphStorage.getGlyphCount()) { + LE_DEBUG_BAD_FONT("preposterous componentGlyph"); + currGlyph++; + return newState; // get out! bad font + } i += SWAPW(offsetTable[LE_GET_GLYPH(glyphStorage[componentGlyph])]); if (action & (lafLast | lafStore)) { @@ -110,13 +128,22 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp TTGlyphID ligatureGlyph = SWAPW(*ligatureOffset); glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); + if(mm==nComponents) { + LE_DEBUG_BAD_FONT("exceeded nComponents"); + mm--; // don't overrun the stack. + } stack[++mm] = componentGlyph; i = 0; } else { glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); } } - } while (!(action & lafLast)); +#if LE_ASSERT_BAD_FONT + if(m<0) { + LE_DEBUG_BAD_FONT("m<0") + } +#endif + } while (!(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items while (mm >= 0) { if (++m >= nComponents) { diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp index c26442da723..f36be1b26ad 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp @@ -79,6 +79,11 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp m = 0; } componentStack[m] = currGlyph; + } else if ( m == -1) { + // bad font- skip this glyph. + LE_DEBUG_BAD_FONT("m==-1") + currGlyph+= dir; + return nextStateIndex; } ByteOffset actionOffset = flags & lsfPerformAction; @@ -93,6 +98,16 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp const le_uint16 *componentTable = (const le_uint16 *)((char *) &ligatureSubstitutionHeader->stHeader + componentOffset); + const le_uint16 *tableEnd = (const le_uint16 *)((char *) &ligatureSubstitutionHeader + SWAPL(ligatureSubstitutionHeader->length)); + + // Check if the font is internally consistent + if(tableEnd < (const le_uint16*)&ligatureSubstitutionHeader // stated end wrapped around? + || componentTable > tableEnd) { // offset past end of stated length? + currGlyph+= dir; + LE_DEBUG_BAD_FONT("ligatureSubstHeader off end of table") + return nextStateIndex; // get out! bad font + } + do { le_uint32 componentGlyph = componentStack[m--]; // pop off @@ -104,19 +119,32 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp offset = action & lafComponentOffsetMask; if (offset != 0) { - + if(componentGlyph > glyphStorage.getGlyphCount()) { + LE_DEBUG_BAD_FONT("preposterous componentGlyph"); + currGlyph+= dir; + return nextStateIndex; // get out! bad font + } i += SWAPW(componentTable[LE_GET_GLYPH(glyphStorage[componentGlyph]) + (SignExtend(offset, lafComponentOffsetMask))]); if (action & (lafLast | lafStore)) { TTGlyphID ligatureGlyph = SWAPW(ligatureTable[i]); glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); + if(mm==nComponents) { + LE_DEBUG_BAD_FONT("exceeded nComponents"); + mm--; // don't overrun the stack. + } stack[++mm] = componentGlyph; i = 0; } else { glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); } } - } while (!(action & lafLast)); +#if LE_ASSERT_BAD_FONT + if(m<0) { + LE_DEBUG_BAD_FONT("m<0") + } +#endif + } while (!(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items while (mm >= 0) { if (++m >= nComponents) { diff --git a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp index 6e74130989b..db672efb98b 100644 --- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp @@ -208,7 +208,7 @@ LookupProcessor::LookupProcessor(const char *baseAddress, lookupSelectCount = lookupListCount; le_int32 count, order = 0; - le_int32 featureReferences = 0; + le_uint32 featureReferences = 0; const FeatureTable *featureTable = NULL; LETag featureTag; @@ -219,7 +219,7 @@ LookupProcessor::LookupProcessor(const char *baseAddress, // be the maximum number of entries in the lookupOrderArray. We can't use // lookupListCount because some lookups might be referenced by more than // one feature. - for (le_int32 feature = 0; feature < featureCount; feature += 1) { + for (le_uint32 feature = 0; feature < featureCount; feature += 1) { le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]); featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag); diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp index 375327b55da..a561a135182 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp @@ -123,7 +123,7 @@ static const FeatureMap featureMap[] = {ccmpFeatureTag, ccmpFeatureMask}, {ligaFeatureTag, ligaFeatureMask}, {cligFeatureTag, cligFeatureMask}, - {kernFeatureTag, kernFeatureMask}, + {kernFeatureTag, kernFeatureMask}, {paltFeatureTag, paltFeatureMask}, {markFeatureTag, markFeatureMask}, {mkmkFeatureTag, mkmkFeatureMask}, @@ -160,6 +160,23 @@ OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, l static const le_uint32 gposTableTag = LE_GPOS_TABLE_TAG; const GlyphPositioningTableHeader *gposTable = (const GlyphPositioningTableHeader *) getFontTable(gposTableTag); + applyTypoFlags(); + + setScriptAndLanguageTags(); + + fGDEFTable = (const GlyphDefinitionTableHeader *) getFontTable(gdefTableTag); + +// JK patch, 2008-05-30 - see Sinhala bug report and LKLUG font +// if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) { + if (gposTable != NULL && gposTable->coversScript(fScriptTag)) { + fGPOSTable = gposTable; + } +} + +void OpenTypeLayoutEngine::applyTypoFlags() { + const le_int32& typoFlags = fTypoFlags; + const LEFontInstance *fontInstance = fFontInstance; + switch (typoFlags & (LE_SS01_FEATURE_FLAG | LE_SS02_FEATURE_FLAG | LE_SS03_FEATURE_FLAG @@ -221,15 +238,6 @@ OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, l fSubstitutionFilter = new CharSubstitutionFilter(fontInstance); } - setScriptAndLanguageTags(); - - fGDEFTable = (const GlyphDefinitionTableHeader *) getFontTable(gdefTableTag); - -// JK patch, 2008-05-30 - see Sinhala bug report and LKLUG font -// if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) { - if (gposTable != NULL && gposTable->coversScript(fScriptTag)) { - fGPOSTable = gposTable; - } } void OpenTypeLayoutEngine::reset() @@ -246,13 +254,15 @@ OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, l : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fFeatureOrder(FALSE), fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL) { - setScriptAndLanguageTags(); + applyTypoFlags(); + setScriptAndLanguageTags(); } OpenTypeLayoutEngine::~OpenTypeLayoutEngine() { - if (fTypoFlags & 0x80000000L) { + if (fTypoFlags & LE_CHAR_FILTER_FEATURE_FLAG) { delete fSubstitutionFilter; + fSubstitutionFilter = NULL; } reset(); diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h index cf257fb8131..7a89df46a4a 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h @@ -24,7 +24,7 @@ */ /* - * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -184,6 +184,11 @@ private: */ static const LETag scriptTags[]; + /** + * apply the typoflags. Only called by the c'tors. + */ + void applyTypoFlags(); + protected: /** * A set of "default" features. The default characterProcessing method diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp b/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp index c76086afd2a..3146cc53210 100644 --- a/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp @@ -65,6 +65,9 @@ StateTableProcessor::~StateTableProcessor() void StateTableProcessor::process(LEGlyphStorage &glyphStorage) { + + LE_STATE_PATIENCE_INIT(); + // Start at state 0 // XXX: How do we know when to start at state 1? ByteOffset currentState = stateArrayOffset; @@ -76,6 +79,7 @@ void StateTableProcessor::process(LEGlyphStorage &glyphStorage) beginStateTable(); while (currGlyph <= glyphCount) { + if(LE_STATE_PATIENCE_DECR()) break; // patience exceeded. ClassCode classCode = classCodeOOB; if (currGlyph == glyphCount) { // XXX: How do we handle EOT vs. EOL? @@ -92,8 +96,9 @@ void StateTableProcessor::process(LEGlyphStorage &glyphStorage) const EntryTableIndex *stateArray = (const EntryTableIndex *) ((char *) &stateTableHeader->stHeader + currentState); EntryTableIndex entryTableIndex = stateArray[(le_uint8)classCode]; - + LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + LE_STATE_PATIENCE_INCR(currGlyph); } endStateTable(); diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp index d4766cb0bf3..5bd9c253012 100644 --- a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp @@ -38,7 +38,6 @@ #include "LEGlyphStorage.h" #include "LESwaps.h" #include "LookupTables.h" -#include U_NAMESPACE_BEGIN @@ -72,6 +71,8 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) le_uint16 currentState = 0; le_int32 glyphCount = glyphStorage.getGlyphCount(); + LE_STATE_PATIENCE_INIT(); + le_int32 currGlyph = 0; if ((coverage & scfReverse2) != 0) { // process glyphs in descending order currGlyph = glyphCount - 1; @@ -86,6 +87,10 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) #ifdef TEST_FORMAT SimpleArrayLookupTable *lookupTable0 = (SimpleArrayLookupTable *) classTable; while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + if(LE_STATE_PATIENCE_DECR()) { + LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") + break; // patience exceeded. + } LookupValue classCode = classCodeOOB; if (currGlyph == glyphCount || currGlyph == -1) { // XXX: How do we handle EOT vs. EOL? @@ -101,7 +106,9 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) } } EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); // return a zero-based index instead of a byte offset + LE_STATE_PATIENCE_INCR(currGlyph); } #endif break; @@ -109,6 +116,10 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) case ltfSegmentSingle: { SegmentSingleLookupTable *lookupTable2 = (SegmentSingleLookupTable *) classTable; while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + if(LE_STATE_PATIENCE_DECR()) { + LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") + break; // patience exceeded. + } LookupValue classCode = classCodeOOB; if (currGlyph == glyphCount || currGlyph == -1) { // XXX: How do we handle EOT vs. EOL? @@ -127,21 +138,31 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) } } EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + LE_STATE_PATIENCE_INCR(currGlyph); } break; } case ltfSegmentArray: { - printf("Lookup Table Format4: specific interpretation needed!\n"); + //printf("Lookup Table Format4: specific interpretation needed!\n"); break; } case ltfSingleTable: { SingleTableLookupTable *lookupTable6 = (SingleTableLookupTable *) classTable; while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + if(LE_STATE_PATIENCE_DECR()) { + LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") + break; // patience exceeded. + } LookupValue classCode = classCodeOOB; if (currGlyph == glyphCount || currGlyph == -1) { // XXX: How do we handle EOT vs. EOL? classCode = classCodeEOT; + } else if(currGlyph > glyphCount) { + // note if > glyphCount, we've run off the end (bad font) + currGlyph = glyphCount; + classCode = classCodeEOT; } else { LEGlyphID gid = glyphStorage[currGlyph]; TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); @@ -156,7 +177,9 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) } } EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + LE_STATE_PATIENCE_INCR(currGlyph); } break; } @@ -166,6 +189,11 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) TTGlyphID lastGlyph = firstGlyph + SWAPW(lookupTable8->glyphCount); while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { + if(LE_STATE_PATIENCE_DECR()) { + LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") + break; // patience exceeded. + } + LookupValue classCode = classCodeOOB; if (currGlyph == glyphCount || currGlyph == -1) { // XXX: How do we handle EOT vs. EOL? @@ -179,7 +207,9 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) } } EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + LE_STATE_PATIENCE_INCR(currGlyph); } break; } diff --git a/jdk/src/share/native/sun/font/layout/StateTables.h b/jdk/src/share/native/sun/font/layout/StateTables.h index 13177f5498a..6c6fdced933 100644 --- a/jdk/src/share/native/sun/font/layout/StateTables.h +++ b/jdk/src/share/native/sun/font/layout/StateTables.h @@ -42,6 +42,41 @@ U_NAMESPACE_BEGIN + + + +/* + * State table loop detection. + * Detects if too many ( LE_STATE_PATIENCE_COUNT ) state changes occur without moving the glyph index 'g'. + * + * Usage (pseudocode): + * + * { + * LE_STATE_PATIENCE_INIT(); + * + * int g=0; // the glyph index - expect it to be moving + * + * for(;;) { + * if(LE_STATE_PATIENCE_DECR()) { // decrements the patience counter + * // ran out of patience, get out. + * break; + * } + * + * LE_STATE_PATIENCE_CURR(int, g); // store the 'current' + * state = newState(state,g); + * g+= ; + * LE_STATE_PATIENCE_INCR(g); // if g has moved, increment the patience counter. Otherwise leave it. + * } + * + */ + +#define LE_STATE_PATIENCE_COUNT 4096 /**< give up if a state table doesn't move the glyph after this many iterations */ +#define LE_STATE_PATIENCE_INIT() le_uint32 le_patience_count = LE_STATE_PATIENCE_COUNT +#define LE_STATE_PATIENCE_DECR() --le_patience_count==0 +#define LE_STATE_PATIENCE_CURR(type,x) type le_patience_curr=(x) +#define LE_STATE_PATIENCE_INCR(x) if((x)!=le_patience_curr) ++le_patience_count; + + struct StateTableHeader { le_int16 stateSize; From 05882c2a521336bc85c8a75ea7c7efac0424e392 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Thu, 7 Mar 2013 10:02:20 -0800 Subject: [PATCH 024/151] 8001031: Better font processing Reviewed-by: srl, vadim --- .../native/sun/font/FontInstanceAdapter.cpp | 47 +- .../native/sun/font/FontInstanceAdapter.h | 1 + .../share/native/sun/font/fontscalerdefs.h | 21 +- .../font/layout/AlternateSubstSubtables.cpp | 11 +- .../sun/font/layout/AlternateSubstSubtables.h | 6 +- .../sun/font/layout/ArabicLayoutEngine.cpp | 29 +- .../sun/font/layout/ArabicLayoutEngine.h | 2 +- .../native/sun/font/layout/ArabicShaping.cpp | 14 +- .../native/sun/font/layout/ArabicShaping.h | 2 + .../sun/font/layout/AttachmentPosnSubtables.h | 6 +- .../native/sun/font/layout/CanonData.cpp | 5 + .../native/sun/font/layout/CanonShaping.cpp | 10 +- .../native/sun/font/layout/CanonShaping.h | 2 + .../sun/font/layout/ClassDefinitionTables.cpp | 104 +++-- .../sun/font/layout/ClassDefinitionTables.h | 27 +- .../layout/ContextualGlyphInsertionProc2.cpp | 137 +++--- .../layout/ContextualGlyphInsertionProc2.h | 29 +- .../font/layout/ContextualGlyphSubstProc.cpp | 48 +- .../font/layout/ContextualGlyphSubstProc.h | 8 +- .../font/layout/ContextualGlyphSubstProc2.cpp | 55 ++- .../font/layout/ContextualGlyphSubstProc2.h | 12 +- .../font/layout/ContextualSubstSubtables.cpp | 8 +- .../font/layout/ContextualSubstSubtables.h | 22 + .../native/sun/font/layout/CoverageTables.h | 3 + .../layout/CursiveAttachmentSubtables.cpp | 6 +- .../font/layout/CursiveAttachmentSubtables.h | 3 +- .../native/sun/font/layout/DeviceTables.h | 1 + .../sun/font/layout/ExtensionSubtables.cpp | 8 +- .../share/native/sun/font/layout/Features.cpp | 12 +- .../native/sun/font/layout/GDEFMarkFilter.cpp | 7 +- .../native/sun/font/layout/GDEFMarkFilter.h | 4 +- .../native/sun/font/layout/GXLayoutEngine.cpp | 5 +- .../native/sun/font/layout/GXLayoutEngine.h | 4 +- .../sun/font/layout/GXLayoutEngine2.cpp | 8 +- .../native/sun/font/layout/GXLayoutEngine2.h | 4 +- .../sun/font/layout/GlyphDefinitionTables.cpp | 28 +- .../sun/font/layout/GlyphDefinitionTables.h | 20 +- .../native/sun/font/layout/GlyphIterator.cpp | 27 +- .../native/sun/font/layout/GlyphIterator.h | 6 +- .../sun/font/layout/GlyphLookupTables.cpp | 15 +- .../sun/font/layout/GlyphLookupTables.h | 4 +- .../font/layout/GlyphPositioningTables.cpp | 6 +- .../sun/font/layout/GlyphPositioningTables.h | 5 +- .../sun/font/layout/GlyphPosnLookupProc.cpp | 36 +- .../sun/font/layout/GlyphPosnLookupProc.h | 4 +- .../sun/font/layout/GlyphSubstLookupProc.cpp | 28 +- .../sun/font/layout/GlyphSubstLookupProc.h | 4 +- .../font/layout/GlyphSubstitutionTables.cpp | 7 +- .../sun/font/layout/GlyphSubstitutionTables.h | 5 +- .../sun/font/layout/HanLayoutEngine.cpp | 2 +- .../native/sun/font/layout/HanLayoutEngine.h | 2 +- .../sun/font/layout/HangulLayoutEngine.cpp | 2 +- .../sun/font/layout/HangulLayoutEngine.h | 2 +- .../native/sun/font/layout/ICUFeatures.h | 9 +- .../sun/font/layout/IndicLayoutEngine.cpp | 2 +- .../sun/font/layout/IndicLayoutEngine.h | 2 +- .../layout/IndicRearrangementProcessor.cpp | 14 +- .../font/layout/IndicRearrangementProcessor.h | 7 +- .../layout/IndicRearrangementProcessor2.cpp | 14 +- .../layout/IndicRearrangementProcessor2.h | 8 +- .../sun/font/layout/IndicReordering.cpp | 5 + .../native/sun/font/layout/KernTable.cpp | 77 +-- .../share/native/sun/font/layout/KernTable.h | 12 +- .../sun/font/layout/KhmerLayoutEngine.cpp | 2 +- .../sun/font/layout/KhmerLayoutEngine.h | 2 +- .../share/native/sun/font/layout/LEScripts.h | 7 +- .../native/sun/font/layout/LETableReference.h | 442 ++++++++++++++++++ .../share/native/sun/font/layout/LETypes.h | 9 +- .../native/sun/font/layout/LayoutEngine.cpp | 96 ++-- .../native/sun/font/layout/LayoutEngine.h | 8 +- .../sun/font/layout/LigatureSubstProc.cpp | 67 ++- .../sun/font/layout/LigatureSubstProc.h | 6 +- .../sun/font/layout/LigatureSubstProc2.cpp | 41 +- .../sun/font/layout/LigatureSubstProc2.h | 9 +- .../font/layout/LigatureSubstSubtables.cpp | 4 +- .../sun/font/layout/LigatureSubstSubtables.h | 5 +- .../sun/font/layout/LookupProcessor.cpp | 114 +++-- .../native/sun/font/layout/LookupProcessor.h | 19 +- .../native/sun/font/layout/LookupTables.cpp | 29 +- .../native/sun/font/layout/LookupTables.h | 10 +- .../share/native/sun/font/layout/Lookups.cpp | 36 +- .../share/native/sun/font/layout/Lookups.h | 29 +- .../share/native/sun/font/layout/MarkArrays.h | 1 + .../font/layout/MarkToBasePosnSubtables.cpp | 6 +- .../sun/font/layout/MarkToBasePosnSubtables.h | 4 +- .../layout/MarkToLigaturePosnSubtables.cpp | 6 +- .../font/layout/MarkToLigaturePosnSubtables.h | 5 +- .../font/layout/MarkToMarkPosnSubtables.cpp | 6 +- .../sun/font/layout/MarkToMarkPosnSubtables.h | 4 +- .../native/sun/font/layout/MorphTables.cpp | 40 +- .../native/sun/font/layout/MorphTables.h | 13 +- .../native/sun/font/layout/MorphTables2.cpp | 65 ++- .../font/layout/MultipleSubstSubtables.cpp | 4 +- .../sun/font/layout/MultipleSubstSubtables.h | 4 +- .../layout/NonContextualGlyphSubstProc.cpp | 23 +- .../font/layout/NonContextualGlyphSubstProc.h | 6 +- .../layout/NonContextualGlyphSubstProc2.cpp | 21 +- .../layout/NonContextualGlyphSubstProc2.h | 6 +- .../sun/font/layout/OpenTypeLayoutEngine.cpp | 57 ++- .../sun/font/layout/OpenTypeLayoutEngine.h | 9 +- .../native/sun/font/layout/OpenTypeTables.h | 3 +- .../sun/font/layout/OpenTypeUtilities.cpp | 100 ++-- .../sun/font/layout/OpenTypeUtilities.h | 13 +- .../font/layout/PairPositioningSubtables.cpp | 29 +- .../font/layout/PairPositioningSubtables.h | 10 +- .../sun/font/layout/ScriptAndLanguage.cpp | 65 ++- .../sun/font/layout/ScriptAndLanguage.h | 9 +- .../sun/font/layout/SegmentArrayProcessor.cpp | 20 +- .../sun/font/layout/SegmentArrayProcessor.h | 6 +- .../font/layout/SegmentArrayProcessor2.cpp | 15 +- .../sun/font/layout/SegmentArrayProcessor2.h | 6 +- .../font/layout/SegmentSingleProcessor.cpp | 17 +- .../sun/font/layout/SegmentSingleProcessor.h | 6 +- .../font/layout/SegmentSingleProcessor2.cpp | 14 +- .../sun/font/layout/SegmentSingleProcessor2.h | 6 +- .../sun/font/layout/ShapingTypeData.cpp | 2 + .../sun/font/layout/SimpleArrayProcessor.cpp | 20 +- .../sun/font/layout/SimpleArrayProcessor.h | 6 +- .../sun/font/layout/SimpleArrayProcessor2.cpp | 14 +- .../sun/font/layout/SimpleArrayProcessor2.h | 7 +- .../layout/SinglePositioningSubtables.cpp | 18 +- .../font/layout/SinglePositioningSubtables.h | 7 +- .../layout/SingleSubstitutionSubtables.cpp | 18 +- .../font/layout/SingleSubstitutionSubtables.h | 7 +- .../sun/font/layout/SingleTableProcessor.cpp | 13 +- .../sun/font/layout/SingleTableProcessor.h | 6 +- .../sun/font/layout/SingleTableProcessor2.cpp | 13 +- .../sun/font/layout/SingleTableProcessor2.h | 6 +- .../sun/font/layout/StateTableProcessor.cpp | 19 +- .../sun/font/layout/StateTableProcessor.h | 9 +- .../sun/font/layout/StateTableProcessor2.cpp | 71 +-- .../sun/font/layout/StateTableProcessor2.h | 13 +- .../native/sun/font/layout/StateTables.h | 1 + .../sun/font/layout/SubtableProcessor.cpp | 6 +- .../sun/font/layout/SubtableProcessor.h | 6 +- .../sun/font/layout/SubtableProcessor2.cpp | 11 +- .../sun/font/layout/SubtableProcessor2.h | 6 +- .../sun/font/layout/ThaiLayoutEngine.cpp | 9 +- .../sun/font/layout/TibetanLayoutEngine.cpp | 2 +- .../sun/font/layout/TibetanLayoutEngine.h | 2 +- .../sun/font/layout/TrimmedArrayProcessor.cpp | 20 +- .../sun/font/layout/TrimmedArrayProcessor.h | 6 +- .../font/layout/TrimmedArrayProcessor2.cpp | 14 +- .../sun/font/layout/TrimmedArrayProcessor2.h | 8 +- .../native/sun/font/layout/ValueRecords.h | 1 + jdk/src/share/native/sun/font/sunFont.c | 18 +- 146 files changed, 1879 insertions(+), 1038 deletions(-) create mode 100644 jdk/src/share/native/sun/font/layout/LETableReference.h diff --git a/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp b/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp index 824f296cc5c..4214078e06b 100644 --- a/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp +++ b/jdk/src/share/native/sun/font/FontInstanceAdapter.cpp @@ -66,8 +66,21 @@ FontInstanceAdapter::FontInstanceAdapter(JNIEnv *theEnv, yScalePixelsToUnits = upem / yppem; }; + const void *FontInstanceAdapter::getFontTable(LETag tableTag) const { + size_t ignored = 0; + return getFontTable(tableTag, ignored); +} + +static const LETag cacheMap[LAYOUTCACHE_ENTRIES] = { + GPOS_TAG, GDEF_TAG, GSUB_TAG, MORT_TAG, MORX_TAG, KERN_TAG +}; + +const void *FontInstanceAdapter::getFontTable(LETag tableTag, size_t &length) const +{ + length = 0; + if (!layoutTables) { // t1 font return 0; } @@ -75,14 +88,19 @@ const void *FontInstanceAdapter::getFontTable(LETag tableTag) const // cache in font's pscaler object // font disposer will handle for us - switch(tableTag) { - case GSUB_TAG: if (layoutTables->gsub_len != -1) return (void*)layoutTables->gsub; break; - case GPOS_TAG: if (layoutTables->gpos_len != -1) return (void*)layoutTables->gpos; break; - case GDEF_TAG: if (layoutTables->gdef_len != -1) return (void*)layoutTables->gdef; break; - case MORT_TAG: if (layoutTables->mort_len != -1) return (void*)layoutTables->mort; break; - case KERN_TAG: if (layoutTables->kern_len != -1) return (void*)layoutTables->kern; break; - default: - //fprintf(stderr, "unexpected table request from font instance adapter: %x\n", tableTag); + int cacheIdx; + for (cacheIdx=0;cacheIdxentries[cacheIdx].len != -1) { + length = layoutTables->entries[cacheIdx].len; + return layoutTables->entries[cacheIdx].ptr; + } + } else { + //fprintf(stderr, "unexpected table request from font instance adapter: %x\n", tableTag); + // (don't load any other tables) return 0; } @@ -96,16 +114,13 @@ const void *FontInstanceAdapter::getFontTable(LETag tableTag) const env->GetByteArrayRegion(tableBytes, 0, len, result); } - switch(tableTag) { - case GSUB_TAG: layoutTables->gsub = (void*)result; layoutTables->gsub_len = len; break; - case GPOS_TAG: layoutTables->gpos = (void*)result; layoutTables->gpos_len = len; break; - case GDEF_TAG: layoutTables->gdef = (void*)result; layoutTables->gdef_len = len; break; - case MORT_TAG: layoutTables->mort = (void*)result; layoutTables->mort_len = len; break; - case KERN_TAG: layoutTables->kern = (void*)result; layoutTables->kern_len = len; break; - default: break; + if (cacheIdxentries[cacheIdx].len = len; + layoutTables->entries[cacheIdx].ptr = (const void*)result; } - return (void*)result; + length = len; + return (const void*)result; }; LEGlyphID FontInstanceAdapter::mapCharToGlyph(LEUnicode32 ch, const LECharMapper *mapper) const diff --git a/jdk/src/share/native/sun/font/FontInstanceAdapter.h b/jdk/src/share/native/sun/font/FontInstanceAdapter.h index b78bdb4cabd..264cf27bdd6 100644 --- a/jdk/src/share/native/sun/font/FontInstanceAdapter.h +++ b/jdk/src/share/native/sun/font/FontInstanceAdapter.h @@ -86,6 +86,7 @@ public: // tables are cached with the native font scaler data // only supports gsub, gpos, gdef, mort tables at present virtual const void *getFontTable(LETag tableTag) const; + virtual const void *getFontTable(LETag tableTag, size_t &len) const; virtual void *getKernPairs() const { return layoutTables->kernPairs; diff --git a/jdk/src/share/native/sun/font/fontscalerdefs.h b/jdk/src/share/native/sun/font/fontscalerdefs.h index 8f142752af9..7d84d84a536 100644 --- a/jdk/src/share/native/sun/font/fontscalerdefs.h +++ b/jdk/src/share/native/sun/font/fontscalerdefs.h @@ -120,20 +120,19 @@ typedef struct GlyphInfo { #define GPOS_TAG 0x47504F53 /* 'GPOS' */ #define GDEF_TAG 0x47444546 /* 'GDEF' */ #define MORT_TAG 0x6D6F7274 /* 'mort' */ +#define MORX_TAG 0x6D6F7278 /* 'morx' */ #define KERN_TAG 0x6B65726E /* 'kern' */ +typedef struct TTLayoutTableCacheEntry { + const void* ptr; + int len; +} TTLayoutTableCacheEntry; + +#define LAYOUTCACHE_ENTRIES 6 + typedef struct TTLayoutTableCache { - void* gsub; - void* gpos; - void* gdef; - void* mort; - void* kern; - void* kernPairs; - int gsub_len; - int gpos_len; - int gdef_len; - int mort_len; - int kern_len; + TTLayoutTableCacheEntry entries[LAYOUTCACHE_ENTRIES]; + void* kernPairs; } TTLayoutTableCache; #include "sunfontids.h" diff --git a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp index c099c25a7a7..493cea36843 100644 --- a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.cpp @@ -39,19 +39,20 @@ U_NAMESPACE_BEGIN -le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 AlternateSubstitutionSubtable::process(const LEReferenceTo &base, + GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { // NOTE: For now, we'll just pick the first alternative... LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); - if (coverageIndex >= 0) { + if (coverageIndex >= 0 && LE_SUCCESS(success)) { le_uint16 altSetCount = SWAPW(alternateSetCount); if (coverageIndex < altSetCount) { Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]); - const AlternateSetTable *alternateSetTable = - (const AlternateSetTable *) ((char *) this + alternateSetTableOffset); + const LEReferenceTo alternateSetTable(base, success, + (const AlternateSetTable *) ((char *) this + alternateSetTableOffset)); TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]); if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { diff --git a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h index fbc41212f1a..e2f250e691e 100644 --- a/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h +++ b/jdk/src/share/native/sun/font/layout/AlternateSubstSubtables.h @@ -51,13 +51,17 @@ struct AlternateSetTable TTGlyphID alternateArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(AlternateSetTable, alternateArray) + struct AlternateSubstitutionSubtable : GlyphSubstitutionSubtable { le_uint16 alternateSetCount; Offset alternateSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const; }; +LE_VAR_ARRAY(AlternateSubstitutionSubtable, alternateSetTableOffsetArray) + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp index dabcf880ba8..834a253a4b4 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.cpp @@ -58,15 +58,18 @@ le_bool CharSubstitutionFilter::accept(LEGlyphID glyph) const UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ArabicOpenTypeLayoutEngine) -ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) +ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, + le_int32 languageCode, le_int32 typoFlags, + const LEReferenceTo &gsubTable, + LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success) { fFeatureMap = ArabicShaping::getFeatureMap(fFeatureMapCount); fFeatureOrder = TRUE; } -ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, +ArabicOpenTypeLayoutEngine::ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, + le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success) { @@ -88,8 +91,9 @@ ArabicOpenTypeLayoutEngine::~ArabicOpenTypeLayoutEngine() // Input: characters // Output: characters, char indices, tags // Returns: output character count -le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, le_int32 max, le_bool rightToLeft, - LEUnicode *&outChars, LEGlyphStorage &glyphStorage, LEErrorCode &success) +le_int32 ArabicOpenTypeLayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 offset, le_int32 count, + le_int32 max, le_bool rightToLeft, LEUnicode *&outChars, + LEGlyphStorage &glyphStorage, LEErrorCode &success) { if (LE_FAILURE(success)) { return 0; @@ -137,22 +141,21 @@ void ArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], l return; } - if (fGPOSTable != NULL) { + if (!fGPOSTable.isEmpty()) { OpenTypeLayoutEngine::adjustGlyphPositions(chars, offset, count, reverse, glyphStorage, success); - } else if (fGDEFTable != NULL) { - GDEFMarkFilter filter(fGDEFTable); - + } else if (!fGDEFTable.isEmpty()) { + GDEFMarkFilter filter(fGDEFTable, success); adjustMarkGlyphs(glyphStorage, &filter, success); } else { - GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; - GDEFMarkFilter filter(gdefTable); + LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + GDEFMarkFilter filter(gdefTable, success); adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); } } UnicodeArabicOpenTypeLayoutEngine::UnicodeArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) - : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success) + : ArabicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags | LE_CHAR_FILTER_FEATURE_FLAG, success) { fGSUBTable = (const GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable; fGDEFTable = (const GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; @@ -232,7 +235,7 @@ void UnicodeArabicOpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode cha return; } - GDEFMarkFilter filter(fGDEFTable); + GDEFMarkFilter filter(fGDEFTable, success); adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); } diff --git a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h index 956b3d50f8c..239ae1816b4 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/ArabicLayoutEngine.h @@ -75,7 +75,7 @@ public: * @internal */ ArabicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known diff --git a/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp b/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp index 7c91f4f9721..0b56b4bacf2 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp +++ b/jdk/src/share/native/sun/font/layout/ArabicShaping.cpp @@ -58,14 +58,16 @@ const ArabicShaping::ShapeType ArabicShaping::shapeTypes[] = */ ArabicShaping::ShapeType ArabicShaping::getShapeType(LEUnicode c) { - const ClassDefinitionTable *joiningTypes = (const ClassDefinitionTable *) ArabicShaping::shapingTypeTable; - le_int32 joiningType = joiningTypes->getGlyphClass(c); + LEErrorCode success = LE_NO_ERROR; + const LEReferenceTo joiningTypes((const ClassDefinitionTable *) ArabicShaping::shapingTypeTable, + ArabicShaping::shapingTypeTableLen); + le_int32 joiningType = joiningTypes->getGlyphClass(joiningTypes, c, success); - if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT) { - return ArabicShaping::shapeTypes[joiningType]; - } + if (joiningType >= 0 && joiningType < ArabicShaping::JT_COUNT && LE_SUCCESS(success)) { + return ArabicShaping::shapeTypes[joiningType]; + } - return ArabicShaping::ST_NOSHAPE_NONE; + return ArabicShaping::ST_NOSHAPE_NONE; } #define isolFeatureTag LE_ISOL_FEATURE_TAG diff --git a/jdk/src/share/native/sun/font/layout/ArabicShaping.h b/jdk/src/share/native/sun/font/layout/ArabicShaping.h index 3838e168d41..40923ecb496 100644 --- a/jdk/src/share/native/sun/font/layout/ArabicShaping.h +++ b/jdk/src/share/native/sun/font/layout/ArabicShaping.h @@ -93,6 +93,8 @@ private: static ShapeType getShapeType(LEUnicode c); static const le_uint8 shapingTypeTable[]; + static const size_t shapingTypeTableLen; + static const ShapeType shapeTypes[]; static void adjustTags(le_int32 outIndex, le_int32 shapeOffset, LEGlyphStorage &glyphStorage); diff --git a/jdk/src/share/native/sun/font/layout/AttachmentPosnSubtables.h b/jdk/src/share/native/sun/font/layout/AttachmentPosnSubtables.h index 2ed8d9d270c..e7a27608ff4 100644 --- a/jdk/src/share/native/sun/font/layout/AttachmentPosnSubtables.h +++ b/jdk/src/share/native/sun/font/layout/AttachmentPosnSubtables.h @@ -52,14 +52,14 @@ struct AttachmentPositioningSubtable : GlyphPositioningSubtable Offset markArrayOffset; Offset baseArrayOffset; - inline le_int32 getBaseCoverage(LEGlyphID baseGlyphId) const; + inline le_int32 getBaseCoverage(const LETableReference &base, LEGlyphID baseGlyphId, LEErrorCode &success) const; le_uint32 process(GlyphIterator *glyphIterator) const; }; -inline le_int32 AttachmentPositioningSubtable::getBaseCoverage(LEGlyphID baseGlyphID) const +inline le_int32 AttachmentPositioningSubtable::getBaseCoverage(const LETableReference &base, LEGlyphID baseGlyphID, LEErrorCode &success) const { - return getGlyphCoverage(baseCoverageTableOffset, baseGlyphID); + return getGlyphCoverage(base, baseCoverageTableOffset, baseGlyphID, success); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/CanonData.cpp b/jdk/src/share/native/sun/font/layout/CanonData.cpp index 41d4bc213ae..49b13ab1c10 100644 --- a/jdk/src/share/native/sun/font/layout/CanonData.cpp +++ b/jdk/src/share/native/sun/font/layout/CanonData.cpp @@ -3641,4 +3641,9 @@ const le_uint8 CanonShaping::glyphDefinitionTable[] = { 0x00, 0xE6, 0xD2, 0x42, 0xD2, 0x44, 0x00, 0xE6 }; + +const size_t CanonShaping::glyphSubstitutionTableLen = sizeof(glyphSubstitutionTable)/sizeof(glyphSubstitutionTable[0]); + +const size_t CanonShaping::glyphDefinitionTableLen = sizeof(glyphDefinitionTable)/sizeof(glyphDefinitionTable[0]); + U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp index 498ffa8f2de..86f2ebc89c1 100644 --- a/jdk/src/share/native/sun/font/layout/CanonShaping.cpp +++ b/jdk/src/share/native/sun/font/layout/CanonShaping.cpp @@ -59,15 +59,15 @@ void CanonShaping::sortMarks(le_int32 *indices, const le_int32 *combiningClasses void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft, LEUnicode *outChars, LEGlyphStorage &glyphStorage) { - const GlyphDefinitionTableHeader *gdefTable = (const GlyphDefinitionTableHeader *) glyphDefinitionTable; - const ClassDefinitionTable *classTable = gdefTable->getMarkAttachClassDefinitionTable(); + LEErrorCode success = LE_NO_ERROR; + LEReferenceTo gdefTable(CanonShaping::glyphDefinitionTable, CanonShaping::glyphDefinitionTableLen); + LEReferenceTo classTable = gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success); le_int32 *combiningClasses = LE_NEW_ARRAY(le_int32, charCount); le_int32 *indices = LE_NEW_ARRAY(le_int32, charCount); - LEErrorCode status = LE_NO_ERROR; le_int32 i; for (i = 0; i < charCount; i += 1) { - combiningClasses[i] = classTable->getGlyphClass((LEGlyphID) inChars[i]); + combiningClasses[i] = classTable->getGlyphClass(classTable, (LEGlyphID) inChars[i], success); indices[i] = i; } @@ -96,7 +96,7 @@ void CanonShaping::reorderMarks(const LEUnicode *inChars, le_int32 charCount, le le_int32 index = indices[i]; outChars[i] = inChars[index]; - glyphStorage.setCharIndex(out, index, status); + glyphStorage.setCharIndex(out, index, success); } LE_DELETE_ARRAY(indices); diff --git a/jdk/src/share/native/sun/font/layout/CanonShaping.h b/jdk/src/share/native/sun/font/layout/CanonShaping.h index 62ad919b965..5d6a097e11c 100644 --- a/jdk/src/share/native/sun/font/layout/CanonShaping.h +++ b/jdk/src/share/native/sun/font/layout/CanonShaping.h @@ -42,7 +42,9 @@ class U_LAYOUT_API CanonShaping /* not : public UObject because all members are { public: static const le_uint8 glyphSubstitutionTable[]; + static const size_t glyphSubstitutionTableLen; static const le_uint8 glyphDefinitionTable[]; + static const size_t glyphDefinitionTableLen; static void reorderMarks(const LEUnicode *inChars, le_int32 charCount, le_bool rightToLeft, LEUnicode *outChars, LEGlyphStorage &glyphStorage); diff --git a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.cpp b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.cpp index af600444007..08e7f7732c8 100644 --- a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.cpp +++ b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.cpp @@ -37,24 +37,51 @@ U_NAMESPACE_BEGIN -le_int32 ClassDefinitionTable::getGlyphClass(LEGlyphID glyphID) const +le_int32 ClassDefinitionTable::getGlyphClass(const LETableReference& base, LEGlyphID glyphID, LEErrorCode &success) const { + LEReferenceTo thisRef(base, success); + if (LE_FAILURE(success)) return 0; + + switch(SWAPW(classFormat)) { + case 0: + return 0; + + case 1: + { + const LEReferenceTo f1Table(thisRef, success); + return f1Table->getGlyphClass(f1Table, glyphID, success); + } + + case 2: + { + const LEReferenceTo f2Table(thisRef, success); + return f2Table->getGlyphClass(f2Table, glyphID, success); + } + + default: + return 0; + } +} + +le_bool ClassDefinitionTable::hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const +{ + LEReferenceTo thisRef(base, success); + if (LE_FAILURE(success)) return 0; + switch(SWAPW(classFormat)) { case 0: return 0; case 1: { - const ClassDefFormat1Table *f1Table = (const ClassDefFormat1Table *) this; - - return f1Table->getGlyphClass(glyphID); + const LEReferenceTo f1Table(thisRef, success); + return f1Table->hasGlyphClass(f1Table, glyphClass, success); } case 2: { - const ClassDefFormat2Table *f2Table = (const ClassDefFormat2Table *) this; - - return f2Table->getGlyphClass(glyphID); + const LEReferenceTo f2Table(thisRef, success); + return f2Table->hasGlyphClass(f2Table, glyphClass, success); } default: @@ -62,51 +89,32 @@ le_int32 ClassDefinitionTable::getGlyphClass(LEGlyphID glyphID) const } } -le_bool ClassDefinitionTable::hasGlyphClass(le_int32 glyphClass) const +le_int32 ClassDefFormat1Table::getGlyphClass(const LETableReference& base, LEGlyphID glyphID, LEErrorCode &success) const { - switch(SWAPW(classFormat)) { - case 0: - return 0; + if(LE_FAILURE(success)) return 0; - case 1: - { - const ClassDefFormat1Table *f1Table = (const ClassDefFormat1Table *) this; - - return f1Table->hasGlyphClass(glyphClass); - } - - case 2: - { - const ClassDefFormat2Table *f2Table = (const ClassDefFormat2Table *) this; - - return f2Table->hasGlyphClass(glyphClass); - } - - default: - return 0; - } -} - -le_int32 ClassDefFormat1Table::getGlyphClass(LEGlyphID glyphID) const -{ + le_uint16 count = SWAPW(glyphCount); + LEReferenceToArrayOf classValueArrayRef(base, success, &classValueArray[0], count); TTGlyphID ttGlyphID = (TTGlyphID) LE_GET_GLYPH(glyphID); TTGlyphID firstGlyph = SWAPW(startGlyph); - TTGlyphID lastGlyph = firstGlyph + SWAPW(glyphCount); + TTGlyphID lastGlyph = firstGlyph + count; - if (ttGlyphID >= firstGlyph && ttGlyphID < lastGlyph) { - return SWAPW(classValueArray[ttGlyphID - firstGlyph]); + if (LE_SUCCESS(success) && ttGlyphID >= firstGlyph && ttGlyphID < lastGlyph) { + return SWAPW( classValueArrayRef(ttGlyphID - firstGlyph, success) ); } return 0; } -le_bool ClassDefFormat1Table::hasGlyphClass(le_int32 glyphClass) const +le_bool ClassDefFormat1Table::hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const { - le_uint16 count = SWAPW(glyphCount); + if(LE_FAILURE(success)) return 0; + le_uint16 count = SWAPW(glyphCount); + LEReferenceToArrayOf classValueArrayRef(base, success, &classValueArray[0], count); int i; - for (i = 0; i < count; i += 1) { - if (SWAPW(classValueArray[i]) == glyphClass) { + for (i = 0; LE_SUCCESS(success)&& (i < count); i += 1) { + if (SWAPW(classValueArrayRef(i,success)) == glyphClass) { return TRUE; } } @@ -114,27 +122,31 @@ le_bool ClassDefFormat1Table::hasGlyphClass(le_int32 glyphClass) const return FALSE; } -le_int32 ClassDefFormat2Table::getGlyphClass(LEGlyphID glyphID) const +le_int32 ClassDefFormat2Table::getGlyphClass(const LETableReference& base, LEGlyphID glyphID, LEErrorCode &success) const { + if(LE_FAILURE(success)) return 0; TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(glyphID); le_uint16 rangeCount = SWAPW(classRangeCount); + LEReferenceToArrayOf classRangeRecordArrayRef(base, success, &classRangeRecordArray[0], rangeCount); le_int32 rangeIndex = - OpenTypeUtilities::getGlyphRangeIndex(ttGlyph, classRangeRecordArray, rangeCount); + OpenTypeUtilities::getGlyphRangeIndex(ttGlyph, classRangeRecordArrayRef, success); - if (rangeIndex < 0) { + if (rangeIndex < 0 || LE_FAILURE(success)) { return 0; } - return SWAPW(classRangeRecordArray[rangeIndex].rangeValue); + return SWAPW(classRangeRecordArrayRef(rangeIndex, success).rangeValue); } -le_bool ClassDefFormat2Table::hasGlyphClass(le_int32 glyphClass) const +le_bool ClassDefFormat2Table::hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const { + if(LE_FAILURE(success)) return 0; le_uint16 rangeCount = SWAPW(classRangeCount); + LEReferenceToArrayOf classRangeRecordArrayRef(base, success, &classRangeRecordArray[0], rangeCount); int i; - for (i = 0; i < rangeCount; i += 1) { - if (SWAPW(classRangeRecordArray[i].rangeValue) == glyphClass) { + for (i = 0; i < rangeCount && LE_SUCCESS(success); i += 1) { + if (SWAPW(classRangeRecordArrayRef(i,success).rangeValue) == glyphClass) { return TRUE; } } diff --git a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h index a298e85c626..410119145a5 100644 --- a/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h +++ b/jdk/src/share/native/sun/font/layout/ClassDefinitionTables.h @@ -46,8 +46,20 @@ struct ClassDefinitionTable { le_uint16 classFormat; - le_int32 getGlyphClass(LEGlyphID glyphID) const; - le_bool hasGlyphClass(le_int32 glyphClass) const; + le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; + le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const; + + le_int32 getGlyphClass(LEGlyphID glyphID) const { + LETableReference base((const le_uint8*)this); + LEErrorCode ignored = LE_NO_ERROR; + return getGlyphClass(base,glyphID,ignored); + } + + le_bool hasGlyphClass(le_int32 glyphClass) const { + LETableReference base((const le_uint8*)this); + LEErrorCode ignored = LE_NO_ERROR; + return hasGlyphClass(base,glyphClass,ignored); + } }; struct ClassDefFormat1Table : ClassDefinitionTable @@ -56,9 +68,11 @@ struct ClassDefFormat1Table : ClassDefinitionTable le_uint16 glyphCount; le_uint16 classValueArray[ANY_NUMBER]; - le_int32 getGlyphClass(LEGlyphID glyphID) const; - le_bool hasGlyphClass(le_int32 glyphClass) const; + le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; + le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const; }; +LE_VAR_ARRAY(ClassDefFormat1Table, classValueArray) + struct ClassRangeRecord { @@ -72,9 +86,10 @@ struct ClassDefFormat2Table : ClassDefinitionTable le_uint16 classRangeCount; GlyphRangeRecord classRangeRecordArray[ANY_NUMBER]; - le_int32 getGlyphClass(LEGlyphID glyphID) const; - le_bool hasGlyphClass(le_int32 glyphClass) const; + le_int32 getGlyphClass(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; + le_bool hasGlyphClass(const LETableReference &base, le_int32 glyphClass, LEErrorCode &success) const; }; +LE_VAR_ARRAY(ClassDefFormat2Table, classRangeRecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp index a7a2386fa3c..85f9fc7ab22 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.cpp @@ -43,13 +43,15 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphInsertionProcessor2) -ContextualGlyphInsertionProcessor2::ContextualGlyphInsertionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : StateTableProcessor2(morphSubtableHeader) +ContextualGlyphInsertionProcessor2::ContextualGlyphInsertionProcessor2( + const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : StateTableProcessor2(morphSubtableHeader, success) { - contextualGlyphHeader = (const ContextualGlyphInsertionHeader2 *) morphSubtableHeader; - le_uint32 insertionTableOffset = SWAPL(contextualGlyphHeader->insertionTableOffset); - insertionTable = ((le_uint16 *) ((char *)&stateTableHeader->stHeader + insertionTableOffset)); - entryTable = (const ContextualGlyphInsertionStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); + contextualGlyphHeader = LEReferenceTo(morphSubtableHeader, success); + if(LE_FAILURE(success) || !contextualGlyphHeader.isValid()) return; + le_uint32 insertionTableOffset = SWAPL(contextualGlyphHeader->insertionTableOffset); + insertionTable = LEReferenceToArrayOf(stHeader, success, insertionTableOffset, LE_UNBOUNDED_ARRAY); + entryTable = LEReferenceToArrayOf(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY); } ContextualGlyphInsertionProcessor2::~ContextualGlyphInsertionProcessor2() @@ -61,93 +63,62 @@ void ContextualGlyphInsertionProcessor2::beginStateTable() markGlyph = 0; } -le_uint16 ContextualGlyphInsertionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +void ContextualGlyphInsertionProcessor2::doInsertion(LEGlyphStorage &glyphStorage, + le_int16 atGlyph, + le_int16 &index, + le_int16 count, + le_bool /* isKashidaLike */, + le_bool isBefore, + LEErrorCode &success) { + LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(atGlyph, count + 1, success); + + if(LE_FAILURE(success) || insertGlyphs==NULL) { + return; + } + + // Note: Kashida vs Split Vowel seems to only affect selection and highlighting. + // We note the flag, but do not layout different. + // https://developer.apple.com/fonts/TTRefMan/RM06/Chap6mort.html + + le_int16 targetIndex = 0; + if(isBefore) { + // insert at beginning + insertGlyphs[targetIndex++] = glyphStorage[atGlyph]; + } else { + // insert at end + insertGlyphs[count] = glyphStorage[atGlyph]; + } + + while(count--) { + insertGlyphs[targetIndex++] = insertionTable.getObject(index++, success); + } + glyphStorage.applyInsertions(); +} + +le_uint16 ContextualGlyphInsertionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, + EntryTableIndex2 index, LEErrorCode &success) { - const ContextualGlyphInsertionStateEntry2 *entry = &entryTable[index]; + const ContextualGlyphInsertionStateEntry2 *entry = entryTable.getAlias(index, success); + + if(LE_FAILURE(success)) return 0; // TODO- which state? + le_uint16 newState = SWAPW(entry->newStateIndex); le_uint16 flags = SWAPW(entry->flags); - le_int16 currIndex = SWAPW(entry->currentInsertionListIndex); - le_int16 markIndex = SWAPW(entry->markedInsertionListIndex); - int i = 0; + le_int16 markIndex = SWAPW(entry->markedInsertionListIndex); if (markIndex > 0) { le_int16 count = (flags & cgiMarkedInsertCountMask) >> 5; - if (!(flags & cgiMarkedIsKashidaLike)) { - // extra glyph(s) will be added directly before/after the specified marked glyph - if (!(flags & cgiMarkInsertBefore)) { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); - for (i = 0; i < count; i++, markIndex++) { - insertGlyphs[i] = insertionTable[markIndex]; - } - insertGlyphs[i] = glyphStorage[markGlyph]; - glyphStorage.applyInsertions(); - } else { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); - insertGlyphs[0] = glyphStorage[markGlyph]; - for (i = 1; i < count + 1; i++, markIndex++) { - insertGlyphs[i] = insertionTable[markIndex]; - } - glyphStorage.applyInsertions(); - } - } else { - // inserted as a split-vowel-like insertion - // extra glyph(s) will be inserted some distance away from the marked glyph - if (!(flags & cgiMarkInsertBefore)) { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); - for (i = 0; i < count; i++, markIndex++) { - insertGlyphs[i] = insertionTable[markIndex]; - } - insertGlyphs[i] = glyphStorage[markGlyph]; - glyphStorage.applyInsertions(); - } else { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(markGlyph, count + 1); - insertGlyphs[0] = glyphStorage[markGlyph]; - for (i = 1; i < count + 1; i++, markIndex++) { - insertGlyphs[i] = insertionTable[markIndex]; - } - glyphStorage.applyInsertions(); - } - } + le_bool isKashidaLike = (flags & cgiMarkedIsKashidaLike); + le_bool isBefore = (flags & cgiMarkInsertBefore); + doInsertion(glyphStorage, markGlyph, markIndex, count, isKashidaLike, isBefore, success); } + le_int16 currIndex = SWAPW(entry->currentInsertionListIndex); if (currIndex > 0) { le_int16 count = flags & cgiCurrentInsertCountMask; - if (!(flags & cgiCurrentIsKashidaLike)) { - // extra glyph(s) will be added directly before/after the specified current glyph - if (!(flags & cgiCurrentInsertBefore)) { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); - for (i = 0; i < count; i++, currIndex++) { - insertGlyphs[i] = insertionTable[currIndex]; - } - insertGlyphs[i] = glyphStorage[currGlyph]; - glyphStorage.applyInsertions(); - } else { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); - insertGlyphs[0] = glyphStorage[currGlyph]; - for (i = 1; i < count + 1; i++, currIndex++) { - insertGlyphs[i] = insertionTable[currIndex]; - } - glyphStorage.applyInsertions(); - } - } else { - // inserted as a split-vowel-like insertion - // extra glyph(s) will be inserted some distance away from the current glyph - if (!(flags & cgiCurrentInsertBefore)) { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); - for (i = 0; i < count; i++, currIndex++) { - insertGlyphs[i] = insertionTable[currIndex]; - } - insertGlyphs[i] = glyphStorage[currGlyph]; - glyphStorage.applyInsertions(); - } else { - LEGlyphID *insertGlyphs = glyphStorage.insertGlyphs(currGlyph, count + 1); - insertGlyphs[0] = glyphStorage[currGlyph]; - for (i = 1; i < count + 1; i++, currIndex++) { - insertGlyphs[i] = insertionTable[currIndex]; - } - glyphStorage.applyInsertions(); - } - } + le_bool isKashidaLike = (flags & cgiCurrentIsKashidaLike); + le_bool isBefore = (flags & cgiCurrentInsertBefore); + doInsertion(glyphStorage, currGlyph, currIndex, count, isKashidaLike, isBefore, success); } if (flags & cgiSetMark) { diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h index c53c4c9352b..c02da35ed6d 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphInsertionProc2.h @@ -53,11 +53,12 @@ class ContextualGlyphInsertionProcessor2 : public StateTableProcessor2 public: virtual void beginStateTable(); - virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, + le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success); virtual void endStateTable(); - ContextualGlyphInsertionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + ContextualGlyphInsertionProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~ContextualGlyphInsertionProcessor2(); /** @@ -77,12 +78,28 @@ public: private: ContextualGlyphInsertionProcessor2(); + /** + * Perform the actual insertion + * @param atGlyph index of glyph to insert at + * @param index index into the insertionTable (in/out) + * @param count number of insertions + * @param isKashidaLike Kashida like (vs Split Vowel like). No effect currently. + * @param isBefore if true, insert extra glyphs before the marked glyph + */ + void doInsertion(LEGlyphStorage &glyphStorage, + le_int16 atGlyph, + le_int16 &index, + le_int16 count, + le_bool isKashidaLike, + le_bool isBefore, + LEErrorCode &success); + + protected: le_int32 markGlyph; - const le_uint16* insertionTable; - const ContextualGlyphInsertionStateEntry2 *entryTable; - const ContextualGlyphInsertionHeader2 *contextualGlyphHeader; - + LEReferenceToArrayOf insertionTable; + LEReferenceToArrayOf entryTable; + LEReferenceTo contextualGlyphHeader; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp index 7c659534f09..87fdf4d3aab 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.cpp @@ -43,13 +43,18 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor) -ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader) - : StateTableProcessor(morphSubtableHeader) +ContextualGlyphSubstitutionProcessor::ContextualGlyphSubstitutionProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : StateTableProcessor(morphSubtableHeader, success), entryTable(), contextualGlyphSubstitutionHeader(morphSubtableHeader, success) { - contextualGlyphSubstitutionHeader = (const ContextualGlyphSubstitutionHeader *) morphSubtableHeader; - substitutionTableOffset = SWAPW(contextualGlyphSubstitutionHeader->substitutionTableOffset); + contextualGlyphSubstitutionHeader.orphan(); + substitutionTableOffset = SWAPW(contextualGlyphSubstitutionHeader->substitutionTableOffset); - entryTable = (const ContextualGlyphSubstitutionStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset); + + entryTable = LEReferenceToArrayOf(stateTableHeader, success, + (const ContextualGlyphSubstitutionStateEntry*)(&stateTableHeader->stHeader), + entryTableOffset, LE_UNBOUNDED_ARRAY); + int16Table = LEReferenceToArrayOf(stateTableHeader, success, (const le_int16*)(&stateTableHeader->stHeader), + 0, LE_UNBOUNDED_ARRAY); // rest of the table as le_int16s } ContextualGlyphSubstitutionProcessor::~ContextualGlyphSubstitutionProcessor() @@ -63,27 +68,26 @@ void ContextualGlyphSubstitutionProcessor::beginStateTable() ByteOffset ContextualGlyphSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index) { - const ContextualGlyphSubstitutionStateEntry *entry = &entryTable[index]; - ByteOffset newState = SWAPW(entry->newStateOffset); - le_int16 flags = SWAPW(entry->flags); - WordOffset markOffset = SWAPW(entry->markOffset); - WordOffset currOffset = SWAPW(entry->currOffset); + LEErrorCode success = LE_NO_ERROR; + const ContextualGlyphSubstitutionStateEntry *entry = entryTable.getAlias(index, success); + ByteOffset newState = SWAPW(entry->newStateOffset); + le_int16 flags = SWAPW(entry->flags); + WordOffset markOffset = SWAPW(entry->markOffset); + WordOffset currOffset = SWAPW(entry->currOffset); - if (markOffset != 0) { - const le_int16 *table = (const le_int16 *) ((char *) &stateTableHeader->stHeader + markOffset * 2); - LEGlyphID mGlyph = glyphStorage[markGlyph]; - TTGlyphID newGlyph = SWAPW(table[LE_GET_GLYPH(mGlyph)]); + if (markOffset != 0 && LE_SUCCESS(success)) { + LEGlyphID mGlyph = glyphStorage[markGlyph]; + TTGlyphID newGlyph = SWAPW(int16Table.getObject(markOffset + LE_GET_GLYPH(mGlyph), success)); // whew. - glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph); - } + glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph); + } - if (currOffset != 0) { - const le_int16 *table = (const le_int16 *) ((char *) &stateTableHeader->stHeader + currOffset * 2); - LEGlyphID thisGlyph = glyphStorage[currGlyph]; - TTGlyphID newGlyph = SWAPW(table[LE_GET_GLYPH(thisGlyph)]); + if (currOffset != 0) { + LEGlyphID thisGlyph = glyphStorage[currGlyph]; + TTGlyphID newGlyph = SWAPW(int16Table.getObject(currOffset + LE_GET_GLYPH(thisGlyph), success)); // whew. - glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph); - } + glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + } if (flags & cgsSetMark) { markGlyph = currGlyph; diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h index e93585e9bcb..136398f7661 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc.h @@ -56,7 +56,7 @@ public: virtual void endStateTable(); - ContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader); + ContextualGlyphSubstitutionProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~ContextualGlyphSubstitutionProcessor(); /** @@ -78,11 +78,11 @@ private: protected: ByteOffset substitutionTableOffset; - const ContextualGlyphSubstitutionStateEntry *entryTable; - + LEReferenceToArrayOf entryTable; + LEReferenceToArrayOf int16Table; le_int32 markGlyph; - const ContextualGlyphSubstitutionHeader *contextualGlyphSubstitutionHeader; + LEReferenceTo contextualGlyphSubstitutionHeader; }; diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp index 0bd09752cc3..6e8d070be99 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.cpp @@ -43,13 +43,14 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ContextualGlyphSubstitutionProcessor2) -ContextualGlyphSubstitutionProcessor2::ContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : StateTableProcessor2(morphSubtableHeader) +ContextualGlyphSubstitutionProcessor2::ContextualGlyphSubstitutionProcessor2( + const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : StateTableProcessor2(morphSubtableHeader, success), contextualGlyphHeader(morphSubtableHeader, success) { - contextualGlyphHeader = (const ContextualGlyphHeader2 *) morphSubtableHeader; + if(LE_FAILURE(success)) return; le_uint32 perGlyphTableOffset = SWAPL(contextualGlyphHeader->perGlyphTableOffset); - perGlyphTable = ((le_uint32 *) ((char *)&stateTableHeader->stHeader + perGlyphTableOffset)); - entryTable = (const ContextualGlyphStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); + perGlyphTable = LEReferenceToArrayOf (stHeader, success, perGlyphTableOffset, LE_UNBOUNDED_ARRAY); + entryTable = LEReferenceToArrayOf(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY); } ContextualGlyphSubstitutionProcessor2::~ContextualGlyphSubstitutionProcessor2() @@ -61,25 +62,28 @@ void ContextualGlyphSubstitutionProcessor2::beginStateTable() markGlyph = 0; } -le_uint16 ContextualGlyphSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +le_uint16 ContextualGlyphSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, + EntryTableIndex2 index, LEErrorCode &success) { - const ContextualGlyphStateEntry2 *entry = &entryTable[index]; + if(LE_FAILURE(success)) return 0; + const ContextualGlyphStateEntry2 *entry = entryTable.getAlias(index, success); + if(LE_FAILURE(success)) return 0; le_uint16 newState = SWAPW(entry->newStateIndex); le_uint16 flags = SWAPW(entry->flags); le_int16 markIndex = SWAPW(entry->markIndex); le_int16 currIndex = SWAPW(entry->currIndex); if (markIndex != -1) { - le_uint32 offset = SWAPL(perGlyphTable[markIndex]); + le_uint32 offset = SWAPL(perGlyphTable(markIndex, success)); LEGlyphID mGlyph = glyphStorage[markGlyph]; - TTGlyphID newGlyph = lookup(offset, mGlyph); + TTGlyphID newGlyph = lookup(offset, mGlyph, success); glyphStorage[markGlyph] = LE_SET_GLYPH(mGlyph, newGlyph); } if (currIndex != -1) { - le_uint32 offset = SWAPL(perGlyphTable[currIndex]); + le_uint32 offset = SWAPL(perGlyphTable(currIndex, success)); LEGlyphID thisGlyph = glyphStorage[currGlyph]; - TTGlyphID newGlyph = lookup(offset, thisGlyph); + TTGlyphID newGlyph = lookup(offset, thisGlyph, success); glyphStorage[currGlyph] = LE_SET_GLYPH(thisGlyph, newGlyph); } @@ -94,26 +98,30 @@ le_uint16 ContextualGlyphSubstitutionProcessor2::processStateEntry(LEGlyphStorag return newState; } -TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyphID gid) +TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyphID gid, LEErrorCode &success) { - LookupTable *lookupTable = ((LookupTable *) ((char *)perGlyphTable + offset)); - le_int16 format = SWAPW(lookupTable->format); TTGlyphID newGlyph = 0xFFFF; + if(LE_FAILURE(success)) return newGlyph; + LEReferenceTo lookupTable(perGlyphTable, success, offset); + if(LE_FAILURE(success)) return newGlyph; + le_int16 format = SWAPW(lookupTable->format); switch (format) { case ltfSimpleArray: { #ifdef TEST_FORMAT // Disabled pending for design review - SimpleArrayLookupTable *lookupTable0 = (SimpleArrayLookupTable *) lookupTable; + LEReferenceTo lookupTable0(lookupTable, success); + LEReferenceToArrayOf valueArray(lookupTable0, success, &lookupTable0->valueArray[0], LE_UNBOUNDED_ARRAY); + if(LE_FAILURE(success)) return newGlyph; TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); - newGlyph = SWAPW(lookupTable0->valueArray[glyphCode]); + newGlyph = SWAPW(lookupTable0->valueArray(glyphCode, success)); #endif break; } case ltfSegmentSingle: { #ifdef TEST_FORMAT // Disabled pending for design review - SegmentSingleLookupTable *lookupTable2 = (SegmentSingleLookupTable *) lookupTable; + LEReferenceTo lookupTable2 = (SegmentSingleLookupTable *) lookupTable; const LookupSegment *segment = lookupTable2->lookupSegment(lookupTable2->segments, gid); if (segment != NULL) { newGlyph = SWAPW(segment->value); @@ -129,8 +137,8 @@ TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyp { #ifdef TEST_FORMAT // Disabled pending for design review - SingleTableLookupTable *lookupTable6 = (SingleTableLookupTable *) lookupTable; - const LookupSingle *segment = lookupTable6->lookupSingle(lookupTable6->entries, gid); + LEReferenceTo lookupTable6 = (SingleTableLookupTable *) lookupTable; + const LEReferenceTo segment = lookupTable6->lookupSingle(lookupTable6->entries, gid); if (segment != NULL) { newGlyph = SWAPW(segment->value); } @@ -138,12 +146,15 @@ TTGlyphID ContextualGlyphSubstitutionProcessor2::lookup(le_uint32 offset, LEGlyp break; } case ltfTrimmedArray: { - TrimmedArrayLookupTable *lookupTable8 = (TrimmedArrayLookupTable *) lookupTable; + LEReferenceTo lookupTable8(lookupTable, success); + if (LE_FAILURE(success)) return newGlyph; TTGlyphID firstGlyph = SWAPW(lookupTable8->firstGlyph); - TTGlyphID lastGlyph = firstGlyph + SWAPW(lookupTable8->glyphCount); + TTGlyphID glyphCount = SWAPW(lookupTable8->glyphCount); + TTGlyphID lastGlyph = firstGlyph + glyphCount; TTGlyphID glyphCode = (TTGlyphID) LE_GET_GLYPH(gid); if ((glyphCode >= firstGlyph) && (glyphCode < lastGlyph)) { - newGlyph = SWAPW(lookupTable8->valueArray[glyphCode - firstGlyph]); + LEReferenceToArrayOf valueArray(lookupTable8, success, &lookupTable8->valueArray[0], glyphCount); + newGlyph = SWAPW(valueArray(glyphCode - firstGlyph, success)); } } default: diff --git a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h index 0f63012c7f5..e60d8c6a7cf 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h +++ b/jdk/src/share/native/sun/font/layout/ContextualGlyphSubstProc2.h @@ -52,11 +52,11 @@ class ContextualGlyphSubstitutionProcessor2 : public StateTableProcessor2 public: virtual void beginStateTable(); - virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success); virtual void endStateTable(); - ContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + ContextualGlyphSubstitutionProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~ContextualGlyphSubstitutionProcessor2(); /** @@ -75,16 +75,16 @@ public: private: ContextualGlyphSubstitutionProcessor2(); - TTGlyphID lookup(le_uint32 offset, LEGlyphID gid); + TTGlyphID lookup(le_uint32 offset, LEGlyphID gid, LEErrorCode &success); protected: - const le_uint32* perGlyphTable; - const ContextualGlyphStateEntry2 *entryTable; + LEReferenceToArrayOf perGlyphTable; + LEReferenceToArrayOf entryTable; le_int16 perGlyphTableFormat; le_int32 markGlyph; - const ContextualGlyphHeader2 *contextualGlyphHeader; + LEReferenceTo contextualGlyphHeader; }; diff --git a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp index c799fc957e8..5446f9bebac 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.cpp @@ -217,7 +217,7 @@ le_uint32 ContextualSubstitutionFormat1Subtable::process(const LookupProcessor * } LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success); if (coverageIndex >= 0) { le_uint16 srSetCount = SWAPW(subRuleSetCount); @@ -266,7 +266,7 @@ le_uint32 ContextualSubstitutionFormat2Subtable::process(const LookupProcessor * } LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success); if (coverageIndex >= 0) { const ClassDefinitionTable *classDefinitionTable = @@ -394,7 +394,7 @@ le_uint32 ChainingContextualSubstitutionFormat1Subtable::process(const LookupPro } LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success); if (coverageIndex >= 0) { le_uint16 srSetCount = SWAPW(chainSubRuleSetCount); @@ -465,7 +465,7 @@ le_uint32 ChainingContextualSubstitutionFormat2Subtable::process(const LookupPro } LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(lookupProcessor->getReference(), glyph, success); if (coverageIndex >= 0) { const ClassDefinitionTable *backtrackClassDefinitionTable = diff --git a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h index 9df57fee2eb..d230699ec48 100644 --- a/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h +++ b/jdk/src/share/native/sun/font/layout/ContextualSubstSubtables.h @@ -43,6 +43,7 @@ #include "GlyphSubstitutionTables.h" #include "GlyphIterator.h" #include "LookupProcessor.h" +#include "LETableReference.h" U_NAMESPACE_BEGIN @@ -88,6 +89,8 @@ struct ContextualSubstitutionFormat1Subtable : ContextualSubstitutionSubtable le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; +LE_VAR_ARRAY(ContextualSubstitutionFormat1Subtable, subRuleSetTableOffsetArray) + struct SubRuleSetTable { @@ -95,6 +98,7 @@ struct SubRuleSetTable Offset subRuleTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(SubRuleSetTable, subRuleTableOffsetArray) // NOTE: Multiple variable size arrays!! struct SubRuleTable @@ -104,6 +108,7 @@ struct SubRuleTable TTGlyphID inputGlyphArray[ANY_NUMBER]; //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(SubRuleTable, inputGlyphArray) struct ContextualSubstitutionFormat2Subtable : ContextualSubstitutionSubtable { @@ -113,12 +118,16 @@ struct ContextualSubstitutionFormat2Subtable : ContextualSubstitutionSubtable le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; +LE_VAR_ARRAY(ContextualSubstitutionFormat2Subtable, subClassSetTableOffsetArray) + struct SubClassSetTable { le_uint16 subClassRuleCount; Offset subClassRuleTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(SubClassSetTable, subClassRuleTableOffsetArray) + // NOTE: Multiple variable size arrays!! struct SubClassRuleTable @@ -128,6 +137,8 @@ struct SubClassRuleTable le_uint16 classArray[ANY_NUMBER]; //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(SubClassRuleTable, classArray) + // NOTE: This isn't a subclass of GlyphSubstitutionSubtable 'cause // it has an array of coverage tables instead of a single coverage table... @@ -143,6 +154,7 @@ struct ContextualSubstitutionFormat3Subtable le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; +LE_VAR_ARRAY(ContextualSubstitutionFormat3Subtable, coverageTableOffsetArray) struct ChainingContextualSubstitutionSubtable : ContextualSubstitutionBase { @@ -156,6 +168,8 @@ struct ChainingContextualSubstitutionFormat1Subtable : ChainingContextualSubstit le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; +LE_VAR_ARRAY(ChainingContextualSubstitutionFormat1Subtable, chainSubRuleSetTableOffsetArray) + struct ChainSubRuleSetTable { @@ -163,6 +177,7 @@ struct ChainSubRuleSetTable Offset chainSubRuleTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(ChainSubRuleSetTable, chainSubRuleTableOffsetArray) // NOTE: Multiple variable size arrays!! struct ChainSubRuleTable @@ -176,6 +191,7 @@ struct ChainSubRuleTable //le_uint16 substCount; //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(ChainSubRuleTable, backtrackGlyphArray) struct ChainingContextualSubstitutionFormat2Subtable : ChainingContextualSubstitutionSubtable { @@ -187,12 +203,15 @@ struct ChainingContextualSubstitutionFormat2Subtable : ChainingContextualSubstit le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; +LE_VAR_ARRAY(ChainingContextualSubstitutionFormat2Subtable, chainSubClassSetTableOffsetArray) struct ChainSubClassSetTable { le_uint16 chainSubClassRuleCount; Offset chainSubClassRuleTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(ChainSubClassSetTable, chainSubClassRuleTableOffsetArray) + // NOTE: Multiple variable size arrays!! struct ChainSubClassRuleTable @@ -206,6 +225,7 @@ struct ChainSubClassRuleTable //le_uint16 substCount; //SubstitutionLookupRecord substLookupRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(ChainSubClassRuleTable, backtrackClassArray) // NOTE: This isn't a subclass of GlyphSubstitutionSubtable 'cause // it has arrays of coverage tables instead of a single coverage table... @@ -225,6 +245,8 @@ struct ChainingContextualSubstitutionFormat3Subtable le_uint32 process(const LookupProcessor *lookupProcessor, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; }; +LE_VAR_ARRAY(ChainingContextualSubstitutionFormat3Subtable, backtrackCoverageTableOffsetArray) + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/CoverageTables.h b/jdk/src/share/native/sun/font/layout/CoverageTables.h index 9705a841b69..dd47716a101 100644 --- a/jdk/src/share/native/sun/font/layout/CoverageTables.h +++ b/jdk/src/share/native/sun/font/layout/CoverageTables.h @@ -56,6 +56,8 @@ struct CoverageFormat1Table : CoverageTable le_int32 getGlyphCoverage(LEGlyphID glyphID) const; }; +LE_VAR_ARRAY(CoverageFormat1Table, glyphArray) + struct CoverageFormat2Table : CoverageTable { @@ -64,6 +66,7 @@ struct CoverageFormat2Table : CoverageTable le_int32 getGlyphCoverage(LEGlyphID glyphID) const; }; +LE_VAR_ARRAY(CoverageFormat2Table, rangeRecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp index e3a7d041efc..ff8ac3bed76 100644 --- a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.cpp @@ -39,10 +39,10 @@ U_NAMESPACE_BEGIN -le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID glyphID = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyphID); + le_int32 coverageIndex = getGlyphCoverage(base, glyphID, success); le_uint16 eeCount = SWAPW(entryExitCount); if (coverageIndex < 0 || coverageIndex >= eeCount) { @@ -51,7 +51,7 @@ le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const } LEPoint entryAnchor, exitAnchor; - Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); + Offset entryOffset = SWAPW(entryExitRecords[coverageIndex].entryAnchor); // TODO Offset exitOffset = SWAPW(entryExitRecords[coverageIndex].exitAnchor); if (entryOffset != 0) { diff --git a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h index 88d10b6097c..2e1fdd62141 100644 --- a/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h +++ b/jdk/src/share/native/sun/font/layout/CursiveAttachmentSubtables.h @@ -57,8 +57,9 @@ struct CursiveAttachmentSubtable : GlyphPositioningSubtable le_uint16 entryExitCount; EntryExitRecord entryExitRecords[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; }; +LE_VAR_ARRAY(CursiveAttachmentSubtable, entryExitRecords) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/DeviceTables.h b/jdk/src/share/native/sun/font/layout/DeviceTables.h index cf471b869d6..ba9e534249f 100644 --- a/jdk/src/share/native/sun/font/layout/DeviceTables.h +++ b/jdk/src/share/native/sun/font/layout/DeviceTables.h @@ -57,6 +57,7 @@ private: static const le_uint16 fieldSignBits[]; static const le_uint16 fieldBits[]; }; +LE_VAR_ARRAY(DeviceTable, deltaValues) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp index 7ecd2685635..76d945d02d0 100644 --- a/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/ExtensionSubtables.cpp @@ -47,6 +47,8 @@ U_NAMESPACE_BEGIN le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { + const LEReferenceTo thisRef(lookupProcessor->getReference(), success); // create a reference to this + if (LE_FAILURE(success)) { return 0; } @@ -55,9 +57,11 @@ le_uint32 ExtensionSubtable::process(const LookupProcessor *lookupProcessor, le_ if (elt != lookupType) { le_uint32 extOffset = READ_LONG(extensionOffset); - LookupSubtable *subtable = (LookupSubtable *) ((char *) this + extOffset); + LEReferenceTo subtable(thisRef, success, extOffset); - return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success); + if(LE_SUCCESS(success)) { + return lookupProcessor->applySubtable(subtable, elt, glyphIterator, fontInstance, success); + } } return 0; diff --git a/jdk/src/share/native/sun/font/layout/Features.cpp b/jdk/src/share/native/sun/font/layout/Features.cpp index c83ac05d97d..b44ae2e8e87 100644 --- a/jdk/src/share/native/sun/font/layout/Features.cpp +++ b/jdk/src/share/native/sun/font/layout/Features.cpp @@ -38,19 +38,20 @@ U_NAMESPACE_BEGIN -const FeatureTable *FeatureListTable::getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const +LEReferenceTo FeatureListTable::getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const { - if (featureIndex >= SWAPW(featureCount)) { - return 0; - } + if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) { + return LEReferenceTo(); + } Offset featureTableOffset = featureRecordArray[featureIndex].featureTableOffset; *featureTag = SWAPT(featureRecordArray[featureIndex].featureTag); - return (const FeatureTable *) ((char *) this + SWAPW(featureTableOffset)); + return LEReferenceTo(base, success, SWAPW(featureTableOffset)); } +#if 0 /* * Note: according to the OpenType Spec. v 1.4, the entries in the Feature * List Table are sorted alphabetically by feature tag; however, there seem @@ -82,5 +83,6 @@ const FeatureTable *FeatureListTable::getFeatureTable(LETag featureTag) const return 0; #endif } +#endif U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp index 173935cfd9c..ddd56b44494 100644 --- a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp +++ b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.cpp @@ -36,9 +36,12 @@ U_NAMESPACE_BEGIN -GDEFMarkFilter::GDEFMarkFilter(const GlyphDefinitionTableHeader *gdefTable) +GDEFMarkFilter::GDEFMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success) + : classDefTable(gdefTable->getGlyphClassDefinitionTable(gdefTable, success)) { - classDefTable = gdefTable->getGlyphClassDefinitionTable(); + if(!classDefTable.isValid()) { + success = LE_INTERNAL_ERROR; + } } GDEFMarkFilter::~GDEFMarkFilter() diff --git a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h index 64f79b862c7..c2ee9e758a2 100644 --- a/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h +++ b/jdk/src/share/native/sun/font/layout/GDEFMarkFilter.h @@ -46,13 +46,13 @@ U_NAMESPACE_BEGIN class GDEFMarkFilter : public UMemory, public LEGlyphFilter { private: - const GlyphClassDefinitionTable *classDefTable; + const LEReferenceTo classDefTable; GDEFMarkFilter(const GDEFMarkFilter &other); // forbid copying of this class GDEFMarkFilter &operator=(const GDEFMarkFilter &other); // forbid copying of this class public: - GDEFMarkFilter(const GlyphDefinitionTableHeader *gdefTable); + GDEFMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); virtual ~GDEFMarkFilter(); virtual le_bool accept(LEGlyphID glyph) const; diff --git a/jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp index 9321d5a01e2..e6da45df8cb 100644 --- a/jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine.cpp @@ -41,9 +41,10 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine) -GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable, LEErrorCode &success) + GXLayoutEngine::GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo &morphTable, LEErrorCode &success) : LayoutEngine(fontInstance, scriptCode, languageCode, 0, success), fMorphTable(morphTable) { + fMorphTable.orphan(); // nothing else to do? } @@ -70,7 +71,7 @@ le_int32 GXLayoutEngine::computeGlyphs(const LEUnicode chars[], le_int32 offset, return 0; } - fMorphTable->process(glyphStorage); + fMorphTable->process(fMorphTable, glyphStorage, success); return count; } diff --git a/jdk/src/share/native/sun/font/layout/GXLayoutEngine.h b/jdk/src/share/native/sun/font/layout/GXLayoutEngine.h index b7aa296ca0d..cc900a195a7 100644 --- a/jdk/src/share/native/sun/font/layout/GXLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine.h @@ -74,7 +74,7 @@ public: * * @internal */ - GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader *morphTable, LEErrorCode &success); + GXLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo &morphTable, LEErrorCode &success); /** * The destructor, virtual for correct polymorphic invocation. @@ -104,7 +104,7 @@ protected: * * @internal */ - const MorphTableHeader *fMorphTable; + LEReferenceTo fMorphTable; /** * This method does GX layout using the font's 'mort' table. It converts the diff --git a/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp index ae070c2f6ff..d4e385097fc 100644 --- a/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp +++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.cpp @@ -39,10 +39,10 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(GXLayoutEngine2) -GXLayoutEngine2::GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader2 *morphTable, le_int32 typoFlags, LEErrorCode &success) - : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fMorphTable(morphTable) +GXLayoutEngine2::GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo &morphTable, le_int32 typoFlags, LEErrorCode &success) + : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fMorphTable(morphTable) { - // nothing else to do? + // nothing else to do? } GXLayoutEngine2::~GXLayoutEngine2() @@ -68,7 +68,7 @@ le_int32 GXLayoutEngine2::computeGlyphs(const LEUnicode chars[], le_int32 offset return 0; } - fMorphTable->process(glyphStorage, fTypoFlags); + fMorphTable->process(fMorphTable, glyphStorage, fTypoFlags, success); return count; } diff --git a/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h index 9eded230c13..3b11f1409d1 100644 --- a/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h +++ b/jdk/src/share/native/sun/font/layout/GXLayoutEngine2.h @@ -73,7 +73,7 @@ public: * * @internal */ - GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const MorphTableHeader2 *morphTable, le_int32 typoFlags, LEErrorCode &success); + GXLayoutEngine2(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, const LEReferenceTo &morphTable, le_int32 typoFlags, LEErrorCode &success); /** * The destructor, virtual for correct polymorphic invocation. @@ -103,7 +103,7 @@ protected: * * @internal */ - const MorphTableHeader2 *fMorphTable; + const LEReferenceTo fMorphTable; /** * This method does GX layout using the font's 'mort' table. It converts the diff --git a/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp b/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp index 03e95cf9f84..f751b82d0d0 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.cpp @@ -36,24 +36,36 @@ U_NAMESPACE_BEGIN -const GlyphClassDefinitionTable *GlyphDefinitionTableHeader::getGlyphClassDefinitionTable() const +const LEReferenceTo +GlyphDefinitionTableHeader::getGlyphClassDefinitionTable(const LEReferenceTo& base, + LEErrorCode &success) const { - return (const GlyphClassDefinitionTable *) ((char *) this + SWAPW(glyphClassDefOffset)); + if(LE_FAILURE(success)) return LEReferenceTo(); + return LEReferenceTo(base, success, SWAPW(glyphClassDefOffset)); } -const AttachmentListTable *GlyphDefinitionTableHeader::getAttachmentListTable() const +const LEReferenceTo +GlyphDefinitionTableHeader::getAttachmentListTable(const LEReferenceTo& base, + LEErrorCode &success) const { - return (const AttachmentListTable *) ((char *) this + SWAPW(attachListOffset)); + if(LE_FAILURE(success)) return LEReferenceTo(); + return LEReferenceTo(base, success, SWAPW(attachListOffset)); } -const LigatureCaretListTable *GlyphDefinitionTableHeader::getLigatureCaretListTable() const +const LEReferenceTo +GlyphDefinitionTableHeader::getLigatureCaretListTable(const LEReferenceTo& base, + LEErrorCode &success) const { - return (const LigatureCaretListTable *) ((char *) this + SWAPW(ligCaretListOffset)); + if(LE_FAILURE(success)) return LEReferenceTo(); + return LEReferenceTo(base, success, SWAPW(ligCaretListOffset)); } -const MarkAttachClassDefinitionTable *GlyphDefinitionTableHeader::getMarkAttachClassDefinitionTable() const +const LEReferenceTo +GlyphDefinitionTableHeader::getMarkAttachClassDefinitionTable(const LEReferenceTo& base, + LEErrorCode &success) const { - return (const MarkAttachClassDefinitionTable *) ((char *) this + SWAPW(MarkAttachClassDefOffset)); + if(LE_FAILURE(success)) return LEReferenceTo(); + return LEReferenceTo(base, success, SWAPW(MarkAttachClassDefOffset)); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.h b/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.h index 631bf690376..6bf7ebc1044 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.h +++ b/jdk/src/share/native/sun/font/layout/GlyphDefinitionTables.h @@ -60,12 +60,14 @@ struct AttachmentListTable le_uint16 glyphCount; Offset attachPointTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(AttachmentListTable, attachPointTableOffsetArray) struct AttachPointTable { le_uint16 pointCount; le_uint16 pointIndexArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(AttachPointTable, pointIndexArray) struct LigatureCaretListTable { @@ -73,12 +75,14 @@ struct LigatureCaretListTable le_uint16 ligGlyphCount; Offset ligGlyphTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LigatureCaretListTable, ligGlyphTableOffsetArray) struct LigatureGlyphTable { le_uint16 caretCount; Offset caretValueTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LigatureGlyphTable, caretValueTableOffsetArray) struct CaretValueTable { @@ -111,10 +115,18 @@ struct GlyphDefinitionTableHeader Offset ligCaretListOffset; Offset MarkAttachClassDefOffset; - const GlyphClassDefinitionTable *getGlyphClassDefinitionTable() const; - const AttachmentListTable *getAttachmentListTable()const ; - const LigatureCaretListTable *getLigatureCaretListTable() const; - const MarkAttachClassDefinitionTable *getMarkAttachClassDefinitionTable() const; + const LEReferenceTo + getGlyphClassDefinitionTable(const LEReferenceTo& base, + LEErrorCode &success) const; + const LEReferenceTo + getAttachmentListTable(const LEReferenceTo& base, + LEErrorCode &success)const ; + const LEReferenceTo + getLigatureCaretListTable(const LEReferenceTo& base, + LEErrorCode &success) const; + const LEReferenceTo + getMarkAttachClassDefinitionTable(const LEReferenceTo& base, + LEErrorCode &success) const; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp b/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp index 2fea0e9df23..d0cd46732ed 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphIterator.cpp @@ -41,18 +41,21 @@ U_NAMESPACE_BEGIN GlyphIterator::GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, - FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader) + FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader) : direction(1), position(-1), nextLimit(-1), prevLimit(-1), glyphStorage(theGlyphStorage), glyphPositionAdjustments(theGlyphPositionAdjustments), srcIndex(-1), destIndex(-1), lookupFlags(theLookupFlags), featureMask(theFeatureMask), glyphGroup(0), - glyphClassDefinitionTable(NULL), markAttachClassDefinitionTable(NULL) + glyphClassDefinitionTable(), markAttachClassDefinitionTable() { + LEErrorCode success = LE_NO_ERROR; // TODO le_int32 glyphCount = glyphStorage.getGlyphCount(); - if (theGlyphDefinitionTableHeader != NULL) { - glyphClassDefinitionTable = theGlyphDefinitionTableHeader->getGlyphClassDefinitionTable(); - markAttachClassDefinitionTable = theGlyphDefinitionTableHeader->getMarkAttachClassDefinitionTable(); + if (theGlyphDefinitionTableHeader.isValid()) { + glyphClassDefinitionTable = theGlyphDefinitionTableHeader + -> getGlyphClassDefinitionTable(theGlyphDefinitionTableHeader, success); + markAttachClassDefinitionTable = theGlyphDefinitionTableHeader + ->getMarkAttachClassDefinitionTable(theGlyphDefinitionTableHeader, success); } nextLimit = glyphCount; @@ -380,6 +383,7 @@ void GlyphIterator::setCursiveGlyph() le_bool GlyphIterator::filterGlyph(le_uint32 index) const { + LEErrorCode success = LE_NO_ERROR; LEGlyphID glyphID = glyphStorage[index]; le_int32 glyphClass = gcdNoGlyphClass; @@ -387,8 +391,8 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const return TRUE; } - if (glyphClassDefinitionTable != NULL) { - glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphID); + if (glyphClassDefinitionTable.isValid()) { + glyphClass = glyphClassDefinitionTable->getGlyphClass(glyphClassDefinitionTable, glyphID, success); } switch (glyphClass) @@ -410,8 +414,9 @@ le_bool GlyphIterator::filterGlyph(le_uint32 index) const le_uint16 markAttachType = (lookupFlags & lfMarkAttachTypeMask) >> lfMarkAttachTypeShift; - if ((markAttachType != 0) && (markAttachClassDefinitionTable != NULL)) { - return markAttachClassDefinitionTable->getGlyphClass(glyphID) != markAttachType; + if ((markAttachType != 0) && (markAttachClassDefinitionTable.isValid())) { + return markAttachClassDefinitionTable + -> getGlyphClass(markAttachClassDefinitionTable, glyphID, success) != markAttachType; } return FALSE; @@ -461,6 +466,7 @@ le_bool GlyphIterator::nextInternal(le_uint32 delta) while (newPosition != nextLimit && delta > 0) { do { newPosition += direction; + //fprintf(stderr,"%s:%d:%s: newPosition = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, newPosition, delta); } while (newPosition != nextLimit && filterGlyph(newPosition)); delta -= 1; @@ -468,6 +474,7 @@ le_bool GlyphIterator::nextInternal(le_uint32 delta) position = newPosition; + //fprintf(stderr,"%s:%d:%s: exit position = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, position, delta); return position != nextLimit; } @@ -483,6 +490,7 @@ le_bool GlyphIterator::prevInternal(le_uint32 delta) while (newPosition != prevLimit && delta > 0) { do { newPosition -= direction; + //fprintf(stderr,"%s:%d:%s: newPosition = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, newPosition, delta); } while (newPosition != prevLimit && filterGlyph(newPosition)); delta -= 1; @@ -490,6 +498,7 @@ le_bool GlyphIterator::prevInternal(le_uint32 delta) position = newPosition; + //fprintf(stderr,"%s:%d:%s: exit position = %d, delta = %d\n", __FILE__, __LINE__, __FUNCTION__, position, delta); return position != prevLimit; } diff --git a/jdk/src/share/native/sun/font/layout/GlyphIterator.h b/jdk/src/share/native/sun/font/layout/GlyphIterator.h index 63d0aedda00..d8db62a1298 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphIterator.h +++ b/jdk/src/share/native/sun/font/layout/GlyphIterator.h @@ -49,7 +49,7 @@ class GlyphPositionAdjustments; class GlyphIterator : public UMemory { public: GlyphIterator(LEGlyphStorage &theGlyphStorage, GlyphPositionAdjustments *theGlyphPositionAdjustments, le_bool rightToLeft, le_uint16 theLookupFlags, - FeatureMask theFeatureMask, const GlyphDefinitionTableHeader *theGlyphDefinitionTableHeader); + FeatureMask theFeatureMask, const LEReferenceTo &theGlyphDefinitionTableHeader); GlyphIterator(GlyphIterator &that); @@ -117,8 +117,8 @@ private: FeatureMask featureMask; le_int32 glyphGroup; - const GlyphClassDefinitionTable *glyphClassDefinitionTable; - const MarkAttachClassDefinitionTable *markAttachClassDefinitionTable; + LEReferenceTo glyphClassDefinitionTable; + LEReferenceTo markAttachClassDefinitionTable; GlyphIterator &operator=(const GlyphIterator &other); // forbid copying of this class }; diff --git a/jdk/src/share/native/sun/font/layout/GlyphLookupTables.cpp b/jdk/src/share/native/sun/font/layout/GlyphLookupTables.cpp index 9cc6c06e5e8..179bf60d328 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphLookupTables.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphLookupTables.cpp @@ -37,21 +37,22 @@ U_NAMESPACE_BEGIN -le_bool GlyphLookupTableHeader::coversScript(LETag scriptTag) const +le_bool GlyphLookupTableHeader::coversScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const { - const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset)); + LEReferenceTo scriptListTable(base, success, SWAPW(scriptListOffset)); - return scriptListOffset != 0 && scriptListTable->findScript(scriptTag) != NULL; + return (scriptListOffset != 0) && scriptListTable->findScript(scriptListTable, scriptTag, success) .isValid(); } -le_bool GlyphLookupTableHeader::coversScriptAndLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch) const +le_bool GlyphLookupTableHeader::coversScriptAndLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const { - const ScriptListTable *scriptListTable = (const ScriptListTable *) ((char *)this + SWAPW(scriptListOffset)); - const LangSysTable *langSysTable = scriptListTable->findLanguage(scriptTag, languageTag, exactMatch); + LEReferenceTo scriptListTable(base, success, SWAPW(scriptListOffset)); + LEReferenceTo langSysTable = scriptListTable->findLanguage(scriptListTable, + scriptTag, languageTag, success, exactMatch); // FIXME: could check featureListOffset, lookupListOffset, and lookup count... // Note: don't have to SWAPW langSysTable->featureCount to check for non-zero. - return langSysTable != NULL && langSysTable->featureCount != 0; + return LE_SUCCESS(success)&&langSysTable.isValid() && langSysTable->featureCount != 0; } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GlyphLookupTables.h b/jdk/src/share/native/sun/font/layout/GlyphLookupTables.h index 4159c3814c6..ea1751a2bad 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphLookupTables.h +++ b/jdk/src/share/native/sun/font/layout/GlyphLookupTables.h @@ -49,8 +49,8 @@ struct GlyphLookupTableHeader Offset featureListOffset; Offset lookupListOffset; - le_bool coversScript(LETag scriptTag) const; - le_bool coversScriptAndLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const; + le_bool coversScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const; + le_bool coversScriptAndLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.cpp b/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.cpp index dd3894e33d4..55883199031 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.cpp @@ -41,16 +41,16 @@ U_NAMESPACE_BEGIN -void GlyphPositioningTableHeader::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft, +void GlyphPositioningTableHeader::process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft, LETag scriptTag, LETag languageTag, - const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, LEErrorCode &success, + const LEReferenceTo &glyphDefinitionTableHeader, LEErrorCode &success, const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const { if (LE_FAILURE(success)) { return; } - GlyphPositioningLookupProcessor processor(this, scriptTag, languageTag, featureMap, featureMapCount, featureOrder, success); + GlyphPositioningLookupProcessor processor(base, scriptTag, languageTag, featureMap, featureMapCount, featureOrder, success); if (LE_FAILURE(success)) { return; } diff --git a/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.h b/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.h index ef3c5e652f5..0c1066baeaf 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.h +++ b/jdk/src/share/native/sun/font/layout/GlyphPositioningTables.h @@ -40,6 +40,7 @@ #include "OpenTypeTables.h" #include "Lookups.h" #include "GlyphLookupTables.h" +#include "LETableReference.h" U_NAMESPACE_BEGIN @@ -51,9 +52,9 @@ struct GlyphDefinitionTableHeader; struct GlyphPositioningTableHeader : public GlyphLookupTableHeader { - void process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, + void process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, le_bool rightToLeft, LETag scriptTag, LETag languageTag, - const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, LEErrorCode &success, + const LEReferenceTo &glyphDefinitionTableHeader, LEErrorCode &success, const LEFontInstance *fontInstance, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool featureOrder) const; }; diff --git a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp index 22d251586a7..08b6c048e91 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.cpp @@ -57,7 +57,7 @@ typedef ContextualSubstitutionSubtable ContextualPositioningSubtable; typedef ChainingContextualSubstitutionSubtable ChainingContextualPositioningSubtable; GlyphPositioningLookupProcessor::GlyphPositioningLookupProcessor( - const GlyphPositioningTableHeader *glyphPositioningTableHeader, + const LEReferenceTo &glyphPositioningTableHeader, LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, @@ -65,7 +65,7 @@ GlyphPositioningLookupProcessor::GlyphPositioningLookupProcessor( le_bool featureOrder, LEErrorCode& success) : LookupProcessor( - (char *) glyphPositioningTableHeader, + glyphPositioningTableHeader, SWAPW(glyphPositioningTableHeader->scriptListOffset), SWAPW(glyphPositioningTableHeader->featureListOffset), SWAPW(glyphPositioningTableHeader->lookupListOffset), @@ -84,7 +84,7 @@ GlyphPositioningLookupProcessor::GlyphPositioningLookupProcessor() { } -le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, +le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LEReferenceTo &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const @@ -102,55 +102,55 @@ le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LookupSubtable *l case gpstSingle: { - const SinglePositioningSubtable *subtable = (const SinglePositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fontInstance); + delta = subtable->process(subtable, glyphIterator, fontInstance, success); break; } case gpstPair: { - const PairPositioningSubtable *subtable = (const PairPositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fontInstance); + delta = subtable->process(subtable, glyphIterator, fontInstance, success); break; } case gpstCursive: { - const CursiveAttachmentSubtable *subtable = (const CursiveAttachmentSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fontInstance); + delta = subtable->process(subtable, glyphIterator, fontInstance, success); break; } case gpstMarkToBase: { - const MarkToBasePositioningSubtable *subtable = (const MarkToBasePositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fontInstance); + delta = subtable->process(subtable, glyphIterator, fontInstance, success); break; } case gpstMarkToLigature: { - const MarkToLigaturePositioningSubtable *subtable = (const MarkToLigaturePositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fontInstance); + delta = subtable->process(subtable, glyphIterator, fontInstance, success); break; } case gpstMarkToMark: { - const MarkToMarkPositioningSubtable *subtable = (const MarkToMarkPositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fontInstance); + delta = subtable->process(subtable, glyphIterator, fontInstance, success); break; } case gpstContext: { - const ContextualPositioningSubtable *subtable = (const ContextualPositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, glyphIterator, fontInstance, success); break; @@ -158,7 +158,7 @@ le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LookupSubtable *l case gpstChainedContext: { - const ChainingContextualPositioningSubtable *subtable = (const ChainingContextualPositioningSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, glyphIterator, fontInstance, success); break; @@ -166,7 +166,7 @@ le_uint32 GlyphPositioningLookupProcessor::applySubtable(const LookupSubtable *l case gpstExtension: { - const ExtensionSubtable *subtable = (const ExtensionSubtable *) lookupSubtable; + LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, lookupType, glyphIterator, fontInstance, success); break; diff --git a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.h b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.h index 6001f2c9863..3e46e415d20 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.h +++ b/jdk/src/share/native/sun/font/layout/GlyphPosnLookupProc.h @@ -51,7 +51,7 @@ U_NAMESPACE_BEGIN class GlyphPositioningLookupProcessor : public LookupProcessor { public: - GlyphPositioningLookupProcessor(const GlyphPositioningTableHeader *glyphPositioningTableHeader, + GlyphPositioningLookupProcessor(const LEReferenceTo &glyphPositioningTableHeader, LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, @@ -61,7 +61,7 @@ public: virtual ~GlyphPositioningLookupProcessor(); - virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, + virtual le_uint32 applySubtable(const LEReferenceTo &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; protected: diff --git a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp index 850b7829318..d7b65aa8660 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.cpp @@ -51,7 +51,7 @@ U_NAMESPACE_BEGIN GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor( - const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader, + const LEReferenceTo &glyphSubstitutionTableHeader, LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, @@ -60,7 +60,7 @@ GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor( le_bool featureOrder, LEErrorCode& success) : LookupProcessor( - (char *) glyphSubstitutionTableHeader, + glyphSubstitutionTableHeader, SWAPW(glyphSubstitutionTableHeader->scriptListOffset), SWAPW(glyphSubstitutionTableHeader->featureListOffset), SWAPW(glyphSubstitutionTableHeader->lookupListOffset), @@ -73,7 +73,7 @@ GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor() { } -le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, +le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LEReferenceTo &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { if (LE_FAILURE(success)) { @@ -89,39 +89,39 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable * case gsstSingle: { - const SingleSubstitutionSubtable *subtable = (const SingleSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstMultiple: { - const MultipleSubstitutionSubtable *subtable = (const MultipleSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, success, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstAlternate: { - const AlternateSubstitutionSubtable *subtable = (const AlternateSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstLigature: { - const LigatureSubstitutionSubtable *subtable = (const LigatureSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstContext: { - const ContextualSubstitutionSubtable *subtable = (const ContextualSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, glyphIterator, fontInstance, success); break; @@ -129,7 +129,7 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable * case gsstChainingContext: { - const ChainingContextualSubstitutionSubtable *subtable = (const ChainingContextualSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, glyphIterator, fontInstance, success); break; @@ -137,7 +137,7 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable * case gsstExtension: { - const ExtensionSubtable *subtable = (const ExtensionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, lookupType, glyphIterator, fontInstance, success); break; diff --git a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.h b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.h index 154cc2b9236..11890482756 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.h +++ b/jdk/src/share/native/sun/font/layout/GlyphSubstLookupProc.h @@ -52,7 +52,7 @@ U_NAMESPACE_BEGIN class GlyphSubstitutionLookupProcessor : public LookupProcessor { public: - GlyphSubstitutionLookupProcessor(const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader, + GlyphSubstitutionLookupProcessor(const LEReferenceTo &glyphSubstitutionTableHeader, LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, @@ -63,7 +63,7 @@ public: virtual ~GlyphSubstitutionLookupProcessor(); - virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, + virtual le_uint32 applySubtable(const LEReferenceTo &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; protected: diff --git a/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp b/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp index bd056b60260..b60cdc53efd 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp +++ b/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.cpp @@ -42,11 +42,12 @@ U_NAMESPACE_BEGIN -le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage, +le_int32 GlyphSubstitutionTableHeader::process(const LEReferenceTo &base, + LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag, - const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, + const LEReferenceTo &glyphDefinitionTableHeader, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, @@ -57,7 +58,7 @@ le_int32 GlyphSubstitutionTableHeader::process(LEGlyphStorage &glyphStorage, return 0; } - GlyphSubstitutionLookupProcessor processor(this, scriptTag, languageTag, filter, featureMap, featureMapCount, featureOrder, success); + GlyphSubstitutionLookupProcessor processor(base, scriptTag, languageTag, filter, featureMap, featureMapCount, featureOrder, success); return processor.process(glyphStorage, NULL, rightToLeft, glyphDefinitionTableHeader, NULL, success); } diff --git a/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.h b/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.h index 207747dd9a7..ad3624c70ce 100644 --- a/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.h +++ b/jdk/src/share/native/sun/font/layout/GlyphSubstitutionTables.h @@ -50,11 +50,12 @@ struct GlyphDefinitionTableHeader; struct GlyphSubstitutionTableHeader : public GlyphLookupTableHeader { - le_int32 process(LEGlyphStorage &glyphStorage, + le_int32 process(const LEReferenceTo &base, + LEGlyphStorage &glyphStorage, le_bool rightToLeft, LETag scriptTag, LETag languageTag, - const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, + const LEReferenceTo &glyphDefinitionTableHeader, const LEGlyphFilter *filter, const FeatureMap *featureMap, le_int32 featureMapCount, diff --git a/jdk/src/share/native/sun/font/layout/HanLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/HanLayoutEngine.cpp index 5e799ef8339..05c46790cd5 100644 --- a/jdk/src/share/native/sun/font/layout/HanLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/HanLayoutEngine.cpp @@ -64,7 +64,7 @@ static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap); #define features (loclFeatureMask) HanOpenTypeLayoutEngine::HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success) { fFeatureMap = featureMap; diff --git a/jdk/src/share/native/sun/font/layout/HanLayoutEngine.h b/jdk/src/share/native/sun/font/layout/HanLayoutEngine.h index 6dd726069a5..de8d5569a2b 100644 --- a/jdk/src/share/native/sun/font/layout/HanLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/HanLayoutEngine.h @@ -73,7 +73,7 @@ public: * @internal */ HanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTablem, LEErrorCode &success); + le_int32 typoFlags, const LEReferenceTo &gsubTablem, LEErrorCode &success); /** diff --git a/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.cpp index adc30bd526d..ac5f081d9c7 100644 --- a/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.cpp @@ -209,7 +209,7 @@ static le_int32 getCharClass(LEUnicode ch, LEUnicode &lead, LEUnicode &vowel, LE } HangulOpenTypeLayoutEngine::HangulOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 /*languageCode*/, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, korLanguageCode, typoFlags, gsubTable, success) { fFeatureMap = featureMap; diff --git a/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.h b/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.h index e2a485e5f81..bf0f0f85360 100644 --- a/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/HangulLayoutEngine.h @@ -79,7 +79,7 @@ public: * @internal */ HangulOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known diff --git a/jdk/src/share/native/sun/font/layout/ICUFeatures.h b/jdk/src/share/native/sun/font/layout/ICUFeatures.h index f32d8e2b869..9eb97553a2b 100644 --- a/jdk/src/share/native/sun/font/layout/ICUFeatures.h +++ b/jdk/src/share/native/sun/font/layout/ICUFeatures.h @@ -54,16 +54,21 @@ struct FeatureTable le_uint16 lookupCount; le_uint16 lookupListIndexArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(FeatureTable, lookupListIndexArray) struct FeatureListTable { le_uint16 featureCount; FeatureRecord featureRecordArray[ANY_NUMBER]; - const FeatureTable *getFeatureTable(le_uint16 featureIndex, LETag *featureTag) const; + LEReferenceTo getFeatureTable(const LETableReference &base, le_uint16 featureIndex, LETag *featureTag, LEErrorCode &success) const; - const FeatureTable *getFeatureTable(LETag featureTag) const; +#if 0 + const LEReferenceTo getFeatureTable(const LETableReference &base, LETag featureTag, LEErrorCode &success) const; +#endif }; +LE_VAR_ARRAY(FeatureListTable, featureRecordArray) + U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp index 4d2c4180226..61ab8b3a321 100644 --- a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.cpp @@ -50,7 +50,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicOpenTypeLayoutEngine) IndicOpenTypeLayoutEngine::IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, le_bool version2, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) + le_int32 typoFlags, le_bool version2, const LEReferenceTo &gsubTable, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success), fMPreFixups(NULL) { if ( version2 ) { diff --git a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h index b443941bf99..3b33da7394b 100644 --- a/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/IndicLayoutEngine.h @@ -81,7 +81,7 @@ public: * @internal */ IndicOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, le_bool version2, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); + le_int32 typoFlags, le_bool version2, const LEReferenceTo &gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp index a83c9566f5d..3ae26be484c 100644 --- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.cpp @@ -43,11 +43,14 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor) -IndicRearrangementProcessor::IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader) - : StateTableProcessor(morphSubtableHeader) + IndicRearrangementProcessor::IndicRearrangementProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : StateTableProcessor(morphSubtableHeader, success), + indicRearrangementSubtableHeader(morphSubtableHeader, success), + entryTable(stateTableHeader, success, (const IndicRearrangementStateEntry*)(&stateTableHeader->stHeader), + entryTableOffset, LE_UNBOUNDED_ARRAY), + int16Table(stateTableHeader, success, (const le_int16*)entryTable.getAlias(), 0, LE_UNBOUNDED_ARRAY) + { - indicRearrangementSubtableHeader = (const IndicRearrangementSubtableHeader *) morphSubtableHeader; - entryTable = (const IndicRearrangementStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset); } IndicRearrangementProcessor::~IndicRearrangementProcessor() @@ -62,7 +65,8 @@ void IndicRearrangementProcessor::beginStateTable() ByteOffset IndicRearrangementProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index) { - const IndicRearrangementStateEntry *entry = &entryTable[index]; + LEErrorCode success = LE_NO_ERROR; // todo- make a param? + const IndicRearrangementStateEntry *entry = entryTable.getAlias(index,success); ByteOffset newState = SWAPW(entry->newStateOffset); IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags); diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.h b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.h index 202d3b7b094..271c6167339 100644 --- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.h +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor.h @@ -58,7 +58,7 @@ public: void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const; - IndicRearrangementProcessor(const MorphSubtableHeader *morphSubtableHeader); + IndicRearrangementProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~IndicRearrangementProcessor(); /** @@ -79,8 +79,9 @@ protected: le_int32 firstGlyph; le_int32 lastGlyph; - const IndicRearrangementStateEntry *entryTable; - const IndicRearrangementSubtableHeader *indicRearrangementSubtableHeader; + LEReferenceTo indicRearrangementSubtableHeader; + LEReferenceToArrayOf entryTable; + LEReferenceToArrayOf int16Table; }; diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp index 35d6e43ac6b..4d531b2a03d 100644 --- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.cpp @@ -43,11 +43,11 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(IndicRearrangementProcessor2) -IndicRearrangementProcessor2::IndicRearrangementProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : StateTableProcessor2(morphSubtableHeader) +IndicRearrangementProcessor2::IndicRearrangementProcessor2( + const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : StateTableProcessor2(morphSubtableHeader, success), indicRearrangementSubtableHeader(morphSubtableHeader, success), + entryTable(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY) { - indicRearrangementSubtableHeader = (const IndicRearrangementSubtableHeader2 *) morphSubtableHeader; - entryTable = (const IndicRearrangementStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); } IndicRearrangementProcessor2::~IndicRearrangementProcessor2() @@ -60,9 +60,11 @@ void IndicRearrangementProcessor2::beginStateTable() lastGlyph = 0; } -le_uint16 IndicRearrangementProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +le_uint16 IndicRearrangementProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, + EntryTableIndex2 index, LEErrorCode &success) { - const IndicRearrangementStateEntry2 *entry = &entryTable[index]; + const IndicRearrangementStateEntry2 *entry = entryTable.getAlias(index, success); + if (LE_FAILURE(success)) return 0; // TODO - what to return in bad state? le_uint16 newState = SWAPW(entry->newStateIndex); // index to the new state IndicRearrangementFlags flags = (IndicRearrangementFlags) SWAPW(entry->flags); diff --git a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h index 3d83f21ce3b..f58ac9b71fc 100644 --- a/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/IndicRearrangementProcessor2.h @@ -52,13 +52,13 @@ class IndicRearrangementProcessor2 : public StateTableProcessor2 public: virtual void beginStateTable(); - virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success); virtual void endStateTable(); void doRearrangementAction(LEGlyphStorage &glyphStorage, IndicRearrangementVerb verb) const; - IndicRearrangementProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + IndicRearrangementProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~IndicRearrangementProcessor2(); /** @@ -79,8 +79,8 @@ protected: le_int32 firstGlyph; le_int32 lastGlyph; - const IndicRearrangementStateEntry2 *entryTable; - const IndicRearrangementSubtableHeader2 *indicRearrangementSubtableHeader; + LEReferenceToArrayOf entryTable; + LEReferenceTo indicRearrangementSubtableHeader; }; diff --git a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp index 9bf3a2a5c65..7ebabe141d2 100644 --- a/jdk/src/share/native/sun/font/layout/IndicReordering.cpp +++ b/jdk/src/share/native/sun/font/layout/IndicReordering.cpp @@ -658,6 +658,11 @@ le_int32 IndicReordering::reorder(const LEUnicode *chars, le_int32 charCount, le MPreFixups *mpreFixups = NULL; const IndicClassTable *classTable = IndicClassTable::getScriptClassTable(scriptCode); + if(classTable==NULL) { + success = LE_MEMORY_ALLOCATION_ERROR; + return 0; + } + if (classTable->scriptFlags & SF_MPRE_FIXUP) { mpreFixups = new MPreFixups(charCount); if (mpreFixups == NULL) { diff --git a/jdk/src/share/native/sun/font/layout/KernTable.cpp b/jdk/src/share/native/sun/font/layout/KernTable.cpp index 3a9987eb6b9..13ddd0f3b32 100644 --- a/jdk/src/share/native/sun/font/layout/KernTable.cpp +++ b/jdk/src/share/native/sun/font/layout/KernTable.cpp @@ -48,7 +48,7 @@ struct PairInfo { le_int16 value; // fword, kern value in funits }; #define KERN_PAIRINFO_SIZE 6 - +LE_CORRECT_SIZE(PairInfo, KERN_PAIRINFO_SIZE) struct Subtable_0 { le_uint16 nPairs; le_uint16 searchRange; @@ -56,6 +56,7 @@ struct Subtable_0 { le_uint16 rangeShift; }; #define KERN_SUBTABLE_0_HEADER_SIZE 8 +LE_CORRECT_SIZE(Subtable_0, KERN_SUBTABLE_0_HEADER_SIZE) // Kern table version 0 only struct SubtableHeader { @@ -64,6 +65,7 @@ struct SubtableHeader { le_uint16 coverage; }; #define KERN_SUBTABLE_HEADER_SIZE 6 +LE_CORRECT_SIZE(SubtableHeader, KERN_SUBTABLE_HEADER_SIZE) // Version 0 only, version 1 has different layout struct KernTableHeader { @@ -71,6 +73,7 @@ struct KernTableHeader { le_uint16 nTables; }; #define KERN_TABLE_HEADER_SIZE 4 +LE_CORRECT_SIZE(KernTableHeader, KERN_TABLE_HEADER_SIZE) #define COVERAGE_HORIZONTAL 0x1 #define COVERAGE_MINIMUM 0x2 @@ -92,21 +95,21 @@ struct KernTableHeader { * TODO: support multiple subtables * TODO: respect header flags */ -KernTable::KernTable(const LEFontInstance* font_, const void* tableData) - : pairs(0), font(font_) +KernTable::KernTable(const LETableReference& base, LEErrorCode &success) + : pairs(), pairsSwapped(NULL), fTable(base) { - const KernTableHeader* header = (const KernTableHeader*)tableData; - if (header == 0) { + if(LE_FAILURE(success) || (fTable.isEmpty())) { #if DEBUG fprintf(stderr, "no kern data\n"); #endif return; } + LEReferenceTo header(fTable, success); #if DEBUG // dump first 32 bytes of header for (int i = 0; i < 64; ++i) { - fprintf(stderr, "%0.2x ", ((const char*)tableData)[i]&0xff); + fprintf(stderr, "%0.2x ", ((const char*)header.getAlias())[i]&0xff); if (((i+1)&0xf) == 0) { fprintf(stderr, "\n"); } else if (((i+1)&0x7) == 0) { @@ -115,12 +118,17 @@ KernTable::KernTable(const LEFontInstance* font_, const void* tableData) } #endif - if (header->version == 0 && SWAPW(header->nTables) > 0) { - const SubtableHeader* subhead = (const SubtableHeader*)((char*)tableData + KERN_TABLE_HEADER_SIZE); - if (subhead->version == 0) { + if(LE_FAILURE(success)) return; + + if (!header.isEmpty() && header->version == 0 && SWAPW(header->nTables) > 0) { + LEReferenceTo subhead(header, success, KERN_TABLE_HEADER_SIZE); + + if (LE_SUCCESS(success) && !subhead.isEmpty() && subhead->version == 0) { coverage = SWAPW(subhead->coverage); if (coverage & COVERAGE_HORIZONTAL) { // only handle horizontal kerning - const Subtable_0* table = (const Subtable_0*)((char*)subhead + KERN_SUBTABLE_HEADER_SIZE); + LEReferenceTo table(subhead, success, KERN_SUBTABLE_HEADER_SIZE); + + if(table.isEmpty() || LE_FAILURE(success)) return; nPairs = SWAPW(table->nPairs); @@ -134,19 +142,31 @@ KernTable::KernTable(const LEFontInstance* font_, const void* tableData) rangeShift = (nPairs * KERN_PAIRINFO_SIZE) - searchRange; #endif - pairs = (PairInfo*)font->getKernPairs(); - if (pairs == NULL) { - char *pairData = (char*)table + KERN_SUBTABLE_0_HEADER_SIZE; - char *pptr = pairData; - pairs = (PairInfo*)(malloc(nPairs*sizeof(PairInfo))); - PairInfo *p = (PairInfo*)pairs; - for (int i = 0; i < nPairs; i++, pptr += KERN_PAIRINFO_SIZE, p++) { - memcpy(p, pptr, KERN_PAIRINFO_SIZE); + if(LE_SUCCESS(success) && nPairs>0) { + // pairs is an instance member, and table is on the stack. + // set 'pairs' based on table.getAlias(). This will range check it. + + pairs = LEReferenceToArrayOf(fTable, // based on overall table + success, + (const PairInfo*)table.getAlias(), // subtable 0 + .. + KERN_SUBTABLE_0_HEADER_SIZE, // .. offset of header size + nPairs); // count + } + if (LE_SUCCESS(success) && pairs.isValid()) { + pairsSwapped = (PairInfo*)(malloc(nPairs*sizeof(PairInfo))); + PairInfo *p = (PairInfo*)pairsSwapped; + for (int i = 0; LE_SUCCESS(success) && i < nPairs; i++, p++) { + memcpy(p, pairs.getAlias(i,success), KERN_PAIRINFO_SIZE); p->key = SWAPL(p->key); } - font->setKernPairs((void*)pairs); + fTable.getFont()->setKernPairs((void*)pairsSwapped); // store it } +#if 0 + fprintf(stderr, "coverage: %0.4x nPairs: %d pairs %p\n", coverage, nPairs, pairs.getAlias()); + fprintf(stderr, " searchRange: %d entrySelector: %d rangeShift: %d\n", searchRange, entrySelector, rangeShift); + fprintf(stderr, "[[ ignored font table entries: range %d selector %d shift %d ]]\n", SWAPW(table->searchRange), SWAPW(table->entrySelector), SWAPW(table->rangeShift)); +#endif #if DEBUG fprintf(stderr, "coverage: %0.4x nPairs: %d pairs 0x%x\n", coverage, nPairs, pairs); fprintf(stderr, @@ -194,14 +214,17 @@ KernTable::KernTable(const LEFontInstance* font_, const void* tableData) * Process the glyph positions. The positions array has two floats for each * glyph, plus a trailing pair to mark the end of the last glyph. */ -void KernTable::process(LEGlyphStorage& storage) +void KernTable::process(LEGlyphStorage& storage, LEErrorCode &success) { - if (pairs) { - LEErrorCode success = LE_NO_ERROR; + if(LE_FAILURE(success)) return; + + if (pairsSwapped) { + success = LE_NO_ERROR; le_uint32 key = storage[0]; // no need to mask off high bits float adjust = 0; - for (int i = 1, e = storage.getGlyphCount(); i < e; ++i) { + + for (int i = 1, e = storage.getGlyphCount(); LE_SUCCESS(success)&& i < e; ++i) { key = key << 16 | (storage[i] & 0xffff); // argh, to do a binary search, we need to have the pair list in sorted order @@ -209,7 +232,7 @@ void KernTable::process(LEGlyphStorage& storage) // so either I have to swap the element each time I examine it, or I have to swap // all the elements ahead of time and store them in the font - const PairInfo* p = pairs; + const PairInfo* p = pairsSwapped; const PairInfo* tp = (const PairInfo*)(p + (rangeShift/KERN_PAIRINFO_SIZE)); /* rangeshift is in original table bytes */ if (key > tp->key) { p = tp; @@ -225,7 +248,7 @@ void KernTable::process(LEGlyphStorage& storage) tp = (const PairInfo*)(p + (probe/KERN_PAIRINFO_SIZE)); le_uint32 tkey = tp->key; #if DEBUG - fprintf(stdout, " %.3d (%0.8x)\n", (tp - pairs), tkey); + fprintf(stdout, " %.3d (%0.8x)\n", (tp - pairsSwapped), tkey); #endif if (tkey <= key) { if (tkey == key) { @@ -240,10 +263,10 @@ void KernTable::process(LEGlyphStorage& storage) // device transform, or a faster way, such as moving the // entire kern table up to Java. LEPoint pt; - pt.fX = font->xUnitsToPoints(value); + pt.fX = fTable.getFont()->xUnitsToPoints(value); pt.fY = 0; - font->getKerningAdjustment(pt); + fTable.getFont()->getKerningAdjustment(pt); adjust += pt.fX; break; } diff --git a/jdk/src/share/native/sun/font/layout/KernTable.h b/jdk/src/share/native/sun/font/layout/KernTable.h index ac41ee7d712..1cc4f872d3b 100644 --- a/jdk/src/share/native/sun/font/layout/KernTable.h +++ b/jdk/src/share/native/sun/font/layout/KernTable.h @@ -26,7 +26,7 @@ /* * * - * (C) Copyright IBM Corp. 2004-2005 - All Rights Reserved + * (C) Copyright IBM Corp. 2004-2013 - All Rights Reserved * */ @@ -38,6 +38,7 @@ #endif #include "LETypes.h" +#include "LETableReference.h" //#include "LEFontInstance.h" //#include "LEGlyphStorage.h" @@ -56,19 +57,20 @@ class U_LAYOUT_API KernTable private: le_uint16 coverage; le_uint16 nPairs; - const PairInfo* pairs; - const LEFontInstance* font; + LEReferenceToArrayOf pairs; + PairInfo *pairsSwapped; + const LETableReference &fTable; le_uint16 searchRange; le_uint16 entrySelector; le_uint16 rangeShift; public: - KernTable(const LEFontInstance* font, const void* tableData); + KernTable(const LETableReference &table, LEErrorCode &success); /* * Process the glyph positions. */ - void process(LEGlyphStorage& storage); + void process(LEGlyphStorage& storage, LEErrorCode &success); }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp index d1f0674ebf4..9fd448c5682 100644 --- a/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.cpp @@ -43,7 +43,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(KhmerOpenTypeLayoutEngine) KhmerOpenTypeLayoutEngine::KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success) { fFeatureMap = KhmerReordering::getFeatureMap(fFeatureMapCount); diff --git a/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.h b/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.h index 602d8563a33..2652c74f463 100644 --- a/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/KhmerLayoutEngine.h @@ -83,7 +83,7 @@ public: * @internal */ KhmerOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known diff --git a/jdk/src/share/native/sun/font/layout/LEScripts.h b/jdk/src/share/native/sun/font/layout/LEScripts.h index beb3bbedc6e..804c8f64610 100644 --- a/jdk/src/share/native/sun/font/layout/LEScripts.h +++ b/jdk/src/share/native/sun/font/layout/LEScripts.h @@ -258,10 +258,11 @@ enum ScriptCodes { * @stable ICU 49 */ - khojScriptCode = 156, - tirhScriptCode = 157, + hluwScriptCode = 156, /* bump to match current ICU */ + khojScriptCode = 157, + tirhScriptCode = 158, - scriptCodeCount = 158 + scriptCodeCount = 159 }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/LETableReference.h b/jdk/src/share/native/sun/font/layout/LETableReference.h new file mode 100644 index 00000000000..dab52b664a8 --- /dev/null +++ b/jdk/src/share/native/sun/font/layout/LETableReference.h @@ -0,0 +1,442 @@ +/* + * 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * -*- c++ -*- + * + * (C) Copyright IBM Corp. and others 2013 - All Rights Reserved + * + * Range checking + * + */ + +#ifndef __LETABLEREFERENCE_H +#define __LETABLEREFERENCE_H + +#include "LETypes.h" +#include "LEFontInstance.h" + + +#define kQuestionmarkTableTag 0x3F3F3F3FUL +#define kTildeTableTag 0x7e7e7e7eUL +#ifdef __cplusplus + +// internal - interface for range checking +U_NAMESPACE_BEGIN + +#if LE_ASSERT_BAD_FONT +class LETableReference; // fwd +/** + * defined in OpenTypeUtilities.cpp + * @internal + */ +extern void _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len); + +#define LE_DEBUG_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); +#define LE_DEBUG_TR3(x,y,z) _debug_LETableReference(__FILE__, __LINE__, x, this, (const void*)y, (size_t)z); +#if 0 +#define LE_TRACE_TR(x) _debug_LETableReference(__FILE__, __LINE__, x, this, NULL, 0); +#else +#define LE_TRACE_TR(x) +#endif + +#else +#define LE_DEBUG_TR(x) +#define LE_DEBUG_TR3(x,y,z) +#define LE_TRACE_TR(x) +#endif + +/** + * @internal + */ +class LETableReference { +public: +/** + * @internal + * Construct from a specific tag + */ + LETableReference(const LEFontInstance* font, LETag tableTag, LEErrorCode &success) : + fFont(font), fTag(tableTag), fParent(NULL), fStart(NULL),fLength(LE_UINTPTR_MAX) { + loadTable(success); + LE_TRACE_TR("INFO: new table load") + } + + LETableReference(const LETableReference &parent, LEErrorCode &success) : fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), fStart(parent.fStart), fLength(parent.fLength) { + if(LE_FAILURE(success)) { + clear(); + } + LE_TRACE_TR("INFO: new clone") + } + + LETableReference(const le_uint8* data, size_t length = LE_UINTPTR_MAX) : + fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(data), fLength(length) { + LE_TRACE_TR("INFO: new raw") + } + LETableReference() : + fFont(NULL), fTag(kQuestionmarkTableTag), fParent(NULL), fStart(NULL), fLength(0) { + LE_TRACE_TR("INFO: new empty") + } + + ~LETableReference() { + fTag=kTildeTableTag; + LE_TRACE_TR("INFO: new dtor") + } + + /** + * @internal + * @param length if LE_UINTPTR_MAX means "whole table" + * subset + */ + LETableReference(const LETableReference &parent, size_t offset, size_t length, + LEErrorCode &err) : + fFont(parent.fFont), fTag(parent.fTag), fParent(&parent), + fStart((parent.fStart)+offset), fLength(length) { + if(LE_SUCCESS(err)) { + if(isEmpty()) { + //err = LE_MISSING_FONT_TABLE_ERROR; + clear(); // it's just empty. Not an error. + } else if(offset >= fParent->fLength) { + LE_DEBUG_TR3("offset out of range: (%p) +%d", NULL, offset); + err = LE_INDEX_OUT_OF_BOUNDS_ERROR; + clear(); + } else { + if(fLength == LE_UINTPTR_MAX && + fParent->fLength != LE_UINTPTR_MAX) { + fLength = (fParent->fLength) - offset; // decrement length as base address is incremented + } + if(fLength != LE_UINTPTR_MAX) { // if we have bounds: + if(offset+fLength > fParent->fLength) { + LE_DEBUG_TR3("offset+fLength out of range: (%p) +%d", NULL, offset+fLength); + err = LE_INDEX_OUT_OF_BOUNDS_ERROR; // exceeded + clear(); + } + } + } + } else { + clear(); + } + LE_TRACE_TR("INFO: new subset") + } + + const void* getAlias() const { return (const void*)fStart; } + const void* getAliasTODO() const { LE_DEBUG_TR("getAliasTODO()"); return (const void*)fStart; } + le_bool isEmpty() const { return fStart==NULL || fLength==0; } + le_bool isValid() const { return !isEmpty(); } + le_bool hasBounds() const { return fLength!=LE_UINTPTR_MAX; } + void clear() { fLength=0; fStart=NULL; } + size_t getLength() const { return fLength; } + const LEFontInstance* getFont() const { return fFont; } + LETag getTag() const { return fTag; } + const LETableReference* getParent() const { return fParent; } + + void addOffset(size_t offset, LEErrorCode &success) { + if(hasBounds()) { + if(offset > fLength) { + LE_DEBUG_TR("addOffset off end"); + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + return; + } else { + fLength -= offset; + } + } + fStart += offset; + } + + size_t ptrToOffset(const void *atPtr, LEErrorCode &success) const { + if(atPtr==NULL) return 0; + if(LE_FAILURE(success)) return LE_UINTPTR_MAX; + if((atPtr < fStart) || + (hasBounds() && (atPtr > fStart+fLength))) { + LE_DEBUG_TR3("ptrToOffset args out of range: %p", atPtr, 0); + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + return LE_UINTPTR_MAX; + } + return ((const le_uint8*)atPtr)-fStart; + } + + /** + * Clamp down the length, for range checking. + */ + size_t contractLength(size_t newLength) { + if(fLength!=LE_UINTPTR_MAX&&newLength>0&&newLength<=fLength) { + fLength = newLength; + } + return fLength; + } + + /** + * Throw an error if offset+length off end + */ +public: + size_t verifyLength(size_t offset, size_t length, LEErrorCode &success) { + if(isValid()&& + LE_SUCCESS(success) && + fLength!=LE_UINTPTR_MAX && length!=LE_UINTPTR_MAX && offset!=LE_UINTPTR_MAX && + (offset+length)>fLength) { + LE_DEBUG_TR3("verifyLength failed (%p) %d",NULL, offset+length); + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; +#if LE_ASSERT_BAD_FONT + fprintf(stderr, "offset=%lu, len=%lu, would be at %p, (%lu) off end. End at %p\n", offset,length, fStart+offset+length, (offset+length-fLength), (offset+length-fLength)+fStart); +#endif + } + return fLength; + } + + /** + * Change parent link to another + */ + LETableReference &reparent(const LETableReference &base) { + fParent = &base; + return *this; + } + + /** + * remove parent link. Factory functions should do this. + */ + void orphan(void) { + fParent=NULL; + } + +protected: + const LEFontInstance* fFont; + LETag fTag; + const LETableReference *fParent; + const le_uint8 *fStart; // keep as 8 bit internally, for pointer math + size_t fLength; + + void loadTable(LEErrorCode &success) { + if(LE_SUCCESS(success)) { + fStart = (const le_uint8*)(fFont->getFontTable(fTag, fLength)); // note - a null table is not an error. + } + } + + void setRaw(const void *data, size_t length = LE_UINTPTR_MAX) { + fFont = NULL; + fTag = kQuestionmarkTableTag; + fParent = NULL; + fStart = (const le_uint8*)data; + fLength = length; + } +}; + + +template +class LETableVarSizer { + public: + inline static size_t getSize(); +}; + +// base definition- could override for adjustments +template inline +size_t LETableVarSizer::getSize() { + return sizeof(T); +} + +/** + * \def LE_VAR_ARRAY + * @param x Type (T) + * @param y some member that is of length ANY_NUMBER + * Call this after defining a class, for example: + * LE_VAR_ARRAY(FeatureListTable,featureRecordArray) + * this is roughly equivalent to: + * template<> inline size_t LETableVarSizer::getSize() { return sizeof(FeatureListTable) - (sizeof(le_uint16)*ANY_NUMBER); } + * it's a specialization that informs the LETableReference subclasses to NOT include the variable array in the size. + * dereferencing NULL is valid here because we never actually dereference it, just inside sizeof. + */ +#define LE_VAR_ARRAY(x,y) template<> inline size_t LETableVarSizer::getSize() { return sizeof(x) - (sizeof(((const x*)0)->y)); } +/** + * \def LE_CORRECT_SIZE + * @param x type (T) + * @param y fixed size for T + */ +#define LE_CORRECT_SIZE(x,y) template<> inline size_t LETableVarSizer::getSize() { return y; } + +/** + * Open a new entry based on an existing table + */ + +/** + * \def LE_UNBOUNDED_ARRAY + * define an array with no *known* bound. Will trim to available size. + * @internal + */ +#define LE_UNBOUNDED_ARRAY LE_UINT32_MAX + +template +class LEReferenceToArrayOf : public LETableReference { +public: + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, size_t offset, le_uint32 count) + : LETableReference(parent, offset, LE_UINTPTR_MAX, success), fCount(count) { + LE_TRACE_TR("INFO: new RTAO by offset") + if(LE_SUCCESS(success)) { + if(count == LE_UNBOUNDED_ARRAY) { // not a known length + count = getLength()/LETableVarSizer::getSize(); // fit to max size + } + LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); + } + if(LE_FAILURE(success)) { + fCount=0; + clear(); + } + } + + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, le_uint32 count) + : LETableReference(parent, parent.ptrToOffset(array, success), LE_UINTPTR_MAX, success), fCount(count) { +LE_TRACE_TR("INFO: new RTAO") + if(LE_SUCCESS(success)) { + if(count == LE_UNBOUNDED_ARRAY) { // not a known length + count = getLength()/LETableVarSizer::getSize(); // fit to max size + } + LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); + } + if(LE_FAILURE(success)) clear(); + } + LEReferenceToArrayOf(const LETableReference &parent, LEErrorCode &success, const T* array, size_t offset, le_uint32 count) + : LETableReference(parent, parent.ptrToOffset(array, success)+offset, LE_UINTPTR_MAX, success), fCount(count) { +LE_TRACE_TR("INFO: new RTAO") + if(LE_SUCCESS(success)) { + if(count == LE_UNBOUNDED_ARRAY) { // not a known length + count = getLength()/LETableVarSizer::getSize(); // fit to max size + } + LETableReference::verifyLength(0, LETableVarSizer::getSize()*count, success); + } + if(LE_FAILURE(success)) clear(); + } + + LEReferenceToArrayOf() :LETableReference(), fCount(0) {} + + le_uint32 getCount() const { return fCount; } + + using LETableReference::getAlias; + + const T *getAlias(le_uint32 i, LEErrorCode &success) const { + return ((const T*)(((const char*)getAlias())+getOffsetFor(i, success))); + } + + const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } + + const T& getObject(le_uint32 i, LEErrorCode &success) const { + return *getAlias(i,success); + } + + const T& operator()(le_uint32 i, LEErrorCode &success) const { + return *getAlias(i,success); + } + + size_t getOffsetFor(le_uint32 i, LEErrorCode &success) const { + if(LE_SUCCESS(success)&&i::getSize()*i; + } else { + success = LE_INDEX_OUT_OF_BOUNDS_ERROR; + } + return 0; + } + + LEReferenceToArrayOf &reparent(const LETableReference &base) { + fParent = &base; + return *this; + } + + LEReferenceToArrayOf(const LETableReference& parent, LEErrorCode & success) : LETableReference(parent,0, LE_UINTPTR_MAX, success), fCount(0) { + LE_TRACE_TR("INFO: null RTAO") + } + +private: + le_uint32 fCount; +}; + + +template +class LEReferenceTo : public LETableReference { +public: + /** + * open a sub reference. + * @param parent parent reference + * @param success error status + * @param atPtr location of reference - if NULL, will be at offset zero (i.e. downcast of parent). Otherwise must be a pointer within parent's bounds. + */ + LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr) + : LETableReference(parent, parent.ptrToOffset(atPtr, success), LE_UINTPTR_MAX, success) { + verifyLength(0, LETableVarSizer::getSize(), success); + if(LE_FAILURE(success)) clear(); + } + /** + * ptr plus offset + */ + LEReferenceTo(const LETableReference &parent, LEErrorCode &success, const void* atPtr, size_t offset) + : LETableReference(parent, parent.ptrToOffset(atPtr, success)+offset, LE_UINTPTR_MAX, success) { + verifyLength(0, LETableVarSizer::getSize(), success); + if(LE_FAILURE(success)) clear(); + } + LEReferenceTo(const LETableReference &parent, LEErrorCode &success, size_t offset) + : LETableReference(parent, offset, LE_UINTPTR_MAX, success) { + verifyLength(0, LETableVarSizer::getSize(), success); + if(LE_FAILURE(success)) clear(); + } + LEReferenceTo(const LETableReference &parent, LEErrorCode &success) + : LETableReference(parent, 0, LE_UINTPTR_MAX, success) { + verifyLength(0, LETableVarSizer::getSize(), success); + if(LE_FAILURE(success)) clear(); + } + LEReferenceTo(const LEFontInstance *font, LETag tableTag, LEErrorCode &success) + : LETableReference(font, tableTag, success) { + verifyLength(0, LETableVarSizer::getSize(), success); + if(LE_FAILURE(success)) clear(); + } + LEReferenceTo(const le_uint8 *data, size_t length = LE_UINTPTR_MAX) : LETableReference(data, length) {} + LEReferenceTo(const T *data, size_t length = LE_UINTPTR_MAX) : LETableReference((const le_uint8*)data, length) {} + LEReferenceTo() : LETableReference(NULL) {} + + LEReferenceTo& operator=(const T* other) { + setRaw(other); + return *this; + } + + LEReferenceTo &reparent(const LETableReference &base) { + fParent = &base; + return *this; + } + + /** + * roll forward by one size. + * same as addOffset(LETableVarSizer::getSize(),success) + */ + void addObject(LEErrorCode &success) { + addOffset(LETableVarSizer::getSize(), success); + } + void addObject(size_t count, LEErrorCode &success) { + addOffset(LETableVarSizer::getSize()*count, success); + } + + const T *operator->() const { return getAlias(); } + const T *getAlias() const { return (const T*)fStart; } + const T *getAliasTODO() const { LE_DEBUG_TR("getAliasTODO<>"); return (const T*)fStart; } +}; + + +U_NAMESPACE_END + +#endif + +#endif diff --git a/jdk/src/share/native/sun/font/layout/LETypes.h b/jdk/src/share/native/sun/font/layout/LETypes.h index d3801fc2450..130f72fd742 100644 --- a/jdk/src/share/native/sun/font/layout/LETypes.h +++ b/jdk/src/share/native/sun/font/layout/LETypes.h @@ -354,12 +354,15 @@ typedef struct LEPoint LEPoint; /** * Max value representable by a uintptr */ -#ifndef UINTPTR_MAX + #ifndef UINT32_MAX -#define LE_UINTPTR_MAX 0xFFFFFFFFU +#define LE_UINT32_MAX 0xFFFFFFFFU #else -#define LE_UINTPTR_MAX UINT32_MAX +#define LE_UINT32_MAX UINT32_MAX #endif + +#ifndef UINTPTR_MAX +#define LE_UINTPTR_MAX LE_UINT32_MAX #else #define LE_UINTPTR_MAX UINTPTR_MAX #endif diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp index 1fadbf9f792..6690316f32d 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.cpp @@ -147,21 +147,21 @@ CharSubstitutionFilter::~CharSubstitutionFilter() class CanonMarkFilter : public UMemory, public LEGlyphFilter { private: - const GlyphClassDefinitionTable *classDefTable; + const LEReferenceTo classDefTable; CanonMarkFilter(const CanonMarkFilter &other); // forbid copying of this class CanonMarkFilter &operator=(const CanonMarkFilter &other); // forbid copying of this class public: - CanonMarkFilter(const GlyphDefinitionTableHeader *gdefTable); + CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success); virtual ~CanonMarkFilter(); virtual le_bool accept(LEGlyphID glyph) const; }; -CanonMarkFilter::CanonMarkFilter(const GlyphDefinitionTableHeader *gdefTable) +CanonMarkFilter::CanonMarkFilter(const LEReferenceTo &gdefTable, LEErrorCode &success) + : classDefTable(gdefTable->getMarkAttachClassDefinitionTable(gdefTable, success)) { - classDefTable = gdefTable->getMarkAttachClassDefinitionTable(); } CanonMarkFilter::~CanonMarkFilter() @@ -171,9 +171,10 @@ CanonMarkFilter::~CanonMarkFilter() le_bool CanonMarkFilter::accept(LEGlyphID glyph) const { - le_int32 glyphClass = classDefTable->getGlyphClass(glyph); - - return glyphClass != 0; + LEErrorCode success = LE_NO_ERROR; + le_int32 glyphClass = classDefTable->getGlyphClass(classDefTable, glyph, success); + if(LE_FAILURE(success)) return false; + return glyphClass != 0; } UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LayoutEngine) @@ -262,20 +263,20 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off return count; } - const GlyphSubstitutionTableHeader *canonGSUBTable = (GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable; + LEReferenceTo canonGSUBTable((GlyphSubstitutionTableHeader *) CanonShaping::glyphSubstitutionTable); LETag scriptTag = OpenTypeLayoutEngine::getScriptTag(fScriptCode); LETag langSysTag = OpenTypeLayoutEngine::getLangSysTag(fLanguageCode); le_int32 i, dir = 1, out = 0, outCharCount = count; - if (canonGSUBTable->coversScript(scriptTag)) { + if (canonGSUBTable->coversScript(canonGSUBTable,scriptTag, success) || LE_SUCCESS(success)) { CharSubstitutionFilter *substitutionFilter = new CharSubstitutionFilter(fFontInstance); if (substitutionFilter == NULL) { success = LE_MEMORY_ALLOCATION_ERROR; return 0; } - const LEUnicode *inChars = &chars[offset]; - LEUnicode *reordered = NULL; + const LEUnicode *inChars = &chars[offset]; + LEUnicode *reordered = NULL; LEGlyphStorage fakeGlyphStorage; fakeGlyphStorage.allocateGlyphArray(count, rightToLeft, success); @@ -285,20 +286,20 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off return 0; } - // This is the cheapest way to get mark reordering only for Hebrew. - // We could just do the mark reordering for all scripts, but most - // of them probably don't need it... - if (fScriptCode == hebrScriptCode) { - reordered = LE_NEW_ARRAY(LEUnicode, count); + // This is the cheapest way to get mark reordering only for Hebrew. + // We could just do the mark reordering for all scripts, but most + // of them probably don't need it... + if (fScriptCode == hebrScriptCode) { + reordered = LE_NEW_ARRAY(LEUnicode, count); - if (reordered == NULL) { - delete substitutionFilter; - success = LE_MEMORY_ALLOCATION_ERROR; - return 0; - } + if (reordered == NULL) { + delete substitutionFilter; + success = LE_MEMORY_ALLOCATION_ERROR; + return 0; + } - CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, fakeGlyphStorage); - inChars = reordered; + CanonShaping::reorderMarks(&chars[offset], count, rightToLeft, reordered, fakeGlyphStorage); + inChars = reordered; } fakeGlyphStorage.allocateAuxData(success); @@ -318,11 +319,11 @@ le_int32 LayoutEngine::characterProcessing(const LEUnicode chars[], le_int32 off fakeGlyphStorage.setAuxData(out, canonFeatures, success); } - if (reordered != NULL) { - LE_DELETE_ARRAY(reordered); - } + if (reordered != NULL) { + LE_DELETE_ARRAY(reordered); + } - outCharCount = canonGSUBTable->process(fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); + outCharCount = canonGSUBTable->process(canonGSUBTable, fakeGlyphStorage, rightToLeft, scriptTag, langSysTag, (const GlyphDefinitionTableHeader*)NULL, substitutionFilter, canonFeatureMap, canonFeatureMapCount, FALSE, success); if (LE_FAILURE(success)) { delete substitutionFilter; @@ -423,16 +424,16 @@ void LayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 offset return; } - GlyphDefinitionTableHeader *gdefTable = (GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable; - CanonMarkFilter filter(gdefTable); + LEReferenceTo gdefTable((GlyphDefinitionTableHeader *) CanonShaping::glyphDefinitionTable, + CanonShaping::glyphDefinitionTableLen); + CanonMarkFilter filter(gdefTable, success); adjustMarkGlyphs(&chars[offset], count, reverse, glyphStorage, &filter, success); if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ - static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG; - - KernTable kt(fFontInstance, getFontTable(kernTableTag)); - kt.process(glyphStorage); + LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success); + KernTable kt(kernTable, success); + kt.process(glyphStorage, success); } // default is no adjustments @@ -517,9 +518,9 @@ void LayoutEngine::adjustMarkGlyphs(const LEUnicode chars[], le_int32 charCount, glyphStorage.adjustPosition(glyphCount, xAdjust, 0, success); } -const void *LayoutEngine::getFontTable(LETag tableTag) const +const void *LayoutEngine::getFontTable(LETag tableTag, size_t &length) const { - return fFontInstance->getFontTable(tableTag); + return fFontInstance->getFontTable(tableTag, length); } void LayoutEngine::mapCharsToGlyphs(const LEUnicode chars[], le_int32 offset, le_int32 count, le_bool reverse, le_bool mirror, @@ -566,7 +567,10 @@ le_int32 LayoutEngine::layoutChars(const LEUnicode chars[], le_int32 offset, le_ void LayoutEngine::reset() { + if(fGlyphStorage!=NULL) { fGlyphStorage->reset(); + fGlyphStorage = NULL; + } } LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, LEErrorCode &success) @@ -585,19 +589,19 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan return NULL; } - const GlyphSubstitutionTableHeader *gsubTable = (const GlyphSubstitutionTableHeader *) fontInstance->getFontTable(gsubTableTag); + LEReferenceTo gsubTable(fontInstance,gsubTableTag,success); LayoutEngine *result = NULL; LETag scriptTag = 0x00000000; LETag languageTag = 0x00000000; - LETag v2ScriptTag = OpenTypeLayoutEngine::getV2ScriptTag(scriptCode); + LETag v2ScriptTag = OpenTypeLayoutEngine::getV2ScriptTag(scriptCode); // Right now, only invoke V2 processing for Devanagari. TODO: Allow more V2 scripts as they are // properly tested. - if ( v2ScriptTag == dev2ScriptTag && gsubTable != NULL && gsubTable->coversScript( v2ScriptTag )) { - result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, TRUE, gsubTable, success); - } - else if (gsubTable != NULL && gsubTable->coversScript(scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode))) { + if ( v2ScriptTag == dev2ScriptTag && gsubTable.isValid() && gsubTable->coversScript(gsubTable, v2ScriptTag, success )) { + result = new IndicOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, TRUE, gsubTable, success); + } + else if (gsubTable.isValid() && gsubTable->coversScript(gsubTable, scriptTag = OpenTypeLayoutEngine::getScriptTag(scriptCode), success)) { switch (scriptCode) { case bengScriptCode: case devaScriptCode: @@ -633,10 +637,10 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan case janLanguageCode: case zhtLanguageCode: case zhsLanguageCode: - if (gsubTable->coversScriptAndLanguage(scriptTag, languageTag, TRUE)) { + if (gsubTable->coversScriptAndLanguage(gsubTable, scriptTag, languageTag, success, TRUE)) { result = new HanOpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success); break; - } + } // note: falling through to default case. default: @@ -663,9 +667,9 @@ LayoutEngine *LayoutEngine::layoutEngineFactory(const LEFontInstance *fontInstan if (morxTable != NULL && SWAPL(morxTable->version)==0x00020000) { result = new GXLayoutEngine2(fontInstance, scriptCode, languageCode, morxTable, typoFlags, success); } else { - const MorphTableHeader *mortTable = (MorphTableHeader *) fontInstance->getFontTable(mortTableTag); - if (mortTable != NULL && SWAPL(mortTable->version)==0x00010000) { // mort - result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, mortTable, success); + LEReferenceTo mortTable(fontInstance, mortTableTag, success); + if (LE_SUCCESS(success) && mortTable.isValid() && SWAPL(mortTable->version)==0x00010000) { // mort + result = new GXLayoutEngine(fontInstance, scriptCode, languageCode, mortTable, success); } else { switch (scriptCode) { case bengScriptCode: diff --git a/jdk/src/share/native/sun/font/layout/LayoutEngine.h b/jdk/src/share/native/sun/font/layout/LayoutEngine.h index 9293167dba6..2f5487f382d 100644 --- a/jdk/src/share/native/sun/font/layout/LayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/LayoutEngine.h @@ -280,12 +280,18 @@ protected: * some other way must override this method. * * @param tableTag - the four byte table tag. + * @param length - length to use * * @return the address of the table. * * @internal */ - virtual const void *getFontTable(LETag tableTag) const; + virtual const void *getFontTable(LETag tableTag, size_t &length) const; + + /** + * @deprecated + */ + virtual const void *getFontTable(LETag tableTag) const { size_t ignored; return getFontTable(tableTag, ignored); } /** * This method does character to glyph mapping. The default implementation diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp index 842b095e085..0014b95a515 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.cpp @@ -47,15 +47,15 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor) -LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader) - : StateTableProcessor(morphSubtableHeader) + LigatureSubstitutionProcessor::LigatureSubstitutionProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) +: StateTableProcessor(morphSubtableHeader, success), ligatureSubstitutionHeader(morphSubtableHeader, success) { - ligatureSubstitutionHeader = (const LigatureSubstitutionHeader *) morphSubtableHeader; + if(LE_FAILURE(success)) return; ligatureActionTableOffset = SWAPW(ligatureSubstitutionHeader->ligatureActionTableOffset); componentTableOffset = SWAPW(ligatureSubstitutionHeader->componentTableOffset); ligatureTableOffset = SWAPW(ligatureSubstitutionHeader->ligatureTableOffset); - entryTable = (const LigatureSubstitutionStateEntry *) ((char *) &stateTableHeader->stHeader + entryTableOffset); + entryTable = LEReferenceToArrayOf(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY); } LigatureSubstitutionProcessor::~LigatureSubstitutionProcessor() @@ -69,7 +69,9 @@ void LigatureSubstitutionProcessor::beginStateTable() ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex index) { - const LigatureSubstitutionStateEntry *entry = &entryTable[index]; + LEErrorCode success = LE_NO_ERROR; + const LigatureSubstitutionStateEntry *entry = entryTable.getAlias(index, success); + ByteOffset newState = SWAPW(entry->newStateOffset); le_int16 flags = SWAPW(entry->flags); @@ -88,7 +90,7 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp ByteOffset actionOffset = flags & lsfActionOffsetMask; if (actionOffset != 0) { - const LigatureActionEntry *ap = (const LigatureActionEntry *) ((char *) &ligatureSubstitutionHeader->stHeader + actionOffset); + LEReferenceTo ap(stHeader, success, actionOffset); LigatureActionEntry action; le_int32 offset, i = 0; le_int32 stack[nComponents]; @@ -97,7 +99,8 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp do { le_uint32 componentGlyph = componentStack[m--]; - action = SWAPL(*ap++); + action = SWAPL(*ap.getAlias()); + ap.addObject(success); // ap++ if (m < 0) { m = nComponents - 1; @@ -105,37 +108,33 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp offset = action & lafComponentOffsetMask; if (offset != 0) { - const le_int16 *offsetTable = (const le_int16 *)((char *) &ligatureSubstitutionHeader->stHeader + 2 * SignExtend(offset, lafComponentOffsetMask)); - const le_int16 *tableEnd = (const le_int16 *)((char *) &ligatureSubstitutionHeader + 1 * SWAPW(ligatureSubstitutionHeader->length)); + LEReferenceToArrayOf offsetTable(stHeader, success, 2 * SignExtend(offset, lafComponentOffsetMask), LE_UNBOUNDED_ARRAY); - // Check if the font is internally consistent - if(tableEnd < (const le_int16*)&ligatureSubstitutionHeader // stated end wrapped around? - || offsetTable > tableEnd) { // offset past end of stated length? + if(LE_FAILURE(success)) { currGlyph++; LE_DEBUG_BAD_FONT("off end of ligature substitution header"); return newState; // get out! bad font - } - - if(componentGlyph > glyphStorage.getGlyphCount()) { - LE_DEBUG_BAD_FONT("preposterous componentGlyph"); - currGlyph++; - return newState; // get out! bad font - } - i += SWAPW(offsetTable[LE_GET_GLYPH(glyphStorage[componentGlyph])]); + } + if(componentGlyph > glyphStorage.getGlyphCount()) { + LE_DEBUG_BAD_FONT("preposterous componentGlyph"); + currGlyph++; + return newState; // get out! bad font + } + i += SWAPW(offsetTable.getObject(LE_GET_GLYPH(glyphStorage[componentGlyph]), success)); if (action & (lafLast | lafStore)) { - const TTGlyphID *ligatureOffset = (const TTGlyphID *) ((char *) &ligatureSubstitutionHeader->stHeader + i); - TTGlyphID ligatureGlyph = SWAPW(*ligatureOffset); + LEReferenceTo ligatureOffset(stHeader, success, i); + TTGlyphID ligatureGlyph = SWAPW(*ligatureOffset.getAlias()); - glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); - if(mm==nComponents) { - LE_DEBUG_BAD_FONT("exceeded nComponents"); - mm--; // don't overrun the stack. - } - stack[++mm] = componentGlyph; - i = 0; + glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); + if(mm==nComponents) { + LE_DEBUG_BAD_FONT("exceeded nComponents"); + mm--; // don't overrun the stack. + } + stack[++mm] = componentGlyph; + i = 0; } else { - glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); + glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], 0xFFFF); } } #if LE_ASSERT_BAD_FONT @@ -146,11 +145,11 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp } while (!(action & lafLast) && (m>=0) ); // stop if last bit is set, or if run out of items while (mm >= 0) { - if (++m >= nComponents) { - m = 0; - } + if (++m >= nComponents) { + m = 0; + } - componentStack[m] = stack[mm--]; + componentStack[m] = stack[mm--]; } } diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.h b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.h index 9629a3d3a3d..1765a71d674 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc.h +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc.h @@ -58,7 +58,7 @@ public: virtual void endStateTable(); - LigatureSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader); + LigatureSubstitutionProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~LigatureSubstitutionProcessor(); /** @@ -83,12 +83,12 @@ protected: ByteOffset componentTableOffset; ByteOffset ligatureTableOffset; - const LigatureSubstitutionStateEntry *entryTable; + LEReferenceToArrayOf entryTable; le_int32 componentStack[nComponents]; le_int16 m; - const LigatureSubstitutionHeader *ligatureSubstitutionHeader; + LEReferenceTo ligatureSubstitutionHeader; }; diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp index f36be1b26ad..5eacf1c5e0c 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.cpp @@ -47,15 +47,18 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LigatureSubstitutionProcessor2) -LigatureSubstitutionProcessor2::LigatureSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : StateTableProcessor2(morphSubtableHeader) +LigatureSubstitutionProcessor2::LigatureSubstitutionProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : StateTableProcessor2(morphSubtableHeader, success), + ligActionOffset(0), + ligatureSubstitutionHeader(morphSubtableHeader, success), componentOffset(0), ligatureOffset(0), entryTable() { - ligatureSubstitutionHeader = (const LigatureSubstitutionHeader2 *) morphSubtableHeader; + if (LE_FAILURE(success)) return; + ligActionOffset = SWAPL(ligatureSubstitutionHeader->ligActionOffset); componentOffset = SWAPL(ligatureSubstitutionHeader->componentOffset); ligatureOffset = SWAPL(ligatureSubstitutionHeader->ligatureOffset); - entryTable = (const LigatureSubstitutionStateEntry2 *) ((char *) &stateTableHeader->stHeader + entryTableOffset); + entryTable = LEReferenceToArrayOf(stHeader, success, entryTableOffset, LE_UNBOUNDED_ARRAY); } LigatureSubstitutionProcessor2::~LigatureSubstitutionProcessor2() @@ -67,9 +70,11 @@ void LigatureSubstitutionProcessor2::beginStateTable() m = -1; } -le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) +le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success) { - const LigatureSubstitutionStateEntry2 *entry = &entryTable[index]; + const LigatureSubstitutionStateEntry2 *entry = entryTable.getAlias(index, success); + if(LE_FAILURE(success)) return 0; + le_uint16 nextStateIndex = SWAPW(entry->nextStateIndex); le_uint16 flags = SWAPW(entry->entryFlags); le_uint16 ligActionIndex = SWAPW(entry->ligActionIndex); @@ -81,7 +86,7 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp componentStack[m] = currGlyph; } else if ( m == -1) { // bad font- skip this glyph. - LE_DEBUG_BAD_FONT("m==-1") + //LE_DEBUG_BAD_FONT("m==-1 (componentCount went negative)") currGlyph+= dir; return nextStateIndex; } @@ -89,29 +94,25 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp ByteOffset actionOffset = flags & lsfPerformAction; if (actionOffset != 0) { - const LigatureActionEntry *ap = (const LigatureActionEntry *) ((char *) &ligatureSubstitutionHeader->stHeader + ligActionOffset) + ligActionIndex; - const TTGlyphID *ligatureTable = (const TTGlyphID *) ((char *) &ligatureSubstitutionHeader->stHeader + ligatureOffset); + LEReferenceTo ap(stHeader, success, ligActionOffset); // byte offset + ap.addObject(ligActionIndex - 1, success); // index offset ( one before the actual start, because we will pre-increment) + LEReferenceToArrayOf ligatureTable(stHeader, success, ligatureOffset, LE_UNBOUNDED_ARRAY); LigatureActionEntry action; le_int32 offset, i = 0; le_int32 stack[nComponents]; le_int16 mm = -1; - const le_uint16 *componentTable = (const le_uint16 *)((char *) &ligatureSubstitutionHeader->stHeader + componentOffset); - - const le_uint16 *tableEnd = (const le_uint16 *)((char *) &ligatureSubstitutionHeader + SWAPL(ligatureSubstitutionHeader->length)); - - // Check if the font is internally consistent - if(tableEnd < (const le_uint16*)&ligatureSubstitutionHeader // stated end wrapped around? - || componentTable > tableEnd) { // offset past end of stated length? + LEReferenceToArrayOf componentTable(stHeader, success, componentOffset, LE_UNBOUNDED_ARRAY); + if(LE_FAILURE(success)) { currGlyph+= dir; - LE_DEBUG_BAD_FONT("ligatureSubstHeader off end of table") return nextStateIndex; // get out! bad font } do { le_uint32 componentGlyph = componentStack[m--]; // pop off - action = SWAPL(*ap++); + ap.addObject(success); + action = SWAPL(*ap.getAlias()); if (m < 0) { m = nComponents - 1; @@ -124,10 +125,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp currGlyph+= dir; return nextStateIndex; // get out! bad font } - i += SWAPW(componentTable[LE_GET_GLYPH(glyphStorage[componentGlyph]) + (SignExtend(offset, lafComponentOffsetMask))]); + i += SWAPW(componentTable(LE_GET_GLYPH(glyphStorage[componentGlyph]) + (SignExtend(offset, lafComponentOffsetMask)),success)); if (action & (lafLast | lafStore)) { - TTGlyphID ligatureGlyph = SWAPW(ligatureTable[i]); + TTGlyphID ligatureGlyph = SWAPW(ligatureTable(i,success)); glyphStorage[componentGlyph] = LE_SET_GLYPH(glyphStorage[componentGlyph], ligatureGlyph); if(mm==nComponents) { LE_DEBUG_BAD_FONT("exceeded nComponents"); diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h index 81ab8b56e8a..2edfa903d25 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstProc2.h @@ -54,11 +54,12 @@ class LigatureSubstitutionProcessor2 : public StateTableProcessor2 public: virtual void beginStateTable(); - virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index); + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, + EntryTableIndex2 index, LEErrorCode &success); virtual void endStateTable(); - LigatureSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + LigatureSubstitutionProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~LigatureSubstitutionProcessor2(); /** @@ -83,12 +84,12 @@ protected: le_uint32 componentOffset; le_uint32 ligatureOffset; - const LigatureSubstitutionStateEntry2 *entryTable; + LEReferenceToArrayOf entryTable; le_int32 componentStack[nComponents]; le_int16 m; - const LigatureSubstitutionHeader2 *ligatureSubstitutionHeader; + const LEReferenceTo ligatureSubstitutionHeader; }; diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp index 0c173f3c7d5..46e808f2b6e 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.cpp @@ -40,10 +40,10 @@ U_NAMESPACE_BEGIN -le_uint32 LigatureSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 LigatureSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { Offset ligSetTableOffset = SWAPW(ligSetTableOffsetArray[coverageIndex]); diff --git a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.h b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.h index 97a426b104a..0b577e56980 100644 --- a/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.h +++ b/jdk/src/share/native/sun/font/layout/LigatureSubstSubtables.h @@ -50,6 +50,7 @@ struct LigatureSetTable le_uint16 ligatureCount; Offset ligatureTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LigatureSetTable, ligatureTableOffsetArray) struct LigatureTable { @@ -57,14 +58,16 @@ struct LigatureTable le_uint16 compCount; TTGlyphID componentArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LigatureTable, componentArray) struct LigatureSubstitutionSubtable : GlyphSubstitutionSubtable { le_uint16 ligSetCount; Offset ligSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const; + le_uint32 process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const; }; +LE_VAR_ARRAY(LigatureSubstitutionSubtable, ligSetTableOffsetArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp index db672efb98b..fe7477db730 100644 --- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp @@ -44,7 +44,7 @@ U_NAMESPACE_BEGIN -le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, +le_uint32 LookupProcessor::applyLookupTable(const LEReferenceTo &lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { if (LE_FAILURE(success)) { @@ -57,7 +57,7 @@ le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, Glyp le_uint32 delta; for (le_uint16 subtable = 0; subtable < subtableCount; subtable += 1) { - const LookupSubtable *lookupSubtable = lookupTable->getLookupSubtable(subtable); + LEReferenceTo lookupSubtable = lookupTable->getLookupSubtable(lookupTable, subtable, success); delta = applySubtable(lookupSubtable, lookupType, glyphIterator, fontInstance, success); @@ -72,7 +72,7 @@ le_uint32 LookupProcessor::applyLookupTable(const LookupTable *lookupTable, Glyp } le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, - le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, + le_bool rightToLeft, const LEReferenceTo &glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const { if (LE_FAILURE(success)) { @@ -89,13 +89,13 @@ le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdj rightToLeft, 0, 0, glyphDefinitionTableHeader); le_int32 newGlyphCount = glyphCount; - for (le_uint16 order = 0; order < lookupOrderCount; order += 1) { + for (le_uint16 order = 0; order < lookupOrderCount && LE_SUCCESS(success); order += 1) { le_uint16 lookup = lookupOrderArray[order]; FeatureMask selectMask = lookupSelectArray[lookup]; if (selectMask != 0) { - const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup); - if (!lookupTable) { + const LEReferenceTo lookupTable = lookupListTable->getLookupTable(lookupListTable, lookup, success); + if (!lookupTable.isValid() ||LE_FAILURE(success) ) { continue; } le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags); @@ -103,7 +103,7 @@ le_int32 LookupProcessor::process(LEGlyphStorage &glyphStorage, GlyphPositionAdj glyphIterator.reset(lookupFlags, selectMask); while (glyphIterator.findFeatureTag()) { - applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); + applyLookupTable(lookupTable, &glyphIterator, fontInstance, success); // TODO if (LE_FAILURE(success)) { return 0; } @@ -123,8 +123,8 @@ le_uint32 LookupProcessor::applySingleLookup(le_uint16 lookupTableIndex, GlyphIt return 0; } - const LookupTable *lookupTable = lookupListTable->getLookupTable(lookupTableIndex); - if (lookupTable == NULL) { + const LEReferenceTo lookupTable = lookupListTable->getLookupTable(lookupListTable, lookupTableIndex, success); + if (!lookupTable.isValid()) { success = LE_INTERNAL_ERROR; return 0; } @@ -135,33 +135,35 @@ le_uint32 LookupProcessor::applySingleLookup(le_uint16 lookupTableIndex, GlyphIt return delta; } -le_int32 LookupProcessor::selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order) +le_int32 LookupProcessor::selectLookups(const LEReferenceTo &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success) { - le_uint16 lookupCount = featureTable? SWAPW(featureTable->lookupCount) : 0; + le_uint16 lookupCount = featureTable.isValid()? SWAPW(featureTable->lookupCount) : 0; le_int32 store = order; - for (le_uint16 lookup = 0; lookup < lookupCount; lookup += 1) { - le_uint16 lookupListIndex = SWAPW(featureTable->lookupListIndexArray[lookup]); - if (lookupListIndex >= lookupSelectCount) { - continue; - } + LEReferenceToArrayOf lookupListIndexArray(featureTable, success, featureTable->lookupListIndexArray, lookupCount); - lookupSelectArray[lookupListIndex] |= featureMask; - lookupOrderArray[store++] = lookupListIndex; + for (le_uint16 lookup = 0; LE_SUCCESS(success) && lookup < lookupCount; lookup += 1) { + le_uint16 lookupListIndex = SWAPW(lookupListIndexArray.getObject(lookup,success)); + if (lookupListIndex >= lookupSelectCount) { + continue; + } + + lookupSelectArray[lookupListIndex] |= featureMask; + lookupOrderArray[store++] = lookupListIndex; } return store - order; } -LookupProcessor::LookupProcessor(const char *baseAddress, +LookupProcessor::LookupProcessor(const LETableReference &baseAddress, Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset, LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures, LEErrorCode& success) - : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL), lookupSelectCount(0), - lookupOrderArray(NULL), lookupOrderCount(0) + : lookupListTable(), featureListTable(), lookupSelectArray(NULL), lookupSelectCount(0), + lookupOrderArray(NULL), lookupOrderCount(0), fReference(baseAddress) { - const ScriptListTable *scriptListTable = NULL; - const LangSysTable *langSysTable = NULL; + LEReferenceTo scriptListTable; + LEReferenceTo langSysTable; le_uint16 featureCount = 0; le_uint16 lookupListCount = 0; le_uint16 requiredFeatureIndex; @@ -171,29 +173,33 @@ LookupProcessor::LookupProcessor(const char *baseAddress, } if (scriptListOffset != 0) { - scriptListTable = (const ScriptListTable *) (baseAddress + scriptListOffset); - langSysTable = scriptListTable->findLanguage(scriptTag, languageTag); + scriptListTable = LEReferenceTo(baseAddress, success, scriptListOffset); + langSysTable = scriptListTable->findLanguage(scriptListTable, scriptTag, languageTag, success); - if (langSysTable != 0) { - featureCount = SWAPW(langSysTable->featureCount); - } + if (langSysTable.isValid() && LE_SUCCESS(success)) { + featureCount = SWAPW(langSysTable->featureCount); + } } if (featureListOffset != 0) { - featureListTable = (const FeatureListTable *) (baseAddress + featureListOffset); + featureListTable = LEReferenceTo(baseAddress, success, featureListOffset); } if (lookupListOffset != 0) { - lookupListTable = (const LookupListTable *) (baseAddress + lookupListOffset); + lookupListTable = LEReferenceTo(baseAddress,success, lookupListOffset); + if(LE_SUCCESS(success) && lookupListTable.isValid()) { lookupListCount = SWAPW(lookupListTable->lookupCount); + } } - if (langSysTable == NULL || featureListTable == NULL || lookupListTable == NULL || + if (langSysTable.isEmpty() || featureListTable.isEmpty() || lookupListTable.isEmpty() || featureCount == 0 || lookupListCount == 0) { return; } - requiredFeatureIndex = SWAPW(langSysTable->reqFeatureIndex); + if(langSysTable.isValid()) { + requiredFeatureIndex = SWAPW(langSysTable->reqFeatureIndex); + } lookupSelectArray = LE_NEW_ARRAY(FeatureMask, lookupListCount); if (lookupSelectArray == NULL) { @@ -209,34 +215,38 @@ LookupProcessor::LookupProcessor(const char *baseAddress, le_int32 count, order = 0; le_uint32 featureReferences = 0; - const FeatureTable *featureTable = NULL; + LEReferenceTo featureTable; LETag featureTag; - const FeatureTable *requiredFeatureTable = NULL; + LEReferenceTo requiredFeatureTable; LETag requiredFeatureTag = 0x00000000U; // Count the total number of lookups referenced by all features. This will // be the maximum number of entries in the lookupOrderArray. We can't use // lookupListCount because some lookups might be referenced by more than // one feature. - for (le_uint32 feature = 0; feature < featureCount; feature += 1) { - le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]); + if(featureListTable.isValid() && LE_SUCCESS(success)) { + LEReferenceToArrayOf featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount); - featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag); - if (!featureTable) { - continue; + for (le_uint32 feature = 0; LE_SUCCESS(success)&&(feature < featureCount); feature += 1) { + le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature, success)); + + featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success); + if (!featureTable.isValid() || LE_FAILURE(success)) { + continue; } featureReferences += SWAPW(featureTable->lookupCount); + } } - if (!featureTable) { + if (!featureTable.isValid() || LE_FAILURE(success)) { success = LE_INTERNAL_ERROR; return; } if (requiredFeatureIndex != 0xFFFF) { - requiredFeatureTable = featureListTable->getFeatureTable(requiredFeatureIndex, &requiredFeatureTag); - featureReferences += SWAPW(featureTable->lookupCount); + requiredFeatureTable = featureListTable->getFeatureTable(featureListTable, requiredFeatureIndex, &requiredFeatureTag, success); + featureReferences += SWAPW(featureTable->lookupCount); } lookupOrderArray = LE_NEW_ARRAY(le_uint16, featureReferences); @@ -251,7 +261,7 @@ LookupProcessor::LookupProcessor(const char *baseAddress, // If this is the required feature, add its lookups if (requiredFeatureTag == fm.tag) { - count += selectLookups(requiredFeatureTable, fm.mask, order); + count += selectLookups(requiredFeatureTable, fm.mask, order, success); } if (orderFeatures) { @@ -261,7 +271,8 @@ LookupProcessor::LookupProcessor(const char *baseAddress, } for (le_uint16 feature = 0; feature < featureCount; feature += 1) { - le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]); + LEReferenceToArrayOf featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount); + le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature,success)); // don't add the required feature to the list more than once... // TODO: Do we need this check? (Spec. says required feature won't be in feature list...) @@ -269,10 +280,10 @@ LookupProcessor::LookupProcessor(const char *baseAddress, continue; } - featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag); + featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success); if (featureTag == fm.tag) { - count += selectLookups(featureTable, fm.mask, order + count); + count += selectLookups(featureTable, fm.mask, order + count, success); } } @@ -281,9 +292,10 @@ LookupProcessor::LookupProcessor(const char *baseAddress, } order += count; - } else { - for (le_uint16 feature = 0; feature < featureCount; feature += 1) { - le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]); + } else if(langSysTable.isValid()) { + LEReferenceToArrayOf featureIndexArray(langSysTable, success, langSysTable->featureIndexArray, featureCount); + for (le_uint16 feature = 0; LE_SUCCESS(success)&& (feature < featureCount); feature += 1) { + le_uint16 featureIndex = SWAPW(featureIndexArray.getObject(feature,success)); // don't add the required feature to the list more than once... // NOTE: This check is commented out because the spec. says that @@ -295,10 +307,10 @@ LookupProcessor::LookupProcessor(const char *baseAddress, } #endif - featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag); + featureTable = featureListTable->getFeatureTable(featureListTable, featureIndex, &featureTag, success); if (featureTag == fm.tag) { - order += selectLookups(featureTable, fm.mask, order); + order += selectLookups(featureTable, fm.mask, order, success); } } } diff --git a/jdk/src/share/native/sun/font/layout/LookupProcessor.h b/jdk/src/share/native/sun/font/layout/LookupProcessor.h index dc474c4f2bc..3ba03ef85f2 100644 --- a/jdk/src/share/native/sun/font/layout/LookupProcessor.h +++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.h @@ -41,6 +41,7 @@ #include "LETypes.h" #include "LEFontInstance.h" #include "OpenTypeTables.h" +#include "LETableReference.h" //#include "Lookups.h" //#include "Features.h" @@ -59,19 +60,21 @@ struct LookupTable; class LookupProcessor : public UMemory { public: le_int32 process(LEGlyphStorage &glyphStorage, GlyphPositionAdjustments *glyphPositionAdjustments, - le_bool rightToLeft, const GlyphDefinitionTableHeader *glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_bool rightToLeft, const LEReferenceTo &glyphDefinitionTableHeader, const LEFontInstance *fontInstance, LEErrorCode& success) const; - le_uint32 applyLookupTable(const LookupTable *lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; + le_uint32 applyLookupTable(const LEReferenceTo &lookupTable, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; le_uint32 applySingleLookup(le_uint16 lookupTableIndex, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const; - virtual le_uint32 applySubtable(const LookupSubtable *lookupSubtable, le_uint16 subtableType, + virtual le_uint32 applySubtable(const LEReferenceTo &lookupSubtable, le_uint16 subtableType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const = 0; virtual ~LookupProcessor(); + const LETableReference &getReference() const { return fReference; } + protected: - LookupProcessor(const char *baseAddress, + LookupProcessor(const LETableReference &baseAddress, Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset, @@ -84,10 +87,10 @@ protected: LookupProcessor(); - le_int32 selectLookups(const FeatureTable *featureTable, FeatureMask featureMask, le_int32 order); + le_int32 selectLookups(const LEReferenceTo &featureTable, FeatureMask featureMask, le_int32 order, LEErrorCode &success); - const LookupListTable *lookupListTable; - const FeatureListTable *featureListTable; + LEReferenceTo lookupListTable; + LEReferenceTo featureListTable; FeatureMask *lookupSelectArray; le_uint32 lookupSelectCount; @@ -95,6 +98,8 @@ protected: le_uint16 *lookupOrderArray; le_uint32 lookupOrderCount; + LETableReference fReference; + private: LookupProcessor(const LookupProcessor &other); // forbid copying of this class diff --git a/jdk/src/share/native/sun/font/layout/LookupTables.cpp b/jdk/src/share/native/sun/font/layout/LookupTables.cpp index 1c3acc151fe..6e7aa27957e 100644 --- a/jdk/src/share/native/sun/font/layout/LookupTables.cpp +++ b/jdk/src/share/native/sun/font/layout/LookupTables.cpp @@ -49,22 +49,26 @@ U_NAMESPACE_BEGIN of the derived classes, and implement it in the others by casting the "this" pointer to the type that has the implementation. */ -const LookupSegment *BinarySearchLookupTable::lookupSegment(const LookupSegment *segments, LEGlyphID glyph) const +const LookupSegment *BinarySearchLookupTable::lookupSegment(const LETableReference &base, const LookupSegment *segments, LEGlyphID glyph, LEErrorCode &success) const { + le_int16 unity = SWAPW(unitSize); le_int16 probe = SWAPW(searchRange); le_int16 extra = SWAPW(rangeShift); TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(glyph); - const LookupSegment *entry = segments; - const LookupSegment *trial = (const LookupSegment *) ((char *) entry + extra); + LEReferenceTo entry(base, success, segments); + LEReferenceTo trial(entry, success, extra); + + if(LE_FAILURE(success)) return NULL; if (SWAPW(trial->lastGlyph) <= ttGlyph) { entry = trial; } - while (probe > unity) { + while (probe > unity && LE_SUCCESS(success)) { probe >>= 1; - trial = (const LookupSegment *) ((char *) entry + probe); + trial = entry; // copy + trial.addOffset(probe, success); if (SWAPW(trial->lastGlyph) <= ttGlyph) { entry = trial; @@ -72,28 +76,29 @@ const LookupSegment *BinarySearchLookupTable::lookupSegment(const LookupSegment } if (SWAPW(entry->firstGlyph) <= ttGlyph) { - return entry; + return entry.getAlias(); } return NULL; } -const LookupSingle *BinarySearchLookupTable::lookupSingle(const LookupSingle *entries, LEGlyphID glyph) const +const LookupSingle *BinarySearchLookupTable::lookupSingle(const LETableReference &base, const LookupSingle *entries, LEGlyphID glyph, LEErrorCode &success) const { le_int16 unity = SWAPW(unitSize); le_int16 probe = SWAPW(searchRange); le_int16 extra = SWAPW(rangeShift); TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(glyph); - const LookupSingle *entry = entries; - const LookupSingle *trial = (const LookupSingle *) ((char *) entry + extra); + LEReferenceTo entry(base, success, entries); + LEReferenceTo trial(entry, success, extra); if (SWAPW(trial->glyph) <= ttGlyph) { entry = trial; } - while (probe > unity) { + while (probe > unity && LE_SUCCESS(success)) { probe >>= 1; - trial = (const LookupSingle *) ((char *) entry + probe); + trial = entry; + trial.addOffset(probe, success); if (SWAPW(trial->glyph) <= ttGlyph) { entry = trial; @@ -101,7 +106,7 @@ const LookupSingle *BinarySearchLookupTable::lookupSingle(const LookupSingle *en } if (SWAPW(entry->glyph) == ttGlyph) { - return entry; + return entry.getAlias(); } return NULL; diff --git a/jdk/src/share/native/sun/font/layout/LookupTables.h b/jdk/src/share/native/sun/font/layout/LookupTables.h index 7f6fccecad0..f15c7decace 100644 --- a/jdk/src/share/native/sun/font/layout/LookupTables.h +++ b/jdk/src/share/native/sun/font/layout/LookupTables.h @@ -39,6 +39,7 @@ #include "LETypes.h" #include "LayoutTables.h" +#include "LETableReference.h" U_NAMESPACE_BEGIN @@ -79,30 +80,34 @@ struct BinarySearchLookupTable : LookupTable le_int16 entrySelector; le_int16 rangeShift; - const LookupSegment *lookupSegment(const LookupSegment *segments, LEGlyphID glyph) const; + const LookupSegment *lookupSegment(const LETableReference &base, const LookupSegment *segments, LEGlyphID glyph, LEErrorCode &success) const; - const LookupSingle *lookupSingle(const LookupSingle *entries, LEGlyphID glyph) const; + const LookupSingle *lookupSingle(const LETableReference &base, const LookupSingle *entries, LEGlyphID glyph, LEErrorCode &success) const; }; struct SimpleArrayLookupTable : LookupTable { LookupValue valueArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(SimpleArrayLookupTable, valueArray) struct SegmentSingleLookupTable : BinarySearchLookupTable { LookupSegment segments[ANY_NUMBER]; }; +LE_VAR_ARRAY(SegmentSingleLookupTable, segments) struct SegmentArrayLookupTable : BinarySearchLookupTable { LookupSegment segments[ANY_NUMBER]; }; +LE_VAR_ARRAY(SegmentArrayLookupTable, segments) struct SingleTableLookupTable : BinarySearchLookupTable { LookupSingle entries[ANY_NUMBER]; }; +LE_VAR_ARRAY(SingleTableLookupTable, entries) struct TrimmedArrayLookupTable : LookupTable { @@ -110,6 +115,7 @@ struct TrimmedArrayLookupTable : LookupTable TTGlyphID glyphCount; LookupValue valueArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(TrimmedArrayLookupTable, valueArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/Lookups.cpp b/jdk/src/share/native/sun/font/layout/Lookups.cpp index f6b502be228..2c04cdfe44c 100644 --- a/jdk/src/share/native/sun/font/layout/Lookups.cpp +++ b/jdk/src/share/native/sun/font/layout/Lookups.cpp @@ -37,33 +37,35 @@ U_NAMESPACE_BEGIN -const LookupTable *LookupListTable::getLookupTable(le_uint16 lookupTableIndex) const +const LEReferenceTo LookupListTable::getLookupTable(const LEReferenceTo &base, le_uint16 lookupTableIndex, LEErrorCode &success) const { - if (lookupTableIndex >= SWAPW(lookupCount)) { - return 0; - } + LEReferenceToArrayOf lookupTableOffsetArrayRef(base, success, (const Offset*)&lookupTableOffsetArray, SWAPW(lookupCount)); - Offset lookupTableOffset = lookupTableOffsetArray[lookupTableIndex]; - - return (const LookupTable *) ((char *) this + SWAPW(lookupTableOffset)); + if(LE_FAILURE(success) || lookupTableIndex>lookupTableOffsetArrayRef.getCount()) { + return LEReferenceTo(); + } else { + return LEReferenceTo(base, success, SWAPW(lookupTableOffsetArrayRef.getObject(lookupTableIndex, success))); + } } -const LookupSubtable *LookupTable::getLookupSubtable(le_uint16 subtableIndex) const +const LEReferenceTo LookupTable::getLookupSubtable(const LEReferenceTo &base, le_uint16 subtableIndex, LEErrorCode &success) const { - if (subtableIndex >= SWAPW(subTableCount)) { - return 0; - } + LEReferenceToArrayOf subTableOffsetArrayRef(base, success, (const Offset*)&subTableOffsetArray, SWAPW(subTableCount)); - Offset subtableOffset = subTableOffsetArray[subtableIndex]; - - return (const LookupSubtable *) ((char *) this + SWAPW(subtableOffset)); + if(LE_FAILURE(success) || subtableIndex>subTableOffsetArrayRef.getCount()) { + return LEReferenceTo(); + } else { + return LEReferenceTo(base, success, SWAPW(subTableOffsetArrayRef.getObject(subtableIndex, success))); + } } -le_int32 LookupSubtable::getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const +le_int32 LookupSubtable::getGlyphCoverage(const LEReferenceTo &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const { - const CoverageTable *coverageTable = (const CoverageTable *) ((char *) this + SWAPW(tableOffset)); + const LEReferenceTo coverageTable(base, success, SWAPW(tableOffset)); - return coverageTable->getGlyphCoverage(glyphID); + if(LE_FAILURE(success)) return 0; + + return coverageTable->getGlyphCoverage(glyphID); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/Lookups.h b/jdk/src/share/native/sun/font/layout/Lookups.h index 2ca6cabe8c1..ef71d997d49 100644 --- a/jdk/src/share/native/sun/font/layout/Lookups.h +++ b/jdk/src/share/native/sun/font/layout/Lookups.h @@ -58,9 +58,14 @@ struct LookupSubtable le_uint16 subtableFormat; Offset coverageTableOffset; - inline le_int32 getGlyphCoverage(LEGlyphID glyphID) const; + inline le_int32 getGlyphCoverage(const LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const; - le_int32 getGlyphCoverage(Offset tableOffset, LEGlyphID glyphID) const; + le_int32 getGlyphCoverage(const LEReferenceTo &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const; + + // convenience + inline le_int32 getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const; + + inline le_int32 getGlyphCoverage(const LETableReference &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const; }; struct LookupTable @@ -70,20 +75,32 @@ struct LookupTable le_uint16 subTableCount; Offset subTableOffsetArray[ANY_NUMBER]; - const LookupSubtable *getLookupSubtable(le_uint16 subtableIndex) const; + const LEReferenceTo getLookupSubtable(const LEReferenceTo &base, le_uint16 subtableIndex, LEErrorCode &success) const; }; +LE_VAR_ARRAY(LookupTable, subTableOffsetArray) struct LookupListTable { le_uint16 lookupCount; Offset lookupTableOffsetArray[ANY_NUMBER]; - const LookupTable *getLookupTable(le_uint16 lookupTableIndex) const; + const LEReferenceTo getLookupTable(const LEReferenceTo &base, le_uint16 lookupTableIndex, LEErrorCode &success) const; }; +LE_VAR_ARRAY(LookupListTable, lookupTableOffsetArray) -inline le_int32 LookupSubtable::getGlyphCoverage(LEGlyphID glyphID) const +inline le_int32 LookupSubtable::getGlyphCoverage(const LEReferenceTo &base, LEGlyphID glyphID, LEErrorCode &success) const { - return getGlyphCoverage(coverageTableOffset, glyphID); + return getGlyphCoverage(base, coverageTableOffset, glyphID, success); +} + +inline le_int32 LookupSubtable::getGlyphCoverage(const LETableReference &base, LEGlyphID glyphID, LEErrorCode &success) const { + LEReferenceTo thisRef(base, success, this); + return getGlyphCoverage(thisRef, glyphID, success); +} + +inline le_int32 LookupSubtable::getGlyphCoverage(const LETableReference &base, Offset tableOffset, LEGlyphID glyphID, LEErrorCode &success) const { + LEReferenceTo thisRef(base, success, this); + return getGlyphCoverage(thisRef, tableOffset, glyphID, success); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/MarkArrays.h b/jdk/src/share/native/sun/font/layout/MarkArrays.h index f4e19fd2743..badeb4f162e 100644 --- a/jdk/src/share/native/sun/font/layout/MarkArrays.h +++ b/jdk/src/share/native/sun/font/layout/MarkArrays.h @@ -57,6 +57,7 @@ struct MarkArray le_int32 getMarkClass(LEGlyphID glyphID, le_int32 coverageIndex, const LEFontInstance *fontInstance, LEPoint &anchor) const; }; +LE_VAR_ARRAY(MarkArray, markRecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp index 45b78cf81fe..2878981b6be 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.cpp @@ -51,10 +51,10 @@ LEGlyphID MarkToBasePositioningSubtable::findBaseGlyph(GlyphIterator *glyphItera return 0xFFFF; } -le_int32 MarkToBasePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_int32 MarkToBasePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); - le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph); + le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); if (markCoverage < 0) { // markGlyph isn't a covered mark glyph @@ -75,7 +75,7 @@ le_int32 MarkToBasePositioningSubtable::process(GlyphIterator *glyphIterator, co // FIXME: We probably don't want to find a base glyph before a previous ligature... GlyphIterator baseIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreLigatures*/)); LEGlyphID baseGlyph = findBaseGlyph(&baseIterator); - le_int32 baseCoverage = getBaseCoverage((LEGlyphID) baseGlyph); + le_int32 baseCoverage = getBaseCoverage(base, (LEGlyphID) baseGlyph, success); const BaseArray *baseArray = (const BaseArray *) ((char *) this + SWAPW(baseArrayOffset)); le_uint16 baseCount = SWAPW(baseArray->baseRecordCount); diff --git a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h index 41b133ee50e..dcddb9d0eb2 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h +++ b/jdk/src/share/native/sun/font/layout/MarkToBasePosnSubtables.h @@ -48,7 +48,7 @@ U_NAMESPACE_BEGIN struct MarkToBasePositioningSubtable : AttachmentPositioningSubtable { - le_int32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_int32 process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; LEGlyphID findBaseGlyph(GlyphIterator *glyphIterator) const; }; @@ -56,12 +56,14 @@ struct BaseRecord { Offset baseAnchorTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(BaseRecord, baseAnchorTableOffsetArray) struct BaseArray { le_int16 baseRecordCount; BaseRecord baseRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(BaseArray, baseRecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp index 346291e11ce..8e93e079a79 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.cpp @@ -50,10 +50,10 @@ LEGlyphID MarkToLigaturePositioningSubtable::findLigatureGlyph(GlyphIterator *gl return 0xFFFF; } -le_int32 MarkToLigaturePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_int32 MarkToLigaturePositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); - le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph); + le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); if (markCoverage < 0) { // markGlyph isn't a covered mark glyph @@ -74,7 +74,7 @@ le_int32 MarkToLigaturePositioningSubtable::process(GlyphIterator *glyphIterator // FIXME: we probably don't want to find a ligature before a previous base glyph... GlyphIterator ligatureIterator(*glyphIterator, (le_uint16) (lfIgnoreMarks /*| lfIgnoreBaseGlyphs*/)); LEGlyphID ligatureGlyph = findLigatureGlyph(&ligatureIterator); - le_int32 ligatureCoverage = getBaseCoverage((LEGlyphID) ligatureGlyph); + le_int32 ligatureCoverage = getBaseCoverage(base, (LEGlyphID) ligatureGlyph, success); const LigatureArray *ligatureArray = (const LigatureArray *) ((char *) this + SWAPW(baseArrayOffset)); le_uint16 ligatureCount = SWAPW(ligatureArray->ligatureCount); diff --git a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h index 9a501bd0b4e..27199257b6b 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h +++ b/jdk/src/share/native/sun/font/layout/MarkToLigaturePosnSubtables.h @@ -48,7 +48,7 @@ U_NAMESPACE_BEGIN struct MarkToLigaturePositioningSubtable : AttachmentPositioningSubtable { - le_int32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_int32 process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; LEGlyphID findLigatureGlyph(GlyphIterator *glyphIterator) const; }; @@ -56,18 +56,21 @@ struct ComponentRecord { Offset ligatureAnchorTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(ComponentRecord, ligatureAnchorTableOffsetArray) struct LigatureAttachTable { le_uint16 componentCount; ComponentRecord componentRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LigatureAttachTable, componentRecordArray) struct LigatureArray { le_uint16 ligatureCount; Offset ligatureAttachTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LigatureArray, ligatureAttachTableOffsetArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp index 719484c1468..aa0bcd43c7c 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.cpp @@ -51,10 +51,10 @@ LEGlyphID MarkToMarkPositioningSubtable::findMark2Glyph(GlyphIterator *glyphIter return 0xFFFF; } -le_int32 MarkToMarkPositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_int32 MarkToMarkPositioningSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID markGlyph = glyphIterator->getCurrGlyphID(); - le_int32 markCoverage = getGlyphCoverage((LEGlyphID) markGlyph); + le_int32 markCoverage = getGlyphCoverage(base, (LEGlyphID) markGlyph, success); if (markCoverage < 0) { // markGlyph isn't a covered mark glyph @@ -74,7 +74,7 @@ le_int32 MarkToMarkPositioningSubtable::process(GlyphIterator *glyphIterator, co GlyphIterator mark2Iterator(*glyphIterator); LEGlyphID mark2Glyph = findMark2Glyph(&mark2Iterator); - le_int32 mark2Coverage = getBaseCoverage((LEGlyphID) mark2Glyph); + le_int32 mark2Coverage = getBaseCoverage(base, (LEGlyphID) mark2Glyph, success); const Mark2Array *mark2Array = (const Mark2Array *) ((char *) this + SWAPW(baseArrayOffset)); le_uint16 mark2Count = SWAPW(mark2Array->mark2RecordCount); diff --git a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h index b4861965ba5..3ddfc499609 100644 --- a/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h +++ b/jdk/src/share/native/sun/font/layout/MarkToMarkPosnSubtables.h @@ -48,7 +48,7 @@ U_NAMESPACE_BEGIN struct MarkToMarkPositioningSubtable : AttachmentPositioningSubtable { - le_int32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_int32 process(const LETableReference &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; LEGlyphID findMark2Glyph(GlyphIterator *glyphIterator) const; }; @@ -56,12 +56,14 @@ struct Mark2Record { Offset mark2AnchorTableOffsetArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(Mark2Record, mark2AnchorTableOffsetArray) struct Mark2Array { le_uint16 mark2RecordCount; Mark2Record mark2RecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(Mark2Array, mark2RecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/MorphTables.cpp b/jdk/src/share/native/sun/font/layout/MorphTables.cpp index 543110e68ed..17597a1ba01 100644 --- a/jdk/src/share/native/sun/font/layout/MorphTables.cpp +++ b/jdk/src/share/native/sun/font/layout/MorphTables.cpp @@ -44,61 +44,61 @@ U_NAMESPACE_BEGIN -void MorphTableHeader::process(LEGlyphStorage &glyphStorage) const +void MorphTableHeader::process(const LETableReference &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const { - const ChainHeader *chainHeader = chains; - le_uint32 chainCount = SWAPL(this->nChains); + le_uint32 chainCount = SWAPL(this->nChains); + LEReferenceTo chainHeader(base, success, chains); // moving header + LEReferenceToArrayOf chainHeaderArray(base, success, chains, chainCount); le_uint32 chain; - for (chain = 0; chain < chainCount; chain += 1) { + for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain += 1) { FeatureFlags defaultFlags = SWAPL(chainHeader->defaultFlags); le_uint32 chainLength = SWAPL(chainHeader->chainLength); le_int16 nFeatureEntries = SWAPW(chainHeader->nFeatureEntries); le_int16 nSubtables = SWAPW(chainHeader->nSubtables); - const MorphSubtableHeader *subtableHeader = - (const MorphSubtableHeader *)&chainHeader->featureTable[nFeatureEntries]; + LEReferenceTo subtableHeader = + LEReferenceTo(chainHeader,success, &(chainHeader->featureTable[nFeatureEntries])); le_int16 subtable; - for (subtable = 0; subtable < nSubtables; subtable += 1) { + for (subtable = 0; LE_SUCCESS(success) && (subtable < nSubtables); subtable += 1) { le_int16 length = SWAPW(subtableHeader->length); SubtableCoverage coverage = SWAPW(subtableHeader->coverage); FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures); // should check coverage more carefully... - if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0) { - subtableHeader->process(glyphStorage); + if ((coverage & scfVertical) == 0 && (subtableFeatures & defaultFlags) != 0 && LE_SUCCESS(success)) { + subtableHeader->process(subtableHeader, glyphStorage, success); } - subtableHeader = (const MorphSubtableHeader *) ((char *)subtableHeader + length); + subtableHeader.addOffset(length, success); } - - chainHeader = (const ChainHeader *)((char *)chainHeader + chainLength); + chainHeader.addOffset(chainLength, success); } } -void MorphSubtableHeader::process(LEGlyphStorage &glyphStorage) const +void MorphSubtableHeader::process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const { SubtableProcessor *processor = NULL; switch (SWAPW(coverage) & scfTypeMask) { case mstIndicRearrangement: - processor = new IndicRearrangementProcessor(this); + processor = new IndicRearrangementProcessor(base, success); break; case mstContextualGlyphSubstitution: - processor = new ContextualGlyphSubstitutionProcessor(this); + processor = new ContextualGlyphSubstitutionProcessor(base, success); break; case mstLigatureSubstitution: - processor = new LigatureSubstitutionProcessor(this); + processor = new LigatureSubstitutionProcessor(base, success); break; case mstReservedUnused: break; case mstNonContextualGlyphSubstitution: - processor = NonContextualGlyphSubstitutionProcessor::createInstance(this); + processor = NonContextualGlyphSubstitutionProcessor::createInstance(base, success); break; /* @@ -112,8 +112,10 @@ void MorphSubtableHeader::process(LEGlyphStorage &glyphStorage) const } if (processor != NULL) { - processor->process(glyphStorage); - delete processor; + if(LE_SUCCESS(success)) { + processor->process(glyphStorage, success); + } + delete processor; } } diff --git a/jdk/src/share/native/sun/font/layout/MorphTables.h b/jdk/src/share/native/sun/font/layout/MorphTables.h index f58c1985a64..a6838703f0b 100644 --- a/jdk/src/share/native/sun/font/layout/MorphTables.h +++ b/jdk/src/share/native/sun/font/layout/MorphTables.h @@ -39,6 +39,7 @@ #include "LETypes.h" #include "LayoutTables.h" +#include "LETableReference.h" U_NAMESPACE_BEGIN @@ -65,6 +66,7 @@ struct ChainHeader le_int16 nSubtables; FeatureTableEntry featureTable[ANY_NUMBER]; }; +LE_VAR_ARRAY(ChainHeader, featureTable) struct MorphTableHeader { @@ -72,8 +74,9 @@ struct MorphTableHeader le_uint32 nChains; ChainHeader chains[ANY_NUMBER]; - void process(LEGlyphStorage &glyphStorage) const; + void process(const LETableReference& base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const; }; +LE_VAR_ARRAY(MorphTableHeader, chains) typedef le_int16 SubtableCoverage; typedef le_uint32 SubtableCoverage2; @@ -103,7 +106,7 @@ struct MorphSubtableHeader SubtableCoverage coverage; FeatureFlags subtableFeatures; - void process(LEGlyphStorage &glyphStorage) const; + void process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const; }; enum SubtableCoverageFlags2 @@ -121,7 +124,7 @@ struct MorphSubtableHeader2 SubtableCoverage2 coverage; FeatureFlags subtableFeatures; - void process(LEGlyphStorage &glyphStorage) const; + void process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const; }; struct ChainHeader2 @@ -132,6 +135,7 @@ struct ChainHeader2 le_uint32 nSubtables; FeatureTableEntry featureTable[ANY_NUMBER]; }; +LE_VAR_ARRAY(ChainHeader2, featureTable) struct MorphTableHeader2 { @@ -139,8 +143,9 @@ struct MorphTableHeader2 le_uint32 nChains; ChainHeader2 chains[ANY_NUMBER]; - void process(LEGlyphStorage &glyphStorage, le_int32 typoFlags) const; + void process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, le_int32 typoFlags, LEErrorCode &success) const; }; +LE_VAR_ARRAY(MorphTableHeader2, chains) /* * AAT Font Features diff --git a/jdk/src/share/native/sun/font/layout/MorphTables2.cpp b/jdk/src/share/native/sun/font/layout/MorphTables2.cpp index c9951a5f411..b75ca85a0ce 100644 --- a/jdk/src/share/native/sun/font/layout/MorphTables2.cpp +++ b/jdk/src/share/native/sun/font/layout/MorphTables2.cpp @@ -42,27 +42,40 @@ U_NAMESPACE_BEGIN -void MorphTableHeader2::process(LEGlyphStorage &glyphStorage, le_int32 typoFlags) const +void MorphTableHeader2::process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, + le_int32 typoFlags, LEErrorCode &success) const { - const ChainHeader2 *chainHeader = chains; - le_uint32 chainCount = SWAPL(this->nChains); - le_uint32 chain; + if(LE_FAILURE(success)) return; - for (chain = 0; chain < chainCount; chain++) { + le_uint32 chainCount = SWAPL(this->nChains); + LEReferenceTo chainHeader(base, success, &chains[0]); + /* chainHeader and subtableHeader are implemented as a moving pointer rather than an array dereference + * to (slightly) reduce code churn. However, must be careful to preincrement them the 2nd time through. + * We don't want to increment them at the end of the loop, as that would attempt to dereference + * out of range memory. + */ + le_uint32 chain; + + for (chain = 0; LE_SUCCESS(success) && (chain < chainCount); chain++) { + if (chain>0) { + le_uint32 chainLength = SWAPL(chainHeader->chainLength); + chainHeader.addOffset(chainLength, success); // Don't increment the first time + } FeatureFlags flag = SWAPL(chainHeader->defaultFlags); - le_uint32 chainLength = SWAPL(chainHeader->chainLength); le_uint32 nFeatureEntries = SWAPL(chainHeader->nFeatureEntries); le_uint32 nSubtables = SWAPL(chainHeader->nSubtables); - const MorphSubtableHeader2 *subtableHeader = - (const MorphSubtableHeader2 *)&chainHeader->featureTable[nFeatureEntries]; + LEReferenceTo subtableHeader(chainHeader, + success, (const MorphSubtableHeader2 *)&chainHeader->featureTable[nFeatureEntries]); le_uint32 subtable; + if(LE_FAILURE(success)) break; // malformed table if (typoFlags != 0) { le_uint32 featureEntry; - + LEReferenceToArrayOf featureTableRef(chainHeader, success, &chainHeader->featureTable[0], nFeatureEntries); + if(LE_FAILURE(success)) break; // Feature subtables for (featureEntry = 0; featureEntry < nFeatureEntries; featureEntry++) { - FeatureTableEntry featureTableEntry = chains->featureTable[featureEntry]; + const FeatureTableEntry &featureTableEntry = featureTableRef(featureEntry, success); le_int16 featureType = SWAPW(featureTableEntry.featureType); le_int16 featureSetting = SWAPW(featureTableEntry.featureSetting); le_uint32 enableFlags = SWAPL(featureTableEntry.enableFlags); @@ -172,57 +185,63 @@ void MorphTableHeader2::process(LEGlyphStorage &glyphStorage, le_int32 typoFlags } } - for (subtable = 0; subtable < nSubtables; subtable++) { - le_uint32 length = SWAPL(subtableHeader->length); + for (subtable = 0; LE_SUCCESS(success) && subtable < nSubtables; subtable++) { + if(subtable>0) { + le_uint32 length = SWAPL(subtableHeader->length); + subtableHeader.addOffset(length, success); // Don't addOffset for the last entry. + } le_uint32 coverage = SWAPL(subtableHeader->coverage); FeatureFlags subtableFeatures = SWAPL(subtableHeader->subtableFeatures); // should check coverage more carefully... if (((coverage & scfIgnoreVt2) || !(coverage & scfVertical2)) && (subtableFeatures & flag) != 0) { - subtableHeader->process(glyphStorage); + subtableHeader->process(subtableHeader, glyphStorage, success); } - subtableHeader = (const MorphSubtableHeader2 *) ((char *)subtableHeader + length); } - chainHeader = (const ChainHeader2 *)((char *)chainHeader + chainLength); } } -void MorphSubtableHeader2::process(LEGlyphStorage &glyphStorage) const +void MorphSubtableHeader2::process(const LEReferenceTo &base, LEGlyphStorage &glyphStorage, LEErrorCode &success) const { SubtableProcessor2 *processor = NULL; switch (SWAPL(coverage) & scfTypeMask2) { case mstIndicRearrangement: - processor = new IndicRearrangementProcessor2(this); + processor = new IndicRearrangementProcessor2(base, success); break; case mstContextualGlyphSubstitution: - processor = new ContextualGlyphSubstitutionProcessor2(this); + processor = new ContextualGlyphSubstitutionProcessor2(base, success); break; case mstLigatureSubstitution: - processor = new LigatureSubstitutionProcessor2(this); + processor = new LigatureSubstitutionProcessor2(base, success); break; case mstReservedUnused: break; case mstNonContextualGlyphSubstitution: - processor = NonContextualGlyphSubstitutionProcessor2::createInstance(this); + processor = NonContextualGlyphSubstitutionProcessor2::createInstance(base, success); break; case mstContextualGlyphInsertion: - processor = new ContextualGlyphInsertionProcessor2(this); + processor = new ContextualGlyphInsertionProcessor2(base, success); break; default: - break; + return; + break; /*NOTREACHED*/ } if (processor != NULL) { - processor->process(glyphStorage); + processor->process(glyphStorage, success); delete processor; + } else { + if(LE_SUCCESS(success)) { + success = LE_MEMORY_ALLOCATION_ERROR; // because ptr is null and we didn't break out. + } } } diff --git a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp index e105e1eb688..9d72ca8a16c 100644 --- a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.cpp @@ -39,7 +39,7 @@ U_NAMESPACE_BEGIN -le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter) const +le_uint32 MultipleSubstitutionSubtable::process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter) const { if (LE_FAILURE(success)) { return 0; @@ -58,7 +58,7 @@ le_uint32 MultipleSubstitutionSubtable::process(GlyphIterator *glyphIterator, LE return 0; } - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); le_uint16 seqCount = SWAPW(sequenceCount); if (coverageIndex >= 0 && coverageIndex < seqCount) { diff --git a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.h b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.h index 5fe715ab7d5..55b809eef67 100644 --- a/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.h +++ b/jdk/src/share/native/sun/font/layout/MultipleSubstSubtables.h @@ -50,14 +50,16 @@ struct SequenceTable le_uint16 glyphCount; TTGlyphID substituteArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(SequenceTable, substituteArray) struct MultipleSubstitutionSubtable : GlyphSubstitutionSubtable { le_uint16 sequenceCount; Offset sequenceTableOffsetArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter = NULL) const; + le_uint32 process(const LETableReference &base, GlyphIterator *glyphIterator, LEErrorCode& success, const LEGlyphFilter *filter = NULL) const; }; +LE_VAR_ARRAY(MultipleSubstitutionSubtable, sequenceTableOffsetArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp index a7e655f67f9..f664fe8fbc6 100644 --- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.cpp @@ -47,8 +47,8 @@ NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor { } -NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader) - : SubtableProcessor(morphSubtableHeader) +NonContextualGlyphSubstitutionProcessor::NonContextualGlyphSubstitutionProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : SubtableProcessor(morphSubtableHeader, success) { } @@ -56,26 +56,27 @@ NonContextualGlyphSubstitutionProcessor::~NonContextualGlyphSubstitutionProcesso { } -SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const MorphSubtableHeader *morphSubtableHeader) +SubtableProcessor *NonContextualGlyphSubstitutionProcessor::createInstance(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) { - const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader; + LEReferenceTo header(morphSubtableHeader, success); - switch (SWAPW(header->table.format)) - { + if(LE_FAILURE(success)) return NULL; + + switch (SWAPW(header->table.format)) { case ltfSimpleArray: - return new SimpleArrayProcessor(morphSubtableHeader); + return new SimpleArrayProcessor(morphSubtableHeader, success); case ltfSegmentSingle: - return new SegmentSingleProcessor(morphSubtableHeader); + return new SegmentSingleProcessor(morphSubtableHeader, success); case ltfSegmentArray: - return new SegmentArrayProcessor(morphSubtableHeader); + return new SegmentArrayProcessor(morphSubtableHeader, success); case ltfSingleTable: - return new SingleTableProcessor(morphSubtableHeader); + return new SingleTableProcessor(morphSubtableHeader, success); case ltfTrimmedArray: - return new TrimmedArrayProcessor(morphSubtableHeader); + return new TrimmedArrayProcessor(morphSubtableHeader, success); default: return NULL; diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h index e8e05078ab2..9fa70cfe1a8 100644 --- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc.h @@ -49,13 +49,13 @@ class LEGlyphStorage; class NonContextualGlyphSubstitutionProcessor : public SubtableProcessor { public: - virtual void process(LEGlyphStorage &glyphStorage) = 0; + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0; - static SubtableProcessor *createInstance(const MorphSubtableHeader *morphSubtableHeader); + static SubtableProcessor *createInstance(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); protected: NonContextualGlyphSubstitutionProcessor(); - NonContextualGlyphSubstitutionProcessor(const MorphSubtableHeader *morphSubtableHeader); + NonContextualGlyphSubstitutionProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &status); virtual ~NonContextualGlyphSubstitutionProcessor(); diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp index 8c304912400..615633c017a 100644 --- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.cpp @@ -47,8 +47,9 @@ NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcesso { } -NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : SubtableProcessor2(morphSubtableHeader) +NonContextualGlyphSubstitutionProcessor2::NonContextualGlyphSubstitutionProcessor2( + const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : SubtableProcessor2(morphSubtableHeader, success) { } @@ -56,26 +57,28 @@ NonContextualGlyphSubstitutionProcessor2::~NonContextualGlyphSubstitutionProcess { } -SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance(const MorphSubtableHeader2 *morphSubtableHeader) +SubtableProcessor2 *NonContextualGlyphSubstitutionProcessor2::createInstance( + const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) { - const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + const LEReferenceTo header(morphSubtableHeader, success); + if(LE_FAILURE(success)) return NULL; switch (SWAPW(header->table.format)) { case ltfSimpleArray: - return new SimpleArrayProcessor2(morphSubtableHeader); + return new SimpleArrayProcessor2(morphSubtableHeader, success); case ltfSegmentSingle: - return new SegmentSingleProcessor2(morphSubtableHeader); + return new SegmentSingleProcessor2(morphSubtableHeader, success); case ltfSegmentArray: - return new SegmentArrayProcessor2(morphSubtableHeader); + return new SegmentArrayProcessor2(morphSubtableHeader, success); case ltfSingleTable: - return new SingleTableProcessor2(morphSubtableHeader); + return new SingleTableProcessor2(morphSubtableHeader, success); case ltfTrimmedArray: - return new TrimmedArrayProcessor2(morphSubtableHeader); + return new TrimmedArrayProcessor2(morphSubtableHeader, success); default: return NULL; diff --git a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h index 6354bc92069..f2a815037cb 100644 --- a/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h +++ b/jdk/src/share/native/sun/font/layout/NonContextualGlyphSubstProc2.h @@ -49,13 +49,13 @@ class LEGlyphStorage; class NonContextualGlyphSubstitutionProcessor2 : public SubtableProcessor2 { public: - virtual void process(LEGlyphStorage &glyphStorage) = 0; + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0; - static SubtableProcessor2 *createInstance(const MorphSubtableHeader2 *morphSubtableHeader); + static SubtableProcessor2 *createInstance(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); protected: NonContextualGlyphSubstitutionProcessor2(); - NonContextualGlyphSubstitutionProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + NonContextualGlyphSubstitutionProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~NonContextualGlyphSubstitutionProcessor2(); diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp index a561a135182..707fb21eceb 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.cpp @@ -151,25 +151,21 @@ static const FeatureMap featureMap[] = static const le_int32 featureMapCount = LE_ARRAY_SIZE(featureMap); OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success) : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fFeatureMask(minimalFeatures), fFeatureMap(featureMap), fFeatureMapCount(featureMapCount), fFeatureOrder(FALSE), - fGSUBTable(gsubTable), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL) + fGSUBTable(gsubTable), + fGDEFTable(fontInstance, LE_GDEF_TABLE_TAG, success), + fGPOSTable(fontInstance, LE_GPOS_TABLE_TAG, success), fSubstitutionFilter(NULL) { - static const le_uint32 gdefTableTag = LE_GDEF_TABLE_TAG; - static const le_uint32 gposTableTag = LE_GPOS_TABLE_TAG; - const GlyphPositioningTableHeader *gposTable = (const GlyphPositioningTableHeader *) getFontTable(gposTableTag); - applyTypoFlags(); setScriptAndLanguageTags(); - fGDEFTable = (const GlyphDefinitionTableHeader *) getFontTable(gdefTableTag); - // JK patch, 2008-05-30 - see Sinhala bug report and LKLUG font // if (gposTable != NULL && gposTable->coversScriptAndLanguage(fScriptTag, fLangSysTag)) { - if (gposTable != NULL && gposTable->coversScript(fScriptTag)) { - fGPOSTable = gposTable; + if (!fGPOSTable.isEmpty()&& !fGPOSTable->coversScript(fGPOSTable, fScriptTag, success)) { + fGPOSTable.clear(); // already loaded } } @@ -252,7 +248,7 @@ void OpenTypeLayoutEngine::reset() OpenTypeLayoutEngine::OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, le_int32 typoFlags, LEErrorCode &success) : LayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, success), fFeatureOrder(FALSE), - fGSUBTable(NULL), fGDEFTable(NULL), fGPOSTable(NULL), fSubstitutionFilter(NULL) + fGSUBTable(), fGDEFTable(), fGPOSTable(), fSubstitutionFilter(NULL) { applyTypoFlags(); setScriptAndLanguageTags(); @@ -375,13 +371,13 @@ le_int32 OpenTypeLayoutEngine::glyphProcessing(const LEUnicode chars[], le_int32 return 0; } - if (fGSUBTable != NULL) { - if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fScriptTagV2,fLangSysTag)) { - count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter, + if (fGSUBTable.isValid()) { + if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fGSUBTable, fScriptTagV2, fLangSysTag, success)) { + count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter, fFeatureMap, fFeatureMapCount, fFeatureOrder, success); } else { - count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter, + count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter, fFeatureMap, fFeatureMapCount, fFeatureOrder, success); } } @@ -402,13 +398,13 @@ le_int32 OpenTypeLayoutEngine::glyphSubstitution(le_int32 count, le_int32 max, l return 0; } - if (fGSUBTable != NULL) { - if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fScriptTagV2,fLangSysTag)) { - count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter, + if (fGSUBTable.isValid()) { + if (fScriptTagV2 != nullScriptTag && fGSUBTable->coversScriptAndLanguage(fGSUBTable,fScriptTagV2,fLangSysTag,success)) { + count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTagV2, fLangSysTag, fGDEFTable, fSubstitutionFilter, fFeatureMap, fFeatureMapCount, fFeatureOrder, success); } else { - count = fGSUBTable->process(glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter, + count = fGSUBTable->process(fGSUBTable, glyphStorage, rightToLeft, fScriptTag, fLangSysTag, fGDEFTable, fSubstitutionFilter, fFeatureMap, fFeatureMapCount, fFeatureOrder, success); } } @@ -488,7 +484,7 @@ void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int3 return; } - if (fGPOSTable != NULL) { + if (!fGPOSTable.isEmpty()) { GlyphPositionAdjustments *adjustments = new GlyphPositionAdjustments(glyphCount); le_int32 i; @@ -511,19 +507,20 @@ void OpenTypeLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int3 } #endif - if (fGPOSTable != NULL) { - if (fScriptTagV2 != nullScriptTag && fGPOSTable->coversScriptAndLanguage(fScriptTagV2,fLangSysTag)) { - fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag, fGDEFTable, success, fFontInstance, - fFeatureMap, fFeatureMapCount, fFeatureOrder); + if (!fGPOSTable.isEmpty()) { + if (fScriptTagV2 != nullScriptTag && + fGPOSTable->coversScriptAndLanguage(fGPOSTable, fScriptTagV2,fLangSysTag,success)) { + fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTagV2, fLangSysTag, + fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); } else { - fGPOSTable->process(glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, fGDEFTable, success, fFontInstance, - fFeatureMap, fFeatureMapCount, fFeatureOrder); + fGPOSTable->process(fGPOSTable, glyphStorage, adjustments, reverse, fScriptTag, fLangSysTag, + fGDEFTable, success, fFontInstance, fFeatureMap, fFeatureMapCount, fFeatureOrder); } - } else if ( fTypoFlags & 0x1 ) { - static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG; - KernTable kt(fFontInstance, getFontTable(kernTableTag)); - kt.process(glyphStorage); + } else if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ + LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success); + KernTable kt(kernTable, success); + kt.process(glyphStorage, success); } float xAdjust = 0, yAdjust = 0; diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h index 7a89df46a4a..8ec6d4c774a 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/OpenTypeLayoutEngine.h @@ -35,6 +35,7 @@ #include "LEGlyphFilter.h" #include "LEFontInstance.h" #include "LayoutEngine.h" +#include "LETableReference.h" #include "GlyphSubstitutionTables.h" #include "GlyphDefinitionTables.h" @@ -88,7 +89,7 @@ public: * @internal */ OpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known @@ -228,21 +229,21 @@ protected: * * @internal */ - const GlyphSubstitutionTableHeader *fGSUBTable; + LEReferenceTo fGSUBTable; /** * The address of the GDEF table. * * @internal */ - const GlyphDefinitionTableHeader *fGDEFTable; + LEReferenceTo fGDEFTable; /** * The address of the GPOS table. * * @internal */ - const GlyphPositioningTableHeader *fGPOSTable; + LEReferenceTo fGPOSTable; /** * An optional filter used to inhibit substitutions diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeTables.h b/jdk/src/share/native/sun/font/layout/OpenTypeTables.h index c4a4a68b75a..1570071f1f2 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeTables.h +++ b/jdk/src/share/native/sun/font/layout/OpenTypeTables.h @@ -38,6 +38,7 @@ */ #include "LETypes.h" +#include "LETableReference.h" U_NAMESPACE_BEGIN @@ -50,7 +51,7 @@ typedef le_uint32 fixed32; #define LE_GLYPH_GROUP_MASK 0x00000001UL typedef le_uint32 FeatureMask; -#define SWAPT(atag) ((LETag) ((atag[0] << 24) + (atag[1] << 16) + (atag[2] << 8) + atag[3])) +#define SWAPT(atag) ((LETag) (((atag[0]) << 24) + ((atag[1]) << 16) + ((atag[2]) << 8) + (atag[3]))) struct TagAndOffsetRecord { diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp index 3b25aa280c9..f234e9484e2 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp +++ b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.cpp @@ -76,58 +76,74 @@ le_int8 OpenTypeUtilities::highBit(le_int32 value) return bit; } -Offset OpenTypeUtilities::getTagOffset(LETag tag, const TagAndOffsetRecord *records, le_int32 recordCount) + +Offset OpenTypeUtilities::getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success) { - le_uint8 bit = highBit(recordCount); - le_int32 power = 1 << bit; - le_int32 extra = recordCount - power; - le_int32 probe = power; - le_int32 index = 0; + if(LE_FAILURE(success)) return 0; - if (SWAPT(records[extra].tag) <= tag) { - index = extra; + le_uint32 recordCount = records.getCount(); + le_uint8 bit = highBit(recordCount); + le_int32 power = 1 << bit; + le_int32 extra = recordCount - power; + le_int32 probe = power; + le_int32 index = 0; + + { + const ATag &aTag = records.getAlias(extra,success)->tag; + if (SWAPT(aTag) <= tag) { + index = extra; } + } - while (probe > (1 << 0)) { - probe >>= 1; + while (probe > (1 << 0) && LE_SUCCESS(success)) { + probe >>= 1; - if (SWAPT(records[index + probe].tag) <= tag) { - index += probe; - } + { + const ATag &aTag = records.getAlias(index+probe,success)->tag; + if (SWAPT(aTag) <= tag) { + index += probe; + } } + } - if (SWAPT(records[index].tag) == tag) { - return SWAPW(records[index].offset); + { + const ATag &aTag = records.getAlias(index,success)->tag; + if (SWAPT(aTag) == tag) { + return SWAPW(records.getAlias(index,success)->offset); } + } - return 0; + return 0; } -le_int32 OpenTypeUtilities::getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount) +le_int32 OpenTypeUtilities::getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf &records, LEErrorCode &success) { + if(LE_FAILURE(success)) return -1; + + le_uint32 recordCount = records.getCount(); le_uint8 bit = highBit(recordCount); le_int32 power = 1 << bit; le_int32 extra = recordCount - power; le_int32 probe = power; le_int32 range = 0; - if (recordCount == 0) { - return -1; - } + if (recordCount == 0) { + return -1; + } - if (SWAPW(records[extra].firstGlyph) <= glyphID) { + if (SWAPW(records(extra,success).firstGlyph) <= glyphID) { range = extra; } - while (probe > (1 << 0)) { + while (probe > (1 << 0) && LE_SUCCESS(success)) { probe >>= 1; - if (SWAPW(records[range + probe].firstGlyph) <= glyphID) { + if (SWAPW(records(range + probe,success).firstGlyph) <= glyphID) { range += probe; } } - if (SWAPW(records[range].firstGlyph) <= glyphID && SWAPW(records[range].lastGlyph) >= glyphID) { + if (SWAPW(records(range,success).firstGlyph) <= glyphID && SWAPW(records(range,success).lastGlyph) >= glyphID) { return range; } @@ -199,6 +215,38 @@ void OpenTypeUtilities::sort(le_uint16 *array, le_int32 count) } } - - U_NAMESPACE_END + +#if LE_ASSERT_BAD_FONT +#include + +static const char *letagToStr(LETag tag, char *str) { + str[0]= 0xFF & (tag>>24); + str[1]= 0xFF & (tag>>16); + str[2]= 0xFF & (tag>>8); + str[3]= 0xFF & (tag>>0); + str[4]= 0; + return str; +} + +U_CAPI void U_EXPORT2 _debug_LETableReference(const char *f, int l, const char *msg, const LETableReference *what, const void *ptr, size_t len) { + char tagbuf[5]; + + fprintf(stderr, "%s:%d: LETableReference@0x%p: ", f, l, what); + fprintf(stderr, msg, ptr, len); + fprintf(stderr, "\n"); + + for(int depth=0;depth<10&&(what!=NULL);depth++) { + for(int i=0;iisValid()) { + fprintf(stderr, "(invalid)"); + } + fprintf(stderr, "@%p: tag (%s) font (0x%p), [0x%p+0x%lx]\n", what, letagToStr(what->getTag(), tagbuf), what->getFont(), + what->getAlias(), what->getLength()); + + what = what->getParent(); + } +} +#endif diff --git a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h index 6f35c29079e..1965a6517ba 100644 --- a/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h +++ b/jdk/src/share/native/sun/font/layout/OpenTypeUtilities.h @@ -45,8 +45,17 @@ U_NAMESPACE_BEGIN class OpenTypeUtilities /* not : public UObject because all methods are static */ { public: static le_int8 highBit(le_int32 value); - static Offset getTagOffset(LETag tag, const TagAndOffsetRecord *records, le_int32 recordCount); - static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount); + static Offset getTagOffset(LETag tag, const LEReferenceToArrayOf &records, LEErrorCode &success); + /** + * @deprecated TODO remove + */ + static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const GlyphRangeRecord *records, le_int32 recordCount) { + LEErrorCode success = LE_NO_ERROR; + LETableReference recordRef0((const le_uint8*)records); + LEReferenceToArrayOf recordRef(recordRef0, success, (size_t)0, recordCount); + return getGlyphRangeIndex(glyphID, recordRef, success); + } + static le_int32 getGlyphRangeIndex(TTGlyphID glyphID, const LEReferenceToArrayOf &records, LEErrorCode &success); static le_int32 search(le_uint16 value, const le_uint16 array[], le_int32 count); static le_int32 search(le_uint32 value, const le_uint32 array[], le_int32 count); static void sort(le_uint16 *array, le_int32 count); diff --git a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp index d5d4f1bf15b..f46c8f1028b 100644 --- a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.cpp @@ -41,7 +41,7 @@ U_NAMESPACE_BEGIN -le_uint32 PairPositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 PairPositioningSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { switch(SWAPW(subtableFormat)) { @@ -50,27 +50,32 @@ le_uint32 PairPositioningSubtable::process(GlyphIterator *glyphIterator, const L case 1: { - const PairPositioningFormat1Subtable *subtable = (const PairPositioningFormat1Subtable *) this; + const LEReferenceTo subtable(base, success, (const PairPositioningFormat1Subtable *) this); - return subtable->process(glyphIterator, fontInstance); + if(LE_SUCCESS(success)) + return subtable->process(subtable, glyphIterator, fontInstance, success); + else + return 0; } case 2: { - const PairPositioningFormat2Subtable *subtable = (const PairPositioningFormat2Subtable *) this; + const LEReferenceTo subtable(base, success, (const PairPositioningFormat2Subtable *) this); - return subtable->process(glyphIterator, fontInstance); - } - - default: + if(LE_SUCCESS(success)) + return subtable->process(subtable, glyphIterator, fontInstance, success); + else return 0; } + default: + return 0; + } } -le_uint32 PairPositioningFormat1Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 PairPositioningFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(firstGlyph); + le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); GlyphIterator tempIterator(*glyphIterator); if (coverageIndex >= 0 && glyphIterator->next()) { @@ -110,10 +115,10 @@ le_uint32 PairPositioningFormat1Subtable::process(GlyphIterator *glyphIterator, return 0; } -le_uint32 PairPositioningFormat2Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 PairPositioningFormat2Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID firstGlyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(firstGlyph); + le_int32 coverageIndex = getGlyphCoverage(base, firstGlyph, success); GlyphIterator tempIterator(*glyphIterator); if (coverageIndex >= 0 && glyphIterator->next()) { diff --git a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h index 10a7a0996df..0c66ce61dc5 100644 --- a/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h +++ b/jdk/src/share/native/sun/font/layout/PairPositioningSubtables.h @@ -59,13 +59,14 @@ struct PairSetTable le_uint16 pairValueCount; PairValueRecord pairValueRecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(PairSetTable, pairValueRecordArray) struct PairPositioningSubtable : GlyphPositioningSubtable { ValueFormat valueFormat1; ValueFormat valueFormat2; - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; }; struct PairPositioningFormat1Subtable : PairPositioningSubtable @@ -73,12 +74,13 @@ struct PairPositioningFormat1Subtable : PairPositioningSubtable le_uint16 pairSetCount; Offset pairSetTableOffsetArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; private: const PairValueRecord *findPairValueRecord(TTGlyphID glyphID, const PairValueRecord *records, le_uint16 recordCount, le_uint16 recordSize) const; }; +LE_VAR_ARRAY(PairPositioningFormat1Subtable, pairSetTableOffsetArray) // NOTE: ValueRecord has a variable size struct Class2Record @@ -91,6 +93,7 @@ struct Class1Record { Class2Record class2RecordArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(Class1Record, class2RecordArray) struct PairPositioningFormat2Subtable : PairPositioningSubtable { @@ -100,8 +103,9 @@ struct PairPositioningFormat2Subtable : PairPositioningSubtable le_uint16 class2Count; Class1Record class1RecordArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; }; +LE_VAR_ARRAY(PairPositioningFormat2Subtable, class1RecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp index bb8b65ba371..dc16ed288de 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.cpp @@ -38,29 +38,33 @@ U_NAMESPACE_BEGIN -const LangSysTable *ScriptTable::findLanguage(LETag languageTag, le_bool exactMatch) const +LEReferenceTo ScriptTable::findLanguage(const LETableReference& base, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const { le_uint16 count = SWAPW(langSysCount); Offset langSysTableOffset = exactMatch? 0 : SWAPW(defaultLangSysTableOffset); if (count > 0) { - Offset foundOffset = - OpenTypeUtilities::getTagOffset(languageTag, langSysRecordArray, count); + LEReferenceToArrayOf langSysRecords(base, success, langSysRecordArray, count); + Offset foundOffset = + OpenTypeUtilities::getTagOffset(languageTag, langSysRecords, success); - if (foundOffset != 0) { - langSysTableOffset = foundOffset; - } + if (foundOffset != 0 && LE_SUCCESS(success)) { + langSysTableOffset = foundOffset; + } } if (langSysTableOffset != 0) { - return (const LangSysTable *) ((char *)this + langSysTableOffset); + return LEReferenceTo(base, success, langSysTableOffset); } - return NULL; + return LEReferenceTo(); } -const ScriptTable *ScriptListTable::findScript(LETag scriptTag) const +LEReferenceTo ScriptListTable::findScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const { + if (LE_FAILURE(success) ) { + return LEReferenceTo(); // get out + } /* * There are some fonts that have a large, bogus value for scriptCount. To try * and protect against this, we use the offset in the first scriptRecord, @@ -74,38 +78,53 @@ const ScriptTable *ScriptListTable::findScript(LETag scriptTag) const * to be unsorted. */ le_uint16 count = SWAPW(scriptCount); + + if (count == 0) { + return LEReferenceTo(); // no items, no search + } + + // attempt to construct a ref with at least one element + LEReferenceToArrayOf oneElementTable(base, success, &scriptRecordArray[0], 1); + + if( LE_FAILURE(success) ) { + return LEReferenceTo(); // couldn't even read the first record - bad font. + } + le_uint16 limit = ((SWAPW(scriptRecordArray[0].offset) - sizeof(ScriptListTable)) / sizeof(scriptRecordArray)) + ANY_NUMBER; Offset scriptTableOffset = 0; + if (count > limit) { // the scriptCount value is bogus; do a linear search // because limit may still be too large. - for(le_int32 s = 0; s < limit; s += 1) { - if (SWAPT(scriptRecordArray[s].tag) == scriptTag) { - scriptTableOffset = SWAPW(scriptRecordArray[s].offset); - break; - } + LEReferenceToArrayOf scriptRecordArrayRef(base, success, &scriptRecordArray[0], limit); + for(le_int32 s = 0; (s < limit)&&LE_SUCCESS(success); s += 1) { + if (SWAPT(scriptRecordArrayRef(s,success).tag) == scriptTag) { + scriptTableOffset = SWAPW(scriptRecordArrayRef(s,success).offset); + break; + } } } else { - scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArray, count); + LEReferenceToArrayOf scriptRecordArrayRef(base, success, &scriptRecordArray[0], count); + scriptTableOffset = OpenTypeUtilities::getTagOffset(scriptTag, scriptRecordArrayRef, success); // TODO } if (scriptTableOffset != 0) { - return (const ScriptTable *) ((char *)this + scriptTableOffset); + return LEReferenceTo(base, success, scriptTableOffset); } - return NULL; + return LEReferenceTo(); } -const LangSysTable *ScriptListTable::findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch) const +LEReferenceTo ScriptListTable::findLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch) const { - const ScriptTable *scriptTable = findScript(scriptTag); + const LEReferenceTo scriptTable = findScript(base, scriptTag, success); - if (scriptTable == 0) { - return NULL; - } + if (scriptTable.isEmpty()) { + return LEReferenceTo(); + } - return scriptTable->findLanguage(languageTag, exactMatch); + return scriptTable->findLanguage(scriptTable, languageTag, success, exactMatch).reparent(base); } U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.h b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.h index fe89657f66b..21d5e39df9b 100644 --- a/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.h +++ b/jdk/src/share/native/sun/font/layout/ScriptAndLanguage.h @@ -51,6 +51,7 @@ struct LangSysTable le_uint16 featureCount; le_uint16 featureIndexArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(LangSysTable, featureIndexArray) struct ScriptTable { @@ -58,8 +59,9 @@ struct ScriptTable le_uint16 langSysCount; LangSysRecord langSysRecordArray[ANY_NUMBER]; - const LangSysTable *findLanguage(LETag languageTag, le_bool exactMatch = FALSE) const; + LEReferenceTo findLanguage(const LETableReference &base, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const; }; +LE_VAR_ARRAY(ScriptTable, langSysRecordArray) typedef TagAndOffsetRecord ScriptRecord; @@ -68,9 +70,10 @@ struct ScriptListTable le_uint16 scriptCount; ScriptRecord scriptRecordArray[ANY_NUMBER]; - const ScriptTable *findScript(LETag scriptTag) const; - const LangSysTable *findLanguage(LETag scriptTag, LETag languageTag, le_bool exactMatch = FALSE) const; + LEReferenceTo findScript(const LETableReference &base, LETag scriptTag, LEErrorCode &success) const; + LEReferenceTo findLanguage(const LETableReference &base, LETag scriptTag, LETag languageTag, LEErrorCode &success, le_bool exactMatch = FALSE) const; }; +LE_VAR_ARRAY(ScriptListTable, scriptRecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp index d9064a11c12..ecc63cb67be 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.cpp @@ -46,19 +46,18 @@ SegmentArrayProcessor::SegmentArrayProcessor() { } -SegmentArrayProcessor::SegmentArrayProcessor(const MorphSubtableHeader *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader) +SegmentArrayProcessor::SegmentArrayProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader; - - segmentArrayLookupTable = (const SegmentArrayLookupTable *) &header->table; + LEReferenceTo header(morphSubtableHeader, success); + segmentArrayLookupTable = LEReferenceTo(morphSubtableHeader, success, (const SegmentArrayLookupTable*)&header->table); } SegmentArrayProcessor::~SegmentArrayProcessor() { } -void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage) +void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { const LookupSegment *segments = segmentArrayLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); @@ -66,17 +65,16 @@ void SegmentArrayProcessor::process(LEGlyphStorage &glyphStorage) for (glyph = 0; glyph < glyphCount; glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; - const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segments, thisGlyph); + const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success); if (lookupSegment != NULL) { TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph); le_int16 offset = SWAPW(lookupSegment->value); if (offset != 0) { - TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader + offset); - TTGlyphID newGlyph = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]); - - glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + LEReferenceToArrayOf glyphArray(subtableHeader, success, offset, LE_UNBOUNDED_ARRAY); + TTGlyphID newGlyph = SWAPW(glyphArray(LE_GET_GLYPH(thisGlyph) - firstGlyph, success)); + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); } } } diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.h b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.h index 488cceaeabb..4f2dbff70d4 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.h +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SegmentArrayProcessor : public NonContextualGlyphSubstitutionProcessor { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SegmentArrayProcessor(const MorphSubtableHeader *morphSubtableHeader); + SegmentArrayProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SegmentArrayProcessor(); @@ -74,7 +74,7 @@ private: SegmentArrayProcessor(); protected: - const SegmentArrayLookupTable *segmentArrayLookupTable; + LEReferenceTo segmentArrayLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp index e50fdf0604e..0a052217979 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.cpp @@ -46,19 +46,18 @@ SegmentArrayProcessor2::SegmentArrayProcessor2() { } -SegmentArrayProcessor2::SegmentArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +SegmentArrayProcessor2::SegmentArrayProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; - - segmentArrayLookupTable = (const SegmentArrayLookupTable *) &header->table; + const LEReferenceTo header(morphSubtableHeader, success); + segmentArrayLookupTable = LEReferenceTo(morphSubtableHeader, success, &header->table); // don't parent to 'header' as it is on the stack } SegmentArrayProcessor2::~SegmentArrayProcessor2() { } -void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage) +void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { const LookupSegment *segments = segmentArrayLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); @@ -66,14 +65,14 @@ void SegmentArrayProcessor2::process(LEGlyphStorage &glyphStorage) for (glyph = 0; glyph < glyphCount; glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; - const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segments, thisGlyph); + const LookupSegment *lookupSegment = segmentArrayLookupTable->lookupSegment(segmentArrayLookupTable, segments, thisGlyph, success); if (lookupSegment != NULL) { TTGlyphID firstGlyph = SWAPW(lookupSegment->firstGlyph); le_int16 offset = SWAPW(lookupSegment->value); if (offset != 0) { - TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader + offset); + TTGlyphID *glyphArray = (TTGlyphID *) ((char *) subtableHeader.getAliasTODO() + offset); TTGlyphID newGlyph = SWAPW(glyphArray[LE_GET_GLYPH(thisGlyph) - firstGlyph]); glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); diff --git a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h index 71999b76a8a..8a4971d040d 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/SegmentArrayProcessor2.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SegmentArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2 { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SegmentArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + SegmentArrayProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SegmentArrayProcessor2(); @@ -74,7 +74,7 @@ private: SegmentArrayProcessor2(); protected: - const SegmentArrayLookupTable *segmentArrayLookupTable; + LEReferenceTo segmentArrayLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp index 4f89a7e1f16..42866a5473d 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.cpp @@ -46,29 +46,28 @@ SegmentSingleProcessor::SegmentSingleProcessor() { } -SegmentSingleProcessor::SegmentSingleProcessor(const MorphSubtableHeader *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader) +SegmentSingleProcessor::SegmentSingleProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader; - - segmentSingleLookupTable = (const SegmentSingleLookupTable *) &header->table; + LEReferenceTo header(morphSubtableHeader, success); + segmentSingleLookupTable = LEReferenceTo(morphSubtableHeader, success, (const SegmentSingleLookupTable*)&header->table); } SegmentSingleProcessor::~SegmentSingleProcessor() { } -void SegmentSingleProcessor::process(LEGlyphStorage &glyphStorage) +void SegmentSingleProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { const LookupSegment *segments = segmentSingleLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; - for (glyph = 0; glyph < glyphCount; glyph += 1) { + for (glyph = 0; glyph < glyphCount && LE_SUCCESS(success); glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; - const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segments, thisGlyph); + const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segmentSingleLookupTable, segments, thisGlyph, success); - if (lookupSegment != NULL) { + if (lookupSegment != NULL && LE_SUCCESS(success)) { TTGlyphID newGlyph = (TTGlyphID) LE_GET_GLYPH(thisGlyph) + SWAPW(lookupSegment->value); glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); diff --git a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.h b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.h index 99fea88f703..bb6df57130e 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.h +++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SegmentSingleProcessor : public NonContextualGlyphSubstitutionProcessor { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SegmentSingleProcessor(const MorphSubtableHeader *morphSubtableHeader); + SegmentSingleProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SegmentSingleProcessor(); @@ -74,7 +74,7 @@ private: SegmentSingleProcessor(); protected: - const SegmentSingleLookupTable *segmentSingleLookupTable; + LEReferenceTo segmentSingleLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp index e571cce9b87..e1857cd4c5e 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.cpp @@ -46,19 +46,19 @@ SegmentSingleProcessor2::SegmentSingleProcessor2() { } -SegmentSingleProcessor2::SegmentSingleProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +SegmentSingleProcessor2::SegmentSingleProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + const LEReferenceTo header(morphSubtableHeader, success); - segmentSingleLookupTable = (const SegmentSingleLookupTable *) &header->table; + segmentSingleLookupTable = LEReferenceTo(morphSubtableHeader, success, &header->table); } SegmentSingleProcessor2::~SegmentSingleProcessor2() { } -void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage) +void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { const LookupSegment *segments = segmentSingleLookupTable->segments; le_int32 glyphCount = glyphStorage.getGlyphCount(); @@ -66,9 +66,9 @@ void SegmentSingleProcessor2::process(LEGlyphStorage &glyphStorage) for (glyph = 0; glyph < glyphCount; glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; - const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segments, thisGlyph); + const LookupSegment *lookupSegment = segmentSingleLookupTable->lookupSegment(segmentSingleLookupTable, segments, thisGlyph, success); - if (lookupSegment != NULL) { + if (lookupSegment != NULL && LE_SUCCESS(success)) { TTGlyphID newGlyph = (TTGlyphID) LE_GET_GLYPH(thisGlyph) + SWAPW(lookupSegment->value); glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); diff --git a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h index 00def985133..b104e95b568 100644 --- a/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/SegmentSingleProcessor2.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SegmentSingleProcessor2 : public NonContextualGlyphSubstitutionProcessor2 { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SegmentSingleProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + SegmentSingleProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SegmentSingleProcessor2(); @@ -74,7 +74,7 @@ private: SegmentSingleProcessor2(); protected: - const SegmentSingleLookupTable *segmentSingleLookupTable; + LEReferenceTo segmentSingleLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/ShapingTypeData.cpp b/jdk/src/share/native/sun/font/layout/ShapingTypeData.cpp index 06529907ba9..bfca62ca71b 100644 --- a/jdk/src/share/native/sun/font/layout/ShapingTypeData.cpp +++ b/jdk/src/share/native/sun/font/layout/ShapingTypeData.cpp @@ -122,4 +122,6 @@ const le_uint8 ArabicShaping::shapingTypeTable[] = { 0x00, 0x05, 0xFE, 0xFF, 0xFE, 0xFF, 0x00, 0x05, 0xFF, 0xF9, 0xFF, 0xFB, 0x00, 0x05 }; +const size_t ArabicShaping::shapingTypeTableLen = sizeof(shapingTypeTable)/sizeof(shapingTypeTable[0]); + U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp index c0db2ec3fbe..1aa71b002b6 100644 --- a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.cpp @@ -46,29 +46,29 @@ SimpleArrayProcessor::SimpleArrayProcessor() { } -SimpleArrayProcessor::SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader) +SimpleArrayProcessor::SimpleArrayProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader; - - simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table; + LEReferenceTo header(morphSubtableHeader, success); + simpleArrayLookupTable = LEReferenceTo(morphSubtableHeader, success, (const SimpleArrayLookupTable*)&header->table); } SimpleArrayProcessor::~SimpleArrayProcessor() { } -void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage) +void SimpleArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; - for (glyph = 0; glyph < glyphCount; glyph += 1) { + LEReferenceToArrayOf valueArray(simpleArrayLookupTable, success, (const LookupValue*)&simpleArrayLookupTable->valueArray, LE_UNBOUNDED_ARRAY); + + for (glyph = 0; LE_SUCCESS(success) && (glyph < glyphCount); glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) { - TTGlyphID newGlyph = SWAPW(simpleArrayLookupTable->valueArray[LE_GET_GLYPH(thisGlyph)]); - - glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); + TTGlyphID newGlyph = SWAPW(valueArray.getObject(LE_GET_GLYPH(thisGlyph),success)); + glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); } } } diff --git a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.h b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.h index 8cb8e710497..ed4aabc4fcf 100644 --- a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.h +++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SimpleArrayProcessor : public NonContextualGlyphSubstitutionProcessor { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SimpleArrayProcessor(const MorphSubtableHeader *morphSubtableHeader); + SimpleArrayProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SimpleArrayProcessor(); @@ -74,7 +74,7 @@ private: SimpleArrayProcessor(); protected: - const SimpleArrayLookupTable *simpleArrayLookupTable; + LEReferenceTo simpleArrayLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp index fa15b71215e..292c0a22e55 100644 --- a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.cpp @@ -46,27 +46,29 @@ SimpleArrayProcessor2::SimpleArrayProcessor2() { } -SimpleArrayProcessor2::SimpleArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +SimpleArrayProcessor2::SimpleArrayProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + const LEReferenceTo header(morphSubtableHeader, success); - simpleArrayLookupTable = (const SimpleArrayLookupTable *) &header->table; + simpleArrayLookupTable = LEReferenceTo(morphSubtableHeader, success, &header->table); + valueArray = LEReferenceToArrayOf(morphSubtableHeader, success, &simpleArrayLookupTable->valueArray[0], LE_UNBOUNDED_ARRAY); } SimpleArrayProcessor2::~SimpleArrayProcessor2() { } -void SimpleArrayProcessor2::process(LEGlyphStorage &glyphStorage) +void SimpleArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; for (glyph = 0; glyph < glyphCount; glyph += 1) { LEGlyphID thisGlyph = glyphStorage[glyph]; if (LE_GET_GLYPH(thisGlyph) < 0xFFFF) { - TTGlyphID newGlyph = SWAPW(simpleArrayLookupTable->valueArray[LE_GET_GLYPH(thisGlyph)]); + TTGlyphID newGlyph = SWAPW(valueArray(LE_GET_GLYPH(thisGlyph),success)); glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); } diff --git a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h index 94bbbad858c..8855bdfa74f 100644 --- a/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/SimpleArrayProcessor2.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SimpleArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2 { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SimpleArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + SimpleArrayProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SimpleArrayProcessor2(); @@ -74,7 +74,8 @@ private: SimpleArrayProcessor2(); protected: - const SimpleArrayLookupTable *simpleArrayLookupTable; + LEReferenceTo simpleArrayLookupTable; + LEReferenceToArrayOf valueArray; }; diff --git a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp index 5fc0b1dfb78..1e2d257a6f8 100644 --- a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.cpp @@ -40,7 +40,7 @@ U_NAMESPACE_BEGIN -le_uint32 SinglePositioningSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 SinglePositioningSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { switch(SWAPW(subtableFormat)) { @@ -49,16 +49,16 @@ le_uint32 SinglePositioningSubtable::process(GlyphIterator *glyphIterator, const case 1: { - const SinglePositioningFormat1Subtable *subtable = (const SinglePositioningFormat1Subtable *) this; + const LEReferenceTo subtable(base, success, (const SinglePositioningFormat1Subtable *) this); - return subtable->process(glyphIterator, fontInstance); + return subtable->process(subtable, glyphIterator, fontInstance, success); } case 2: { - const SinglePositioningFormat2Subtable *subtable = (const SinglePositioningFormat2Subtable *) this; + const LEReferenceTo subtable(base, success, (const SinglePositioningFormat2Subtable *) this); - return subtable->process(glyphIterator, fontInstance); + return subtable->process(subtable, glyphIterator, fontInstance, success); } default: @@ -66,10 +66,10 @@ le_uint32 SinglePositioningSubtable::process(GlyphIterator *glyphIterator, const } } -le_uint32 SinglePositioningFormat1Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 SinglePositioningFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { valueRecord.adjustPosition(SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); @@ -80,10 +80,10 @@ le_uint32 SinglePositioningFormat1Subtable::process(GlyphIterator *glyphIterator return 0; } -le_uint32 SinglePositioningFormat2Subtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 SinglePositioningFormat2Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int16 coverageIndex = (le_int16) getGlyphCoverage(glyph); + le_int16 coverageIndex = (le_int16) getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { valueRecordArray[0].adjustPosition(coverageIndex, SWAPW(valueFormat), (const char *) this, *glyphIterator, fontInstance); diff --git a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.h b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.h index 7dc2c1d9d12..27205ec9b7a 100644 --- a/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.h +++ b/jdk/src/share/native/sun/font/layout/SinglePositioningSubtables.h @@ -48,7 +48,7 @@ U_NAMESPACE_BEGIN struct SinglePositioningSubtable : GlyphPositioningSubtable { - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; }; struct SinglePositioningFormat1Subtable : SinglePositioningSubtable @@ -56,7 +56,7 @@ struct SinglePositioningFormat1Subtable : SinglePositioningSubtable ValueFormat valueFormat; ValueRecord valueRecord; - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; }; struct SinglePositioningFormat2Subtable : SinglePositioningSubtable @@ -65,8 +65,9 @@ struct SinglePositioningFormat2Subtable : SinglePositioningSubtable le_uint16 valueCount; ValueRecord valueRecordArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const; }; +LE_VAR_ARRAY(SinglePositioningFormat2Subtable, valueRecordArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp index 9eb884ed810..681958cf5ea 100644 --- a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp +++ b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.cpp @@ -39,7 +39,7 @@ U_NAMESPACE_BEGIN -le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 SingleSubstitutionSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { switch(SWAPW(subtableFormat)) { @@ -48,16 +48,16 @@ le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, cons case 1: { - const SingleSubstitutionFormat1Subtable *subtable = (const SingleSubstitutionFormat1Subtable *) this; + const LEReferenceTo subtable(base, success, (const SingleSubstitutionFormat1Subtable *) this); - return subtable->process(glyphIterator, filter); + return subtable->process(subtable, glyphIterator, success, filter); } case 2: { - const SingleSubstitutionFormat2Subtable *subtable = (const SingleSubstitutionFormat2Subtable *) this; + const LEReferenceTo subtable(base, success, (const SingleSubstitutionFormat2Subtable *) this); - return subtable->process(glyphIterator, filter); + return subtable->process(subtable, glyphIterator, success, filter); } default: @@ -65,10 +65,10 @@ le_uint32 SingleSubstitutionSubtable::process(GlyphIterator *glyphIterator, cons } } -le_uint32 SingleSubstitutionFormat1Subtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 SingleSubstitutionFormat1Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { TTGlyphID substitute = ((TTGlyphID) LE_GET_GLYPH(glyph)) + SWAPW(deltaGlyphID); @@ -83,10 +83,10 @@ le_uint32 SingleSubstitutionFormat1Subtable::process(GlyphIterator *glyphIterato return 0; } -le_uint32 SingleSubstitutionFormat2Subtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 SingleSubstitutionFormat2Subtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); if (coverageIndex >= 0) { TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]); diff --git a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h index 5115e9c2a29..e1aa84fd027 100644 --- a/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h +++ b/jdk/src/share/native/sun/font/layout/SingleSubstitutionSubtables.h @@ -47,14 +47,14 @@ U_NAMESPACE_BEGIN struct SingleSubstitutionSubtable : GlyphSubstitutionSubtable { - le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const; }; struct SingleSubstitutionFormat1Subtable : SingleSubstitutionSubtable { le_int16 deltaGlyphID; - le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const; }; struct SingleSubstitutionFormat2Subtable : SingleSubstitutionSubtable @@ -62,8 +62,9 @@ struct SingleSubstitutionFormat2Subtable : SingleSubstitutionSubtable le_uint16 glyphCount; TTGlyphID substituteArray[ANY_NUMBER]; - le_uint32 process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter = NULL) const; + le_uint32 process(const LEReferenceTo &base, GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter = NULL) const; }; +LE_VAR_ARRAY(SingleSubstitutionFormat2Subtable, substituteArray) U_NAMESPACE_END #endif diff --git a/jdk/src/share/native/sun/font/layout/SingleTableProcessor.cpp b/jdk/src/share/native/sun/font/layout/SingleTableProcessor.cpp index 49fdd1d3bd9..dd44276f4a4 100644 --- a/jdk/src/share/native/sun/font/layout/SingleTableProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor.cpp @@ -46,26 +46,25 @@ SingleTableProcessor::SingleTableProcessor() { } -SingleTableProcessor::SingleTableProcessor(const MorphSubtableHeader *moprhSubtableHeader) - : NonContextualGlyphSubstitutionProcessor(moprhSubtableHeader) +SingleTableProcessor::SingleTableProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) moprhSubtableHeader; - - singleTableLookupTable = (const SingleTableLookupTable *) &header->table; + LEReferenceTo header(morphSubtableHeader, success); + singleTableLookupTable = LEReferenceTo(morphSubtableHeader, success, (const SingleTableLookupTable*)&header->table); } SingleTableProcessor::~SingleTableProcessor() { } -void SingleTableProcessor::process(LEGlyphStorage &glyphStorage) +void SingleTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { const LookupSingle *entries = singleTableLookupTable->entries; le_int32 glyph; le_int32 glyphCount = glyphStorage.getGlyphCount(); for (glyph = 0; glyph < glyphCount; glyph += 1) { - const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(entries, glyphStorage[glyph]); + const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(singleTableLookupTable, entries, glyphStorage[glyph], success); if (lookupSingle != NULL) { glyphStorage[glyph] = SWAPW(lookupSingle->value); diff --git a/jdk/src/share/native/sun/font/layout/SingleTableProcessor.h b/jdk/src/share/native/sun/font/layout/SingleTableProcessor.h index 19d8b0ba851..2d3595eb335 100644 --- a/jdk/src/share/native/sun/font/layout/SingleTableProcessor.h +++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SingleTableProcessor : public NonContextualGlyphSubstitutionProcessor { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SingleTableProcessor(const MorphSubtableHeader *morphSubtableHeader); + SingleTableProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SingleTableProcessor(); @@ -74,7 +74,7 @@ private: SingleTableProcessor(); protected: - const SingleTableLookupTable *singleTableLookupTable; + LEReferenceTo singleTableLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp index dc0b8fc53c4..1e21ab5be26 100644 --- a/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.cpp @@ -46,26 +46,27 @@ SingleTableProcessor2::SingleTableProcessor2() { } -SingleTableProcessor2::SingleTableProcessor2(const MorphSubtableHeader2 *moprhSubtableHeader) - : NonContextualGlyphSubstitutionProcessor2(moprhSubtableHeader) +SingleTableProcessor2::SingleTableProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) moprhSubtableHeader; + const LEReferenceTo header(morphSubtableHeader, success); - singleTableLookupTable = (const SingleTableLookupTable *) &header->table; + singleTableLookupTable = LEReferenceTo(morphSubtableHeader, success, &header->table); } SingleTableProcessor2::~SingleTableProcessor2() { } -void SingleTableProcessor2::process(LEGlyphStorage &glyphStorage) +void SingleTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if(LE_FAILURE(success)) return; const LookupSingle *entries = singleTableLookupTable->entries; le_int32 glyph; le_int32 glyphCount = glyphStorage.getGlyphCount(); for (glyph = 0; glyph < glyphCount; glyph += 1) { - const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(entries, glyphStorage[glyph]); + const LookupSingle *lookupSingle = singleTableLookupTable->lookupSingle(singleTableLookupTable, entries, glyphStorage[glyph], success); if (lookupSingle != NULL) { glyphStorage[glyph] = SWAPW(lookupSingle->value); diff --git a/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h index e52d819a4b0..3f2d5009ea7 100644 --- a/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/SingleTableProcessor2.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class SingleTableProcessor2 : public NonContextualGlyphSubstitutionProcessor2 { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - SingleTableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + SingleTableProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~SingleTableProcessor2(); @@ -74,7 +74,7 @@ private: SingleTableProcessor2(); protected: - const SingleTableLookupTable *singleTableLookupTable; + LEReferenceTo singleTableLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp b/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp index 3146cc53210..0f135c70b2b 100644 --- a/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor.cpp @@ -44,17 +44,18 @@ StateTableProcessor::StateTableProcessor() { } -StateTableProcessor::StateTableProcessor(const MorphSubtableHeader *morphSubtableHeader) - : SubtableProcessor(morphSubtableHeader) +StateTableProcessor::StateTableProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : SubtableProcessor(morphSubtableHeader, success), stateTableHeader(morphSubtableHeader, success), + stHeader(stateTableHeader, success, (const StateTableHeader*)&stateTableHeader->stHeader) { - stateTableHeader = (const MorphStateTableHeader *) morphSubtableHeader; - + if(LE_FAILURE(success)) return; stateSize = SWAPW(stateTableHeader->stHeader.stateSize); classTableOffset = SWAPW(stateTableHeader->stHeader.classTableOffset); stateArrayOffset = SWAPW(stateTableHeader->stHeader.stateArrayOffset); entryTableOffset = SWAPW(stateTableHeader->stHeader.entryTableOffset); - classTable = (const ClassTable *) ((char *) &stateTableHeader->stHeader + classTableOffset); + classTable = LEReferenceTo(stateTableHeader, success, ((char *) &stateTableHeader->stHeader + classTableOffset)); + if(LE_FAILURE(success)) return; firstGlyph = SWAPW(classTable->firstGlyph); lastGlyph = firstGlyph + SWAPW(classTable->nGlyphs); } @@ -63,9 +64,9 @@ StateTableProcessor::~StateTableProcessor() { } -void StateTableProcessor::process(LEGlyphStorage &glyphStorage) +void StateTableProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { - + if (LE_FAILURE(success)) return; LE_STATE_PATIENCE_INIT(); // Start at state 0 @@ -94,8 +95,8 @@ void StateTableProcessor::process(LEGlyphStorage &glyphStorage) } } - const EntryTableIndex *stateArray = (const EntryTableIndex *) ((char *) &stateTableHeader->stHeader + currentState); - EntryTableIndex entryTableIndex = stateArray[(le_uint8)classCode]; + LEReferenceToArrayOf stateArray(stHeader, success, currentState, LE_UNBOUNDED_ARRAY); + EntryTableIndex entryTableIndex = stateArray.getObject((le_uint8)classCode, success); LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); LE_STATE_PATIENCE_INCR(currGlyph); diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor.h b/jdk/src/share/native/sun/font/layout/StateTableProcessor.h index 43f75776c0a..2e8d7f606b5 100644 --- a/jdk/src/share/native/sun/font/layout/StateTableProcessor.h +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor.h @@ -49,7 +49,7 @@ class LEGlyphStorage; class StateTableProcessor : public SubtableProcessor { public: - void process(LEGlyphStorage &glyphStorage); + void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); virtual void beginStateTable() = 0; @@ -58,7 +58,7 @@ public: virtual void endStateTable() = 0; protected: - StateTableProcessor(const MorphSubtableHeader *morphSubtableHeader); + StateTableProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~StateTableProcessor(); StateTableProcessor(); @@ -68,11 +68,12 @@ protected: ByteOffset stateArrayOffset; ByteOffset entryTableOffset; - const ClassTable *classTable; + LEReferenceTo classTable; TTGlyphID firstGlyph; TTGlyphID lastGlyph; - const MorphStateTableHeader *stateTableHeader; + LEReferenceTo stateTableHeader; + LEReferenceTo stHeader; // for convenience private: StateTableProcessor(const StateTableProcessor &other); // forbid copying of this class diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp index 5bd9c253012..e00a2d09d2e 100644 --- a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.cpp @@ -45,27 +45,33 @@ StateTableProcessor2::StateTableProcessor2() { } -StateTableProcessor2::StateTableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : SubtableProcessor2(morphSubtableHeader) +StateTableProcessor2::StateTableProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : SubtableProcessor2(morphSubtableHeader, success), stateTableHeader(morphSubtableHeader, success), + stHeader(stateTableHeader, success, (const StateTableHeader2*)&stateTableHeader->stHeader), + nClasses(0), classTableOffset(0), stateArrayOffset(0), entryTableOffset(0), classTable(), format(0), + stateArray() { - stateTableHeader = (const MorphStateTableHeader2 *) morphSubtableHeader; - nClasses = SWAPL(stateTableHeader->stHeader.nClasses); - classTableOffset = SWAPL(stateTableHeader->stHeader.classTableOffset); - stateArrayOffset = SWAPL(stateTableHeader->stHeader.stateArrayOffset); - entryTableOffset = SWAPL(stateTableHeader->stHeader.entryTableOffset); + if (LE_FAILURE(success)) { + return; + } + nClasses = SWAPL(stHeader->nClasses); + classTableOffset = SWAPL(stHeader->classTableOffset); + stateArrayOffset = SWAPL(stHeader->stateArrayOffset); + entryTableOffset = SWAPL(stHeader->entryTableOffset); - classTable = (LookupTable *) ((char *) &stateTableHeader->stHeader + classTableOffset); - format = SWAPW(classTable->format); + classTable = LEReferenceTo(stHeader, success, classTableOffset); + format = SWAPW(classTable->format); - stateArray = (const EntryTableIndex2 *) ((char *) &stateTableHeader->stHeader + stateArrayOffset); + stateArray = LEReferenceToArrayOf(stHeader, success, stateArrayOffset, LE_UNBOUNDED_ARRAY); } StateTableProcessor2::~StateTableProcessor2() { } -void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) +void StateTableProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if (LE_FAILURE(success)) return; // Start at state 0 // XXX: How do we know when to start at state 1? le_uint16 currentState = 0; @@ -85,9 +91,11 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) switch (format) { case ltfSimpleArray: { #ifdef TEST_FORMAT - SimpleArrayLookupTable *lookupTable0 = (SimpleArrayLookupTable *) classTable; + LEReferenceTo lookupTable0(classTable, success); + if(LE_FAILURE(success)) break; while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { - if(LE_STATE_PATIENCE_DECR()) { + if (LE_FAILURE(success)) break; + if (LE_STATE_PATIENCE_DECR()) { LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") break; // patience exceeded. } @@ -105,7 +113,7 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) classCode = SWAPW(lookupTable0->valueArray[gid]); } } - EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses, success)); LE_STATE_PATIENCE_CURR(le_int32, currGlyph); currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); // return a zero-based index instead of a byte offset LE_STATE_PATIENCE_INCR(currGlyph); @@ -114,10 +122,12 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) break; } case ltfSegmentSingle: { - SegmentSingleLookupTable *lookupTable2 = (SegmentSingleLookupTable *) classTable; + LEReferenceTo lookupTable2(classTable, success); + if(LE_FAILURE(success)) break; while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { - if(LE_STATE_PATIENCE_DECR()) { - LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") + if (LE_FAILURE(success)) break; + if (LE_STATE_PATIENCE_DECR()) { + LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") break; // patience exceeded. } LookupValue classCode = classCodeOOB; @@ -131,15 +141,16 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) if (glyphCode == 0xFFFF) { classCode = classCodeDEL; } else { - const LookupSegment *segment = lookupTable2->lookupSegment(lookupTable2->segments, gid); - if (segment != NULL) { + const LookupSegment *segment = + lookupTable2->lookupSegment(lookupTable2, lookupTable2->segments, gid, success); + if (segment != NULL && LE_SUCCESS(success)) { classCode = SWAPW(segment->value); } } } - EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses,success)); LE_STATE_PATIENCE_CURR(le_int32, currGlyph); - currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex, success); LE_STATE_PATIENCE_INCR(currGlyph); } break; @@ -149,9 +160,10 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) break; } case ltfSingleTable: { - SingleTableLookupTable *lookupTable6 = (SingleTableLookupTable *) classTable; + LEReferenceTo lookupTable6(classTable, success); while ((dir == 1 && currGlyph <= glyphCount) || (dir == -1 && currGlyph >= -1)) { - if(LE_STATE_PATIENCE_DECR()) { + if (LE_FAILURE(success)) break; + if (LE_STATE_PATIENCE_DECR()) { LE_DEBUG_BAD_FONT("patience exceeded - state table not moving") break; // patience exceeded. } @@ -170,21 +182,22 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) if (glyphCode == 0xFFFF) { classCode = classCodeDEL; } else { - const LookupSingle *segment = lookupTable6->lookupSingle(lookupTable6->entries, gid); + const LookupSingle *segment = lookupTable6->lookupSingle(lookupTable6, lookupTable6->entries, gid, success); if (segment != NULL) { classCode = SWAPW(segment->value); } } } - EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses, success)); LE_STATE_PATIENCE_CURR(le_int32, currGlyph); - currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex, success); LE_STATE_PATIENCE_INCR(currGlyph); } break; } case ltfTrimmedArray: { - TrimmedArrayLookupTable *lookupTable8 = (TrimmedArrayLookupTable *) classTable; + LEReferenceTo lookupTable8(classTable, success); + if (LE_FAILURE(success)) break; TTGlyphID firstGlyph = SWAPW(lookupTable8->firstGlyph); TTGlyphID lastGlyph = firstGlyph + SWAPW(lookupTable8->glyphCount); @@ -206,9 +219,9 @@ void StateTableProcessor2::process(LEGlyphStorage &glyphStorage) classCode = SWAPW(lookupTable8->valueArray[glyphCode - firstGlyph]); } } - EntryTableIndex2 entryTableIndex = SWAPW(stateArray[classCode + currentState * nClasses]); + EntryTableIndex2 entryTableIndex = SWAPW(stateArray(classCode + currentState * nClasses, success)); LE_STATE_PATIENCE_CURR(le_int32, currGlyph); - currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex); + currentState = processStateEntry(glyphStorage, currGlyph, entryTableIndex, success); LE_STATE_PATIENCE_INCR(currGlyph); } break; diff --git a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h index 5b5c6c18baf..db5056c94bb 100644 --- a/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/StateTableProcessor2.h @@ -50,16 +50,16 @@ class LEGlyphStorage; class StateTableProcessor2 : public SubtableProcessor2 { public: - void process(LEGlyphStorage &glyphStorage); + void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); virtual void beginStateTable() = 0; - virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index) = 0; + virtual le_uint16 processStateEntry(LEGlyphStorage &glyphStorage, le_int32 &currGlyph, EntryTableIndex2 index, LEErrorCode &success) = 0; virtual void endStateTable() = 0; protected: - StateTableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + StateTableProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~StateTableProcessor2(); StateTableProcessor2(); @@ -71,9 +71,10 @@ protected: le_uint32 stateArrayOffset; le_uint32 entryTableOffset; - const LookupTable *classTable; - const EntryTableIndex2 *stateArray; - const MorphStateTableHeader2 *stateTableHeader; + LEReferenceTo classTable; + LEReferenceToArrayOf stateArray; + LEReferenceTo stateTableHeader; + LEReferenceTo stHeader; // for convenience private: StateTableProcessor2(const StateTableProcessor2 &other); // forbid copying of this class diff --git a/jdk/src/share/native/sun/font/layout/StateTables.h b/jdk/src/share/native/sun/font/layout/StateTables.h index 6c6fdced933..9ba6da51295 100644 --- a/jdk/src/share/native/sun/font/layout/StateTables.h +++ b/jdk/src/share/native/sun/font/layout/StateTables.h @@ -111,6 +111,7 @@ struct ClassTable le_uint16 nGlyphs; ClassCode classArray[ANY_NUMBER]; }; +LE_VAR_ARRAY(ClassTable, classArray) enum StateNumber { diff --git a/jdk/src/share/native/sun/font/layout/SubtableProcessor.cpp b/jdk/src/share/native/sun/font/layout/SubtableProcessor.cpp index 1f46bf03b98..3de2856ba93 100644 --- a/jdk/src/share/native/sun/font/layout/SubtableProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor.cpp @@ -40,10 +40,10 @@ SubtableProcessor::SubtableProcessor() { } -SubtableProcessor::SubtableProcessor(const MorphSubtableHeader *morphSubtableHeader) +SubtableProcessor::SubtableProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : length(0), coverage(0), subtableFeatures(0L), subtableHeader(morphSubtableHeader) { - subtableHeader = morphSubtableHeader; - + if(LE_FAILURE(success)) return; length = SWAPW(subtableHeader->length); coverage = SWAPW(subtableHeader->coverage); subtableFeatures = SWAPL(subtableHeader->subtableFeatures); diff --git a/jdk/src/share/native/sun/font/layout/SubtableProcessor.h b/jdk/src/share/native/sun/font/layout/SubtableProcessor.h index 190f7d96d10..a2d6b276730 100644 --- a/jdk/src/share/native/sun/font/layout/SubtableProcessor.h +++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor.h @@ -46,11 +46,11 @@ class LEGlyphStorage; class SubtableProcessor : public UMemory { public: - virtual void process(LEGlyphStorage &glyphStorage) = 0; + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0; virtual ~SubtableProcessor(); protected: - SubtableProcessor(const MorphSubtableHeader *morphSubtableHeader); + SubtableProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); SubtableProcessor(); @@ -58,7 +58,7 @@ protected: SubtableCoverage coverage; FeatureFlags subtableFeatures; - const MorphSubtableHeader *subtableHeader; + const LEReferenceTo subtableHeader; private: diff --git a/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp index 30d1426679c..d7949bc9467 100644 --- a/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.cpp @@ -40,13 +40,14 @@ SubtableProcessor2::SubtableProcessor2() { } -SubtableProcessor2::SubtableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) +SubtableProcessor2::SubtableProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : subtableHeader(morphSubtableHeader, success), length(0), coverage(0), subtableFeatures(0L) { - subtableHeader = morphSubtableHeader; + if(LE_FAILURE(success)) return; - length = SWAPL(subtableHeader->length); - coverage = SWAPL(subtableHeader->coverage); - subtableFeatures = SWAPL(subtableHeader->subtableFeatures); + length = SWAPL(subtableHeader->length); + coverage = SWAPL(subtableHeader->coverage); + subtableFeatures = SWAPL(subtableHeader->subtableFeatures); } SubtableProcessor2::~SubtableProcessor2() diff --git a/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h index 13af854666a..42ef68b592b 100644 --- a/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/SubtableProcessor2.h @@ -46,11 +46,11 @@ class LEGlyphStorage; class SubtableProcessor2 : public UMemory { public: - virtual void process(LEGlyphStorage &glyphStorage) = 0; + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success) = 0; virtual ~SubtableProcessor2(); protected: - SubtableProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + SubtableProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); SubtableProcessor2(); @@ -58,7 +58,7 @@ protected: SubtableCoverage2 coverage; FeatureFlags subtableFeatures; - const MorphSubtableHeader2 *subtableHeader; + const LEReferenceTo subtableHeader; private: diff --git a/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp index 65177a6e94c..3422bb27089 100644 --- a/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/ThaiLayoutEngine.cpp @@ -134,11 +134,10 @@ void ThaiLayoutEngine::adjustGlyphPositions(const LEUnicode chars[], le_int32 of return; } - if (fTypoFlags & 0x1) { /* kerning enabled */ - static const le_uint32 kernTableTag = LE_KERN_TABLE_TAG; - - KernTable kt(fFontInstance, getFontTable(kernTableTag)); - kt.process(glyphStorage); + if (fTypoFlags & LE_Kerning_FEATURE_FLAG) { /* kerning enabled */ + LETableReference kernTable(fFontInstance, LE_KERN_TABLE_TAG, success); + KernTable kt(kernTable, success); + kt.process(glyphStorage, success); } // default is no adjustments diff --git a/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.cpp b/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.cpp index 9f706548aae..b5b67e77310 100644 --- a/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.cpp +++ b/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.cpp @@ -49,7 +49,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TibetanOpenTypeLayoutEngine) TibetanOpenTypeLayoutEngine::TibetanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success) + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success) : OpenTypeLayoutEngine(fontInstance, scriptCode, languageCode, typoFlags, gsubTable, success) { fFeatureMap = TibetanReordering::getFeatureMap(fFeatureMapCount); diff --git a/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.h b/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.h index c40dcc3343f..834979c3e4c 100644 --- a/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.h +++ b/jdk/src/share/native/sun/font/layout/TibetanLayoutEngine.h @@ -83,7 +83,7 @@ public: * @internal */ TibetanOpenTypeLayoutEngine(const LEFontInstance *fontInstance, le_int32 scriptCode, le_int32 languageCode, - le_int32 typoFlags, const GlyphSubstitutionTableHeader *gsubTable, LEErrorCode &success); + le_int32 typoFlags, const LEReferenceTo &gsubTable, LEErrorCode &success); /** * This constructor is used when the font requires a "canned" GSUB table which can't be known diff --git a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp index b460a612e82..3f88981ad98 100644 --- a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp +++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.cpp @@ -46,22 +46,28 @@ TrimmedArrayProcessor::TrimmedArrayProcessor() { } -TrimmedArrayProcessor::TrimmedArrayProcessor(const MorphSubtableHeader *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader) +TrimmedArrayProcessor::TrimmedArrayProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor(morphSubtableHeader, success), firstGlyph(0), lastGlyph(0) { - const NonContextualGlyphSubstitutionHeader *header = (const NonContextualGlyphSubstitutionHeader *) morphSubtableHeader; + LEReferenceTo header(morphSubtableHeader, success); - trimmedArrayLookupTable = (const TrimmedArrayLookupTable *) &header->table; - firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph); - lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount); + if(LE_FAILURE(success)) return; + + trimmedArrayLookupTable = LEReferenceTo(morphSubtableHeader, success, (const TrimmedArrayLookupTable*)&header->table); + + if(LE_FAILURE(success)) return; + + firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph); + lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount); } TrimmedArrayProcessor::~TrimmedArrayProcessor() { } -void TrimmedArrayProcessor::process(LEGlyphStorage &glyphStorage) +void TrimmedArrayProcessor::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if(LE_FAILURE(success)) return; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; diff --git a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.h b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.h index 5960827f865..1a406c8b9a3 100644 --- a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.h +++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class TrimmedArrayProcessor : public NonContextualGlyphSubstitutionProcessor { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - TrimmedArrayProcessor(const MorphSubtableHeader *morphSubtableHeader); + TrimmedArrayProcessor(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~TrimmedArrayProcessor(); @@ -76,7 +76,7 @@ private: protected: TTGlyphID firstGlyph; TTGlyphID lastGlyph; - const TrimmedArrayLookupTable *trimmedArrayLookupTable; + LEReferenceTo trimmedArrayLookupTable; }; diff --git a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp index f32b216326a..45d14e12504 100644 --- a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp +++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.cpp @@ -46,22 +46,24 @@ TrimmedArrayProcessor2::TrimmedArrayProcessor2() { } -TrimmedArrayProcessor2::TrimmedArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader) - : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader) +TrimmedArrayProcessor2::TrimmedArrayProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success) + : NonContextualGlyphSubstitutionProcessor2(morphSubtableHeader, success) { - const NonContextualGlyphSubstitutionHeader2 *header = (const NonContextualGlyphSubstitutionHeader2 *) morphSubtableHeader; + const LEReferenceTo header(morphSubtableHeader, success); - trimmedArrayLookupTable = (const TrimmedArrayLookupTable *) &header->table; + trimmedArrayLookupTable = LEReferenceTo(morphSubtableHeader, success, &header->table); firstGlyph = SWAPW(trimmedArrayLookupTable->firstGlyph); lastGlyph = firstGlyph + SWAPW(trimmedArrayLookupTable->glyphCount); + valueArray = LEReferenceToArrayOf(morphSubtableHeader, success, &trimmedArrayLookupTable->valueArray[0], LE_UNBOUNDED_ARRAY); } TrimmedArrayProcessor2::~TrimmedArrayProcessor2() { } -void TrimmedArrayProcessor2::process(LEGlyphStorage &glyphStorage) +void TrimmedArrayProcessor2::process(LEGlyphStorage &glyphStorage, LEErrorCode &success) { + if(LE_FAILURE(success)) return; le_int32 glyphCount = glyphStorage.getGlyphCount(); le_int32 glyph; @@ -70,7 +72,7 @@ void TrimmedArrayProcessor2::process(LEGlyphStorage &glyphStorage) TTGlyphID ttGlyph = (TTGlyphID) LE_GET_GLYPH(thisGlyph); if ((ttGlyph > firstGlyph) && (ttGlyph < lastGlyph)) { - TTGlyphID newGlyph = SWAPW(trimmedArrayLookupTable->valueArray[ttGlyph - firstGlyph]); + TTGlyphID newGlyph = SWAPW(valueArray(ttGlyph - firstGlyph, success)); glyphStorage[glyph] = LE_SET_GLYPH(thisGlyph, newGlyph); } diff --git a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h index 1ebe4187784..a3261d554d4 100644 --- a/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h +++ b/jdk/src/share/native/sun/font/layout/TrimmedArrayProcessor2.h @@ -50,9 +50,9 @@ class LEGlyphStorage; class TrimmedArrayProcessor2 : public NonContextualGlyphSubstitutionProcessor2 { public: - virtual void process(LEGlyphStorage &glyphStorage); + virtual void process(LEGlyphStorage &glyphStorage, LEErrorCode &success); - TrimmedArrayProcessor2(const MorphSubtableHeader2 *morphSubtableHeader); + TrimmedArrayProcessor2(const LEReferenceTo &morphSubtableHeader, LEErrorCode &success); virtual ~TrimmedArrayProcessor2(); @@ -76,8 +76,8 @@ private: protected: TTGlyphID firstGlyph; TTGlyphID lastGlyph; - const TrimmedArrayLookupTable *trimmedArrayLookupTable; - + LEReferenceTo trimmedArrayLookupTable; + LEReferenceToArrayOf valueArray; }; U_NAMESPACE_END diff --git a/jdk/src/share/native/sun/font/layout/ValueRecords.h b/jdk/src/share/native/sun/font/layout/ValueRecords.h index eb63e7d3f4d..ac89b8acdd5 100644 --- a/jdk/src/share/native/sun/font/layout/ValueRecords.h +++ b/jdk/src/share/native/sun/font/layout/ValueRecords.h @@ -64,6 +64,7 @@ private: static le_int16 getFieldCount(ValueFormat valueFormat); static le_int16 getFieldIndex(ValueFormat valueFormat, ValueRecordField field); }; +LE_VAR_ARRAY(ValueRecord, values) enum ValueRecordFields { diff --git a/jdk/src/share/native/sun/font/sunFont.c b/jdk/src/share/native/sun/font/sunFont.c index cfcc5ed75c0..95927b003d7 100644 --- a/jdk/src/share/native/sun/font/sunFont.c +++ b/jdk/src/share/native/sun/font/sunFont.c @@ -320,22 +320,20 @@ Java_sun_font_StrikeCache_getGlyphCacheDescription JNIEXPORT TTLayoutTableCache* newLayoutTableCache() { TTLayoutTableCache* ltc = calloc(1, sizeof(TTLayoutTableCache)); if (ltc) { - ltc->gsub_len = -1; - ltc->gpos_len = -1; - ltc->gdef_len = -1; - ltc->mort_len = -1; - ltc->kern_len = -1; + int i; + for(i=0;ientries[i].len = -1; + } } return ltc; } JNIEXPORT void freeLayoutTableCache(TTLayoutTableCache* ltc) { if (ltc) { - if (ltc->gsub) free(ltc->gsub); - if (ltc->gpos) free(ltc->gpos); - if (ltc->gdef) free(ltc->gdef); - if (ltc->mort) free(ltc->mort); - if (ltc->kern) free(ltc->kern); + int i; + for(i=0;ientries[i].ptr) free (ltc->entries[i].ptr); + } if (ltc->kernPairs) free(ltc->kernPairs); free(ltc); } From ac95e3f1ed0b9069ca2c193ba6489c99996c5a08 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Tue, 5 Feb 2013 20:07:54 +0400 Subject: [PATCH 025/151] 8006790: Improve checking for windows Reviewed-by: art, mschoene --- jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java | 6 +++--- .../classes/sun/lwawt/macosx/CFileDialog.java | 4 ++-- .../sun/lwawt/macosx/CPrinterDialogPeer.java | 4 ++-- jdk/src/share/classes/java/awt/Window.java | 4 ++-- jdk/src/share/classes/java/awt/peer/WindowPeer.java | 13 ++++++------- jdk/src/share/classes/sun/awt/EmbeddedFrame.java | 4 ++-- .../solaris/classes/sun/awt/X11/XWindowPeer.java | 6 +++--- .../classes/sun/awt/windows/WFileDialogPeer.java | 4 ++-- .../classes/sun/awt/windows/WPrintDialogPeer.java | 4 ++-- .../classes/sun/awt/windows/WWindowPeer.java | 6 +++++- 10 files changed, 29 insertions(+), 26 deletions(-) diff --git a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java index d50335f7cd5..0a789c415b3 100644 --- a/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java +++ b/jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java @@ -170,7 +170,7 @@ public class LWWindowPeer setTitle(((Dialog) getTarget()).getTitle()); } - setAlwaysOnTop(getTarget().isAlwaysOnTop()); + updateAlwaysOnTopState(); updateMinimumSize(); final Shape shape = getTarget().getShape(); @@ -357,8 +357,8 @@ public class LWWindowPeer } @Override - public void setAlwaysOnTop(boolean value) { - platformWindow.setAlwaysOnTop(value); + public void updateAlwaysOnTopState() { + platformWindow.setAlwaysOnTop(getTarget().isAlwaysOnTop()); } @Override diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java b/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java index 359f6066364..29129394a37 100644 --- a/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java +++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CFileDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -180,7 +180,7 @@ class CFileDialog implements FileDialogPeer { } @Override - public void setAlwaysOnTop(boolean alwaysOnTop) { + public void updateAlwaysOnTopState() { } @Override diff --git a/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java b/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java index 1ca65e7faae..8dfe7e1e51e 100644 --- a/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java +++ b/jdk/src/macosx/classes/sun/lwawt/macosx/CPrinterDialogPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -87,7 +87,7 @@ public class CPrinterDialogPeer extends LWWindowPeer { } // 1.6 peer method - public void setAlwaysOnTop(boolean value) { + public void updateAlwaysOnTopState() { // no-op, since we just show the native print dialog } diff --git a/jdk/src/share/classes/java/awt/Window.java b/jdk/src/share/classes/java/awt/Window.java index 68b9af95a96..89270e27df1 100644 --- a/jdk/src/share/classes/java/awt/Window.java +++ b/jdk/src/share/classes/java/awt/Window.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2234,7 +2234,7 @@ public class Window extends Container implements Accessible { WindowPeer peer = (WindowPeer)this.peer; synchronized(getTreeLock()) { if (peer != null) { - peer.setAlwaysOnTop(alwaysOnTop); + peer.updateAlwaysOnTopState(); } } } diff --git a/jdk/src/share/classes/java/awt/peer/WindowPeer.java b/jdk/src/share/classes/java/awt/peer/WindowPeer.java index fca78b7eed4..b44bfa00da9 100644 --- a/jdk/src/share/classes/java/awt/peer/WindowPeer.java +++ b/jdk/src/share/classes/java/awt/peer/WindowPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,15 +53,14 @@ public interface WindowPeer extends ContainerPeer { void toBack(); /** - * Sets if the window should always stay on top of all other windows or - * not. - * - * @param alwaysOnTop if the window should always stay on top of all other - * windows or not + * Updates the window's always-on-top state. + * Sets if the window should always stay + * on top of all other windows or not. * + * @see Window#getAlwaysOnTop() * @see Window#setAlwaysOnTop(boolean) */ - void setAlwaysOnTop(boolean alwaysOnTop); + void updateAlwaysOnTopState(); /** * Updates the window's focusable state. diff --git a/jdk/src/share/classes/sun/awt/EmbeddedFrame.java b/jdk/src/share/classes/sun/awt/EmbeddedFrame.java index 0ae1ec762df..fe8ad9a9a0f 100644 --- a/jdk/src/share/classes/sun/awt/EmbeddedFrame.java +++ b/jdk/src/share/classes/sun/awt/EmbeddedFrame.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -542,7 +542,7 @@ public abstract class EmbeddedFrame extends Frame public void toBack() {} public void updateFocusableWindowState() {} public void updateAlwaysOnTop() {} - public void setAlwaysOnTop(boolean alwaysOnTop) {} + public void updateAlwaysOnTopState() {} public Component getGlobalHeavyweightFocusOwner() { return null; } public void setBoundsPrivate(int x, int y, int width, int height) { setBounds(x, y, width, height, SET_BOUNDS); diff --git a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java index 4d867175597..0c230d6aa99 100644 --- a/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java +++ b/jdk/src/solaris/classes/sun/awt/X11/XWindowPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -993,8 +993,8 @@ class XWindowPeer extends XPanelPeer implements WindowPeer, XLayerProtocol.LAYER_NORMAL); } - public void setAlwaysOnTop(boolean alwaysOnTop) { - this.alwaysOnTop = alwaysOnTop; + public void updateAlwaysOnTopState() { + this.alwaysOnTop = ((Window) this.target).isAlwaysOnTop(); updateAlwaysOnTop(); } diff --git a/jdk/src/windows/classes/sun/awt/windows/WFileDialogPeer.java b/jdk/src/windows/classes/sun/awt/windows/WFileDialogPeer.java index 11fe02f83d0..92ec5f337ee 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WFileDialogPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WFileDialogPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -237,7 +237,7 @@ public class WFileDialogPeer extends WWindowPeer implements FileDialogPeer { // unused methods. Overridden to disable this functionality as // it requires HWND which is not available for FileDialog - public void setAlwaysOnTop(boolean value) {} + public void updateAlwaysOnTopState() {} public void setDirectory(String dir) {} public void setFile(String file) {} public void setTitle(String title) {} diff --git a/jdk/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java b/jdk/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java index 988098eb648..ee116d46879 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WPrintDialogPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -117,7 +117,7 @@ public class WPrintDialogPeer extends WWindowPeer implements DialogPeer { // unused methods. Overridden to disable this functionality as // it requires HWND which is not available for FileDialog void initialize() {} - public void setAlwaysOnTop(boolean b) {} + public void updateAlwaysOnTopState() {} public void setResizable(boolean resizable) {} public void hide() {} public void enable() {} diff --git a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java index 07f0c1c08f9..8b941c6f3c5 100644 --- a/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java +++ b/jdk/src/windows/classes/sun/awt/windows/WWindowPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -132,6 +132,10 @@ public class WWindowPeer extends WPanelPeer implements WindowPeer, } } + public void updateAlwaysOnTopState() { + setAlwaysOnTop(((Window)target).isAlwaysOnTop()); + } + public void updateFocusableWindowState() { setFocusableWindow(((Window)target).isFocusableWindow()); } From 90d010120f02cfbba8429693a8050fce38ba1367 Mon Sep 17 00:00:00 2001 From: John Cuthbertson Date: Fri, 5 Apr 2013 10:20:04 -0700 Subject: [PATCH 026/151] 8011343: Add new flag for verifying the heap during startup Perform verification during VM startup under control of new flag and within a VMOperation. Reviewed-by: stefank, jmasa, brutisso --- hotspot/src/share/vm/classfile/systemDictionary.cpp | 7 ++++--- hotspot/src/share/vm/memory/genCollectedHeap.cpp | 13 +++++++------ hotspot/src/share/vm/runtime/arguments.cpp | 5 +++-- hotspot/src/share/vm/runtime/globals.hpp | 4 ++++ hotspot/src/share/vm/runtime/thread.cpp | 6 +++--- hotspot/src/share/vm/runtime/vm_operations.cpp | 3 ++- hotspot/src/share/vm/runtime/vm_operations.hpp | 4 ++-- ...ingStartup.java => TestVerifyDuringStartup.java} | 8 ++++---- 8 files changed, 29 insertions(+), 21 deletions(-) rename hotspot/test/gc/{TestVerifyBeforeGCDuringStartup.java => TestVerifyDuringStartup.java} (86%) diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp index 42571b68a4b..39850490f56 100644 --- a/hotspot/src/share/vm/classfile/systemDictionary.cpp +++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp @@ -1592,9 +1592,10 @@ Symbol* SystemDictionary::find_placeholder(Symbol* class_name, // Used for assertions and verification only Klass* SystemDictionary::find_class(Symbol* class_name, ClassLoaderData* loader_data) { #ifndef ASSERT - guarantee(VerifyBeforeGC || - VerifyDuringGC || - VerifyBeforeExit || + guarantee(VerifyBeforeGC || + VerifyDuringGC || + VerifyBeforeExit || + VerifyDuringStartup || VerifyAfterGC, "too expensive"); #endif assert_locked_or_safepoint(SystemDictionary_lock); diff --git a/hotspot/src/share/vm/memory/genCollectedHeap.cpp b/hotspot/src/share/vm/memory/genCollectedHeap.cpp index 6b7402c8203..60f577a2cea 100644 --- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp +++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp @@ -819,12 +819,13 @@ bool GenCollectedHeap::is_in_young(oop p) { // Returns "TRUE" iff "p" points into the committed areas of the heap. bool GenCollectedHeap::is_in(const void* p) const { #ifndef ASSERT - guarantee(VerifyBeforeGC || - VerifyDuringGC || - VerifyBeforeExit || - PrintAssembly || - tty->count() != 0 || // already printing - VerifyAfterGC || + guarantee(VerifyBeforeGC || + VerifyDuringGC || + VerifyBeforeExit || + VerifyDuringStartup || + PrintAssembly || + tty->count() != 0 || // already printing + VerifyAfterGC || VMError::fatal_error_in_progress(), "too expensive"); #endif diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index c66c73ed28c..17ef8b5afd5 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -2006,11 +2006,12 @@ bool Arguments::check_vm_args_consistency() { // than just disable the lock verification. This will be fixed under // bug 4788986. if (UseConcMarkSweepGC && FLSVerifyAllHeapReferences) { - if (VerifyGCStartAt == 0) { + if (VerifyDuringStartup) { warning("Heap verification at start-up disabled " "(due to current incompatibility with FLSVerifyAllHeapReferences)"); - VerifyGCStartAt = 1; // Disable verification at start-up + VerifyDuringStartup = false; // Disable verification at start-up } + if (VerifyBeforeExit) { warning("Heap verification at shutdown disabled " "(due to current incompatibility with FLSVerifyAllHeapReferences)"); diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 5f1e0c646cc..49f734ab97c 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -2123,6 +2123,10 @@ class CommandLineFlags { product(intx, PrefetchFieldsAhead, -1, \ "How many fields ahead to prefetch in oop scan (<= 0 means off)") \ \ + diagnostic(bool, VerifyDuringStartup, false, \ + "Verify memory system before executing any Java code " \ + "during VM initialization") \ + \ diagnostic(bool, VerifyBeforeExit, trueInDebug, \ "Verify system before exiting") \ \ diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp index 577901a2861..cf0297de099 100644 --- a/hotspot/src/share/vm/runtime/thread.cpp +++ b/hotspot/src/share/vm/runtime/thread.cpp @@ -3446,9 +3446,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { } assert (Universe::is_fully_initialized(), "not initialized"); - if (VerifyBeforeGC && VerifyGCStartAt == 0) { - Universe::heap()->prepare_for_verify(); - Universe::verify(); // make sure we're starting with a clean slate + if (VerifyDuringStartup) { + VM_Verify verify_op(false /* silent */); // make sure we're starting with a clean slate + VMThread::execute(&verify_op); } EXCEPTION_MARK; diff --git a/hotspot/src/share/vm/runtime/vm_operations.cpp b/hotspot/src/share/vm/runtime/vm_operations.cpp index 99e367cdf1a..53ea0bd9852 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.cpp +++ b/hotspot/src/share/vm/runtime/vm_operations.cpp @@ -175,7 +175,8 @@ void VM_HandleFullCodeCache::doit() { } void VM_Verify::doit() { - Universe::verify(); + Universe::heap()->prepare_for_verify(); + Universe::verify(_silent); } bool VM_PrintThreads::doit_prologue() { diff --git a/hotspot/src/share/vm/runtime/vm_operations.hpp b/hotspot/src/share/vm/runtime/vm_operations.hpp index ec3e8519968..c1fc53607c0 100644 --- a/hotspot/src/share/vm/runtime/vm_operations.hpp +++ b/hotspot/src/share/vm/runtime/vm_operations.hpp @@ -300,9 +300,9 @@ class VM_UnlinkSymbols: public VM_Operation { class VM_Verify: public VM_Operation { private: - KlassHandle _dependee; + bool _silent; public: - VM_Verify() {} + VM_Verify(bool silent) : _silent(silent) {} VMOp_Type type() const { return VMOp_Verify; } void doit(); }; diff --git a/hotspot/test/gc/TestVerifyBeforeGCDuringStartup.java b/hotspot/test/gc/TestVerifyDuringStartup.java similarity index 86% rename from hotspot/test/gc/TestVerifyBeforeGCDuringStartup.java rename to hotspot/test/gc/TestVerifyDuringStartup.java index 109e45e4bd9..f0796f35946 100644 --- a/hotspot/test/gc/TestVerifyBeforeGCDuringStartup.java +++ b/hotspot/test/gc/TestVerifyDuringStartup.java @@ -21,23 +21,23 @@ * questions. */ -/* @test TestVerifyBeforeGCDuringStartup.java +/* @test TestVerifyDuringStartup.java * @key gc * @bug 8010463 - * @summary Simple test run with -XX:+VerifyBeforeGC -XX:-UseTLAB to verify 8010463 + * @summary Simple test run with -XX:+VerifyDuringStartup -XX:-UseTLAB to verify 8010463 * @library /testlibrary */ import com.oracle.java.testlibrary.OutputAnalyzer; import com.oracle.java.testlibrary.ProcessTools; -public class TestVerifyBeforeGCDuringStartup { +public class TestVerifyDuringStartup { public static void main(String args[]) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(System.getProperty("test.vm.opts"), "-XX:-UseTLAB", "-XX:+UnlockDiagnosticVMOptions", - "-XX:+VerifyBeforeGC", "-version"); + "-XX:+VerifyDuringStartup", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("[Verifying"); output.shouldHaveExitValue(0); From fabb8c6e25a6787839f3eb0178a056bd2ddbee3f Mon Sep 17 00:00:00 2001 From: Jon Masamitsu Date: Mon, 11 Feb 2013 10:31:56 -0800 Subject: [PATCH 027/151] 8008508: CMS does not correctly reduce heap size after a Full GC Reviewed-by: johnc, ysr --- .../concurrentMarkSweepGeneration.cpp | 112 ++++++------ .../concurrentMarkSweepGeneration.hpp | 19 +- hotspot/src/share/vm/memory/generation.cpp | 161 ++++++++++++++++- hotspot/src/share/vm/memory/generation.hpp | 20 +- .../src/share/vm/memory/tenuredGeneration.cpp | 171 ++---------------- .../src/share/vm/memory/tenuredGeneration.hpp | 11 +- hotspot/src/share/vm/runtime/vmStructs.cpp | 5 +- 7 files changed, 269 insertions(+), 230 deletions(-) diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp index df6aabbb527..a32945eb715 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @@ -48,6 +48,7 @@ #include "memory/iterator.hpp" #include "memory/referencePolicy.hpp" #include "memory/resourceArea.hpp" +#include "memory/tenuredGeneration.hpp" #include "oops/oop.inline.hpp" #include "prims/jvmtiExport.hpp" #include "runtime/globals_extension.hpp" @@ -916,7 +917,31 @@ void ConcurrentMarkSweepGeneration::compute_new_size() { return; } - size_t expand_bytes = 0; + // Compute some numbers about the state of the heap. + const size_t used_after_gc = used(); + const size_t capacity_after_gc = capacity(); + + CardGeneration::compute_new_size(); + + // Reset again after a possible resizing + cmsSpace()->reset_after_compaction(); + + assert(used() == used_after_gc && used_after_gc <= capacity(), + err_msg("used: " SIZE_FORMAT " used_after_gc: " SIZE_FORMAT + " capacity: " SIZE_FORMAT, used(), used_after_gc, capacity())); +} + +void ConcurrentMarkSweepGeneration::compute_new_size_free_list() { + assert_locked_or_safepoint(Heap_lock); + + // If incremental collection failed, we just want to expand + // to the limit. + if (incremental_collection_failed()) { + clear_incremental_collection_failed(); + grow_to_reserved(); + return; + } + double free_percentage = ((double) free()) / capacity(); double desired_free_percentage = (double) MinHeapFreeRatio / 100; double maximum_free_percentage = (double) MaxHeapFreeRatio / 100; @@ -925,9 +950,7 @@ void ConcurrentMarkSweepGeneration::compute_new_size() { if (free_percentage < desired_free_percentage) { size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); assert(desired_capacity >= capacity(), "invalid expansion size"); - expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); - } - if (expand_bytes > 0) { + size_t expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes); if (PrintGCDetails && Verbose) { size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); gclog_or_tty->print_cr("\nFrom compute_new_size: "); @@ -961,6 +984,14 @@ void ConcurrentMarkSweepGeneration::compute_new_size() { gclog_or_tty->print_cr(" Expanded free fraction %f", ((double) free()) / capacity()); } + } else { + size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage)); + assert(desired_capacity <= capacity(), "invalid expansion size"); + size_t shrink_bytes = capacity() - desired_capacity; + // Don't shrink unless the delta is greater than the minimum shrink we want + if (shrink_bytes >= MinHeapDeltaBytes) { + shrink_free_list_by(shrink_bytes); + } } } @@ -1872,7 +1903,7 @@ void CMSCollector::compute_new_size() { assert_locked_or_safepoint(Heap_lock); FreelistLocker z(this); MetaspaceGC::compute_new_size(); - _cmsGen->compute_new_size(); + _cmsGen->compute_new_size_free_list(); } // A work method used by foreground collection to determine @@ -2601,6 +2632,10 @@ void CMSCollector::gc_prologue(bool full) { } void ConcurrentMarkSweepGeneration::gc_prologue(bool full) { + + _capacity_at_prologue = capacity(); + _used_at_prologue = used(); + // Delegate to CMScollector which knows how to coordinate between // this and any other CMS generations that it is responsible for // collecting. @@ -3300,6 +3335,26 @@ bool ConcurrentMarkSweepGeneration::expand_and_ensure_spooling_space( } +void ConcurrentMarkSweepGeneration::shrink_by(size_t bytes) { + assert_locked_or_safepoint(ExpandHeap_lock); + // Shrink committed space + _virtual_space.shrink_by(bytes); + // Shrink space; this also shrinks the space's BOT + _cmsSpace->set_end((HeapWord*) _virtual_space.high()); + size_t new_word_size = heap_word_size(_cmsSpace->capacity()); + // Shrink the shared block offset array + _bts->resize(new_word_size); + MemRegion mr(_cmsSpace->bottom(), new_word_size); + // Shrink the card table + Universe::heap()->barrier_set()->resize_covered_region(mr); + + if (Verbose && PrintGC) { + size_t new_mem_size = _virtual_space.committed_size(); + size_t old_mem_size = new_mem_size + bytes; + gclog_or_tty->print_cr("Shrinking %s from " SIZE_FORMAT "K to " SIZE_FORMAT "K", + name(), old_mem_size/K, new_mem_size/K); + } +} void ConcurrentMarkSweepGeneration::shrink(size_t bytes) { assert_locked_or_safepoint(Heap_lock); @@ -3351,7 +3406,7 @@ bool ConcurrentMarkSweepGeneration::grow_to_reserved() { return success; } -void ConcurrentMarkSweepGeneration::shrink_by(size_t bytes) { +void ConcurrentMarkSweepGeneration::shrink_free_list_by(size_t bytes) { assert_locked_or_safepoint(Heap_lock); assert_lock_strong(freelistLock()); // XXX Fix when compaction is implemented. @@ -9074,51 +9129,6 @@ void ASConcurrentMarkSweepGeneration::update_counters(size_t used) { } } -// The desired expansion delta is computed so that: -// . desired free percentage or greater is used -void ASConcurrentMarkSweepGeneration::compute_new_size() { - assert_locked_or_safepoint(Heap_lock); - - GenCollectedHeap* gch = (GenCollectedHeap*) GenCollectedHeap::heap(); - - // If incremental collection failed, we just want to expand - // to the limit. - if (incremental_collection_failed()) { - clear_incremental_collection_failed(); - grow_to_reserved(); - return; - } - - assert(UseAdaptiveSizePolicy, "Should be using adaptive sizing"); - - assert(gch->kind() == CollectedHeap::GenCollectedHeap, - "Wrong type of heap"); - int prev_level = level() - 1; - assert(prev_level >= 0, "The cms generation is the lowest generation"); - Generation* prev_gen = gch->get_gen(prev_level); - assert(prev_gen->kind() == Generation::ASParNew, - "Wrong type of young generation"); - ParNewGeneration* younger_gen = (ParNewGeneration*) prev_gen; - size_t cur_eden = younger_gen->eden()->capacity(); - CMSAdaptiveSizePolicy* size_policy = cms_size_policy(); - size_t cur_promo = free(); - size_policy->compute_tenured_generation_free_space(cur_promo, - max_available(), - cur_eden); - resize(cur_promo, size_policy->promo_size()); - - // Record the new size of the space in the cms generation - // that is available for promotions. This is temporary. - // It should be the desired promo size. - size_policy->avg_cms_promo()->sample(free()); - size_policy->avg_old_live()->sample(used()); - - if (UsePerfData) { - CMSGCAdaptivePolicyCounters* counters = gc_adaptive_policy_counters(); - counters->update_cms_capacity_counter(capacity()); - } -} - void ASConcurrentMarkSweepGeneration::shrink_by(size_t desired_bytes) { assert_locked_or_safepoint(Heap_lock); assert_lock_strong(freelistLock()); diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp index b688be735ae..edb97487f25 100644 --- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp +++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp @@ -60,6 +60,7 @@ class CompactibleFreeListSpace; class FreeChunk; class PromotionInfo; class ScanMarkedObjectsAgainCarefullyClosure; +class TenuredGeneration; // A generic CMS bit map. It's the basis for both the CMS marking bit map // as well as for the mod union table (in each case only a subset of the @@ -810,9 +811,6 @@ class CMSCollector: public CHeapObj { // used regions of each generation to limit the extent of sweep void save_sweep_limits(); - // Resize the generations included in the collector. - void compute_new_size(); - // A work method used by foreground collection to determine // what type of collection (compacting or not, continuing or fresh) // it should do. @@ -909,6 +907,9 @@ class CMSCollector: public CHeapObj { void releaseFreelistLocks() const; bool haveFreelistLocks() const; + // Adjust size of underlying generation + void compute_new_size(); + // GC prologue and epilogue void gc_prologue(bool full); void gc_epilogue(bool full); @@ -1082,7 +1083,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration { protected: // Shrink generation by specified size (returns false if unable to shrink) - virtual void shrink_by(size_t bytes); + void shrink_free_list_by(size_t bytes); // Update statistics for GC virtual void update_gc_stats(int level, bool full); @@ -1233,6 +1234,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration { CMSExpansionCause::Cause cause); virtual bool expand(size_t bytes, size_t expand_bytes); void shrink(size_t bytes); + void shrink_by(size_t bytes); HeapWord* expand_and_par_lab_allocate(CMSParGCThreadState* ps, size_t word_sz); bool expand_and_ensure_spooling_space(PromotionInfo* promo); @@ -1293,7 +1295,13 @@ class ConcurrentMarkSweepGeneration: public CardGeneration { bool must_be_youngest() const { return false; } bool must_be_oldest() const { return true; } - void compute_new_size(); + // Resize the generation after a compacting GC. The + // generation can be treated as a contiguous space + // after the compaction. + virtual void compute_new_size(); + // Resize the generation after a non-compacting + // collection. + void compute_new_size_free_list(); CollectionTypes debug_collection_type() { return _debug_collection_type; } void rotate_debug_collection_type(); @@ -1315,7 +1323,6 @@ class ASConcurrentMarkSweepGeneration : public ConcurrentMarkSweepGeneration { virtual void shrink_by(size_t bytes); public: - virtual void compute_new_size(); ASConcurrentMarkSweepGeneration(ReservedSpace rs, size_t initial_byte_size, int level, CardTableRS* ct, bool use_adaptive_freelists, diff --git a/hotspot/src/share/vm/memory/generation.cpp b/hotspot/src/share/vm/memory/generation.cpp index b644ce214e9..b608874658e 100644 --- a/hotspot/src/share/vm/memory/generation.cpp +++ b/hotspot/src/share/vm/memory/generation.cpp @@ -382,7 +382,9 @@ void Generation::compact() { CardGeneration::CardGeneration(ReservedSpace rs, size_t initial_byte_size, int level, GenRemSet* remset) : - Generation(rs, initial_byte_size, level), _rs(remset) + Generation(rs, initial_byte_size, level), _rs(remset), + _shrink_factor(0), _min_heap_delta_bytes(), _capacity_at_prologue(), + _used_at_prologue() { HeapWord* start = (HeapWord*)rs.base(); size_t reserved_byte_size = rs.size(); @@ -406,6 +408,9 @@ CardGeneration::CardGeneration(ReservedSpace rs, size_t initial_byte_size, // the end if we try. guarantee(_rs->is_aligned(reserved_mr.end()), "generation must be card aligned"); } + _min_heap_delta_bytes = MinHeapDeltaBytes; + _capacity_at_prologue = initial_byte_size; + _used_at_prologue = 0; } bool CardGeneration::expand(size_t bytes, size_t expand_bytes) { @@ -457,6 +462,160 @@ void CardGeneration::invalidate_remembered_set() { } +void CardGeneration::compute_new_size() { + assert(_shrink_factor <= 100, "invalid shrink factor"); + size_t current_shrink_factor = _shrink_factor; + _shrink_factor = 0; + + // We don't have floating point command-line arguments + // Note: argument processing ensures that MinHeapFreeRatio < 100. + const double minimum_free_percentage = MinHeapFreeRatio / 100.0; + const double maximum_used_percentage = 1.0 - minimum_free_percentage; + + // Compute some numbers about the state of the heap. + const size_t used_after_gc = used(); + const size_t capacity_after_gc = capacity(); + + const double min_tmp = used_after_gc / maximum_used_percentage; + size_t minimum_desired_capacity = (size_t)MIN2(min_tmp, double(max_uintx)); + // Don't shrink less than the initial generation size + minimum_desired_capacity = MAX2(minimum_desired_capacity, + spec()->init_size()); + assert(used_after_gc <= minimum_desired_capacity, "sanity check"); + + if (PrintGC && Verbose) { + const size_t free_after_gc = free(); + const double free_percentage = ((double)free_after_gc) / capacity_after_gc; + gclog_or_tty->print_cr("TenuredGeneration::compute_new_size: "); + gclog_or_tty->print_cr(" " + " minimum_free_percentage: %6.2f" + " maximum_used_percentage: %6.2f", + minimum_free_percentage, + maximum_used_percentage); + gclog_or_tty->print_cr(" " + " free_after_gc : %6.1fK" + " used_after_gc : %6.1fK" + " capacity_after_gc : %6.1fK", + free_after_gc / (double) K, + used_after_gc / (double) K, + capacity_after_gc / (double) K); + gclog_or_tty->print_cr(" " + " free_percentage: %6.2f", + free_percentage); + } + + if (capacity_after_gc < minimum_desired_capacity) { + // If we have less free space than we want then expand + size_t expand_bytes = minimum_desired_capacity - capacity_after_gc; + // Don't expand unless it's significant + if (expand_bytes >= _min_heap_delta_bytes) { + expand(expand_bytes, 0); // safe if expansion fails + } + if (PrintGC && Verbose) { + gclog_or_tty->print_cr(" expanding:" + " minimum_desired_capacity: %6.1fK" + " expand_bytes: %6.1fK" + " _min_heap_delta_bytes: %6.1fK", + minimum_desired_capacity / (double) K, + expand_bytes / (double) K, + _min_heap_delta_bytes / (double) K); + } + return; + } + + // No expansion, now see if we want to shrink + size_t shrink_bytes = 0; + // We would never want to shrink more than this + size_t max_shrink_bytes = capacity_after_gc - minimum_desired_capacity; + + if (MaxHeapFreeRatio < 100) { + const double maximum_free_percentage = MaxHeapFreeRatio / 100.0; + const double minimum_used_percentage = 1.0 - maximum_free_percentage; + const double max_tmp = used_after_gc / minimum_used_percentage; + size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); + maximum_desired_capacity = MAX2(maximum_desired_capacity, + spec()->init_size()); + if (PrintGC && Verbose) { + gclog_or_tty->print_cr(" " + " maximum_free_percentage: %6.2f" + " minimum_used_percentage: %6.2f", + maximum_free_percentage, + minimum_used_percentage); + gclog_or_tty->print_cr(" " + " _capacity_at_prologue: %6.1fK" + " minimum_desired_capacity: %6.1fK" + " maximum_desired_capacity: %6.1fK", + _capacity_at_prologue / (double) K, + minimum_desired_capacity / (double) K, + maximum_desired_capacity / (double) K); + } + assert(minimum_desired_capacity <= maximum_desired_capacity, + "sanity check"); + + if (capacity_after_gc > maximum_desired_capacity) { + // Capacity too large, compute shrinking size + shrink_bytes = capacity_after_gc - maximum_desired_capacity; + // We don't want shrink all the way back to initSize if people call + // System.gc(), because some programs do that between "phases" and then + // we'd just have to grow the heap up again for the next phase. So we + // damp the shrinking: 0% on the first call, 10% on the second call, 40% + // on the third call, and 100% by the fourth call. But if we recompute + // size without shrinking, it goes back to 0%. + shrink_bytes = shrink_bytes / 100 * current_shrink_factor; + assert(shrink_bytes <= max_shrink_bytes, "invalid shrink size"); + if (current_shrink_factor == 0) { + _shrink_factor = 10; + } else { + _shrink_factor = MIN2(current_shrink_factor * 4, (size_t) 100); + } + if (PrintGC && Verbose) { + gclog_or_tty->print_cr(" " + " shrinking:" + " initSize: %.1fK" + " maximum_desired_capacity: %.1fK", + spec()->init_size() / (double) K, + maximum_desired_capacity / (double) K); + gclog_or_tty->print_cr(" " + " shrink_bytes: %.1fK" + " current_shrink_factor: %d" + " new shrink factor: %d" + " _min_heap_delta_bytes: %.1fK", + shrink_bytes / (double) K, + current_shrink_factor, + _shrink_factor, + _min_heap_delta_bytes / (double) K); + } + } + } + + if (capacity_after_gc > _capacity_at_prologue) { + // We might have expanded for promotions, in which case we might want to + // take back that expansion if there's room after GC. That keeps us from + // stretching the heap with promotions when there's plenty of room. + size_t expansion_for_promotion = capacity_after_gc - _capacity_at_prologue; + expansion_for_promotion = MIN2(expansion_for_promotion, max_shrink_bytes); + // We have two shrinking computations, take the largest + shrink_bytes = MAX2(shrink_bytes, expansion_for_promotion); + assert(shrink_bytes <= max_shrink_bytes, "invalid shrink size"); + if (PrintGC && Verbose) { + gclog_or_tty->print_cr(" " + " aggressive shrinking:" + " _capacity_at_prologue: %.1fK" + " capacity_after_gc: %.1fK" + " expansion_for_promotion: %.1fK" + " shrink_bytes: %.1fK", + capacity_after_gc / (double) K, + _capacity_at_prologue / (double) K, + expansion_for_promotion / (double) K, + shrink_bytes / (double) K); + } + } + // Don't shrink unless it's significant + if (shrink_bytes >= _min_heap_delta_bytes) { + shrink(shrink_bytes); + } +} + // Currently nothing to do. void CardGeneration::prepare_for_verify() {} diff --git a/hotspot/src/share/vm/memory/generation.hpp b/hotspot/src/share/vm/memory/generation.hpp index 2169ae8bdf5..feb4fde18af 100644 --- a/hotspot/src/share/vm/memory/generation.hpp +++ b/hotspot/src/share/vm/memory/generation.hpp @@ -634,6 +634,17 @@ class CardGeneration: public Generation { // This is local to this generation. BlockOffsetSharedArray* _bts; + // current shrinking effect: this damps shrinking when the heap gets empty. + size_t _shrink_factor; + + size_t _min_heap_delta_bytes; // Minimum amount to expand. + + // Some statistics from before gc started. + // These are gathered in the gc_prologue (and should_collect) + // to control growing/shrinking policy in spite of promotions. + size_t _capacity_at_prologue; + size_t _used_at_prologue; + CardGeneration(ReservedSpace rs, size_t initial_byte_size, int level, GenRemSet* remset); @@ -644,6 +655,11 @@ class CardGeneration: public Generation { // necessarily the full "bytes") was done. virtual bool expand(size_t bytes, size_t expand_bytes); + // Shrink generation with specified size (returns false if unable to shrink) + virtual void shrink(size_t bytes) = 0; + + virtual void compute_new_size(); + virtual void clear_remembered_set(); virtual void invalidate_remembered_set(); @@ -667,7 +683,6 @@ class OneContigSpaceCardGeneration: public CardGeneration { friend class VM_PopulateDumpSharedSpace; protected: - size_t _min_heap_delta_bytes; // Minimum amount to expand. ContiguousSpace* _the_space; // actual space holding objects WaterMark _last_gc; // watermark between objects allocated before // and after last GC. @@ -688,11 +703,10 @@ class OneContigSpaceCardGeneration: public CardGeneration { public: OneContigSpaceCardGeneration(ReservedSpace rs, size_t initial_byte_size, - size_t min_heap_delta_bytes, int level, GenRemSet* remset, ContiguousSpace* space) : CardGeneration(rs, initial_byte_size, level, remset), - _the_space(space), _min_heap_delta_bytes(min_heap_delta_bytes) + _the_space(space) {} inline bool is_in(const void* p) const; diff --git a/hotspot/src/share/vm/memory/tenuredGeneration.cpp b/hotspot/src/share/vm/memory/tenuredGeneration.cpp index 1e15d65503a..ac1e9316409 100644 --- a/hotspot/src/share/vm/memory/tenuredGeneration.cpp +++ b/hotspot/src/share/vm/memory/tenuredGeneration.cpp @@ -39,7 +39,7 @@ TenuredGeneration::TenuredGeneration(ReservedSpace rs, size_t initial_byte_size, int level, GenRemSet* remset) : OneContigSpaceCardGeneration(rs, initial_byte_size, - MinHeapDeltaBytes, level, remset, NULL) + level, remset, NULL) { HeapWord* bottom = (HeapWord*) _virtual_space.low(); HeapWord* end = (HeapWord*) _virtual_space.high(); @@ -86,162 +86,6 @@ const char* TenuredGeneration::name() const { return "tenured generation"; } -void TenuredGeneration::compute_new_size() { - assert(_shrink_factor <= 100, "invalid shrink factor"); - size_t current_shrink_factor = _shrink_factor; - _shrink_factor = 0; - - // We don't have floating point command-line arguments - // Note: argument processing ensures that MinHeapFreeRatio < 100. - const double minimum_free_percentage = MinHeapFreeRatio / 100.0; - const double maximum_used_percentage = 1.0 - minimum_free_percentage; - - // Compute some numbers about the state of the heap. - const size_t used_after_gc = used(); - const size_t capacity_after_gc = capacity(); - - const double min_tmp = used_after_gc / maximum_used_percentage; - size_t minimum_desired_capacity = (size_t)MIN2(min_tmp, double(max_uintx)); - // Don't shrink less than the initial generation size - minimum_desired_capacity = MAX2(minimum_desired_capacity, - spec()->init_size()); - assert(used_after_gc <= minimum_desired_capacity, "sanity check"); - - if (PrintGC && Verbose) { - const size_t free_after_gc = free(); - const double free_percentage = ((double)free_after_gc) / capacity_after_gc; - gclog_or_tty->print_cr("TenuredGeneration::compute_new_size: "); - gclog_or_tty->print_cr(" " - " minimum_free_percentage: %6.2f" - " maximum_used_percentage: %6.2f", - minimum_free_percentage, - maximum_used_percentage); - gclog_or_tty->print_cr(" " - " free_after_gc : %6.1fK" - " used_after_gc : %6.1fK" - " capacity_after_gc : %6.1fK", - free_after_gc / (double) K, - used_after_gc / (double) K, - capacity_after_gc / (double) K); - gclog_or_tty->print_cr(" " - " free_percentage: %6.2f", - free_percentage); - } - - if (capacity_after_gc < minimum_desired_capacity) { - // If we have less free space than we want then expand - size_t expand_bytes = minimum_desired_capacity - capacity_after_gc; - // Don't expand unless it's significant - if (expand_bytes >= _min_heap_delta_bytes) { - expand(expand_bytes, 0); // safe if expansion fails - } - if (PrintGC && Verbose) { - gclog_or_tty->print_cr(" expanding:" - " minimum_desired_capacity: %6.1fK" - " expand_bytes: %6.1fK" - " _min_heap_delta_bytes: %6.1fK", - minimum_desired_capacity / (double) K, - expand_bytes / (double) K, - _min_heap_delta_bytes / (double) K); - } - return; - } - - // No expansion, now see if we want to shrink - size_t shrink_bytes = 0; - // We would never want to shrink more than this - size_t max_shrink_bytes = capacity_after_gc - minimum_desired_capacity; - - if (MaxHeapFreeRatio < 100) { - const double maximum_free_percentage = MaxHeapFreeRatio / 100.0; - const double minimum_used_percentage = 1.0 - maximum_free_percentage; - const double max_tmp = used_after_gc / minimum_used_percentage; - size_t maximum_desired_capacity = (size_t)MIN2(max_tmp, double(max_uintx)); - maximum_desired_capacity = MAX2(maximum_desired_capacity, - spec()->init_size()); - if (PrintGC && Verbose) { - gclog_or_tty->print_cr(" " - " maximum_free_percentage: %6.2f" - " minimum_used_percentage: %6.2f", - maximum_free_percentage, - minimum_used_percentage); - gclog_or_tty->print_cr(" " - " _capacity_at_prologue: %6.1fK" - " minimum_desired_capacity: %6.1fK" - " maximum_desired_capacity: %6.1fK", - _capacity_at_prologue / (double) K, - minimum_desired_capacity / (double) K, - maximum_desired_capacity / (double) K); - } - assert(minimum_desired_capacity <= maximum_desired_capacity, - "sanity check"); - - if (capacity_after_gc > maximum_desired_capacity) { - // Capacity too large, compute shrinking size - shrink_bytes = capacity_after_gc - maximum_desired_capacity; - // We don't want shrink all the way back to initSize if people call - // System.gc(), because some programs do that between "phases" and then - // we'd just have to grow the heap up again for the next phase. So we - // damp the shrinking: 0% on the first call, 10% on the second call, 40% - // on the third call, and 100% by the fourth call. But if we recompute - // size without shrinking, it goes back to 0%. - shrink_bytes = shrink_bytes / 100 * current_shrink_factor; - assert(shrink_bytes <= max_shrink_bytes, "invalid shrink size"); - if (current_shrink_factor == 0) { - _shrink_factor = 10; - } else { - _shrink_factor = MIN2(current_shrink_factor * 4, (size_t) 100); - } - if (PrintGC && Verbose) { - gclog_or_tty->print_cr(" " - " shrinking:" - " initSize: %.1fK" - " maximum_desired_capacity: %.1fK", - spec()->init_size() / (double) K, - maximum_desired_capacity / (double) K); - gclog_or_tty->print_cr(" " - " shrink_bytes: %.1fK" - " current_shrink_factor: %d" - " new shrink factor: %d" - " _min_heap_delta_bytes: %.1fK", - shrink_bytes / (double) K, - current_shrink_factor, - _shrink_factor, - _min_heap_delta_bytes / (double) K); - } - } - } - - if (capacity_after_gc > _capacity_at_prologue) { - // We might have expanded for promotions, in which case we might want to - // take back that expansion if there's room after GC. That keeps us from - // stretching the heap with promotions when there's plenty of room. - size_t expansion_for_promotion = capacity_after_gc - _capacity_at_prologue; - expansion_for_promotion = MIN2(expansion_for_promotion, max_shrink_bytes); - // We have two shrinking computations, take the largest - shrink_bytes = MAX2(shrink_bytes, expansion_for_promotion); - assert(shrink_bytes <= max_shrink_bytes, "invalid shrink size"); - if (PrintGC && Verbose) { - gclog_or_tty->print_cr(" " - " aggressive shrinking:" - " _capacity_at_prologue: %.1fK" - " capacity_after_gc: %.1fK" - " expansion_for_promotion: %.1fK" - " shrink_bytes: %.1fK", - capacity_after_gc / (double) K, - _capacity_at_prologue / (double) K, - expansion_for_promotion / (double) K, - shrink_bytes / (double) K); - } - } - // Don't shrink unless it's significant - if (shrink_bytes >= _min_heap_delta_bytes) { - shrink(shrink_bytes); - } - assert(used() == used_after_gc && used_after_gc <= capacity(), - "sanity check"); -} - void TenuredGeneration::gc_prologue(bool full) { _capacity_at_prologue = capacity(); _used_at_prologue = used(); @@ -312,6 +156,19 @@ void TenuredGeneration::collect(bool full, size, is_tlab); } +void TenuredGeneration::compute_new_size() { + assert_locked_or_safepoint(Heap_lock); + + // Compute some numbers about the state of the heap. + const size_t used_after_gc = used(); + const size_t capacity_after_gc = capacity(); + + CardGeneration::compute_new_size(); + + assert(used() == used_after_gc && used_after_gc <= capacity(), + err_msg("used: " SIZE_FORMAT " used_after_gc: " SIZE_FORMAT + " capacity: " SIZE_FORMAT, used(), used_after_gc, capacity())); +} void TenuredGeneration::update_gc_stats(int current_level, bool full) { // If the next lower level(s) has been collected, gather any statistics diff --git a/hotspot/src/share/vm/memory/tenuredGeneration.hpp b/hotspot/src/share/vm/memory/tenuredGeneration.hpp index b948a1b0b94..e6e9b79873c 100644 --- a/hotspot/src/share/vm/memory/tenuredGeneration.hpp +++ b/hotspot/src/share/vm/memory/tenuredGeneration.hpp @@ -38,13 +38,6 @@ class ParGCAllocBufferWithBOT; class TenuredGeneration: public OneContigSpaceCardGeneration { friend class VMStructs; protected: - // current shrinking effect: this damps shrinking when the heap gets empty. - size_t _shrink_factor; - // Some statistics from before gc started. - // These are gathered in the gc_prologue (and should_collect) - // to control growing/shrinking policy in spite of promotions. - size_t _capacity_at_prologue; - size_t _used_at_prologue; #if INCLUDE_ALL_GCS // To support parallel promotion: an array of parallel allocation @@ -80,9 +73,6 @@ class TenuredGeneration: public OneContigSpaceCardGeneration { return !CollectGen0First; } - // Mark sweep support - void compute_new_size(); - virtual void gc_prologue(bool full); virtual void gc_epilogue(bool full); bool should_collect(bool full, @@ -93,6 +83,7 @@ class TenuredGeneration: public OneContigSpaceCardGeneration { bool clear_all_soft_refs, size_t size, bool is_tlab); + virtual void compute_new_size(); #if INCLUDE_ALL_GCS // Overrides. diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp index b3e445f3d9e..b00f6825ddd 100644 --- a/hotspot/src/share/vm/runtime/vmStructs.cpp +++ b/hotspot/src/share/vm/runtime/vmStructs.cpp @@ -478,6 +478,9 @@ typedef BinaryTreeDictionary MetablockTreeDictionary; \ nonstatic_field(CardGeneration, _rs, GenRemSet*) \ nonstatic_field(CardGeneration, _bts, BlockOffsetSharedArray*) \ + nonstatic_field(CardGeneration, _shrink_factor, size_t) \ + nonstatic_field(CardGeneration, _capacity_at_prologue, size_t) \ + nonstatic_field(CardGeneration, _used_at_prologue, size_t) \ \ nonstatic_field(CardTableModRefBS, _whole_heap, const MemRegion) \ nonstatic_field(CardTableModRefBS, _guard_index, const size_t) \ @@ -548,8 +551,6 @@ typedef BinaryTreeDictionary MetablockTreeDictionary; nonstatic_field(Space, _bottom, HeapWord*) \ nonstatic_field(Space, _end, HeapWord*) \ \ - nonstatic_field(TenuredGeneration, _shrink_factor, size_t) \ - nonstatic_field(TenuredGeneration, _capacity_at_prologue, size_t) \ nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \ nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \ nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \ From 2e810672ba3c9705755d2675c8c7ffb485ecc76b Mon Sep 17 00:00:00 2001 From: Sean Mullan Date: Wed, 27 Mar 2013 10:37:46 +0000 Subject: [PATCH 028/151] 8003445: Adjust JAX-WS to focus on API Reviewed-by: vinnie, ahgross, mgrebac --- jdk/src/share/lib/security/java.security-linux | 6 ++---- jdk/src/share/lib/security/java.security-macosx | 6 ++---- jdk/src/share/lib/security/java.security-solaris | 6 ++---- jdk/src/share/lib/security/java.security-windows | 6 ++---- jdk/test/Makefile | 2 +- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/jdk/src/share/lib/security/java.security-linux b/jdk/src/share/lib/security/java.security-linux index 8fc53d73677..6c62e385159 100644 --- a/jdk/src/share/lib/security/java.security-linux +++ b/jdk/src/share/lib/security/java.security-linux @@ -155,8 +155,7 @@ package.access=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal. # @@ -179,8 +178,7 @@ package.definition=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal. # diff --git a/jdk/src/share/lib/security/java.security-macosx b/jdk/src/share/lib/security/java.security-macosx index 5a319fa5445..56188dc3f82 100644 --- a/jdk/src/share/lib/security/java.security-macosx +++ b/jdk/src/share/lib/security/java.security-macosx @@ -156,8 +156,7 @@ package.access=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal.,\ apple. @@ -181,8 +180,7 @@ package.definition=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal.,\ apple. diff --git a/jdk/src/share/lib/security/java.security-solaris b/jdk/src/share/lib/security/java.security-solaris index 2a781cff75d..bf56b71cdb8 100644 --- a/jdk/src/share/lib/security/java.security-solaris +++ b/jdk/src/share/lib/security/java.security-solaris @@ -157,8 +157,7 @@ package.access=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal. # @@ -181,8 +180,7 @@ package.definition=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal. # diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows index a00f4628dd6..479788f2c9d 100644 --- a/jdk/src/share/lib/security/java.security-windows +++ b/jdk/src/share/lib/security/java.security-windows @@ -156,8 +156,7 @@ package.access=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal. # @@ -180,8 +179,7 @@ package.definition=sun.,\ com.sun.proxy.,\ com.sun.org.apache.xerces.internal.utils.,\ com.sun.org.apache.xalan.internal.utils.,\ - com.sun.org.glassfish.external.,\ - com.sun.org.glassfish.gmbal.,\ + com.sun.org.glassfish.,\ jdk.internal. # diff --git a/jdk/test/Makefile b/jdk/test/Makefile index 69d5dac3d57..75e56458a14 100644 --- a/jdk/test/Makefile +++ b/jdk/test/Makefile @@ -514,7 +514,7 @@ jdk_other: $(call TestDirs, \ java/sql javax/sql \ javax/smartcardio \ javax/xml/soap \ - javax/xml/ws com/sun/internal/ws \ + javax/xml/ws com/sun/internal/ws com/sun/org/glassfish \ jdk/asm \ com/sun/org/apache/xerces \ com/sun/corba \ From dc574bf905d8c2ef1464ff1584d385576e9236f6 Mon Sep 17 00:00:00 2001 From: Joe Wang Date: Mon, 18 Feb 2013 13:02:09 -0800 Subject: [PATCH 029/151] 6657673: Issues with JAXP Reviewed-by: alanb, lancea, ahgross, mullan --- .../share/lib/security/java.security-linux | 36 +++++++++++++++++-- .../share/lib/security/java.security-macosx | 36 +++++++++++++++++-- .../share/lib/security/java.security-solaris | 36 +++++++++++++++++-- .../share/lib/security/java.security-windows | 36 +++++++++++++++++-- jdk/test/Makefile | 1 + 5 files changed, 137 insertions(+), 8 deletions(-) diff --git a/jdk/src/share/lib/security/java.security-linux b/jdk/src/share/lib/security/java.security-linux index 6c62e385159..afe07617e45 100644 --- a/jdk/src/share/lib/security/java.security-linux +++ b/jdk/src/share/lib/security/java.security-linux @@ -148,13 +148,29 @@ keystore.type=jks package.access=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal. @@ -171,13 +187,29 @@ package.access=sun.,\ package.definition=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal. diff --git a/jdk/src/share/lib/security/java.security-macosx b/jdk/src/share/lib/security/java.security-macosx index 56188dc3f82..a403d9b2982 100644 --- a/jdk/src/share/lib/security/java.security-macosx +++ b/jdk/src/share/lib/security/java.security-macosx @@ -149,13 +149,29 @@ keystore.type=jks package.access=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal.,\ apple. @@ -173,13 +189,29 @@ package.access=sun.,\ package.definition=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal.,\ apple. diff --git a/jdk/src/share/lib/security/java.security-solaris b/jdk/src/share/lib/security/java.security-solaris index bf56b71cdb8..9f2f75939dc 100644 --- a/jdk/src/share/lib/security/java.security-solaris +++ b/jdk/src/share/lib/security/java.security-solaris @@ -150,13 +150,29 @@ keystore.type=jks package.access=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal. @@ -173,13 +189,29 @@ package.access=sun.,\ package.definition=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal. diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows index 479788f2c9d..9f092dd1cd2 100644 --- a/jdk/src/share/lib/security/java.security-windows +++ b/jdk/src/share/lib/security/java.security-windows @@ -149,13 +149,29 @@ keystore.type=jks package.access=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal. @@ -172,13 +188,29 @@ package.access=sun.,\ package.definition=sun.,\ com.sun.xml.internal.bind.,\ com.sun.xml.internal.org.jvnet.staxex.,\ + com.sun.xml.internal.stream.,\ com.sun.xml.internal.ws.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ com.sun.proxy.,\ - com.sun.org.apache.xerces.internal.utils.,\ + com.sun.org.apache.bcel.internal.,\ + com.sun.org.apache.regexp.internal.,\ + com.sun.org.apache.xerces.internal.,\ + com.sun.org.apache.xpath.internal.,\ + com.sun.org.apache.xalan.internal.extensions.,\ + com.sun.org.apache.xalan.internal.lib.,\ + com.sun.org.apache.xalan.internal.res.,\ + com.sun.org.apache.xalan.internal.templates.,\ com.sun.org.apache.xalan.internal.utils.,\ + com.sun.org.apache.xalan.internal.xslt.,\ + com.sun.org.apache.xalan.internal.xsltc.cmdline.,\ + com.sun.org.apache.xalan.internal.xsltc.compiler.,\ + com.sun.org.apache.xalan.internal.xsltc.trax.,\ + com.sun.org.apache.xalan.internal.xsltc.util.,\ + com.sun.org.apache.xml.internal.res.,\ + com.sun.org.apache.xml.internal.serializer.utils.,\ + com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ jdk.internal. diff --git a/jdk/test/Makefile b/jdk/test/Makefile index 75e56458a14..c09368dd8dd 100644 --- a/jdk/test/Makefile +++ b/jdk/test/Makefile @@ -513,6 +513,7 @@ jdk_other: $(call TestDirs, \ javax/script \ java/sql javax/sql \ javax/smartcardio \ + javax/xml/jaxp \ javax/xml/soap \ javax/xml/ws com/sun/internal/ws com/sun/org/glassfish \ jdk/asm \ From 33184bb4131df574b9ac4028429ccb8e0bb1323d Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Tue, 19 Feb 2013 12:06:28 +0400 Subject: [PATCH 030/151] 8007675: Improve color conversion Reviewed-by: prr, mschoene, jgodinez --- .../sun/java2d/cmm/lcms/LCMSImageLayout.java | 98 +++++++++-- .../sun/java2d/cmm/lcms/LCMSTransform.java | 160 +++++++++++------- 2 files changed, 181 insertions(+), 77 deletions(-) diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java index 3695a163211..9bb34f555c5 100644 --- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java +++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java @@ -99,50 +99,75 @@ class LCMSImageLayout { int offset; Object dataArray; - private LCMSImageLayout(int np, int pixelType, int pixelSize) { + private int dataArrayLength; /* in bytes */ + + private LCMSImageLayout(int np, int pixelType, int pixelSize) + throws ImageLayoutException + { this.pixelType = pixelType; width = np; height = 1; - nextRowOffset = np*pixelSize; + nextRowOffset = safeMult(pixelSize, np); offset = 0; } private LCMSImageLayout(int width, int height, int pixelType, - int pixelSize) { + int pixelSize) + throws ImageLayoutException + { this.pixelType = pixelType; this.width = width; this.height = height; - nextRowOffset = width*pixelSize; + nextRowOffset = safeMult(pixelSize, width); offset = 0; } - public LCMSImageLayout(byte[] data, int np, int pixelType, int pixelSize) { + public LCMSImageLayout(byte[] data, int np, int pixelType, int pixelSize) + throws ImageLayoutException + { this(np, pixelType, pixelSize); dataType = DT_BYTE; dataArray = data; + dataArrayLength = data.length; + + verify(); } - public LCMSImageLayout(short[] data, int np, int pixelType, int pixelSize) { + public LCMSImageLayout(short[] data, int np, int pixelType, int pixelSize) + throws ImageLayoutException + { this(np, pixelType, pixelSize); dataType = DT_SHORT; dataArray = data; + dataArrayLength = 2 * data.length; + + verify(); } - public LCMSImageLayout(int[] data, int np, int pixelType, int pixelSize) { + public LCMSImageLayout(int[] data, int np, int pixelType, int pixelSize) + throws ImageLayoutException + { this(np, pixelType, pixelSize); dataType = DT_INT; dataArray = data; + dataArrayLength = 4 * data.length; + + verify(); } public LCMSImageLayout(double[] data, int np, int pixelType, int pixelSize) + throws ImageLayoutException { this(np, pixelType, pixelSize); dataType = DT_DOUBLE; dataArray = data; + dataArrayLength = 8 * data.length; + + verify(); } - public LCMSImageLayout(BufferedImage image) { + public LCMSImageLayout(BufferedImage image) throws ImageLayoutException { ShortComponentRaster shortRaster; IntegerComponentRaster intRaster; ByteComponentRaster byteRaster; @@ -186,9 +211,13 @@ class LCMSImageLayout { case BufferedImage.TYPE_INT_ARGB: case BufferedImage.TYPE_INT_BGR: intRaster = (IntegerComponentRaster)image.getRaster(); - nextRowOffset = intRaster.getScanlineStride()*4; - offset = intRaster.getDataOffset(0)*4; + + nextRowOffset = safeMult(4, intRaster.getScanlineStride()); + + offset = safeMult(4, intRaster.getDataOffset(0)); + dataArray = intRaster.getDataStorage(); + dataArrayLength = 4 * intRaster.getDataStorage().length; dataType = DT_INT; break; @@ -199,6 +228,7 @@ class LCMSImageLayout { int firstBand = image.getSampleModel().getNumBands() - 1; offset = byteRaster.getDataOffset(firstBand); dataArray = byteRaster.getDataStorage(); + dataArrayLength = byteRaster.getDataStorage().length; dataType = DT_BYTE; break; @@ -207,17 +237,20 @@ class LCMSImageLayout { nextRowOffset = byteRaster.getScanlineStride(); offset = byteRaster.getDataOffset(0); dataArray = byteRaster.getDataStorage(); + dataArrayLength = byteRaster.getDataStorage().length; dataType = DT_BYTE; break; case BufferedImage.TYPE_USHORT_GRAY: shortRaster = (ShortComponentRaster)image.getRaster(); - nextRowOffset = shortRaster.getScanlineStride()*2; - offset = shortRaster.getDataOffset(0) * 2; + nextRowOffset = safeMult(2, shortRaster.getScanlineStride()); + offset = safeMult(2, shortRaster.getDataOffset(0)); dataArray = shortRaster.getDataStorage(); + dataArrayLength = 2 * shortRaster.getDataStorage().length; dataType = DT_SHORT; break; } + verify(); } public static boolean isSupported(BufferedImage image) { @@ -233,4 +266,45 @@ class LCMSImageLayout { } return false; } + + private void verify() throws ImageLayoutException { + + if (offset < 0 || offset >= dataArrayLength) { + throw new ImageLayoutException("Invalid image layout"); + } + + int lastPixelOffset = safeMult(nextRowOffset, (height - 1)); + + lastPixelOffset = safeAdd(lastPixelOffset, (width - 1)); + + int off = safeAdd(offset, lastPixelOffset); + + if (off < 0 || off >= dataArrayLength) { + throw new ImageLayoutException("Invalid image layout"); + } + } + + static int safeAdd(int a, int b) throws ImageLayoutException { + long res = a; + res += b; + if (res < Integer.MIN_VALUE || res > Integer.MAX_VALUE) { + throw new ImageLayoutException("Invalid image layout"); + } + return (int)res; + } + + static int safeMult(int a, int b) throws ImageLayoutException { + long res = a; + res *= b; + if (res < Integer.MIN_VALUE || res > Integer.MAX_VALUE) { + throw new ImageLayoutException("Invalid image layout"); + } + return (int)res; + } + + public static class ImageLayoutException extends Exception { + public ImageLayoutException(String message) { + super(message); + } + } } diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java index aa9d0bf054f..9792248dea7 100644 --- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java +++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java @@ -51,6 +51,7 @@ import java.awt.image.SinglePixelPackedSampleModel; import java.awt.image.ComponentSampleModel; import sun.java2d.cmm.*; import sun.java2d.cmm.lcms.*; +import static sun.java2d.cmm.lcms.LCMSImageLayout.ImageLayoutException; public class LCMSTransform implements ColorTransform { @@ -164,8 +165,12 @@ public class LCMSTransform implements ColorTransform { if (LCMSImageLayout.isSupported(src) && LCMSImageLayout.isSupported(dst)) { - doTransform(new LCMSImageLayout(src), new LCMSImageLayout(dst)); - return; + try { + doTransform(new LCMSImageLayout(src), new LCMSImageLayout(dst)); + return; + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert images"); + } } LCMSImageLayout srcIL, dstIL; Raster srcRas = src.getRaster(); @@ -223,14 +228,18 @@ public class LCMSTransform implements ColorTransform { } int idx; // TODO check for src npixels = dst npixels - srcIL = new LCMSImageLayout( - srcLine, srcLine.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(1), getNumInComponents()); - dstIL = new LCMSImageLayout( - dstLine, dstLine.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(1), getNumOutComponents()); + try { + srcIL = new LCMSImageLayout( + srcLine, srcLine.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(1), getNumInComponents()); + dstIL = new LCMSImageLayout( + dstLine, dstLine.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(1), getNumOutComponents()); + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert images"); + } // process each scanline for (int y = 0; y < h; y++) { // convert src scanline @@ -279,16 +288,19 @@ public class LCMSTransform implements ColorTransform { alpha = new float[w]; } int idx; - srcIL = new LCMSImageLayout( - srcLine, srcLine.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); - - dstIL = new LCMSImageLayout( - dstLine, dstLine.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + try { + srcIL = new LCMSImageLayout( + srcLine, srcLine.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); + dstIL = new LCMSImageLayout( + dstLine, dstLine.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert images"); + } // process each scanline for (int y = 0; y < h; y++) { // convert src scanline @@ -397,16 +409,19 @@ public class LCMSTransform implements ColorTransform { short[] srcLine = new short[w * srcNumBands]; short[] dstLine = new short[w * dstNumBands]; int idx; - srcIL = new LCMSImageLayout( - srcLine, srcLine.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); - - dstIL = new LCMSImageLayout( - dstLine, dstLine.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + try { + srcIL = new LCMSImageLayout( + srcLine, srcLine.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); + dstIL = new LCMSImageLayout( + dstLine, dstLine.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert rasters"); + } // process each scanline for (int y = 0; y < h; y++, ys++, yd++) { // get src scanline @@ -489,15 +504,18 @@ public class LCMSTransform implements ColorTransform { byte[] dstLine = new byte[w * dstNumBands]; int idx; // TODO check for src npixels = dst npixels - srcIL = new LCMSImageLayout( - srcLine, srcLine.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(1), getNumInComponents()); - dstIL = new LCMSImageLayout( - dstLine, dstLine.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(1), getNumOutComponents()); - + try { + srcIL = new LCMSImageLayout( + srcLine, srcLine.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(1), getNumInComponents()); + dstIL = new LCMSImageLayout( + dstLine, dstLine.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(1), getNumOutComponents()); + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert rasters"); + } // process each scanline for (int y = 0; y < h; y++, ys++, yd++) { // get src scanline @@ -529,16 +547,20 @@ public class LCMSTransform implements ColorTransform { short[] srcLine = new short[w * srcNumBands]; short[] dstLine = new short[w * dstNumBands]; int idx; - srcIL = new LCMSImageLayout( - srcLine, srcLine.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); - dstIL = new LCMSImageLayout( - dstLine, dstLine.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + try { + srcIL = new LCMSImageLayout( + srcLine, srcLine.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); + dstIL = new LCMSImageLayout( + dstLine, dstLine.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert rasters"); + } // process each scanline for (int y = 0; y < h; y++, ys++, yd++) { // get src scanline @@ -579,19 +601,23 @@ public class LCMSTransform implements ColorTransform { dst = new short [(src.length/getNumInComponents())*getNumOutComponents()]; } - LCMSImageLayout srcIL = new LCMSImageLayout( - src, src.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); + try { + LCMSImageLayout srcIL = new LCMSImageLayout( + src, src.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumInComponents()*2); - LCMSImageLayout dstIL = new LCMSImageLayout( - dst, dst.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); + LCMSImageLayout dstIL = new LCMSImageLayout( + dst, dst.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(2), getNumOutComponents()*2); - doTransform(srcIL, dstIL); + doTransform(srcIL, dstIL); - return dst; + return dst; + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert data"); + } } public byte[] colorConvert(byte[] src, byte[] dst) { @@ -599,18 +625,22 @@ public class LCMSTransform implements ColorTransform { dst = new byte [(src.length/getNumInComponents())*getNumOutComponents()]; } - LCMSImageLayout srcIL = new LCMSImageLayout( - src, src.length/getNumInComponents(), - LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | - LCMSImageLayout.BYTES_SH(1), getNumInComponents()); + try { + LCMSImageLayout srcIL = new LCMSImageLayout( + src, src.length/getNumInComponents(), + LCMSImageLayout.CHANNELS_SH(getNumInComponents()) | + LCMSImageLayout.BYTES_SH(1), getNumInComponents()); - LCMSImageLayout dstIL = new LCMSImageLayout( - dst, dst.length/getNumOutComponents(), - LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | - LCMSImageLayout.BYTES_SH(1), getNumOutComponents()); + LCMSImageLayout dstIL = new LCMSImageLayout( + dst, dst.length/getNumOutComponents(), + LCMSImageLayout.CHANNELS_SH(getNumOutComponents()) | + LCMSImageLayout.BYTES_SH(1), getNumOutComponents()); - doTransform(srcIL, dstIL); + doTransform(srcIL, dstIL); - return dst; + return dst; + } catch (ImageLayoutException e) { + throw new CMMException("Unable to convert data"); + } } } From 10415b74b76f79f1acbaa4775446b2a116d66e89 Mon Sep 17 00:00:00 2001 From: Miroslav Kos Date: Thu, 7 Mar 2013 07:19:35 -0500 Subject: [PATCH 031/151] 8005432: Update access to JAX-WS Newly restricted the whole package com.sun.xml.internal; fix reviewed also by Alexander Fomin Reviewed-by: mullan, skoivu --- jdk/src/share/lib/security/java.security-linux | 10 ++-------- jdk/src/share/lib/security/java.security-macosx | 10 ++-------- jdk/src/share/lib/security/java.security-solaris | 10 ++-------- jdk/src/share/lib/security/java.security-windows | 10 ++-------- 4 files changed, 8 insertions(+), 32 deletions(-) diff --git a/jdk/src/share/lib/security/java.security-linux b/jdk/src/share/lib/security/java.security-linux index afe07617e45..8797a6819f0 100644 --- a/jdk/src/share/lib/security/java.security-linux +++ b/jdk/src/share/lib/security/java.security-linux @@ -146,10 +146,7 @@ keystore.type=jks # corresponding RuntimePermission ("accessClassInPackage."+package) has # been granted. package.access=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ @@ -185,10 +182,7 @@ package.access=sun.,\ # checkPackageDefinition. # package.definition=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ diff --git a/jdk/src/share/lib/security/java.security-macosx b/jdk/src/share/lib/security/java.security-macosx index a403d9b2982..3ed6a4fd5dc 100644 --- a/jdk/src/share/lib/security/java.security-macosx +++ b/jdk/src/share/lib/security/java.security-macosx @@ -147,10 +147,7 @@ keystore.type=jks # corresponding RuntimePermission ("accessClassInPackage."+package) has # been granted. package.access=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ @@ -187,10 +184,7 @@ package.access=sun.,\ # checkPackageDefinition. # package.definition=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ diff --git a/jdk/src/share/lib/security/java.security-solaris b/jdk/src/share/lib/security/java.security-solaris index 9f2f75939dc..a88da32ca48 100644 --- a/jdk/src/share/lib/security/java.security-solaris +++ b/jdk/src/share/lib/security/java.security-solaris @@ -148,10 +148,7 @@ keystore.type=jks # corresponding RuntimePermission ("accessClassInPackage."+package) has # been granted. package.access=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ @@ -187,10 +184,7 @@ package.access=sun.,\ # checkPackageDefinition. # package.definition=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows index 9f092dd1cd2..ffaa58f9ab5 100644 --- a/jdk/src/share/lib/security/java.security-windows +++ b/jdk/src/share/lib/security/java.security-windows @@ -147,10 +147,7 @@ keystore.type=jks # corresponding RuntimePermission ("accessClassInPackage."+package) has # been granted. package.access=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ @@ -186,10 +183,7 @@ package.access=sun.,\ # checkPackageDefinition. # package.definition=sun.,\ - com.sun.xml.internal.bind.,\ - com.sun.xml.internal.org.jvnet.staxex.,\ - com.sun.xml.internal.stream.,\ - com.sun.xml.internal.ws.,\ + com.sun.xml.internal.,\ com.sun.imageio.,\ com.sun.istack.internal.,\ com.sun.jmx.,\ From 23f643597be28dc0c53352a37d18a22045e2b1a2 Mon Sep 17 00:00:00 2001 From: Ragini Prasad Date: Wed, 27 Mar 2013 21:32:53 +0000 Subject: [PATCH 032/151] 8007406: Improve accessibility of AccessBridge Reviewed-by: skoivu, mullan, ptbrunet --- jdk/src/share/lib/security/java.security-windows | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows index ffaa58f9ab5..e73e1065412 100644 --- a/jdk/src/share/lib/security/java.security-windows +++ b/jdk/src/share/lib/security/java.security-windows @@ -170,7 +170,8 @@ package.access=sun.,\ com.sun.org.apache.xml.internal.serializer.utils.,\ com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ - jdk.internal. + jdk.internal.\ + com.sun.java.accessibility. # # List of comma-separated packages that start with or equal this string @@ -206,7 +207,8 @@ package.definition=sun.,\ com.sun.org.apache.xml.internal.serializer.utils.,\ com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ - jdk.internal. + jdk.internal.\ + com.sun.java.accessibility. # # Determines whether this properties file can be appended to From a876e30cd4479d483c4f38312c9d8cd51d853be4 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 28 Mar 2013 09:50:40 +0000 Subject: [PATCH 033/151] 8010944: Incorrectly separated package list in java.security-windows Reviewed-by: mullan --- jdk/src/share/lib/security/java.security-windows | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/share/lib/security/java.security-windows b/jdk/src/share/lib/security/java.security-windows index e73e1065412..3949ef2daa4 100644 --- a/jdk/src/share/lib/security/java.security-windows +++ b/jdk/src/share/lib/security/java.security-windows @@ -170,7 +170,7 @@ package.access=sun.,\ com.sun.org.apache.xml.internal.serializer.utils.,\ com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ - jdk.internal.\ + jdk.internal.,\ com.sun.java.accessibility. # @@ -207,7 +207,7 @@ package.definition=sun.,\ com.sun.org.apache.xml.internal.serializer.utils.,\ com.sun.org.apache.xml.internal.utils.,\ com.sun.org.glassfish.,\ - jdk.internal.\ + jdk.internal.,\ com.sun.java.accessibility. # From fbc6f854cd5739eb43029905bf9189b9bdfd912c Mon Sep 17 00:00:00 2001 From: Vladimir Ivanov Date: Fri, 1 Mar 2013 04:45:12 +0400 Subject: [PATCH 034/151] 8008140: Better method handle resolution Reviewed-by: jrose, twisti, jdn --- .../java/lang/invoke/MethodHandles.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java index f4cad4deaa8..d443e4c4597 100644 --- a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java +++ b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java @@ -1237,6 +1237,30 @@ return mh1; checkMethod(refKind, refc, method); if (method.isMethodHandleInvoke()) return fakeMethodHandleInvoke(method); + + Class refcAsSuper; + if (refKind == REF_invokeSpecial && + refc != lookupClass() && + refc != (refcAsSuper = lookupClass().getSuperclass()) && + refc.isAssignableFrom(lookupClass())) { + assert(!method.getName().equals("")); // not this code path + // Per JVMS 6.5, desc. of invokespecial instruction: + // If the method is in a superclass of the LC, + // and if our original search was above LC.super, + // repeat the search (symbolic lookup) from LC.super. + // FIXME: MemberName.resolve should handle this instead. + MemberName m2 = new MemberName(refcAsSuper, + method.getName(), + method.getMethodType(), + REF_invokeSpecial); + m2 = IMPL_NAMES.resolveOrNull(refKind, m2, lookupClassOrNull()); + if (m2 == null) throw new InternalError(method.toString()); + method = m2; + refc = refcAsSuper; + // redo basic checks + checkMethod(refKind, refc, method); + } + MethodHandle mh = DirectMethodHandle.make(refKind, refc, method); mh = maybeBindCaller(method, mh, callerClass); mh = mh.setVarargs(method); From c691233acce8b407a6010088a3956cf406767b93 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Mon, 1 Apr 2013 11:48:01 -0700 Subject: [PATCH 035/151] 8010267: Add test-clean for cleaning of testoutput directory from output directory. Add depedency on test-clean to clean Reviewed-by: mchung, tbell --- common/makefiles/Main.gmk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/makefiles/Main.gmk b/common/makefiles/Main.gmk index 11dda4bcff2..fa843a3aef4 100644 --- a/common/makefiles/Main.gmk +++ b/common/makefiles/Main.gmk @@ -197,7 +197,7 @@ $(OUTPUT_ROOT)/source_tips: FRC # Remove everything, except the output from configure. -clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs +clean: clean-langtools clean-corba clean-jaxp clean-jaxws clean-hotspot clean-jdk clean-nashorn clean-images clean-overlay-images clean-bootcycle-build clean-docs clean-test @($(CD) $(OUTPUT_ROOT) && $(RM) -r tmp source_tips build.log* build-trace*.log*) @$(ECHO) Cleaned all build artifacts. @@ -238,6 +238,8 @@ clean-bootcycle-build: clean-docs: $(call CleanComponent,docs) $(call CleanComponent,docstemp) +clean-test: + $(call CleanComponent,testoutput) .PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install .PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only From ecc23551a5715b0616a14a0fb96031119fbd96b5 Mon Sep 17 00:00:00 2001 From: Jim Gish Date: Tue, 26 Mar 2013 13:41:36 -0400 Subject: [PATCH 036/151] 8009824: webrev.ksh generated jdk.patch files do not handle renames, copies, and shouldn't be applied Use hg export --git to produce proper patch file Reviewed-by: mduigou --- make/scripts/webrev.ksh | 111 ++++++++++++++++++++++++++++------------ 1 file changed, 77 insertions(+), 34 deletions(-) diff --git a/make/scripts/webrev.ksh b/make/scripts/webrev.ksh index cfb14f37ca3..c95bce74523 100644 --- a/make/scripts/webrev.ksh +++ b/make/scripts/webrev.ksh @@ -1436,14 +1436,15 @@ function flist_from_mercurial_forest { rm -f $FLIST if [ -z "$Nflag" ]; then - print " File list from hg foutgoing $PWS ..." + print " File list from hg foutgoing $PWS ..." outgoing_from_mercurial_forest HG_LIST_FROM_COMMIT=1 fi if [ ! -f $FLIST ]; then # hg commit hasn't been run see what is lying around - print "\n No outgoing, perhaps you haven't commited." - print " File list from hg fstatus -mard ...\c" + print "\n No outgoing, perhaps you haven't commited." + NO_OUTGOING= + print " File list from hg fstatus -mard ...\c" FSTAT_OPT= fstatus HG_LIST_FROM_COMMIT=0 @@ -1466,7 +1467,7 @@ function treestatus done >> $FLIST # Then all the added files - # But some of these could have been "moved" or renamed ones + # But some of these could have been "moved" or renamed ones or copied ones # so let's make sure we get the proper info # hg status -aC will produce something like: # A subdir/File3 @@ -1474,8 +1475,11 @@ function treestatus # File4 # A subdir/File5 # The first and last are simple addition while the middle one - # is a move/rename - + # is a move/rename or a copy. We can't distinguish from a rename vs a copy + # without also getting the status of removed files. The middle case above + # is a rename if File4 is also shown a being removed. If File4 is not a + # removed file, then the middle case is a copy from File4 to subdir/File4 + # FIXME - we're not distinguishing copy from rename $HGCMD -aC | $FILTER | while read LINE; do ldone="" while [ -z "$ldone" ]; do @@ -1625,6 +1629,7 @@ function flist_from_mercurial else # hg commit hasn't been run see what is lying around print "\n No outgoing, perhaps you haven't commited." + NO_OUTGOING= fi # First let's list all the modified or deleted files @@ -1638,8 +1643,12 @@ function flist_from_mercurial # A subdir/File4 # File4 # A subdir/File5 - # The first and last are simple addition while the middle one - # is a move/rename + # The first and last are simple addition while the middle one + # is a move/rename or a copy. We can't distinguish from a rename vs a copy + # without also getting the status of removed files. The middle case above + # is a rename if File4 is also shown a being removed. If File4 is not a + # removed file, then the middle case is a copy from File4 to subdir/File4 + # FIXME - we're not distinguishing copy from rename hg status $STATUS_REV -aC | $FILTER >$FLIST.temp while read LINE; do @@ -1905,7 +1914,7 @@ function build_old_new_mercurial fi fi else - # It's a rename (or a move), so let's make sure we move + # It's a rename (or a move), or a copy, so let's make sure we move # to the right directory first, then restore it once done current_dir=`pwd` cd $CWS/$PDIR @@ -2774,34 +2783,38 @@ do cleanse_rmfile="sed 's/^\(@@ [0-9+,-]*\) [0-9+,-]* @@$/\1 +0,0 @@/'" cleanse_newfile="sed 's/^@@ [0-9+,-]* \([0-9+,-]* @@\)$/@@ -0,0 \1/'" - rm -f $WDIR/$DIR/$F.patch - if [[ -z $rename ]]; then - if [ ! -f $ofile ]; then - diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \ - > $WDIR/$DIR/$F.patch - elif [ ! -f $nfile ]; then - diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \ - > $WDIR/$DIR/$F.patch - else - diff -u $ofile $nfile > $WDIR/$DIR/$F.patch - fi - else - diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \ - > $WDIR/$DIR/$F.patch + if [[ -v NO_OUTGOING ]]; + then + # Only need to generate a patch file here if there are no commits in outgoing + rm -f $WDIR/$DIR/$F.patch + if [[ -z $rename ]]; then + if [ ! -f $ofile ]; then + diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \ + > $WDIR/$DIR/$F.patch + elif [ ! -f $nfile ]; then + diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \ + > $WDIR/$DIR/$F.patch + else + diff -u $ofile $nfile > $WDIR/$DIR/$F.patch + fi + else + diff -u $ofile /dev/null | sh -c "$cleanse_rmfile" \ + > $WDIR/$DIR/$F.patch - diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \ - >> $WDIR/$DIR/$F.patch + diff -u /dev/null $nfile | sh -c "$cleanse_newfile" \ + >> $WDIR/$DIR/$F.patch - fi + fi - # - # Tack the patch we just made onto the accumulated patch for the - # whole wad. - # - cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch + # + # Tack the patch we just made onto the accumulated patch for the + # whole wad. + # + cat $WDIR/$DIR/$F.patch >> $WDIR/$WNAME.patch + fi - print " patch\c" + print " patch\c" if [[ -f $ofile && -f $nfile && -z $mv_but_nodiff ]]; then @@ -2894,6 +2907,32 @@ do print done < $FLIST +# Create the new style mercurial patch here using hg export -r [all-revs] -g -o $CHANGESETPATH +if [[ $SCM_MODE == "mercurial" ]]; then + if [[ !(-v NO_OUTGOING) ]]; then + EXPORTCHANGESET="$WNAME.changeset" + CHANGESETPATH=${WDIR}/${EXPORTCHANGESET} + rm -f $CHANGESETPATH + touch $CHANGESETPATH + if [[ -n $ALL_CREV ]]; then + rev_opt= + for rev in $ALL_CREV; do + rev_opt="$rev_opt --rev $rev" + done + elif [[ -n $FIRST_CREV ]]; then + rev_opt="--rev $FIRST_CREV" + fi + + if [[ -n $rev_opt ]]; then + (cd $CWS;hg export -g $rev_opt -o $CHANGESETPATH) + # echo "Created new-patch: $CHANGESETPATH" 1>&2 + # Use it in place of the jdk.patch created above + rm -f $WDIR/$WNAME.patch + fi + set +x + fi +fi + frame_nav_js > $WDIR/ancnav.js frame_navigation > $WDIR/ancnav.html @@ -2989,9 +3028,13 @@ printCI $TOTL $TINS $TDEL $TMOD $TUNC print "" if [[ -f $WDIR/$WNAME.patch ]]; then - print "Patch of changes:" - print "$WNAME.patch" + print "Patch of changes:" + print "$WNAME.patch" +elif [[ -f $CHANGESETPATH ]]; then + print "Changeset:" + print "$EXPORTCHANGESET" fi + if [[ -f $WDIR/$WNAME.pdf ]]; then print "Printable review:" print "$WNAME.pdf" From af36b14fdb3ce673609dbdde04153cdf22813e4c Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 26 Mar 2013 17:17:14 -0700 Subject: [PATCH 037/151] 7041251: Use j.u.Objects utility methods in langtools Reviewed-by: jjg --- .../share/classes/com/sun/tools/javac/util/Pair.java | 12 +++++------- .../annotation/processing/AbstractProcessor.java | 6 +++--- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java index 2f5d266df8f..b538ee33109 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package com.sun.tools.javac.util; +import java.util.Objects; + /** A generic class for pairs. * *

This is NOT part of any supported API. @@ -46,15 +48,11 @@ public class Pair { return "Pair[" + fst + "," + snd + "]"; } - private static boolean equals(Object x, Object y) { - return (x == null && y == null) || (x != null && x.equals(y)); - } - public boolean equals(Object other) { return other instanceof Pair && - equals(fst, ((Pair)other).fst) && - equals(snd, ((Pair)other).snd); + Objects.equals(fst, ((Pair)other).fst) && + Objects.equals(snd, ((Pair)other).snd); } public int hashCode() { diff --git a/langtools/src/share/classes/javax/annotation/processing/AbstractProcessor.java b/langtools/src/share/classes/javax/annotation/processing/AbstractProcessor.java index db7053a9936..eea03b8c526 100644 --- a/langtools/src/share/classes/javax/annotation/processing/AbstractProcessor.java +++ b/langtools/src/share/classes/javax/annotation/processing/AbstractProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package javax.annotation.processing; import java.util.Set; import java.util.HashSet; import java.util.Collections; +import java.util.Objects; import javax.lang.model.element.*; import javax.lang.model.SourceVersion; import javax.tools.Diagnostic; @@ -146,8 +147,7 @@ public abstract class AbstractProcessor implements Processor { public synchronized void init(ProcessingEnvironment processingEnv) { if (initialized) throw new IllegalStateException("Cannot call init more than once."); - if (processingEnv == null) - throw new NullPointerException("Tool provided null ProcessingEnvironment"); + Objects.requireNonNull(processingEnv, "Tool provided null ProcessingEnvironment"); this.processingEnv = processingEnv; initialized = true; From 4d162632508fea4ed3cd4f16c83b5ba73c603d81 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 26 Mar 2013 18:15:24 -0700 Subject: [PATCH 038/151] 7059170: Assume availablility of URLClassLoader.close Reviewed-by: jjg --- .../sun/tools/javac/util/BaseFileManager.java | 20 +--- .../javac/util/CloseableURLClassLoader.java | 108 ------------------ 2 files changed, 3 insertions(+), 125 deletions(-) delete mode 100644 langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/BaseFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/util/BaseFileManager.java index cd27b07d4a7..a1df37f2bba 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/util/BaseFileManager.java +++ b/langtools/src/share/classes/com/sun/tools/javac/util/BaseFileManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -112,9 +112,8 @@ public abstract class BaseFileManager { protected ClassLoader getClassLoader(URL[] urls) { ClassLoader thisClassLoader = getClass().getClassLoader(); - // Bug: 6558476 - // Ideally, ClassLoader should be Closeable, but before JDK7 it is not. - // On older versions, try the following, to get a closeable classloader. + // Allow the following to specify a closeable classloader + // other than URLClassLoader. // 1: Allow client to specify the class to use via hidden option if (classLoaderClass != null) { @@ -128,19 +127,6 @@ public abstract class BaseFileManager { // ignore errors loading user-provided class loader, fall through } } - - // 2: If URLClassLoader implements Closeable, use that. - if (Closeable.class.isAssignableFrom(URLClassLoader.class)) - return new URLClassLoader(urls, thisClassLoader); - - // 3: Try using private reflection-based CloseableURLClassLoader - try { - return new CloseableURLClassLoader(urls, thisClassLoader); - } catch (Throwable t) { - // ignore errors loading workaround class loader, fall through - } - - // 4: If all else fails, use plain old standard URLClassLoader return new URLClassLoader(urls, thisClassLoader); } diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java b/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java deleted file mode 100644 index 90720366e50..00000000000 --- a/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.tools.javac.util; - -import java.io.Closeable; -import java.io.IOException; -import java.lang.reflect.Field; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.ArrayList; -import java.util.jar.JarFile; - -/** - * A URLClassLoader that also implements Closeable. - * Reflection is used to access internal data structures in the URLClassLoader, - * since no public API exists for this purpose. Therefore this code is somewhat - * fragile. Caveat emptor. - * @throws Error if the internal data structures are not as expected. - * - *

This is NOT part of any supported API. - * 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 CloseableURLClassLoader - extends URLClassLoader implements Closeable { - public CloseableURLClassLoader(URL[] urls, ClassLoader parent) throws Error { - super(urls, parent); - try { - getLoaders(); //proactive check that URLClassLoader is as expected - } catch (Throwable t) { - throw new Error("cannot create CloseableURLClassLoader", t); - } - } - - /** - * Close any jar files that may have been opened by the class loader. - * Reflection is used to access the jar files in the URLClassLoader's - * internal data structures. - * @throws java.io.IOException if the jar files cannot be found for any - * reson, or if closing the jar file itself causes an IOException. - */ - @Override - public void close() throws IOException { - try { - for (Object l: getLoaders()) { - if (l.getClass().getName().equals("sun.misc.URLClassPath$JarLoader")) { - Field jarField = l.getClass().getDeclaredField("jar"); - JarFile jar = (JarFile) getField(l, jarField); - if (jar != null) { - //System.err.println("CloseableURLClassLoader: closing " + jar); - jar.close(); - } - } - } - } catch (Throwable t) { - IOException e = new IOException("cannot close class loader"); - e.initCause(t); - throw e; - } - } - - private ArrayList getLoaders() - throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException - { - Field ucpField = URLClassLoader.class.getDeclaredField("ucp"); - Object urlClassPath = getField(this, ucpField); - if (urlClassPath == null) - throw new AssertionError("urlClassPath not set in URLClassLoader"); - Field loadersField = urlClassPath.getClass().getDeclaredField("loaders"); - return (ArrayList) getField(urlClassPath, loadersField); - } - - private Object getField(Object o, Field f) - throws IllegalArgumentException, IllegalAccessException { - boolean prev = f.isAccessible(); - try { - f.setAccessible(true); - return f.get(o); - } finally { - f.setAccessible(prev); - } - } - -} From b67623d2723048264a820ff56c6e7e8ad783b8cc Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 28 Mar 2013 11:38:38 +0000 Subject: [PATCH 039/151] 8010469: Bad assertion in LambdaToMethod Add assertion in LambdaToMethod.serializedLambdaName Reviewed-by: jjg --- .../share/classes/com/sun/tools/javac/comp/LambdaToMethod.java | 1 + 1 file changed, 1 insertion(+) diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java b/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java index 6d37769fd39..63894099f30 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java @@ -1315,6 +1315,7 @@ public class LambdaToMethod extends TreeTranslator { // the generated lambda method will not have type yet, but the // enclosing method's name will have been generated with this same // method, so it will be unique and never be overloaded. + Assert.check(owner.type != null || directlyEnclosingLambda() != null); if (owner.type != null) { int methTypeHash = methodSig(owner.type).hashCode(); buf.append(Integer.toHexString(methTypeHash)); From 059c4839bc1cd7620409287c0562a575ca4d835f Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Thu, 28 Mar 2013 11:39:04 +0000 Subject: [PATCH 040/151] 8010490: FindBugs: double assignments in LambdaToMethod.visitIdent Remove dead code from LambdaToMethod Reviewed-by: jjg --- .../com/sun/tools/javac/comp/LambdaToMethod.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java b/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java index 63894099f30..0413254ff4b 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java @@ -384,18 +384,6 @@ public class LambdaToMethod extends TreeTranslator { Symbol translatedSym = lambdaContext.getSymbolMap(CAPTURED_VAR).get(tree.sym); result = make.Ident(translatedSym).setType(tree.type); } else { - if (tree.sym.owner.kind == Kinds.TYP) { - for (Map.Entry encl_entry : lambdaContext.getSymbolMap(CAPTURED_THIS).entrySet()) { - if (tree.sym.isMemberOf((ClassSymbol) encl_entry.getKey(), types)) { - JCExpression enclRef = make.Ident(encl_entry.getValue()); - result = tree.sym.name == names._this - ? enclRef.setType(tree.type) - : make.Select(enclRef, tree.sym).setType(tree.type); - result = tree; - return; - } - } - } //access to untranslated symbols (i.e. compile-time constants, //members defined inside the lambda body, etc.) ) super.visitIdent(tree); From bf6e4f1ec77e8ae4251f63bf5b4cf4b8ef5dc175 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 28 Mar 2013 20:48:25 +0530 Subject: [PATCH 041/151] 8010924: Dealing with undefined property gets you a fatal stack Reviewed-by: lagergren, jlaskey --- .../runtime/resources/mozilla_compat.js | 11 ++- nashorn/test/script/basic/JDK-8010924.js | 67 +++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 nashorn/test/script/basic/JDK-8010924.js diff --git a/nashorn/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js b/nashorn/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js index 0b967d69a8d..206a193f7fa 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js +++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/mozilla_compat.js @@ -49,6 +49,7 @@ Object.defineProperty(this, "importPackage", { var global = this; var oldNoSuchProperty = global.__noSuchProperty__; global.__noSuchProperty__ = function(name) { + 'use strict'; for (var i in _packages) { try { var type = Java.type(_packages[i] + "." + name); @@ -57,7 +58,15 @@ Object.defineProperty(this, "importPackage", { } catch (e) {} } - return oldNoSuchProperty? oldNoSuchProperty(name) : undefined; + if (oldNoSuchProperty) { + return oldNoSuchProperty.call(this, name); + } else { + if (this === undefined) { + throw new ReferenceError(name + " is not defined"); + } else { + return undefined; + } + } } var prefix = "[JavaPackage "; diff --git a/nashorn/test/script/basic/JDK-8010924.js b/nashorn/test/script/basic/JDK-8010924.js new file mode 100644 index 00000000000..aaa7d1294f4 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8010924.js @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8010924: Dealing with undefined property gets you a fatal stack + * + * @test + * @run + * @option -scripting + */ + +load("nashorn:mozilla_compat.js"); + +if (this.non_existent_foo !== undefined) { + fail("this.non_existent_foo is defined!"); +} + +try { + non_existent_foo; + fail("should have thrown ReferenceError"); +} catch (e) { + if (! (e instanceof ReferenceError)) { + fail("ReferenceError expected, got " + e); + } +} + +// try the same via script engine + +var ScriptEngineManager = Java.type("javax.script.ScriptEngineManager"); +var engine = new ScriptEngineManager().getEngineByName("nashorn"); + +engine.eval("load('nashorn:mozilla_compat.js')"); + +if (! engine.eval("this.non_existent_foo === undefined")) { + fail("this.non_existent_foo is not undefined"); +} + +engine.eval(< Date: Thu, 28 Mar 2013 10:49:39 -0700 Subject: [PATCH 042/151] 8006346: doclint should make allowance for headers generated by standard doclet Reviewed-by: mcimadamore --- .../com/sun/tools/doclint/Checker.java | 5 ++- .../com/sun/tools/doclint/DocLint.java | 5 +++ .../classes/com/sun/tools/doclint/Env.java | 10 ++++- .../com/sun/tools/javac/main/Main.java | 4 +- .../classes/com/sun/tools/javadoc/DocEnv.java | 2 + .../javac/doclint/ImplicitHeadersTest.java | 35 +++++++++++++++ .../javadoc/doclint/ImplicitHeadersTest.java | 45 +++++++++++++++++++ 7 files changed, 102 insertions(+), 4 deletions(-) create mode 100644 langtools/test/tools/javac/doclint/ImplicitHeadersTest.java create mode 100644 langtools/test/tools/javadoc/doclint/ImplicitHeadersTest.java diff --git a/langtools/src/share/classes/com/sun/tools/doclint/Checker.java b/langtools/src/share/classes/com/sun/tools/doclint/Checker.java index 716845d1333..f1d9d35a964 100644 --- a/langtools/src/share/classes/com/sun/tools/doclint/Checker.java +++ b/langtools/src/share/classes/com/sun/tools/doclint/Checker.java @@ -122,12 +122,15 @@ public class Checker extends DocTreeScanner { private Deque tagStack; // TODO: maybe want to record starting tree as well private HtmlTag currHeaderTag; + private final int implicitHeaderLevel; + // Checker(Env env) { env.getClass(); this.env = env; tagStack = new LinkedList(); + implicitHeaderLevel = env.implicitHeaderLevel; } public Void scan(DocCommentTree tree, TreePath p) { @@ -386,7 +389,7 @@ public class Checker extends DocTreeScanner { private int getHeaderLevel(HtmlTag tag) { if (tag == null) - return 0; + return implicitHeaderLevel; switch (tag) { case H1: return 1; case H2: return 2; diff --git a/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java b/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java index a19f6beb541..8b4e7404ddc 100644 --- a/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java +++ b/langtools/src/share/classes/com/sun/tools/doclint/DocLint.java @@ -30,6 +30,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; +import java.util.regex.Pattern; import javax.lang.model.element.Name; import javax.tools.StandardLocation; @@ -72,6 +73,7 @@ public class DocLint implements Plugin { public static final String XMSGS_OPTION = "-Xmsgs"; public static final String XMSGS_CUSTOM_PREFIX = "-Xmsgs:"; private static final String STATS = "-stats"; + public static final String XIMPLICIT_HEADERS = "-XimplicitHeaders:"; // public static void main(String... args) { @@ -289,6 +291,9 @@ public class DocLint implements Plugin { env.messages.setOptions(null); } else if (arg.startsWith(XMSGS_CUSTOM_PREFIX)) { env.messages.setOptions(arg.substring(arg.indexOf(":") + 1)); + } else if (arg.matches(XIMPLICIT_HEADERS + "[1-6]")) { + char ch = arg.charAt(arg.length() - 1); + env.setImplicitHeaders(Character.digit(ch, 10)); } else throw new IllegalArgumentException(arg); } diff --git a/langtools/src/share/classes/com/sun/tools/doclint/Env.java b/langtools/src/share/classes/com/sun/tools/doclint/Env.java index 12947f02b0e..979c01ab7ff 100644 --- a/langtools/src/share/classes/com/sun/tools/doclint/Env.java +++ b/langtools/src/share/classes/com/sun/tools/doclint/Env.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -83,6 +83,8 @@ public class Env { /** Message handler. */ final Messages messages; + int implicitHeaderLevel = 0; + // Utility classes DocTrees trees; Elements elements; @@ -102,7 +104,7 @@ public class Env { DocCommentTree currDocComment; /** * The access kind of the declaration containing the comment currently being analyzed. - * This is the minimum (most restrictive) access kind of the declaration iteself + * This is the minimum (most restrictive) access kind of the declaration itself * and that of its containers. For example, a public method in a private class is * noted as private. */ @@ -128,6 +130,10 @@ public class Env { java_lang_Void = elements.getTypeElement("java.lang.Void").asType(); } + void setImplicitHeaders(int n) { + implicitHeaderLevel = n; + } + /** Set the current declaration and its doc comment. */ void setCurrent(TreePath path, DocCommentTree comment) { currPath = path; diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java index a45d12dabc2..9c74095412a 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java +++ b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -497,6 +497,8 @@ public class Main { if (!(doclintOpts.size() == 1 && doclintOpts.iterator().next().equals(DocLint.XMSGS_CUSTOM_PREFIX + "none"))) { JavacTask t = BasicJavacTask.instance(context); + // standard doclet normally generates H1, H2 + doclintOpts.add(DocLint.XIMPLICIT_HEADERS + "2"); new DocLint().init(t, doclintOpts.toArray(new String[doclintOpts.size()])); comp.keepComments = true; } diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java index 11a2b7fbbfa..3a1c891984e 100644 --- a/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java +++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocEnv.java @@ -810,6 +810,8 @@ public class DocEnv { JavacTask t = BasicJavacTask.instance(context); doclint = new DocLint(); + // standard doclet normally generates H1, H2 + doclintOpts.add(DocLint.XIMPLICIT_HEADERS + "2"); doclint.init(t, doclintOpts.toArray(new String[doclintOpts.size()]), false); } diff --git a/langtools/test/tools/javac/doclint/ImplicitHeadersTest.java b/langtools/test/tools/javac/doclint/ImplicitHeadersTest.java new file mode 100644 index 00000000000..e80b88c6195 --- /dev/null +++ b/langtools/test/tools/javac/doclint/ImplicitHeadersTest.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8006346 + * @summary doclint should make allowance for headers generated by standard doclet + * @compile -Xdoclint:all/public ImplicitHeadersTest.java + */ + +/** + *

Header

+ */ +public class ImplicitHeadersTest { } + diff --git a/langtools/test/tools/javadoc/doclint/ImplicitHeadersTest.java b/langtools/test/tools/javadoc/doclint/ImplicitHeadersTest.java new file mode 100644 index 00000000000..d39816d7e66 --- /dev/null +++ b/langtools/test/tools/javadoc/doclint/ImplicitHeadersTest.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 8006346 + * @summary doclint should make allowance for headers generated by standard doclet + */ + +import java.io.File; + +/** + *

Header

+ */ +public class ImplicitHeadersTest { + public static void main(String... args) { + File testSrc = new File(System.getProperty("test.src")); + File testFile = new File(testSrc, ImplicitHeadersTest.class.getSimpleName() + ".java"); + String[] javadocArgs = { "-d", "out", testFile.getPath() }; + int rc = com.sun.tools.javadoc.Main.execute(javadocArgs); + if (rc != 0) + throw new Error("unexpected exit: rc=" + rc); + } +} + From 18f48ab46b5f7daf250b547cfa92cd7724445503 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Thu, 28 Mar 2013 10:58:45 -0700 Subject: [PATCH 043/151] 8010511: Tests are creating files in /tmp Reviewed-by: darcy --- langtools/test/tools/javac/T6558476.java | 7 +-- langtools/test/tools/javac/T6900149.java | 10 +++- .../test/tools/javac/diags/CheckExamples.java | 45 +++++++++++++++- .../test/tools/javac/diags/RunExamples.java | 52 ++++++++++--------- 4 files changed, 82 insertions(+), 32 deletions(-) diff --git a/langtools/test/tools/javac/T6558476.java b/langtools/test/tools/javac/T6558476.java index 8f6dd434976..ea034f07d9b 100644 --- a/langtools/test/tools/javac/T6558476.java +++ b/langtools/test/tools/javac/T6558476.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ /* * @test + * @bug 6558476 + * @summary com/sun/tools/javac/Main.compile don't release file handles on return * @run main/othervm -Xmx512m -Xms512m T6558476 */ @@ -70,8 +72,7 @@ public class T6558476 { public static void main(String[] args) throws IOException { File javaHomeDir = new File(System.getProperty("java.home")); - File tmpDir = new File(System.getProperty("java.io.tmpdir")); - File outputDir = new File(tmpDir, "outputDir" + new Random().nextInt(65536)); + File outputDir = new File("outputDir" + new Random().nextInt(65536)); outputDir.mkdir(); outputDir.deleteOnExit(); diff --git a/langtools/test/tools/javac/T6900149.java b/langtools/test/tools/javac/T6900149.java index 64dbe2a89fb..151b39eeea1 100644 --- a/langtools/test/tools/javac/T6900149.java +++ b/langtools/test/tools/javac/T6900149.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,7 +39,7 @@ public class T6900149 { JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); StandardJavaFileManager fm = compiler.getStandardFileManager(null, null, null); - File emptyFile = File.createTempFile("Empty", ".java"); + File emptyFile = createTempFile("Empty.java"); File[] files = new File[] { emptyFile, emptyFile }; CompilationTask task = compiler.getTask(null, fm, diag, null, null, fm.getJavaFileObjects(files)); @@ -47,4 +47,10 @@ public class T6900149 { throw new AssertionError("compilation failed"); } } + + private static File createTempFile(String path) throws IOException { + File f = new File(path); + try (FileWriter out = new FileWriter(f)) { } + return f; + } } diff --git a/langtools/test/tools/javac/diags/CheckExamples.java b/langtools/test/tools/javac/diags/CheckExamples.java index add2cc31f8d..60ddd3baa27 100644 --- a/langtools/test/tools/javac/diags/CheckExamples.java +++ b/langtools/test/tools/javac/diags/CheckExamples.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,8 @@ */ import java.io.*; +import java.nio.file.*; +import java.nio.file.attribute.BasicFileAttributes; import java.util.*; /** @@ -53,7 +55,27 @@ public class CheckExamples { * Standard entry point. */ public static void main(String... args) throws Exception { - new CheckExamples().run(); + boolean jtreg = (System.getProperty("test.src") != null); + Path tmpDir; + boolean deleteOnExit; + if (jtreg) { + // use standard jtreg scratch directory: the current directory + tmpDir = Paths.get(System.getProperty("user.dir")); + deleteOnExit = false; + } else { + tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), + CheckExamples.class.getName()); + deleteOnExit = true; + } + Example.setTempDir(tmpDir.toFile()); + + try { + new CheckExamples().run(); + } finally { + if (deleteOnExit) { + clean(tmpDir); + } + } } /** @@ -190,6 +212,25 @@ public class CheckExamples { int errors; + /** + * Clean the contents of a directory. + */ + static void clean(Path dir) throws IOException { + Files.walkFileTree(dir, new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + Files.delete(file); + return super.visitFile(file, attrs); + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + if (exc == null) Files.delete(dir); + return super.postVisitDirectory(dir, exc); + } + }); + } + static class Counts { static String[] prefixes = { "compiler.err.", diff --git a/langtools/test/tools/javac/diags/RunExamples.java b/langtools/test/tools/javac/diags/RunExamples.java index 287dd441d4e..788b46b7391 100644 --- a/langtools/test/tools/javac/diags/RunExamples.java +++ b/langtools/test/tools/javac/diags/RunExamples.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,8 @@ */ import java.io.*; -import java.text.SimpleDateFormat; +import java.nio.file.*; +import java.nio.file.attribute.BasicFileAttributes; import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -56,16 +57,18 @@ import java.util.regex.Pattern; public class RunExamples { public static void main(String... args) throws Exception { jtreg = (System.getProperty("test.src") != null); - File tmpDir; + Path tmpDir; + boolean deleteOnExit; if (jtreg) { // use standard jtreg scratch directory: the current directory - tmpDir = new File(System.getProperty("user.dir")); + tmpDir = Paths.get(System.getProperty("user.dir")); + deleteOnExit = false; } else { - tmpDir = new File(System.getProperty("java.io.tmpdir"), - RunExamples.class.getName() - + (new SimpleDateFormat("yyMMddHHmmss")).format(new Date())); + tmpDir = Files.createTempDirectory(Paths.get(System.getProperty("java.io.tmpdir")), + RunExamples.class.getName()); + deleteOnExit = true; } - Example.setTempDir(tmpDir); + Example.setTempDir(tmpDir.toFile()); RunExamples r = new RunExamples(); @@ -73,15 +76,8 @@ public class RunExamples { if (r.run(args)) return; } finally { - /* VERY IMPORTANT NOTE. In jtreg mode, tmpDir is set to the - * jtreg scratch directory, which is the current directory. - * In case someone is faking jtreg mode, make sure to only - * clean tmpDir when it is reasonable to do so. - */ - if (tmpDir.isDirectory() && - tmpDir.getName().startsWith(RunExamples.class.getName())) { - if (clean(tmpDir)) - tmpDir.delete(); + if (deleteOnExit) { + clean(tmpDir); } } @@ -203,14 +199,20 @@ public class RunExamples { /** * Clean the contents of a directory. */ - static boolean clean(File dir) { - boolean ok = true; - for (File f: dir.listFiles()) { - if (f.isDirectory()) - ok &= clean(f); - ok &= f.delete(); - } - return ok; + static void clean(Path dir) throws IOException { + Files.walkFileTree(dir, new SimpleFileVisitor() { + @Override + public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { + Files.delete(file); + return super.visitFile(file, attrs); + } + + @Override + public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException { + if (exc == null) Files.delete(dir); + return super.postVisitDirectory(dir, exc); + } + }); } static abstract class Runner { From fec16029ea766c0bb1704fd0d1abca02b2716554 Mon Sep 17 00:00:00 2001 From: Marcus Lagergren Date: Fri, 29 Mar 2013 08:55:05 +0100 Subject: [PATCH 044/151] 8010995: The bug ID 8010710 accidentally got two digits transposed in the checkin and unit test name Reviewed-by: hannesw, sundar --- nashorn/test/script/basic/{JDK-8017010.js => JDK-8010710.js} | 0 .../basic/{JDK-8017010.js.EXPECTED => JDK-8010710.js.EXPECTED} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename nashorn/test/script/basic/{JDK-8017010.js => JDK-8010710.js} (100%) rename nashorn/test/script/basic/{JDK-8017010.js.EXPECTED => JDK-8010710.js.EXPECTED} (100%) diff --git a/nashorn/test/script/basic/JDK-8017010.js b/nashorn/test/script/basic/JDK-8010710.js similarity index 100% rename from nashorn/test/script/basic/JDK-8017010.js rename to nashorn/test/script/basic/JDK-8010710.js diff --git a/nashorn/test/script/basic/JDK-8017010.js.EXPECTED b/nashorn/test/script/basic/JDK-8010710.js.EXPECTED similarity index 100% rename from nashorn/test/script/basic/JDK-8017010.js.EXPECTED rename to nashorn/test/script/basic/JDK-8010710.js.EXPECTED From db89cafb532c9a12ca9541acea52222c0287392c Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Fri, 29 Mar 2013 18:38:27 +0530 Subject: [PATCH 045/151] 8011063: With older ant, we get the error "The type doesn't support nested text data ("${run.te...jvmargs}")." Reviewed-by: hannesw, ksrini --- nashorn/make/build.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nashorn/make/build.xml b/nashorn/make/build.xml index 945ccaa27f1..0e9e4cce7f4 100644 --- a/nashorn/make/build.xml +++ b/nashorn/make/build.xml @@ -56,7 +56,7 @@ - ${run.test.jvmargs.main} ${run.test.cc.jvmargs} + From c435269587f4d71449dc5a609c8de87b1c7f85d8 Mon Sep 17 00:00:00 2001 From: Christian Tornqvist Date: Wed, 3 Apr 2013 21:41:33 +0200 Subject: [PATCH 046/151] 8009125: Add NMT tests for Virtual Memory operations Tests added for Reserve/Commit/Uncommit/Unreserve operations Reviewed-by: zgu, mgerdin --- hotspot/src/share/vm/prims/whitebox.cpp | 65 +++++----- ...AllocTestType.java => MallocTestType.java} | 25 ++-- .../runtime/NMT/ThreadedMallocTestType.java | 91 ++++++++++++++ .../NMT/ThreadedVirtualAllocTestType.java | 112 ++++++++++++++++++ .../runtime/NMT/VirtualAllocTestType.java | 88 ++++++++++++++ .../test/testlibrary/OutputAnalyzerTest.java | 74 +++++++++++- .../java/testlibrary/OutputAnalyzer.java | 105 +++++++++++++++- .../whitebox/sun/hotspot/WhiteBox.java | 8 +- 8 files changed, 518 insertions(+), 50 deletions(-) rename hotspot/test/runtime/NMT/{AllocTestType.java => MallocTestType.java} (81%) create mode 100644 hotspot/test/runtime/NMT/ThreadedMallocTestType.java create mode 100644 hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java create mode 100644 hotspot/test/runtime/NMT/VirtualAllocTestType.java diff --git a/hotspot/src/share/vm/prims/whitebox.cpp b/hotspot/src/share/vm/prims/whitebox.cpp index 9b3cd297f8a..e6b1e7013bc 100644 --- a/hotspot/src/share/vm/prims/whitebox.cpp +++ b/hotspot/src/share/vm/prims/whitebox.cpp @@ -118,45 +118,46 @@ WB_END #endif // INCLUDE_ALL_GCS #ifdef INCLUDE_NMT -// Keep track of the 3 allocations in NMTAllocTest so we can free them later -// on and verify that they're not visible anymore -static void* nmtMtTest1 = NULL, *nmtMtTest2 = NULL, *nmtMtTest3 = NULL; - // Alloc memory using the test memory type so that we can use that to see if // NMT picks it up correctly -WB_ENTRY(jboolean, WB_NMTAllocTest(JNIEnv* env)) - void *mem; +WB_ENTRY(jlong, WB_NMTMalloc(JNIEnv* env, jobject o, jlong size)) + jlong addr = 0; - if (!MemTracker::is_on() || MemTracker::shutdown_in_progress()) { - return false; + if (MemTracker::is_on() && !MemTracker::shutdown_in_progress()) { + addr = (jlong)(uintptr_t)os::malloc(size, mtTest); } - // Allocate 2 * 128k + 256k + 1024k and free the 1024k one to make sure we track - // everything correctly. Total should be 512k held alive. - nmtMtTest1 = os::malloc(128 * 1024, mtTest); - mem = os::malloc(1024 * 1024, mtTest); - nmtMtTest2 = os::malloc(256 * 1024, mtTest); - os::free(mem, mtTest); - nmtMtTest3 = os::malloc(128 * 1024, mtTest); - - return true; + return addr; WB_END // Free the memory allocated by NMTAllocTest -WB_ENTRY(jboolean, WB_NMTFreeTestMemory(JNIEnv* env)) +WB_ENTRY(void, WB_NMTFree(JNIEnv* env, jobject o, jlong mem)) + os::free((void*)(uintptr_t)mem, mtTest); +WB_END - if (nmtMtTest1 == NULL || nmtMtTest2 == NULL || nmtMtTest3 == NULL) { - return false; +WB_ENTRY(jlong, WB_NMTReserveMemory(JNIEnv* env, jobject o, jlong size)) + jlong addr = 0; + + if (MemTracker::is_on() && !MemTracker::shutdown_in_progress()) { + addr = (jlong)(uintptr_t)os::reserve_memory(size); + MemTracker::record_virtual_memory_type((address)addr, mtTest); } - os::free(nmtMtTest1, mtTest); - nmtMtTest1 = NULL; - os::free(nmtMtTest2, mtTest); - nmtMtTest2 = NULL; - os::free(nmtMtTest3, mtTest); - nmtMtTest3 = NULL; + return addr; +WB_END - return true; + +WB_ENTRY(void, WB_NMTCommitMemory(JNIEnv* env, jobject o, jlong addr, jlong size)) + os::commit_memory((char *)(uintptr_t)addr, size); + MemTracker::record_virtual_memory_type((address)(uintptr_t)addr, mtTest); +WB_END + +WB_ENTRY(void, WB_NMTUncommitMemory(JNIEnv* env, jobject o, jlong addr, jlong size)) + os::uncommit_memory((char *)(uintptr_t)addr, size); +WB_END + +WB_ENTRY(void, WB_NMTReleaseMemory(JNIEnv* env, jobject o, jlong addr, jlong size)) + os::release_memory((char *)(uintptr_t)addr, size); WB_END // Block until the current generation of NMT data to be merged, used to reliably test the NMT feature @@ -340,9 +341,13 @@ static JNINativeMethod methods[] = { {CC"g1RegionSize", CC"()I", (void*)&WB_G1RegionSize }, #endif // INCLUDE_ALL_GCS #ifdef INCLUDE_NMT - {CC"NMTAllocTest", CC"()Z", (void*)&WB_NMTAllocTest }, - {CC"NMTFreeTestMemory", CC"()Z", (void*)&WB_NMTFreeTestMemory }, - {CC"NMTWaitForDataMerge",CC"()Z", (void*)&WB_NMTWaitForDataMerge}, + {CC"NMTMalloc", CC"(J)J", (void*)&WB_NMTMalloc }, + {CC"NMTFree", CC"(J)V", (void*)&WB_NMTFree }, + {CC"NMTReserveMemory", CC"(J)J", (void*)&WB_NMTReserveMemory }, + {CC"NMTCommitMemory", CC"(JJ)V", (void*)&WB_NMTCommitMemory }, + {CC"NMTUncommitMemory", CC"(JJ)V", (void*)&WB_NMTUncommitMemory }, + {CC"NMTReleaseMemory", CC"(JJ)V", (void*)&WB_NMTReleaseMemory }, + {CC"NMTWaitForDataMerge", CC"()Z", (void*)&WB_NMTWaitForDataMerge}, #endif // INCLUDE_NMT {CC"deoptimizeAll", CC"()V", (void*)&WB_DeoptimizeAll }, {CC"deoptimizeMethod", CC"(Ljava/lang/reflect/Method;)I", diff --git a/hotspot/test/runtime/NMT/AllocTestType.java b/hotspot/test/runtime/NMT/MallocTestType.java similarity index 81% rename from hotspot/test/runtime/NMT/AllocTestType.java rename to hotspot/test/runtime/NMT/MallocTestType.java index d4b70ecd8e9..8a39af790e4 100644 --- a/hotspot/test/runtime/NMT/AllocTestType.java +++ b/hotspot/test/runtime/NMT/MallocTestType.java @@ -26,30 +26,33 @@ * @summary Test consistency of NMT by leaking a few select allocations of the Test type and then verify visibility with jcmd * @key nmt jcmd * @library /testlibrary /testlibrary/whitebox - * @build AllocTestType + * @build MallocTestType * @run main ClassFileInstaller sun.hotspot.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail AllocTestType + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocTestType */ import com.oracle.java.testlibrary.*; import sun.hotspot.WhiteBox; -public class AllocTestType { +public class MallocTestType { public static void main(String args[]) throws Exception { OutputAnalyzer output; + WhiteBox wb = WhiteBox.getWhiteBox(); // Grab my own PID String pid = Integer.toString(ProcessTools.getProcessId()); ProcessBuilder pb = new ProcessBuilder(); - // Use WB API to alloc with the mtTest type - if (!WhiteBox.getWhiteBox().NMTAllocTest()) { - throw new Exception("Call to WB API NMTAllocTest() failed"); - } + // Use WB API to alloc and free with the mtTest type + long memAlloc3 = wb.NMTMalloc(128 * 1024); + long memAlloc2 = wb.NMTMalloc(256 * 1024); + wb.NMTFree(memAlloc3); + long memAlloc1 = wb.NMTMalloc(512 * 1024); + wb.NMTFree(memAlloc2); // Use WB API to ensure that all data has been merged before we continue - if (!WhiteBox.getWhiteBox().NMTWaitForDataMerge()) { + if (!wb.NMTWaitForDataMerge()) { throw new Exception("Call to WB API NMTWaitForDataMerge() failed"); } @@ -59,12 +62,10 @@ public class AllocTestType { output.shouldContain("Test (reserved=512KB, committed=512KB)"); // Free the memory allocated by NMTAllocTest - if (!WhiteBox.getWhiteBox().NMTFreeTestMemory()) { - throw new Exception("Call to WB API NMTFreeTestMemory() failed"); - } + wb.NMTFree(memAlloc1); // Use WB API to ensure that all data has been merged before we continue - if (!WhiteBox.getWhiteBox().NMTWaitForDataMerge()) { + if (!wb.NMTWaitForDataMerge()) { throw new Exception("Call to WB API NMTWaitForDataMerge() failed"); } output = new OutputAnalyzer(pb.start()); diff --git a/hotspot/test/runtime/NMT/ThreadedMallocTestType.java b/hotspot/test/runtime/NMT/ThreadedMallocTestType.java new file mode 100644 index 00000000000..eadb719d50d --- /dev/null +++ b/hotspot/test/runtime/NMT/ThreadedMallocTestType.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @key nmt jcmd + * @library /testlibrary /testlibrary/whitebox + * @build ThreadedMallocTestType + * @run main ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ThreadedMallocTestType + */ + +import com.oracle.java.testlibrary.*; +import sun.hotspot.WhiteBox; + +public class ThreadedMallocTestType { + public static long memAlloc1; + public static long memAlloc2; + public static long memAlloc3; + + public static void main(String args[]) throws Exception { + OutputAnalyzer output; + final WhiteBox wb = WhiteBox.getWhiteBox(); + + // Grab my own PID + String pid = Integer.toString(ProcessTools.getProcessId()); + ProcessBuilder pb = new ProcessBuilder(); + + Thread allocThread = new Thread() { + public void run() { + // Alloc memory using the WB api + memAlloc1 = wb.NMTMalloc(128 * 1024); + memAlloc2 = wb.NMTMalloc(256 * 1024); + memAlloc3 = wb.NMTMalloc(512 * 1024); + } + }; + + allocThread.start(); + allocThread.join(); + + // Use WB API to ensure that all data has been merged before we continue + if (!wb.NMTWaitForDataMerge()) { + throw new Exception("Call to WB API NMTWaitForDataMerge() failed"); + } + + // Run 'jcmd VM.native_memory summary' + pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "summary"}); + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=896KB, committed=896KB)"); + + Thread freeThread = new Thread() { + public void run() { + // Free the memory allocated by NMTMalloc + wb.NMTFree(memAlloc1); + wb.NMTFree(memAlloc2); + wb.NMTFree(memAlloc3); + } + }; + + freeThread.start(); + freeThread.join(); + + // Use WB API to ensure that all data has been merged before we continue + if (!wb.NMTWaitForDataMerge()) { + throw new Exception("Call to WB API NMTWaitForDataMerge() failed"); + } + + output = new OutputAnalyzer(pb.start()); + output.shouldNotContain("Test (reserved="); + } +} diff --git a/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java b/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java new file mode 100644 index 00000000000..3055814e9da --- /dev/null +++ b/hotspot/test/runtime/NMT/ThreadedVirtualAllocTestType.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @key nmt jcmd + * @library /testlibrary /testlibrary/whitebox + * @build ThreadedVirtualAllocTestType + * @run main ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail ThreadedVirtualAllocTestType + */ + +import com.oracle.java.testlibrary.*; +import sun.hotspot.WhiteBox; + +public class ThreadedVirtualAllocTestType { + public static long addr; + public static final WhiteBox wb = WhiteBox.getWhiteBox(); + public static final long commitSize = 128 * 1024; + public static final long reserveSize = 512 * 1024; + + public static void main(String args[]) throws Exception { + OutputAnalyzer output; + + String pid = Integer.toString(ProcessTools.getProcessId()); + ProcessBuilder pb = new ProcessBuilder(); + + Thread reserveThread = new Thread() { + public void run() { + addr = wb.NMTReserveMemory(reserveSize); + } + }; + reserveThread.start(); + reserveThread.join(); + + mergeData(); + + pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "detail"}); + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=512KB, committed=0KB)"); + output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 512KB for Test"); + + Thread commitThread = new Thread() { + public void run() { + wb.NMTCommitMemory(addr, commitSize); + } + }; + commitThread.start(); + commitThread.join(); + + mergeData(); + + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=512KB, committed=128KB)"); + output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB"); + + Thread uncommitThread = new Thread() { + public void run() { + wb.NMTUncommitMemory(addr, commitSize); + } + }; + uncommitThread.start(); + uncommitThread.join(); + + mergeData(); + + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=512KB, committed=0KB)"); + output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed"); + + Thread releaseThread = new Thread() { + public void run() { + wb.NMTReleaseMemory(addr, reserveSize); + } + }; + releaseThread.start(); + releaseThread.join(); + + mergeData(); + + output = new OutputAnalyzer(pb.start()); + output.shouldNotContain("Test (reserved="); + output.shouldNotContain("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved"); + } + + public static void mergeData() throws Exception { + // Use WB API to ensure that all data has been merged before we continue + if (!wb.NMTWaitForDataMerge()) { + throw new Exception("Call to WB API NMTWaitForDataMerge() failed"); + } + } +} diff --git a/hotspot/test/runtime/NMT/VirtualAllocTestType.java b/hotspot/test/runtime/NMT/VirtualAllocTestType.java new file mode 100644 index 00000000000..fa9e8240861 --- /dev/null +++ b/hotspot/test/runtime/NMT/VirtualAllocTestType.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @summary Test Reserve/Commit/Uncommit/Release of virtual memory and that we track it correctly + * @key nmt jcmd + * @library /testlibrary /testlibrary/whitebox + * @build VirtualAllocTestType + * @run main ClassFileInstaller sun.hotspot.WhiteBox + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail VirtualAllocTestType + */ + +import com.oracle.java.testlibrary.*; +import sun.hotspot.WhiteBox; + +public class VirtualAllocTestType { + + public static WhiteBox wb = WhiteBox.getWhiteBox(); + public static void main(String args[]) throws Exception { + OutputAnalyzer output; + long commitSize = 128 * 1024; + long reserveSize = 256 * 1024; + long addr; + + String pid = Integer.toString(ProcessTools.getProcessId()); + ProcessBuilder pb = new ProcessBuilder(); + + addr = wb.NMTReserveMemory(reserveSize); + mergeData(); + + pb.command(new String[] { JDKToolFinder.getJDKTool("jcmd"), pid, "VM.native_memory", "detail"}); + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=256KB, committed=0KB)"); + output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved 256KB for Test"); + + wb.NMTCommitMemory(addr, commitSize); + + mergeData(); + + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=256KB, committed=128KB)"); + output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed 128KB"); + + wb.NMTUncommitMemory(addr, commitSize); + + mergeData(); + + output = new OutputAnalyzer(pb.start()); + output.shouldContain("Test (reserved=256KB, committed=0KB)"); + output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + commitSize) + "\\] committed"); + + wb.NMTReleaseMemory(addr, reserveSize); + + mergeData(); + + output = new OutputAnalyzer(pb.start()); + output.shouldNotContain("Test (reserved="); + output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*" + Long.toHexString(addr + reserveSize) + "\\] reserved"); + } + + public static void mergeData() throws Exception { + // Use WB API to ensure that all data has been merged before we continue + if (!wb.NMTWaitForDataMerge()) { + throw new Exception("Call to WB API NMTWaitForDataMerge() failed"); + } + } +} diff --git a/hotspot/test/testlibrary/OutputAnalyzerTest.java b/hotspot/test/testlibrary/OutputAnalyzerTest.java index cc48fd3ff43..6117e9000bd 100644 --- a/hotspot/test/testlibrary/OutputAnalyzerTest.java +++ b/hotspot/test/testlibrary/OutputAnalyzerTest.java @@ -36,6 +36,11 @@ public class OutputAnalyzerTest { String stdout = "aaaaaa"; String stderr = "bbbbbb"; + // Regexps used for testing pattern matching of the test input + String stdoutPattern = "[a]"; + String stderrPattern = "[b]"; + String nonExistingPattern = "[c]"; + OutputAnalyzer output = new OutputAnalyzer(stdout, stderr); if (!stdout.equals(output.getStdout())) { @@ -99,10 +104,73 @@ public class OutputAnalyzerTest { } try { - output.stderrShouldNotContain(stderr); - throw new Exception("shouldContain() failed to throw exception"); + output.stderrShouldNotContain(stderr); + throw new Exception("shouldContain() failed to throw exception"); } catch (RuntimeException e) { - // expected + // expected + } + + // Should match + try { + output.shouldMatch(stdoutPattern); + output.stdoutShouldMatch(stdoutPattern); + output.shouldMatch(stderrPattern); + output.stderrShouldMatch(stderrPattern); + } catch (RuntimeException e) { + throw new Exception("shouldMatch() failed", e); + } + + try { + output.shouldMatch(nonExistingPattern); + throw new Exception("shouldMatch() failed to throw exception"); + } catch (RuntimeException e) { + // expected + } + + try { + output.stdoutShouldMatch(stderrPattern); + throw new Exception( + "stdoutShouldMatch() failed to throw exception"); + } catch (RuntimeException e) { + // expected + } + + try { + output.stderrShouldMatch(stdoutPattern); + throw new Exception( + "stderrShouldMatch() failed to throw exception"); + } catch (RuntimeException e) { + // expected + } + + // Should not match + try { + output.shouldNotMatch(nonExistingPattern); + output.stdoutShouldNotMatch(nonExistingPattern); + output.stderrShouldNotMatch(nonExistingPattern); + } catch (RuntimeException e) { + throw new Exception("shouldNotMatch() failed", e); + } + + try { + output.shouldNotMatch(stdoutPattern); + throw new Exception("shouldNotMatch() failed to throw exception"); + } catch (RuntimeException e) { + // expected + } + + try { + output.stdoutShouldNotMatch(stdoutPattern); + throw new Exception("shouldNotMatch() failed to throw exception"); + } catch (RuntimeException e) { + // expected + } + + try { + output.stderrShouldNotMatch(stderrPattern); + throw new Exception("shouldNotMatch() failed to throw exception"); + } catch (RuntimeException e) { + // expected } } } diff --git a/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java b/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java index 469d0c24a70..ede667f8e58 100644 --- a/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java +++ b/hotspot/test/testlibrary/com/oracle/java/testlibrary/OutputAnalyzer.java @@ -24,6 +24,8 @@ package com.oracle.java.testlibrary; import java.io.IOException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public final class OutputAnalyzer { @@ -141,6 +143,103 @@ public final class OutputAnalyzer { } } + /** + * Verify that the stdout and stderr contents of output buffer matches + * the pattern + * + * @param pattern + * @throws RuntimeException If the pattern was not found + */ + public void shouldMatch(String pattern) { + Matcher stdoutMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); + Matcher stderrMatcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr); + if (!stdoutMatcher.find() && !stderrMatcher.find()) { + throw new RuntimeException("'" + pattern + + "' missing from stdout/stderr: [" + stdout + stderr + + "]\n"); + } + } + + /** + * Verify that the stdout contents of output buffer matches the + * pattern + * + * @param pattern + * @throws RuntimeException If the pattern was not found + */ + public void stdoutShouldMatch(String pattern) { + Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); + if (!matcher.find()) { + throw new RuntimeException("'" + pattern + + "' missing from stdout: [" + stdout + "]\n"); + } + } + + /** + * Verify that the stderr contents of output buffer matches the + * pattern + * + * @param pattern + * @throws RuntimeException If the pattern was not found + */ + public void stderrShouldMatch(String pattern) { + Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr); + if (!matcher.find()) { + throw new RuntimeException("'" + pattern + + "' missing from stderr: [" + stderr + "]\n"); + } + } + + /** + * Verify that the stdout and stderr contents of output buffer does not + * match the pattern + * + * @param pattern + * @throws RuntimeException If the pattern was found + */ + public void shouldNotMatch(String pattern) { + Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); + if (matcher.find()) { + throw new RuntimeException("'" + pattern + + "' found in stdout: [" + stdout + "]\n"); + } + matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr); + if (matcher.find()) { + throw new RuntimeException("'" + pattern + + "' found in stderr: [" + stderr + "]\n"); + } + } + + /** + * Verify that the stdout contents of output buffer does not match the + * pattern + * + * @param pattern + * @throws RuntimeException If the pattern was found + */ + public void stdoutShouldNotMatch(String pattern) { + Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stdout); + if (matcher.find()) { + throw new RuntimeException("'" + pattern + + "' found in stdout: [" + stdout + "]\n"); + } + } + + /** + * Verify that the stderr contents of output buffer does not match the + * pattern + * + * @param pattern + * @throws RuntimeException If the pattern was found + */ + public void stderrShouldNotMatch(String pattern) { + Matcher matcher = Pattern.compile(pattern, Pattern.MULTILINE).matcher(stderr); + if (matcher.find()) { + throw new RuntimeException("'" + pattern + + "' found in stderr: [" + stderr + "]\n"); + } + } + /** * Verifiy the exit value of the process * @@ -148,9 +247,9 @@ public final class OutputAnalyzer { * @throws RuntimeException If the exit value from the process did not match the expected value */ public void shouldHaveExitValue(int expectedExitValue) { - if (getExitValue() != expectedExitValue) { - throw new RuntimeException("Exit value " + getExitValue() + " , expected to get " + expectedExitValue); - } + if (getExitValue() != expectedExitValue) { + throw new RuntimeException("Exit value " + getExitValue() + " , expected to get " + expectedExitValue); + } } /** diff --git a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java index d5d3ab525c5..28c0747fc00 100644 --- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java +++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java @@ -80,8 +80,12 @@ public class WhiteBox { public native Object[] parseCommandLine(String commandline, DiagnosticCommand[] args); // NMT - public native boolean NMTAllocTest(); - public native boolean NMTFreeTestMemory(); + public native long NMTMalloc(long size); + public native void NMTFree(long mem); + public native long NMTReserveMemory(long size); + public native void NMTCommitMemory(long addr, long size); + public native void NMTUncommitMemory(long addr, long size); + public native void NMTReleaseMemory(long addr, long size); public native boolean NMTWaitForDataMerge(); // Compiler From e1383d49316fd182c16b8000591b3807bb62233a Mon Sep 17 00:00:00 2001 From: Harold Seigel Date: Thu, 4 Apr 2013 08:47:39 -0400 Subject: [PATCH 047/151] 8010943: guarantee(length == 0) failed: invalid method ordering length Add DumpSharedSpaces to IF condition to handle verify during -Xshare:dump. Reviewed-by: coleenp, zgu --- hotspot/src/share/vm/oops/instanceKlass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp index e296c501ccb..0712ccda240 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp @@ -3168,7 +3168,7 @@ void InstanceKlass::verify_on(outputStream* st) { Array* method_ordering = this->method_ordering(); int length = method_ordering->length(); if (JvmtiExport::can_maintain_original_method_order() || - (UseSharedSpaces && length != 0)) { + ((UseSharedSpaces || DumpSharedSpaces) && length != 0)) { guarantee(length == methods()->length(), "invalid method ordering length"); jlong sum = 0; for (int j = 0; j < length; j++) { From 5f93d0e84ca8c97513b8a0c90575291af508abe8 Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Fri, 29 Mar 2013 14:18:40 -0700 Subject: [PATCH 048/151] 8006006: [parfait] Memory leak at hotspot/src/share/tools/launcher/wildcard.c A simple fix to add FileList_free(fl) before returning NULL. Reviewed-by: zgu, coleenp, minqi --- hotspot/src/share/tools/launcher/wildcard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hotspot/src/share/tools/launcher/wildcard.c b/hotspot/src/share/tools/launcher/wildcard.c index 26a66566cdb..8b3cbcd69c4 100644 --- a/hotspot/src/share/tools/launcher/wildcard.c +++ b/hotspot/src/share/tools/launcher/wildcard.c @@ -368,8 +368,10 @@ wildcardFileList(const char *wildcard) const char *basename; FileList fl = FileList_new(16); WildcardIterator it = WildcardIterator_for(wildcard); - if (it == NULL) + if (it == NULL) { + FileList_free(fl); return NULL; + } while ((basename = WildcardIterator_next(it)) != NULL) if (isJarFileName(basename)) FileList_add(fl, wildcardConcat(wildcard, basename)); From 1cfc0cae65f18857eca0c146896a05afb04db388 Mon Sep 17 00:00:00 2001 From: James Laskey Date: Sun, 31 Mar 2013 08:19:11 -0300 Subject: [PATCH 049/151] 8011095: PropertyHashMap.rehash() does not grow enough Reviewed-by: hannesw, lagergren --- .../internal/runtime/PropertyHashMap.java | 28 ++++++------------- .../nashorn/internal/runtime/PropertyMap.java | 20 +++++++------ 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java b/nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java index 9759caa2c86..6e41fd56827 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyHashMap.java @@ -104,10 +104,10 @@ import java.util.Set; */ public final class PropertyHashMap implements Map { /** Number of initial bins. Power of 2. */ - private static final int INITIAL_BINS = 16; + private static final int INITIAL_BINS = 32; /** Threshold before using bins. */ - private static final int LIST_THRESHOLD = 4; + private static final int LIST_THRESHOLD = 8; /** Initial map. */ public static final PropertyHashMap EMPTY_MAP = new PropertyHashMap(); @@ -300,8 +300,8 @@ public final class PropertyHashMap implements Map { * @return Number of bins required. */ private static int binsNeeded(final int n) { - // Allow for 25% padding. - return 1 << (32 - Integer.numberOfLeadingZeros((n + oneQuarter(n)) | (INITIAL_BINS - 1))); + // 50% padding + return 1 << (32 - Integer.numberOfLeadingZeros((n + (n >>> 1)) | (INITIAL_BINS - 1))); } /** @@ -315,28 +315,16 @@ public final class PropertyHashMap implements Map { return (n >>> 1) + (n >>> 2); } - /** - * Used to calculate the current capacity of the bins. - * - * @param n Number of bin slots. - * - * @return 25% of n. - */ - private static int oneQuarter(final int n) { - return n >>> 2; - } - /** * Regenerate the bin table after changing the number of bins. * * @param list // List of all properties. - * @param newSize // New size of {@link PropertyHashMap}. + * @param binSize // New size of bins. * * @return Populated bins. */ - private static Element[] rehash(final Element list, final int newSize) { - final int binsNeeded = binsNeeded(newSize); - final Element[] newBins = new Element[binsNeeded]; + private static Element[] rehash(final Element list, final int binSize) { + final Element[] newBins = new Element[binSize]; for (Element element = list; element != null; element = element.getLink()) { final Property property = element.getProperty(); final String key = property.getKey(); @@ -390,7 +378,7 @@ public final class PropertyHashMap implements Map { if (bins == null && newSize <= LIST_THRESHOLD) { newBins = null; } else if (newSize > threshold) { - newBins = rehash(list, newSize); + newBins = rehash(list, binsNeeded(newSize)); } else { newBins = bins.clone(); } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java index 19c12b7a277..fc8ddd70140 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java @@ -526,11 +526,13 @@ public final class PropertyMap implements Iterable, PropertyListener { * @param newMap {@link PropertyMap} associated with prototype. */ private void addToProtoHistory(final ScriptObject newProto, final PropertyMap newMap) { - if (protoHistory == null) { - protoHistory = new WeakHashMap<>(); - } + if (!properties.isEmpty()) { + if (protoHistory == null) { + protoHistory = new WeakHashMap<>(); + } - protoHistory.put(newProto, new WeakReference<>(newMap)); + protoHistory.put(newProto, new WeakReference<>(newMap)); + } } /** @@ -540,11 +542,13 @@ public final class PropertyMap implements Iterable, PropertyListener { * @param newMap Modified {@link PropertyMap}. */ private void addToHistory(final Property property, final PropertyMap newMap) { - if (history == null) { - history = new LinkedHashMap<>(); - } + if (!properties.isEmpty()) { + if (history == null) { + history = new LinkedHashMap<>(); + } - history.put(property, newMap); + history.put(property, newMap); + } } /** From 01ab1da0581f8fa4ead09e4a1c0bcf2600509dc9 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Mon, 1 Apr 2013 21:11:51 -0700 Subject: [PATCH 050/151] 8011178: improve common/bin/hgforest.sh python detection (MacOS) Reviewed-by: ohair --- common/bin/hgforest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index 9f0db97d578..4c977532e47 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -51,7 +51,7 @@ if [ "#!" = "$has_hash_bang" ] ; then bpython="`basename "$python"`" fi -if [ "python" = "$bpython" -a -x "$python" ] ; then +if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then hg="${python} -u ${whichhg}" else echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout. From a19d0728baaa84452d7ab93622892141e847b0fa Mon Sep 17 00:00:00 2001 From: Vicente Romero Date: Tue, 2 Apr 2013 10:51:16 +0100 Subject: [PATCH 051/151] 4965689: class literal code wastes a byte Reviewed-by: jjg --- .../classes/com/sun/tools/javac/jvm/Code.java | 11 ++++ .../classes/com/sun/tools/javac/jvm/Gen.java | 2 +- .../com/sun/tools/javac/jvm/Items.java | 6 +- .../T4965689/ClassLiteralWastesByteTest.java | 66 +++++++++++++++++++ 4 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 langtools/test/tools/javac/T4965689/ClassLiteralWastesByteTest.java diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java index f5f37ef0435..ff4c6877ec0 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java +++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java @@ -373,6 +373,17 @@ public class Code { Assert.check(alive || state.stacksize == 0); } + /** Emit a ldc (or ldc_w) instruction, taking into account operand size + */ + public void emitLdc(int od) { + if (od <= 255) { + emitop1(ldc1, od); + } + else { + emitop2(ldc2, od); + } + } + /** Emit a multinewarray instruction. */ public void emitMultianewarray(int ndims, int type, Type arrayType) { diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java index 56bcb59bf80..2a092fe5796 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java +++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java @@ -2227,7 +2227,7 @@ public class Gen extends JCTree.Visitor { if (tree.name == names._class) { Assert.check(target.hasClassLiterals()); - code.emitop2(ldc2, makeRef(tree.pos(), tree.selected.type)); + code.emitLdc(makeRef(tree.pos(), tree.selected.type)); result = items.makeStackItem(pt); return; } diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java index d692c899f79..054facddaa6 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java +++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -571,10 +571,8 @@ public class Items { int idx = pool.put(value); if (typecode == LONGcode || typecode == DOUBLEcode) { code.emitop2(ldc2w, idx); - } else if (idx <= 255) { - code.emitop1(ldc1, idx); } else { - code.emitop2(ldc2, idx); + code.emitLdc(idx); } } diff --git a/langtools/test/tools/javac/T4965689/ClassLiteralWastesByteTest.java b/langtools/test/tools/javac/T4965689/ClassLiteralWastesByteTest.java new file mode 100644 index 00000000000..6e731928b36 --- /dev/null +++ b/langtools/test/tools/javac/T4965689/ClassLiteralWastesByteTest.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test + * @bug 4965689 + * @summary class literal code wastes a byte + */ + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.nio.file.Paths; + +public class ClassLiteralWastesByteTest { + + private static final String assertionErrorMsg = + "Instead of ldc_w, ldc instruction should have been generated"; + + public static void main(String[] args) { + new ClassLiteralWastesByteTest().run(); + } + + void run() { + check("-c", Paths.get(System.getProperty("test.classes"), + "test.class").toString()); + } + + void check(String... params) { + StringWriter s; + String out; + try (PrintWriter pw = new PrintWriter(s = new StringWriter())) { + com.sun.tools.javap.Main.run(params, pw); + out = s.toString(); + } + if (out.contains("ldc_w")) { + throw new AssertionError(assertionErrorMsg); + } + } + +} + +class test { + void m() { + Class aClass = test.class; + } +} From 10cd2de7ed00189c5b8377bef5fbb9a51c747488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Tue, 2 Apr 2013 13:55:49 +0200 Subject: [PATCH 052/151] 8011219: Regression with recent PropertyMap history changes Reviewed-by: jlaskey, lagergren --- .../nashorn/internal/runtime/PropertyMap.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java index fc8ddd70140..19c12b7a277 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java @@ -526,13 +526,11 @@ public final class PropertyMap implements Iterable, PropertyListener { * @param newMap {@link PropertyMap} associated with prototype. */ private void addToProtoHistory(final ScriptObject newProto, final PropertyMap newMap) { - if (!properties.isEmpty()) { - if (protoHistory == null) { - protoHistory = new WeakHashMap<>(); - } - - protoHistory.put(newProto, new WeakReference<>(newMap)); + if (protoHistory == null) { + protoHistory = new WeakHashMap<>(); } + + protoHistory.put(newProto, new WeakReference<>(newMap)); } /** @@ -542,13 +540,11 @@ public final class PropertyMap implements Iterable, PropertyListener { * @param newMap Modified {@link PropertyMap}. */ private void addToHistory(final Property property, final PropertyMap newMap) { - if (!properties.isEmpty()) { - if (history == null) { - history = new LinkedHashMap<>(); - } - - history.put(property, newMap); + if (history == null) { + history = new LinkedHashMap<>(); } + + history.put(property, newMap); } /** From da76d3b5ec15969703376f4746c920371ede0c13 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Tue, 2 Apr 2013 17:40:53 +0530 Subject: [PATCH 053/151] 8011209: Object.getOwnPropertyDescriptor(function(){"use strict"},"caller").get.length is not 0 Reviewed-by: lagergren, hannesw, jlaskey --- .../internal/objects/ScriptFunctionImpl.java | 7 +- nashorn/test/script/basic/JDK-8011209.js | 76 +++++++++++++++++++ 2 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011209.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java index 46b353f1421..86829d9f58c 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java +++ b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java @@ -125,10 +125,13 @@ public class ScriptFunctionImpl extends ScriptFunction { // function object representing TypeErrorThrower private static ScriptFunction typeErrorThrower; + /* + * ECMA section 13.2.3 The [[ThrowTypeError]] Function Object + */ static synchronized ScriptFunction getTypeErrorThrower() { if (typeErrorThrower == null) { - //name handle - final ScriptFunctionImpl func = new ScriptFunctionImpl("TypeErrorThrower", Lookup.TYPE_ERROR_THROWER_SETTER, null, null, false, false, false); + // use "getter" so that [[ThrowTypeError]] function's arity is 0 - as specified in step 10 of section 13.2.3 + final ScriptFunctionImpl func = new ScriptFunctionImpl("TypeErrorThrower", Lookup.TYPE_ERROR_THROWER_GETTER, null, null, false, false, false); func.setPrototype(UNDEFINED); typeErrorThrower = func; } diff --git a/nashorn/test/script/basic/JDK-8011209.js b/nashorn/test/script/basic/JDK-8011209.js new file mode 100644 index 00000000000..9098dfaa2a3 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011209.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011209: Object.getOwnPropertyDescriptor(function(){"use strict"},"caller").get.length is not 0 + * + * @test + * @run + */ + +var callerPropDesc = Object.getOwnPropertyDescriptor(function(){"use strict"},"caller"); + +var getterLen = callerPropDesc.get.length; +if (getterLen != 0) { + fail("caller's get.length != 0"); +} + +var setterLen = callerPropDesc.set.length; +if (setterLen != 0) { + fail("caller's set.length != 1"); +} + +var argumentsPropDesc = Object.getOwnPropertyDescriptor(function(){"use strict"},"arguments"); + +getterLen = argumentsPropDesc.get.length; +if (getterLen != 0) { + fail("arguments's get.length != 0"); +} + +setterLen = argumentsPropDesc.set.length; +if (setterLen != 0) { + fail("arguments's set.length != 1"); +} + +var strictArgs = (function() { 'use strict'; return arguments; })(); +callerPropDesc = Object.getOwnPropertyDescriptor(strictArgs,"caller"); +getterLen = callerPropDesc.get.length; +if (getterLen != 0) { + fail("argument.caller's get.length != 0"); +} + +setterLen = callerPropDesc.set.length; +if (setterLen != 0) { + fail("argument.caller's set.length != 1"); +} + +calleePropDesc = Object.getOwnPropertyDescriptor(strictArgs,"callee"); +getterLen = calleePropDesc.get.length; +if (getterLen != 0) { + fail("argument.callee's get.length != 0"); +} + +setterLen = calleePropDesc.set.length; +if (setterLen != 0) { + fail("argument.callee's set.length != 1"); +} From 53d40472c2a73ab78093221fadfaa0a48bf3d72b Mon Sep 17 00:00:00 2001 From: James Laskey Date: Tue, 2 Apr 2013 11:37:22 -0300 Subject: [PATCH 054/151] 8011233: Create a Nashorn shell for JavaFX Reviewed-by: lagergren, sundar --- nashorn/make/build.xml | 25 +++ nashorn/make/project.properties | 6 + .../fxshell/jdk/nashorn/tools/FXShell.java | 194 ++++++++++++++++++ 3 files changed, 225 insertions(+) create mode 100644 nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java diff --git a/nashorn/make/build.xml b/nashorn/make/build.xml index 0e9e4cce7f4..d884b2fe009 100644 --- a/nashorn/make/build.xml +++ b/nashorn/make/build.xml @@ -139,6 +139,31 @@ + + + Builds the javafx shell. + + + + + + + + + + +
+ + +
+
+
+
diff --git a/nashorn/make/project.properties b/nashorn/make/project.properties index 58da977dc4a..bd0d7ec6625 100644 --- a/nashorn/make/project.properties +++ b/nashorn/make/project.properties @@ -65,6 +65,12 @@ dist.dir=dist dist.jar=${dist.dir}/nashorn.jar dist.javadoc.dir=${dist.dir}/javadoc +# nashorn javafx shell +fxshell.tool = jdk.nashorn.tools.FXShell +fxshell.classes.dir = ${build.dir}/fxshell/classes +fxshell.dir = tools/fxshell +fxshell.jar = ${dist.dir}/nashornfx.jar + # jars refererred file.reference.testng.jar=test/lib/testng.jar diff --git a/nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java b/nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java new file mode 100644 index 00000000000..3af0dca6969 --- /dev/null +++ b/nashorn/tools/fxshell/jdk/nashorn/tools/FXShell.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.tools; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; +import javafx.application.Application; +import javafx.stage.Stage; +import javax.script.Invocable; +import javax.script.ScriptContext; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineFactory; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; +import jdk.nashorn.api.scripting.NashornScriptEngineFactory; + +/** + * This shell is designed to launch a JavaFX application written in Nashorn JavaScript. + */ +public class FXShell extends Application { + /** + * Script engine manager to search. + */ + private ScriptEngineManager manager; + /** + * Nashorn script engine factory. + */ + private NashornScriptEngineFactory factory; + /** + * Main instance of Nashorn script engine. + */ + private ScriptEngine engine; + + /** + * Needed so that the FX launcher can create an instance of this class. + */ + public FXShell() { + } + + /** + * Main entry point. Never actually used. + * @param args Command lien arguments. + */ + public static void main(String[] args) { + launch(args); + } + + /* + * Application overrides. + */ + + @Override + public void init() throws Exception { + // Script engine manager to search. + this.manager = new ScriptEngineManager(); + + // Locate the Nashorn script engine factory. Needed for passing arguments. + for (ScriptEngineFactory engineFactory : this.manager.getEngineFactories()) { + if (engineFactory.getEngineName().equals("Oracle Nashorn") && engineFactory instanceof NashornScriptEngineFactory) { + this.factory = (NashornScriptEngineFactory)engineFactory; + } + } + + // If none located. + if (this.factory == null) { + System.err.println("Nashorn script engine not available"); + System.exit(1); + } + + // Get the command line and JNLP parameters. + final Parameters parameters = getParameters(); + + // To collect the script paths and command line arguments. + final List paths = new ArrayList<>(); + final List args = new ArrayList<>(); + + // Pull out relevant JNLP named parameters. + final Map named = parameters.getNamed(); + for (Map.Entry entry : named.entrySet()) { + final String key = entry.getKey(); + final String value = entry.getValue(); + + if ((key.equals("cp") || key.equals("classpath")) && value != null) { + args.add("-classpath"); + args.add(value); + } else if (key.equals("source") && value != null && value.toLowerCase().endsWith(".js")) { + paths.add(value); + } + } + + // Pull out relevant command line arguments. + boolean addNextArg = false; + boolean addAllArgs = false; + for (String parameter : parameters.getUnnamed()) { + if (addAllArgs || addNextArg) { + args.add(parameter); + addNextArg = false; + } else if (parameter.equals("--")) { + args.add(parameter); + addAllArgs = true; + } else if (parameter.startsWith("-")) { + args.add(parameter); + addNextArg = parameter.equals("-cp") || parameter.equals("-classpath"); + } else if (parameter.toLowerCase().endsWith(".js")) { + paths.add(parameter); + } + } + + // Create a Nashorn script engine with specified arguments. + engine = factory.getScriptEngine(args.toArray(new String[args.size()])); + + // Load initial scripts. + for (String path : paths) { + load(path); + } + + // Invoke users JavaScript init function if present. + try { + ((Invocable) engine).invokeFunction("init"); + } catch (NoSuchMethodException ex) { + // Presence of init is optional. + } + } + + @Override + public void start(Stage stage) throws Exception { + // Invoke users JavaScript start function if present. + try { + ((Invocable) engine).invokeFunction("start", stage); + } catch (NoSuchMethodException ex) { + // Presence of start is optional. + } + } + + @Override + public void stop() throws Exception { + // Invoke users JavaScript stop function if present. + try { + ((Invocable) engine).invokeFunction("stop"); + } catch (NoSuchMethodException ex) { + // Presence of stop is optional. + } + } + + /** + * Load and evaluate the specified JavaScript file. + * + * @param path Path to UTF-8 encoded JavaScript file. + * + * @return Last evalulation result (discarded.) + */ + private Object load(String path) { + try { + FileInputStream file = new FileInputStream(path); + InputStreamReader input = new InputStreamReader(file, "UTF-8"); + return engine.eval(input); + } catch (FileNotFoundException | UnsupportedEncodingException | ScriptException ex) { + ex.printStackTrace(); + } + + return null; + } +} From fcc548f01dce0d42b14b702759af3e927f96e786 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Tue, 2 Apr 2013 20:42:03 +0530 Subject: [PATCH 055/151] 8011237: Object.isExtensible(Object.getOwnPropertyDescriptor(function(){"use strict"},"caller").get) should be false Reviewed-by: lagergren, jlaskey --- .../internal/objects/ScriptFunctionImpl.java | 1 + nashorn/test/script/basic/JDK-8011237.js | 39 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 nashorn/test/script/basic/JDK-8011237.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java index 86829d9f58c..b13f47de897 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java +++ b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java @@ -133,6 +133,7 @@ public class ScriptFunctionImpl extends ScriptFunction { // use "getter" so that [[ThrowTypeError]] function's arity is 0 - as specified in step 10 of section 13.2.3 final ScriptFunctionImpl func = new ScriptFunctionImpl("TypeErrorThrower", Lookup.TYPE_ERROR_THROWER_GETTER, null, null, false, false, false); func.setPrototype(UNDEFINED); + func.preventExtensions(); typeErrorThrower = func; } diff --git a/nashorn/test/script/basic/JDK-8011237.js b/nashorn/test/script/basic/JDK-8011237.js new file mode 100644 index 00000000000..e9e521a43ca --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011237.js @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011237: Object.isExtensible(Object.getOwnPropertyDescriptor(function(){"use strict"},"caller").get) should be false + * + * @test + * @run + */ + +// ECMA Section 13.2.3 The [[ThrowTypeError]] Function Object +// 11. Set the [[Extensible]] internal property of F to false + +var strictFunc = (function() { 'use strict' }); +var strictFuncCallerDesc = Object.getOwnPropertyDescriptor(strictFunc, "caller") +var isExtensible = Object.isExtensible(strictFuncCallerDesc.get); +if (isExtensible) { + fail("strict function caller's getter is extensible!"); +} From e96d207c684471823bce2483f40933ae3fb87f0d Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Tue, 2 Apr 2013 23:01:10 +0530 Subject: [PATCH 056/151] 8011274: Object.getOwnPropertyDescriptor(function(){"use strict"},"caller").get.hasOwnProperty("prototype") should be false Reviewed-by: lagergren, jlaskey --- .../internal/objects/ScriptFunctionImpl.java | 6 ++- nashorn/test/script/basic/JDK-8011274.js | 48 +++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 nashorn/test/script/basic/JDK-8011274.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java index b13f47de897..0bfc156921e 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java +++ b/nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java @@ -133,6 +133,8 @@ public class ScriptFunctionImpl extends ScriptFunction { // use "getter" so that [[ThrowTypeError]] function's arity is 0 - as specified in step 10 of section 13.2.3 final ScriptFunctionImpl func = new ScriptFunctionImpl("TypeErrorThrower", Lookup.TYPE_ERROR_THROWER_GETTER, null, null, false, false, false); func.setPrototype(UNDEFINED); + // Non-constructor built-in functions do not have "prototype" property + func.deleteOwnProperty(func.getMap().findProperty("prototype")); func.preventExtensions(); typeErrorThrower = func; } @@ -156,7 +158,7 @@ public class ScriptFunctionImpl extends ScriptFunction { } private static PropertyMap createBoundFunctionMap(final PropertyMap strictModeMap) { - // Bond function map is same as strict function map, but additionally lacks the "prototype" property, see + // Bound function map is same as strict function map, but additionally lacks the "prototype" property, see // ECMAScript 5.1 section 15.3.4.5 return strictModeMap.deleteProperty(strictModeMap.findProperty("prototype")); } @@ -186,6 +188,8 @@ public class ScriptFunctionImpl extends ScriptFunction { static ScriptFunction makeFunction(final String name, final MethodHandle methodHandle, final MethodHandle[] specs) { final ScriptFunctionImpl func = new ScriptFunctionImpl(name, methodHandle, null, specs, false, true, false); func.setPrototype(UNDEFINED); + // Non-constructor built-in functions do not have "prototype" property + func.deleteOwnProperty(func.getMap().findProperty("prototype")); return func; } diff --git a/nashorn/test/script/basic/JDK-8011274.js b/nashorn/test/script/basic/JDK-8011274.js new file mode 100644 index 00000000000..b483c3e072c --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011274.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011324: Object.getOwnPropertyDescriptor(function(){"use strict"},"caller").get.hasOwnProperty("prototype") should be false + * + * @test + * @run + */ + +var strictFunc = (function() { 'use strict' }); +var desc = Object.getOwnPropertyDescriptor(strictFunc, "caller"); +if (desc.get.hasOwnProperty("prototype")) { + fail("strict function's caller getter has 'prototype' property"); +} + +// try few built-ins +if (parseInt.hasOwnProperty("prototype")) { + fail("parseInt.hasOwnProperty('prototype') is true"); +} + +if (parseFloat.hasOwnProperty("prototype")) { + fail("parseFloat.hasOwnProperty('prototype') is true"); +} + +if (isFinite.hasOwnProperty("prototype")) { + fail("isFinite.hasOwnProperty('prototype') is true"); +} From bc93996d275c02165507ba26c3f6ffdbb2749653 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Tue, 2 Apr 2013 14:56:19 -0700 Subject: [PATCH 057/151] 8011342: hgforest.sh : 'python --version' not supported on older python Reviewed-by: wetmore --- common/bin/hgforest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index 4c977532e47..ebb76df7216 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -51,7 +51,7 @@ if [ "#!" = "$has_hash_bang" ] ; then bpython="`basename "$python"`" fi -if [ -x "$python" -a ! -d "$python" -a "`${python} --version 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then +if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then hg="${python} -u ${whichhg}" else echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout. From d35b6ae5f6f8fe7adca657c008901d8af2fed0da Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Wed, 3 Apr 2013 11:41:42 +0530 Subject: [PATCH 058/151] 8011357: Array.prototype.slice and Array.prototype.splice should not call user defined valueOf of start, end arguments more than once Reviewed-by: lagergren, hannesw --- .../nashorn/internal/objects/NativeArray.java | 15 ++-- nashorn/test/script/basic/JDK-8011357.js | 68 +++++++++++++++++++ 2 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011357.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java index 16e237ba521..000522127f9 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java @@ -754,8 +754,9 @@ public final class NativeArray extends ScriptObject { final Object obj = Global.toObject(self); final ScriptObject sobj = (ScriptObject)obj; final long len = JSType.toUint32(sobj.getLength()); - final long relativeStartUint32 = JSType.toUint32(start); - final long relativeStart = JSType.toInteger(start); + final double startNum = JSType.toNumber(start); + final long relativeStartUint32 = JSType.toUint32(startNum); + final long relativeStart = JSType.toInteger(startNum); long k = relativeStart < 0 ? Math.max(len + relativeStart, 0) : @@ -763,8 +764,9 @@ public final class NativeArray extends ScriptObject { Math.max(relativeStartUint32, relativeStart), len); - final long relativeEndUint32 = end == ScriptRuntime.UNDEFINED ? len : JSType.toUint32(end); - final long relativeEnd = end == ScriptRuntime.UNDEFINED ? len : JSType.toInteger(end); + final double endNum = (end == ScriptRuntime.UNDEFINED)? Double.NaN : JSType.toNumber(end); + final long relativeEndUint32 = (end == ScriptRuntime.UNDEFINED)? len : JSType.toUint32(endNum); + final long relativeEnd = (end == ScriptRuntime.UNDEFINED)? len : JSType.toInteger(endNum); final long finale = relativeEnd < 0 ? Math.max(len + relativeEnd, 0) : @@ -895,8 +897,9 @@ public final class NativeArray extends ScriptObject { final ScriptObject sobj = (ScriptObject)obj; final boolean strict = Global.isStrict(); final long len = JSType.toUint32(sobj.getLength()); - final long relativeStartUint32 = JSType.toUint32(start); - final long relativeStart = JSType.toInteger(start); + final double startNum = JSType.toNumber(start); + final long relativeStartUint32 = JSType.toUint32(startNum); + final long relativeStart = JSType.toInteger(startNum); //TODO: workaround overflow of relativeStart for start > Integer.MAX_VALUE final long actualStart = relativeStart < 0 ? diff --git a/nashorn/test/script/basic/JDK-8011357.js b/nashorn/test/script/basic/JDK-8011357.js new file mode 100644 index 00000000000..40efec5d851 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011357.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011357: Array.prototype.slice and Array.prototype.splice should not call user defined valueOf of start, end arguments more than once + * + * @test + * @run + */ + +var startValueOf = 0; +var endValueOf = 0; + +[].slice( + { + valueOf: function() { + startValueOf++; + } + }, + { + valueOf: function() { + endValueOf++; + } + } +); + +if (startValueOf !== 1) { + fail("Array.prototype.slice should call valueOf on start arg once"); +} + +if (endValueOf !== 1) { + fail("Array.prototype.slice should call valueOf on end arg once"); +} + +startValueOf = 0; + +[].splice( + { + valueOf: function() { + startValueOf++; + } + } +); + +if (startValueOf !== 1) { + fail("Array.prototype.splice should call valueOf on start arg once"); +} + From 7891ed4115d753a854b6f3b14f28b90ed1d7c84b Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Wed, 3 Apr 2013 11:13:08 +0200 Subject: [PATCH 059/151] 8011362: Overloaded method resolution foiled by nulls Reviewed-by: hannesw, sundar --- .../internal/dynalink/beans/ClassString.java | 8 ++++ .../dynalink/beans/OverloadedMethod.java | 2 +- nashorn/test/script/basic/JDK-8011362.js | 34 ++++++++++++++ .../test/script/basic/JDK-8011362.js.EXPECTED | 2 + .../test/models/Jdk8011362TestSubject.java | 47 +++++++++++++++++++ 5 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 nashorn/test/script/basic/JDK-8011362.js create mode 100644 nashorn/test/script/basic/JDK-8011362.js.EXPECTED create mode 100644 nashorn/test/src/jdk/nashorn/test/models/Jdk8011362TestSubject.java diff --git a/nashorn/src/jdk/internal/dynalink/beans/ClassString.java b/nashorn/src/jdk/internal/dynalink/beans/ClassString.java index d6c6da08933..dfcb378662f 100644 --- a/nashorn/src/jdk/internal/dynalink/beans/ClassString.java +++ b/nashorn/src/jdk/internal/dynalink/beans/ClassString.java @@ -96,6 +96,11 @@ import jdk.internal.dynalink.support.TypeUtilities; * @author Attila Szegedi */ final class ClassString { + /** + * An anonymous inner class used solely to represent the "type" of null values for method applicability checking. + */ + static final Class NULL_CLASS = (new Object() { /* Intentionally empty */ }).getClass(); + private final Class[] classes; private int hashCode; @@ -203,6 +208,9 @@ final class ClassString { } private static boolean canConvert(LinkerServices ls, Class from, Class to) { + if(from == NULL_CLASS) { + return !to.isPrimitive(); + } return ls == null ? TypeUtilities.isMethodInvocationConvertible(from, to) : ls.canConvert(from, to); } } diff --git a/nashorn/src/jdk/internal/dynalink/beans/OverloadedMethod.java b/nashorn/src/jdk/internal/dynalink/beans/OverloadedMethod.java index d001516284f..7093e757497 100644 --- a/nashorn/src/jdk/internal/dynalink/beans/OverloadedMethod.java +++ b/nashorn/src/jdk/internal/dynalink/beans/OverloadedMethod.java @@ -152,7 +152,7 @@ class OverloadedMethod { final Class[] argTypes = new Class[args.length]; for(int i = 0; i < argTypes.length; ++i) { final Object arg = args[i]; - argTypes[i] = arg == null ? callSiteType.parameterType(i) : arg.getClass(); + argTypes[i] = arg == null ? ClassString.NULL_CLASS : arg.getClass(); } final ClassString classString = new ClassString(argTypes); MethodHandle method = argTypesToMethods.get(classString); diff --git a/nashorn/test/script/basic/JDK-8011362.js b/nashorn/test/script/basic/JDK-8011362.js new file mode 100644 index 00000000000..bda4851aab1 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011362.js @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011362: Overloaded method resolution foiled by nulls + * + * @test + * @run + */ + +var subject = new (Java.type("jdk.nashorn.test.models.Jdk8011362TestSubject")) + +print(subject.overloaded("", null)) +print(subject.overloaded(0, null)) diff --git a/nashorn/test/script/basic/JDK-8011362.js.EXPECTED b/nashorn/test/script/basic/JDK-8011362.js.EXPECTED new file mode 100644 index 00000000000..77106d6b938 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011362.js.EXPECTED @@ -0,0 +1,2 @@ +overloaded(Double, Double) +overloaded(String, String) diff --git a/nashorn/test/src/jdk/nashorn/test/models/Jdk8011362TestSubject.java b/nashorn/test/src/jdk/nashorn/test/models/Jdk8011362TestSubject.java new file mode 100644 index 00000000000..1b179758ef7 --- /dev/null +++ b/nashorn/test/src/jdk/nashorn/test/models/Jdk8011362TestSubject.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.test.models; + +/** + * Test class used by JDK-8011362.js. + */ +public class Jdk8011362TestSubject { + // This is selected for overloaded("", null) + public String overloaded(String a, String b) { + return "overloaded(String, String)"; + } + + // This is selected for overloaded(0, null) + public String overloaded(Double a, Double b) { + return "overloaded(Double, Double)"; + } + + // This method is added to test that null will not match a primitive type, that is overloaded(0, null) will always + // select the (Double, Double) over (Double, double). + public String overloaded(Double a, double b) { + return "overloaded(Double, double)"; + } +} From a85fab27306caa7289366520e28419e4c167c83f Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Wed, 3 Apr 2013 15:27:28 +0530 Subject: [PATCH 060/151] 8011365: Array.prototype.join and Array.prototype.toString do not throw TypeError on null, undefined Reviewed-by: attila, hannesw, lagergren --- .../nashorn/internal/objects/NativeArray.java | 7 +- .../test/script/basic/JDK-8011362.js.EXPECTED | 2 +- nashorn/test/script/basic/JDK-8011365.js | 72 +++++++++++++++++++ 3 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011365.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java index 000522127f9..bfbf59bc20a 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java @@ -337,8 +337,9 @@ public final class NativeArray extends ScriptObject { */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static Object toString(final Object self) { - if (self instanceof ScriptObject) { - final ScriptObject sobj = (ScriptObject) self; + final Object obj = Global.toObject(self); + if (obj instanceof ScriptObject) { + final ScriptObject sobj = (ScriptObject)obj; try { final Object join = JOIN.getGetter().invokeExact(sobj); if (join instanceof ScriptFunction) { @@ -573,9 +574,9 @@ public final class NativeArray extends ScriptObject { */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static Object join(final Object self, final Object separator) { - final String sep = separator == ScriptRuntime.UNDEFINED ? "," : JSType.toString(separator); final StringBuilder sb = new StringBuilder(); final Iterator iter = arrayLikeIterator(self, true); + final String sep = separator == ScriptRuntime.UNDEFINED ? "," : JSType.toString(separator); while (iter.hasNext()) { final Object obj = iter.next(); diff --git a/nashorn/test/script/basic/JDK-8011362.js.EXPECTED b/nashorn/test/script/basic/JDK-8011362.js.EXPECTED index 77106d6b938..e0eb4dc981c 100644 --- a/nashorn/test/script/basic/JDK-8011362.js.EXPECTED +++ b/nashorn/test/script/basic/JDK-8011362.js.EXPECTED @@ -1,2 +1,2 @@ -overloaded(Double, Double) overloaded(String, String) +overloaded(Double, Double) diff --git a/nashorn/test/script/basic/JDK-8011365.js b/nashorn/test/script/basic/JDK-8011365.js new file mode 100644 index 00000000000..30802576fc6 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011365.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011365: Array.prototype.join and Array.prototype.toString do not throw TypeError on null, undefined + * + * @test + * @run + */ + +try { + Array.prototype.join.call(null, { toString:function() { throw 2 } }); + fail("should have thrown TypeError"); +} catch (e) { + if (! (e instanceof TypeError)) { + fail("TypeError expected, got " + e); + } +} + +// check all Array.prototype functions to be sure +var names = Object.getOwnPropertyNames(Array.prototype); + +for (var n in names) { + var funcName = names[n]; + // ignore constructor + if (funcName == "constructor") { + continue; + } + + var prop = Array.prototype[funcName]; + if (prop instanceof Function) { + // try 'null' this + try { + prop.call(null); + fail(funcName + " does not throw TypeError on 'null' this"); + } catch (e) { + if (! (e instanceof TypeError)) { + fail("TypeError expected from " + funcName + ", got " + e); + } + } + + // try 'undefined' this + try { + prop.call(undefined); + fail(funcName + " does not throw TypeError on 'undefined' this"); + } catch (e) { + if (! (e instanceof TypeError)) { + fail("TypeError expected from " + funcName + ", got " + e); + } + } + } +} From 6b89fa96a3068c3706b7e4abdf5f0daaa2df448c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Wed, 3 Apr 2013 12:43:59 +0200 Subject: [PATCH 061/151] 8007774: Enable code cache again Reviewed-by: lagergren, attila, sundar --- .../internal/runtime/resources/Options.properties | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties b/nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties index e63f7a3769d..b5641ec9ea7 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties +++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/Options.properties @@ -89,7 +89,8 @@ nashorn.option.class.cache.size ={ \ short_name="--ccs", \ desc="Size of the Class cache size per global scope.", \ is_undocumented=true, \ - type=Integer \ + type=Integer, \ + default=50 \ } nashorn.option.classpath ={ \ @@ -101,7 +102,7 @@ nashorn.option.classpath ={ \ } nashorn.option.compile.only = { \ - name="--compile-only", \ + name="--compile-only", \ short_name="-co", \ is_undocumented=true, \ desc="Compile without running.", \ @@ -117,10 +118,10 @@ nashorn.option.d = { \ type=String \ } -nashorn.option.doe = { \ - name="-dump-on-error", \ - short_name="-doe", \ - desc="Dump a stack trace on errors."\ +nashorn.option.doe = { \ + name="-dump-on-error", \ + short_name="-doe", \ + desc="Dump a stack trace on errors." \ } nashorn.option.empty.statements = { \ @@ -196,7 +197,7 @@ nashorn.option.package = { \ } nashorn.option.parse.only = { \ - name="--parse-only", \ + name="--parse-only", \ is_undocumented=true, \ desc="Parse without compiling." \ } From 84f1ee1581bab4a7e89926816756cef8c37ab7d4 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Wed, 3 Apr 2013 20:17:05 +0530 Subject: [PATCH 062/151] 8011382: Data prototype methods and constructor do not call user defined toISOString, valueOf methods per spec Reviewed-by: lagergren, jlaskey --- .../nashorn/internal/objects/NativeDate.java | 29 +++-- nashorn/test/script/basic/JDK-8011382.js | 115 ++++++++++++++++++ 2 files changed, 134 insertions(+), 10 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011382.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java b/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java index c4bf8e54691..4724cda136b 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeDate.java @@ -844,10 +844,6 @@ public final class NativeDate extends ScriptObject { */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static Object toJSON(final Object self, final Object key) { - if (self instanceof NativeDate) { - final NativeDate nd = (NativeDate)self; - return (isNaN(nd.getTime())) ? null : toISOStringImpl(nd); - } // NOTE: Date.prototype.toJSON is generic. Accepts other objects as well. final Object selfObj = Global.toObject(self); if (!(selfObj instanceof ScriptObject)) { @@ -1200,13 +1196,18 @@ public final class NativeDate extends ScriptObject { // Convert Date constructor args, checking for NaN, filling in defaults etc. private static double[] convertCtorArgs(final Object[] args) { final double[] d = new double[7]; + boolean nullReturn = false; + // should not bailout on first NaN or infinite. Need to convert all + // subsequent args for possible side-effects via valueOf/toString overrides + // on argument objects. for (int i = 0; i < d.length; i++) { if (i < args.length) { final double darg = JSType.toNumber(args[i]); if (isNaN(darg) || isInfinite(darg)) { - return null; + nullReturn = true; } + d[i] = (long)darg; } else { d[i] = i == 2 ? 1 : 0; // day in month defaults to 1 @@ -1217,31 +1218,39 @@ public final class NativeDate extends ScriptObject { d[0] += 1900; } - return d; + return nullReturn? null : d; } // This method does the hard work for all setter methods: If a value is provided // as argument it is used, otherwise the value is calculated from the existing time value. private static double[] convertArgs(final Object[] args, final double time, final int fieldId, final int start, final int length) { final double[] d = new double[length]; + boolean nullReturn = false; + // Need to call toNumber on all args for side-effects - even if an argument + // fails to convert to number, subsequent toNumber calls needed for possible + // side-effects via valueOf/toString overrides. for (int i = start; i < start + length; i++) { if (fieldId <= i && i < fieldId + args.length) { final double darg = JSType.toNumber(args[i - fieldId]); if (isNaN(darg) || isInfinite(darg)) { - return null; + nullReturn = true; } + d[i - start] = (long) darg; } else { // Date.prototype.set* methods require first argument to be defined if (i == fieldId) { - return null; + nullReturn = true; + } + + if (! nullReturn) { + d[i - start] = valueFromTime(i, time); } - d[i - start] = valueFromTime(i, time); } } - return d; + return nullReturn? null : d; } // ECMA 15.9.1.14 TimeClip (time) diff --git a/nashorn/test/script/basic/JDK-8011382.js b/nashorn/test/script/basic/JDK-8011382.js new file mode 100644 index 00000000000..13b3a771689 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011382.js @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011382: Data prototype methods and constructor do not call user defined toISOString, valueOf methods per spec. + * + * @test + * @run + */ + +var yearValueOf = 0; +var monthValueOf = 0; +var dayValueOf = 0; + +var d = new Date( + { + valueOf: function() { yearValueOf++; return NaN; } + }, + { + valueOf: function() { monthValueOf++; return NaN; } + }, + { + valueOf: function() { dayValueOf++; return NaN; } + } +); + +if (yearValueOf !== 1) { + fail("Date constructor does not call valueOf on year argument once"); +} + +if (monthValueOf !== 1) { + fail("Date constructor does not call valueOf on month argument once"); +} + +if (dayValueOf !== 1) { + fail("Date constructor does not call valueOf on day argument once"); +} + +yearValueOf = 0; +monthValueOf = 0; +dayValueOf = 0; + +d = new Date(); + +d.setFullYear( + { + valueOf: function() { yearValueOf++; return NaN; } + }, + { + valueOf: function() { monthValueOf++; return NaN; } + }, + { + valueOf: function() { dayValueOf++; return NaN; } + } +); + +if (yearValueOf !== 1) { + fail("Date setFullYear does not call valueOf on year argument once"); +} + +if (monthValueOf !== 1) { + fail("Date setFullYear does not call valueOf on month argument once"); +} + +if (dayValueOf !== 1) { + fail("Date setFullYear does not call valueOf on day argument once"); +} + +// check toJSON calls toISOString override +var toISOStringCalled = 0; +d = new Date(); +d.toISOString = function() { + toISOStringCalled++; +}; + +d.toJSON(); +if (toISOStringCalled !== 1) { + fail("toISOString was not called by Date.prototype.toJSON once"); +} + +toISOStringCalled = 0; + +// toJSON is generic - try for non-Date object +Date.prototype.toJSON.call({ + toISOString: function() { + toISOStringCalled++; + }, + valueOf: function() { + return 12; + } +}); + +if (toISOStringCalled !== 1) { + fail("toISOString was not called by Date.prototype.toJSON once"); +} From 3aabe92c929472d8a8738e61836ebfc09d1a9e6a Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Wed, 3 Apr 2013 12:27:12 -0700 Subject: [PATCH 063/151] 8011052: Add DEFAULT to javax.lang.model.Modifier Reviewed-by: abuckley, jjg --- .../com/sun/tools/javac/code/Flags.java | 1 + .../javax/lang/model/element/Modifier.java | 7 +++- .../model/element/TestExecutableElement.java | 42 ++++++++++++++++--- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java index 8a75e7a091e..06e5f87f594 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java @@ -314,6 +314,7 @@ public class Flags { modifiers.add(Modifier.SYNCHRONIZED); if (0 != (flags & NATIVE)) modifiers.add(Modifier.NATIVE); if (0 != (flags & STRICTFP)) modifiers.add(Modifier.STRICTFP); + if (0 != (flags & DEFAULT)) modifiers.add(Modifier.DEFAULT); modifiers = Collections.unmodifiableSet(modifiers); modifierSets.put(flags, modifiers); } diff --git a/langtools/src/share/classes/javax/lang/model/element/Modifier.java b/langtools/src/share/classes/javax/lang/model/element/Modifier.java index 995334d8deb..6a804b22bb4 100644 --- a/langtools/src/share/classes/javax/lang/model/element/Modifier.java +++ b/langtools/src/share/classes/javax/lang/model/element/Modifier.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,6 +53,11 @@ public enum Modifier { /** The modifier {@code protected} */ PROTECTED, /** The modifier {@code private} */ PRIVATE, /** The modifier {@code abstract} */ ABSTRACT, + /** + * The modifier {@code default} + * @since 1.8 + */ + DEFAULT, /** The modifier {@code static} */ STATIC, /** The modifier {@code final} */ FINAL, /** The modifier {@code transient} */ TRANSIENT, diff --git a/langtools/test/tools/javac/processing/model/element/TestExecutableElement.java b/langtools/test/tools/javac/processing/model/element/TestExecutableElement.java index 9aade955e00..35aae46bdd8 100644 --- a/langtools/test/tools/javac/processing/model/element/TestExecutableElement.java +++ b/langtools/test/tools/javac/processing/model/element/TestExecutableElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 8005046 + * @bug 8005046 8011052 * @summary Test basic properties of javax.lang.element.Element * @author Joseph D. Darcy * @library /tools/javac/lib @@ -35,6 +35,7 @@ import java.lang.annotation.*; import java.util.Formatter; import java.util.Set; import java.util.Objects; +import java.util.regex.*; import javax.annotation.processing.*; import javax.lang.model.SourceVersion; import static javax.lang.model.SourceVersion.*; @@ -79,9 +80,39 @@ public class TestExecutableElement extends JavacTestingAbstractProcessor impleme boolean methodIsDefault = method.isDefault(); + if (expectedDefault) { + if (!method.getModifiers().contains(Modifier.DEFAULT)) { + messager.printMessage(ERROR, + "Modifier \"default\" not present as expected.", + method); + } + + // Check printing output + java.io.Writer stringWriter = new java.io.StringWriter(); + eltUtils.printElements(stringWriter, method); + Pattern p = Pattern.compile(expectedIsDefault.expectedTextRegex(), Pattern.DOTALL); + + if (! p.matcher(stringWriter.toString()).matches()) { + messager.printMessage(ERROR, + new Formatter().format("Unexpected printing ouptput:%n\tgot %s,%n\texpected pattern %s.", + stringWriter.toString(), + expectedIsDefault.expectedTextRegex()).toString(), + method); + } + + System.out.println("\t" + stringWriter.toString()); + + } else { + if (method.getModifiers().contains(Modifier.DEFAULT)) { + messager.printMessage(ERROR, + "Modifier \"default\" present when not expected.", + method); + } + } + if (methodIsDefault != expectedDefault) { messager.printMessage(ERROR, - new Formatter().format("Unexpected Executable.isDefault result: got %s, expected %s", + new Formatter().format("Unexpected Executable.isDefault result: got ``%s'', expected ``%s''.", expectedDefault, methodIsDefault).toString(), method); @@ -98,6 +129,7 @@ public class TestExecutableElement extends JavacTestingAbstractProcessor impleme @Target(ElementType.METHOD) @interface IsDefault { boolean value(); + String expectedTextRegex() default ""; } /** @@ -108,6 +140,6 @@ interface ProviderOfDefault { boolean process(Set annotations, RoundEnvironment roundEnv); - @IsDefault(true) - default void quux() {}; + @IsDefault(value=true, expectedTextRegex="\\s*@IsDefault\\(.*\\)\\s*default strictfp void quux\\(\\);\\s*$") + default strictfp void quux() {}; } From e3b0538db80445a609a704e812c70c1ed8581f01 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Wed, 3 Apr 2013 16:26:10 -0700 Subject: [PATCH 064/151] 8011350: hgforest.sh uses non-POSIX sh features that may fail with some shells Reviewed-by: tbell, katleman, dholmes --- common/bin/hgforest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/bin/hgforest.sh b/common/bin/hgforest.sh index ebb76df7216..12cf0234b17 100644 --- a/common/bin/hgforest.sh +++ b/common/bin/hgforest.sh @@ -30,7 +30,7 @@ pull_extra_base="$2" # Python always buffers stdout significantly, thus we will not see any output from hg clone jdk, # until a lot of time has passed! By passing -u to python, we get incremental updates # on stdout. Much nicer. -whichhg="`which hg`" +whichhg="`which hg 2> /dev/null | grep -v '^no hg in'`" if [ "${whichhg}" = "" ] ; then echo Cannot find hg! @@ -51,7 +51,7 @@ if [ "#!" = "$has_hash_bang" ] ; then bpython="`basename "$python"`" fi -if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d " "`" == "Python" ] ; then +if [ -x "$python" -a ! -d "$python" -a "`${python} -V 2>&1 | cut -f 1 -d ' '`" = "Python" ] ; then hg="${python} -u ${whichhg}" else echo Cannot find python from hg launcher. Running plain hg, which probably has buffered stdout. From 33f6dd2215710883d00055620b574dc2e8d42aed Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Wed, 3 Apr 2013 16:43:09 -0700 Subject: [PATCH 065/151] 8006103: [parfait] Possible null pointer dereference at hotspot/src/os/linux/vm/os_linux.cpp; os_windows.cpp; os_solaris.cpp; os_bsd.cpp Reviewed-by: zgu, iklam --- hotspot/src/os/bsd/vm/os_bsd.cpp | 3 +++ hotspot/src/os/linux/vm/os_linux.cpp | 3 +++ hotspot/src/os/solaris/vm/os_solaris.cpp | 3 +++ hotspot/src/os/windows/vm/os_windows.cpp | 3 +++ 4 files changed, 12 insertions(+) diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp index a09db37288f..44bec82c076 100644 --- a/hotspot/src/os/bsd/vm/os_bsd.cpp +++ b/hotspot/src/os/bsd/vm/os_bsd.cpp @@ -1214,6 +1214,9 @@ bool os::dll_build_name(char* buffer, size_t buflen, } else if (strchr(pname, *os::path_separator()) != NULL) { int n; char** pelements = split_path(pname, &n); + if (pelements == NULL) { + return false; + } for (int i = 0 ; i < n ; i++) { // Really shouldn't be NULL, but check can't hurt if (pelements[i] == NULL || strlen(pelements[i]) == 0) { diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index 29842b223f0..efaefc484c1 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -1647,6 +1647,9 @@ bool os::dll_build_name(char* buffer, size_t buflen, } else if (strchr(pname, *os::path_separator()) != NULL) { int n; char** pelements = split_path(pname, &n); + if (pelements == NULL) { + return false; + } for (int i = 0 ; i < n ; i++) { // Really shouldn't be NULL, but check can't hurt if (pelements[i] == NULL || strlen(pelements[i]) == 0) { diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp index bdd78ad0218..58601690c4d 100644 --- a/hotspot/src/os/solaris/vm/os_solaris.cpp +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp @@ -1903,6 +1903,9 @@ bool os::dll_build_name(char* buffer, size_t buflen, } else if (strchr(pname, *os::path_separator()) != NULL) { int n; char** pelements = split_path(pname, &n); + if (pelements == NULL) { + return false; + } for (int i = 0 ; i < n ; i++) { // really shouldn't be NULL but what the heck, check can't hurt if (pelements[i] == NULL || strlen(pelements[i]) == 0) { diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp index 4a99a1b3975..a512c59d246 100644 --- a/hotspot/src/os/windows/vm/os_windows.cpp +++ b/hotspot/src/os/windows/vm/os_windows.cpp @@ -1177,6 +1177,9 @@ bool os::dll_build_name(char *buffer, size_t buflen, } else if (strchr(pname, *os::path_separator()) != NULL) { int n; char** pelements = split_path(pname, &n); + if (pelements == NULL) { + return false; + } for (int i = 0 ; i < n ; i++) { char* path = pelements[i]; // Really shouldn't be NULL, but check can't hurt From 2b494aafd93ed236cd40a77b35a64c6584baec9d Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 4 Apr 2013 10:24:46 +0530 Subject: [PATCH 066/151] 8011394: RegExp.prototype.test() does not call valueOf on lastIndex property as per the spec Reviewed-by: lagergren, jlaskey, hannesw --- .../internal/objects/NativeRegExp.java | 5 ++- nashorn/test/script/basic/JDK-8011394.js | 45 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 nashorn/test/script/basic/JDK-8011394.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeRegExp.java b/nashorn/src/jdk/nashorn/internal/objects/NativeRegExp.java index d386531f797..5edc37981b3 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeRegExp.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeRegExp.java @@ -523,8 +523,11 @@ public final class NativeRegExp extends ScriptObject { } private RegExpResult execInner(final String string) { + int start = getLastIndex(); + if (! regexp.isGlobal()) { + start = 0; + } - final int start = regexp.isGlobal() ? getLastIndex() : 0; if (start < 0 || start > string.length()) { setLastIndex(0); return null; diff --git a/nashorn/test/script/basic/JDK-8011394.js b/nashorn/test/script/basic/JDK-8011394.js new file mode 100644 index 00000000000..070f5d3c256 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011394.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011394: RegExp.prototype.test() does not call valueOf on lastIndex property as per the spec. + * + * @test + * @run + */ + +var re = new RegExp(); +var lastIndexValueOfCalled = false; + +re.lastIndex = { + valueOf: function() { + lastIndexValueOfCalled = true; + return 0; + } +}; + +re.test(""); + +if (! lastIndexValueOfCalled) { + fail("RegExp.prototype.test() does not call 'valueOf' on 'lastIndex'"); +} From e20dc52ab248346e99eff520676bb175d4ed4d0c Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 4 Apr 2013 13:54:51 +0530 Subject: [PATCH 067/151] 8011421: When using Object.defineProperty on arrays, PropertyDescriptor's property accessors are invoked multiple times Reviewed-by: lagergren, hannesw --- .../nashorn/internal/objects/NativeArray.java | 6 +-- nashorn/test/script/basic/JDK-8011421.js | 51 +++++++++++++++++++ 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011421.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java index bfbf59bc20a..0f4ad604c5f 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java @@ -160,7 +160,7 @@ public final class NativeArray extends ScriptObject { if ("length".equals(key)) { // Step 3a if (!desc.has(VALUE)) { - return super.defineOwnProperty("length", propertyDesc, reject); + return super.defineOwnProperty("length", desc, reject); } // Step 3b @@ -242,7 +242,7 @@ public final class NativeArray extends ScriptObject { // Step 4c // set the new array element - final boolean succeeded = super.defineOwnProperty(key, propertyDesc, false); + final boolean succeeded = super.defineOwnProperty(key, desc, false); // Step 4d if (!succeeded) { @@ -263,7 +263,7 @@ public final class NativeArray extends ScriptObject { } // not an index property - return super.defineOwnProperty(key, propertyDesc, reject); + return super.defineOwnProperty(key, desc, reject); } /** diff --git a/nashorn/test/script/basic/JDK-8011421.js b/nashorn/test/script/basic/JDK-8011421.js new file mode 100644 index 00000000000..c1acef4b3f9 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011421.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011421: When using Object.defineProperty on arrays, PropertyDescriptor's property accessors are invoked multiple times + * + * @test + * @run + */ + +var configurableGetterCalled = 0; + +// create a property descriptor object with "configurable" +// property with a user defined getter +var propDesc = Object.defineProperty({}, + "configurable", + { + get: function() { + configurableGetterCalled++; + return false + } + } +); + +// make array length non-configurable +Object.defineProperty([], "length", propDesc); + +// above should have called "configurable" getter only once +if (configurableGetterCalled !== 1) { + fail("defineProperty on array should call propDesc getters only once"); +} From 70276abeb15b6292d2bd2550a0884499b32efb9c Mon Sep 17 00:00:00 2001 From: James Laskey Date: Thu, 4 Apr 2013 09:05:38 -0300 Subject: [PATCH 068/151] 8011540: PropertyMap histories should not begin with empty map Reviewed-by: lagergren, sundar --- .../src/jdk/nashorn/internal/runtime/PropertyMap.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java index 19c12b7a277..b5154c853f6 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java @@ -540,11 +540,13 @@ public final class PropertyMap implements Iterable, PropertyListener { * @param newMap Modified {@link PropertyMap}. */ private void addToHistory(final Property property, final PropertyMap newMap) { - if (history == null) { - history = new LinkedHashMap<>(); - } + if (!properties.isEmpty()) { + if (history == null) { + history = new LinkedHashMap<>(); + } - history.put(property, newMap); + history.put(property, newMap); + } } /** From 76f2aa79e6fbf12f8c5495c51bc65f735476270f Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 4 Apr 2013 18:30:30 +0530 Subject: [PATCH 069/151] 8011543: "".split(undefined,{valueOf:function(){throw 2}}) does not throw exception Reviewed-by: lagergren, jlaskey --- .../internal/objects/NativeString.java | 4 +- nashorn/test/script/basic/JDK-8011543.js | 42 +++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011543.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeString.java b/nashorn/src/jdk/nashorn/internal/objects/NativeString.java index 5f48ad98ecb..838b8c40e88 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeString.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeString.java @@ -838,15 +838,13 @@ public final class NativeString extends ScriptObject { */ @Function(attributes = Attribute.NOT_ENUMERABLE) public static Object split(final Object self, final Object separator, final Object limit) { - final String str = checkObjectToString(self); + final long lim = (limit == UNDEFINED) ? JSType.MAX_UINT : JSType.toUint32(limit); if (separator == UNDEFINED) { return new NativeArray(new Object[]{str}); } - final long lim = (limit == UNDEFINED) ? JSType.MAX_UINT : JSType.toUint32(limit); - if (separator instanceof NativeRegExp) { return ((NativeRegExp) separator).split(str, lim); } diff --git a/nashorn/test/script/basic/JDK-8011543.js b/nashorn/test/script/basic/JDK-8011543.js new file mode 100644 index 00000000000..49baef71676 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011543.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011543: "".split(undefined,{valueOf:function(){throw 2}}) does not throw exception + * + * @test + * @run + */ + +try { + "".split(undefined,{ + valueOf: function() { + throw 42; + } + }); + fail("should have thrown 42"); +} catch (e) { + if (e != 42) { + fail("expected 42 to be thrown"); + } +} From 5a45a7da03174a3715e0c8c69a32c7257d1b859a Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Thu, 4 Apr 2013 15:53:26 +0200 Subject: [PATCH 070/151] 8011544: Allow subclassing Java classes from script without creating instances Reviewed-by: jlaskey, sundar --- .../nashorn/internal/objects/NativeJava.java | 69 +- .../runtime/linker/AdaptationException.java | 39 + .../runtime/linker/AdaptationResult.java | 74 + .../runtime/linker/ClassAndLoader.java | 188 +++ .../linker/JavaAdapterBytecodeGenerator.java | 884 +++++++++++ .../linker/JavaAdapterClassLoader.java | 225 +++ .../runtime/linker/JavaAdapterFactory.java | 1314 ++--------------- .../linker/JavaAdapterGeneratorBase.java | 55 + .../runtime/linker/JavaAdapterServices.java | 114 ++ .../runtime/linker/NashornLinker.java | 15 +- .../linker/NashornStaticClassLinker.java | 4 +- .../runtime/resources/Messages.properties | 1 + .../test/script/basic/javaclassoverrides.js | 86 ++ .../basic/javaclassoverrides.js.EXPECTED | 9 + 14 files changed, 1864 insertions(+), 1213 deletions(-) create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationException.java create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationResult.java create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/ClassAndLoader.java create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterGeneratorBase.java create mode 100644 nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java create mode 100644 nashorn/test/script/basic/javaclassoverrides.js create mode 100644 nashorn/test/script/basic/javaclassoverrides.js.EXPECTED diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeJava.java b/nashorn/src/jdk/nashorn/internal/objects/NativeJava.java index 2519c0284fd..5faec5ea98b 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeJava.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeJava.java @@ -394,22 +394,56 @@ public final class NativeJava { * * We can see several important concepts in the above example: *
    - *
  • Every Java class will have exactly one extender subclass in Nashorn - repeated invocations of {@code extend} - * for the same type will yield the same extender type. It's a generic adapter that delegates to whatever JavaScript - * functions its implementation object has on a per-instance basis.
  • + *
  • Every specified list of Java types will have exactly one extender subclass in Nashorn - repeated invocations + * of {@code extend} for the same list of types will yield the same extender type. It's a generic adapter that + * delegates to whatever JavaScript functions its implementation object has on a per-instance basis.
  • *
  • If the Java method is overloaded (as in the above example {@code List.add()}), then your JavaScript adapter * must be prepared to deal with all overloads.
  • *
  • You can't invoke {@code super.*()} from adapters for now.
  • + *
  • It is also possible to specify an ordinary JavaScript object as the last argument to {@code extend}. In that + * case, it is treated as a class-level override. {@code extend} will return an extender class where all instances + * will have the methods implemented by functions on that object, just as if that object were passed as the last + * argument to their constructor. Example: + *
    +     * var Runnable = Java.type("java.lang.Runnable")
    +     * var R1 = Java.extend(Runnable, {
    +     *     run: function() {
    +     *         print("R1.run() invoked!")
    +     *     }
    +     * })
    +     * var r1 = new R1
    +     * var t = new java.lang.Thread(r1)
    +     * t.start()
    +     * t.join()
    +     * 
    + * As you can see, you don't have to pass any object when you create a new instance of {@code R1} as its + * {@code run()} function was defined already when extending the class. Of course, you can still provide + * instance-level overrides on these objects. The order of precedence is instance-level method, class-level method, + * superclass method, or {@code UnsupportedOperationException} if the superclass method is abstract. If we continue + * our previous example: + *
    +     * var r2 = new R1(function() { print("r2.run() invoked!") })
    +     * r2.run()
    +     * 
    + * We'll see it'll print {@code "r2.run() invoked!"}, thus overriding on instance-level the class-level behavior. + *
  • *
* @param self not used * @param types the original types. The caller must pass at least one Java type object of class {@link StaticClass} * representing either a public interface or a non-final public class with at least one public or protected * constructor. If more than one type is specified, at most one can be a class and the rest have to be interfaces. - * Invoking the method twice with exactly the same types in the same order will return the same adapter - * class, any reordering of types or even addition or removal of redundant types (i.e. interfaces that other types - * in the list already implement/extend, or {@code java.lang.Object} in a list of types consisting purely of - * interfaces) will result in a different adapter class, even though those adapter classes are functionally - * identical; we deliberately don't want to incur the additional processing cost of canonicalizing type lists. + * Invoking the method twice with exactly the same types in the same order - in absence of class-level overrides - + * will return the same adapter class, any reordering of types or even addition or removal of redundant types (i.e. + * interfaces that other types in the list already implement/extend, or {@code java.lang.Object} in a list of types + * consisting purely of interfaces) will result in a different adapter class, even though those adapter classes are + * functionally identical; we deliberately don't want to incur the additional processing cost of canonicalizing type + * lists. As a special case, the last argument can be a {@code ScriptObject} instead of a type. In this case, a + * separate adapter class is generated - new one for each invocation - that will use the passed script object as its + * implementation for all instances. Instances of such adapter classes can then be created without passing another + * script object in the constructor, as the class has a class-level behavior defined by the script object. However, + * you can still pass a script object (or if it's a SAM type, a function) to the constructor to provide further + * instance-level overrides. + * * @return a new {@link StaticClass} that represents the adapter for the original types. */ @Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR) @@ -417,14 +451,27 @@ public final class NativeJava { if(types == null || types.length == 0) { throw typeError("extend.expects.at.least.one.argument"); } - final Class[] stypes = new Class[types.length]; + final int l = types.length; + final int typesLen; + final ScriptObject classOverrides; + if(types[l - 1] instanceof ScriptObject) { + classOverrides = (ScriptObject)types[l - 1]; + typesLen = l - 1; + if(typesLen == 0) { + throw typeError("extend.expects.at.least.one.type.argument"); + } + } else { + classOverrides = null; + typesLen = l; + } + final Class[] stypes = new Class[typesLen]; try { - for(int i = 0; i < types.length; ++i) { + for(int i = 0; i < typesLen; ++i) { stypes[i] = ((StaticClass)types[i]).getRepresentedClass(); } } catch(final ClassCastException e) { throw typeError("extend.expects.java.types"); } - return JavaAdapterFactory.getAdapterClassFor(stypes); + return JavaAdapterFactory.getAdapterClassFor(stypes, classOverrides); } } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationException.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationException.java new file mode 100644 index 00000000000..33429dd1017 --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationException.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +@SuppressWarnings("serial") +class AdaptationException extends Exception { + private final AdaptationResult adaptationResult; + + AdaptationException(final AdaptationResult.Outcome outcome, final String classList) { + this.adaptationResult = new AdaptationResult(outcome, classList); + } + + AdaptationResult getAdaptationResult() { + return adaptationResult; + } +} diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationResult.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationResult.java new file mode 100644 index 00000000000..5185a955a2d --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/AdaptationResult.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +import jdk.nashorn.internal.runtime.ECMAErrors; +import jdk.nashorn.internal.runtime.ECMAException; + +/** + * A result of generating an adapter for a class. A tuple of an outcome and - in case of an error outcome - a list of + * classes that caused the error. + */ +class AdaptationResult { + /** + * Contains various outcomes for attempting to generate an adapter class. These are stored in AdapterInfo instances. + * We have a successful outcome (adapter class was generated) and four possible error outcomes: superclass is final, + * superclass is not public, superclass has no public or protected constructor, more than one superclass was + * specified. We don't throw exceptions when we try to generate the adapter, but rather just record these error + * conditions as they are still useful as partial outcomes, as Nashorn's linker can still successfully check whether + * the class can be autoconverted from a script function even when it is not possible to generate an adapter for it. + */ + enum Outcome { + SUCCESS, + ERROR_FINAL_CLASS, + ERROR_NON_PUBLIC_CLASS, + ERROR_NO_ACCESSIBLE_CONSTRUCTOR, + ERROR_MULTIPLE_SUPERCLASSES, + ERROR_NO_COMMON_LOADER + } + + static final AdaptationResult SUCCESSFUL_RESULT = new AdaptationResult(Outcome.SUCCESS, ""); + + private final Outcome outcome; + private final String classList; + + AdaptationResult(final Outcome outcome, final String classList) { + this.outcome = outcome; + this.classList = classList; + } + + Outcome getOutcome() { + return outcome; + } + + String getClassList() { + return classList; + } + + ECMAException typeError() { + return ECMAErrors.typeError("extend." + outcome, classList); + } +} diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/ClassAndLoader.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/ClassAndLoader.java new file mode 100644 index 00000000000..6ed3f039987 --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/ClassAndLoader.java @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +import static jdk.nashorn.internal.runtime.ECMAErrors.typeError; + +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +/** + * A tuple of a class loader and a single class representative of the classes that can be loaded through it. Its + * equals/hashCode is defined in terms of the identity of the class loader. The rationale for this class is that it + * couples a class loader with a random representative class coming from that loader - this representative class is then + * used to determine if one loader can see the other loader's classes. + */ +final class ClassAndLoader { + private final Class representativeClass; + // Don't access this directly; most of the time, use getRetrievedLoader(), or if you know what you're doing, + // getLoader(). + private ClassLoader loader; + // We have mild affinity against eagerly retrieving the loader, as we need to do it in a privileged block. For + // the most basic case of looking up an already-generated adapter info for a single type, we avoid it. + private boolean loaderRetrieved; + + ClassAndLoader(final Class representativeClass, final boolean retrieveLoader) { + this.representativeClass = representativeClass; + if(retrieveLoader) { + retrieveLoader(); + } + } + + Class getRepresentativeClass() { + return representativeClass; + } + + boolean canSee(ClassAndLoader other) { + try { + final Class otherClass = other.getRepresentativeClass(); + return Class.forName(otherClass.getName(), false, getLoader()) == otherClass; + } catch (final ClassNotFoundException e) { + return false; + } + } + + ClassLoader getLoader() { + if(!loaderRetrieved) { + retrieveLoader(); + } + return getRetrievedLoader(); + } + + ClassLoader getRetrievedLoader() { + assert loaderRetrieved; + return loader; + } + + private void retrieveLoader() { + loader = representativeClass.getClassLoader(); + loaderRetrieved = true; + } + + @Override + public boolean equals(final Object obj) { + return obj instanceof ClassAndLoader && ((ClassAndLoader)obj).getRetrievedLoader() == getRetrievedLoader(); + } + + @Override + public int hashCode() { + return System.identityHashCode(getRetrievedLoader()); + } + + /** + * Given a list of types that define the superclass/interfaces for an adapter class, returns a single type from the + * list that will be used to attach the adapter to its ClassValue. The first type in the array that is defined in a + * class loader that can also see all other types is returned. If there is no such loader, an exception is thrown. + * @param types the input types + * @return the first type from the array that is defined in a class loader that can also see all other types. + */ + static ClassAndLoader getDefiningClassAndLoader(final Class[] types) { + // Short circuit the cheap case + if(types.length == 1) { + return new ClassAndLoader(types[0], false); + } + + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public ClassAndLoader run() { + return getDefiningClassAndLoaderPrivileged(types); + } + }); + } + + static ClassAndLoader getDefiningClassAndLoaderPrivileged(final Class[] types) { + final Collection maximumVisibilityLoaders = getMaximumVisibilityLoaders(types); + + final Iterator it = maximumVisibilityLoaders.iterator(); + if(maximumVisibilityLoaders.size() == 1) { + // Fortunate case - single maximally specific class loader; return its representative class. + return it.next(); + } + + // Ambiguity; throw an error. + assert maximumVisibilityLoaders.size() > 1; // basically, can't be zero + final StringBuilder b = new StringBuilder(); + b.append(it.next().getRepresentativeClass().getCanonicalName()); + while(it.hasNext()) { + b.append(", ").append(it.next().getRepresentativeClass().getCanonicalName()); + } + throw typeError("extend.ambiguous.defining.class", b.toString()); + } + + /** + * Given an array of types, return a subset of their class loaders that are maximal according to the + * "can see other loaders' classes" relation, which is presumed to be a partial ordering. + * @param types types + * @return a collection of maximum visibility class loaders. It is guaranteed to have at least one element. + */ + private static Collection getMaximumVisibilityLoaders(final Class[] types) { + final List maximumVisibilityLoaders = new LinkedList<>(); + outer: for(final ClassAndLoader maxCandidate: getClassLoadersForTypes(types)) { + final Iterator it = maximumVisibilityLoaders.iterator(); + while(it.hasNext()) { + final ClassAndLoader existingMax = it.next(); + final boolean candidateSeesExisting = maxCandidate.canSee(existingMax); + final boolean exitingSeesCandidate = existingMax.canSee(maxCandidate); + if(candidateSeesExisting) { + if(!exitingSeesCandidate) { + // The candidate sees the the existing maximum, so drop the existing one as it's no longer maximal. + it.remove(); + } + // NOTE: there's also the anomalous case where both loaders see each other. Not sure what to do + // about that one, as two distinct class loaders both seeing each other's classes is weird and + // violates the assumption that the relation "sees others' classes" is a partial ordering. We'll + // just not do anything, and treat them as incomparable; hopefully some later class loader that + // comes along can eliminate both of them, if it can not, we'll end up with ambiguity anyway and + // throw an error at the end. + } else if(exitingSeesCandidate) { + // Existing sees the candidate, so drop the candidate. + continue outer; + } + } + // If we get here, no existing maximum visibility loader could see the candidate, so the candidate is a new + // maximum. + maximumVisibilityLoaders.add(maxCandidate); + } + return maximumVisibilityLoaders; + } + + private static Collection getClassLoadersForTypes(final Class[] types) { + final Map classesAndLoaders = new LinkedHashMap<>(); + for(final Class c: types) { + final ClassAndLoader cl = new ClassAndLoader(c, true); + if(!classesAndLoaders.containsKey(cl)) { + classesAndLoaders.put(cl, cl); + } + } + return classesAndLoaders.keySet(); + } +} \ No newline at end of file diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java new file mode 100644 index 00000000000..ea47878a335 --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterBytecodeGenerator.java @@ -0,0 +1,884 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PRIVATE; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_VARARGS; +import static jdk.internal.org.objectweb.asm.Opcodes.ACONST_NULL; +import static jdk.internal.org.objectweb.asm.Opcodes.ALOAD; +import static jdk.internal.org.objectweb.asm.Opcodes.ASTORE; +import static jdk.internal.org.objectweb.asm.Opcodes.DUP; +import static jdk.internal.org.objectweb.asm.Opcodes.IFNONNULL; +import static jdk.internal.org.objectweb.asm.Opcodes.ILOAD; +import static jdk.internal.org.objectweb.asm.Opcodes.ISTORE; +import static jdk.internal.org.objectweb.asm.Opcodes.POP; +import static jdk.internal.org.objectweb.asm.Opcodes.RETURN; +import static jdk.nashorn.internal.lookup.Lookup.MH; +import static jdk.nashorn.internal.runtime.linker.AdaptationResult.Outcome.ERROR_NO_ACCESSIBLE_CONSTRUCTOR; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodType; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.SecureRandom; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Random; +import java.util.Set; +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.Label; +import jdk.internal.org.objectweb.asm.Opcodes; +import jdk.internal.org.objectweb.asm.Type; +import jdk.internal.org.objectweb.asm.commons.InstructionAdapter; +import jdk.nashorn.internal.runtime.Context; +import jdk.nashorn.internal.runtime.ScriptFunction; +import jdk.nashorn.internal.runtime.ScriptObject; + +/** + * Generates bytecode for a Java adapter class. Used by the {@link JavaAdapterFactory}. + *

+ * For every protected or public constructor in the extended class, the adapter class will have between one to three + * public constructors (visibility of protected constructors in the extended class is promoted to public). + *

    + *
  • In every case, a constructor taking a trailing ScriptObject argument preceded by original constructor arguments + * is always created on the adapter class. When such a constructor is invoked, the passed ScriptObject's member + * functions are used to implement and/or override methods on the original class, dispatched by name. A single + * JavaScript function will act as the implementation for all overloaded methods of the same name. When methods on an + * adapter instance are invoked, the functions are invoked having the ScriptObject passed in the instance constructor as + * their "this". Subsequent changes to the ScriptObject (reassignment or removal of its functions) are not reflected in + * the adapter instance; the method implementations are bound to functions at constructor invocation time. + * {@code java.lang.Object} methods {@code equals}, {@code hashCode}, and {@code toString} can also be overridden. The + * only restriction is that since every JavaScript object already has a {@code toString} function through the + * {@code Object.prototype}, the {@code toString} in the adapter is only overridden if the passed ScriptObject has a + * {@code toString} function as its own property, and not inherited from a prototype. All other adapter methods can be + * implemented or overridden through a prototype-inherited function of the ScriptObject passed to the constructor too. + *
  • + *
  • + * If the original types collectively have only one abstract method, or have several of them, but all share the + * same name, an additional constructor is provided for every original constructor; this one takes a ScriptFunction as + * its last argument preceded by original constructor arguments. This constructor will use the passed function as the + * implementation for all abstract methods. For consistency, any concrete methods sharing the single abstract method + * name will also be overridden by the function. When methods on the adapter instance are invoked, the ScriptFunction is + * invoked with {@code null} as its "this". + *
  • + *
  • + * If the adapter being generated can have class-level overrides, constructors taking same arguments as the superclass + * constructors are also created. These constructors simply delegate to the superclass constructor. They are used to + * create instances of the adapter class with no instance-level overrides. + *
  • + *
+ *

+ * For adapter methods that return values, all the JavaScript-to-Java conversions supported by Nashorn will be in effect + * to coerce the JavaScript function return value to the expected Java return type. + *

+ * Since we are adding a trailing argument to the generated constructors in the adapter class, they will never be + * declared as variable arity, even if the original constructor in the superclass was declared as variable arity. The + * reason we are passing the additional argument at the end of the argument list instead at the front is that the + * source-level script expression new X(a, b) { ... } (which is a proprietary syntax extension Nashorn uses + * to resemble Java anonymous classes) is actually equivalent to new X(a, b, { ... }). + *

+ * It is possible to create two different classes: those that can have both class-level and instance-level overrides, + * and those that can only have instance-level overrides. When + * {@link JavaAdapterFactory#getAdapterClassFor(Class[], ScriptObject)} is invoked with non-null {@code classOverrides} + * parameter, an adapter class is created that can have class-level overrides, and the passed script object will be used + * as the implementations for its methods, just as in the above case of the constructor taking a script object. Note + * that in the case of class-level overrides, a new adapter class is created on every invocation, and the implementation + * object is bound to the class, not to any instance. All created instances will share these functions. Of course, when + * instances of such a class are being created, they can still take another object (or possibly a function) in their + * constructor's trailing position and thus provide further instance-specific overrides. The order of invocation is + * always instance-specified method, then a class-specified method, and finally the superclass method. + */ +final class JavaAdapterBytecodeGenerator extends JavaAdapterGeneratorBase { + private static final Type SCRIPT_FUNCTION_TYPE = Type.getType(ScriptFunction.class); + private static final Type STRING_TYPE = Type.getType(String.class); + private static final Type METHOD_TYPE_TYPE = Type.getType(MethodType.class); + private static final Type METHOD_HANDLE_TYPE = Type.getType(MethodHandle.class); + private static final String GET_HANDLE_OBJECT_DESCRIPTOR = Type.getMethodDescriptor(METHOD_HANDLE_TYPE, + OBJECT_TYPE, STRING_TYPE, METHOD_TYPE_TYPE, Type.BOOLEAN_TYPE); + private static final String GET_HANDLE_FUNCTION_DESCRIPTOR = Type.getMethodDescriptor(METHOD_HANDLE_TYPE, + SCRIPT_FUNCTION_TYPE, METHOD_TYPE_TYPE, Type.BOOLEAN_TYPE); + private static final String GET_CLASS_INITIALIZER_DESCRIPTOR = Type.getMethodDescriptor(SCRIPT_OBJECT_TYPE); + private static final Type RUNTIME_EXCEPTION_TYPE = Type.getType(RuntimeException.class); + private static final Type THROWABLE_TYPE = Type.getType(Throwable.class); + private static final Type UNSUPPORTED_OPERATION_TYPE = Type.getType(UnsupportedOperationException.class); + + private static final String SERVICES_CLASS_TYPE_NAME = Type.getInternalName(JavaAdapterServices.class); + private static final String RUNTIME_EXCEPTION_TYPE_NAME = RUNTIME_EXCEPTION_TYPE.getInternalName(); + private static final String ERROR_TYPE_NAME = Type.getInternalName(Error.class); + private static final String THROWABLE_TYPE_NAME = THROWABLE_TYPE.getInternalName(); + private static final String UNSUPPORTED_OPERATION_TYPE_NAME = UNSUPPORTED_OPERATION_TYPE.getInternalName(); + + private static final String METHOD_HANDLE_TYPE_DESCRIPTOR = METHOD_HANDLE_TYPE.getDescriptor(); + private static final String GET_GLOBAL_METHOD_DESCRIPTOR = Type.getMethodDescriptor(SCRIPT_OBJECT_TYPE); + private static final String GET_CLASS_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.getType(Class.class)); + + // Package used when the adapter can't be defined in the adaptee's package (either because it's sealed, or because + // it's a java.* package. + private static final String ADAPTER_PACKAGE_PREFIX = "jdk/nashorn/internal/javaadapters/"; + // Class name suffix used to append to the adaptee class name, when it can be defined in the adaptee's package. + private static final String ADAPTER_CLASS_NAME_SUFFIX = "$$NashornJavaAdapter"; + private static final String JAVA_PACKAGE_PREFIX = "java/"; + private static final int MAX_GENERATED_TYPE_NAME_LENGTH = 238; //255 - 17; 17 is the maximum possible length for the global setter inner class suffix + + private static final String CLASS_INIT = ""; + private static final String STATIC_GLOBAL_FIELD_NAME = "staticGlobal"; + + /** + * Collection of methods we never override: Object.clone(), Object.finalize(). + */ + private static final Collection EXCLUDED = getExcludedMethods(); + + private static final Random random = new SecureRandom(); + + // This is the superclass for our generated adapter. + private final Class superClass; + // Class loader used as the parent for the class loader we'll create to load the generated class. It will be a class + // loader that has the visibility of all original types (class to extend and interfaces to implement) and of the + // Nashorn classes. + private final ClassLoader commonLoader; + // Is this a generator for the version of the class that can have overrides on the class level? + private final boolean classOverride; + // Binary name of the superClass + private final String superClassName; + // Binary name of the generated class. + private final String generatedClassName; + // Binary name of the PrivilegedAction inner class that is used to + private final String globalSetterClassName; + private final Set usedFieldNames = new HashSet<>(); + private final Set abstractMethodNames = new HashSet<>(); + private final String samName; + private final Set finalMethods = new HashSet<>(EXCLUDED); + private final Set methodInfos = new HashSet<>(); + private boolean autoConvertibleFromFunction = false; + + private final ClassWriter cw; + + /** + * Creates a generator for the bytecode for the adapter for the specified superclass and interfaces. + * @param superClass the superclass the adapter will extend. + * @param interfaces the interfaces the adapter will implement. + * @param commonLoader the class loader that can see all of superClass, interfaces, and Nashorn classes. + * @param classOverride true to generate the bytecode for the adapter that has both class-level and instance-level + * overrides, false to generate the bytecode for the adapter that only has instance-level overrides. + * @throws AdaptationException if the adapter can not be generated for some reason. + */ + JavaAdapterBytecodeGenerator(final Class superClass, final List> interfaces, + final ClassLoader commonLoader, final boolean classOverride) throws AdaptationException { + assert superClass != null && !superClass.isInterface(); + assert interfaces != null; + + this.superClass = superClass; + this.classOverride = classOverride; + this.commonLoader = commonLoader; + cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS) { + @Override + protected String getCommonSuperClass(final String type1, final String type2) { + // We need to override ClassWriter.getCommonSuperClass to use this factory's commonLoader as a class + // loader to find the common superclass of two types when needed. + return JavaAdapterBytecodeGenerator.this.getCommonSuperClass(type1, type2); + } + }; + superClassName = Type.getInternalName(superClass); + generatedClassName = getGeneratedClassName(superClass, interfaces); + + // Randomize the name of the privileged global setter, to make it non-feasible to find. + final long l; + synchronized(random) { + l = random.nextLong(); + } + + // NOTE: they way this class name is calculated affects the value of MAX_GENERATED_TYPE_NAME_LENGTH constant. If + // you change the calculation of globalSetterClassName, adjust the constant too. + globalSetterClassName = generatedClassName.concat("$" + Long.toHexString(l & Long.MAX_VALUE)); + cw.visit(Opcodes.V1_7, ACC_PUBLIC | ACC_SUPER | ACC_FINAL, generatedClassName, null, superClassName, getInternalTypeNames(interfaces)); + + generateGlobalFields(); + + gatherMethods(superClass); + gatherMethods(interfaces); + samName = abstractMethodNames.size() == 1 ? abstractMethodNames.iterator().next() : null; + generateHandleFields(); + if(classOverride) { + generateClassInit(); + } + generateConstructors(); + generateMethods(); + // } + cw.visitEnd(); + } + + private void generateGlobalFields() { + cw.visitField(ACC_PRIVATE | ACC_FINAL, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, null).visitEnd(); + usedFieldNames.add(GLOBAL_FIELD_NAME); + if(classOverride) { + cw.visitField(ACC_PRIVATE | ACC_FINAL | ACC_STATIC, STATIC_GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, null).visitEnd(); + usedFieldNames.add(STATIC_GLOBAL_FIELD_NAME); + } + } + + JavaAdapterClassLoader createAdapterClassLoader() { + return new JavaAdapterClassLoader(generatedClassName, cw.toByteArray(), globalSetterClassName); + } + + boolean isAutoConvertibleFromFunction() { + return autoConvertibleFromFunction; + } + + private static String getGeneratedClassName(final Class superType, final List> interfaces) { + // The class we use to primarily name our adapter is either the superclass, or if it is Object (meaning we're + // just implementing interfaces or extending Object), then the first implemented interface or Object. + final Class namingType = superType == Object.class ? (interfaces.isEmpty()? Object.class : interfaces.get(0)) : superType; + final Package pkg = namingType.getPackage(); + final String namingTypeName = Type.getInternalName(namingType); + final StringBuilder buf = new StringBuilder(); + if (namingTypeName.startsWith(JAVA_PACKAGE_PREFIX) || pkg == null || pkg.isSealed()) { + // Can't define new classes in java.* packages + buf.append(ADAPTER_PACKAGE_PREFIX).append(namingTypeName); + } else { + buf.append(namingTypeName).append(ADAPTER_CLASS_NAME_SUFFIX); + } + final Iterator> it = interfaces.iterator(); + if(superType == Object.class && it.hasNext()) { + it.next(); // Skip first interface, it was used to primarily name the adapter + } + // Append interface names to the adapter name + while(it.hasNext()) { + buf.append("$$").append(it.next().getSimpleName()); + } + return buf.toString().substring(0, Math.min(MAX_GENERATED_TYPE_NAME_LENGTH, buf.length())); + } + + /** + * Given a list of class objects, return an array with their binary names. Used to generate the array of interface + * names to implement. + * @param classes the classes + * @return an array of names + */ + private static String[] getInternalTypeNames(final List> classes) { + final int interfaceCount = classes.size(); + final String[] interfaceNames = new String[interfaceCount]; + for(int i = 0; i < interfaceCount; ++i) { + interfaceNames[i] = Type.getInternalName(classes.get(i)); + } + return interfaceNames; + } + + private void generateHandleFields() { + for (final MethodInfo mi: methodInfos) { + cw.visitField(ACC_PRIVATE | ACC_FINAL, mi.methodHandleInstanceFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR, null, null).visitEnd(); + if(classOverride) { + cw.visitField(ACC_PRIVATE | ACC_FINAL | ACC_STATIC, mi.methodHandleClassFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR, null, null).visitEnd(); + } + } + } + + private void generateClassInit() { + final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(ACC_STATIC, CLASS_INIT, + Type.getMethodDescriptor(Type.VOID_TYPE), null, null)); + + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getClassOverrides", GET_CLASS_INITIALIZER_DESCRIPTOR); + // Assign MethodHandle fields through invoking getHandle() + for (final MethodInfo mi : methodInfos) { + mv.dup(); + mv.aconst(mi.getName()); + mv.aconst(Type.getMethodType(mi.type.toMethodDescriptorString())); + mv.iconst(mi.method.isVarArgs() ? 1 : 0); + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", GET_HANDLE_OBJECT_DESCRIPTOR); + mv.putstatic(generatedClassName, mi.methodHandleClassFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); + } + + // Assign "staticGlobal = Context.getGlobal()" + invokeGetGlobalWithNullCheck(mv); + mv.putstatic(generatedClassName, STATIC_GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); + + endInitMethod(mv); + } + + private static void invokeGetGlobalWithNullCheck(final InstructionAdapter mv) { + invokeGetGlobal(mv); + mv.dup(); + mv.invokevirtual(OBJECT_TYPE_NAME, "getClass", GET_CLASS_METHOD_DESCRIPTOR); // check against null Context + mv.pop(); + } + + private void generateConstructors() throws AdaptationException { + boolean gotCtor = false; + for (final Constructor ctor: superClass.getDeclaredConstructors()) { + final int modifier = ctor.getModifiers(); + if((modifier & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0) { + generateConstructors(ctor); + gotCtor = true; + } + } + if(!gotCtor) { + throw new AdaptationException(ERROR_NO_ACCESSIBLE_CONSTRUCTOR, superClass.getCanonicalName()); + } + } + + private void generateConstructors(final Constructor ctor) { + if(classOverride) { + // Generate a constructor that just delegates to ctor. This is used with class-level overrides, when we want + // to create instances without further per-instance overrides. + generateDelegatingConstructor(ctor); + } + + // Generate a constructor that delegates to ctor, but takes an additional ScriptObject parameter at the + // beginning of its parameter list. + generateOverridingConstructor(ctor, false); + + if (samName != null) { + if (!autoConvertibleFromFunction && ctor.getParameterTypes().length == 0) { + // If the original type only has a single abstract method name, as well as a default ctor, then it can + // be automatically converted from JS function. + autoConvertibleFromFunction = true; + } + // If all our abstract methods have a single name, generate an additional constructor, one that takes a + // ScriptFunction as its first parameter and assigns it as the implementation for all abstract methods. + generateOverridingConstructor(ctor, true); + } + } + + private void generateDelegatingConstructor(final Constructor ctor) { + final Type originalCtorType = Type.getType(ctor); + final Type[] argTypes = originalCtorType.getArgumentTypes(); + + // All constructors must be public, even if in the superclass they were protected. + final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(ACC_PUBLIC, INIT, + Type.getMethodDescriptor(originalCtorType.getReturnType(), argTypes), null, null)); + + mv.visitCode(); + // Invoke super constructor with the same arguments. + mv.visitVarInsn(ALOAD, 0); + int offset = 1; // First arg is at position 1, after this. + for (Type argType: argTypes) { + mv.load(offset, argType); + offset += argType.getSize(); + } + mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor()); + + endInitMethod(mv); + } + + /** + * Generates a constructor for the adapter class. This constructor will take the same arguments as the supertype + * constructor passed as the argument here, and delegate to it. However, it will take an additional argument of + * either ScriptObject or ScriptFunction type (based on the value of the "fromFunction" parameter), and initialize + * all the method handle fields of the adapter instance with functions from the script object (or the script + * function itself, if that's what's passed). There is one method handle field in the adapter class for every method + * that can be implemented or overridden; the name of every field is same as the name of the method, with a number + * suffix that makes it unique in case of overloaded methods. The generated constructor will invoke + * {@link #getHandle(ScriptFunction, MethodType, boolean)} or {@link #getHandle(Object, String, MethodType, + * boolean)} to obtain the method handles; these methods make sure to add the necessary conversions and arity + * adjustments so that the resulting method handles can be invoked from generated methods using {@code invokeExact}. + * The constructor that takes a script function will only initialize the methods with the same name as the single + * abstract method. The constructor will also store the Nashorn global that was current at the constructor + * invocation time in a field named "global". The generated constructor will be public, regardless of whether the + * supertype constructor was public or protected. The generated constructor will not be variable arity, even if the + * supertype constructor was. + * @param ctor the supertype constructor that is serving as the base for the generated constructor. + * @param fromFunction true if we're generating a constructor that initializes SAM types from a single + * ScriptFunction passed to it, false if we're generating a constructor that initializes an arbitrary type from a + * ScriptObject passed to it. + */ + private void generateOverridingConstructor(final Constructor ctor, final boolean fromFunction) { + final Type originalCtorType = Type.getType(ctor); + final Type[] originalArgTypes = originalCtorType.getArgumentTypes(); + final int argLen = originalArgTypes.length; + final Type[] newArgTypes = new Type[argLen + 1]; + + // Insert ScriptFunction|Object as the last argument to the constructor + final Type extraArgumentType = fromFunction ? SCRIPT_FUNCTION_TYPE : OBJECT_TYPE; + newArgTypes[argLen] = extraArgumentType; + System.arraycopy(originalArgTypes, 0, newArgTypes, 0, argLen); + + // All constructors must be public, even if in the superclass they were protected. + // Existing super constructor (this, args...) triggers generating (this, scriptObj, args...). + final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(ACC_PUBLIC, INIT, + Type.getMethodDescriptor(originalCtorType.getReturnType(), newArgTypes), null, null)); + + mv.visitCode(); + // First, invoke super constructor with original arguments. If the form of the constructor we're generating is + // (this, args..., scriptFn), then we're invoking super.(this, args...). + mv.visitVarInsn(ALOAD, 0); + final Class[] argTypes = ctor.getParameterTypes(); + int offset = 1; // First arg is at position 1, after this. + for (int i = 0; i < argLen; ++i) { + final Type argType = Type.getType(argTypes[i]); + mv.load(offset, argType); + offset += argType.getSize(); + } + mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor()); + + // Get a descriptor to the appropriate "JavaAdapterFactory.getHandle" method. + final String getHandleDescriptor = fromFunction ? GET_HANDLE_FUNCTION_DESCRIPTOR : GET_HANDLE_OBJECT_DESCRIPTOR; + + // Assign MethodHandle fields through invoking getHandle() + for (final MethodInfo mi : methodInfos) { + mv.visitVarInsn(ALOAD, 0); + if (fromFunction && !mi.getName().equals(samName)) { + // Constructors initializing from a ScriptFunction only initialize methods with the SAM name. + // NOTE: if there's a concrete overloaded method sharing the SAM name, it'll be overriden too. This + // is a deliberate design choice. All other method handles are initialized to null. + mv.visitInsn(ACONST_NULL); + } else { + mv.visitVarInsn(ALOAD, offset); + if(!fromFunction) { + mv.aconst(mi.getName()); + } + mv.aconst(Type.getMethodType(mi.type.toMethodDescriptorString())); + mv.iconst(mi.method.isVarArgs() ? 1 : 0); + mv.invokestatic(SERVICES_CLASS_TYPE_NAME, "getHandle", getHandleDescriptor); + } + mv.putfield(generatedClassName, mi.methodHandleInstanceFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); + } + + // Assign "this.global = Context.getGlobal()" + mv.visitVarInsn(ALOAD, 0); + invokeGetGlobalWithNullCheck(mv); + mv.putfield(generatedClassName, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); + + endInitMethod(mv); + } + + private static void endInitMethod(final InstructionAdapter mv) { + mv.visitInsn(RETURN); + mv.visitMaxs(0, 0); + mv.visitEnd(); + } + + private static void invokeGetGlobal(final InstructionAdapter mv) { + mv.invokestatic(CONTEXT_TYPE_NAME, "getGlobal", GET_GLOBAL_METHOD_DESCRIPTOR); + } + + private void invokeSetGlobal(final InstructionAdapter mv) { + mv.invokestatic(globalSetterClassName, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR); + } + + /** + * Encapsulation of the information used to generate methods in the adapter classes. Basically, a wrapper around the + * reflective Method object, a cached MethodType, and the name of the field in the adapter class that will hold the + * method handle serving as the implementation of this method in adapter instances. + * + */ + private static class MethodInfo { + private final Method method; + private final MethodType type; + private String methodHandleInstanceFieldName; + private String methodHandleClassFieldName; + + private MethodInfo(final Class clazz, final String name, final Class... argTypes) throws NoSuchMethodException { + this(clazz.getDeclaredMethod(name, argTypes)); + } + + private MethodInfo(final Method method) { + this.method = method; + this.type = MH.type(method.getReturnType(), method.getParameterTypes()); + } + + @Override + public boolean equals(final Object obj) { + return obj instanceof MethodInfo && equals((MethodInfo)obj); + } + + private boolean equals(final MethodInfo other) { + // Only method name and type are used for comparison; method handle field name is not. + return getName().equals(other.getName()) && type.equals(other.type); + } + + String getName() { + return method.getName(); + } + + @Override + public int hashCode() { + return getName().hashCode() ^ type.hashCode(); + } + + void setIsCanonical(final Set usedFieldNames, boolean classOverride) { + methodHandleInstanceFieldName = nextName(usedFieldNames); + if(classOverride) { + methodHandleClassFieldName = nextName(usedFieldNames); + } + } + + String nextName(final Set usedFieldNames) { + int i = 0; + final String name = getName(); + String nextName = name; + while (!usedFieldNames.add(nextName)) { + final String ordinal = String.valueOf(i++); + final int maxNameLen = 255 - ordinal.length(); + nextName = (name.length() <= maxNameLen ? name : name.substring(0, maxNameLen)).concat(ordinal); + } + return nextName; + } + + } + + private void generateMethods() { + for(final MethodInfo mi: methodInfos) { + generateMethod(mi); + } + } + + /** + * Generates a method in the adapter class that adapts a method from the original class. The generated methods will + * inspect the method handle field assigned to them. If it is null (the JS object doesn't provide an implementation + * for the method) then it will either invoke its version in the supertype, or if it is abstract, throw an + * {@link UnsupportedOperationException}. Otherwise, if the method handle field's value is not null, the handle is + * invoked using invokeExact (signature polymorphic invocation as per JLS 15.12.3). Before the invocation, the + * current Nashorn {@link Context} is checked, and if it is different than the global used to create the adapter + * instance, the creating global is set to be the current global. In this case, the previously current global is + * restored after the invocation. If invokeExact results in a Throwable that is not one of the method's declared + * exceptions, and is not an unchecked throwable, then it is wrapped into a {@link RuntimeException} and the runtime + * exception is thrown. The method handle retrieved from the field is guaranteed to exactly match the signature of + * the method; this is guaranteed by the way constructors of the adapter class obtain them using + * {@link #getHandle(Object, String, MethodType, boolean)}. + * @param mi the method info describing the method to be generated. + */ + private void generateMethod(final MethodInfo mi) { + final Method method = mi.method; + final int mod = method.getModifiers(); + final int access = ACC_PUBLIC | (method.isVarArgs() ? ACC_VARARGS : 0); + final Class[] exceptions = method.getExceptionTypes(); + final String[] exceptionNames = new String[exceptions.length]; + for (int i = 0; i < exceptions.length; ++i) { + exceptionNames[i] = Type.getInternalName(exceptions[i]); + } + final MethodType type = mi.type; + final String methodDesc = type.toMethodDescriptorString(); + final String name = mi.getName(); + + final Type asmType = Type.getMethodType(methodDesc); + final Type[] asmArgTypes = asmType.getArgumentTypes(); + + // Determine the first index for a local variable + int nextLocalVar = 1; // this + for(final Type t: asmArgTypes) { + nextLocalVar += t.getSize(); + } + + final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(access, name, methodDesc, null, + exceptionNames)); + mv.visitCode(); + + final Label instanceHandleDefined = new Label(); + final Label classHandleDefined = new Label(); + + final Type asmReturnType = Type.getType(type.returnType()); + + // See if we have instance handle defined + mv.visitVarInsn(ALOAD, 0); + mv.getfield(generatedClassName, mi.methodHandleInstanceFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); + // stack: [instanceHandle] + jumpIfNonNullKeepOperand(mv, instanceHandleDefined); + + if(classOverride) { + // See if we have the static handle + mv.getstatic(generatedClassName, mi.methodHandleClassFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); + // stack: [classHandle] + jumpIfNonNullKeepOperand(mv, classHandleDefined); + } + + // No handle is available, fall back to default behavior + if(Modifier.isAbstract(mod)) { + // If the super method is abstract, throw an exception + mv.anew(UNSUPPORTED_OPERATION_TYPE); + mv.dup(); + mv.invokespecial(UNSUPPORTED_OPERATION_TYPE_NAME, INIT, VOID_NOARG_METHOD_DESCRIPTOR); + mv.athrow(); + } else { + // If the super method is not abstract, delegate to it. + mv.visitVarInsn(ALOAD, 0); + int nextParam = 1; + for(final Type t: asmArgTypes) { + mv.load(nextParam, t); + nextParam += t.getSize(); + } + mv.invokespecial(superClassName, name, methodDesc); + mv.areturn(asmReturnType); + } + + final Label setupGlobal = new Label(); + + if(classOverride) { + mv.visitLabel(classHandleDefined); + // If class handle is defined, load the static defining global + mv.getstatic(generatedClassName, STATIC_GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); + // stack: [creatingGlobal := classGlobal, classHandle] + mv.goTo(setupGlobal); + } + + mv.visitLabel(instanceHandleDefined); + // If instance handle is defined, load the instance defining global + mv.visitVarInsn(ALOAD, 0); + mv.getfield(generatedClassName, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); + // stack: [creatingGlobal := instanceGlobal, instanceHandle] + + // fallthrough to setupGlobal + + // stack: [creatingGlobal, someHandle] + mv.visitLabel(setupGlobal); + + final int currentGlobalVar = nextLocalVar++; + final int globalsDifferVar = nextLocalVar++; + + mv.dup(); + // stack: [creatingGlobal, creatingGlobal, someHandle] + + // Emit code for switching to the creating global + // ScriptObject currentGlobal = Context.getGlobal(); + invokeGetGlobal(mv); + mv.dup(); + mv.visitVarInsn(ASTORE, currentGlobalVar); + // stack: [currentGlobal, creatingGlobal, creatingGlobal, someHandle] + // if(definingGlobal == currentGlobal) { + final Label globalsDiffer = new Label(); + mv.ifacmpne(globalsDiffer); + // stack: [someGlobal, someHandle] + // globalsDiffer = false + mv.pop(); + // stack: [someHandle] + mv.iconst(0); // false + // stack: [false, someHandle] + final Label invokeHandle = new Label(); + mv.goTo(invokeHandle); + mv.visitLabel(globalsDiffer); + // } else { + // Context.setGlobal(definingGlobal); + // stack: [someGlobal, someHandle] + invokeSetGlobal(mv); + // stack: [someHandle] + // globalsDiffer = true + mv.iconst(1); + // stack: [true, someHandle] + + mv.visitLabel(invokeHandle); + mv.visitVarInsn(ISTORE, globalsDifferVar); + // stack: [someHandle] + + // Load all parameters back on stack for dynamic invocation. + int varOffset = 1; + for (final Type t : asmArgTypes) { + mv.load(varOffset, t); + varOffset += t.getSize(); + } + + // Invoke the target method handle + final Label tryBlockStart = new Label(); + mv.visitLabel(tryBlockStart); + mv.invokevirtual(METHOD_HANDLE_TYPE.getInternalName(), "invokeExact", type.toMethodDescriptorString()); + final Label tryBlockEnd = new Label(); + mv.visitLabel(tryBlockEnd); + emitFinally(mv, currentGlobalVar, globalsDifferVar); + mv.areturn(asmReturnType); + + // If Throwable is not declared, we need an adapter from Throwable to RuntimeException + final boolean throwableDeclared = isThrowableDeclared(exceptions); + final Label throwableHandler; + if (!throwableDeclared) { + // Add "throw new RuntimeException(Throwable)" handler for Throwable + throwableHandler = new Label(); + mv.visitLabel(throwableHandler); + mv.anew(RUNTIME_EXCEPTION_TYPE); + mv.dupX1(); + mv.swap(); + mv.invokespecial(RUNTIME_EXCEPTION_TYPE_NAME, INIT, Type.getMethodDescriptor(Type.VOID_TYPE, THROWABLE_TYPE)); + // Fall through to rethrow handler + } else { + throwableHandler = null; + } + final Label rethrowHandler = new Label(); + mv.visitLabel(rethrowHandler); + // Rethrow handler for RuntimeException, Error, and all declared exception types + emitFinally(mv, currentGlobalVar, globalsDifferVar); + mv.athrow(); + final Label methodEnd = new Label(); + mv.visitLabel(methodEnd); + + mv.visitLocalVariable("currentGlobal", SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, setupGlobal, methodEnd, currentGlobalVar); + mv.visitLocalVariable("globalsDiffer", Type.INT_TYPE.getDescriptor(), null, setupGlobal, methodEnd, globalsDifferVar); + + if(throwableDeclared) { + mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, THROWABLE_TYPE_NAME); + assert throwableHandler == null; + } else { + mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, RUNTIME_EXCEPTION_TYPE_NAME); + mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, ERROR_TYPE_NAME); + for(final String excName: exceptionNames) { + mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, excName); + } + mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, throwableHandler, THROWABLE_TYPE_NAME); + } + mv.visitMaxs(0, 0); + mv.visitEnd(); + } + + /** + * Emits code for jumping to a label if the top stack operand is not null. The operand is kept on the stack if it + * is not null (so is available to code at the jump address) and is popped if it is null. + * @param mv the instruction adapter being used to emit code + * @param label the label to jump to + */ + private static void jumpIfNonNullKeepOperand(final InstructionAdapter mv, final Label label) { + mv.visitInsn(DUP); + mv.visitJumpInsn(IFNONNULL, label); + mv.visitInsn(POP); + } + + /** + * Emit code to restore the previous Nashorn Context when needed. + * @param mv the instruction adapter + * @param currentGlobalVar index of the local variable holding the reference to the current global at method + * entry. + * @param globalsDifferVar index of the boolean local variable that is true if the global needs to be restored. + */ + private void emitFinally(final InstructionAdapter mv, final int currentGlobalVar, final int globalsDifferVar) { + // Emit code to restore the previous Nashorn global if needed + mv.visitVarInsn(ILOAD, globalsDifferVar); + final Label skip = new Label(); + mv.ifeq(skip); + mv.visitVarInsn(ALOAD, currentGlobalVar); + invokeSetGlobal(mv); + mv.visitLabel(skip); + } + + private static boolean isThrowableDeclared(final Class[] exceptions) { + for (final Class exception : exceptions) { + if (exception == Throwable.class) { + return true; + } + } + return false; + } + + /** + * Gathers methods that can be implemented or overridden from the specified type into this factory's + * {@link #methodInfos} set. It will add all non-final, non-static methods that are either public or protected from + * the type if the type itself is public. If the type is a class, the method will recursively invoke itself for its + * superclass and the interfaces it implements, and add further methods that were not directly declared on the + * class. + * @param type the type defining the methods. + */ + private void gatherMethods(final Class type) { + if (Modifier.isPublic(type.getModifiers())) { + final Method[] typeMethods = type.isInterface() ? type.getMethods() : type.getDeclaredMethods(); + + for (final Method typeMethod: typeMethods) { + final int m = typeMethod.getModifiers(); + if (Modifier.isStatic(m)) { + continue; + } + if (Modifier.isPublic(m) || Modifier.isProtected(m)) { + final MethodInfo mi = new MethodInfo(typeMethod); + if (Modifier.isFinal(m)) { + finalMethods.add(mi); + } else if (!finalMethods.contains(mi) && methodInfos.add(mi)) { + if (Modifier.isAbstract(m)) { + abstractMethodNames.add(mi.getName()); + } + mi.setIsCanonical(usedFieldNames, classOverride); + } + } + } + } + // If the type is a class, visit its superclasses and declared interfaces. If it's an interface, we're done. + // Needing to invoke the method recursively for a non-interface Class object is the consequence of needing to + // see all declared protected methods, and Class.getDeclaredMethods() doesn't provide those declared in a + // superclass. For interfaces, we used Class.getMethods(), as we're only interested in public ones there, and + // getMethods() does provide those declared in a superinterface. + if (!type.isInterface()) { + final Class superType = type.getSuperclass(); + if (superType != null) { + gatherMethods(superType); + } + for (final Class itf: type.getInterfaces()) { + gatherMethods(itf); + } + } + } + + private void gatherMethods(final List> classes) { + for(final Class c: classes) { + gatherMethods(c); + } + } + + /** + * Creates a collection of methods that are not final, but we still never allow them to be overridden in adapters, + * as explicitly declaring them automatically is a bad idea. Currently, this means {@code Object.finalize()} and + * {@code Object.clone()}. + * @return a collection of method infos representing those methods that we never override in adapter classes. + */ + private static Collection getExcludedMethods() { + return AccessController.doPrivileged(new PrivilegedAction>() { + @Override + public Collection run() { + try { + return Arrays.asList( + new MethodInfo(Object.class, "finalize"), + new MethodInfo(Object.class, "clone")); + } catch (final NoSuchMethodException e) { + throw new AssertionError(e); + } + } + }); + } + + private String getCommonSuperClass(final String type1, final String type2) { + try { + final Class c1 = Class.forName(type1.replace('/', '.'), false, commonLoader); + final Class c2 = Class.forName(type2.replace('/', '.'), false, commonLoader); + if (c1.isAssignableFrom(c2)) { + return type1; + } + if (c2.isAssignableFrom(c1)) { + return type2; + } + if (c1.isInterface() || c2.isInterface()) { + return OBJECT_TYPE_NAME; + } + return assignableSuperClass(c1, c2).getName().replace('.', '/'); + } catch(final ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + + private static Class assignableSuperClass(final Class c1, final Class c2) { + final Class superClass = c1.getSuperclass(); + return superClass.isAssignableFrom(c2) ? superClass : assignableSuperClass(superClass, c2); + } +} diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java new file mode 100644 index 00000000000..c791274e6d5 --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterClassLoader.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PRIVATE; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC; +import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER; +import static jdk.internal.org.objectweb.asm.Opcodes.ACONST_NULL; +import static jdk.internal.org.objectweb.asm.Opcodes.ALOAD; +import static jdk.internal.org.objectweb.asm.Opcodes.ARETURN; +import static jdk.internal.org.objectweb.asm.Opcodes.RETURN; + +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSigner; +import java.security.CodeSource; +import java.security.Permissions; +import java.security.PrivilegedAction; +import java.security.ProtectionDomain; +import java.security.SecureClassLoader; +import jdk.internal.dynalink.beans.StaticClass; +import jdk.internal.org.objectweb.asm.ClassWriter; +import jdk.internal.org.objectweb.asm.Opcodes; +import jdk.internal.org.objectweb.asm.Type; +import jdk.internal.org.objectweb.asm.commons.InstructionAdapter; +import jdk.nashorn.internal.runtime.Context; +import jdk.nashorn.internal.runtime.ScriptObject; + +/** + * This class encapsulates the bytecode of the adapter class and can be used to load it into the JVM as an actual Class. + * It can be invoked repeatedly to create multiple adapter classes from the same bytecode; adapter classes that have + * class-level overrides must be re-created for every set of such overrides. Note that while this class is named + * "class loader", it does not, in fact, extend {@code ClassLoader}, but rather uses them internally. Instances of this + * class are normally created by {@link JavaAdapterBytecodeGenerator}. + */ +class JavaAdapterClassLoader extends JavaAdapterGeneratorBase { + private static final Type PRIVILEGED_ACTION_TYPE = Type.getType(PrivilegedAction.class); + + private static final String PRIVILEGED_ACTION_TYPE_NAME = PRIVILEGED_ACTION_TYPE.getInternalName(); + private static final String PRIVILEGED_RUN_METHOD_DESCRIPTOR = Type.getMethodDescriptor(OBJECT_TYPE); + + private static final ProtectionDomain GENERATED_PROTECTION_DOMAIN = createGeneratedProtectionDomain(); + + private final String className; + private final byte[] classBytes; + private final String globalSetterClassName; + + JavaAdapterClassLoader(String className, byte[] classBytes, String globalSetterClassName) { + this.className = className.replace('/', '.'); + this.classBytes = classBytes; + this.globalSetterClassName = globalSetterClassName.replace('/', '.'); + } + + /** + * Loads the generated adapter class into the JVM. + * @param parentLoader the parent class loader for the generated class loader + * @return the generated adapter class + */ + StaticClass generateClass(final ClassLoader parentLoader) { + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public StaticClass run() { + try { + return StaticClass.forClass(Class.forName(className, true, createClassLoader(parentLoader))); + } catch (final ClassNotFoundException e) { + throw new AssertionError(e); // cannot happen + } + } + }); + } + + private static class AdapterLoader extends SecureClassLoader { + AdapterLoader(ClassLoader parent) { + super(parent); + } + } + + static boolean isAdapterClass(Class clazz) { + return clazz.getClassLoader() instanceof AdapterLoader; + } + + // Note that the adapter class is created in the protection domain of the class/interface being + // extended/implemented, and only the privileged global setter action class is generated in the protection domain + // of Nashorn itself. Also note that the creation and loading of the global setter is deferred until it is + // required by JVM linker, which will only happen on first invocation of any of the adapted method. We could defer + // it even more by separating its invocation into a separate static method on the adapter class, but then someone + // with ability to introspect on the class and use setAccessible(true) on it could invoke the method. It's a + // security tradeoff... + private ClassLoader createClassLoader(final ClassLoader parentLoader) { + return new AdapterLoader(parentLoader) { + private final ClassLoader myLoader = getClass().getClassLoader(); + private final ProtectionDomain myProtectionDomain = getClass().getProtectionDomain(); + + @Override + public Class loadClass(final String name, final boolean resolve) throws ClassNotFoundException { + try { + return super.loadClass(name, resolve); + } catch (final SecurityException se) { + // we may be implementing an interface or extending a class that was + // loaded by a loader that prevents package.access. If so, it'd throw + // SecurityException for nashorn's classes!. For adapter's to work, we + // should be able to refer to nashorn classes. + if (name.startsWith("jdk.nashorn.internal.")) { + return myLoader.loadClass(name); + } + throw se; + } + } + + @Override + protected Class findClass(final String name) throws ClassNotFoundException { + if(name.equals(className)) { + return defineClass(name, classBytes, 0, classBytes.length, GENERATED_PROTECTION_DOMAIN); + } else if(name.equals(globalSetterClassName)) { + final byte[] bytes = generatePrivilegedActionClassBytes(globalSetterClassName.replace('.', '/')); + return defineClass(name, bytes, 0, bytes.length, myProtectionDomain); + } else { + throw new ClassNotFoundException(name); + } + } + }; + } + + private static ProtectionDomain createGeneratedProtectionDomain() { + // Generated classes need to have AllPermission. Since we require the "createClassLoader" RuntimePermission, we + // can create a class loader that'll load new classes with any permissions. Our generated classes are just + // delegating adapters, so having AllPermission can't cause anything wrong; the effective set of permissions for + // the executing script functions will still be limited by the permissions of the caller and the permissions of + // the script. + final Permissions permissions = new Permissions(); + permissions.add(new AllPermission()); + return new ProtectionDomain(new CodeSource(null, (CodeSigner[])null), permissions); + } + + /** + * Generates a PrivilegedAction implementation class for invoking {@link Context#setGlobal(ScriptObject)} from the + * adapter class. + */ + private static byte[] generatePrivilegedActionClassBytes(final String className) { + final ClassWriter w = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); + // class GlobalSetter implements PrivilegedAction { + w.visit(Opcodes.V1_7, ACC_SUPER | ACC_FINAL, className, null, OBJECT_TYPE_NAME, new String[] { + PRIVILEGED_ACTION_TYPE_NAME + }); + + // private final ScriptObject global; + w.visitField(ACC_PRIVATE | ACC_FINAL, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, null).visitEnd(); + + // private GlobalSetter(ScriptObject global) { + InstructionAdapter mv = new InstructionAdapter(w.visitMethod(ACC_PRIVATE, INIT, + SET_GLOBAL_METHOD_DESCRIPTOR, null, new String[0])); + mv.visitCode(); + // super(); + mv.visitVarInsn(ALOAD, 0); + mv.invokespecial(OBJECT_TYPE_NAME, INIT, VOID_NOARG_METHOD_DESCRIPTOR); + // this.global = global; + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.putfield(className, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); + + mv.visitInsn(RETURN); + mv.visitEnd(); + mv.visitMaxs(0, 0); + + // public Object run() { + mv = new InstructionAdapter(w.visitMethod(ACC_PUBLIC, "run", PRIVILEGED_RUN_METHOD_DESCRIPTOR, null, + new String[0])); + mv.visitCode(); + // Context.setGlobal(this.global); + mv.visitVarInsn(ALOAD, 0); + mv.getfield(className, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); + mv.invokestatic(CONTEXT_TYPE_NAME, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR); + // return null; + mv.visitInsn(ACONST_NULL); + mv.visitInsn(ARETURN); + + mv.visitEnd(); + mv.visitMaxs(0, 0); + + // static void setGlobal(ScriptObject global) { + mv = new InstructionAdapter(w.visitMethod(ACC_STATIC, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR, null, + new String[0])); + mv.visitCode(); + // new GlobalSetter(ScriptObject global) + mv.anew(Type.getType("L" + className + ";")); + mv.dup(); + mv.visitVarInsn(ALOAD, 0); + mv.invokespecial(className, INIT, SET_GLOBAL_METHOD_DESCRIPTOR); + // AccessController.doPrivileged(...) + mv.invokestatic(Type.getInternalName(AccessController.class), "doPrivileged", Type.getMethodDescriptor( + OBJECT_TYPE, PRIVILEGED_ACTION_TYPE)); + mv.pop(); + mv.visitInsn(RETURN); + + mv.visitEnd(); + mv.visitMaxs(0, 0); + + return w.toByteArray(); + } +} diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java index 7b0d6d76190..f3f51fd8d48 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterFactory.java @@ -25,110 +25,39 @@ package jdk.nashorn.internal.runtime.linker; -import static jdk.internal.org.objectweb.asm.Opcodes.ACC_FINAL; -import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PRIVATE; -import static jdk.internal.org.objectweb.asm.Opcodes.ACC_PUBLIC; -import static jdk.internal.org.objectweb.asm.Opcodes.ACC_STATIC; -import static jdk.internal.org.objectweb.asm.Opcodes.ACC_SUPER; -import static jdk.internal.org.objectweb.asm.Opcodes.ACC_VARARGS; -import static jdk.internal.org.objectweb.asm.Opcodes.ACONST_NULL; -import static jdk.internal.org.objectweb.asm.Opcodes.ALOAD; -import static jdk.internal.org.objectweb.asm.Opcodes.ARETURN; -import static jdk.internal.org.objectweb.asm.Opcodes.ASTORE; -import static jdk.internal.org.objectweb.asm.Opcodes.DUP; -import static jdk.internal.org.objectweb.asm.Opcodes.IFNONNULL; -import static jdk.internal.org.objectweb.asm.Opcodes.ILOAD; -import static jdk.internal.org.objectweb.asm.Opcodes.ISTORE; -import static jdk.internal.org.objectweb.asm.Opcodes.RETURN; -import static jdk.nashorn.internal.runtime.ECMAErrors.typeError; import static jdk.nashorn.internal.lookup.Lookup.MH; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodType; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.security.AccessController; -import java.security.AllPermission; -import java.security.CodeSigner; -import java.security.CodeSource; -import java.security.Permissions; import java.security.PrivilegedAction; import java.security.PrivilegedExceptionAction; -import java.security.ProtectionDomain; -import java.security.SecureClassLoader; -import java.security.SecureRandom; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Random; -import java.util.Set; import jdk.internal.dynalink.beans.StaticClass; import jdk.internal.dynalink.support.LinkRequestImpl; -import jdk.internal.org.objectweb.asm.ClassWriter; -import jdk.internal.org.objectweb.asm.Label; -import jdk.internal.org.objectweb.asm.Opcodes; -import jdk.internal.org.objectweb.asm.Type; -import jdk.internal.org.objectweb.asm.commons.InstructionAdapter; import jdk.nashorn.internal.objects.NativeJava; -import jdk.nashorn.internal.runtime.Context; -import jdk.nashorn.internal.runtime.ECMAErrors; import jdk.nashorn.internal.runtime.ECMAException; import jdk.nashorn.internal.runtime.ScriptFunction; import jdk.nashorn.internal.runtime.ScriptObject; -import jdk.nashorn.internal.runtime.ScriptRuntime; -import jdk.nashorn.internal.runtime.Undefined; /** *

A factory class that generates adapter classes. Adapter classes allow implementation of Java interfaces and * extending of Java classes from JavaScript. For every combination of a superclass to extend and interfaces to * implement (collectively: "original types"), exactly one adapter class is generated that extends the specified - * superclass and implements the specified interfaces. + * superclass and implements the specified interfaces. (But see the discussion of class-based overrides for exceptions.) *

* The adapter class is generated in a new secure class loader that inherits Nashorn's protection domain, and has either * one of the original types' class loader or the Nashorn's class loader as its parent - the parent class loader * is chosen so that all the original types and the Nashorn core classes are visible from it (as the adapter will have * constant pool references to ScriptObject and ScriptFunction classes). In case none of the candidate class loaders has - * visibility of all the required types, an error is thrown. - *

- * For every protected or public constructor in the extended class, the adapter class will have one or two public - * constructors (visibility of protected constructors in the extended class is promoted to public). In every case, for - * every original constructor, a new constructor taking a trailing ScriptObject argument preceded by original - * constructor arguments is present on the adapter class. When such a constructor is invoked, the passed ScriptObject's - * member functions are used to implement and/or override methods on the original class, dispatched by name. A single - * JavaScript function will act as the implementation for all overloaded methods of the same name. When methods on an - * adapter instance are invoked, the functions are invoked having the ScriptObject passed in the instance constructor as - * their "this". Subsequent changes to the ScriptObject (reassignment or removal of its functions) are not reflected in - * the adapter instance; the method implementations are bound to functions at constructor invocation time. - * {@code java.lang.Object} methods {@code equals}, {@code hashCode}, and {@code toString} can also be overridden. The - * only restriction is that since every JavaScript object already has a {@code toString} function through the - * {@code Object.prototype}, the {@code toString} in the adapter is only overridden if the passed ScriptObject has a - * {@code toString} function as its own property, and not inherited from a prototype. All other adapter methods can be - * implemented or overridden through a prototype-inherited function of the ScriptObject passed to the constructor too. - *

- * If the original types collectively have only one abstract method, or have several of them, but all share the - * same name, an additional constructor is provided for every original constructor; this one takes a ScriptFunction as - * its last argument preceded by original constructor arguments. This constructor will use the passed function as the - * implementation for all abstract methods. For consistency, any concrete methods sharing the single abstract method - * name will also be overridden by the function. When methods on the adapter instance are invoked, the ScriptFunction is - * invoked with {@code null} as its "this". - *

- * For adapter methods that return values, all the JavaScript-to-Java conversions supported by Nashorn will be in effect - * to coerce the JavaScript function return value to the expected Java return type. - *

- * Since we are adding a trailing argument to the generated constructors in the adapter class, they will never be - * declared as variable arity, even if the original constructor in the superclass was declared as variable arity. The - * reason we are passing the additional argument at the end of the argument list instead at the front is that the - * source-level script expression new X(a, b) { ... } (which is a proprietary syntax extension Nashorn uses - * to resemble Java anonymous classes) is actually equivalent to new X(a, b, { ... }). + * visibility of all the required types, an error is thrown. The class uses {@link JavaAdapterBytecodeGenerator} to + * generate the adapter class itself; see its documentation for details about the generated class. *

* You normally don't use this class directly, but rather either create adapters from script using * {@link NativeJava#extend(Object, Object...)}, using the {@code new} operator on abstract classes and interfaces (see @@ -138,72 +67,6 @@ import jdk.nashorn.internal.runtime.Undefined; */ public final class JavaAdapterFactory { - private static final Type SCRIPT_FUNCTION_TYPE = Type.getType(ScriptFunction.class); - private static final Type SCRIPT_OBJECT_TYPE = Type.getType(ScriptObject.class); - private static final Type OBJECT_TYPE = Type.getType(Object.class); - private static final Type STRING_TYPE = Type.getType(String.class); - private static final Type CONTEXT_TYPE = Type.getType(Context.class); - private static final Type METHOD_TYPE_TYPE = Type.getType(MethodType.class); - private static final Type METHOD_HANDLE_TYPE = Type.getType(MethodHandle.class); - private static final String GET_HANDLE_OBJECT_DESCRIPTOR = Type.getMethodDescriptor(METHOD_HANDLE_TYPE, - OBJECT_TYPE, STRING_TYPE, METHOD_TYPE_TYPE, Type.BOOLEAN_TYPE); - private static final String GET_HANDLE_FUNCTION_DESCRIPTOR = Type.getMethodDescriptor(METHOD_HANDLE_TYPE, - SCRIPT_FUNCTION_TYPE, METHOD_TYPE_TYPE, Type.BOOLEAN_TYPE); - private static final Type RUNTIME_EXCEPTION_TYPE = Type.getType(RuntimeException.class); - private static final Type THROWABLE_TYPE = Type.getType(Throwable.class); - private static final Type PRIVILEGED_ACTION_TYPE = Type.getType(PrivilegedAction.class); - private static final Type UNSUPPORTED_OPERATION_TYPE = Type.getType(UnsupportedOperationException.class); - - private static final String THIS_CLASS_TYPE_NAME = Type.getInternalName(JavaAdapterFactory.class); - private static final String RUNTIME_EXCEPTION_TYPE_NAME = RUNTIME_EXCEPTION_TYPE.getInternalName(); - private static final String ERROR_TYPE_NAME = Type.getInternalName(Error.class); - private static final String THROWABLE_TYPE_NAME = THROWABLE_TYPE.getInternalName(); - private static final String CONTEXT_TYPE_NAME = CONTEXT_TYPE.getInternalName(); - private static final String OBJECT_TYPE_NAME = OBJECT_TYPE.getInternalName(); - private static final String PRIVILEGED_ACTION_TYPE_NAME = PRIVILEGED_ACTION_TYPE.getInternalName(); - private static final String UNSUPPORTED_OPERATION_TYPE_NAME = UNSUPPORTED_OPERATION_TYPE.getInternalName(); - - private static final String METHOD_HANDLE_TYPE_DESCRIPTOR = METHOD_HANDLE_TYPE.getDescriptor(); - private static final String SCRIPT_OBJECT_TYPE_DESCRIPTOR = SCRIPT_OBJECT_TYPE.getDescriptor(); - private static final String GET_GLOBAL_METHOD_DESCRIPTOR = Type.getMethodDescriptor(SCRIPT_OBJECT_TYPE); - private static final String SET_GLOBAL_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE, SCRIPT_OBJECT_TYPE); - private static final String GET_CLASS_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.getType(Class.class)); - private static final String PRIVILEGED_RUN_METHOD_DESCRIPTOR = Type.getMethodDescriptor(OBJECT_TYPE); - - // Package used when the adapter can't be defined in the adaptee's package (either because it's sealed, or because - // it's a java.* package. - private static final String ADAPTER_PACKAGE_PREFIX = "jdk/nashorn/internal/javaadapters/"; - // Class name suffix used to append to the adaptee class name, when it can be defined in the adaptee's package. - private static final String ADAPTER_CLASS_NAME_SUFFIX = "$$NashornJavaAdapter"; - private static final String JAVA_PACKAGE_PREFIX = "java/"; - private static final int MAX_GENERATED_TYPE_NAME_LENGTH = 238; //255 - 17; 17 is the maximum possible length for the global setter inner class suffix - - private static final String INIT = ""; - private static final String VOID_NOARG = Type.getMethodDescriptor(Type.VOID_TYPE); - private static final String GLOBAL_FIELD_NAME = "global"; - - /** - * Contains various outcomes for attempting to generate an adapter class. These are stored in AdapterInfo instances. - * We have a successful outcome (adapter class was generated) and four possible error outcomes: superclass is final, - * superclass is not public, superclass has no public or protected constructor, more than one superclass was - * specified. We don't throw exceptions when we try to generate the adapter, but rather just record these error - * conditions as they are still useful as partial outcomes, as Nashorn's linker can still successfully check whether - * the class can be autoconverted from a script function even when it is not possible to generate an adapter for it. - */ - private enum AdaptationOutcome { - SUCCESS, - ERROR_FINAL_CLASS, - ERROR_NON_PUBLIC_CLASS, - ERROR_NO_ACCESSIBLE_CONSTRUCTOR, - ERROR_MULTIPLE_SUPERCLASSES, - ERROR_NO_COMMON_LOADER - } - - /** - * Collection of methods we never override: Object.clone(), Object.finalize(). - */ - private static final Collection EXCLUDED = getExcludedMethods(); - /** * A mapping from an original Class object to AdapterInfo representing the adapter for the class it represents. */ @@ -214,127 +77,6 @@ public final class JavaAdapterFactory { } }; - private static final Random random = new SecureRandom(); - private static final ProtectionDomain GENERATED_PROTECTION_DOMAIN = createGeneratedProtectionDomain(); - - // This is the superclass for our generated adapter. - private final Class superClass; - // Class loader used as the parent for the class loader we'll create to load the generated class. It will be a class - // loader that has the visibility of all original types (class to extend and interfaces to implement) and of the - // Nashorn classes. - private final ClassLoader commonLoader; - - // Binary name of the superClass - private final String superClassName; - // Binary name of the generated class. - private final String generatedClassName; - // Binary name of the PrivilegedAction inner class that is used to - private final String globalSetterClassName; - private final Set usedFieldNames = new HashSet<>(); - private final Set abstractMethodNames = new HashSet<>(); - private final String samName; - private final Set finalMethods = new HashSet<>(EXCLUDED); - private final Set methodInfos = new HashSet<>(); - private boolean autoConvertibleFromFunction = false; - - private final ClassWriter cw; - - /** - * Creates a factory that will produce the adapter type for the specified original type. - * @param originalType the type for which this factory will generate the adapter type. - * @param definingClassAndLoader the class in whose ClassValue we'll store the generated adapter, and its class loader. - * @throws AdaptationException if the adapter can not be generated for some reason. - */ - private JavaAdapterFactory(final Class superType, final List> interfaces, final ClassAndLoader definingClassAndLoader) throws AdaptationException { - assert superType != null && !superType.isInterface(); - assert interfaces != null; - assert definingClassAndLoader != null; - - this.superClass = superType; - this.commonLoader = findCommonLoader(definingClassAndLoader); - cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS) { - @Override - protected String getCommonSuperClass(final String type1, final String type2) { - // We need to override ClassWriter.getCommonSuperClass to use this factory's commonLoader as a class - // loader to find the common superclass of two types when needed. - return JavaAdapterFactory.this.getCommonSuperClass(type1, type2); - } - }; - superClassName = Type.getInternalName(superType); - generatedClassName = getGeneratedClassName(superType, interfaces); - - // Randomize the name of the privileged global setter, to make it non-feasible to find. - final long l; - synchronized(random) { - l = random.nextLong(); - } - // NOTE: they way this class name is calculated affects the value of MAX_GENERATED_TYPE_NAME_LENGTH constant. If - // you change the calculation of globalSetterClassName, adjust the constant too. - globalSetterClassName = generatedClassName.concat("$" + Long.toHexString(l & Long.MAX_VALUE)); - cw.visit(Opcodes.V1_7, ACC_PUBLIC | ACC_SUPER | ACC_FINAL, generatedClassName, null, superClassName, getInternalTypeNames(interfaces)); - cw.visitField(ACC_PRIVATE | ACC_FINAL, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, null).visitEnd(); - usedFieldNames.add(GLOBAL_FIELD_NAME); - - gatherMethods(superType); - gatherMethods(interfaces); - samName = abstractMethodNames.size() == 1 ? abstractMethodNames.iterator().next() : null; - generateFields(); - generateConstructors(); - generateMethods(); - // } - cw.visitEnd(); - } - - private static String getGeneratedClassName(final Class superType, final List> interfaces) { - // The class we use to primarily name our adapter is either the superclass, or if it is Object (meaning we're - // just implementing interfaces or extending Object), then the first implemented interface or Object. - final Class namingType = superType == Object.class ? (interfaces.isEmpty()? Object.class : interfaces.get(0)) : superType; - final Package pkg = namingType.getPackage(); - final String namingTypeName = Type.getInternalName(namingType); - final StringBuilder buf = new StringBuilder(); - if (namingTypeName.startsWith(JAVA_PACKAGE_PREFIX) || pkg == null || pkg.isSealed()) { - // Can't define new classes in java.* packages - buf.append(ADAPTER_PACKAGE_PREFIX).append(namingTypeName); - } else { - buf.append(namingTypeName).append(ADAPTER_CLASS_NAME_SUFFIX); - } - final Iterator> it = interfaces.iterator(); - if(superType == Object.class && it.hasNext()) { - it.next(); // Skip first interface, it was used to primarily name the adapter - } - // Append interface names to the adapter name - while(it.hasNext()) { - buf.append("$$").append(it.next().getSimpleName()); - } - return buf.toString().substring(0, Math.min(MAX_GENERATED_TYPE_NAME_LENGTH, buf.length())); - } - - /** - * Given a list of class objects, return an array with their binary names. Used to generate the array of interface - * names to implement. - * @param classes the classes - * @return an array of names - */ - private static String[] getInternalTypeNames(final List> classes) { - final int interfaceCount = classes.size(); - final String[] interfaceNames = new String[interfaceCount]; - for(int i = 0; i < interfaceCount; ++i) { - interfaceNames[i] = Type.getInternalName(classes.get(i)); - } - return interfaceNames; - } - - /** - * Utility method used by few other places in the code. Tests if the class has the abstract modifier and is not an - * array class. For some reason, array classes have the abstract modifier set in HotSpot JVM, and we don't want to - * treat array classes as abstract. - * @param clazz the inspected class - * @return true if the class is abstract and is not an array type. - */ - static boolean isAbstractClass(final Class clazz) { - return Modifier.isAbstract(clazz.getModifiers()) && !clazz.isArray(); - } - /** * Returns an adapter class for the specified original types. The adapter class extends/implements the original * class/interfaces. @@ -346,27 +88,68 @@ public final class JavaAdapterFactory { * in the list already implement/extend, or {@code java.lang.Object} in a list of types consisting purely of * interfaces) will result in a different adapter class, even though those adapter classes are functionally * identical; we deliberately don't want to incur the additional processing cost of canonicalizing type lists. + * @param classOverrides a JavaScript object with functions serving as the class-level overrides and + * implementations. These overrides are defined for all instances of the class, and can be further overridden on a + * per-instance basis by passing additional objects in the constructor. * @return an adapter class. See this class' documentation for details on the generated adapter class. * @throws ECMAException with a TypeError if the adapter class can not be generated because the original class is * final, non-public, or has no public or protected constructors. */ - public static StaticClass getAdapterClassFor(final Class[] types) { + public static StaticClass getAdapterClassFor(final Class[] types, ScriptObject classOverrides) { assert types != null && types.length > 0; - final AdapterInfo adapterInfo = getAdapterInfo(types); + return getAdapterInfo(types).getAdapterClassFor(classOverrides); + } - final StaticClass clazz = adapterInfo.adapterClass; - if (clazz != null) { - return clazz; - } - adapterInfo.adaptationOutcome.typeError(); + /** + * Returns a method handle representing a constructor that takes a single argument of the source type (which, + * really, should be one of {@link ScriptObject}, {@link ScriptFunction}, or {@link Object}, and returns an instance + * of the adapter for the target type. Used to implement the function autoconverters as well as the Nashorn's + * JSR-223 script engine's {@code getInterface()} method. + * @param sourceType the source type; should be either {@link ScriptObject}, {@link ScriptFunction}, or + * {@link Object}. In case of {@code Object}, it will return a method handle that dispatches to either the script + * object or function constructor at invocation based on the actual argument. + * @param targetType the target type, for which adapter instances will be created + * @return the constructor method handle. + * @throws Exception if anything goes wrong + */ + public static MethodHandle getConstructor(final Class sourceType, final Class targetType) throws Exception { + final StaticClass adapterClass = getAdapterClassFor(new Class[] { targetType }, null); + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override + public MethodHandle run() throws Exception { + return MH.bindTo(Bootstrap.getLinkerServices().getGuardedInvocation(new LinkRequestImpl(NashornCallSiteDescriptor.get( + "dyn:new", MethodType.methodType(targetType, StaticClass.class, sourceType), 0), false, + adapterClass, null)).getInvocation(), adapterClass); + } + }); + } - throw new AssertionError(); + /** + * Tells if the given Class is an adapter or support class + * @param clazz Class object + * @return true if the Class given is adapter or support class + */ + public static boolean isAdapterClass(Class clazz) { + return JavaAdapterClassLoader.isAdapterClass(clazz); + } + + /** + * Returns whether an instance of the specified class/interface can be generated from a ScriptFunction. Returns true + * iff: the adapter for the class/interface can be created, it is abstract (this includes interfaces), it has at + * least one abstract method, all the abstract methods share the same name, and it has a public or protected default + * constructor. Note that invoking this class will most likely result in the adapter class being defined in the JVM + * if it hasn't been already. + * @param clazz the inspected class + * @return true iff an instance of the specified class/interface can be generated from a ScriptFunction. + */ + static boolean isAutoConvertibleFromFunction(final Class clazz) { + return getAdapterInfo(new Class[] { clazz }).autoConvertibleFromFunction; } private static AdapterInfo getAdapterInfo(final Class[] types) { - final ClassAndLoader definingClassAndLoader = getDefiningClassAndLoader(types); + final ClassAndLoader definingClassAndLoader = ClassAndLoader.getDefiningClassAndLoader(types); - final Map>, AdapterInfo> adapterInfoMap = ADAPTER_INFO_MAPS.get(definingClassAndLoader.clazz); + final Map>, AdapterInfo> adapterInfoMap = ADAPTER_INFO_MAPS.get(definingClassAndLoader.getRepresentativeClass()); final List> typeList = types.length == 1 ? getSingletonClassList(types[0]) : Arrays.asList(types.clone()); AdapterInfo adapterInfo; synchronized(adapterInfoMap) { @@ -384,740 +167,6 @@ public final class JavaAdapterFactory { return (List)Collections.singletonList(clazz); } - /** - * Returns whether an instance of the specified class/interface can be generated from a ScriptFunction. Returns true - * iff: the adapter for the class/interface can be created, it is abstract (this includes interfaces), it has at - * least one abstract method, all the abstract methods share the same name, and it has a public or protected default - * constructor. Note that invoking this class will most likely result in the adapter class being defined in the JVM - * if it hasn't been already. - * @param clazz the inspected class - * @return true iff an instance of the specified class/interface can be generated from a ScriptFunction. - */ - static boolean isAutoConvertibleFromFunction(final Class clazz) { - return getAdapterInfo(new Class[] { clazz }).autoConvertibleFromFunction; - } - - /** - * Returns a method handle representing a constructor that takes a single argument of the source type (which, - * really, should be one of {@link ScriptObject}, {@link ScriptFunction}, or {@link Object}, and returns an instance - * of the adapter for the target type. Used to implement the function autoconverters as well as the Nashorn's - * JSR-223 script engine's {@code getInterface()} method. - * @param sourceType the source type; should be either {@link ScriptObject}, {@link ScriptFunction}, or - * {@link Object}. In case of {@code Object}, it will return a method handle that dispatches to either the script - * object or function constructor at invocation based on the actual argument. - * @param targetType the target type, for which adapter instances will be created - * @return the constructor method handle. - * @throws Exception if anything goes wrong - */ - public static MethodHandle getConstructor(final Class sourceType, final Class targetType) throws Exception { - final StaticClass adapterClass = getAdapterClassFor(new Class[] { targetType }); - return AccessController.doPrivileged(new PrivilegedExceptionAction() { - @Override - public MethodHandle run() throws Exception { - return MH.bindTo(Bootstrap.getLinkerServices().getGuardedInvocation(new LinkRequestImpl(NashornCallSiteDescriptor.get( - "dyn:new", MethodType.methodType(targetType, StaticClass.class, sourceType), 0), false, - adapterClass, null)).getInvocation(), adapterClass); - } - }); - } - - /** - * Finishes the bytecode generation for the adapter class that was started in the constructor, and loads the - * bytecode as a new class into the JVM. - * @return the generated adapter class - */ - private Class generateClass() { - final String binaryName = generatedClassName.replace('/', '.'); - try { - return Class.forName(binaryName, true, createClassLoader(commonLoader, binaryName, cw.toByteArray(), - globalSetterClassName.replace('/', '.'))); - } catch (final ClassNotFoundException e) { - throw new AssertionError(e); // cannot happen - } - } - - /** - * Tells if the given Class is an adapter or support class - * @param clazz Class object - * @return true if the Class given is adapter or support class - */ - public static boolean isAdapterClass(Class clazz) { - return clazz.getClassLoader() instanceof AdapterLoader; - } - - private static class AdapterLoader extends SecureClassLoader { - AdapterLoader(ClassLoader parent) { - super(parent); - } - } - - // Creation of class loader is in a separate static method so that it doesn't retain a reference to the factory - // instance. Note that the adapter class is created in the protection domain of the class/interface being - // extended/implemented, and only the privileged global setter action class is generated in the protection domain - // of Nashorn itself. Also note that the creation and loading of the global setter is deferred until it is - // required by JVM linker, which will only happen on first invocation of any of the adapted method. We could defer - // it even more by separating its invocation into a separate static method on the adapter class, but then someone - // with ability to introspect on the class and use setAccessible(true) on it could invoke the method. It's a - // security tradeoff... - private static ClassLoader createClassLoader(final ClassLoader parentLoader, final String className, - final byte[] classBytes, final String privilegedActionClassName) { - return new AdapterLoader(parentLoader) { - private final ClassLoader myLoader = getClass().getClassLoader(); - private final ProtectionDomain myProtectionDomain = getClass().getProtectionDomain(); - - @Override - public Class loadClass(final String name, final boolean resolve) throws ClassNotFoundException { - try { - return super.loadClass(name, resolve); - } catch (final SecurityException se) { - // we may be implementing an interface or extending a class that was - // loaded by a loader that prevents package.access. If so, it'd throw - // SecurityException for nashorn's classes!. For adapter's to work, we - // should be able to refer to nashorn classes. - if (name.startsWith("jdk.nashorn.internal.")) { - return myLoader.loadClass(name); - } - throw se; - } - } - - @Override - protected Class findClass(final String name) throws ClassNotFoundException { - if(name.equals(className)) { - final byte[] bytes = classBytes; - return defineClass(name, bytes, 0, bytes.length, GENERATED_PROTECTION_DOMAIN); - } else if(name.equals(privilegedActionClassName)) { - final byte[] bytes = generatePrivilegedActionClassBytes(privilegedActionClassName.replace('.', '/')); - return defineClass(name, bytes, 0, bytes.length, myProtectionDomain); - } else { - throw new ClassNotFoundException(name); - } - } - }; - } - - /** - * Generates a PrivilegedAction implementation class for invoking {@link Context#setGlobal(ScriptObject)} from the - * adapter class. - */ - private static byte[] generatePrivilegedActionClassBytes(final String className) { - final ClassWriter w = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); - // class GlobalSetter implements PrivilegedAction { - w.visit(Opcodes.V1_7, ACC_SUPER | ACC_FINAL, className, null, OBJECT_TYPE_NAME, new String[] { - PRIVILEGED_ACTION_TYPE_NAME - }); - - // private final ScriptObject global; - w.visitField(ACC_PRIVATE | ACC_FINAL, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, null).visitEnd(); - - // private GlobalSetter(ScriptObject global) { - InstructionAdapter mv = new InstructionAdapter(w.visitMethod(ACC_PRIVATE, INIT, - SET_GLOBAL_METHOD_DESCRIPTOR, null, new String[0])); - mv.visitCode(); - // super(); - mv.visitVarInsn(ALOAD, 0); - mv.invokespecial(OBJECT_TYPE_NAME, INIT, VOID_NOARG); - // this.global = global; - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.putfield(className, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); - - mv.visitInsn(RETURN); - mv.visitEnd(); - mv.visitMaxs(0, 0); - - // public Object run() { - mv = new InstructionAdapter(w.visitMethod(ACC_PUBLIC, "run", PRIVILEGED_RUN_METHOD_DESCRIPTOR, null, - new String[0])); - mv.visitCode(); - // Context.setGlobal(this.global); - mv.visitVarInsn(ALOAD, 0); - mv.getfield(className, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); - mv.invokestatic(CONTEXT_TYPE_NAME, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR); - // return null; - mv.visitInsn(ACONST_NULL); - mv.visitInsn(ARETURN); - - mv.visitEnd(); - mv.visitMaxs(0, 0); - - // static void setGlobal(ScriptObject global) { - mv = new InstructionAdapter(w.visitMethod(ACC_STATIC, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR, null, - new String[0])); - mv.visitCode(); - // new GlobalSetter(ScriptObject global) - mv.anew(Type.getType("L" + className + ";")); - mv.dup(); - mv.visitVarInsn(ALOAD, 0); - mv.invokespecial(className, INIT, SET_GLOBAL_METHOD_DESCRIPTOR); - // AccessController.doPrivileged(...) - mv.invokestatic(Type.getInternalName(AccessController.class), "doPrivileged", Type.getMethodDescriptor( - OBJECT_TYPE, PRIVILEGED_ACTION_TYPE)); - mv.pop(); - mv.visitInsn(RETURN); - - mv.visitEnd(); - mv.visitMaxs(0, 0); - - return w.toByteArray(); - } - - private void generateFields() { - for (final MethodInfo mi: methodInfos) { - cw.visitField(ACC_PRIVATE | ACC_FINAL, mi.methodHandleFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR, null, null).visitEnd(); - } - } - - private void generateConstructors() throws AdaptationException { - boolean gotCtor = false; - for (final Constructor ctor: superClass.getDeclaredConstructors()) { - final int modifier = ctor.getModifiers(); - if((modifier & (Modifier.PUBLIC | Modifier.PROTECTED)) != 0) { - generateConstructor(ctor); - gotCtor = true; - } - } - if(!gotCtor) { - throw new AdaptationException(AdaptationOutcome.ERROR_NO_ACCESSIBLE_CONSTRUCTOR, superClass.getCanonicalName()); - } - } - - boolean isAutoConvertibleFromFunction() { - return autoConvertibleFromFunction; - } - - private void generateConstructor(final Constructor ctor) { - // Generate a constructor that delegates to ctor, but takes an additional ScriptObject parameter at the - // beginning of its parameter list. - generateConstructor(ctor, false); - - if (samName != null) { - if (!autoConvertibleFromFunction && ctor.getParameterTypes().length == 0) { - // If the original type only has a single abstract method name, as well as a default ctor, then it can - // be automatically converted from JS function. - autoConvertibleFromFunction = true; - } - // If all our abstract methods have a single name, generate an additional constructor, one that takes a - // ScriptFunction as its first parameter and assigns it as the implementation for all abstract methods. - generateConstructor(ctor, true); - } - } - - /** - * Generates a constructor for the adapter class. This constructor will take the same arguments as the supertype - * constructor passed as the argument here, and delegate to it. However, it will take an additional argument of - * either ScriptObject or ScriptFunction type (based on the value of the "fromFunction" parameter), and initialize - * all the method handle fields of the adapter instance with functions from the script object (or the script - * function itself, if that's what's passed). There is one method handle field in the adapter class for every method - * that can be implemented or overridden; the name of every field is same as the name of the method, with a number - * suffix that makes it unique in case of overloaded methods. The generated constructor will invoke - * {@link #getHandle(ScriptFunction, MethodType, boolean)} or {@link #getHandle(Object, String, MethodType, - * boolean)} to obtain the method handles; these methods make sure to add the necessary conversions and arity - * adjustments so that the resulting method handles can be invoked from generated methods using {@code invokeExact}. - * The constructor that takes a script function will only initialize the methods with the same name as the single - * abstract method. The constructor will also store the Nashorn global that was current at the constructor - * invocation time in a field named "global". The generated constructor will be public, regardless of whether the - * supertype constructor was public or protected. The generated constructor will not be variable arity, even if the - * supertype constructor was. - * @param ctor the supertype constructor that is serving as the base for the generated constructor. - * @param fromFunction true if we're generating a constructor that initializes SAM types from a single - * ScriptFunction passed to it, false if we're generating a constructor that initializes an arbitrary type from a - * ScriptObject passed to it. - */ - private void generateConstructor(final Constructor ctor, final boolean fromFunction) { - final Type originalCtorType = Type.getType(ctor); - final Type[] originalArgTypes = originalCtorType.getArgumentTypes(); - final int argLen = originalArgTypes.length; - final Type[] newArgTypes = new Type[argLen + 1]; - - // Insert ScriptFunction|Object as the last argument to the constructor - final Type extraArgumentType = fromFunction ? SCRIPT_FUNCTION_TYPE : OBJECT_TYPE; - newArgTypes[argLen] = extraArgumentType; - System.arraycopy(originalArgTypes, 0, newArgTypes, 0, argLen); - - // All constructors must be public, even if in the superclass they were protected. - // Existing super constructor (this, args...) triggers generating (this, scriptObj, args...). - final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(ACC_PUBLIC, INIT, - Type.getMethodDescriptor(originalCtorType.getReturnType(), newArgTypes), null, null)); - - mv.visitCode(); - // First, invoke super constructor with original arguments. If the form of the constructor we're generating is - // (this, args..., scriptFn), then we're invoking super.(this, args...). - mv.visitVarInsn(ALOAD, 0); - final Class[] argTypes = ctor.getParameterTypes(); - int offset = 1; // First arg is at position 1, after this. - for (int i = 0; i < argLen; ++i) { - final Type argType = Type.getType(argTypes[i]); - mv.load(offset, argType); - offset += argType.getSize(); - } - mv.invokespecial(superClassName, INIT, originalCtorType.getDescriptor()); - - // Get a descriptor to the appropriate "JavaAdapterFactory.getHandle" method. - final String getHandleDescriptor = fromFunction ? GET_HANDLE_FUNCTION_DESCRIPTOR : GET_HANDLE_OBJECT_DESCRIPTOR; - - // Assign MethodHandle fields through invoking getHandle() - for (final MethodInfo mi : methodInfos) { - mv.visitVarInsn(ALOAD, 0); - if (fromFunction && !mi.getName().equals(samName)) { - // Constructors initializing from a ScriptFunction only initialize methods with the SAM name. - // NOTE: if there's a concrete overloaded method sharing the SAM name, it'll be overriden too. This - // is a deliberate design choice. All other method handles are initialized to null. - mv.visitInsn(ACONST_NULL); - } else { - mv.visitVarInsn(ALOAD, offset); - if(!fromFunction) { - mv.aconst(mi.getName()); - } - mv.aconst(Type.getMethodType(mi.type.toMethodDescriptorString())); - mv.iconst(mi.method.isVarArgs() ? 1 : 0); - mv.invokestatic(THIS_CLASS_TYPE_NAME, "getHandle", getHandleDescriptor); - } - mv.putfield(generatedClassName, mi.methodHandleFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); - } - - // Assign "this.global = Context.getGlobal()" - mv.visitVarInsn(ALOAD, 0); - invokeGetGlobal(mv); - mv.dup(); - mv.invokevirtual(OBJECT_TYPE_NAME, "getClass", GET_CLASS_METHOD_DESCRIPTOR); // check against null Context - mv.pop(); - mv.putfield(generatedClassName, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); - - // Wrap up - mv.visitInsn(RETURN); - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - private static void invokeGetGlobal(final InstructionAdapter mv) { - mv.invokestatic(CONTEXT_TYPE_NAME, "getGlobal", GET_GLOBAL_METHOD_DESCRIPTOR); - } - - private void invokeSetGlobal(final InstructionAdapter mv) { - mv.invokestatic(globalSetterClassName, "setGlobal", SET_GLOBAL_METHOD_DESCRIPTOR); - } - - /** - * Given a JS script function, binds it to null JS "this", and adapts its parameter types, return types, and arity - * to the specified type and arity. This method is public mainly for implementation reasons, so the adapter classes - * can invoke it from their constructors that take a ScriptFunction in its first argument to obtain the method - * handles for their abstract method implementations. - * @param fn the script function - * @param type the method type it has to conform to - * @param varArg if the Java method for which the function is being adapted is a variable arity method - * @return the appropriately adapted method handle for invoking the script function. - */ - public static MethodHandle getHandle(final ScriptFunction fn, final MethodType type, final boolean varArg) { - // JS "this" will be null for SAMs - return adaptHandle(fn.getBoundInvokeHandle(null), type, varArg); - } - - /** - * Given a JS script object, retrieves a function from it by name, binds it to the script object as its "this", and - * adapts its parameter types, return types, and arity to the specified type and arity. This method is public mainly - * for implementation reasons, so the adapter classes can invoke it from their constructors that take a Object - * in its first argument to obtain the method handles for their method implementations. - * @param obj the script obj - * @param name the name of the property that contains the function - * @param type the method type it has to conform to - * @param varArg if the Java method for which the function is being adapted is a variable arity method - * @return the appropriately adapted method handle for invoking the script function, or null if the value of the - * property is either null or undefined, or "toString" was requested as the name, but the object doesn't directly - * define it but just inherits it through prototype. - */ - public static MethodHandle getHandle(final Object obj, final String name, final MethodType type, final boolean varArg) { - if (! (obj instanceof ScriptObject)) { - throw typeError("not.an.object", ScriptRuntime.safeToString(obj)); - } - - final ScriptObject sobj = (ScriptObject)obj; - // Since every JS Object has a toString, we only override "String toString()" it if it's explicitly specified - if ("toString".equals(name) && !sobj.hasOwnProperty("toString")) { - return null; - } - - final Object fnObj = sobj.get(name); - if (fnObj instanceof ScriptFunction) { - return adaptHandle(((ScriptFunction)fnObj).getBoundInvokeHandle(sobj), type, varArg); - } else if(fnObj == null || fnObj instanceof Undefined) { - return null; - } else { - throw typeError("not.a.function", name); - } - } - - private static MethodHandle adaptHandle(final MethodHandle handle, final MethodType type, final boolean varArg) { - return Bootstrap.getLinkerServices().asType(ScriptObject.pairArguments(handle, type, varArg), type); - } - - /** - * Encapsulation of the information used to generate methods in the adapter classes. Basically, a wrapper around the - * reflective Method object, a cached MethodType, and the name of the field in the adapter class that will hold the - * method handle serving as the implementation of this method in adapter instances. - * - */ - private static class MethodInfo { - private final Method method; - private final MethodType type; - private String methodHandleFieldName; - - private MethodInfo(final Class clazz, final String name, final Class... argTypes) throws NoSuchMethodException { - this(clazz.getDeclaredMethod(name, argTypes)); - } - - private MethodInfo(final Method method) { - this.method = method; - this.type = MH.type(method.getReturnType(), method.getParameterTypes()); - } - - @Override - public boolean equals(final Object obj) { - return obj instanceof MethodInfo && equals((MethodInfo)obj); - } - - private boolean equals(final MethodInfo other) { - // Only method name and type are used for comparison; method handle field name is not. - return getName().equals(other.getName()) && type.equals(other.type); - } - - String getName() { - return method.getName(); - } - - @Override - public int hashCode() { - return getName().hashCode() ^ type.hashCode(); - } - - void setIsCanonical(final Set usedFieldNames) { - int i = 0; - String fieldName = getName(); - while(!usedFieldNames.add(fieldName)) { - fieldName = getName() + (i++); - } - methodHandleFieldName = fieldName; - } - } - - private void generateMethods() { - for(final MethodInfo mi: methodInfos) { - generateMethod(mi); - } - } - - /** - * Generates a method in the adapter class that adapts a method from the original class. The generated methods will - * inspect the method handle field assigned to them. If it is null (the JS object doesn't provide an implementation - * for the method) then it will either invoke its version in the supertype, or if it is abstract, throw an - * {@link UnsupportedOperationException}. Otherwise, if the method handle field's value is not null, the handle is - * invoked using invokeExact (signature polymorphic invocation as per JLS 15.12.3). Before the invocation, the - * current Nashorn {@link Context} is checked, and if it is different than the global used to create the adapter - * instance, the creating global is set to be the current global. In this case, the previously current global is - * restored after the invocation. If invokeExact results in a Throwable that is not one of the method's declared - * exceptions, and is not an unchecked throwable, then it is wrapped into a {@link RuntimeException} and the runtime - * exception is thrown. The method handle retrieved from the field is guaranteed to exactly match the signature of - * the method; this is guaranteed by the way constructors of the adapter class obtain them using - * {@link #getHandle(Object, String, MethodType, boolean)}. - * @param mi the method info describing the method to be generated. - */ - private void generateMethod(final MethodInfo mi) { - final Method method = mi.method; - final int mod = method.getModifiers(); - final int access = ACC_PUBLIC | (method.isVarArgs() ? ACC_VARARGS : 0); - final Class[] exceptions = method.getExceptionTypes(); - final String[] exceptionNames = new String[exceptions.length]; - for (int i = 0; i < exceptions.length; ++i) { - exceptionNames[i] = Type.getInternalName(exceptions[i]); - } - final MethodType type = mi.type; - final String methodDesc = type.toMethodDescriptorString(); - final String name = mi.getName(); - - final Type asmType = Type.getMethodType(methodDesc); - final Type[] asmArgTypes = asmType.getArgumentTypes(); - - // Determine the first index for a local variable - int nextLocalVar = 1; // this - for(final Type t: asmArgTypes) { - nextLocalVar += t.getSize(); - } - - final InstructionAdapter mv = new InstructionAdapter(cw.visitMethod(access, name, methodDesc, null, - exceptionNames)); - mv.visitCode(); - - final Label methodHandleNotNull = new Label(); - final Label methodEnd = new Label(); - - final Type returnType = Type.getType(type.returnType()); - - // Get the method handle - mv.visitVarInsn(ALOAD, 0); - mv.getfield(generatedClassName, mi.methodHandleFieldName, METHOD_HANDLE_TYPE_DESCRIPTOR); - mv.visitInsn(DUP); // It'll remain on the stack all the way until the invocation - // Check if the method handle is null - mv.visitJumpInsn(IFNONNULL, methodHandleNotNull); - if(Modifier.isAbstract(mod)) { - // If it's null, and the method is abstract, throw an exception - mv.anew(UNSUPPORTED_OPERATION_TYPE); - mv.dup(); - mv.invokespecial(UNSUPPORTED_OPERATION_TYPE_NAME, INIT, VOID_NOARG); - mv.athrow(); - } else { - // If it's null, and the method is not abstract, delegate to super method. - mv.visitVarInsn(ALOAD, 0); - int nextParam = 1; - for(final Type t: asmArgTypes) { - mv.load(nextParam, t); - nextParam += t.getSize(); - } - mv.invokespecial(superClassName, name, methodDesc); - mv.areturn(returnType); - } - - mv.visitLabel(methodHandleNotNull); - final int currentGlobalVar = nextLocalVar++; - final int globalsDifferVar = nextLocalVar++; - - // Emit code for switching to the creating global - // ScriptObject currentGlobal = Context.getGlobal(); - invokeGetGlobal(mv); - mv.dup(); - mv.visitVarInsn(ASTORE, currentGlobalVar); - // if(this.global == currentGlobal) { - loadGlobalOnStack(mv); - final Label globalsDiffer = new Label(); - mv.ifacmpne(globalsDiffer); - // globalsDiffer = false - mv.iconst(0); // false - final Label proceed = new Label(); - mv.goTo(proceed); - mv.visitLabel(globalsDiffer); - // } else { - // Context.setGlobal(this.global); - loadGlobalOnStack(mv); - invokeSetGlobal(mv); - // globalsDiffer = true - mv.iconst(1); - - mv.visitLabel(proceed); - mv.visitVarInsn(ISTORE, globalsDifferVar); - - // Load all parameters back on stack for dynamic invocation. - int varOffset = 1; - for (final Type t : asmArgTypes) { - mv.load(varOffset, t); - varOffset += t.getSize(); - } - - // Invoke the target method handle - final Label tryBlockStart = new Label(); - mv.visitLabel(tryBlockStart); - mv.invokevirtual(METHOD_HANDLE_TYPE.getInternalName(), "invokeExact", type.toMethodDescriptorString()); - final Label tryBlockEnd = new Label(); - mv.visitLabel(tryBlockEnd); - emitFinally(mv, currentGlobalVar, globalsDifferVar); - mv.areturn(returnType); - - // If Throwable is not declared, we need an adapter from Throwable to RuntimeException - final boolean throwableDeclared = isThrowableDeclared(exceptions); - final Label throwableHandler; - if (!throwableDeclared) { - // Add "throw new RuntimeException(Throwable)" handler for Throwable - throwableHandler = new Label(); - mv.visitLabel(throwableHandler); - mv.anew(RUNTIME_EXCEPTION_TYPE); - mv.dupX1(); - mv.swap(); - mv.invokespecial(RUNTIME_EXCEPTION_TYPE_NAME, INIT, Type.getMethodDescriptor(Type.VOID_TYPE, THROWABLE_TYPE)); - // Fall through to rethrow handler - } else { - throwableHandler = null; - } - final Label rethrowHandler = new Label(); - mv.visitLabel(rethrowHandler); - // Rethrow handler for RuntimeException, Error, and all declared exception types - emitFinally(mv, currentGlobalVar, globalsDifferVar); - mv.athrow(); - mv.visitLabel(methodEnd); - - mv.visitLocalVariable("currentGlobal", SCRIPT_OBJECT_TYPE_DESCRIPTOR, null, methodHandleNotNull, methodEnd, currentGlobalVar); - mv.visitLocalVariable("globalsDiffer", Type.INT_TYPE.getDescriptor(), null, methodHandleNotNull, methodEnd, globalsDifferVar); - - if(throwableDeclared) { - mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, THROWABLE_TYPE_NAME); - assert throwableHandler == null; - } else { - mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, RUNTIME_EXCEPTION_TYPE_NAME); - mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, ERROR_TYPE_NAME); - for(final String excName: exceptionNames) { - mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, rethrowHandler, excName); - } - mv.visitTryCatchBlock(tryBlockStart, tryBlockEnd, throwableHandler, THROWABLE_TYPE_NAME); - } - mv.visitMaxs(0, 0); - mv.visitEnd(); - } - - /** - * Emit code to restore the previous Nashorn Context when needed. - * @param mv the instruction adapter - * @param currentGlobalVar index of the local variable holding the reference to the current global at method - * entry. - * @param globalsDifferVar index of the boolean local variable that is true if the global needs to be restored. - */ - private void emitFinally(final InstructionAdapter mv, final int currentGlobalVar, final int globalsDifferVar) { - // Emit code to restore the previous Nashorn global if needed - mv.visitVarInsn(ILOAD, globalsDifferVar); - final Label skip = new Label(); - mv.ifeq(skip); - mv.visitVarInsn(ALOAD, currentGlobalVar); - invokeSetGlobal(mv); - mv.visitLabel(skip); - } - - private void loadGlobalOnStack(final InstructionAdapter mv) { - mv.visitVarInsn(ALOAD, 0); - mv.getfield(generatedClassName, GLOBAL_FIELD_NAME, SCRIPT_OBJECT_TYPE_DESCRIPTOR); - } - - private static boolean isThrowableDeclared(final Class[] exceptions) { - for (final Class exception : exceptions) { - if (exception == Throwable.class) { - return true; - } - } - return false; - } - - /** - * Gathers methods that can be implemented or overridden from the specified type into this factory's - * {@link #methodInfos} set. It will add all non-final, non-static methods that are either public or protected from - * the type if the type itself is public. If the type is a class, the method will recursively invoke itself for its - * superclass and the interfaces it implements, and add further methods that were not directly declared on the - * class. - * @param type the type defining the methods. - */ - private void gatherMethods(final Class type) { - if (Modifier.isPublic(type.getModifiers())) { - final Method[] typeMethods = type.isInterface() ? type.getMethods() : type.getDeclaredMethods(); - - for (final Method typeMethod: typeMethods) { - final int m = typeMethod.getModifiers(); - if (Modifier.isStatic(m)) { - continue; - } - if (Modifier.isPublic(m) || Modifier.isProtected(m)) { - final MethodInfo mi = new MethodInfo(typeMethod); - if (Modifier.isFinal(m)) { - finalMethods.add(mi); - } else if (!finalMethods.contains(mi) && methodInfos.add(mi)) { - if (Modifier.isAbstract(m)) { - abstractMethodNames.add(mi.getName()); - } - mi.setIsCanonical(usedFieldNames); - } - } - } - } - // If the type is a class, visit its superclasses and declared interfaces. If it's an interface, we're done. - // Needing to invoke the method recursively for a non-interface Class object is the consequence of needing to - // see all declared protected methods, and Class.getDeclaredMethods() doesn't provide those declared in a - // superclass. For interfaces, we used Class.getMethods(), as we're only interested in public ones there, and - // getMethods() does provide those declared in a superinterface. - if (!type.isInterface()) { - final Class superType = type.getSuperclass(); - if (superType != null) { - gatherMethods(superType); - } - for (final Class itf: type.getInterfaces()) { - gatherMethods(itf); - } - } - } - - private void gatherMethods(final List> classes) { - for(final Class c: classes) { - gatherMethods(c); - } - } - - /** - * Creates a collection of methods that are not final, but we still never allow them to be overridden in adapters, - * as explicitly declaring them automatically is a bad idea. Currently, this means {@code Object.finalize()} and - * {@code Object.clone()}. - * @return a collection of method infos representing those methods that we never override in adapter classes. - */ - private static Collection getExcludedMethods() { - return AccessController.doPrivileged(new PrivilegedAction>() { - @Override - public Collection run() { - try { - return Arrays.asList( - new MethodInfo(Object.class, "finalize"), - new MethodInfo(Object.class, "clone")); - } catch (final NoSuchMethodException e) { - throw new AssertionError(e); - } - } - }); - } - - private static ProtectionDomain createGeneratedProtectionDomain() { - // Generated classes need to have AllPermission. Since we require the "createClassLoader" RuntimePermission, we - // can create a class loader that'll load new classes with any permissions. Our generated classes are just - // delegating adapters, so having AllPermission can't cause anything wrong; the effective set of permissions for - // the executing script functions will still be limited by the permissions of the caller and the permissions of - // the script. - final Permissions permissions = new Permissions(); - permissions.add(new AllPermission()); - return new ProtectionDomain(new CodeSource(null, (CodeSigner[])null), permissions); - } - - private static class AdapterInfo { - final StaticClass adapterClass; - final boolean autoConvertibleFromFunction; - final AnnotatedAdaptationOutcome adaptationOutcome; - - AdapterInfo(final StaticClass adapterClass, final boolean autoConvertibleFromFunction) { - this.adapterClass = adapterClass; - this.autoConvertibleFromFunction = autoConvertibleFromFunction; - this.adaptationOutcome = AnnotatedAdaptationOutcome.SUCCESS; - } - - AdapterInfo(final AdaptationOutcome outcome, final String classList) { - this(new AnnotatedAdaptationOutcome(outcome, classList)); - } - - AdapterInfo(final AnnotatedAdaptationOutcome adaptationOutcome) { - this.adapterClass = null; - this.autoConvertibleFromFunction = false; - this.adaptationOutcome = adaptationOutcome; - } - } - - /** - * An adaptation outcome accompanied with a name of a class (or a list of multiple class names) that are the reason - * an adapter could not be generated. - */ - private static class AnnotatedAdaptationOutcome { - static final AnnotatedAdaptationOutcome SUCCESS = new AnnotatedAdaptationOutcome(AdaptationOutcome.SUCCESS, ""); - - private final AdaptationOutcome adaptationOutcome; - private final String classList; - - AnnotatedAdaptationOutcome(final AdaptationOutcome adaptationOutcome, final String classList) { - this.adaptationOutcome = adaptationOutcome; - this.classList = classList; - } - - void typeError() { - assert adaptationOutcome != AdaptationOutcome.SUCCESS; - throw ECMAErrors.typeError("extend." + adaptationOutcome, classList); - } - } - /** * For a given class, create its adapter class and associated info. * @param type the class for which the adapter is created @@ -1130,17 +179,17 @@ public final class JavaAdapterFactory { final int mod = t.getModifiers(); if(!t.isInterface()) { if(superClass != null) { - return new AdapterInfo(AdaptationOutcome.ERROR_MULTIPLE_SUPERCLASSES, t.getCanonicalName() + " and " + superClass.getCanonicalName()); + return new AdapterInfo(AdaptationResult.Outcome.ERROR_MULTIPLE_SUPERCLASSES, t.getCanonicalName() + " and " + superClass.getCanonicalName()); } if (Modifier.isFinal(mod)) { - return new AdapterInfo(AdaptationOutcome.ERROR_FINAL_CLASS, t.getCanonicalName()); + return new AdapterInfo(AdaptationResult.Outcome.ERROR_FINAL_CLASS, t.getCanonicalName()); } superClass = t; } else { interfaces.add(t); } if(!Modifier.isPublic(mod)) { - return new AdapterInfo(AdaptationOutcome.ERROR_NON_PUBLIC_CLASS, t.getCanonicalName()); + return new AdapterInfo(AdaptationResult.Outcome.ERROR_NON_PUBLIC_CLASS, t.getCanonicalName()); } } final Class effectiveSuperClass = superClass == null ? Object.class : superClass; @@ -1148,211 +197,78 @@ public final class JavaAdapterFactory { @Override public AdapterInfo run() { try { - final JavaAdapterFactory factory = new JavaAdapterFactory(effectiveSuperClass, interfaces, definingClassAndLoader); - return new AdapterInfo(StaticClass.forClass(factory.generateClass()), - factory.isAutoConvertibleFromFunction()); + return new AdapterInfo(effectiveSuperClass, interfaces, definingClassAndLoader); } catch (final AdaptationException e) { - return new AdapterInfo(e.outcome); + return new AdapterInfo(e.getAdaptationResult()); } } }); } - @SuppressWarnings("serial") - private static class AdaptationException extends Exception { - private final AnnotatedAdaptationOutcome outcome; - AdaptationException(final AdaptationOutcome outcome, final String classList) { - this.outcome = new AnnotatedAdaptationOutcome(outcome, classList); - } - } + private static class AdapterInfo { + private static final ClassAndLoader SCRIPT_OBJECT_LOADER = new ClassAndLoader(ScriptObject.class, true); - private String getCommonSuperClass(final String type1, final String type2) { - try { - final Class c1 = Class.forName(type1.replace('/', '.'), false, commonLoader); - final Class c2 = Class.forName(type2.replace('/', '.'), false, commonLoader); - if (c1.isAssignableFrom(c2)) { - return type1; + private final ClassLoader commonLoader; + private final JavaAdapterClassLoader adapterGenerator; + // Cacheable adapter class that is shared by all adapter instances that don't have class overrides, only + // instance overrides. + final StaticClass instanceAdapterClass; + final boolean autoConvertibleFromFunction; + final AdaptationResult adaptationResult; + + AdapterInfo(Class superClass, List> interfaces, ClassAndLoader definingLoader) throws AdaptationException { + this.commonLoader = findCommonLoader(definingLoader); + final JavaAdapterBytecodeGenerator gen = new JavaAdapterBytecodeGenerator(superClass, interfaces, commonLoader, false); + this.autoConvertibleFromFunction = gen.isAutoConvertibleFromFunction(); + this.instanceAdapterClass = gen.createAdapterClassLoader().generateClass(commonLoader); + this.adapterGenerator = new JavaAdapterBytecodeGenerator(superClass, interfaces, commonLoader, true).createAdapterClassLoader(); + this.adaptationResult = AdaptationResult.SUCCESSFUL_RESULT; + } + + AdapterInfo(final AdaptationResult.Outcome outcome, final String classList) { + this(new AdaptationResult(outcome, classList)); + } + + AdapterInfo(final AdaptationResult adaptationResult) { + this.commonLoader = null; + this.adapterGenerator = null; + this.instanceAdapterClass = null; + this.autoConvertibleFromFunction = false; + this.adaptationResult = adaptationResult; + } + + StaticClass getAdapterClassFor(ScriptObject classOverrides) { + if(adaptationResult.getOutcome() != AdaptationResult.Outcome.SUCCESS) { + throw adaptationResult.typeError(); } - if (c2.isAssignableFrom(c1)) { - return type2; + if(classOverrides == null) { + return instanceAdapterClass; } - if (c1.isInterface() || c2.isInterface()) { - return "java/lang/Object"; - } - return assignableSuperClass(c1, c2).getName().replace('.', '/'); - } catch(final ClassNotFoundException e) { - throw new RuntimeException(e); - } - } - - private static Class assignableSuperClass(final Class c1, final Class c2) { - final Class superClass = c1.getSuperclass(); - return superClass.isAssignableFrom(c2) ? superClass : assignableSuperClass(superClass, c2); - } - - /** - * Choose between the passed class loader and the class loader that defines the ScriptObject class, based on which - * of the two can see the classes in both. - * @param classAndLoader the loader and a representative class from it that will be used to add the generated - * adapter to its ADAPTER_INFO_MAPS. - * @return the class loader that sees both the specified class and Nashorn classes. - * @throws IllegalStateException if no such class loader is found. - */ - private static ClassLoader findCommonLoader(final ClassAndLoader classAndLoader) throws AdaptationException { - final ClassLoader loader = classAndLoader.getLoader(); - if (canSeeClass(loader, ScriptObject.class)) { - return loader; - } - - final ClassLoader nashornLoader = ScriptObject.class.getClassLoader(); - if(canSeeClass(nashornLoader, classAndLoader.clazz)) { - return nashornLoader; - } - - throw new AdaptationException(AdaptationOutcome.ERROR_NO_COMMON_LOADER, classAndLoader.clazz.getCanonicalName()); - } - - private static boolean canSeeClass(final ClassLoader cl, final Class clazz) { - try { - return Class.forName(clazz.getName(), false, cl) == clazz; - } catch (final ClassNotFoundException e) { - return false; - } - } - - /** - * Given a list of types that define the superclass/interfaces for an adapter class, returns a single type from the - * list that will be used to attach the adapter to its ClassValue. The first type in the array that is defined in a - * class loader that can also see all other types is returned. If there is no such loader, an exception is thrown. - * @param types the input types - * @return the first type from the array that is defined in a class loader that can also see all other types. - */ - private static ClassAndLoader getDefiningClassAndLoader(final Class[] types) { - // Short circuit the cheap case - if(types.length == 1) { - return new ClassAndLoader(types[0], false); - } - - return AccessController.doPrivileged(new PrivilegedAction() { - @Override - public ClassAndLoader run() { - return getDefiningClassAndLoaderPrivileged(types); - } - }); - } - - private static ClassAndLoader getDefiningClassAndLoaderPrivileged(final Class[] types) { - final Collection maximumVisibilityLoaders = getMaximumVisibilityLoaders(types); - - final Iterator it = maximumVisibilityLoaders.iterator(); - if(maximumVisibilityLoaders.size() == 1) { - // Fortunate case - single maximally specific class loader; return its representative class. - return it.next(); - } - - // Ambiguity; throw an error. - assert maximumVisibilityLoaders.size() > 1; // basically, can't be zero - final StringBuilder b = new StringBuilder(); - b.append(it.next().clazz.getCanonicalName()); - while(it.hasNext()) { - b.append(", ").append(it.next().clazz.getCanonicalName()); - } - throw typeError("extend.ambiguous.defining.class", b.toString()); - } - - /** - * Given an array of types, return a subset of their class loaders that are maximal according to the - * "can see other loaders' classes" relation, which is presumed to be a partial ordering. - * @param types types - * @return a collection of maximum visibility class loaders. It is guaranteed to have at least one element. - */ - private static Collection getMaximumVisibilityLoaders(final Class[] types) { - final List maximumVisibilityLoaders = new LinkedList<>(); - outer: for(final ClassAndLoader maxCandidate: getClassLoadersForTypes(types)) { - final Iterator it = maximumVisibilityLoaders.iterator(); - while(it.hasNext()) { - final ClassAndLoader existingMax = it.next(); - final boolean candidateSeesExisting = canSeeClass(maxCandidate.getRetrievedLoader(), existingMax.clazz); - final boolean exitingSeesCandidate = canSeeClass(existingMax.getRetrievedLoader(), maxCandidate.clazz); - if(candidateSeesExisting) { - if(!exitingSeesCandidate) { - // The candidate sees the the existing maximum, so drop the existing one as it's no longer maximal. - it.remove(); - } - // NOTE: there's also the anomalous case where both loaders see each other. Not sure what to do - // about that one, as two distinct class loaders both seeing each other's classes is weird and - // violates the assumption that the relation "sees others' classes" is a partial ordering. We'll - // just not do anything, and treat them as incomparable; hopefully some later class loader that - // comes along can eliminate both of them, if it can not, we'll end up with ambiguity anyway and - // throw an error at the end. - } else if(exitingSeesCandidate) { - // Existing sees the candidate, so drop the candidate. - continue outer; - } - } - // If we get here, no existing maximum visibility loader could see the candidate, so the candidate is a new - // maximum. - maximumVisibilityLoaders.add(maxCandidate); - } - return maximumVisibilityLoaders; - } - - private static Collection getClassLoadersForTypes(final Class[] types) { - final Map classesAndLoaders = new LinkedHashMap<>(); - for(final Class c: types) { - final ClassAndLoader cl = new ClassAndLoader(c, true); - if(!classesAndLoaders.containsKey(cl)) { - classesAndLoaders.put(cl, cl); - } - } - return classesAndLoaders.keySet(); - } - - /** - * A tuple of a class loader and a single class representative of the classes that can be loaded through it. Its - * equals/hashCode is defined in terms of the identity of the class loader. - */ - private static final class ClassAndLoader { - private final Class clazz; - // Don't access this directly; most of the time, use getRetrievedLoader(), or if you know what you're doing, - // getLoader(). - private ClassLoader loader; - // We have mild affinity against eagerly retrieving the loader, as we need to do it in a privileged block. For - // the most basic case of looking up an already-generated adapter info for a single type, we avoid it. - private boolean loaderRetrieved; - - ClassAndLoader(final Class clazz, final boolean retrieveLoader) { - this.clazz = clazz; - if(retrieveLoader) { - retrieveLoader(); + JavaAdapterServices.setClassOverrides(classOverrides); + try { + return adapterGenerator.generateClass(commonLoader); + } finally { + JavaAdapterServices.setClassOverrides(null); } } - ClassLoader getLoader() { - if(!loaderRetrieved) { - retrieveLoader(); + /** + * Choose between the passed class loader and the class loader that defines the ScriptObject class, based on which + * of the two can see the classes in both. + * @param classAndLoader the loader and a representative class from it that will be used to add the generated + * adapter to its ADAPTER_INFO_MAPS. + * @return the class loader that sees both the specified class and Nashorn classes. + * @throws IllegalStateException if no such class loader is found. + */ + private static ClassLoader findCommonLoader(final ClassAndLoader classAndLoader) throws AdaptationException { + if(classAndLoader.canSee(SCRIPT_OBJECT_LOADER)) { + return classAndLoader.getLoader(); + } + if (SCRIPT_OBJECT_LOADER.canSee(classAndLoader)) { + return SCRIPT_OBJECT_LOADER.getLoader(); } - return getRetrievedLoader(); - } - ClassLoader getRetrievedLoader() { - assert loaderRetrieved; - return loader; - } - - private void retrieveLoader() { - loader = clazz.getClassLoader(); - loaderRetrieved = true; - } - - @Override - public boolean equals(final Object obj) { - return obj instanceof ClassAndLoader && ((ClassAndLoader)obj).getRetrievedLoader() == getRetrievedLoader(); - } - - @Override - public int hashCode() { - return System.identityHashCode(getRetrievedLoader()); + throw new AdaptationException(AdaptationResult.Outcome.ERROR_NO_COMMON_LOADER, classAndLoader.getRepresentativeClass().getCanonicalName()); } } } diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterGeneratorBase.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterGeneratorBase.java new file mode 100644 index 00000000000..67499cbc58a --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterGeneratorBase.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +import jdk.internal.org.objectweb.asm.Type; +import jdk.nashorn.internal.runtime.Context; +import jdk.nashorn.internal.runtime.ScriptObject; + +/** + * Base class for both {@link JavaAdapterBytecodeGenerator} and {@link JavaAdapterClassLoader}, containing those + * bytecode types, type names and method descriptor that are used by both. + */ +abstract class JavaAdapterGeneratorBase { + static final Type CONTEXT_TYPE = Type.getType(Context.class); + static final Type OBJECT_TYPE = Type.getType(Object.class); + static final Type SCRIPT_OBJECT_TYPE = Type.getType(ScriptObject.class); + + static final String CONTEXT_TYPE_NAME = CONTEXT_TYPE.getInternalName(); + static final String OBJECT_TYPE_NAME = OBJECT_TYPE.getInternalName(); + + static final String INIT = ""; + + static final String GLOBAL_FIELD_NAME = "global"; + + static final String SCRIPT_OBJECT_TYPE_DESCRIPTOR = SCRIPT_OBJECT_TYPE.getDescriptor(); + + static final String SET_GLOBAL_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE, SCRIPT_OBJECT_TYPE); + static final String VOID_NOARG_METHOD_DESCRIPTOR = Type.getMethodDescriptor(Type.VOID_TYPE); + + protected JavaAdapterGeneratorBase() { + } +} diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java new file mode 100644 index 00000000000..b7a646293f3 --- /dev/null +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/JavaAdapterServices.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.nashorn.internal.runtime.linker; + +import static jdk.nashorn.internal.runtime.ECMAErrors.typeError; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodType; +import jdk.nashorn.internal.runtime.ScriptFunction; +import jdk.nashorn.internal.runtime.ScriptObject; +import jdk.nashorn.internal.runtime.ScriptRuntime; +import jdk.nashorn.internal.runtime.Undefined; + +/** + * Provides static utility services to generated Java adapter classes. + */ +public class JavaAdapterServices { + private static final ThreadLocal classOverrides = new ThreadLocal<>(); + + private JavaAdapterServices() { + } + + /** + * Given a JS script function, binds it to null JS "this", and adapts its parameter types, return types, and arity + * to the specified type and arity. This method is public mainly for implementation reasons, so the adapter classes + * can invoke it from their constructors that take a ScriptFunction in its first argument to obtain the method + * handles for their abstract method implementations. + * @param fn the script function + * @param type the method type it has to conform to + * @param varArg if the Java method for which the function is being adapted is a variable arity method + * @return the appropriately adapted method handle for invoking the script function. + */ + public static MethodHandle getHandle(final ScriptFunction fn, final MethodType type, final boolean varArg) { + // JS "this" will be null for SAMs + return adaptHandle(fn.getBoundInvokeHandle(null), type, varArg); + } + + /** + * Given a JS script object, retrieves a function from it by name, binds it to the script object as its "this", and + * adapts its parameter types, return types, and arity to the specified type and arity. This method is public mainly + * for implementation reasons, so the adapter classes can invoke it from their constructors that take a Object + * in its first argument to obtain the method handles for their method implementations. + * @param obj the script obj + * @param name the name of the property that contains the function + * @param type the method type it has to conform to + * @param varArg if the Java method for which the function is being adapted is a variable arity method + * @return the appropriately adapted method handle for invoking the script function, or null if the value of the + * property is either null or undefined, or "toString" was requested as the name, but the object doesn't directly + * define it but just inherits it through prototype. + */ + public static MethodHandle getHandle(final Object obj, final String name, final MethodType type, final boolean varArg) { + if (! (obj instanceof ScriptObject)) { + throw typeError("not.an.object", ScriptRuntime.safeToString(obj)); + } + + final ScriptObject sobj = (ScriptObject)obj; + // Since every JS Object has a toString, we only override "String toString()" it if it's explicitly specified + if ("toString".equals(name) && !sobj.hasOwnProperty("toString")) { + return null; + } + + final Object fnObj = sobj.get(name); + if (fnObj instanceof ScriptFunction) { + return adaptHandle(((ScriptFunction)fnObj).getBoundInvokeHandle(sobj), type, varArg); + } else if(fnObj == null || fnObj instanceof Undefined) { + return null; + } else { + throw typeError("not.a.function", name); + } + } + + /** + * Returns a thread-local JS object used to define methods for the adapter class being initialized on the current + * thread. This method is public solely for implementation reasons, so the adapter classes can invoke it from their + * static initializers. + * @return the thread-local JS object used to define methods for the class being initialized. + */ + public static ScriptObject getClassOverrides() { + final ScriptObject overrides = classOverrides.get(); + assert overrides != null; + return overrides; + } + + static void setClassOverrides(ScriptObject overrides) { + classOverrides.set(overrides); + } + + private static MethodHandle adaptHandle(final MethodHandle handle, final MethodType type, final boolean varArg) { + return Bootstrap.getLinkerServices().asType(ScriptObject.pairArguments(handle, type, varArg), type); + } +} diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornLinker.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornLinker.java index 3a4a5d77487..e7cc78b0858 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornLinker.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornLinker.java @@ -29,6 +29,7 @@ import static jdk.nashorn.internal.lookup.Lookup.MH; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; +import java.lang.reflect.Modifier; import jdk.internal.dynalink.CallSiteDescriptor; import jdk.internal.dynalink.linker.ConversionComparator; import jdk.internal.dynalink.linker.GuardedInvocation; @@ -131,10 +132,22 @@ final class NashornLinker implements TypeBasedGuardingDynamicLinker, GuardingTyp } private static boolean isAutoConvertibleFromFunction(final Class clazz) { - return JavaAdapterFactory.isAbstractClass(clazz) && !ScriptObject.class.isAssignableFrom(clazz) && + return isAbstractClass(clazz) && !ScriptObject.class.isAssignableFrom(clazz) && JavaAdapterFactory.isAutoConvertibleFromFunction(clazz); } + /** + * Utility method used by few other places in the code. Tests if the class has the abstract modifier and is not an + * array class. For some reason, array classes have the abstract modifier set in HotSpot JVM, and we don't want to + * treat array classes as abstract. + * @param clazz the inspected class + * @return true if the class is abstract and is not an array type. + */ + static boolean isAbstractClass(final Class clazz) { + return Modifier.isAbstract(clazz.getModifiers()) && !clazz.isArray(); + } + + @Override public Comparison compareConversion(final Class sourceType, final Class targetType1, final Class targetType2) { if(ScriptObject.class.isAssignableFrom(sourceType)) { diff --git a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java index 738162d5cda..67c1d8db5f8 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornStaticClassLinker.java @@ -68,10 +68,10 @@ final class NashornStaticClassLinker implements TypeBasedGuardingDynamicLinker { if ("new".equals(desc.getNameToken(CallSiteDescriptor.OPERATOR))) { final Class receiverClass = ((StaticClass) self).getRepresentedClass(); // Is the class abstract? (This includes interfaces.) - if (JavaAdapterFactory.isAbstractClass(receiverClass)) { + if (NashornLinker.isAbstractClass(receiverClass)) { // Change this link request into a link request on the adapter class. final Object[] args = request.getArguments(); - args[0] = JavaAdapterFactory.getAdapterClassFor(new Class[] { receiverClass }); + args[0] = JavaAdapterFactory.getAdapterClassFor(new Class[] { receiverClass }, null); final LinkRequest adapterRequest = request.replaceArguments(request.getCallSiteDescriptor(), args); final GuardedInvocation gi = checkNullConstructor(delegate(linkerServices, adapterRequest), receiverClass); // Finally, modify the guard to test for the original abstract class. diff --git a/nashorn/src/jdk/nashorn/internal/runtime/resources/Messages.properties b/nashorn/src/jdk/nashorn/internal/runtime/resources/Messages.properties index 43a7ff62977..9f327521bcc 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/resources/Messages.properties +++ b/nashorn/src/jdk/nashorn/internal/runtime/resources/Messages.properties @@ -113,6 +113,7 @@ type.error.cant.convert.to.java.string=Cannot convert object of type {0} to a Ja type.error.cant.convert.to.java.number=Cannot convert object of type {0} to a Java argument of number type type.error.cant.convert.to.javascript.array=Can only convert Java arrays and lists to JavaScript arrays. Can't convert object of type {0}. type.error.extend.expects.at.least.one.argument=Java.extend needs at least one argument. +type.error.extend.expects.at.least.one.type.argument=Java.extend needs at least one type argument. type.error.extend.expects.java.types=Java.extend needs Java types as its arguments. type.error.extend.ambiguous.defining.class=There is no class loader that can see all of {0} at once. type.error.extend.ERROR_FINAL_CLASS=Can not extend final class {0}. diff --git a/nashorn/test/script/basic/javaclassoverrides.js b/nashorn/test/script/basic/javaclassoverrides.js new file mode 100644 index 00000000000..e7ad61d841f --- /dev/null +++ b/nashorn/test/script/basic/javaclassoverrides.js @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * Check behavior of class-level overrides. + * + * @test + * @run + */ + + +// Make two classes with class overrides + +var R1 = Java.extend(java.lang.Runnable, { + run: function() { + print("R1.run() invoked") + } +}) + +var R2 = Java.extend(java.lang.Runnable, { + run: function() { + print("R2.run() invoked") + } +}) + +var r1 = new R1 +var r2 = new R2 +// Create one with an instance-override too +var r3 = new R2(function() { print("r3.run() invoked") }) + +// Run 'em - we're passing them through a Thread to make sure they indeed +// are full-blown Runnables +function runInThread(r) { + var t = new java.lang.Thread(r) + t.start() + t.join() +} +runInThread(r1) +runInThread(r2) +runInThread(r3) + +// Two class-override classes differ +print("r1.class != r2.class: " + (r1.class != r2.class)) +// However, adding instance-overrides doesn't change the class +print("r2.class == r3.class: " + (r2.class == r3.class)) + +function checkAbstract(r) { + try { + r.run() + print("Expected to fail!") + } catch(e) { + print("Got exception: " + e) + } +} + +// Check we're hitting UnsupportedOperationException if neither class +// overrides nor instance overrides are present +var RAbstract = Java.extend(java.lang.Runnable, {}) +checkAbstract(new RAbstract()) // class override (empty) +checkAbstract(new RAbstract() {}) // class+instance override (empty) + +// Check we delegate to superclass if neither class +// overrides nor instance overrides are present +var ExtendsList = Java.extend(java.util.ArrayList, {}) +print("(new ExtendsList).size() = " + (new ExtendsList).size()) +print("(new ExtendsList(){}).size() = " + (new ExtendsList(){}).size()) \ No newline at end of file diff --git a/nashorn/test/script/basic/javaclassoverrides.js.EXPECTED b/nashorn/test/script/basic/javaclassoverrides.js.EXPECTED new file mode 100644 index 00000000000..6c534302d48 --- /dev/null +++ b/nashorn/test/script/basic/javaclassoverrides.js.EXPECTED @@ -0,0 +1,9 @@ +R1.run() invoked +R2.run() invoked +r3.run() invoked +r1.class != r2.class: true +r2.class == r3.class: true +Got exception: java.lang.UnsupportedOperationException +Got exception: java.lang.UnsupportedOperationException +(new ExtendsList).size() = 0 +(new ExtendsList(){}).size() = 0 From 194f867e24521c79d609c2112078c891b097c355 Mon Sep 17 00:00:00 2001 From: Athijegannathan Sundararajan Date: Thu, 4 Apr 2013 20:46:31 +0530 Subject: [PATCH 071/151] 8011552: Arrays with missing elements are not properly sorted Reviewed-by: jlaskey, lagergren --- .../nashorn/internal/objects/NativeArray.java | 19 +++++++--- nashorn/test/script/basic/JDK-8011552.js | 37 +++++++++++++++++++ 2 files changed, 51 insertions(+), 5 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011552.js diff --git a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java index 0f4ad604c5f..9f36134ac95 100644 --- a/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java +++ b/nashorn/src/jdk/nashorn/internal/objects/NativeArray.java @@ -849,17 +849,26 @@ public final class NativeArray extends ScriptObject { final long len = JSType.toUint32(sobj.getLength()); if (len > 1) { - final Object[] src = new Object[(int) len]; - for (int i = 0; i < src.length; i++) { - src[i] = sobj.get(i); + // Get only non-missing elements. Missing elements go at the end + // of the sorted array. So, just don't copy these to sort input. + + final ArrayList src = new ArrayList<>(); + for (int i = 0; i < (int)len; i++) { + if (sobj.has(i)) { + src.add(sobj.get(i)); + } } - final Object[] sorted = sort(src, comparefn); - assert sorted.length == src.length; + final Object[] sorted = sort(src.toArray(), comparefn); for (int i = 0; i < sorted.length; i++) { sobj.set(i, sorted[i], strict); } + + // delete missing elements - which are at the end of sorted array + for (int j = sorted.length; j < (int)len; j++) { + sobj.delete(j, strict); + } } return sobj; diff --git a/nashorn/test/script/basic/JDK-8011552.js b/nashorn/test/script/basic/JDK-8011552.js new file mode 100644 index 00000000000..f0735a0018f --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011552.js @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011552: Arrays with missing elements are not properly sorted + * + * @test + * @run + */ + +if ([,void 0].sort().hasOwnProperty("1")) { + fail("missing element found in sorted array"); +} + +if ([1,,2,,-1].sort().toString() != "-1,1,2,,") { + faiil("missing elements are not at the end of sorted array"); +} From 35f9ab205401cee7b6a24e1826bfa612f6c4e564 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Thu, 4 Apr 2013 18:32:00 +0200 Subject: [PATCH 072/151] 8011555: Invalid class name in with block with JavaImporter causes MH type mismatch Reviewed-by: jlaskey, lagergren --- .../nashorn/internal/runtime/WithObject.java | 21 +++++++--- nashorn/test/script/basic/JDK-8011555.js | 42 +++++++++++++++++++ .../test/script/basic/JDK-8011555.js.EXPECTED | 1 + 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8011555.js create mode 100644 nashorn/test/script/basic/JDK-8011555.js.EXPECTED diff --git a/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java b/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java index 5eaf5f50193..814f7ec3a77 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/WithObject.java @@ -29,6 +29,7 @@ import static jdk.nashorn.internal.lookup.Lookup.MH; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; +import java.lang.invoke.MethodType; import jdk.internal.dynalink.CallSiteDescriptor; import jdk.internal.dynalink.linker.GuardedInvocation; import jdk.internal.dynalink.linker.LinkRequest; @@ -42,9 +43,10 @@ import jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor; */ public final class WithObject extends ScriptObject implements Scope { - private static final MethodHandle WITHEXPRESSIONFILTER = findOwnMH("withFilterExpression", Object.class, Object.class); - private static final MethodHandle WITHSCOPEFILTER = findOwnMH("withFilterScope", Object.class, Object.class); - private static final MethodHandle BIND_TO_EXPRESSION = findOwnMH("bindToExpression", Object.class, Object.class, Object.class); + private static final MethodHandle WITHEXPRESSIONFILTER = findOwnMH("withFilterExpression", Object.class, Object.class); + private static final MethodHandle WITHSCOPEFILTER = findOwnMH("withFilterScope", Object.class, Object.class); + private static final MethodHandle BIND_TO_EXPRESSION_OBJ = findOwnMH("bindToExpression", Object.class, Object.class, Object.class); + private static final MethodHandle BIND_TO_EXPRESSION_FN = findOwnMH("bindToExpression", Object.class, ScriptFunction.class, Object.class); /** With expression object. */ private final Object expression; @@ -237,9 +239,14 @@ public final class WithObject extends ScriptObject implements Scope { return link.filterArguments(0, WITHEXPRESSIONFILTER); } + final MethodHandle linkInvocation = link.getInvocation(); + final MethodType linkType = linkInvocation.type(); + final boolean linkReturnsFunction = ScriptFunction.class.isAssignableFrom(linkType.returnType()); return link.replaceMethods( // Make sure getMethod will bind the script functions it receives to WithObject.expression - MH.foldArguments(BIND_TO_EXPRESSION, filter(link.getInvocation(), WITHEXPRESSIONFILTER)), + MH.foldArguments(linkReturnsFunction ? BIND_TO_EXPRESSION_FN : BIND_TO_EXPRESSION_OBJ, + filter(linkInvocation.asType(linkType.changeReturnType( + linkReturnsFunction ? ScriptFunction.class : Object.class)), WITHEXPRESSIONFILTER)), // No clever things for the guard -- it is still identically filtered. filterGuard(link, WITHEXPRESSIONFILTER)); } @@ -269,7 +276,11 @@ public final class WithObject extends ScriptObject implements Scope { @SuppressWarnings("unused") private static Object bindToExpression(final Object fn, final Object receiver) { - return fn instanceof ScriptFunction ? ((ScriptFunction) fn).makeBoundFunction(withFilterExpression(receiver), new Object[0]) : fn; + return fn instanceof ScriptFunction ? bindToExpression((ScriptFunction) fn, receiver) : fn; + } + + private static Object bindToExpression(final ScriptFunction fn, final Object receiver) { + return fn.makeBoundFunction(withFilterExpression(receiver), new Object[0]); } /** diff --git a/nashorn/test/script/basic/JDK-8011555.js b/nashorn/test/script/basic/JDK-8011555.js new file mode 100644 index 00000000000..c65ad61256e --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011555.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8011555: Invalid class name in with block with JavaImporter causes MH type mismatch + * + * @test + * @run + */ + +with(new JavaImporter()) { + try { + new X() + print("Expected to fail!") + } catch(e) { + // We expect to get a TypeError for trying to use __noSuchMethod__ as + // a constructor. Before we fixed this bug, we were getting a runtime + // exception with MH type mismatch on a MH.foldArguments within the + // WithObject code instead. + print(e) + } +} diff --git a/nashorn/test/script/basic/JDK-8011555.js.EXPECTED b/nashorn/test/script/basic/JDK-8011555.js.EXPECTED new file mode 100644 index 00000000000..c296217aa1b --- /dev/null +++ b/nashorn/test/script/basic/JDK-8011555.js.EXPECTED @@ -0,0 +1 @@ +TypeError: function __noSuchMethod__() { [native code] } is not a constructor function From eeb83733a611bad8d1bd7c8cca0aea8f5ed6cd6d Mon Sep 17 00:00:00 2001 From: Mikael Vidstedt Date: Thu, 4 Apr 2013 10:01:26 -0700 Subject: [PATCH 073/151] 8003310: Enable -Wunused-function when compiling with gcc Add the -Wunused-function flag and remove a number of unused functions. Reviewed-by: dholmes, coleenp, kvn --- hotspot/make/linux/makefiles/gcc.make | 12 ++++---- hotspot/src/cpu/x86/vm/assembler_x86.cpp | 8 ----- hotspot/src/cpu/x86/vm/methodHandles_x86.cpp | 5 ---- hotspot/src/cpu/x86/vm/x86_64.ad | 11 ------- hotspot/src/os/bsd/vm/os_bsd.cpp | 19 ++---------- hotspot/src/os/linux/vm/os_linux.cpp | 19 ++---------- hotspot/src/os/solaris/vm/os_solaris.cpp | 14 ++------- hotspot/src/share/vm/c1/c1_LIRGenerator.cpp | 19 ------------ hotspot/src/share/vm/compiler/compileLog.cpp | 22 -------------- .../src/share/vm/compiler/compilerOracle.cpp | 7 ----- .../g1/g1CollectorPolicy.cpp | 12 -------- .../vm/gc_implementation/g1/ptrQueue.cpp | 9 ------ .../vm/interpreter/interpreterRuntime.cpp | 5 ---- hotspot/src/share/vm/memory/heap.cpp | 7 ----- hotspot/src/share/vm/memory/universe.cpp | 4 +-- hotspot/src/share/vm/oops/constantPool.cpp | 12 ++++---- hotspot/src/share/vm/opto/block.cpp | 20 ------------- hotspot/src/share/vm/opto/compile.cpp | 2 ++ hotspot/src/share/vm/opto/connode.cpp | 23 -------------- hotspot/src/share/vm/opto/subnode.cpp | 10 ------- hotspot/src/share/vm/prims/jni.cpp | 27 +---------------- hotspot/src/share/vm/prims/jniCheck.hpp | 2 +- hotspot/src/share/vm/runtime/arguments.cpp | 6 ++++ hotspot/src/share/vm/runtime/safepoint.cpp | 4 ++- hotspot/src/share/vm/runtime/synchronizer.cpp | 7 ----- hotspot/src/share/vm/runtime/synchronizer.hpp | 1 - hotspot/src/share/vm/utilities/debug.cpp | 12 -------- .../share/vm/utilities/globalDefinitions.cpp | 30 +++++++++++++++++++ .../share/vm/utilities/globalDefinitions.hpp | 29 ++++++++++++++++++ 29 files changed, 92 insertions(+), 266 deletions(-) diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make index b2c4bdfa491..acbfc058835 100644 --- a/hotspot/make/linux/makefiles/gcc.make +++ b/hotspot/make/linux/makefiles/gcc.make @@ -126,14 +126,12 @@ endif # Compiler warnings are treated as errors WARNINGS_ARE_ERRORS = -Werror -# Except for a few acceptable ones +WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function + # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit -# conversions which might affect the values. To avoid that, we need to turn -# it off explicitly. -ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" -WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -else -WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef +# conversions which might affect the values. Only enable it in earlier versions. +ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" +WARNING_FLAGS += -Wconversion endif CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp index a18d8047f45..02a438f2f40 100644 --- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp +++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp @@ -214,14 +214,6 @@ static int encode(Register r) { return enc; } -static int encode(XMMRegister r) { - int enc = r->encoding(); - if (enc >= 8) { - enc -= 8; - } - return enc; -} - void Assembler::emit_arith_b(int op1, int op2, Register dst, int imm8) { assert(dst->has_byte_register(), "must have byte register"); assert(isByte(op1) && isByte(op2), "wrong opcode"); diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp index 95d5123f406..30c9199436d 100644 --- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp +++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp @@ -41,11 +41,6 @@ #define BIND(label) bind(label); BLOCK_COMMENT(#label ":") -// Workaround for C++ overloading nastiness on '0' for RegisterOrConstant. -static RegisterOrConstant constant(int value) { - return RegisterOrConstant(value); -} - void MethodHandles::load_klass_from_Class(MacroAssembler* _masm, Register klass_reg) { if (VerifyMethodHandles) verify_klass(_masm, klass_reg, SystemDictionary::WK_KLASS_ENUM_NAME(java_lang_Class), diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad index 7c902c4e31c..44378f3eeba 100644 --- a/hotspot/src/cpu/x86/vm/x86_64.ad +++ b/hotspot/src/cpu/x86/vm/x86_64.ad @@ -1669,17 +1669,6 @@ const RegMask Matcher::method_handle_invoke_SP_save_mask() { return PTR_RBP_REG_mask(); } -static Address build_address(int b, int i, int s, int d) { - Register index = as_Register(i); - Address::ScaleFactor scale = (Address::ScaleFactor)s; - if (index == rsp) { - index = noreg; - scale = Address::no_scale; - } - Address addr(as_Register(b), index, scale, d); - return addr; -} - %} //----------ENCODING BLOCK----------------------------------------------------- diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp index 44bec82c076..2dc49df34ec 100644 --- a/hotspot/src/os/bsd/vm/os_bsd.cpp +++ b/hotspot/src/os/bsd/vm/os_bsd.cpp @@ -152,7 +152,6 @@ sigset_t SR_sigset; // utility functions static int SR_initialize(); -static int SR_finalize(); julong os::available_memory() { return Bsd::available_memory(); @@ -2783,10 +2782,6 @@ static int SR_initialize() { return 0; } -static int SR_finalize() { - return 0; -} - // returns true on success and false on error - really an error is fatal // but this seems the normal response to library errors @@ -3595,16 +3590,6 @@ int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, //////////////////////////////////////////////////////////////////////////////// // debug support -static address same_page(address x, address y) { - int page_bits = -os::vm_page_size(); - if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) - return x; - else if (x > y) - return (address)(intptr_t(y) | ~page_bits) + 1; - else - return (address)(intptr_t(y) & page_bits); -} - bool os::find(address addr, outputStream* st) { Dl_info dlinfo; memset(&dlinfo, 0, sizeof(dlinfo)); @@ -3628,8 +3613,8 @@ bool os::find(address addr, outputStream* st) { if (Verbose) { // decode some bytes around the PC - address begin = same_page(addr-40, addr); - address end = same_page(addr+40, addr); + address begin = clamp_address_in_page(addr-40, addr, os::vm_page_size()); + address end = clamp_address_in_page(addr+40, addr, os::vm_page_size()); address lowest = (address) dlinfo.dli_sname; if (!lowest) lowest = (address) dlinfo.dli_fbase; if (begin < lowest) begin = lowest; diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp index efaefc484c1..ee3e09f21e3 100644 --- a/hotspot/src/os/linux/vm/os_linux.cpp +++ b/hotspot/src/os/linux/vm/os_linux.cpp @@ -176,7 +176,6 @@ class MemNotifyThread: public Thread { // utility functions static int SR_initialize(); -static int SR_finalize(); julong os::available_memory() { return Linux::available_memory(); @@ -3672,10 +3671,6 @@ static int SR_initialize() { return 0; } -static int SR_finalize() { - return 0; -} - // returns true on success and false on error - really an error is fatal // but this seems the normal response to library errors @@ -4517,16 +4512,6 @@ int os::Linux::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mute //////////////////////////////////////////////////////////////////////////////// // debug support -static address same_page(address x, address y) { - int page_bits = -os::vm_page_size(); - if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) - return x; - else if (x > y) - return (address)(intptr_t(y) | ~page_bits) + 1; - else - return (address)(intptr_t(y) & page_bits); -} - bool os::find(address addr, outputStream* st) { Dl_info dlinfo; memset(&dlinfo, 0, sizeof(dlinfo)); @@ -4550,8 +4535,8 @@ bool os::find(address addr, outputStream* st) { if (Verbose) { // decode some bytes around the PC - address begin = same_page(addr-40, addr); - address end = same_page(addr+40, addr); + address begin = clamp_address_in_page(addr-40, addr, os::vm_page_size()); + address end = clamp_address_in_page(addr+40, addr, os::vm_page_size()); address lowest = (address) dlinfo.dli_sname; if (!lowest) lowest = (address) dlinfo.dli_fbase; if (begin < lowest) begin = lowest; diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp index 58601690c4d..ce9d0c13150 100644 --- a/hotspot/src/os/solaris/vm/os_solaris.cpp +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp @@ -5808,16 +5808,6 @@ int os::loadavg(double loadavg[], int nelem) { //--------------------------------------------------------------------------------- -static address same_page(address x, address y) { - intptr_t page_bits = -os::vm_page_size(); - if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) - return x; - else if (x > y) - return (address)(intptr_t(y) | ~page_bits) + 1; - else - return (address)(intptr_t(y) & page_bits); -} - bool os::find(address addr, outputStream* st) { Dl_info dlinfo; memset(&dlinfo, 0, sizeof(dlinfo)); @@ -5843,8 +5833,8 @@ bool os::find(address addr, outputStream* st) { if (Verbose) { // decode some bytes around the PC - address begin = same_page(addr-40, addr); - address end = same_page(addr+40, addr); + address begin = clamp_address_in_page(addr-40, addr, os::vm_page_size()); + address end = clamp_address_in_page(addr+40, addr, os::vm_page_size()); address lowest = (address) dlinfo.dli_sname; if (!lowest) lowest = (address) dlinfo.dli_fbase; if (begin < lowest) begin = lowest; diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp index b46acec1474..7d84c1bb896 100644 --- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp +++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp @@ -707,25 +707,6 @@ static ciArrayKlass* as_array_klass(ciType* type) { } } -static Value maxvalue(IfOp* ifop) { - switch (ifop->cond()) { - case If::eql: return NULL; - case If::neq: return NULL; - case If::lss: // x < y ? x : y - case If::leq: // x <= y ? x : y - if (ifop->x() == ifop->tval() && - ifop->y() == ifop->fval()) return ifop->y(); - return NULL; - - case If::gtr: // x > y ? y : x - case If::geq: // x >= y ? y : x - if (ifop->x() == ifop->tval() && - ifop->y() == ifop->fval()) return ifop->y(); - return NULL; - - } -} - static ciType* phi_declared_type(Phi* phi) { ciType* t = phi->operand_at(0)->declared_type(); if (t == NULL) { diff --git a/hotspot/src/share/vm/compiler/compileLog.cpp b/hotspot/src/share/vm/compiler/compileLog.cpp index e02e4e5475a..2201c7f9e16 100644 --- a/hotspot/src/share/vm/compiler/compileLog.cpp +++ b/hotspot/src/share/vm/compiler/compileLog.cpp @@ -60,28 +60,6 @@ CompileLog::~CompileLog() { } -// Advance kind up to a null or space, return this tail. -// Make sure kind is null-terminated, not space-terminated. -// Use the buffer if necessary. -static const char* split_attrs(const char* &kind, char* buffer) { - const char* attrs = strchr(kind, ' '); - // Tease apart the first word from the rest: - if (attrs == NULL) { - return ""; // no attrs, no split - } else if (kind == buffer) { - ((char*) attrs)[-1] = 0; - return attrs; - } else { - // park it in the buffer, so we can put a null on the end - assert(!(kind >= buffer && kind < buffer+100), "not obviously in buffer"); - int klen = attrs - kind; - strncpy(buffer, kind, klen); - buffer[klen] = 0; - kind = buffer; // return by reference - return attrs; - } -} - // see_tag, pop_tag: Override the default do-nothing methods on xmlStream. // These methods provide a hook for managing the the extra context markup. void CompileLog::see_tag(const char* tag, bool push) { diff --git a/hotspot/src/share/vm/compiler/compilerOracle.cpp b/hotspot/src/share/vm/compiler/compilerOracle.cpp index 73e348bc97c..8b9141269cc 100644 --- a/hotspot/src/share/vm/compiler/compilerOracle.cpp +++ b/hotspot/src/share/vm/compiler/compilerOracle.cpp @@ -237,13 +237,6 @@ static const char * command_names[] = { "help" }; -static const char * command_name(OracleCommand command) { - if (command < OracleFirstCommand || command >= OracleCommandCount) { - return "unknown command"; - } - return command_names[command]; -} - class MethodMatcher; static MethodMatcher* lists[OracleCommandCount] = { 0, }; diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp index 87acfec56f9..893862aa84c 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @@ -1359,18 +1359,6 @@ void G1CollectorPolicy::print_yg_surv_rate_info() const { #endif // PRODUCT } -#ifndef PRODUCT -// for debugging, bit of a hack... -static char* -region_num_to_mbs(int length) { - static char buffer[64]; - double bytes = (double) (length * HeapRegion::GrainBytes); - double mbs = bytes / (double) (1024 * 1024); - sprintf(buffer, "%7.2lfMB", mbs); - return buffer; -} -#endif // PRODUCT - uint G1CollectorPolicy::max_regions(int purpose) { switch (purpose) { case GCAllocForSurvived: diff --git a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp index 2193c17e3cd..8841f011e4a 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp @@ -53,15 +53,6 @@ void PtrQueue::flush() { } -static int byte_index_to_index(int ind) { - assert((ind % oopSize) == 0, "Invariant."); - return ind / oopSize; -} - -static int index_to_byte_index(int byte_ind) { - return byte_ind * oopSize; -} - void PtrQueue::enqueue_known_active(void* ptr) { assert(0 <= _index && _index <= _sz, "Invariant."); assert(_index == 0 || _buf != NULL, "invariant"); diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp index de6b3d12812..a14f0ff5905 100644 --- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp +++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp @@ -557,11 +557,6 @@ IRT_END // be shared by method invocation and synchronized blocks. //%note synchronization_3 -static void trace_locking(Handle& h_locking_obj, bool is_locking) { - ObjectSynchronizer::trace_locking(h_locking_obj, false, true, is_locking); -} - - //%note monitor_1 IRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* thread, BasicObjectLock* elem)) #ifdef ASSERT diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp index fda24f18469..bf41864c6f3 100644 --- a/hotspot/src/share/vm/memory/heap.cpp +++ b/hotspot/src/share/vm/memory/heap.cpp @@ -79,13 +79,6 @@ static size_t align_to_page_size(size_t size) { } -static size_t align_to_allocation_size(size_t size) { - const size_t alignment = (size_t)os::vm_allocation_granularity(); - assert(is_power_of_2(alignment), "no kidding ???"); - return (size + alignment - 1) & ~(alignment - 1); -} - - void CodeHeap::on_code_mapping(char* base, size_t size) { #ifdef LINUX extern void linux_wrap_code(char* base, size_t size); diff --git a/hotspot/src/share/vm/memory/universe.cpp b/hotspot/src/share/vm/memory/universe.cpp index 79e092a3b19..6d84d7fb26a 100644 --- a/hotspot/src/share/vm/memory/universe.cpp +++ b/hotspot/src/share/vm/memory/universe.cpp @@ -1335,6 +1335,8 @@ static uintptr_t _verify_oop_data[2] = {0, (uintptr_t)-1}; static uintptr_t _verify_klass_data[2] = {0, (uintptr_t)-1}; +#ifndef PRODUCT + static void calculate_verify_data(uintptr_t verify_data[2], HeapWord* low_boundary, HeapWord* high_boundary) { @@ -1369,9 +1371,7 @@ static void calculate_verify_data(uintptr_t verify_data[2], verify_data[1] = bits; } - // Oop verification (see MacroAssembler::verify_oop) -#ifndef PRODUCT uintptr_t Universe::verify_oop_mask() { MemRegion m = heap()->reserved_region(); diff --git a/hotspot/src/share/vm/oops/constantPool.cpp b/hotspot/src/share/vm/oops/constantPool.cpp index ba7ec439e4f..9045db75834 100644 --- a/hotspot/src/share/vm/oops/constantPool.cpp +++ b/hotspot/src/share/vm/oops/constantPool.cpp @@ -1378,12 +1378,13 @@ const char* ConstantPool::printable_name_at(int which) { // JVMTI GetConstantPool support -// For temporary use until code is stable. -#define DBG(code) +// For debugging of constant pool +const bool debug_cpool = false; -static const char* WARN_MSG = "Must not be such entry!"; +#define DBG(code) do { if (debug_cpool) { (code); } } while(0) static void print_cpool_bytes(jint cnt, u1 *bytes) { + const char* WARN_MSG = "Must not be such entry!"; jint size = 0; u2 idx1, idx2; @@ -1669,8 +1670,7 @@ int ConstantPool::copy_cpool_bytes(int cpool_size, idx1 = tbl->symbol_to_value(sym); assert(idx1 != 0, "Have not found a hashtable entry"); Bytes::put_Java_u2((address) (bytes+1), idx1); - DBG(char *str = sym->as_utf8()); - DBG(printf("JVM_CONSTANT_String: idx=#%03hd, %s", idx1, str)); + DBG(printf("JVM_CONSTANT_String: idx=#%03hd, %s", idx1, sym->as_utf8())); break; } case JVM_CONSTANT_Fieldref: @@ -1745,6 +1745,8 @@ int ConstantPool::copy_cpool_bytes(int cpool_size, return (int)(bytes - start_bytes); } /* end copy_cpool_bytes */ +#undef DBG + void ConstantPool::set_on_stack(const bool value) { if (value) { diff --git a/hotspot/src/share/vm/opto/block.cpp b/hotspot/src/share/vm/opto/block.cpp index 70f00ca50a2..0aa41de0120 100644 --- a/hotspot/src/share/vm/opto/block.cpp +++ b/hotspot/src/share/vm/opto/block.cpp @@ -1028,26 +1028,6 @@ void UnionFind::Union( uint idx1, uint idx2 ) { } #ifndef PRODUCT -static void edge_dump(GrowableArray *edges) { - tty->print_cr("---- Edges ----"); - for (int i = 0; i < edges->length(); i++) { - CFGEdge *e = edges->at(i); - if (e != NULL) { - edges->at(i)->dump(); - } - } -} - -static void trace_dump(Trace *traces[], int count) { - tty->print_cr("---- Traces ----"); - for (int i = 0; i < count; i++) { - Trace *tr = traces[i]; - if (tr != NULL) { - tr->dump(); - } - } -} - void Trace::dump( ) const { tty->print_cr("Trace (freq %f)", first_block()->_freq); for (Block *b = first_block(); b != NULL; b = next(b)) { diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp index a4657819c44..37b4b4cd5c6 100644 --- a/hotspot/src/share/vm/opto/compile.cpp +++ b/hotspot/src/share/vm/opto/compile.cpp @@ -2326,12 +2326,14 @@ struct Final_Reshape_Counts : public StackObj { int get_inner_loop_count() const { return _inner_loop_count; } }; +#ifdef ASSERT static bool oop_offset_is_sane(const TypeInstPtr* tp) { ciInstanceKlass *k = tp->klass()->as_instance_klass(); // Make sure the offset goes inside the instance layout. return k->contains_field_offset(tp->offset()); // Note that OffsetBot and OffsetTop are very negative. } +#endif // Eliminate trivially redundant StoreCMs and accumulate their // precedence edges. diff --git a/hotspot/src/share/vm/opto/connode.cpp b/hotspot/src/share/vm/opto/connode.cpp index 3ba08ae5cb0..eb343a822e5 100644 --- a/hotspot/src/share/vm/opto/connode.cpp +++ b/hotspot/src/share/vm/opto/connode.cpp @@ -465,29 +465,6 @@ Node *CheckCastPPNode::Identity( PhaseTransform *phase ) { return (phase->type(in(1)) == phase->type(this)) ? in(1) : this; } -// Determine whether "n" is a node which can cause an alias of one of its inputs. Node types -// which can create aliases are: CheckCastPP, Phi, and any store (if there is also a load from -// the location.) -// Note: this checks for aliases created in this compilation, not ones which may -// be potentially created at call sites. -static bool can_cause_alias(Node *n, PhaseTransform *phase) { - bool possible_alias = false; - - if (n->is_Store()) { - possible_alias = !n->as_Store()->value_never_loaded(phase); - } else { - int opc = n->Opcode(); - possible_alias = n->is_Phi() || - opc == Op_CheckCastPP || - opc == Op_StorePConditional || - opc == Op_CompareAndSwapP || - opc == Op_CompareAndSwapN || - opc == Op_GetAndSetP || - opc == Op_GetAndSetN; - } - return possible_alias; -} - //------------------------------Value------------------------------------------ // Take 'join' of input and cast-up type, unless working with an Interface const Type *CheckCastPPNode::Value( PhaseTransform *phase ) const { diff --git a/hotspot/src/share/vm/opto/subnode.cpp b/hotspot/src/share/vm/opto/subnode.cpp index cbfe7775108..70a64ba70cd 100644 --- a/hotspot/src/share/vm/opto/subnode.cpp +++ b/hotspot/src/share/vm/opto/subnode.cpp @@ -1078,16 +1078,6 @@ uint BoolNode::cmp( const Node &n ) const { return (_test._test == b->_test._test); } -//------------------------------clone_cmp-------------------------------------- -// Clone a compare/bool tree -static Node *clone_cmp( Node *cmp, Node *cmp1, Node *cmp2, PhaseGVN *gvn, BoolTest::mask test ) { - Node *ncmp = cmp->clone(); - ncmp->set_req(1,cmp1); - ncmp->set_req(2,cmp2); - ncmp = gvn->transform( ncmp ); - return new (gvn->C) BoolNode( ncmp, test ); -} - //-------------------------------make_predicate-------------------------------- Node* BoolNode::make_predicate(Node* test_value, PhaseGVN* phase) { if (test_value->is_Con()) return test_value; diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp index 22716c400c2..5f37992d0f5 100644 --- a/hotspot/src/share/vm/prims/jni.cpp +++ b/hotspot/src/share/vm/prims/jni.cpp @@ -1289,32 +1289,6 @@ enum JNICallType { JNI_NONVIRTUAL }; -static methodHandle jni_resolve_interface_call(Handle recv, methodHandle method, TRAPS) { - assert(!method.is_null() , "method should not be null"); - - KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc) - if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass()); - KlassHandle spec_klass (THREAD, method->method_holder()); - Symbol* name = method->name(); - Symbol* signature = method->signature(); - CallInfo info; - LinkResolver::resolve_interface_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle())); - return info.selected_method(); -} - -static methodHandle jni_resolve_virtual_call(Handle recv, methodHandle method, TRAPS) { - assert(!method.is_null() , "method should not be null"); - - KlassHandle recv_klass; // Default to NULL (use of ?: can confuse gcc) - if (recv.not_null()) recv_klass = KlassHandle(THREAD, recv->klass()); - KlassHandle spec_klass (THREAD, method->method_holder()); - Symbol* name = method->name(); - Symbol* signature = method->signature(); - CallInfo info; - LinkResolver::resolve_virtual_call(info, recv, recv_klass, spec_klass, name, signature, KlassHandle(), false, true, CHECK_(methodHandle())); - return info.selected_method(); -} - static void jni_invoke_static(JNIEnv *env, JavaValue* result, jobject receiver, JNICallType call_type, jmethodID method_id, JNI_ArgumentPusher *args, TRAPS) { @@ -5053,6 +5027,7 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *args_) { void execute_internal_vm_tests() { if (ExecuteInternalVMTests) { tty->print_cr("Running internal VM tests"); + run_unit_test(GlobalDefinitions::test_globals()); run_unit_test(arrayOopDesc::test_max_array_length()); run_unit_test(CollectedHeap::test_is_in()); run_unit_test(QuickSort::test_quick_sort()); diff --git a/hotspot/src/share/vm/prims/jniCheck.hpp b/hotspot/src/share/vm/prims/jniCheck.hpp index 169ab7be3f4..cdf96d11a6c 100644 --- a/hotspot/src/share/vm/prims/jniCheck.hpp +++ b/hotspot/src/share/vm/prims/jniCheck.hpp @@ -33,7 +33,7 @@ extern "C" { // within IN_VM macro), one to be called when in NATIVE state. // When in VM state: - static void ReportJNIFatalError(JavaThread* thr, const char *msg) { + static inline void ReportJNIFatalError(JavaThread* thr, const char *msg) { tty->print_cr("FATAL ERROR in native method: %s", msg); thr->print_stack(); os::abort(true); diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp index 2c5f46e3f72..88575f764a8 100644 --- a/hotspot/src/share/vm/runtime/arguments.cpp +++ b/hotspot/src/share/vm/runtime/arguments.cpp @@ -1745,11 +1745,15 @@ bool Arguments::verify_percentage(uintx value, const char* name) { return false; } +#if !INCLUDE_ALL_GCS +#ifdef ASSERT static bool verify_serial_gc_flags() { return (UseSerialGC && !(UseParNewGC || (UseConcMarkSweepGC || CMSIncrementalMode) || UseG1GC || UseParallelGC || UseParallelOldGC)); } +#endif // ASSERT +#endif // INCLUDE_ALL_GCS // check if do gclog rotation // +UseGCLogFileRotation is a must, @@ -3085,6 +3089,7 @@ do { \ } \ } while(0) +#if !INCLUDE_ALL_GCS static void force_serial_gc() { FLAG_SET_DEFAULT(UseSerialGC, true); FLAG_SET_DEFAULT(CMSIncrementalMode, false); // special CMS suboption @@ -3094,6 +3099,7 @@ static void force_serial_gc() { UNSUPPORTED_GC_OPTION(UseConcMarkSweepGC); UNSUPPORTED_GC_OPTION(UseParNewGC); } +#endif // INCLUDE_ALL_GCS // Parse entry point called from JNI_CreateJavaVM diff --git a/hotspot/src/share/vm/runtime/safepoint.cpp b/hotspot/src/share/vm/runtime/safepoint.cpp index 37ee19a8fbe..f3191e524de 100644 --- a/hotspot/src/share/vm/runtime/safepoint.cpp +++ b/hotspot/src/share/vm/runtime/safepoint.cpp @@ -735,6 +735,9 @@ void SafepointSynchronize::block(JavaThread *thread) { // Exception handlers #ifndef PRODUCT + +#ifdef SPARC + #ifdef _LP64 #define PTR_PAD "" #else @@ -755,7 +758,6 @@ static void print_longs(jlong oldptr, jlong newptr, bool wasoop) { newptr, is_oop?"oop":" ", (wasoop && !is_oop) ? "STALE" : ((wasoop==false&&is_oop==false&&oldptr !=newptr)?"STOMP":" ")); } -#ifdef SPARC static void print_me(intptr_t *new_sp, intptr_t *old_sp, bool *was_oops) { #ifdef _LP64 tty->print_cr("--------+------address-----+------before-----------+-------after----------+"); diff --git a/hotspot/src/share/vm/runtime/synchronizer.cpp b/hotspot/src/share/vm/runtime/synchronizer.cpp index bff39625ed4..6e28286c1a8 100644 --- a/hotspot/src/share/vm/runtime/synchronizer.cpp +++ b/hotspot/src/share/vm/runtime/synchronizer.cpp @@ -449,8 +449,6 @@ void ObjectSynchronizer::notifyall(Handle obj, TRAPS) { // and explicit fences (barriers) to control for architectural reordering performed // by the CPU(s) or platform. -static int MBFence (int x) { OrderAccess::fence(); return x; } - struct SharedGlobals { // These are highly shared mostly-read variables. // To avoid false-sharing they need to be the sole occupants of a $ line. @@ -1639,11 +1637,6 @@ void ObjectSynchronizer::release_monitors_owned_by_thread(TRAPS) { #ifndef PRODUCT -void ObjectSynchronizer::trace_locking(Handle locking_obj, bool is_compiled, - bool is_method, bool is_locking) { - // Don't know what to do here -} - // Verify all monitors in the monitor cache, the verification is weak. void ObjectSynchronizer::verify() { ObjectMonitor* block = gBlockList; diff --git a/hotspot/src/share/vm/runtime/synchronizer.hpp b/hotspot/src/share/vm/runtime/synchronizer.hpp index 8c2d92c50ff..2baa9362614 100644 --- a/hotspot/src/share/vm/runtime/synchronizer.hpp +++ b/hotspot/src/share/vm/runtime/synchronizer.hpp @@ -121,7 +121,6 @@ class ObjectSynchronizer : AllStatic { static void oops_do(OopClosure* f); // debugging - static void trace_locking(Handle obj, bool is_compiled, bool is_method, bool is_locking) PRODUCT_RETURN; static void verify() PRODUCT_RETURN; static int verify_objmon_isinpool(ObjectMonitor *addr) PRODUCT_RETURN0; diff --git a/hotspot/src/share/vm/utilities/debug.cpp b/hotspot/src/share/vm/utilities/debug.cpp index e74475fc3c9..5304cf087ee 100644 --- a/hotspot/src/share/vm/utilities/debug.cpp +++ b/hotspot/src/share/vm/utilities/debug.cpp @@ -608,18 +608,6 @@ extern "C" nmethod* findnm(intptr_t addr) { return CodeCache::find_nmethod((address)addr); } -static address same_page(address x, address y) { - intptr_t page_bits = -os::vm_page_size(); - if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) { - return x; - } else if (x > y) { - return (address)(intptr_t(y) | ~page_bits) + 1; - } else { - return (address)(intptr_t(y) & page_bits); - } -} - - // Another interface that isn't ambiguous in dbx. // Can we someday rename the other find to hsfind? extern "C" void hsfind(intptr_t x) { diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.cpp b/hotspot/src/share/vm/utilities/globalDefinitions.cpp index 778fd500ec0..24380adcb15 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions.cpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions.cpp @@ -355,3 +355,33 @@ size_t lcm(size_t a, size_t b) { return size_t(result); } + +#ifndef PRODUCT + +void GlobalDefinitions::test_globals() { + intptr_t page_sizes[] = { os::vm_page_size(), 4096, 8192, 65536, 2*1024*1024 }; + const int num_page_sizes = sizeof(page_sizes) / sizeof(page_sizes[0]); + + for (int i = 0; i < num_page_sizes; i++) { + intptr_t page_size = page_sizes[i]; + + address a_page = (address)(10*page_size); + + // Check that address within page is returned as is + assert(clamp_address_in_page(a_page, a_page, page_size) == a_page, "incorrect"); + assert(clamp_address_in_page(a_page + 128, a_page, page_size) == a_page + 128, "incorrect"); + assert(clamp_address_in_page(a_page + page_size - 1, a_page, page_size) == a_page + page_size - 1, "incorrect"); + + // Check that address above page returns start of next page + assert(clamp_address_in_page(a_page + page_size, a_page, page_size) == a_page + page_size, "incorrect"); + assert(clamp_address_in_page(a_page + page_size + 1, a_page, page_size) == a_page + page_size, "incorrect"); + assert(clamp_address_in_page(a_page + page_size*5 + 1, a_page, page_size) == a_page + page_size, "incorrect"); + + // Check that address below page returns start of page + assert(clamp_address_in_page(a_page - 1, a_page, page_size) == a_page, "incorrect"); + assert(clamp_address_in_page(a_page - 2*page_size - 1, a_page, page_size) == a_page, "incorrect"); + assert(clamp_address_in_page(a_page - 5*page_size - 1, a_page, page_size) == a_page, "incorrect"); + } +} + +#endif // PRODUCT diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp index 5c10cf018be..3bf22d42290 100644 --- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp +++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp @@ -419,6 +419,24 @@ inline intptr_t align_object_offset(intptr_t offset) { return align_size_up(offset, HeapWordsPerLong); } +// Clamp an address to be within a specific page +// 1. If addr is on the page it is returned as is +// 2. If addr is above the page_address the start of the *next* page will be returned +// 3. Otherwise, if addr is below the page_address the start of the page will be returned +inline address clamp_address_in_page(address addr, address page_address, intptr_t page_size) { + if (align_size_down(intptr_t(addr), page_size) == align_size_down(intptr_t(page_address), page_size)) { + // address is in the specified page, just return it as is + return addr; + } else if (addr > page_address) { + // address is above specified page, return start of next page + return (address)align_size_down(intptr_t(page_address), page_size) + page_size; + } else { + // address is below specified page, return start of page + return (address)align_size_down(intptr_t(page_address), page_size); + } +} + + // The expected size in bytes of a cache line, used to pad data structures. #define DEFAULT_CACHE_LINE_SIZE 64 @@ -1296,4 +1314,15 @@ static inline void* dereference_vptr(void* addr) { return *(void**)addr; } + +#ifndef PRODUCT + +// For unit testing only +class GlobalDefinitions { +public: + static void test_globals(); +}; + +#endif // PRODUCT + #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_HPP From 0afa77628c964aa1da3ed62c61708bd0f2e1277a Mon Sep 17 00:00:00 2001 From: Alejandro Murillo Date: Thu, 4 Apr 2013 21:15:43 -0700 Subject: [PATCH 074/151] 8011584: new hotspot build - hs25-b27 Reviewed-by: jcoomes --- hotspot/make/hotspot_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version index 03616715c5c..fe8980d2ce7 100644 --- a/hotspot/make/hotspot_version +++ b/hotspot/make/hotspot_version @@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2013 HS_MAJOR_VER=25 HS_MINOR_VER=0 -HS_BUILD_NUMBER=26 +HS_BUILD_NUMBER=27 JDK_MAJOR_VER=1 JDK_MINOR_VER=8 From 340226f16a5b7730ad891cc35c8f3ea900f7514d Mon Sep 17 00:00:00 2001 From: Niclas Adlertz Date: Fri, 5 Apr 2013 11:09:43 +0200 Subject: [PATCH 075/151] 8006016: Memory leak at hotspot/src/share/vm/adlc/output_c.cpp Reviewed-by: kvn, roland --- hotspot/src/share/vm/adlc/output_c.cpp | 100 ++++++++++++++----------- hotspot/src/share/vm/adlc/output_h.cpp | 18 ++++- 2 files changed, 71 insertions(+), 47 deletions(-) diff --git a/hotspot/src/share/vm/adlc/output_c.cpp b/hotspot/src/share/vm/adlc/output_c.cpp index 36b7157bdea..f86dd21fc3b 100644 --- a/hotspot/src/share/vm/adlc/output_c.cpp +++ b/hotspot/src/share/vm/adlc/output_c.cpp @@ -63,11 +63,10 @@ static void defineRegNames(FILE *fp, RegisterForm *registers) { RegDef *reg_def = NULL; RegDef *next = NULL; registers->reset_RegDefs(); - for( reg_def = registers->iter_RegDefs(); reg_def != NULL; reg_def = next ) { + for (reg_def = registers->iter_RegDefs(); reg_def != NULL; reg_def = next) { next = registers->iter_RegDefs(); const char *comma = (next != NULL) ? "," : " // no trailing comma"; - fprintf(fp," \"%s\"%s\n", - reg_def->_regname, comma ); + fprintf(fp," \"%s\"%s\n", reg_def->_regname, comma); } // Finish defining enumeration @@ -79,10 +78,10 @@ static void defineRegNames(FILE *fp, RegisterForm *registers) { reg_def = NULL; next = NULL; registers->reset_RegDefs(); - for( reg_def = registers->iter_RegDefs(); reg_def != NULL; reg_def = next ) { + for (reg_def = registers->iter_RegDefs(); reg_def != NULL; reg_def = next) { next = registers->iter_RegDefs(); const char *comma = (next != NULL) ? "," : " // no trailing comma"; - fprintf(fp,"\t%s%s\n", reg_def->_concrete, comma ); + fprintf(fp,"\t%s%s\n", reg_def->_concrete, comma); } // Finish defining array fprintf(fp,"\t};\n"); @@ -104,19 +103,17 @@ static void defineRegEncodes(FILE *fp, RegisterForm *registers) { RegDef *reg_def = NULL; RegDef *next = NULL; registers->reset_RegDefs(); - for( reg_def = registers->iter_RegDefs(); reg_def != NULL; reg_def = next ) { + for (reg_def = registers->iter_RegDefs(); reg_def != NULL; reg_def = next) { next = registers->iter_RegDefs(); const char* register_encode = reg_def->register_encode(); const char *comma = (next != NULL) ? "," : " // no trailing comma"; int encval; if (!ADLParser::is_int_token(register_encode, encval)) { - fprintf(fp," %s%s // %s\n", - register_encode, comma, reg_def->_regname ); + fprintf(fp," %s%s // %s\n", register_encode, comma, reg_def->_regname); } else { // Output known constants in hex char format (backward compatibility). assert(encval < 256, "Exceeded supported width for register encoding"); - fprintf(fp," (unsigned char)'\\x%X'%s // %s\n", - encval, comma, reg_def->_regname ); + fprintf(fp," (unsigned char)'\\x%X'%s // %s\n", encval, comma, reg_def->_regname); } } // Finish defining enumeration @@ -133,9 +130,10 @@ static void defineRegClassEnum(FILE *fp, RegisterForm *registers) { fprintf(fp,"// Enumeration of register class names\n"); fprintf(fp, "enum machRegisterClass {\n"); registers->_rclasses.reset(); - for( const char *class_name = NULL; - (class_name = registers->_rclasses.iter()) != NULL; ) { - fprintf(fp," %s,\n", toUpper( class_name )); + for (const char *class_name = NULL; (class_name = registers->_rclasses.iter()) != NULL;) { + const char * class_name_to_upper = toUpper(class_name); + fprintf(fp," %s,\n", class_name_to_upper); + delete[] class_name_to_upper; } // Finish defining enumeration fprintf(fp, " _last_Mach_Reg_Class\n"); @@ -148,7 +146,7 @@ static void defineRegClassEnum(FILE *fp, RegisterForm *registers) { void ArchDesc::declare_register_masks(FILE *fp_hpp) { const char *rc_name; - if( _register ) { + if (_register) { // Build enumeration of user-defined register classes. defineRegClassEnum(fp_hpp, _register); @@ -156,24 +154,27 @@ void ArchDesc::declare_register_masks(FILE *fp_hpp) { fprintf(fp_hpp,"\n"); fprintf(fp_hpp,"// Register masks, one for each register class.\n"); _register->_rclasses.reset(); - for( rc_name = NULL; - (rc_name = _register->_rclasses.iter()) != NULL; ) { - const char *prefix = ""; - RegClass *reg_class = _register->getRegClass(rc_name); - assert( reg_class, "Using an undefined register class"); + for (rc_name = NULL; (rc_name = _register->_rclasses.iter()) != NULL;) { + const char *prefix = ""; + RegClass *reg_class = _register->getRegClass(rc_name); + assert(reg_class, "Using an undefined register class"); + + const char* rc_name_to_upper = toUpper(rc_name); if (reg_class->_user_defined == NULL) { - fprintf(fp_hpp, "extern const RegMask _%s%s_mask;\n", prefix, toUpper( rc_name ) ); - fprintf(fp_hpp, "inline const RegMask &%s%s_mask() { return _%s%s_mask; }\n", prefix, toUpper( rc_name ), prefix, toUpper( rc_name )); + fprintf(fp_hpp, "extern const RegMask _%s%s_mask;\n", prefix, rc_name_to_upper); + fprintf(fp_hpp, "inline const RegMask &%s%s_mask() { return _%s%s_mask; }\n", prefix, rc_name_to_upper, prefix, rc_name_to_upper); } else { - fprintf(fp_hpp, "inline const RegMask &%s%s_mask() { %s }\n", prefix, toUpper( rc_name ), reg_class->_user_defined); + fprintf(fp_hpp, "inline const RegMask &%s%s_mask() { %s }\n", prefix, rc_name_to_upper, reg_class->_user_defined); } - if( reg_class->_stack_or_reg ) { + if (reg_class->_stack_or_reg) { assert(reg_class->_user_defined == NULL, "no user defined reg class here"); - fprintf(fp_hpp, "extern const RegMask _%sSTACK_OR_%s_mask;\n", prefix, toUpper( rc_name ) ); - fprintf(fp_hpp, "inline const RegMask &%sSTACK_OR_%s_mask() { return _%sSTACK_OR_%s_mask; }\n", prefix, toUpper( rc_name ), prefix, toUpper( rc_name ) ); + fprintf(fp_hpp, "extern const RegMask _%sSTACK_OR_%s_mask;\n", prefix, rc_name_to_upper); + fprintf(fp_hpp, "inline const RegMask &%sSTACK_OR_%s_mask() { return _%sSTACK_OR_%s_mask; }\n", prefix, rc_name_to_upper, prefix, rc_name_to_upper); } + delete[] rc_name_to_upper; + } } } @@ -183,34 +184,41 @@ void ArchDesc::declare_register_masks(FILE *fp_hpp) { void ArchDesc::build_register_masks(FILE *fp_cpp) { const char *rc_name; - if( _register ) { + if (_register) { // Generate a list of register masks, one for each class. fprintf(fp_cpp,"\n"); fprintf(fp_cpp,"// Register masks, one for each register class.\n"); _register->_rclasses.reset(); - for( rc_name = NULL; - (rc_name = _register->_rclasses.iter()) != NULL; ) { - const char *prefix = ""; - RegClass *reg_class = _register->getRegClass(rc_name); - assert( reg_class, "Using an undefined register class"); + for (rc_name = NULL; (rc_name = _register->_rclasses.iter()) != NULL;) { + const char *prefix = ""; + RegClass *reg_class = _register->getRegClass(rc_name); + assert(reg_class, "Using an undefined register class"); - if (reg_class->_user_defined != NULL) continue; + if (reg_class->_user_defined != NULL) { + continue; + } int len = RegisterForm::RegMask_Size(); - fprintf(fp_cpp, "const RegMask _%s%s_mask(", prefix, toUpper( rc_name ) ); - { int i; - for( i = 0; i < len-1; i++ ) - fprintf(fp_cpp," 0x%x,",reg_class->regs_in_word(i,false)); - fprintf(fp_cpp," 0x%x );\n",reg_class->regs_in_word(i,false)); + const char* rc_name_to_upper = toUpper(rc_name); + fprintf(fp_cpp, "const RegMask _%s%s_mask(", prefix, rc_name_to_upper); + + { + int i; + for(i = 0; i < len - 1; i++) { + fprintf(fp_cpp," 0x%x,", reg_class->regs_in_word(i, false)); + } + fprintf(fp_cpp," 0x%x );\n", reg_class->regs_in_word(i, false)); } - if( reg_class->_stack_or_reg ) { + if (reg_class->_stack_or_reg) { int i; - fprintf(fp_cpp, "const RegMask _%sSTACK_OR_%s_mask(", prefix, toUpper( rc_name ) ); - for( i = 0; i < len-1; i++ ) - fprintf(fp_cpp," 0x%x,",reg_class->regs_in_word(i,true)); - fprintf(fp_cpp," 0x%x );\n",reg_class->regs_in_word(i,true)); + fprintf(fp_cpp, "const RegMask _%sSTACK_OR_%s_mask(", prefix, rc_name_to_upper); + for(i = 0; i < len - 1; i++) { + fprintf(fp_cpp," 0x%x,",reg_class->regs_in_word(i, true)); + } + fprintf(fp_cpp," 0x%x );\n",reg_class->regs_in_word(i, true)); } + delete[] rc_name_to_upper; } } } @@ -2676,7 +2684,9 @@ static void defineIn_RegMask(FILE *fp, FormDict &globals, OperandForm &oper) { if (strcmp(first_reg_class, "stack_slots") == 0) { fprintf(fp," return &(Compile::current()->FIRST_STACK_mask());\n"); } else { - fprintf(fp," return &%s_mask();\n", toUpper(first_reg_class)); + const char* first_reg_class_to_upper = toUpper(first_reg_class); + fprintf(fp," return &%s_mask();\n", first_reg_class_to_upper); + delete[] first_reg_class_to_upper; } } else { // Build a switch statement to return the desired mask. @@ -2688,7 +2698,9 @@ static void defineIn_RegMask(FILE *fp, FormDict &globals, OperandForm &oper) { if( !strcmp(reg_class, "stack_slots") ) { fprintf(fp, " case %d: return &(Compile::current()->FIRST_STACK_mask());\n", index); } else { - fprintf(fp, " case %d: return &%s_mask();\n", index, toUpper(reg_class)); + const char* reg_class_to_upper = toUpper(reg_class); + fprintf(fp, " case %d: return &%s_mask();\n", index, reg_class_to_upper); + delete[] reg_class_to_upper; } } fprintf(fp," }\n"); diff --git a/hotspot/src/share/vm/adlc/output_h.cpp b/hotspot/src/share/vm/adlc/output_h.cpp index bf538baddf3..3fdaf39e8f1 100644 --- a/hotspot/src/share/vm/adlc/output_h.cpp +++ b/hotspot/src/share/vm/adlc/output_h.cpp @@ -2069,9 +2069,21 @@ public: void closing() { fprintf(_cpp, " _LAST_MACH_OPER\n"); OutputMap::closing(); } - void map(OpClassForm &opc) { fprintf(_cpp, " %s", _AD.machOperEnum(opc._ident) ); } - void map(OperandForm &oper) { fprintf(_cpp, " %s", _AD.machOperEnum(oper._ident) ); } - void map(char *name) { fprintf(_cpp, " %s", _AD.machOperEnum(name)); } + void map(OpClassForm &opc) { + const char* opc_ident_to_upper = _AD.machOperEnum(opc._ident); + fprintf(_cpp, " %s", opc_ident_to_upper); + delete[] opc_ident_to_upper; + } + void map(OperandForm &oper) { + const char* oper_ident_to_upper = _AD.machOperEnum(oper._ident); + fprintf(_cpp, " %s", oper_ident_to_upper); + delete[] oper_ident_to_upper; + } + void map(char *name) { + const char* name_to_upper = _AD.machOperEnum(name); + fprintf(_cpp, " %s", name_to_upper); + delete[] name_to_upper; + } bool do_instructions() { return false; } void map(InstructForm &inst){ assert( false, "ShouldNotCallThis()"); } From 28e33e673a19e190d3c527a1c10a04827b873d53 Mon Sep 17 00:00:00 2001 From: Zhengyu Gu Date: Fri, 5 Apr 2013 12:19:19 -0400 Subject: [PATCH 076/151] 8011161: NMT: Memory leak when encountering out of memory error while initializing memory snapshot Fix memory leaks when NMT fails to initialize snapshot and worker thread Reviewed-by: dcubed, ccheung, rdurbin --- hotspot/src/share/vm/services/memTracker.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hotspot/src/share/vm/services/memTracker.cpp b/hotspot/src/share/vm/services/memTracker.cpp index 8172f67ad4a..13b6de80a21 100644 --- a/hotspot/src/share/vm/services/memTracker.cpp +++ b/hotspot/src/share/vm/services/memTracker.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -127,12 +127,15 @@ void MemTracker::start() { assert(_state == NMT_bootstrapping_multi_thread, "wrong state"); _snapshot = new (std::nothrow)MemSnapshot(); - if (_snapshot != NULL && !_snapshot->out_of_memory()) { - if (start_worker()) { + if (_snapshot != NULL) { + if (!_snapshot->out_of_memory() && start_worker()) { _state = NMT_started; NMT_track_callsite = (_tracking_level == NMT_detail && can_walk_stack()); return; } + + delete _snapshot; + _snapshot = NULL; } // fail to start native memory tracking, shut it down @@ -544,7 +547,10 @@ bool MemTracker::start_worker() { assert(_worker_thread == NULL, "Just Check"); _worker_thread = new (std::nothrow) MemTrackWorker(); if (_worker_thread == NULL || _worker_thread->has_error()) { - shutdown(NMT_initialization); + if (_worker_thread != NULL) { + delete _worker_thread; + _worker_thread = NULL; + } return false; } _worker_thread->start(); From bc7905ab3a786abec6114fb19e2b20cf0fcc48cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Walln=C3=B6fer?= Date: Fri, 5 Apr 2013 19:50:10 +0200 Subject: [PATCH 077/151] 8009230: Nashorn rejects extended RegExp syntax accepted by all major JS engines Reviewed-by: jlaskey, lagergren --- .../runtime/regexp/RegExpScanner.java | 41 ++++++-- nashorn/test/script/basic/JDK-8009230.js | 93 +++++++++++++++++++ .../test/script/basic/JDK-8009230.js.EXPECTED | 45 +++++++++ 3 files changed, 170 insertions(+), 9 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8009230.js create mode 100644 nashorn/test/script/basic/JDK-8009230.js.EXPECTED diff --git a/nashorn/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java b/nashorn/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java index e8c60c4a63e..11928464add 100644 --- a/nashorn/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java +++ b/nashorn/src/jdk/nashorn/internal/runtime/regexp/RegExpScanner.java @@ -26,11 +26,10 @@ package jdk.nashorn.internal.runtime.regexp; import java.util.HashMap; -import java.util.LinkedHashSet; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.regex.PatternSyntaxException; import jdk.nashorn.internal.parser.Lexer; @@ -58,7 +57,7 @@ final class RegExpScanner extends Scanner { private final List caps = new LinkedList<>(); /** Forward references to capturing parenthesis to be resolved later.*/ - private final Set forwardReferences = new LinkedHashSet<>(); + private final LinkedList forwardReferences = new LinkedList<>(); /** Current level of zero-width negative lookahead assertions. */ private int negativeLookaheadLevel; @@ -104,10 +103,20 @@ final class RegExpScanner extends Scanner { return; } - for (final Integer ref : forwardReferences) { - if (ref.intValue() > caps.size()) { - neverMatches = true; - break; + Iterator iterator = forwardReferences.descendingIterator(); + while (iterator.hasNext()) { + final int pos = iterator.next(); + final int num = iterator.next(); + if (num > caps.size()) { + // Non-existing reference should never match, if smaller than 8 convert to octal escape + // to be compatible with other engines. + if (num < 8) { + String escape = "\\x0" + num; + sb.insert(pos, escape); + } else { + neverMatches = true; + break; + } } } @@ -402,6 +411,10 @@ final class RegExpScanner extends Scanner { if (ch0 == '}') { pop('}'); commit(1); + } else { + // Bad quantifier should be rejected but is accepted by all major engines + restart(startIn, startOut); + return false; } return true; @@ -637,7 +650,16 @@ final class RegExpScanner extends Scanner { throw new RuntimeException("\\ at end of pattern"); // will be converted to PatternSyntaxException } // ES 5.1 A.7 requires "not IdentifierPart" here but all major engines accept any character here. - if (NON_IDENT_ESCAPES.indexOf(ch0) == -1) { + if (ch0 == 'c') { + // Ignore invalid control letter escape if within a character class + if (inCharClass && ch1 != ']') { + sb.setLength(sb.length() - 1); + skip(2); + return true; + } else { + sb.append('\\'); // Treat invalid \c control sequence as \\c + } + } else if (NON_IDENT_ESCAPES.indexOf(ch0) == -1) { sb.setLength(sb.length() - 1); } return commit(1); @@ -677,8 +699,9 @@ final class RegExpScanner extends Scanner { // Forward reference to a capture group. Forward references are always undefined so we // can omit it from the output buffer. Additionally, if the capture group does not exist // the whole regexp becomes invalid, so register the reference for later processing. - forwardReferences.add(num); sb.setLength(sb.length() - 1); + forwardReferences.add(num); + forwardReferences.add(sb.length()); skip(1); return true; } diff --git a/nashorn/test/script/basic/JDK-8009230.js b/nashorn/test/script/basic/JDK-8009230.js new file mode 100644 index 00000000000..f161158aef5 --- /dev/null +++ b/nashorn/test/script/basic/JDK-8009230.js @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * JDK-8009230: Nashorn rejects extended RegExp syntax accepted by all major JS engines + * + * @test + * @run + */ + + +// Invalid ControlEscape/IdentityEscape character treated as literal. +print(/\z/.exec("z")); // Invalid escape, same as /z/ +// Incomplete/Invalid ControlEscape treated as "\\c" +print(/\c/.exec("\\c")); // same as /\\c/ +print(/\c2/.exec("\\c2")); // same as /\\c2/ +print(/\C/.exec("C")); // same as /C/ +print(/\C2/.exec("C2")); // same as /C2/ +// Incomplete HexEscapeSequence escape treated as "x". +print(/\x/.exec("x")); // incomplete x-escape +print(/\x1/.exec("x1")); // incomplete x-escape +print(/\x1z/.exec("x1z")); // incomplete x-escape +// Incomplete UnicodeEscapeSequence escape treated as "u". +print(/\u/.exec("u")); // incomplete u-escape +print(/\uz/.exec("uz")); // incomplete u-escape +print(/\u1/.exec("u1")); // incomplete u-escape +print(/\u1z/.exec("u1z")); // incomplete u-escape +print(/\u12/.exec("u12")); // incomplete u-escape +print(/\u12z/.exec("u12z")); // incomplete u-escape +print(/\u123/.exec("u123")); // incomplete u-escape +print(/\u123z/.exec("u123z")); // incomplete u-escape +// Bad quantifier range: +print(/x{z/.exec("x{z")); // same as /x\{z/ +print(/x{1z/.exec("x{1z")); // same as /x\{1z/ +print(/x{1,z/.exec("x{1,z")); // same as /x\{1,z/ +print(/x{1,2z/.exec("x{1,2z")); // same as /x\{1,2z/ +print(/x{10000,20000z/.exec("x{10000,20000z")); // same as /x\{10000,20000z/ +// Notice: It needs arbitrary lookahead to determine the invalidity, +// except Mozilla that limits the numbers. + +// Zero-initialized Octal escapes. +/\012/; // same as /\x0a/ + +// Nonexisting back-references smaller than 8 treated as octal escapes: +print(/\5/.exec("\u0005")); // same as /\x05/ +print(/\7/.exec("\u0007")); // same as /\x07/ +print(/\8/.exec("\u0008")); // does not match + +// Invalid PatternCharacter accepted unescaped +print(/]/.exec("]")); +print(/{/.exec("{")); +print(/}/.exec("}")); + +// Bad escapes also inside CharacterClass. +print(/[\z]/.exec("z")); +print(/[\c]/.exec("c")); +print(/[\c2]/.exec("c")); +print(/[\x]/.exec("x")); +print(/[\x1]/.exec("x1")); +print(/[\x1z]/.exec("x1z")); +print(/[\u]/.exec("u")); +print(/[\uz]/.exec("u")); +print(/[\u1]/.exec("u")); +print(/[\u1z]/.exec("u")); +print(/[\u12]/.exec("u")); +print(/[\u12z]/.exec("u")); +print(/[\u123]/.exec("u")); +print(/[\u123z]/.exec("u")); +print(/[\012]/.exec("0")); +print(/[\5]/.exec("5")); +// And in addition: +print(/[\B]/.exec("B")); +print(/()()[\2]/.exec("")); // Valid backreference should be invalid. diff --git a/nashorn/test/script/basic/JDK-8009230.js.EXPECTED b/nashorn/test/script/basic/JDK-8009230.js.EXPECTED new file mode 100644 index 00000000000..63f6e615a0f --- /dev/null +++ b/nashorn/test/script/basic/JDK-8009230.js.EXPECTED @@ -0,0 +1,45 @@ +z +\c +\c2 +C +C2 +x +x1 +x1z +u +uz +u1 +u1z +u12 +u12z +u123 +u123z +x{z +x{1z +x{1,z +x{1,2z +x{10000,20000z + + +null +] +{ +} +z +c +null +x +x +x +u +u +u +u +u +u +u +u +null +null +B +null From a72b5d24e6fda84867a7e691df0d32efa77d4023 Mon Sep 17 00:00:00 2001 From: Calvin Cheung Date: Fri, 5 Apr 2013 11:15:13 -0700 Subject: [PATCH 078/151] 8006001: [parfait] Possible file leak in hotspot/src/os/linux/vm/perfMemory_linux.cpp Reviewed-by: zgu, coleenp, hseigel, dholmes --- hotspot/src/os/bsd/vm/perfMemory_bsd.cpp | 17 ++++++++++------- hotspot/src/os/linux/vm/perfMemory_linux.cpp | 17 ++++++++++------- .../src/os/solaris/vm/perfMemory_solaris.cpp | 17 ++++++++++------- .../src/os/windows/vm/perfMemory_windows.cpp | 7 +++++-- 4 files changed, 35 insertions(+), 23 deletions(-) diff --git a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp index cb9dada906b..3b794b70230 100644 --- a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp +++ b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp @@ -672,15 +672,15 @@ static int open_sharedmem_file(const char* filename, int oflags, TRAPS) { RESTARTABLE(::open(filename, oflags), result); if (result == OS_ERR) { if (errno == ENOENT) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), - "Process not found"); + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), + "Process not found", OS_ERR); } else if (errno == EACCES) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), - "Permission denied"); + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), + "Permission denied", OS_ERR); } else { - THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno)); + THROW_MSG_(vmSymbols::java_io_IOException(), strerror(errno), OS_ERR); } } @@ -828,7 +828,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor char* mapAddress; int result; int fd; - size_t size; + size_t size = 0; const char* luser = NULL; int mmap_prot; @@ -899,9 +899,12 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor if (*sizep == 0) { size = sharedmem_filesize(fd, CHECK); - assert(size != 0, "unexpected size"); + } else { + size = *sizep; } + assert(size > 0, "unexpected size <= 0"); + mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0); // attempt to close the file - restart if it gets interrupted, diff --git a/hotspot/src/os/linux/vm/perfMemory_linux.cpp b/hotspot/src/os/linux/vm/perfMemory_linux.cpp index b54c5db14a5..d1859b9a6c5 100644 --- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp +++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp @@ -672,15 +672,15 @@ static int open_sharedmem_file(const char* filename, int oflags, TRAPS) { RESTARTABLE(::open(filename, oflags), result); if (result == OS_ERR) { if (errno == ENOENT) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), - "Process not found"); + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), + "Process not found", OS_ERR); } else if (errno == EACCES) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), - "Permission denied"); + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), + "Permission denied", OS_ERR); } else { - THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno)); + THROW_MSG_(vmSymbols::java_io_IOException(), strerror(errno), OS_ERR); } } @@ -828,7 +828,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor char* mapAddress; int result; int fd; - size_t size; + size_t size = 0; const char* luser = NULL; int mmap_prot; @@ -899,9 +899,12 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor if (*sizep == 0) { size = sharedmem_filesize(fd, CHECK); - assert(size != 0, "unexpected size"); + } else { + size = *sizep; } + assert(size > 0, "unexpected size <= 0"); + mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0); // attempt to close the file - restart if it gets interrupted, diff --git a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp index ebbc00b3015..3b7744a482e 100644 --- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp +++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp @@ -687,15 +687,15 @@ static int open_sharedmem_file(const char* filename, int oflags, TRAPS) { RESTARTABLE(::open(filename, oflags), result); if (result == OS_ERR) { if (errno == ENOENT) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), - "Process not found"); + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), + "Process not found", OS_ERR); } else if (errno == EACCES) { - THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), - "Permission denied"); + THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(), + "Permission denied", OS_ERR); } else { - THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno)); + THROW_MSG_(vmSymbols::java_io_IOException(), strerror(errno), OS_ERR); } } @@ -843,7 +843,7 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor char* mapAddress; int result; int fd; - size_t size; + size_t size = 0; const char* luser = NULL; int mmap_prot; @@ -914,9 +914,12 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor if (*sizep == 0) { size = sharedmem_filesize(fd, CHECK); - assert(size != 0, "unexpected size"); + } else { + size = *sizep; } + assert(size > 0, "unexpected size <= 0"); + mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0); // attempt to close the file - restart if it gets interrupted, diff --git a/hotspot/src/os/windows/vm/perfMemory_windows.cpp b/hotspot/src/os/windows/vm/perfMemory_windows.cpp index 061c9d84a82..2f25414d1b7 100644 --- a/hotspot/src/os/windows/vm/perfMemory_windows.cpp +++ b/hotspot/src/os/windows/vm/perfMemory_windows.cpp @@ -1581,7 +1581,7 @@ static void open_file_mapping(const char* user, int vmid, ResourceMark rm; void *mapAddress = 0; - size_t size; + size_t size = 0; HANDLE fmh; DWORD ofm_access; DWORD mv_access; @@ -1652,9 +1652,12 @@ static void open_file_mapping(const char* user, int vmid, if (*sizep == 0) { size = sharedmem_filesize(rfilename, CHECK); - assert(size != 0, "unexpected size"); + } else { + size = *sizep; } + assert(size > 0, "unexpected size <= 0"); + // Open the file mapping object with the given name fmh = open_sharedmem_object(robjectname, ofm_access, CHECK); From 4a685f181b71f534118a40a3314cb09e285c84e8 Mon Sep 17 00:00:00 2001 From: Bengt Rutisson Date: Mon, 8 Apr 2013 07:49:28 +0200 Subject: [PATCH 079/151] 7197666: java -d64 -version core dumps in a box with lots of memory Allow task queues to be mmapped instead of malloced on Solaris Reviewed-by: coleenp, jmasa, johnc, tschatzl --- hotspot/src/share/vm/memory/allocation.hpp | 19 ++++++++ .../src/share/vm/memory/allocation.inline.hpp | 44 +++++++++++++++++++ hotspot/src/share/vm/runtime/globals.hpp | 9 +++- hotspot/src/share/vm/utilities/taskqueue.hpp | 3 +- 4 files changed, 72 insertions(+), 3 deletions(-) diff --git a/hotspot/src/share/vm/memory/allocation.hpp b/hotspot/src/share/vm/memory/allocation.hpp index e1e266ec5cf..bc01b0135b0 100644 --- a/hotspot/src/share/vm/memory/allocation.hpp +++ b/hotspot/src/share/vm/memory/allocation.hpp @@ -611,4 +611,23 @@ public: void check() PRODUCT_RETURN; }; +// Helper class to allocate arrays that may become large. +// Uses the OS malloc for allocations smaller than ArrayAllocatorMallocLimit +// and uses mapped memory for larger allocations. +// Most OS mallocs do something similar but Solaris malloc does not revert +// to mapped memory for large allocations. By default ArrayAllocatorMallocLimit +// is set so that we always use malloc except for Solaris where we set the +// limit to get mapped memory. +template +class ArrayAllocator : StackObj { + char* _addr; + bool _use_malloc; + size_t _size; + public: + ArrayAllocator() : _addr(NULL), _use_malloc(false), _size(0) { } + ~ArrayAllocator() { free(); } + E* allocate(size_t length); + void free(); +}; + #endif // SHARE_VM_MEMORY_ALLOCATION_HPP diff --git a/hotspot/src/share/vm/memory/allocation.inline.hpp b/hotspot/src/share/vm/memory/allocation.inline.hpp index 6c236e17b7a..79bd774e358 100644 --- a/hotspot/src/share/vm/memory/allocation.inline.hpp +++ b/hotspot/src/share/vm/memory/allocation.inline.hpp @@ -108,5 +108,49 @@ template void CHeapObj::operator delete(void* p){ FreeHeap(p, F); } +template +E* ArrayAllocator::allocate(size_t length) { + assert(_addr == NULL, "Already in use"); + + _size = sizeof(E) * length; + _use_malloc = _size < ArrayAllocatorMallocLimit; + + if (_use_malloc) { + _addr = AllocateHeap(_size, F); + if (_addr == NULL && _size >= (size_t)os::vm_allocation_granularity()) { + // malloc failed let's try with mmap instead + _use_malloc = false; + } else { + return (E*)_addr; + } + } + + int alignment = os::vm_allocation_granularity(); + _size = align_size_up(_size, alignment); + + _addr = os::reserve_memory(_size, NULL, alignment); + if (_addr == NULL) { + vm_exit_out_of_memory(_size, "Allocator (reserve)"); + } + + bool success = os::commit_memory(_addr, _size, false /* executable */); + if (!success) { + vm_exit_out_of_memory(_size, "Allocator (commit)"); + } + + return (E*)_addr; +} + +template +void ArrayAllocator::free() { + if (_addr != NULL) { + if (_use_malloc) { + FreeHeap(_addr, F); + } else { + os::release_memory(_addr, _size); + } + _addr = NULL; + } +} #endif // SHARE_VM_MEMORY_ALLOCATION_INLINE_HPP diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp index 49f734ab97c..011112ce9a5 100644 --- a/hotspot/src/share/vm/runtime/globals.hpp +++ b/hotspot/src/share/vm/runtime/globals.hpp @@ -3668,8 +3668,13 @@ class CommandLineFlags { product(bool, PrintGCCause, true, \ "Include GC cause in GC logging") \ \ - product(bool, AllowNonVirtualCalls, false, \ - "Obey the ACC_SUPER flag and allow invokenonvirtual calls") + product(bool , AllowNonVirtualCalls, false, \ + "Obey the ACC_SUPER flag and allow invokenonvirtual calls") \ + \ + experimental(uintx, ArrayAllocatorMallocLimit, \ + SOLARIS_ONLY(64*K) NOT_SOLARIS(max_uintx), \ + "Allocation less than this value will be allocated " \ + "using malloc. Larger allocations will use mmap.") /* * Macros for factoring of globals diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp index dd98186bb36..980b7e973e0 100644 --- a/hotspot/src/share/vm/utilities/taskqueue.hpp +++ b/hotspot/src/share/vm/utilities/taskqueue.hpp @@ -253,6 +253,7 @@ public: template class GenericTaskQueue: public TaskQueueSuper { + ArrayAllocator _array_allocator; protected: typedef typename TaskQueueSuper::Age Age; typedef typename TaskQueueSuper::idx_t idx_t; @@ -314,7 +315,7 @@ GenericTaskQueue::GenericTaskQueue() { template void GenericTaskQueue::initialize() { - _elems = NEW_C_HEAP_ARRAY(E, N, F); + _elems = _array_allocator.allocate(N); } template From 12be356d81b7249788f0b5382e5dd52ef8a6511c Mon Sep 17 00:00:00 2001 From: David Chase Date: Mon, 8 Apr 2013 07:40:08 -0700 Subject: [PATCH 080/151] 8010913: compiler/6863420 often exceeds timeout Add longer timeout for jtreg, add internal timeout thread to prevent spurious timeouts Reviewed-by: twisti, kvn --- hotspot/test/compiler/6863420/Test.java | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/hotspot/test/compiler/6863420/Test.java b/hotspot/test/compiler/6863420/Test.java index 072e7f3e19d..11d91d35aeb 100644 --- a/hotspot/test/compiler/6863420/Test.java +++ b/hotspot/test/compiler/6863420/Test.java @@ -27,17 +27,35 @@ * @bug 6863420 * @summary os::javaTimeNanos() go backward on Solaris x86 * - * @run main/othervm Test + * Notice the internal timeout in timeout thread Test.TOT. + * @run main/othervm/timeout=300 Test */ public class Test { + + static final int INTERNAL_TIMEOUT=240; + static class TOT extends Thread { + public void run() { + try { + Thread.sleep(INTERNAL_TIMEOUT*1000); + } catch (InterruptedException ex) { + } + done = true; + } + } + static long value = 0; static boolean got_backward_time = false; + static volatile boolean done = false; public static void main(String args[]) { final int count = 100000; - for (int numThreads = 1; numThreads <= 32; numThreads++) { + TOT tot = new TOT(); + tot.setDaemon(true); + tot.start(); + + for (int numThreads = 1; !done && numThreads <= 32; numThreads++) { final int numRuns = 1; for (int t=1; t <= numRuns; t++) { final int curRun = t; @@ -48,7 +66,7 @@ public class Test { Runnable thread = new Runnable() { public void run() { - for (long l = 0; l < 100000; l++) { + for (long l = 0; !done && l < 100000; l++) { final long start = System.nanoTime(); if (value == 12345678) { System.out.println("Wow!"); From f298073f336d566db7d917ba7d6c44d968f6fac9 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 8 Apr 2013 15:51:41 +0100 Subject: [PATCH 081/151] 8010922: Cleanup: add support for ad-hoc method check logic Support pluggable method checkers Reviewed-by: jjg --- .../com/sun/tools/javac/comp/Attr.java | 5 +- .../sun/tools/javac/comp/DeferredAttr.java | 8 +- .../com/sun/tools/javac/comp/Infer.java | 3 +- .../com/sun/tools/javac/comp/Resolve.java | 248 ++++++++++++------ 4 files changed, 176 insertions(+), 88 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java index 6297a72823e..ca8e266f54a 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java @@ -2574,8 +2574,9 @@ public class Attr extends JCTree.Visitor { setFunctionalInfo(that, pt(), desc, resultInfo.checkContext.inferenceContext()); List argtypes = desc.getParameterTypes(); - Pair refResult = rs.resolveMemberReference(that.pos(), localEnv, that, - that.expr.type, that.name, argtypes, typeargtypes, true); + Pair refResult = + rs.resolveMemberReference(that.pos(), localEnv, that, + that.expr.type, that.name, argtypes, typeargtypes, true, rs.resolveMethodCheck); Symbol refSym = refResult.fst; Resolve.ReferenceLookupHelper lookupHelper = refResult.snd; diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java index dd0d6125c81..04015a46a86 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.tools.javac.comp; import com.sun.tools.javac.code.*; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.util.*; +import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition; import com.sun.tools.javac.code.Symbol.*; import com.sun.tools.javac.code.Type.*; import com.sun.tools.javac.comp.Attr.ResultInfo; @@ -531,12 +532,13 @@ public class DeferredAttr extends JCTree.Visitor { attr.memberReferenceQualifierResult(tree)); ListBuffer argtypes = ListBuffer.lb(); for (Type t : types.findDescriptorType(pt).getParameterTypes()) { - argtypes.append(syms.errType); + argtypes.append(Type.noType); } JCMemberReference mref2 = new TreeCopier(make).copy(tree); mref2.expr = exprTree; Pair lookupRes = - rs.resolveMemberReference(tree, env, mref2, exprTree.type, tree.name, argtypes.toList(), null, true); + rs.resolveMemberReference(tree, env, mref2, exprTree.type, + tree.name, argtypes.toList(), null, true, rs.arityMethodCheck); switch (lookupRes.fst.kind) { //note: as argtypes are erroneous types, type-errors must //have been caused by arity mismatch diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java index 55d0b195916..c7935a05209 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java @@ -143,7 +143,6 @@ public class Infer { boolean allowBoxing, boolean useVarargs, Resolve.MethodResolutionContext resolveContext, - Resolve.MethodCheck methodCheck, Warner warn) throws InferenceException { //-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG final InferenceContext inferenceContext = new InferenceContext(tvars); @@ -152,7 +151,7 @@ public class Infer { DeferredAttr.DeferredAttrContext deferredAttrContext = resolveContext.deferredAttrContext(msym, inferenceContext, resultInfo, warn); - methodCheck.argumentsAcceptable(env, deferredAttrContext, + resolveContext.methodCheck.argumentsAcceptable(env, deferredAttrContext, argtypes, mt.getParameterTypes(), warn); if (allowGraphInference && diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java index c2fc3997e76..309596b8c7e 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -508,7 +508,6 @@ public class Resolve { List typeargtypes, boolean allowBoxing, boolean useVarargs, - MethodCheck methodCheck, Warner warn) throws Infer.InferenceException { Type mt = types.memberType(site, m); @@ -561,10 +560,9 @@ public class Resolve { allowBoxing, useVarargs, currentResolutionContext, - methodCheck, warn); - methodCheck.argumentsAcceptable(env, currentResolutionContext.deferredAttrContext(m, infer.emptyContext, resultInfo, warn), + currentResolutionContext.methodCheck.argumentsAcceptable(env, currentResolutionContext.deferredAttrContext(m, infer.emptyContext, resultInfo, warn), argtypes, mt.getParameterTypes(), warn); return mt; } @@ -582,7 +580,7 @@ public class Resolve { currentResolutionContext.attrMode = DeferredAttr.AttrMode.CHECK; MethodResolutionPhase step = currentResolutionContext.step = env.info.pendingResolutionPhase; return rawInstantiate(env, site, m, resultInfo, argtypes, typeargtypes, - step.isBoxingRequired(), step.isVarargsRequired(), resolveMethodCheck, warn); + step.isBoxingRequired(), step.isVarargsRequired(), warn); } finally { currentResolutionContext = prevContext; @@ -599,11 +597,10 @@ public class Resolve { List typeargtypes, boolean allowBoxing, boolean useVarargs, - MethodCheck methodCheck, Warner warn) { try { return rawInstantiate(env, site, m, resultInfo, argtypes, typeargtypes, - allowBoxing, useVarargs, methodCheck, warn); + allowBoxing, useVarargs, warn); } catch (InapplicableMethodException ex) { return null; } @@ -628,6 +625,12 @@ public class Resolve { List argtypes, List formals, Warner warn); + + /** + * Retrieve the method check object that will be used during a + * most specific check. + */ + MethodCheck mostSpecificCheck(List actuals, boolean strict); } /** @@ -661,24 +664,25 @@ public class Resolve { } /** - * Main method applicability routine. Given a list of actual types A, - * a list of formal types F, determines whether the types in A are - * compatible (by method invocation conversion) with the types in F. - * - * Since this routine is shared between overload resolution and method - * type-inference, a (possibly empty) inference context is used to convert - * formal types to the corresponding 'undet' form ahead of a compatibility - * check so that constraints can be propagated and collected. - * - * Moreover, if one or more types in A is a deferred type, this routine uses - * DeferredAttr in order to perform deferred attribution. If one or more actual - * deferred types are stuck, they are placed in a queue and revisited later - * after the remainder of the arguments have been seen. If this is not sufficient - * to 'unstuck' the argument, a cyclic inference error is called out. - * - * A method check handler (see above) is used in order to report errors. + * Dummy method check object. All methods are deemed applicable, regardless + * of their formal parameter types. */ - MethodCheck resolveMethodCheck = new MethodCheck() { + MethodCheck nilMethodCheck = new MethodCheck() { + public void argumentsAcceptable(Env env, DeferredAttrContext deferredAttrContext, List argtypes, List formals, Warner warn) { + //do nothing - method always applicable regardless of actuals + } + + public MethodCheck mostSpecificCheck(List actuals, boolean strict) { + return this; + } + }; + + /** + * Base class for 'real' method checks. The class defines the logic for + * iterating through formals and actuals and provides and entry point + * that can be used by subclasses in order to define the actual check logic. + */ + abstract class AbstractMethodCheck implements MethodCheck { @Override public void argumentsAcceptable(final Env env, DeferredAttrContext deferredAttrContext, @@ -699,8 +703,7 @@ public class Resolve { } while (argtypes.nonEmpty() && formals.head != varargsFormal) { - ResultInfo mresult = methodCheckResult(false, formals.head, deferredAttrContext, warn); - mresult.check(null, argtypes.head); + checkArg(false, argtypes.head, formals.head, deferredAttrContext, warn); argtypes = argtypes.tail; formals = formals.tail; } @@ -713,17 +716,19 @@ public class Resolve { //note: if applicability check is triggered by most specific test, //the last argument of a varargs is _not_ an array type (see JLS 15.12.2.5) final Type elt = types.elemtype(varargsFormal); - ResultInfo mresult = methodCheckResult(true, elt, deferredAttrContext, warn); while (argtypes.nonEmpty()) { - mresult.check(null, argtypes.head); + checkArg(true, argtypes.head, elt, deferredAttrContext, warn); argtypes = argtypes.tail; } - //check varargs element type accessibility - varargsAccessible(env, elt, inferenceContext); } } - private void reportMC(MethodCheckDiag diag, InferenceContext inferenceContext, Object... args) { + /** + * Does the actual argument conforms to the corresponding formal? + */ + abstract void checkArg(boolean varargs, Type actual, Type formal, DeferredAttrContext deferredAttrContext, Warner warn); + + protected void reportMC(MethodCheckDiag diag, InferenceContext inferenceContext, Object... args) { boolean inferDiag = inferenceContext != infer.emptyContext; InapplicableMethodException ex = inferDiag ? infer.inferenceException : inapplicableMethodException; @@ -736,6 +741,63 @@ public class Resolve { throw ex.setMessage(inferDiag ? diag.inferKey : diag.basicKey, args); } + public MethodCheck mostSpecificCheck(List actuals, boolean strict) { + return nilMethodCheck; + } + } + + /** + * Arity-based method check. A method is applicable if the number of actuals + * supplied conforms to the method signature. + */ + MethodCheck arityMethodCheck = new AbstractMethodCheck() { + @Override + void checkArg(boolean varargs, Type actual, Type formal, DeferredAttrContext deferredAttrContext, Warner warn) { + //do nothing - actual always compatible to formals + } + }; + + /** + * Main method applicability routine. Given a list of actual types A, + * a list of formal types F, determines whether the types in A are + * compatible (by method invocation conversion) with the types in F. + * + * Since this routine is shared between overload resolution and method + * type-inference, a (possibly empty) inference context is used to convert + * formal types to the corresponding 'undet' form ahead of a compatibility + * check so that constraints can be propagated and collected. + * + * Moreover, if one or more types in A is a deferred type, this routine uses + * DeferredAttr in order to perform deferred attribution. If one or more actual + * deferred types are stuck, they are placed in a queue and revisited later + * after the remainder of the arguments have been seen. If this is not sufficient + * to 'unstuck' the argument, a cyclic inference error is called out. + * + * A method check handler (see above) is used in order to report errors. + */ + MethodCheck resolveMethodCheck = new AbstractMethodCheck() { + + @Override + void checkArg(boolean varargs, Type actual, Type formal, DeferredAttrContext deferredAttrContext, Warner warn) { + ResultInfo mresult = methodCheckResult(varargs, formal, deferredAttrContext, warn); + mresult.check(null, actual); + } + + @Override + public void argumentsAcceptable(final Env env, + DeferredAttrContext deferredAttrContext, + List argtypes, + List formals, + Warner warn) { + super.argumentsAcceptable(env, deferredAttrContext, argtypes, formals, warn); + //should we expand formals? + if (deferredAttrContext.phase.isVarargsRequired()) { + //check varargs element type accessibility + varargsAccessible(env, types.elemtype(formals.last()), + deferredAttrContext.inferenceContext); + } + } + private void varargsAccessible(final Env env, final Type t, final InferenceContext inferenceContext) { if (inferenceContext.free(t)) { inferenceContext.addFreeTypeListener(List.of(t), new FreeTypeListener() { @@ -765,6 +827,11 @@ public class Resolve { }; return new MethodResultInfo(to, checkContext); } + + @Override + public MethodCheck mostSpecificCheck(List actuals, boolean strict) { + return new MostSpecificCheck(strict, actuals); + } }; /** @@ -1042,6 +1109,11 @@ public class Resolve { } } } + + public MethodCheck mostSpecificCheck(List actuals, boolean strict) { + Assert.error("Cannot get here!"); + return null; + } } public static class InapplicableMethodException extends RuntimeException { @@ -1254,7 +1326,7 @@ public class Resolve { Assert.check(sym.kind < AMBIGUOUS); try { Type mt = rawInstantiate(env, site, sym, null, argtypes, typeargtypes, - allowBoxing, useVarargs, resolveMethodCheck, types.noWarnings); + allowBoxing, useVarargs, types.noWarnings); if (!operator) currentResolutionContext.addApplicableCandidate(sym, mt); } catch (InapplicableMethodException ex) { @@ -1358,11 +1430,20 @@ public class Resolve { int maxLength = Math.max( Math.max(m1.type.getParameterTypes().length(), actuals.length()), m2.type.getParameterTypes().length()); - Type mst = instantiate(env, site, m2, null, - adjustArgs(types.lowerBounds(types.memberType(site, m1).getParameterTypes()), m1, maxLength, useVarargs), null, - allowBoxing, useVarargs, new MostSpecificCheck(!allowBoxing, actuals), noteWarner); - return mst != null && - !noteWarner.hasLint(Lint.LintCategory.UNCHECKED); + MethodResolutionContext prevResolutionContext = currentResolutionContext; + try { + currentResolutionContext = new MethodResolutionContext(); + currentResolutionContext.step = prevResolutionContext.step; + currentResolutionContext.methodCheck = + prevResolutionContext.methodCheck.mostSpecificCheck(actuals, !allowBoxing); + Type mst = instantiate(env, site, m2, null, + adjustArgs(types.lowerBounds(types.memberType(site, m1).getParameterTypes()), m1, maxLength, useVarargs), null, + allowBoxing, useVarargs, noteWarner); + return mst != null && + !noteWarner.hasLint(Lint.LintCategory.UNCHECKED); + } finally { + currentResolutionContext = prevResolutionContext; + } } private List adjustArgs(List args, Symbol msym, int length, boolean allowVarargs) { if ((msym.flags() & VARARGS) != 0 && allowVarargs) { @@ -2124,14 +2205,14 @@ public class Resolve { Name name, List argtypes, List typeargtypes) { - return lookupMethod(env, pos, env.enclClass.sym, new BasicLookupHelper(name, env.enclClass.sym.type, argtypes, typeargtypes) { - @Override - Symbol lookup(Env env, MethodResolutionPhase phase) { - return findFun(env, name, argtypes, typeargtypes, - phase.isBoxingRequired(), - phase.isVarargsRequired()); - } - }); + return lookupMethod(env, pos, env.enclClass.sym, resolveMethodCheck, + new BasicLookupHelper(name, env.enclClass.sym.type, argtypes, typeargtypes) { + @Override + Symbol lookup(Env env, MethodResolutionPhase phase) { + return findFun(env, name, argtypes, typeargtypes, + phase.isBoxingRequired(), + phase.isVarargsRequired()); + }}); } /** Resolve a qualified method identifier @@ -2313,36 +2394,36 @@ public class Resolve { Type site, List argtypes, List typeargtypes) { - return lookupMethod(env, pos, site.tsym, new BasicLookupHelper(names.init, site, argtypes, typeargtypes) { - @Override - Symbol lookup(Env env, MethodResolutionPhase phase) { - return findDiamond(env, site, argtypes, typeargtypes, - phase.isBoxingRequired(), - phase.isVarargsRequired()); - } - @Override - Symbol access(Env env, DiagnosticPosition pos, Symbol location, Symbol sym) { - if (sym.kind >= AMBIGUOUS) { - final JCDiagnostic details = sym.kind == WRONG_MTH ? - ((InapplicableSymbolError)sym).errCandidate().details : - null; - sym = new InapplicableSymbolError(sym.kind, "diamondError", currentResolutionContext) { - @Override - JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos, - Symbol location, Type site, Name name, List argtypes, List typeargtypes) { - String key = details == null ? - "cant.apply.diamond" : - "cant.apply.diamond.1"; - return diags.create(dkind, log.currentSource(), pos, key, - diags.fragment("diamond", site.tsym), details); + return lookupMethod(env, pos, site.tsym, resolveMethodCheck, + new BasicLookupHelper(names.init, site, argtypes, typeargtypes) { + @Override + Symbol lookup(Env env, MethodResolutionPhase phase) { + return findDiamond(env, site, argtypes, typeargtypes, + phase.isBoxingRequired(), + phase.isVarargsRequired()); + } + @Override + Symbol access(Env env, DiagnosticPosition pos, Symbol location, Symbol sym) { + if (sym.kind >= AMBIGUOUS) { + final JCDiagnostic details = sym.kind == WRONG_MTH ? + ((InapplicableSymbolError)sym).errCandidate().details : + null; + sym = new InapplicableSymbolError(sym.kind, "diamondError", currentResolutionContext) { + @Override + JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos, + Symbol location, Type site, Name name, List argtypes, List typeargtypes) { + String key = details == null ? + "cant.apply.diamond" : + "cant.apply.diamond.1"; + return diags.create(dkind, log.currentSource(), pos, key, + diags.fragment("diamond", site.tsym), details); + } + }; + sym = accessMethod(sym, pos, site, names.init, true, argtypes, typeargtypes); + env.info.pendingResolutionPhase = currentResolutionContext.step; } - }; - sym = accessMethod(sym, pos, site, names.init, true, argtypes, typeargtypes); - env.info.pendingResolutionPhase = currentResolutionContext.step; - } - return sym; - } - }); + return sym; + }}); } /** This method scans all the constructor symbol in a given class scope - @@ -2475,7 +2556,8 @@ public class Resolve { Type site, Name name, List argtypes, List typeargtypes, - boolean boxingAllowed) { + boolean boxingAllowed, + MethodCheck methodCheck) { MethodResolutionPhase maxPhase = boxingAllowed ? VARARITY : BASIC; ReferenceLookupHelper boundLookupHelper; @@ -2495,12 +2577,12 @@ public class Resolve { //step 1 - bound lookup Env boundEnv = env.dup(env.tree, env.info.dup()); - Symbol boundSym = lookupMethod(boundEnv, env.tree.pos(), site.tsym, boundLookupHelper); + Symbol boundSym = lookupMethod(boundEnv, env.tree.pos(), site.tsym, methodCheck, boundLookupHelper); //step 2 - unbound lookup ReferenceLookupHelper unboundLookupHelper = boundLookupHelper.unboundLookup(); Env unboundEnv = env.dup(env.tree, env.info.dup()); - Symbol unboundSym = lookupMethod(unboundEnv, env.tree.pos(), site.tsym, unboundLookupHelper); + Symbol unboundSym = lookupMethod(unboundEnv, env.tree.pos(), site.tsym, methodCheck, unboundLookupHelper); //merge results Pair res; @@ -2671,7 +2753,7 @@ public class Resolve { ReferenceLookupHelper unboundLookup() { if (TreeInfo.isStaticSelector(referenceTree.expr, names) && argtypes.nonEmpty() && - types.isSubtypeUnchecked(argtypes.head, site)) { + (argtypes.head.hasTag(NONE) || types.isSubtypeUnchecked(argtypes.head, site))) { return new UnboundMethodReferenceLookupHelper(referenceTree, name, site, argtypes, typeargtypes, maxPhase); } else { @@ -2704,8 +2786,8 @@ public class Resolve { UnboundMethodReferenceLookupHelper(JCMemberReference referenceTree, Name name, Type site, List argtypes, List typeargtypes, MethodResolutionPhase maxPhase) { super(referenceTree, name, site, argtypes.tail, typeargtypes, maxPhase); - Type asSuperSite = types.asSuper(argtypes.head, site.tsym); - if (site.isRaw() && !asSuperSite.isErroneous()) { + if (site.isRaw() && !argtypes.head.hasTag(NONE)) { + Type asSuperSite = types.asSuper(argtypes.head, site.tsym); this.site = asSuperSite; } } @@ -2800,8 +2882,10 @@ public class Resolve { * at the end of the lookup, the helper is used to validate the results * (this last step might trigger overload resolution diagnostics). */ - Symbol lookupMethod(Env env, DiagnosticPosition pos, Symbol location, LookupHelper lookupHelper) { - return lookupMethod(env, pos, location, new MethodResolutionContext(), lookupHelper); + Symbol lookupMethod(Env env, DiagnosticPosition pos, Symbol location, MethodCheck methodCheck, LookupHelper lookupHelper) { + MethodResolutionContext resolveContext = new MethodResolutionContext(); + resolveContext.methodCheck = methodCheck; + return lookupMethod(env, pos, location, resolveContext, lookupHelper); } Symbol lookupMethod(Env env, DiagnosticPosition pos, Symbol location, @@ -3595,6 +3679,8 @@ public class Resolve { MethodResolutionPhase step = null; + MethodCheck methodCheck = resolveMethodCheck; + private boolean internalResolution = false; private DeferredAttr.AttrMode attrMode = DeferredAttr.AttrMode.SPECULATIVE; From 08df98aa3c448c34c7d0e59ea810e8fb721e0f9d Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 8 Apr 2013 15:52:05 +0100 Subject: [PATCH 082/151] 8010823: DefaultMethodTest.testReflectCall fails with new lambda VM Fix lambda test Reviewed-by: jjg --- .../lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java b/langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java index 646a1c95d42..aad8cd37043 100644 --- a/langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java +++ b/langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/DefaultMethodsTest.java @@ -427,6 +427,8 @@ public class DefaultMethodsTest extends TestHarness { */ public void testReflectCall() { Interface I = new Interface("I", DefaultMethod.std("99")); + //workaround accessibility issue when loading C with DirectedClassLoader + I.addAccessFlag(AccessFlag.PUBLIC); Class C = new Class("C", I); Compiler.Flags[] flags = this.verbose ? From b4b6e4f82e82337c230807bbba7bbe5ae2a4e575 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 8 Apr 2013 15:53:08 +0100 Subject: [PATCH 083/151] 8010404: Lambda debugging: redundant LineNumberTable entry for lambda capture Ignore indy entries in LineNumberTable Reviewed-by: jjg --- .../classes/com/sun/tools/javac/jvm/Code.java | 10 +++++++++- .../classes/com/sun/tools/javac/jvm/Gen.java | 9 ++++++--- .../tools/javac/lambda/TestInvokeDynamic.java | 20 ++++++++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java index ff4c6877ec0..950b37e52cb 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java +++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java @@ -470,7 +470,15 @@ public class Code { public void emitInvokedynamic(int desc, Type mtype) { // N.B. this format is under consideration by the JSR 292 EG int argsize = width(mtype.getParameterTypes()); - emitop(invokedynamic); + int prevPos = pendingStatPos; + try { + //disable line number generation (we could have used 'emit1', that + //bypasses stackmap generation - which is needed for indy calls) + pendingStatPos = Position.NOPOS; + emitop(invokedynamic); + } finally { + pendingStatPos = prevPos; + } if (!alive) return; emit2(desc); emit2(0); diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java index 2a092fe5796..ec11a1194da 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java +++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java @@ -1748,10 +1748,13 @@ public class Gen extends JCTree.Visitor { // Generate code for all arguments, where the expected types are // the parameters of the method's external type (that is, any implicit // outer instance of a super(...) call appears as first parameter). + MethodSymbol msym = (MethodSymbol)TreeInfo.symbol(tree.meth); genArgs(tree.args, - TreeInfo.symbol(tree.meth).externalType(types).getParameterTypes()); - code.statBegin(tree.pos); - code.markStatBegin(); + msym.externalType(types).getParameterTypes()); + if (!msym.isDynamic()) { + code.statBegin(tree.pos); + code.markStatBegin(); + } result = m.invoke(); } diff --git a/langtools/test/tools/javac/lambda/TestInvokeDynamic.java b/langtools/test/tools/javac/lambda/TestInvokeDynamic.java index 3b38d73c44d..a804d04fb38 100644 --- a/langtools/test/tools/javac/lambda/TestInvokeDynamic.java +++ b/langtools/test/tools/javac/lambda/TestInvokeDynamic.java @@ -24,7 +24,7 @@ /* * @test * @bug 7194586 - * @bug 8003280 8006694 + * @bug 8003280 8006694 8010404 * @summary Add lambda tests * Add back-end support for invokedynamic * temporarily workaround combo tests are causing time out in several platforms @@ -48,6 +48,7 @@ import com.sun.tools.classfile.ClassFile; import com.sun.tools.classfile.Code_attribute; import com.sun.tools.classfile.ConstantPool.*; import com.sun.tools.classfile.Instruction; +import com.sun.tools.classfile.LineNumberTable_attribute; import com.sun.tools.classfile.Method; import com.sun.tools.javac.api.JavacTaskImpl; @@ -239,7 +240,7 @@ public class TestInvokeDynamic int id = checkCount.incrementAndGet(); JavaSource source = new JavaSource(id); JavacTaskImpl ct = (JavacTaskImpl)comp.getTask(null, fm.get(), dc, - null, null, Arrays.asList(source)); + Arrays.asList("-g"), null, Arrays.asList(source)); Context context = ct.getContext(); Symtab syms = Symtab.instance(context); Names names = Names.instance(context); @@ -349,6 +350,16 @@ public class TestInvokeDynamic bsm_ref.getNameAndTypeInfo().getType() + " " + asBSMSignatureString()); } + + LineNumberTable_attribute lnt = + (LineNumberTable_attribute)ea.attributes.get(Attribute.LineNumberTable); + + if (lnt == null) { + throw new Error("No LineNumberTable attribute"); + } + if (lnt.line_number_table_length != 2) { + throw new Error("Wrong number of entries in LineNumberTable"); + } } catch (Exception e) { e.printStackTrace(); throw new Error("error reading " + compiledTest +": " + e); @@ -376,7 +387,10 @@ public class TestInvokeDynamic "}\n" + "class Test#ID {\n" + " void m() { }\n" + - " void test() { m(); }\n" + + " void test() {\n" + + " Object o = this; // marker statement \n" + + " m();\n" + + " }\n" + "}"; String source; From ea5501515575222dd69bba0b92917e8bc7d103fb Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 8 Apr 2013 15:57:10 +0100 Subject: [PATCH 084/151] 8009131: Overload: javac should discard methods that lead to errors in lambdas with implicit parameter types Lambdas that have errors in their bodies should make enclosing overload resolution fail Reviewed-by: jjg --- .../com/sun/tools/javac/comp/Attr.java | 33 +++++++++++++--- .../tools/javac/resources/compiler.properties | 5 +++ .../diags/examples/BadArgTypesInLambda.java | 38 +++++++++++++++++++ .../test/tools/javac/lambda/BadRecovery.out | 3 +- .../test/tools/javac/lambda/TargetType01.java | 7 ++-- .../test/tools/javac/lambda/TargetType01.out | 3 -- .../test/tools/javac/lambda/TargetType43.out | 3 +- .../test/tools/javac/lambda/TargetType66.java | 26 +++++++++++++ .../test/tools/javac/lambda/TargetType66.out | 4 ++ 9 files changed, 106 insertions(+), 16 deletions(-) create mode 100644 langtools/test/tools/javac/diags/examples/BadArgTypesInLambda.java delete mode 100644 langtools/test/tools/javac/lambda/TargetType01.out create mode 100644 langtools/test/tools/javac/lambda/TargetType66.java create mode 100644 langtools/test/tools/javac/lambda/TargetType66.out diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java index ca8e266f54a..bfc17a70411 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java @@ -2340,11 +2340,34 @@ public class Attr extends JCTree.Visitor { new ResultInfo(VAL, lambdaType.getReturnType(), funcContext); localEnv.info.returnResult = bodyResultInfo; - if (that.getBodyKind() == JCLambda.BodyKind.EXPRESSION) { - attribTree(that.getBody(), localEnv, bodyResultInfo); - } else { - JCBlock body = (JCBlock)that.body; - attribStats(body.stats, localEnv); + Log.DeferredDiagnosticHandler lambdaDeferredHandler = new Log.DeferredDiagnosticHandler(log); + try { + if (that.getBodyKind() == JCLambda.BodyKind.EXPRESSION) { + attribTree(that.getBody(), localEnv, bodyResultInfo); + } else { + JCBlock body = (JCBlock)that.body; + attribStats(body.stats, localEnv); + } + + if (resultInfo.checkContext.deferredAttrContext().mode == AttrMode.SPECULATIVE) { + //check for errors in lambda body + for (JCDiagnostic deferredDiag : lambdaDeferredHandler.getDiagnostics()) { + if (deferredDiag.getKind() == JCDiagnostic.Kind.ERROR) { + resultInfo.checkContext + .report(that, diags.fragment("bad.arg.types.in.lambda", TreeInfo.types(that.params))); + //we mark the lambda as erroneous - this is crucial in the recovery step + //as parameter-dependent type error won't be reported in that stage, + //meaning that a lambda will be deemed erroeneous only if there is + //a target-independent error (which will cause method diagnostic + //to be skipped). + result = that.type = types.createErrorType(target); + return; + } + } + } + } finally { + lambdaDeferredHandler.reportDeferredDiagnostics(); + log.popDiagnosticHandler(lambdaDeferredHandler); } result = check(that, target, VAL, resultInfo); 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 6904d15946d..aab6f73df80 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 @@ -731,6 +731,11 @@ compiler.misc.incompatible.arg.types.in.lambda=\ compiler.misc.incompatible.arg.types.in.mref=\ incompatible parameter types in method reference +# 0: list of type +compiler.misc.bad.arg.types.in.lambda=\ + cannot type-check lambda expression with inferred parameter types\n\ + inferred types: {0} + compiler.err.new.not.allowed.in.annotation=\ ''new'' not allowed in an annotation diff --git a/langtools/test/tools/javac/diags/examples/BadArgTypesInLambda.java b/langtools/test/tools/javac/diags/examples/BadArgTypesInLambda.java new file mode 100644 index 00000000000..1062a639606 --- /dev/null +++ b/langtools/test/tools/javac/diags/examples/BadArgTypesInLambda.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// key: compiler.err.cant.apply.symbol +// key: compiler.misc.no.conforming.assignment.exists +// key: compiler.misc.bad.arg.types.in.lambda + +class BadArgTypesInLambda { + interface SAM { + void m(Integer i); + } + + void g(SAM s) { } + + void test() { + g(x->{ String s = x; }); + } +} diff --git a/langtools/test/tools/javac/lambda/BadRecovery.out b/langtools/test/tools/javac/lambda/BadRecovery.out index 427d97f0f81..6035eecfd6f 100644 --- a/langtools/test/tools/javac/lambda/BadRecovery.out +++ b/langtools/test/tools/javac/lambda/BadRecovery.out @@ -1,3 +1,2 @@ -BadRecovery.java:17:9: compiler.err.cant.apply.symbol: kindname.method, m, BadRecovery.SAM1, @369, kindname.class, BadRecovery, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.incompatible.arg.types.in.lambda)) BadRecovery.java:17:77: compiler.err.cant.resolve.location: kindname.variable, f, , , (compiler.misc.location: kindname.class, BadRecovery, null) -2 errors +1 error diff --git a/langtools/test/tools/javac/lambda/TargetType01.java b/langtools/test/tools/javac/lambda/TargetType01.java index 68ec7671818..0e8f16c045c 100644 --- a/langtools/test/tools/javac/lambda/TargetType01.java +++ b/langtools/test/tools/javac/lambda/TargetType01.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,10 @@ /* * @test - * @bug 8003280 + * @bug 8003280 8009131 * @summary Add lambda tests * check nested case of overload resolution and lambda parameter inference - * @author Maurizio Cimadamore - * @compile/fail/ref=TargetType01.out -XDrawDiagnostics TargetType01.java + * @compile TargetType01.java */ class TargetType01 { diff --git a/langtools/test/tools/javac/lambda/TargetType01.out b/langtools/test/tools/javac/lambda/TargetType01.out deleted file mode 100644 index 2a2b286cc76..00000000000 --- a/langtools/test/tools/javac/lambda/TargetType01.out +++ /dev/null @@ -1,3 +0,0 @@ -TargetType01.java:46:9: compiler.err.ref.ambiguous: M, kindname.method, M(TargetType01.F_I_I), TargetType01, kindname.method, M(TargetType01.F_S_S), TargetType01 -TargetType01.java:46:26: compiler.err.ref.ambiguous: M, kindname.method, M(TargetType01.F_I_I), TargetType01, kindname.method, M(TargetType01.F_S_S), TargetType01 -2 errors diff --git a/langtools/test/tools/javac/lambda/TargetType43.out b/langtools/test/tools/javac/lambda/TargetType43.out index 7d50949d9a0..666e67c8341 100644 --- a/langtools/test/tools/javac/lambda/TargetType43.out +++ b/langtools/test/tools/javac/lambda/TargetType43.out @@ -1,5 +1,4 @@ TargetType43.java:13:20: compiler.err.prob.found.req: (compiler.misc.not.a.functional.intf: java.lang.Object) TargetType43.java:13:30: compiler.err.cant.resolve.location: kindname.class, NonExistentClass, , , (compiler.misc.location: kindname.class, TargetType43, null) -TargetType43.java:14:9: compiler.err.cant.apply.symbol: kindname.method, m, java.lang.Object, @359, kindname.class, TargetType43, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.not.a.functional.intf: java.lang.Object)) TargetType43.java:14:21: compiler.err.cant.resolve.location: kindname.class, NonExistentClass, , , (compiler.misc.location: kindname.class, TargetType43, null) -4 errors +3 errors diff --git a/langtools/test/tools/javac/lambda/TargetType66.java b/langtools/test/tools/javac/lambda/TargetType66.java new file mode 100644 index 00000000000..d9e85a0c87e --- /dev/null +++ b/langtools/test/tools/javac/lambda/TargetType66.java @@ -0,0 +1,26 @@ +/* + * @test /nodynamiccopyright/ + * @bug 8009131 + * @summary Overload: javac should discard methods that lead to errors in lambdas with implicit parameter types + * @compile/fail/ref=TargetType66.out -XDrawDiagnostics TargetType66.java + */ +class TargetType66 { + interface SAM1 { + void m(String s); + } + + interface SAM2 { + void m(Integer s); + } + + void g(SAM1 s1) { } + void g(SAM2 s2) { } + + void test() { + g(x->{ String s = x; }); //g(SAM1) + g(x->{ Integer i = x; }); //g(SAM2) + g(x->{ Object o = x; }); //ambiguous + g(x->{ Character c = x; }); //error: inapplicable methods + g(x->{ Character c = ""; }); //error: incompatible types + } +} diff --git a/langtools/test/tools/javac/lambda/TargetType66.out b/langtools/test/tools/javac/lambda/TargetType66.out new file mode 100644 index 00000000000..b4f311f6377 --- /dev/null +++ b/langtools/test/tools/javac/lambda/TargetType66.out @@ -0,0 +1,4 @@ +TargetType66.java:22:9: compiler.err.ref.ambiguous: g, kindname.method, g(TargetType66.SAM1), TargetType66, kindname.method, g(TargetType66.SAM2), TargetType66 +TargetType66.java:23:9: compiler.err.cant.apply.symbols: kindname.method, g, @578,{(compiler.misc.inapplicable.method: kindname.method, TargetType66, g(TargetType66.SAM1), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.bad.arg.types.in.lambda: java.lang.String))),(compiler.misc.inapplicable.method: kindname.method, TargetType66, g(TargetType66.SAM2), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.bad.arg.types.in.lambda: java.lang.Integer)))} +TargetType66.java:24:30: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Character) +3 errors From da9dd76b205ab10f25ce77cf619faaec0f45bbd8 Mon Sep 17 00:00:00 2001 From: Maurizio Cimadamore Date: Mon, 8 Apr 2013 15:59:29 +0100 Subject: [PATCH 085/151] 8010822: Intersection type cast for functional expressions does not follow spec EDR Remove support for marker interfaces; redefine intersection type casts to be order-independent Reviewed-by: jjg --- .../com/sun/tools/javac/code/Type.java | 6 ++ .../com/sun/tools/javac/code/Types.java | 74 ++-------------- .../com/sun/tools/javac/comp/Attr.java | 86 ++++++++++++------ .../tools/javac/resources/compiler.properties | 9 +- .../javac/util/RichDiagnosticFormatter.java | 9 +- ...Intf.java => NotAnInterfaceComponent.java} | 9 +- .../tools/javac/lambda/Intersection01.java | 2 +- .../tools/javac/lambda/Intersection01.out | 3 - .../IntersectionTargetTypeTest.java | 87 ++++++++++++++----- 9 files changed, 160 insertions(+), 125 deletions(-) rename langtools/test/tools/javac/diags/examples/{SecondaryBoundMustBeMarkerIntf.java => NotAnInterfaceComponent.java} (80%) delete mode 100644 langtools/test/tools/javac/lambda/Intersection01.out diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java index fb5c433fb90..0d16fb328c1 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java +++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java @@ -908,6 +908,12 @@ public class Type implements PrimitiveType { return interfaces_field.prepend(supertype_field); } + public List getExplicitComponents() { + return allInterfaces ? + interfaces_field : + getComponents(); + } + @Override public TypeKind getKind() { return TypeKind.INTERSECTION; 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 a99a775a488..f307dc33c85 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 @@ -610,7 +610,7 @@ public class Types { /** * Scope filter used to skip methods that should be ignored (such as methods - * overridden by j.l.Object) during function interface conversion/marker interface checks + * overridden by j.l.Object) during function interface conversion interface check */ class DescriptorFilter implements Filter { @@ -629,64 +629,6 @@ public class Types { } }; - // - - /** - * A cache that keeps track of marker interfaces - */ - class MarkerCache { - - private WeakHashMap _map = new WeakHashMap(); - - class Entry { - final boolean isMarkerIntf; - final int prevMark; - - public Entry(boolean isMarkerIntf, - int prevMark) { - this.isMarkerIntf = isMarkerIntf; - this.prevMark = prevMark; - } - - boolean matches(int mark) { - return this.prevMark == mark; - } - } - - boolean get(TypeSymbol origin) throws FunctionDescriptorLookupError { - Entry e = _map.get(origin); - CompoundScope members = membersClosure(origin.type, false); - if (e == null || - !e.matches(members.getMark())) { - boolean isMarkerIntf = isMarkerInterfaceInternal(origin, members); - _map.put(origin, new Entry(isMarkerIntf, members.getMark())); - return isMarkerIntf; - } - else { - return e.isMarkerIntf; - } - } - - /** - * Is given symbol a marker interface - */ - public boolean isMarkerInterfaceInternal(TypeSymbol origin, CompoundScope membersCache) throws FunctionDescriptorLookupError { - return !origin.isInterface() ? - false : - !membersCache.getElements(new DescriptorFilter(origin)).iterator().hasNext(); - } - } - - private MarkerCache markerCache = new MarkerCache(); - - /** - * Is given type a marker interface? - */ - public boolean isMarkerInterface(Type site) { - return markerCache.get(site.tsym); - } - // - // /** * Is t an unchecked subtype of s? @@ -2625,15 +2567,15 @@ public class Types { public List interfaceCandidates(Type site, MethodSymbol ms) { Filter filter = new MethodFilter(ms, site); List candidates = List.nil(); - for (Symbol s : membersClosure(site, false).getElements(filter)) { - if (!site.tsym.isInterface() && !s.owner.isInterface()) { - return List.of((MethodSymbol)s); - } else if (!candidates.contains(s)) { - candidates = candidates.prepend((MethodSymbol)s); + for (Symbol s : membersClosure(site, false).getElements(filter)) { + if (!site.tsym.isInterface() && !s.owner.isInterface()) { + return List.of((MethodSymbol)s); + } else if (!candidates.contains(s)) { + candidates = candidates.prepend((MethodSymbol)s); + } } + return prune(candidates); } - return prune(candidates); - } public List prune(List methods) { ListBuffer methodsMin = ListBuffer.lb(); diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java index bfc17a70411..1d324365fd6 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java +++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java @@ -2273,7 +2273,7 @@ public class Attr extends JCTree.Visitor { Type lambdaType; if (pt() != Type.recoveryType) { - target = checkIntersectionTarget(that, target, resultInfo.checkContext); + target = targetChecker.visit(target, that); lambdaType = types.findDescriptorType(target); chk.checkFunctionalInterface(that, target); } else { @@ -2281,7 +2281,7 @@ public class Attr extends JCTree.Visitor { lambdaType = fallbackDescriptorType(that); } - setFunctionalInfo(that, pt(), lambdaType, resultInfo.checkContext.inferenceContext()); + setFunctionalInfo(that, pt(), lambdaType, target, resultInfo.checkContext.inferenceContext()); if (lambdaType.hasTag(FORALL)) { //lambda expression target desc cannot be a generic method @@ -2396,26 +2396,55 @@ public class Attr extends JCTree.Visitor { } } } - - private Type checkIntersectionTarget(DiagnosticPosition pos, Type pt, CheckContext checkContext) { - if (pt != Type.recoveryType && pt.isCompound()) { - IntersectionClassType ict = (IntersectionClassType)pt; - List bounds = ict.allInterfaces ? - ict.getComponents().tail : - ict.getComponents(); - types.findDescriptorType(bounds.head); //propagate exception outwards! - for (Type bound : bounds.tail) { - if (!types.isMarkerInterface(bound)) { - checkContext.report(pos, diags.fragment("secondary.bound.must.be.marker.intf", bound)); - } - } - //for now (translation doesn't support intersection types) - return bounds.head; - } else { - return pt; - } - } //where + Types.MapVisitor targetChecker = new Types.MapVisitor() { + + @Override + public Type visitClassType(ClassType t, DiagnosticPosition pos) { + return t.isCompound() ? + visitIntersectionClassType((IntersectionClassType)t, pos) : t; + } + + public Type visitIntersectionClassType(IntersectionClassType ict, DiagnosticPosition pos) { + Symbol desc = types.findDescriptorSymbol(makeNotionalInterface(ict)); + Type target = null; + for (Type bound : ict.getExplicitComponents()) { + TypeSymbol boundSym = bound.tsym; + if (types.isFunctionalInterface(boundSym) && + types.findDescriptorSymbol(boundSym) == desc) { + target = bound; + } else if (!boundSym.isInterface() || (boundSym.flags() & ANNOTATION) != 0) { + //bound must be an interface + reportIntersectionError(pos, "not.an.intf.component", boundSym); + } + } + return target != null ? + target : + ict.getExplicitComponents().head; //error recovery + } + + private TypeSymbol makeNotionalInterface(IntersectionClassType ict) { + ListBuffer targs = ListBuffer.lb(); + ListBuffer supertypes = ListBuffer.lb(); + for (Type i : ict.interfaces_field) { + if (i.isParameterized()) { + targs.appendList(i.tsym.type.allparams()); + } + supertypes.append(i.tsym.type); + } + IntersectionClassType notionalIntf = + (IntersectionClassType)types.makeCompoundType(supertypes.toList()); + notionalIntf.allparams_field = targs.toList(); + notionalIntf.tsym.flags_field |= INTERFACE; + return notionalIntf.tsym; + } + + private void reportIntersectionError(DiagnosticPosition pos, String key, Object... args) { + resultInfo.checkContext.report(pos, diags.fragment("bad.intersection.target.for.functional.expr", + diags.fragment(key, args))); + } + }; + private Type fallbackDescriptorType(JCExpression tree) { switch (tree.getTag()) { case LAMBDA: @@ -2586,7 +2615,7 @@ public class Attr extends JCTree.Visitor { Type target; Type desc; if (pt() != Type.recoveryType) { - target = checkIntersectionTarget(that, pt(), resultInfo.checkContext); + target = targetChecker.visit(pt(), that); desc = types.findDescriptorType(target); chk.checkFunctionalInterface(that, target); } else { @@ -2594,7 +2623,7 @@ public class Attr extends JCTree.Visitor { desc = fallbackDescriptorType(that); } - setFunctionalInfo(that, pt(), desc, resultInfo.checkContext.inferenceContext()); + setFunctionalInfo(that, pt(), desc, target, resultInfo.checkContext.inferenceContext()); List argtypes = desc.getParameterTypes(); Pair refResult = @@ -2789,19 +2818,24 @@ public class Attr extends JCTree.Visitor { * might contain inference variables, we might need to register an hook in the * current inference context. */ - private void setFunctionalInfo(final JCFunctionalExpression fExpr, final Type pt, final Type descriptorType, InferenceContext inferenceContext) { + private void setFunctionalInfo(final JCFunctionalExpression fExpr, final Type pt, + final Type descriptorType, final Type primaryTarget, InferenceContext inferenceContext) { if (inferenceContext.free(descriptorType)) { inferenceContext.addFreeTypeListener(List.of(pt, descriptorType), new FreeTypeListener() { public void typesInferred(InferenceContext inferenceContext) { - setFunctionalInfo(fExpr, pt, inferenceContext.asInstType(descriptorType), inferenceContext); + setFunctionalInfo(fExpr, pt, inferenceContext.asInstType(descriptorType), + inferenceContext.asInstType(primaryTarget), inferenceContext); } }); } else { ListBuffer targets = ListBuffer.lb(); if (pt.hasTag(CLASS)) { if (pt.isCompound()) { + targets.append(primaryTarget.tsym); //this goes first for (Type t : ((IntersectionClassType)pt()).interfaces_field) { - targets.append(t.tsym); + if (t != primaryTarget) { + targets.append(t.tsym); + } } } else { targets.append(pt.tsym); 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 aab6f73df80..683e57f59cc 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 @@ -216,9 +216,14 @@ compiler.misc.descriptor.throws=\ compiler.misc.no.suitable.functional.intf.inst=\ cannot infer functional interface descriptor for {0} +# 0: message segment +compiler.misc.bad.intersection.target.for.functional.expr=\ + bad intersection type target for lambda or method reference\n\ + {0} + # 0: type -compiler.misc.secondary.bound.must.be.marker.intf=\ - secondary bound {0} must be a marker interface +compiler.misc.not.an.intf.component=\ + component type {0} is not an interface # 0: symbol kind, 1: message segment compiler.err.invalid.mref=\ 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 d242cc18c07..517d01984c5 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 @@ -395,6 +395,9 @@ public class RichDiagnosticFormatter extends @Override public String visitClassSymbol(ClassSymbol s, Locale locale) { + if (s.type.isCompound()) { + return visit(s.type, locale); + } String name = nameSimplifier.simplify(s); if (name.length() == 0 || !getConfiguration().isEnabled(RichFormatterFeature.SIMPLE_NAMES)) { @@ -583,7 +586,11 @@ public class RichDiagnosticFormatter extends @Override public Void visitClassSymbol(ClassSymbol s, Void ignored) { - nameSimplifier.addUsage(s); + if (s.type.isCompound()) { + typePreprocessor.visit(s.type); + } else { + nameSimplifier.addUsage(s); + } return null; } diff --git a/langtools/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java b/langtools/test/tools/javac/diags/examples/NotAnInterfaceComponent.java similarity index 80% rename from langtools/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java rename to langtools/test/tools/javac/diags/examples/NotAnInterfaceComponent.java index c093974064b..3ca0a11b51c 100644 --- a/langtools/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java +++ b/langtools/test/tools/javac/diags/examples/NotAnInterfaceComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,8 +22,9 @@ */ // key: compiler.err.prob.found.req -// key: compiler.misc.secondary.bound.must.be.marker.intf +// key: compiler.misc.bad.intersection.target.for.functional.expr +// key: compiler.misc.not.an.intf.component -class SecondaryBoundMustBeMarkerInterface { - Runnable r = (Runnable & Comparable)()->{}; +class NotAnInterfaceComponent { + Object o = (Object & Runnable) ()-> { }; } diff --git a/langtools/test/tools/javac/lambda/Intersection01.java b/langtools/test/tools/javac/lambda/Intersection01.java index 0745c73ce40..6a034f29001 100644 --- a/langtools/test/tools/javac/lambda/Intersection01.java +++ b/langtools/test/tools/javac/lambda/Intersection01.java @@ -25,7 +25,7 @@ * @test * @bug 8002099 * @summary Add support for intersection types in cast expression - * @compile/fail/ref=Intersection01.out -XDrawDiagnostics Intersection01.java + * @compile Intersection01.java */ class Intersection01 { diff --git a/langtools/test/tools/javac/lambda/Intersection01.out b/langtools/test/tools/javac/lambda/Intersection01.out deleted file mode 100644 index 75debb49693..00000000000 --- a/langtools/test/tools/javac/lambda/Intersection01.out +++ /dev/null @@ -1,3 +0,0 @@ -Intersection01.java:36:45: compiler.err.prob.found.req: (compiler.misc.not.a.functional.intf.1: java.io.Serializable, (compiler.misc.no.abstracts: kindname.interface, java.io.Serializable)) -Intersection01.java:38:45: compiler.err.prob.found.req: (compiler.misc.not.a.functional.intf.1: java.io.Serializable, (compiler.misc.no.abstracts: kindname.interface, java.io.Serializable)) -2 errors diff --git a/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java b/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java index 45e75b74d75..660721ec849 100644 --- a/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java +++ b/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java @@ -28,10 +28,11 @@ */ import com.sun.source.util.JavacTask; -import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.ListBuffer; import java.net.URI; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import javax.tools.Diagnostic; import javax.tools.JavaCompiler; import javax.tools.JavaFileObject; @@ -45,37 +46,45 @@ public class IntersectionTargetTypeTest { enum BoundKind { INTF, - CLASS, - SAM, - ZAM; + CLASS; } enum MethodKind { - NONE, - ABSTRACT, - DEFAULT; + NONE(false), + ABSTRACT_M(true), + DEFAULT_M(false), + ABSTRACT_G(true), + DEFAULT_G(false); + + boolean isAbstract; + + MethodKind(boolean isAbstract) { + this.isAbstract = isAbstract; + } } enum TypeKind { - A("interface A { }\n", "A", BoundKind.ZAM), - B("interface B { default void m() { } }\n", "B", BoundKind.ZAM), - C("interface C { void m(); }\n", "C", BoundKind.SAM), - D("interface D extends B { }\n", "D", BoundKind.ZAM), - E("interface E extends C { }\n", "E", BoundKind.SAM), - F("interface F extends C { void g(); }\n", "F", BoundKind.INTF), - G("interface G extends B { void g(); }\n", "G", BoundKind.SAM), - H("interface H extends A { void g(); }\n", "H", BoundKind.SAM), + A("interface A { }\n", "A", BoundKind.INTF, MethodKind.NONE), + B("interface B { default void m() { } }\n", "B", BoundKind.INTF, MethodKind.DEFAULT_M), + C("interface C { void m(); }\n", "C", BoundKind.INTF, MethodKind.ABSTRACT_M), + D("interface D extends B { }\n", "D", BoundKind.INTF, MethodKind.DEFAULT_M), + E("interface E extends C { }\n", "E", BoundKind.INTF, MethodKind.ABSTRACT_M), + F("interface F extends C { void g(); }\n", "F", BoundKind.INTF, MethodKind.ABSTRACT_G, MethodKind.ABSTRACT_M), + G("interface G extends B { void g(); }\n", "G", BoundKind.INTF, MethodKind.ABSTRACT_G, MethodKind.DEFAULT_M), + H("interface H extends A { void g(); }\n", "H", BoundKind.INTF, MethodKind.ABSTRACT_G), OBJECT("", "Object", BoundKind.CLASS), STRING("", "String", BoundKind.CLASS); String declStr; String typeStr; BoundKind boundKind; + MethodKind[] methodKinds; - private TypeKind(String declStr, String typeStr, BoundKind boundKind) { + private TypeKind(String declStr, String typeStr, BoundKind boundKind, MethodKind... methodKinds) { this.declStr = declStr; this.typeStr = typeStr; this.boundKind = boundKind; + this.methodKinds = methodKinds; } boolean compatibleSupertype(TypeKind tk) { @@ -263,14 +272,22 @@ public class IntersectionTargetTypeTest { boolean errorExpected = !cInfo.wellFormed(); if (ek.isFunctional) { - //first bound must be a SAM - errorExpected |= cInfo.types[0].boundKind != BoundKind.SAM; - if (cInfo.types.length > 1) { - //additional bounds must be ZAMs - for (int i = 1; i < cInfo.types.length; i++) { - errorExpected |= cInfo.types[i].boundKind != BoundKind.ZAM; + List mks = new ArrayList<>(); + for (TypeKind tk : cInfo.types) { + if (tk.boundKind == BoundKind.CLASS) { + errorExpected = true; + break; + } else { + mks = mergeMethods(mks, Arrays.asList(tk.methodKinds)); } } + int abstractCount = 0; + for (MethodKind mk : mks) { + if (mk.isAbstract) { + abstractCount++; + } + } + errorExpected |= abstractCount != 1; } if (errorExpected != diagChecker.errorFound) { @@ -281,6 +298,32 @@ public class IntersectionTargetTypeTest { } } + List mergeMethods(List l1, List l2) { + List mergedMethods = new ArrayList<>(l1); + for (MethodKind mk2 : l2) { + boolean add = !mergedMethods.contains(mk2); + switch (mk2) { + case ABSTRACT_G: + add = add && !mergedMethods.contains(MethodKind.DEFAULT_G); + break; + case ABSTRACT_M: + add = add && !mergedMethods.contains(MethodKind.DEFAULT_M); + break; + case DEFAULT_G: + mergedMethods.remove(MethodKind.ABSTRACT_G); + case DEFAULT_M: + mergedMethods.remove(MethodKind.ABSTRACT_M); + case NONE: + add = false; + break; + } + if (add) { + mergedMethods.add(mk2); + } + } + return mergedMethods; + } + static class DiagnosticChecker implements javax.tools.DiagnosticListener { boolean errorFound; From 876df309737a1bd556f94920df4254aecffe1f85 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 8 Apr 2013 11:54:26 -0700 Subject: [PATCH 086/151] 8011676: Instances of Tokens.Comment should not be defined in inner classes Reviewed-by: mcimadamore --- .../classes/com/sun/tools/javac/parser/JavaTokenizer.java | 4 ++-- .../classes/com/sun/tools/javac/parser/JavadocTokenizer.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java index 2c77a712901..a590e674d9a 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java +++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -770,7 +770,7 @@ public class JavaTokenizer { * (which is treated as the beginning of the first line). * Stops positioned at the closing '/'. */ - protected class BasicComment implements Comment { + protected static class BasicComment implements Comment { CommentStyle cs; U comment_reader; diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java index 847a42b17c8..367345a7fff 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java +++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavadocTokenizer.java @@ -206,7 +206,7 @@ public class JavadocTokenizer extends JavaTokenizer { } } - protected class JavadocComment extends JavaTokenizer.BasicComment { + protected static class JavadocComment extends JavaTokenizer.BasicComment { /** * Translated and stripped contents of doc comment From a45f8e0ef9cf7f457bc32ff0a8bb85aea5d54d79 Mon Sep 17 00:00:00 2001 From: Jonathan Gibbons Date: Mon, 8 Apr 2013 11:57:37 -0700 Subject: [PATCH 087/151] 8011677: EndPosTables should avoid hidden references to Parser Reviewed-by: mcimadamore --- .../sun/tools/javac/parser/JavacParser.java | 34 ++++++++++++++----- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java index 7bc62b95b33..17e9d94058b 100644 --- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java +++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java @@ -171,8 +171,8 @@ public class JavacParser implements Parser { protected AbstractEndPosTable newEndPosTable(boolean keepEndPositions) { return keepEndPositions - ? new SimpleEndPosTable() - : new EmptyEndPosTable(); + ? new SimpleEndPosTable(this) + : new EmptyEndPosTable(this); } protected DocCommentTable newDocCommentTable(boolean keepDocComments, ParserFactory fac) { @@ -3088,6 +3088,7 @@ public class JavacParser implements Parser { toplevel.docComments = docComments; if (keepLineMap) toplevel.lineMap = S.getLineMap(); + this.endPosTable.setParser(null); // remove reference to parser toplevel.endPositions = this.endPosTable; return toplevel; } @@ -4003,11 +4004,12 @@ public class JavacParser implements Parser { /* * a functional source tree and end position mappings */ - protected class SimpleEndPosTable extends AbstractEndPosTable { + protected static class SimpleEndPosTable extends AbstractEndPosTable { private final Map endPosMap; - SimpleEndPosTable() { + SimpleEndPosTable(JavacParser parser) { + super(parser); endPosMap = new HashMap(); } @@ -4016,12 +4018,12 @@ public class JavacParser implements Parser { } protected T to(T t) { - storeEnd(t, token.endPos); + storeEnd(t, parser.token.endPos); return t; } protected T toP(T t) { - storeEnd(t, S.prevToken().endPos); + storeEnd(t, parser.S.prevToken().endPos); return t; } @@ -4043,7 +4045,11 @@ public class JavacParser implements Parser { /* * a default skeletal implementation without any mapping overhead. */ - protected class EmptyEndPosTable extends AbstractEndPosTable { + protected static class EmptyEndPosTable extends AbstractEndPosTable { + + EmptyEndPosTable(JavacParser parser) { + super(parser); + } protected void storeEnd(JCTree tree, int endpos) { /* empty */ } @@ -4065,13 +4071,21 @@ public class JavacParser implements Parser { } - protected abstract class AbstractEndPosTable implements EndPosTable { + protected static abstract class AbstractEndPosTable implements EndPosTable { + /** + * The current parser. + */ + protected JavacParser parser; /** * Store the last error position. */ protected int errorEndPos; + public AbstractEndPosTable(JavacParser parser) { + this.parser = parser; + } + /** * Store ending position for a tree, the value of which is the greater * of last error position and the given ending position. @@ -4106,5 +4120,9 @@ public class JavacParser implements Parser { errorEndPos = errPos; } } + + protected void setParser(JavacParser parser) { + this.parser = parser; + } } } From 6f3fdce7b39a50c0fbd817fbf2c82d23b2a5bbbf Mon Sep 17 00:00:00 2001 From: Leonid Mesnik Date: Tue, 9 Apr 2013 15:32:45 +0200 Subject: [PATCH 088/151] 8009808: TEST-BUG : test case is using bash style tests. Default shell for jtreg is bourne. thus failure Rewrite test to use Java only instead of shell script Reviewed-by: mgerdin, brutisso --- hotspot/test/gc/6941923/Test6941923.java | 121 +++++++++++++++++ hotspot/test/gc/6941923/test6941923.sh | 166 ----------------------- 2 files changed, 121 insertions(+), 166 deletions(-) create mode 100644 hotspot/test/gc/6941923/Test6941923.java delete mode 100644 hotspot/test/gc/6941923/test6941923.sh diff --git a/hotspot/test/gc/6941923/Test6941923.java b/hotspot/test/gc/6941923/Test6941923.java new file mode 100644 index 00000000000..16a2ffd62c9 --- /dev/null +++ b/hotspot/test/gc/6941923/Test6941923.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * @test Test6941923.java + * @bug 6941923 + * @summary test flags for gc log rotation + * @library /testlibrary + * @run main/othervm/timeout=600 Test6941923 + * + */ +import com.oracle.java.testlibrary.*; +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.Arrays; + +class GCLoggingGenerator { + + public static void main(String[] args) throws Exception { + + long sizeOfLog = Long.parseLong(args[0]); + long lines = sizeOfLog / 80; + // full.GC generates ad least 1-line which is not shorter then 80 chars + // for some GC 2 shorter lines are generated + for (long i = 0; i < lines; i++) { + System.gc(); + } + } +} + +public class Test6941923 { + + static final File currentDirectory = new File("."); + static final String logFileName = "test.log"; + static final int logFileSizeK = 16; + static FilenameFilter logFilter = new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return name.startsWith(logFileName); + } + }; + + public static void cleanLogs() { + for (File log : currentDirectory.listFiles(logFilter)) { + if (!log.delete()) { + throw new Error("Unable to delete " + log.getAbsolutePath()); + } + } + } + + public static void runTest(int numberOfFiles) throws Exception { + + ArrayList args = new ArrayList(); + String[] logOpts = new String[]{ + "-cp", System.getProperty("java.class.path"), + "-Xloggc:" + logFileName, + "-XX:-DisableExplicitGC", // to sure that System.gc() works + "-XX:+PrintGC", "-XX:+PrintGCDetails", "-XX:+UseGCLogFileRotation", + "-XX:NumberOfGCLogFiles=" + numberOfFiles, + "-XX:GCLogFileSize=" + logFileSizeK + "K", "-Xmx128M"}; + // System.getProperty("test.java.opts") is '' if no options is set + // need to skip such empty + String[] externalVMopts = System.getProperty("test.java.opts").length() == 0 + ? new String[0] + : System.getProperty("test.java.opts").split(" "); + args.addAll(Arrays.asList(externalVMopts)); + args.addAll(Arrays.asList(logOpts)); + args.add(GCLoggingGenerator.class.getName()); + args.add(String.valueOf(numberOfFiles * logFileSizeK * 1024)); + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(args.toArray(new String[0])); + pb.redirectErrorStream(true); + pb.redirectOutput(new File(GCLoggingGenerator.class.getName() + ".log")); + Process process = pb.start(); + int result = process.waitFor(); + if (result != 0) { + throw new Error("Unexpected exit code = " + result); + } + File[] logs = currentDirectory.listFiles(logFilter); + int smallFilesNumber = 0; + for (File log : logs) { + if (log.length() < logFileSizeK * 1024) { + smallFilesNumber++; + } + } + if (logs.length != numberOfFiles) { + throw new Error("There are only " + logs.length + " logs instead " + numberOfFiles); + } + if (smallFilesNumber > 1) { + throw new Error("There should maximum one log with size < " + logFileSizeK + "K"); + } + } + + public static void main(String[] args) throws Exception { + cleanLogs(); + runTest(1); + cleanLogs(); + runTest(3); + cleanLogs(); + } +} diff --git a/hotspot/test/gc/6941923/test6941923.sh b/hotspot/test/gc/6941923/test6941923.sh deleted file mode 100644 index 9b33e32f449..00000000000 --- a/hotspot/test/gc/6941923/test6941923.sh +++ /dev/null @@ -1,166 +0,0 @@ -## -## @test @(#)test6941923.sh -## @bug 6941923 -## @summary test new added flags for gc log rotation -## @author yqi -## @run shell test6941923.sh -## -## some tests require path to find test source dir -if [ "${TESTSRC}" = "" ] -then - TESTSRC=${PWD} - echo "TESTSRC not set. Using "${TESTSRC}" as default" -fi -echo "TESTSRC=${TESTSRC}" -## Adding common setup Variables for running shell tests. -. ${TESTSRC}/../../test_env.sh - -## skip on windows -OS=`uname -s` -case "$OS" in - Windows_* | CYGWIN_* ) - echo "Test skipped for Windows" - exit 0 - ;; -esac - -# create a small test case -testname="Test" -if [ -e ${testname}.java ]; then - rm -rf ${testname}.* -fi - -cat >> ${testname}.java << __EOF__ -import java.util.Vector; - -public class Test implements Runnable -{ - private boolean _should_stop = false; - - public static void main(String[] args) throws Exception { - - long limit = Long.parseLong(args[0]) * 60L * 1000L; // minutes - Test t = new Test(); - t.set_stop(false); - Thread thr = new Thread(t); - thr.start(); - - long time1 = System.currentTimeMillis(); - long time2 = System.currentTimeMillis(); - while (time2 - time1 < limit) { - try { - Thread.sleep(2000); // 2 seconds - } - catch(Exception e) {} - time2 = System.currentTimeMillis(); - System.out.print("\r... " + (time2 - time1)/1000 + " seconds"); - } - System.out.println(); - t.set_stop(true); - } - public void set_stop(boolean value) { _should_stop = value; } - public void run() { - int cap = 20000; - int fix_size = 2048; - int loop = 0; - Vector< byte[] > v = new Vector< byte[] >(cap); - while(!_should_stop) { - byte[] g = new byte[fix_size]; - v.add(g); - loop++; - if (loop > cap) { - v = null; - cap *= 2; - if (cap > 80000) cap = 80000; - v = new Vector< byte[] >(cap); - } - } - } -} -__EOF__ - -msgsuccess="succeeded" -msgfail="failed" -gclogsize="16K" -filesize=$((16*1024)) -${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${testname}.java > $NULL 2>&1 - -if [ $? != 0 ]; then - echo "${COMPILEJAVA}/bin/javac ${testname}.java $fail" - exit -1 -fi - -# test for 2 minutes, it will complete circulation of gc log rotation -tts=2 -logfile="test.log" -hotspotlog="hotspot.log" - -if [ -e $logfile ]; then - rm -rf $logfile -fi - -#also delete $hotspotlog if it exists -if [ -f $hotspotlog ]; then - rm -rf $hotspotlog -fi - -options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=1 -XX:GCLogFileSize=$gclogsize" -echo "Test gc log rotation in same file, wait for $tts minutes ...." -${TESTJAVA}/bin/java $options $testname $tts -if [ $? != 0 ]; then - echo "$msgfail" - exit -1 -fi - -# rotation file will be $logfile.0 -if [ -f $logfile.0 ]; then - outfilesize=`ls -l $logfile.0 | awk '{print $5 }'` - if [ $((outfilesize)) -ge $((filesize)) ]; then - echo $msgsuccess - else - echo $msgfail - fi -else - echo $msgfail - exit -1 -fi - -# delete log file -rm -rf $logfile.0 -if [ -f $hotspotlog ]; then - rm -rf $hotspotlog -fi - -#multiple log files -numoffiles=3 -options="-Xloggc:$logfile -XX:+UseConcMarkSweepGC -XX:+PrintGC -XX:+PrintGCDetails -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=$numoffiles -XX:GCLogFileSize=$gclogsize" -echo "Test gc log rotation in $numoffiles files, wait for $tts minutes ...." -${TESTJAVA}/bin/java $options $testname $tts -if [ $? != 0 ]; then - echo "$msgfail" - exit -1 -fi - -atleast=0 # at least size of numoffile-1 files >= $gclogsize -tk=0 -while [ $(($tk)) -lt $(($numoffiles)) ] -do - if [ -f $logfile.$tk ]; then - outfilesize=`ls -l $logfile.$tk | awk '{ print $5 }'` - if [ $(($outfilesize)) -ge $(($filesize)) ]; then - atleast=$((atleast+1)) - fi - fi - tk=$((tk+1)) -done - -rm -rf $logfile.* -rm -rf $testname.* -rm -rf $hotspotlog - -if [ $(($atleast)) -ge $(($numoffiles-1)) ]; then - echo $msgsuccess -else - echo $msgfail - exit -1 -fi From 91a27900edac9acc358532d8e35be27ec15e08e7 Mon Sep 17 00:00:00 2001 From: Miroslav Kos Date: Tue, 9 Apr 2013 14:51:13 +0100 Subject: [PATCH 089/151] 8010393: Update JAX-WS RI to 2.2.9-b12941 Co-authored-by: Martin Grebac Reviewed-by: alanb, erikj --- jaxws/makefiles/BuildJaxws.gmk | 5 +- .../internal/api}/EnvelopeStyle.java | 57 +- .../internal/api/EnvelopeStyleFeature.java | 60 ++ .../api}/databinding/Databinding.java | 174 ++--- .../api}/databinding/DatabindingFactory.java | 62 +- .../api/databinding/DatabindingMode.java | 52 ++ .../databinding/DatabindingModeFeature.java | 92 +++ .../databinding/ExternalMetadataFeature.java | 172 +++++ .../api}/databinding/JavaCallInfo.java | 53 +- .../api/databinding/WSDLGenerator.java | 88 +++ .../api/databinding/WSDLResolver.java | 88 +++ .../message/BaseDistributedPropertySet.java | 323 ++++++++ .../internal/api/message/BasePropertySet.java | 563 ++++++++++++++ .../internal/api/message/ContentType.java | 93 +++ .../api/message/DistributedPropertySet.java | 96 +++ .../internal/api/message/MessageContext.java | 116 +++ .../api}/message/MessageContextFactory.java | 199 ++--- .../internal/api/message/PropertySet.java | 149 ++++ .../message/ReadOnlyPropertyException.java | 63 ++ .../impl/encoding/StreamDecoderImpl.java | 67 ++ .../internalspi/encoding/StreamDecoder.java | 60 ++ .../ExistingAnnotationsType.java | 92 +++ .../jaxws_databinding/JavaMethod.java | 280 +++++++ .../jaxws_databinding/JavaParam.java | 167 ++++ .../JavaWsdlMappingType.java | 466 ++++++++++++ .../jaxws_databinding/ObjectFactory.java | 283 +++++++ .../SoapBindingParameterStyle.java | 78 ++ .../jaxws_databinding/SoapBindingStyle.java | 78 ++ .../jaxws_databinding/SoapBindingUse.java | 78 ++ .../webservices/jaxws_databinding/Util.java | 72 ++ .../jaxws_databinding/WebParamMode.java | 80 ++ .../jaxws_databinding/XmlAction.java | 188 +++++ .../jaxws_databinding/XmlAddressing.java | 116 +++ .../jaxws_databinding/XmlBindingType.java | 109 +++ .../jaxws_databinding/XmlFaultAction.java | 145 ++++ .../jaxws_databinding/XmlHandlerChain.java | 115 +++ .../jaxws_databinding/XmlMTOM.java | 153 ++++ .../jaxws_databinding/XmlOneway.java | 79 ++ .../jaxws_databinding/XmlRequestWrapper.java | 203 +++++ .../jaxws_databinding/XmlResponseWrapper.java | 202 +++++ .../jaxws_databinding/XmlSOAPBinding.java | 186 +++++ .../jaxws_databinding/XmlServiceMode.java | 118 +++ .../jaxws_databinding/XmlWebEndpoint.java | 110 +++ .../jaxws_databinding/XmlWebFault.java | 183 +++++ .../jaxws_databinding/XmlWebMethod.java | 187 +++++ .../jaxws_databinding/XmlWebParam.java | 258 +++++++ .../jaxws_databinding/XmlWebResult.java | 222 ++++++ .../jaxws_databinding/XmlWebService.java | 296 ++++++++ .../XmlWebServiceClient.java | 174 +++++ .../XmlWebServiceProvider.java | 206 +++++ .../jaxws_databinding/XmlWebServiceRef.java | 262 +++++++ .../jaxws_databinding/package-info.java | 49 ++ .../com/sun/istack/internal/Builder.java | 2 +- .../istack/internal/ByteArrayDataSource.java | 2 +- .../sun/istack/internal/FinalArrayList.java | 2 +- .../internal/FragmentContentHandler.java | 2 +- .../com/sun/istack/internal/Interned.java | 2 +- .../com/sun/istack/internal/NotNull.java | 2 +- .../com/sun/istack/internal/Nullable.java | 2 +- .../com/sun/istack/internal/Pool.java | 2 +- .../sun/istack/internal/SAXException2.java | 2 +- .../istack/internal/SAXParseException2.java | 2 +- .../istack/internal/XMLStreamException2.java | 2 +- .../XMLStreamReaderToContentHandler.java | 2 +- .../internal/localization/Localizable.java | 4 +- .../localization/LocalizableMessage.java | 6 +- .../LocalizableMessageFactory.java | 2 +- .../internal/localization/Localizer.java | 12 +- .../localization/NullLocalizable.java | 4 +- .../sun/istack/internal/logging/Logger.java | 60 +- .../com/sun/istack/internal/package-info.java | 2 +- .../internal/tools/DefaultAuthenticator.java | 324 ++++++++ .../internal/tools/MaskingClassLoader.java | 2 +- .../tools/ParallelWorldClassLoader.java | 2 +- .../istack/internal/tools/SecureLoader.java | 15 +- .../istack/internal/tools/package-info.java | 2 +- .../sun/org/glassfish/external/amx/AMX.java | 3 +- .../glassfish/external/amx/AMXGlassfish.java | 3 +- .../org/glassfish/external/amx/AMXUtil.java | 3 +- .../glassfish/external/amx/BootAMXMBean.java | 3 +- .../glassfish/external/amx/MBeanListener.java | 3 +- .../org/glassfish/external/arc/Stability.java | 5 +- .../org/glassfish/external/arc/Taxonomy.java | 4 +- .../external/probe/provider/PluginPoint.java | 8 +- .../probe/provider/StatsProvider.java | 4 +- .../probe/provider/StatsProviderInfo.java | 4 +- .../probe/provider/StatsProviderManager.java | 4 +- .../StatsProviderManagerDelegate.java | 4 +- .../probe/provider/annotations/Probe.java | 3 +- .../provider/annotations/ProbeListener.java | 4 +- .../provider/annotations/ProbeParam.java | 3 +- .../provider/annotations/ProbeProvider.java | 3 +- .../statistics/AverageRangeStatistic.java | 4 +- .../statistics/BoundaryStatistic.java | 4 +- .../statistics/BoundedRangeStatistic.java | 3 +- .../external/statistics/CountStatistic.java | 4 +- .../external/statistics/RangeStatistic.java | 4 +- .../external/statistics/Statistic.java | 4 +- .../glassfish/external/statistics/Stats.java | 4 +- .../external/statistics/StringStatistic.java | 3 +- .../external/statistics/TimeStatistic.java | 4 +- .../statistics/annotations/Reset.java | 4 +- .../impl/AverageRangeStatisticImpl.java | 4 +- .../impl/BoundaryStatisticImpl.java | 4 +- .../impl/BoundedRangeStatisticImpl.java | 4 +- .../statistics/impl/CountStatisticImpl.java | 3 +- .../statistics/impl/RangeStatisticImpl.java | 4 +- .../statistics/impl/StatisticImpl.java | 3 +- .../external/statistics/impl/StatsImpl.java | 4 +- .../statistics/impl/StringStatisticImpl.java | 4 +- .../statistics/impl/TimeStatisticImpl.java | 5 +- .../com.sun.tools.internal.xjc.Plugin | 1 + .../sun/tools/internal/jxc/ConfigReader.java | 17 +- .../internal/jxc/MessageBundle.properties | 7 +- .../internal/jxc/MessageBundle_de.properties | 34 + .../internal/jxc/MessageBundle_es.properties | 34 + .../internal/jxc/MessageBundle_fr.properties | 34 + .../internal/jxc/MessageBundle_it.properties | 34 + .../internal/jxc/MessageBundle_ja.properties | 34 + .../internal/jxc/MessageBundle_ko.properties | 34 + .../jxc/MessageBundle_pt_BR.properties | 34 + .../jxc/MessageBundle_zh_CN.properties | 34 + .../jxc/MessageBundle_zh_TW.properties | 34 + .../sun/tools/internal/jxc/NGCCRuntimeEx.java | 21 +- .../tools/internal/jxc/SchemaGenerator.java | 75 +- .../internal/jxc/SchemaGeneratorFacade.java | 1 - .../sun/tools/internal/jxc/SecureLoader.java | 18 +- .../internal/jxc/ap/AnnotationParser.java | 24 +- .../jxc/ap/MessageBundle_de.properties | 30 + .../jxc/ap/MessageBundle_es.properties | 30 + .../jxc/ap/MessageBundle_fr.properties | 30 + .../jxc/ap/MessageBundle_it.properties | 30 + .../jxc/ap/MessageBundle_ja.properties | 30 + .../jxc/ap/MessageBundle_ko.properties | 30 + .../jxc/ap/MessageBundle_pt_BR.properties | 30 + .../jxc/ap/MessageBundle_zh_CN.properties | 30 + .../jxc/ap/MessageBundle_zh_TW.properties | 30 + .../sun/tools/internal/jxc/ap/Options.java | 22 +- .../internal/jxc/ap/SchemaGenerator.java | 14 +- .../tools/internal/jxc/ap/SecureLoader.java | 18 +- .../internal/jxc/api/JXC.java} | 34 +- .../api/impl/j2s/JAXBModelImpl.java | 2 +- .../api/impl/j2s/JavaCompilerImpl.java | 2 +- .../jxc/gen/config/AttributesImpl.java | 2 +- .../internal/jxc/gen/config/Classes.java | 150 ++-- .../tools/internal/jxc/gen/config/Config.java | 114 +-- .../jxc/gen/config/NGCCEventReceiver.java | 2 +- .../jxc/gen/config/NGCCEventSource.java | 2 +- .../internal/jxc/gen/config/NGCCHandler.java | 2 +- .../jxc/gen/config/NGCCInterleaveFilter.java | 2 +- .../internal/jxc/gen/config/NGCCRuntime.java | 2 +- .../tools/internal/jxc/gen/config/Schema.java | 142 ++-- .../internal/jxc/model/nav/ApNavigator.java | 8 +- .../com/sun/tools/internal/ws/Invoker.java | 99 +-- .../sun/tools/internal/ws/ToolVersion.java | 2 +- .../com/sun/tools/internal/ws/WsGen.java | 2 +- .../com/sun/tools/internal/ws/WsImport.java | 2 +- .../ws/api/TJavaGeneratorExtension.java | 2 +- .../tools/internal/ws/api/WsgenExtension.java | 2 +- .../tools/internal/ws/api/WsgenProtocol.java | 6 +- .../internal/ws/api/wsdl/TWSDLExtensible.java | 2 +- .../internal/ws/api/wsdl/TWSDLExtension.java | 2 +- .../ws/api/wsdl/TWSDLExtensionHandler.java | 2 +- .../internal/ws/api/wsdl/TWSDLOperation.java | 2 +- .../ws/api/wsdl/TWSDLParserContext.java | 2 +- .../sun/tools/internal/ws/package-info.java | 2 +- .../ws/processor/ProcessorException.java | 2 +- .../generator/CustomExceptionGenerator.java | 2 +- .../ws/processor/generator/GeneratorBase.java | 68 +- .../generator/GeneratorConstants.java | 2 +- .../generator/GeneratorException.java | 2 +- .../generator/GeneratorExtension.java | 4 +- .../ws/processor/generator/GeneratorUtil.java | 2 +- .../JavaGeneratorExtensionFacade.java | 2 +- .../processor/generator/JwsImplGenerator.java | 94 +-- .../ws/processor/generator/Names.java | 2 +- .../ws/processor/generator/SeiGenerator.java | 90 ++- .../processor/generator/ServiceGenerator.java | 21 +- .../W3CAddressingJavaGeneratorExtension.java | 2 +- .../ws/processor/model/AbstractType.java | 2 +- .../ws/processor/model/AsyncOperation.java | 2 +- .../processor/model/AsyncOperationType.java | 2 +- .../internal/ws/processor/model/Block.java | 2 +- .../processor/model/ExtendedModelVisitor.java | 2 +- .../internal/ws/processor/model/Fault.java | 14 +- .../ws/processor/model/HeaderFault.java | 2 +- .../internal/ws/processor/model/Message.java | 2 +- .../internal/ws/processor/model/Model.java | 2 +- .../ws/processor/model/ModelException.java | 4 +- .../ws/processor/model/ModelObject.java | 2 +- .../ws/processor/model/ModelProperties.java | 2 +- .../ws/processor/model/ModelVisitor.java | 2 +- .../ws/processor/model/Operation.java | 2 +- .../ws/processor/model/Parameter.java | 2 +- .../internal/ws/processor/model/Port.java | 2 +- .../internal/ws/processor/model/Request.java | 2 +- .../internal/ws/processor/model/Response.java | 2 +- .../internal/ws/processor/model/Service.java | 2 +- .../model/exporter/ExternalObject.java | 2 +- .../processor/model/java/JavaArrayType.java | 2 +- .../processor/model/java/JavaException.java | 2 +- .../processor/model/java/JavaInterface.java | 2 +- .../ws/processor/model/java/JavaMethod.java | 10 +- .../processor/model/java/JavaParameter.java | 2 +- .../processor/model/java/JavaSimpleType.java | 2 +- .../model/java/JavaStructureMember.java | 2 +- .../model/java/JavaStructureType.java | 2 +- .../ws/processor/model/java/JavaType.java | 2 +- .../model/jaxb/JAXBElementMember.java | 2 +- .../ws/processor/model/jaxb/JAXBMapping.java | 2 +- .../ws/processor/model/jaxb/JAXBModel.java | 2 +- .../ws/processor/model/jaxb/JAXBProperty.java | 2 +- .../model/jaxb/JAXBStructuredType.java | 2 +- .../ws/processor/model/jaxb/JAXBType.java | 2 +- .../model/jaxb/JAXBTypeAndAnnotation.java | 2 +- .../processor/model/jaxb/JAXBTypeVisitor.java | 2 +- .../ws/processor/model/jaxb/RpcLitMember.java | 2 +- .../processor/model/jaxb/RpcLitStructure.java | 2 +- .../ws/processor/model/jaxb/Util.java | 2 +- .../modeler/JavaSimpleTypeCreator.java | 2 +- .../ws/processor/modeler/Modeler.java | 2 +- .../processor/modeler/ModelerConstants.java | 2 +- .../processor/modeler/ModelerException.java | 8 +- .../AnnotationProcessorContext.java | 15 +- .../modeler/annotation/FaultInfo.java | 2 +- .../annotation/MakeSafeTypeVisitor.java | 2 +- .../modeler/annotation/MemberInfo.java | 20 +- .../modeler/annotation/ModelBuilder.java | 2 +- .../modeler/annotation/TypeModeler.java | 7 +- .../modeler/annotation/TypeMoniker.java | 2 +- .../annotation/TypeMonikerFactory.java | 2 +- .../modeler/annotation/WebServiceAp.java | 92 ++- .../annotation/WebServiceConstants.java | 2 +- .../modeler/annotation/WebServiceVisitor.java | 52 +- .../WebServiceWrapperGenerator.java | 10 +- .../modeler/annotation/WrapperInfo.java | 2 +- .../modeler/wsdl/AccessorElement.java | 2 +- .../modeler/wsdl/ClassNameAllocatorImpl.java | 2 +- .../modeler/wsdl/ConsoleErrorReporter.java | 2 +- .../modeler/wsdl/JAXBModelBuilder.java | 2 +- .../processor/modeler/wsdl/ModelerUtils.java | 4 +- .../modeler/wsdl/PseudoSchemaBuilder.java | 10 +- .../processor/modeler/wsdl/WSDLModeler.java | 372 +++++---- .../modeler/wsdl/WSDLModelerBase.java | 89 +-- .../ws/processor/util/ClassNameCollector.java | 5 +- .../ws/processor/util/DirectoryUtil.java | 10 +- .../ws/processor/util/IndentingWriter.java | 2 +- .../ws/resources/ConfigurationMessages.java | 9 +- .../ws/resources/GeneratorMessages.java | 9 +- .../ws/resources/JavacompilerMessages.java | 9 +- .../internal/ws/resources/ModelMessages.java | 9 +- .../ws/resources/ModelerMessages.java | 33 +- .../ws/resources/ProcessorMessages.java | 7 +- .../internal/ws/resources/UtilMessages.java | 9 +- .../ws/resources/WebserviceapMessages.java | 21 +- .../ws/resources/WscompileMessages.java | 28 +- .../internal/ws/resources/WsdlMessages.java | 23 +- .../ws/resources/configuration.properties | 2 +- .../ws/resources/configuration_de.properties | 28 + .../ws/resources/configuration_es.properties | 28 + .../ws/resources/configuration_fr.properties | 28 + .../ws/resources/configuration_it.properties | 28 + .../ws/resources/configuration_ja.properties | 28 + .../ws/resources/configuration_ko.properties | 28 + .../resources/configuration_pt_BR.properties | 28 + .../resources/configuration_zh_CN.properties | 28 + .../resources/configuration_zh_TW.properties | 28 + .../ws/resources/generator.properties | 2 +- .../ws/resources/generator_de.properties | 39 + .../ws/resources/generator_es.properties | 39 + .../ws/resources/generator_fr.properties | 39 + .../ws/resources/generator_it.properties | 39 + .../ws/resources/generator_ja.properties | 39 + .../ws/resources/generator_ko.properties | 39 + .../ws/resources/generator_pt_BR.properties | 39 + .../ws/resources/generator_zh_CN.properties | 39 + .../ws/resources/generator_zh_TW.properties | 39 + .../ws/resources/javacompiler.properties | 2 +- .../ws/resources/javacompiler_de.properties | 31 + .../ws/resources/javacompiler_es.properties | 31 + .../ws/resources/javacompiler_fr.properties | 31 + .../ws/resources/javacompiler_it.properties | 31 + .../ws/resources/javacompiler_ja.properties | 31 + .../ws/resources/javacompiler_ko.properties | 31 + .../resources/javacompiler_pt_BR.properties | 31 + .../resources/javacompiler_zh_CN.properties | 31 + .../resources/javacompiler_zh_TW.properties | 31 + .../internal/ws/resources/model.properties | 2 +- .../internal/ws/resources/model_de.properties | 110 +++ .../internal/ws/resources/model_es.properties | 110 +++ .../internal/ws/resources/model_fr.properties | 110 +++ .../internal/ws/resources/model_it.properties | 110 +++ .../internal/ws/resources/model_ja.properties | 110 +++ .../internal/ws/resources/model_ko.properties | 110 +++ .../ws/resources/model_pt_BR.properties | 110 +++ .../ws/resources/model_zh_CN.properties | 110 +++ .../ws/resources/model_zh_TW.properties | 110 +++ .../internal/ws/resources/modeler.properties | 4 +- .../ws/resources/modeler_de.properties | 246 ++++++ .../ws/resources/modeler_es.properties | 246 ++++++ .../ws/resources/modeler_fr.properties | 246 ++++++ .../ws/resources/modeler_it.properties | 246 ++++++ .../ws/resources/modeler_ja.properties | 246 ++++++ .../ws/resources/modeler_ko.properties | 246 ++++++ .../ws/resources/modeler_pt_BR.properties | 246 ++++++ .../ws/resources/modeler_zh_CN.properties | 246 ++++++ .../ws/resources/modeler_zh_TW.properties | 246 ++++++ .../ws/resources/processor.properties | 2 +- .../ws/resources/processor_de.properties | 27 + .../ws/resources/processor_es.properties | 27 + .../ws/resources/processor_fr.properties | 27 + .../ws/resources/processor_it.properties | 27 + .../ws/resources/processor_ja.properties | 27 + .../ws/resources/processor_ko.properties | 27 + .../ws/resources/processor_pt_BR.properties | 27 + .../ws/resources/processor_zh_CN.properties | 27 + .../ws/resources/processor_zh_TW.properties | 27 + .../internal/ws/resources/util.properties | 2 +- .../internal/ws/resources/util_de.properties | 28 + .../internal/ws/resources/util_es.properties | 28 + .../internal/ws/resources/util_fr.properties | 28 + .../internal/ws/resources/util_it.properties | 28 + .../internal/ws/resources/util_ja.properties | 28 + .../internal/ws/resources/util_ko.properties | 28 + .../ws/resources/util_pt_BR.properties | 28 + .../ws/resources/util_zh_CN.properties | 28 + .../ws/resources/util_zh_TW.properties | 28 + .../ws/resources/webserviceap.properties | 4 +- .../ws/resources/webserviceap_de.properties | 160 ++++ .../ws/resources/webserviceap_es.properties | 160 ++++ .../ws/resources/webserviceap_fr.properties | 160 ++++ .../ws/resources/webserviceap_it.properties | 160 ++++ .../ws/resources/webserviceap_ja.properties | 160 ++++ .../ws/resources/webserviceap_ko.properties | 160 ++++ .../resources/webserviceap_pt_BR.properties | 160 ++++ .../resources/webserviceap_zh_CN.properties | 160 ++++ .../resources/webserviceap_zh_TW.properties | 160 ++++ .../ws/resources/wscompile.properties | 12 +- .../ws/resources/wscompile_de.properties | 131 ++++ .../ws/resources/wscompile_es.properties | 131 ++++ .../ws/resources/wscompile_fr.properties | 131 ++++ .../ws/resources/wscompile_it.properties | 131 ++++ .../ws/resources/wscompile_ja.properties | 131 ++++ .../ws/resources/wscompile_ko.properties | 131 ++++ .../ws/resources/wscompile_pt_BR.properties | 131 ++++ .../ws/resources/wscompile_zh_CN.properties | 131 ++++ .../ws/resources/wscompile_zh_TW.properties | 131 ++++ .../internal/ws/resources/wsdl.properties | 5 +- .../internal/ws/resources/wsdl_de.properties | 157 ++++ .../internal/ws/resources/wsdl_es.properties | 157 ++++ .../internal/ws/resources/wsdl_fr.properties | 157 ++++ .../internal/ws/resources/wsdl_it.properties | 157 ++++ .../internal/ws/resources/wsdl_ja.properties | 157 ++++ .../internal/ws/resources/wsdl_ko.properties | 157 ++++ .../ws/resources/wsdl_pt_BR.properties | 157 ++++ .../ws/resources/wsdl_zh_CN.properties | 157 ++++ .../ws/resources/wsdl_zh_TW.properties | 157 ++++ .../internal/ws/spi/WSToolsObjectFactory.java | 6 +- .../tools/internal/ws/spi/package-info.java | 2 +- .../tools/internal/ws/util/ClassNameInfo.java | 2 +- .../internal/ws/util/ForkEntityResolver.java | 8 +- .../tools/internal/ws/util/WSDLFetcher.java | 65 +- .../internal/ws/util/WSDLParseException.java | 2 +- .../ws/util/WSToolsObjectFactoryImpl.java | 2 +- .../tools/internal/ws/util/xml/XmlUtil.java | 2 +- .../sun/tools/internal/ws/version.properties | 11 +- .../internal/ws/wscompile/AbortException.java | 2 +- .../tools/internal/ws/wscompile/AuthInfo.java | 12 +- .../ws/wscompile/BadCommandLineException.java | 4 +- .../ws/wscompile/DefaultAuthenticator.java | 196 ----- .../internal/ws/wscompile/ErrorReceiver.java | 4 +- .../ws/wscompile/ErrorReceiverFilter.java | 2 +- .../ws/wscompile/FilerCodeWriter.java | 8 +- .../ws/wscompile/JavaCompilerHelper.java | 2 +- .../tools/internal/ws/wscompile/Options.java | 29 +- .../tools/internal/ws/wscompile/Plugin.java | 10 +- .../internal/ws/wscompile/WSCodeWriter.java | 2 +- .../internal/ws/wscompile/WsgenOptions.java | 26 +- .../internal/ws/wscompile/WsgenTool.java | 123 ++- .../ws/wscompile/WsimportListener.java | 2 +- .../ws/wscompile/WsimportOptions.java | 72 +- .../internal/ws/wscompile/WsimportTool.java | 149 ++-- .../plugin/at_generated/PluginImpl.java | 2 +- .../internal/ws/wsdl/document/Binding.java | 2 +- .../ws/wsdl/document/BindingFault.java | 2 +- .../ws/wsdl/document/BindingInput.java | 2 +- .../ws/wsdl/document/BindingOperation.java | 17 +- .../ws/wsdl/document/BindingOutput.java | 2 +- .../ws/wsdl/document/Definitions.java | 7 +- .../ws/wsdl/document/Documentation.java | 2 +- .../internal/ws/wsdl/document/Fault.java | 14 +- .../internal/ws/wsdl/document/Import.java | 2 +- .../internal/ws/wsdl/document/Input.java | 2 +- .../internal/ws/wsdl/document/Kinds.java | 2 +- .../internal/ws/wsdl/document/Message.java | 2 +- .../ws/wsdl/document/MessagePart.java | 2 +- .../internal/ws/wsdl/document/Operation.java | 2 +- .../ws/wsdl/document/OperationStyle.java | 2 +- .../internal/ws/wsdl/document/Output.java | 2 +- .../tools/internal/ws/wsdl/document/Port.java | 2 +- .../internal/ws/wsdl/document/PortType.java | 2 +- .../internal/ws/wsdl/document/Service.java | 2 +- .../internal/ws/wsdl/document/Types.java | 13 +- .../ws/wsdl/document/WSDLConstants.java | 37 +- .../ws/wsdl/document/WSDLDocument.java | 12 +- .../ws/wsdl/document/WSDLDocumentVisitor.java | 2 +- .../document/WSDLDocumentVisitorBase.java | 2 +- .../ws/wsdl/document/http/HTTPAddress.java | 2 +- .../ws/wsdl/document/http/HTTPBinding.java | 2 +- .../ws/wsdl/document/http/HTTPConstants.java | 16 +- .../ws/wsdl/document/http/HTTPOperation.java | 2 +- .../ws/wsdl/document/http/HTTPUrlEncoded.java | 2 +- .../document/http/HTTPUrlReplacement.java | 2 +- .../ws/wsdl/document/jaxws/CustomName.java | 2 +- .../ws/wsdl/document/jaxws/Exception.java | 2 +- .../ws/wsdl/document/jaxws/JAXWSBinding.java | 16 +- .../jaxws/JAXWSBindingsConstants.java | 52 +- .../ws/wsdl/document/jaxws/Parameter.java | 2 +- .../ws/wsdl/document/mime/MIMEConstants.java | 13 +- .../ws/wsdl/document/mime/MIMEContent.java | 2 +- .../document/mime/MIMEMultipartRelated.java | 2 +- .../ws/wsdl/document/mime/MIMEPart.java | 2 +- .../ws/wsdl/document/mime/MIMEXml.java | 2 +- .../wsdl/document/schema/SchemaConstants.java | 199 +++-- .../ws/wsdl/document/schema/SchemaKinds.java | 2 +- .../ws/wsdl/document/soap/SOAP12Binding.java | 2 +- .../wsdl/document/soap/SOAP12Constants.java | 299 +++----- .../ws/wsdl/document/soap/SOAPAddress.java | 2 +- .../ws/wsdl/document/soap/SOAPBinding.java | 2 +- .../ws/wsdl/document/soap/SOAPBody.java | 2 +- .../ws/wsdl/document/soap/SOAPConstants.java | 2 +- .../ws/wsdl/document/soap/SOAPFault.java | 2 +- .../ws/wsdl/document/soap/SOAPHeader.java | 2 +- .../wsdl/document/soap/SOAPHeaderFault.java | 2 +- .../ws/wsdl/document/soap/SOAPOperation.java | 2 +- .../ws/wsdl/document/soap/SOAPStyle.java | 2 +- .../ws/wsdl/document/soap/SOAPUse.java | 2 +- .../ws/wsdl/framework/AbstractDocument.java | 7 +- .../internal/ws/wsdl/framework/Defining.java | 2 +- .../framework/DuplicateEntityException.java | 2 +- .../internal/ws/wsdl/framework/Elemental.java | 2 +- .../internal/ws/wsdl/framework/Entity.java | 2 +- .../ws/wsdl/framework/EntityAction.java | 2 +- .../wsdl/framework/EntityReferenceAction.java | 2 +- .../framework/EntityReferenceValidator.java | 2 +- .../wsdl/framework/ExtensibilityHelper.java | 2 +- .../ws/wsdl/framework/ExtensionImpl.java | 2 +- .../ws/wsdl/framework/ExtensionVisitor.java | 2 +- .../wsdl/framework/ExtensionVisitorBase.java | 2 +- .../framework/ExternalEntityReference.java | 2 +- .../ws/wsdl/framework/GlobalEntity.java | 2 +- .../ws/wsdl/framework/GloballyKnown.java | 2 +- .../ws/wsdl/framework/Identifiable.java | 2 +- .../internal/ws/wsdl/framework/Kind.java | 2 +- .../wsdl/framework/NoSuchEntityException.java | 2 +- .../ws/wsdl/framework/ParseException.java | 4 +- .../ws/wsdl/framework/ParserListener.java | 2 +- .../ws/wsdl/framework/QNameAction.java | 2 +- .../framework/TWSDLParserContextImpl.java | 2 +- .../wsdl/framework/ValidationException.java | 2 +- .../ws/wsdl/framework/WSDLLocation.java | 14 +- .../wsdl/parser/AbstractExtensionHandler.java | 2 +- .../parser/AbstractReferenceFinderImpl.java | 25 +- .../internal/ws/wsdl/parser/Constants.java | 198 ++--- .../internal/ws/wsdl/parser/DOMBuilder.java | 2 +- .../internal/ws/wsdl/parser/DOMForest.java | 21 +- .../ws/wsdl/parser/DOMForestParser.java | 2 +- .../ws/wsdl/parser/DOMForestScanner.java | 2 +- .../ws/wsdl/parser/HTTPExtensionHandler.java | 2 +- .../ws/wsdl/parser/InternalizationLogic.java | 2 +- .../internal/ws/wsdl/parser/Internalizer.java | 253 ++----- .../parser/JAXWSBindingExtensionHandler.java | 175 ++--- .../ws/wsdl/parser/MIMEExtensionHandler.java | 2 +- ...rSubmissionAddressingExtensionHandler.java | 85 ++- .../ws/wsdl/parser/MetadataFinder.java | 55 +- .../ws/wsdl/parser/NamespaceContextImpl.java | 2 +- .../wsdl/parser/Policy12ExtensionHandler.java | 2 +- .../wsdl/parser/Policy15ExtensionHandler.java | 2 +- .../wsdl/parser/SOAP12ExtensionHandler.java | 2 +- .../parser/SOAPEntityReferenceValidator.java | 2 +- .../ws/wsdl/parser/SOAPExtensionHandler.java | 221 +++--- .../tools/internal/ws/wsdl/parser/Util.java | 2 +- .../ws/wsdl/parser/VersionChecker.java | 2 +- .../parser/W3CAddressingExtensionHandler.java | 2 +- ...W3CAddressingMetadataExtensionHandler.java | 2 +- .../wsdl/parser/WSDLInternalizationLogic.java | 14 +- .../internal/ws/wsdl/parser/WSDLParser.java | 77 +- .../ws/wsdl/parser/WhitespaceStripper.java | 2 +- .../internal/xjc/ClassLoaderBuilder.java | 7 +- .../com/sun/tools/internal/xjc/Driver.java | 15 +- .../internal/xjc/MessageBundle.properties | 19 +- .../internal/xjc/MessageBundle_de.properties | 152 ++++ .../internal/xjc/MessageBundle_es.properties | 152 ++++ .../internal/xjc/MessageBundle_fr.properties | 152 ++++ .../internal/xjc/MessageBundle_it.properties | 152 ++++ .../internal/xjc/MessageBundle_ja.properties | 152 ++++ .../internal/xjc/MessageBundle_ko.properties | 152 ++++ .../xjc/MessageBundle_pt_BR.properties | 152 ++++ .../xjc/MessageBundle_zh_CN.properties | 152 ++++ .../xjc/MessageBundle_zh_TW.properties | 152 ++++ .../com/sun/tools/internal/xjc/Messages.java | 4 +- .../sun/tools/internal/xjc/ModelLoader.java | 20 +- .../com/sun/tools/internal/xjc/Options.java | 93 +-- .../sun/tools/internal/xjc/SchemaCache.java | 10 +- .../sun/tools/internal/xjc/SecureLoader.java | 38 +- .../com/sun/tools/internal/xjc/XJCFacade.java | 66 +- .../com/sun/tools/internal/xjc/api/XJC.java | 10 - .../xjc/api/impl/s2j/SchemaCompilerImpl.java | 9 +- .../api/impl/s2j/TypeAndAnnotationImpl.java | 4 +- .../xjc/api/util/Messages_de.properties | 26 + .../xjc/api/util/Messages_es.properties | 26 + .../xjc/api/util/Messages_fr.properties | 26 + .../xjc/api/util/Messages_it.properties | 26 + .../xjc/api/util/Messages_ja.properties | 26 + .../xjc/api/util/Messages_ko.properties | 26 + .../xjc/api/util/Messages_pt_BR.properties | 26 + .../xjc/api/util/Messages_zh_CN.properties | 26 + .../xjc/api/util/Messages_zh_TW.properties | 26 + .../spec/XmlAccessorOrderWriter.java | 2 +- .../spec/XmlAccessorTypeWriter.java | 2 +- .../spec/XmlAnyAttributeWriter.java | 2 +- .../annotation/spec/XmlAnyElementWriter.java | 2 +- .../spec/XmlAttachmentRefWriter.java | 2 +- .../annotation/spec/XmlAttributeWriter.java | 2 +- .../annotation/spec/XmlElementDeclWriter.java | 2 +- .../annotation/spec/XmlElementRefWriter.java | 2 +- .../annotation/spec/XmlElementRefsWriter.java | 2 +- .../spec/XmlElementWrapperWriter.java | 2 +- .../annotation/spec/XmlElementWriter.java | 2 +- .../annotation/spec/XmlElementsWriter.java | 2 +- .../annotation/spec/XmlEnumValueWriter.java | 2 +- .../annotation/spec/XmlEnumWriter.java | 2 +- .../annotation/spec/XmlIDREFWriter.java | 2 +- .../annotation/spec/XmlIDWriter.java | 2 +- .../spec/XmlInlineBinaryDataWriter.java | 2 +- .../spec/XmlJavaTypeAdapterWriter.java | 2 +- .../annotation/spec/XmlListWriter.java | 2 +- .../annotation/spec/XmlMimeTypeWriter.java | 2 +- .../annotation/spec/XmlMixedWriter.java | 2 +- .../annotation/spec/XmlNsWriter.java | 2 +- .../annotation/spec/XmlRegistryWriter.java | 2 +- .../annotation/spec/XmlRootElementWriter.java | 2 +- .../annotation/spec/XmlSchemaTypeWriter.java | 2 +- .../annotation/spec/XmlSchemaTypesWriter.java | 2 +- .../annotation/spec/XmlSchemaWriter.java | 2 +- .../annotation/spec/XmlSeeAlsoWriter.java | 2 +- .../annotation/spec/XmlTransientWriter.java | 2 +- .../annotation/spec/XmlTypeWriter.java | 2 +- .../annotation/spec/XmlValueWriter.java | 2 +- .../xjc/generator/bean/BeanGenerator.java | 7 +- .../bean/DualObjectFactoryGenerator.java | 3 +- .../bean/MessageBundle_de.properties | 39 + .../bean/MessageBundle_es.properties | 39 + .../bean/MessageBundle_fr.properties | 39 + .../bean/MessageBundle_it.properties | 39 + .../bean/MessageBundle_ja.properties | 39 + .../bean/MessageBundle_ko.properties | 39 + .../bean/MessageBundle_pt_BR.properties | 39 + .../bean/MessageBundle_zh_CN.properties | 39 + .../bean/MessageBundle_zh_TW.properties | 39 + .../bean/field/AbstractFieldWithVar.java | 1 - .../bean/field/MessageBundle_de.properties | 28 + .../bean/field/MessageBundle_es.properties | 28 + .../bean/field/MessageBundle_fr.properties | 28 + .../bean/field/MessageBundle_it.properties | 28 + .../bean/field/MessageBundle_ja.properties | 28 + .../bean/field/MessageBundle_ko.properties | 28 + .../bean/field/MessageBundle_pt_BR.properties | 28 + .../bean/field/MessageBundle_zh_CN.properties | 28 + .../bean/field/MessageBundle_zh_TW.properties | 28 + .../tools/internal/xjc/model/CArrayInfo.java | 4 +- .../internal/xjc/model/CBuiltinLeafInfo.java | 108 ++- .../internal/xjc/model/CPropertyInfo.java | 15 +- .../tools/internal/xjc/model/CTypeInfo.java | 3 - .../internal/xjc/model/nav/NavigatorImpl.java | 9 +- .../xjc/reader/MessageBundle_de.properties | 58 ++ .../xjc/reader/MessageBundle_es.properties | 58 ++ .../xjc/reader/MessageBundle_fr.properties | 58 ++ .../xjc/reader/MessageBundle_it.properties | 58 ++ .../xjc/reader/MessageBundle_ja.properties | 58 ++ .../xjc/reader/MessageBundle_ko.properties | 58 ++ .../xjc/reader/MessageBundle_pt_BR.properties | 58 ++ .../xjc/reader/MessageBundle_zh_CN.properties | 58 ++ .../xjc/reader/MessageBundle_zh_TW.properties | 58 ++ .../tools/internal/xjc/reader/TypeUtil.java | 1 - .../reader/dtd/MessageBundle_de.properties | 38 + .../reader/dtd/MessageBundle_es.properties | 38 + .../reader/dtd/MessageBundle_fr.properties | 38 + .../reader/dtd/MessageBundle_it.properties | 38 + .../reader/dtd/MessageBundle_ja.properties | 38 + .../reader/dtd/MessageBundle_ko.properties | 38 + .../reader/dtd/MessageBundle_pt_BR.properties | 38 + .../reader/dtd/MessageBundle_zh_CN.properties | 38 + .../reader/dtd/MessageBundle_zh_TW.properties | 38 + .../reader/dtd/bindinfo/BIUserConversion.java | 15 +- .../xjc/reader/dtd/bindinfo/BindInfo.java | 10 +- .../xjc/reader/dtd/bindinfo/DOMBuilder.java | 8 +- .../dtd/bindinfo/MessageBundle_de.properties | 26 + .../dtd/bindinfo/MessageBundle_es.properties | 26 + .../dtd/bindinfo/MessageBundle_fr.properties | 26 + .../dtd/bindinfo/MessageBundle_it.properties | 26 + .../dtd/bindinfo/MessageBundle_ja.properties | 26 + .../dtd/bindinfo/MessageBundle_ko.properties | 26 + .../bindinfo/MessageBundle_pt_BR.properties | 26 + .../bindinfo/MessageBundle_zh_CN.properties | 26 + .../bindinfo/MessageBundle_zh_TW.properties | 26 + .../AbstractReferenceFinderImpl.java | 8 +- .../xjc/reader/internalizer/DOMForest.java | 54 +- .../xjc/reader/internalizer/Internalizer.java | 19 +- .../internalizer/MessageBundle_de.properties | 82 ++ .../internalizer/MessageBundle_es.properties | 82 ++ .../internalizer/MessageBundle_fr.properties | 82 ++ .../internalizer/MessageBundle_it.properties | 82 ++ .../internalizer/MessageBundle_ja.properties | 82 ++ .../internalizer/MessageBundle_ko.properties | 82 ++ .../MessageBundle_pt_BR.properties | 82 ++ .../MessageBundle_zh_CN.properties | 82 ++ .../MessageBundle_zh_TW.properties | 82 ++ .../internalizer/SCDBasedBindingSet.java | 4 +- .../xjc/reader/xmlschema/BGMBuilder.java | 11 +- .../xmlschema/MessageBundle_de.properties | 131 ++++ .../xmlschema/MessageBundle_es.properties | 131 ++++ .../xmlschema/MessageBundle_fr.properties | 131 ++++ .../xmlschema/MessageBundle_it.properties | 131 ++++ .../xmlschema/MessageBundle_ja.properties | 131 ++++ .../xmlschema/MessageBundle_ko.properties | 131 ++++ .../xmlschema/MessageBundle_pt_BR.properties | 131 ++++ .../xmlschema/MessageBundle_zh_CN.properties | 131 ++++ .../xmlschema/MessageBundle_zh_TW.properties | 131 ++++ .../reader/xmlschema/SimpleTypeBuilder.java | 14 +- .../bindinfo/AnnotationParserFactoryImpl.java | 2 +- .../reader/xmlschema/bindinfo/BindInfo.java | 65 +- .../xmlschema/bindinfo/DomHandlerEx.java | 8 +- .../bindinfo/MessageBundle_de.properties | 45 ++ .../bindinfo/MessageBundle_es.properties | 45 ++ .../bindinfo/MessageBundle_fr.properties | 45 ++ .../bindinfo/MessageBundle_it.properties | 45 ++ .../bindinfo/MessageBundle_ja.properties | 45 ++ .../bindinfo/MessageBundle_ko.properties | 45 ++ .../bindinfo/MessageBundle_pt_BR.properties | 45 ++ .../bindinfo/MessageBundle_zh_CN.properties | 45 ++ .../bindinfo/MessageBundle_zh_TW.properties | 45 ++ .../xmlschema/ct/MessageBundle_de.properties | 26 + .../xmlschema/ct/MessageBundle_es.properties | 26 + .../xmlschema/ct/MessageBundle_fr.properties | 26 + .../xmlschema/ct/MessageBundle_it.properties | 26 + .../xmlschema/ct/MessageBundle_ja.properties | 26 + .../xmlschema/ct/MessageBundle_ko.properties | 26 + .../ct/MessageBundle_pt_BR.properties | 26 + .../ct/MessageBundle_zh_CN.properties | 26 + .../ct/MessageBundle_zh_TW.properties | 26 + .../parser/MessageBundle_de.properties | 40 + .../parser/MessageBundle_es.properties | 40 + .../parser/MessageBundle_fr.properties | 40 + .../parser/MessageBundle_it.properties | 40 + .../parser/MessageBundle_ja.properties | 40 + .../parser/MessageBundle_ko.properties | 40 + .../parser/MessageBundle_pt_BR.properties | 40 + .../parser/MessageBundle_zh_CN.properties | 40 + .../parser/MessageBundle_zh_TW.properties | 40 + .../parser/SchemaConstraintChecker.java | 11 +- .../sun/tools/internal/xjc/util/DOMUtils.java | 21 +- .../xjc/util/MessageBundle_de.properties | 40 + .../xjc/util/MessageBundle_es.properties | 40 + .../xjc/util/MessageBundle_fr.properties | 40 + .../xjc/util/MessageBundle_it.properties | 40 + .../xjc/util/MessageBundle_ja.properties | 40 + .../xjc/util/MessageBundle_ko.properties | 40 + .../xjc/util/MessageBundle_pt_BR.properties | 40 + .../xjc/util/MessageBundle_zh_CN.properties | 40 + .../xjc/util/MessageBundle_zh_TW.properties | 40 + .../com/sun/tools/internal/xjc/util/Util.java | 2 +- .../internal/bind/DatatypeConverterImpl.java | 243 +++++- .../bind/InternalAccessorFactory.java | 6 +- .../com/sun/xml/internal/bind/Util.java | 5 +- .../internal/bind/WhiteSpaceProcessor.java | 6 +- .../xml/internal/bind/api/JAXBRIContext.java | 37 +- .../internal/bind/api/Messages_de.properties | 26 + .../internal/bind/api/Messages_es.properties | 26 + .../internal/bind/api/Messages_fr.properties | 26 + .../internal/bind/api/Messages_it.properties | 26 + .../internal/bind/api/Messages_ja.properties | 26 + .../internal/bind/api/Messages_ko.properties | 26 + .../bind/api/Messages_pt_BR.properties | 26 + .../bind/api/Messages_zh_CN.properties | 26 + .../bind/api/Messages_zh_TW.properties | 26 + .../internal/bind/api/impl/NameConverter.java | 27 +- .../xml/internal/bind/api/impl/NameUtil.java | 105 +-- .../bind/marshaller/Messages_de.properties | 53 ++ .../bind/marshaller/Messages_es.properties | 53 ++ .../bind/marshaller/Messages_fr.properties | 53 ++ .../bind/marshaller/Messages_it.properties | 53 ++ .../bind/marshaller/Messages_ja.properties | 53 ++ .../bind/marshaller/Messages_ko.properties | 53 ++ .../bind/marshaller/Messages_pt_BR.properties | 53 ++ .../bind/marshaller/Messages_zh_CN.properties | 53 ++ .../bind/marshaller/Messages_zh_TW.properties | 53 ++ .../internal/bind/marshaller/SAX2DOMEx.java | 26 +- .../bind/unmarshaller/Messages_de.properties | 59 ++ .../bind/unmarshaller/Messages_es.properties | 59 ++ .../bind/unmarshaller/Messages_fr.properties | 59 ++ .../bind/unmarshaller/Messages_it.properties | 59 ++ .../bind/unmarshaller/Messages_ja.properties | 59 ++ .../bind/unmarshaller/Messages_ko.properties | 59 ++ .../unmarshaller/Messages_pt_BR.properties | 59 ++ .../unmarshaller/Messages_zh_CN.properties | 59 ++ .../unmarshaller/Messages_zh_TW.properties | 59 ++ .../xml/internal/bind/util/SecureLoader.java | 18 +- .../xml/internal/bind/v2/ClassFactory.java | 2 +- .../xml/internal/bind/v2/ContextFactory.java | 60 +- .../sun/xml/internal/bind/v2/Messages.java | 5 +- .../xml/internal/bind/v2/Messages.properties | 5 +- .../internal/bind/v2/Messages_de.properties | 42 ++ .../internal/bind/v2/Messages_es.properties | 42 ++ .../internal/bind/v2/Messages_fr.properties | 42 ++ .../internal/bind/v2/Messages_it.properties | 42 ++ .../internal/bind/v2/Messages_ja.properties | 42 ++ .../internal/bind/v2/Messages_ko.properties | 42 ++ .../bind/v2/Messages_pt_BR.properties | 42 ++ .../bind/v2/Messages_zh_CN.properties | 42 ++ .../bind/v2/Messages_zh_TW.properties | 42 ++ .../bind/v2/model/annotation/Init.java | 2 +- .../model/annotation/Messages_de.properties | 28 + .../model/annotation/Messages_es.properties | 28 + .../model/annotation/Messages_fr.properties | 28 + .../model/annotation/Messages_it.properties | 28 + .../model/annotation/Messages_ja.properties | 28 + .../model/annotation/Messages_ko.properties | 28 + .../annotation/Messages_pt_BR.properties | 28 + .../annotation/Messages_zh_CN.properties | 28 + .../annotation/Messages_zh_TW.properties | 28 + .../model/annotation/XmlAttributeQuick.java | 2 +- .../model/annotation/XmlElementDeclQuick.java | 2 +- .../v2/model/annotation/XmlElementQuick.java | 2 +- .../model/annotation/XmlElementRefQuick.java | 2 +- .../model/annotation/XmlElementRefsQuick.java | 2 +- .../v2/model/annotation/XmlEnumQuick.java | 2 +- .../model/annotation/XmlRootElementQuick.java | 2 +- .../v2/model/annotation/XmlSchemaQuick.java | 2 +- .../model/annotation/XmlSchemaTypeQuick.java | 2 +- .../model/annotation/XmlTransientQuick.java | 2 +- .../v2/model/annotation/XmlTypeQuick.java | 2 +- .../v2/model/annotation/XmlValueQuick.java | 2 +- .../bind/v2/model/core/ErrorHandler.java | 9 +- .../bind/v2/model/core/PropertyInfo.java | 2 +- .../bind/v2/model/core/PropertyKind.java | 5 +- .../xml/internal/bind/v2/model/core/Ref.java | 6 +- .../bind/v2/model/core/RegistryInfo.java | 4 +- .../bind/v2/model/impl/ArrayInfoImpl.java | 18 +- .../bind/v2/model/impl/Messages_de.properties | 152 ++++ .../bind/v2/model/impl/Messages_es.properties | 152 ++++ .../bind/v2/model/impl/Messages_fr.properties | 152 ++++ .../bind/v2/model/impl/Messages_it.properties | 152 ++++ .../bind/v2/model/impl/Messages_ja.properties | 152 ++++ .../bind/v2/model/impl/Messages_ko.properties | 152 ++++ .../v2/model/impl/Messages_pt_BR.properties | 152 ++++ .../v2/model/impl/Messages_zh_CN.properties | 152 ++++ .../v2/model/impl/Messages_zh_TW.properties | 152 ++++ .../bind/v2/model/impl/ModelBuilder.java | 83 +- .../bind/v2/model/impl/ModelBuilderI.java} | 18 +- .../model/impl/ReferencePropertyInfoImpl.java | 12 +- .../impl/RuntimeBuiltinLeafInfoImpl.java | 7 +- .../v2/model/impl/RuntimeTypeInfoSetImpl.java | 1 - .../v2/model/nav/ParameterizedTypeImpl.java | 5 +- .../v2/model/nav/ReflectionNavigator.java | 14 +- .../bind/v2/model/nav/SecureLoader.java | 18 +- .../v2/model/runtime/RuntimeNonElement.java | 1 - .../v2/model/runtime/RuntimeTypeInfoSet.java | 1 - .../v2/model/util/ArrayInfoUtil.java} | 48 +- .../bind/v2/runtime/ClassBeanInfoImpl.java | 21 +- .../bind/v2/runtime/JAXBContextImpl.java | 37 +- .../bind/v2/runtime/LeafBeanInfoImpl.java | 7 +- .../bind/v2/runtime/MarshallerImpl.java | 4 +- .../bind/v2/runtime/Messages_de.properties | 83 ++ .../bind/v2/runtime/Messages_es.properties | 83 ++ .../bind/v2/runtime/Messages_fr.properties | 83 ++ .../bind/v2/runtime/Messages_it.properties | 83 ++ .../bind/v2/runtime/Messages_ja.properties | 83 ++ .../bind/v2/runtime/Messages_ko.properties | 83 ++ .../bind/v2/runtime/Messages_pt_BR.properties | 83 ++ .../bind/v2/runtime/Messages_zh_CN.properties | 83 ++ .../bind/v2/runtime/Messages_zh_TW.properties | 83 ++ .../internal/bind/v2/runtime/RuntimeUtil.java | 13 +- .../bind/v2/runtime/SwaRefAdapterMarker.java | 45 ++ .../bind/v2/runtime/XMLSerializer.java | 6 +- .../runtime/property/ListElementProperty.java | 11 +- .../runtime/property/Messages_de.properties | 29 + .../runtime/property/Messages_es.properties | 29 + .../runtime/property/Messages_fr.properties | 29 + .../runtime/property/Messages_it.properties | 29 + .../runtime/property/Messages_ja.properties | 29 + .../runtime/property/Messages_ko.properties | 29 + .../property/Messages_pt_BR.properties | 29 + .../property/Messages_zh_CN.properties | 29 + .../property/Messages_zh_TW.properties | 29 + .../property/SingleElementLeafProperty.java | 58 +- .../property/SingleMapNodeProperty.java | 7 +- .../bind/v2/runtime/reflect/Accessor.java | 13 +- .../bind/v2/runtime/reflect/Lister.java | 6 +- .../v2/runtime/reflect/Messages_de.properties | 33 + .../v2/runtime/reflect/Messages_es.properties | 33 + .../v2/runtime/reflect/Messages_fr.properties | 33 + .../v2/runtime/reflect/Messages_it.properties | 33 + .../v2/runtime/reflect/Messages_ja.properties | 33 + .../v2/runtime/reflect/Messages_ko.properties | 33 + .../runtime/reflect/Messages_pt_BR.properties | 33 + .../runtime/reflect/Messages_zh_CN.properties | 33 + .../runtime/reflect/Messages_zh_TW.properties | 33 + .../runtime/reflect/opt/AccessorInjector.java | 2 +- .../reflect/opt/OptimizedAccessorFactory.java | 2 +- .../v2/runtime/unmarshaller/DomLoader.java | 7 +- .../unmarshaller/Messages_de.properties | 42 ++ .../unmarshaller/Messages_es.properties | 42 ++ .../unmarshaller/Messages_fr.properties | 42 ++ .../unmarshaller/Messages_it.properties | 42 ++ .../unmarshaller/Messages_ja.properties | 42 ++ .../unmarshaller/Messages_ko.properties | 42 ++ .../unmarshaller/Messages_pt_BR.properties | 42 ++ .../unmarshaller/Messages_zh_CN.properties | 42 ++ .../unmarshaller/Messages_zh_TW.properties | 42 ++ .../unmarshaller/UnmarshallerImpl.java | 139 ++-- .../bind/v2/schemagen/Messages_de.properties | 26 + .../bind/v2/schemagen/Messages_es.properties | 26 + .../bind/v2/schemagen/Messages_fr.properties | 26 + .../bind/v2/schemagen/Messages_it.properties | 26 + .../bind/v2/schemagen/Messages_ja.properties | 26 + .../bind/v2/schemagen/Messages_ko.properties | 26 + .../v2/schemagen/Messages_pt_BR.properties | 26 + .../v2/schemagen/Messages_zh_CN.properties | 26 + .../v2/schemagen/Messages_zh_TW.properties | 26 + .../bind/v2/schemagen/XmlSchemaGenerator.java | 8 +- .../v2/schemagen/xmlschema/Annotated.java | 2 +- .../v2/schemagen/xmlschema/Annotation.java | 2 +- .../bind/v2/schemagen/xmlschema/Any.java | 2 +- .../bind/v2/schemagen/xmlschema/Appinfo.java | 2 +- .../v2/schemagen/xmlschema/AttrDecls.java | 2 +- .../v2/schemagen/xmlschema/AttributeType.java | 2 +- .../schemagen/xmlschema/ComplexContent.java | 2 +- .../schemagen/xmlschema/ComplexExtension.java | 2 +- .../xmlschema/ComplexRestriction.java | 2 +- .../v2/schemagen/xmlschema/ComplexType.java | 2 +- .../schemagen/xmlschema/ComplexTypeHost.java | 2 +- .../schemagen/xmlschema/ComplexTypeModel.java | 2 +- .../v2/schemagen/xmlschema/Documentation.java | 2 +- .../bind/v2/schemagen/xmlschema/Element.java | 2 +- .../v2/schemagen/xmlschema/ExplicitGroup.java | 2 +- .../v2/schemagen/xmlschema/ExtensionType.java | 2 +- .../schemagen/xmlschema/FixedOrDefault.java | 2 +- .../bind/v2/schemagen/xmlschema/Import.java | 2 +- .../bind/v2/schemagen/xmlschema/List.java | 2 +- .../schemagen/xmlschema/LocalAttribute.java | 2 +- .../v2/schemagen/xmlschema/LocalElement.java | 2 +- .../schemagen/xmlschema/NestedParticle.java | 2 +- .../v2/schemagen/xmlschema/NoFixedFacet.java | 2 +- .../bind/v2/schemagen/xmlschema/Occurs.java | 2 +- .../v2/schemagen/xmlschema/Redefinable.java | 2 +- .../bind/v2/schemagen/xmlschema/Schema.java | 2 +- .../v2/schemagen/xmlschema/SchemaTop.java | 2 +- .../v2/schemagen/xmlschema/SimpleContent.java | 2 +- .../schemagen/xmlschema/SimpleDerivation.java | 2 +- .../schemagen/xmlschema/SimpleExtension.java | 2 +- .../xmlschema/SimpleRestriction.java | 2 +- .../xmlschema/SimpleRestrictionModel.java | 2 +- .../v2/schemagen/xmlschema/SimpleType.java | 2 +- .../schemagen/xmlschema/SimpleTypeHost.java | 2 +- .../xmlschema/TopLevelAttribute.java | 2 +- .../schemagen/xmlschema/TopLevelElement.java | 2 +- .../schemagen/xmlschema/TypeDefParticle.java | 2 +- .../bind/v2/schemagen/xmlschema/TypeHost.java | 2 +- .../bind/v2/schemagen/xmlschema/Union.java | 2 +- .../bind/v2/schemagen/xmlschema/Wildcard.java | 2 +- .../v2/schemagen/xmlschema/package-info.java | 2 +- .../xml/internal/bind/v2/util/XmlFactory.java | 189 +++++ .../messaging/saaj/SOAPExceptionImpl.java | 2 +- .../saaj/client/p2p/HttpSOAPConnection.java | 67 +- .../client/p2p/HttpSOAPConnectionFactory.java | 2 +- .../saaj/client/p2p/LocalStrings.properties | 2 +- .../client/p2p/LocalStrings_de.properties | 58 ++ .../client/p2p/LocalStrings_es.properties | 58 ++ .../client/p2p/LocalStrings_fr.properties | 58 ++ .../client/p2p/LocalStrings_it.properties | 58 ++ .../client/p2p/LocalStrings_ja.properties | 58 ++ .../client/p2p/LocalStrings_ko.properties | 58 ++ .../client/p2p/LocalStrings_pt_BR.properties | 58 ++ .../client/p2p/LocalStrings_zh_CN.properties | 58 ++ .../client/p2p/LocalStrings_zh_TW.properties | 58 ++ .../messaging/saaj/packaging/mime/Header.java | 2 +- .../packaging/mime/MessagingException.java | 2 +- .../packaging/mime/MultipartDataSource.java | 2 +- .../mime/internet/BMMimeMultipart.java | 2 +- .../mime/internet/ContentDisposition.java | 2 +- .../packaging/mime/internet/ContentType.java | 2 +- .../mime/internet/HeaderTokenizer.java | 2 +- .../mime/internet/InternetHeaders.java | 2 +- .../packaging/mime/internet/MimeBodyPart.java | 2 +- .../mime/internet/MimeMultipart.java | 6 +- .../mime/internet/MimePartDataSource.java | 2 +- .../mime/internet/MimePullMultipart.java | 2 +- .../packaging/mime/internet/MimeUtility.java | 2 +- .../mime/internet/ParameterList.java | 4 +- .../mime/internet/ParseException.java | 2 +- .../mime/internet/SharedInputStream.java | 2 +- .../packaging/mime/internet/UniqueValue.java | 2 +- .../packaging/mime/util/ASCIIUtility.java | 2 +- .../mime/util/BASE64DecoderStream.java | 2 +- .../mime/util/BASE64EncoderStream.java | 2 +- .../packaging/mime/util/BEncoderStream.java | 2 +- .../packaging/mime/util/LineInputStream.java | 2 +- .../saaj/packaging/mime/util/OutputUtil.java | 2 +- .../packaging/mime/util/QDecoderStream.java | 2 +- .../packaging/mime/util/QEncoderStream.java | 2 +- .../packaging/mime/util/QPDecoderStream.java | 2 +- .../packaging/mime/util/QPEncoderStream.java | 2 +- .../packaging/mime/util/UUDecoderStream.java | 2 +- .../packaging/mime/util/UUEncoderStream.java | 2 +- .../saaj/soap/AttachmentPartImpl.java | 15 +- .../messaging/saaj/soap/Envelope.java | 2 +- .../messaging/saaj/soap/EnvelopeFactory.java | 2 +- .../soap/FastInfosetDataContentHandler.java | 4 +- .../saaj/soap/GifDataContentHandler.java | 2 +- .../saaj/soap/ImageDataContentHandler.java | 2 +- .../saaj/soap/JpegDataContentHandler.java | 6 +- .../saaj/soap/LocalStrings.properties | 2 +- .../saaj/soap/LocalStrings_de.properties | 110 +++ .../saaj/soap/LocalStrings_es.properties | 110 +++ .../saaj/soap/LocalStrings_fr.properties | 110 +++ .../saaj/soap/LocalStrings_it.properties | 110 +++ .../saaj/soap/LocalStrings_ja.properties | 110 +++ .../saaj/soap/LocalStrings_ko.properties | 110 +++ .../saaj/soap/LocalStrings_pt_BR.properties | 110 +++ .../saaj/soap/LocalStrings_zh_CN.properties | 110 +++ .../saaj/soap/LocalStrings_zh_TW.properties | 110 +++ .../saaj/soap/MessageFactoryImpl.java | 2 +- .../messaging/saaj/soap/MessageImpl.java | 2 +- .../soap/MultipartDataContentHandler.java | 2 +- .../saaj/soap/SAAJMetaFactoryImpl.java | 2 +- .../messaging/saaj/soap/SOAPDocument.java | 2 +- .../saaj/soap/SOAPDocumentFragment.java | 2 +- .../messaging/saaj/soap/SOAPDocumentImpl.java | 2 +- .../messaging/saaj/soap/SOAPFactoryImpl.java | 2 +- .../messaging/saaj/soap/SOAPIOException.java | 2 +- .../messaging/saaj/soap/SOAPPartImpl.java | 2 +- .../soap/SOAPVersionMismatchException.java | 2 +- .../saaj/soap/StringDataContentHandler.java | 2 +- .../saaj/soap/XmlDataContentHandler.java | 4 +- .../soap/dynamic/SOAPFactoryDynamicImpl.java | 2 +- .../SOAPMessageFactoryDynamicImpl.java | 2 +- .../saaj/soap/impl/BodyElementImpl.java | 2 +- .../messaging/saaj/soap/impl/BodyImpl.java | 2 +- .../messaging/saaj/soap/impl/CDATAImpl.java | 2 +- .../messaging/saaj/soap/impl/CommentImpl.java | 2 +- .../saaj/soap/impl/DetailEntryImpl.java | 2 +- .../messaging/saaj/soap/impl/DetailImpl.java | 2 +- .../saaj/soap/impl/ElementFactory.java | 2 +- .../messaging/saaj/soap/impl/ElementImpl.java | 29 +- .../saaj/soap/impl/EnvelopeImpl.java | 17 +- .../saaj/soap/impl/FaultElementImpl.java | 2 +- .../messaging/saaj/soap/impl/FaultImpl.java | 2 +- .../saaj/soap/impl/HeaderElementImpl.java | 2 +- .../messaging/saaj/soap/impl/HeaderImpl.java | 2 +- .../saaj/soap/impl/LocalStrings.properties | 2 +- .../saaj/soap/impl/LocalStrings_de.properties | 86 +++ .../saaj/soap/impl/LocalStrings_es.properties | 86 +++ .../saaj/soap/impl/LocalStrings_fr.properties | 86 +++ .../saaj/soap/impl/LocalStrings_it.properties | 86 +++ .../saaj/soap/impl/LocalStrings_ja.properties | 86 +++ .../saaj/soap/impl/LocalStrings_ko.properties | 86 +++ .../soap/impl/LocalStrings_pt_BR.properties | 86 +++ .../soap/impl/LocalStrings_zh_CN.properties | 86 +++ .../soap/impl/LocalStrings_zh_TW.properties | 86 +++ .../messaging/saaj/soap/impl/TextImpl.java | 2 +- .../saaj/soap/impl/TreeException.java | 2 +- .../saaj/soap/name/LocalStrings.properties | 2 +- .../saaj/soap/name/LocalStrings_de.properties | 30 + .../saaj/soap/name/LocalStrings_es.properties | 30 + .../saaj/soap/name/LocalStrings_fr.properties | 30 + .../saaj/soap/name/LocalStrings_it.properties | 30 + .../saaj/soap/name/LocalStrings_ja.properties | 30 + .../saaj/soap/name/LocalStrings_ko.properties | 30 + .../soap/name/LocalStrings_pt_BR.properties | 30 + .../soap/name/LocalStrings_zh_CN.properties | 30 + .../soap/name/LocalStrings_zh_TW.properties | 30 + .../messaging/saaj/soap/name/NameImpl.java | 6 +- .../saaj/soap/ver1_1/Body1_1Impl.java | 2 +- .../saaj/soap/ver1_1/BodyElement1_1Impl.java | 2 +- .../saaj/soap/ver1_1/Detail1_1Impl.java | 2 +- .../saaj/soap/ver1_1/DetailEntry1_1Impl.java | 2 +- .../saaj/soap/ver1_1/Envelope1_1Impl.java | 2 +- .../saaj/soap/ver1_1/Fault1_1Impl.java | 2 +- .../saaj/soap/ver1_1/FaultElement1_1Impl.java | 2 +- .../saaj/soap/ver1_1/Header1_1Impl.java | 2 +- .../soap/ver1_1/HeaderElement1_1Impl.java | 2 +- .../saaj/soap/ver1_1/LocalStrings.properties | 2 +- .../soap/ver1_1/LocalStrings_de.properties | 36 + .../soap/ver1_1/LocalStrings_es.properties | 36 + .../soap/ver1_1/LocalStrings_fr.properties | 36 + .../soap/ver1_1/LocalStrings_it.properties | 36 + .../soap/ver1_1/LocalStrings_ja.properties | 36 + .../soap/ver1_1/LocalStrings_ko.properties | 36 + .../soap/ver1_1/LocalStrings_pt_BR.properties | 36 + .../soap/ver1_1/LocalStrings_zh_CN.properties | 36 + .../soap/ver1_1/LocalStrings_zh_TW.properties | 36 + .../saaj/soap/ver1_1/Message1_1Impl.java | 2 +- .../saaj/soap/ver1_1/SOAPFactory1_1Impl.java | 2 +- .../ver1_1/SOAPMessageFactory1_1Impl.java | 12 +- .../saaj/soap/ver1_1/SOAPPart1_1Impl.java | 2 +- .../saaj/soap/ver1_2/Body1_2Impl.java | 2 +- .../saaj/soap/ver1_2/BodyElement1_2Impl.java | 2 +- .../saaj/soap/ver1_2/Detail1_2Impl.java | 2 +- .../saaj/soap/ver1_2/DetailEntry1_2Impl.java | 2 +- .../saaj/soap/ver1_2/Envelope1_2Impl.java | 2 +- .../saaj/soap/ver1_2/Fault1_2Impl.java | 2 +- .../saaj/soap/ver1_2/FaultElement1_2Impl.java | 2 +- .../saaj/soap/ver1_2/Header1_2Impl.java | 2 +- .../soap/ver1_2/HeaderElement1_2Impl.java | 2 +- .../saaj/soap/ver1_2/LocalStrings.properties | 2 +- .../soap/ver1_2/LocalStrings_de.properties | 56 ++ .../soap/ver1_2/LocalStrings_es.properties | 56 ++ .../soap/ver1_2/LocalStrings_fr.properties | 56 ++ .../soap/ver1_2/LocalStrings_it.properties | 56 ++ .../soap/ver1_2/LocalStrings_ja.properties | 56 ++ .../soap/ver1_2/LocalStrings_ko.properties | 56 ++ .../soap/ver1_2/LocalStrings_pt_BR.properties | 56 ++ .../soap/ver1_2/LocalStrings_zh_CN.properties | 56 ++ .../soap/ver1_2/LocalStrings_zh_TW.properties | 56 ++ .../saaj/soap/ver1_2/Message1_2Impl.java | 2 +- .../saaj/soap/ver1_2/SOAPFactory1_2Impl.java | 2 +- .../ver1_2/SOAPMessageFactory1_2Impl.java | 12 +- .../saaj/soap/ver1_2/SOAPPart1_2Impl.java | 2 +- .../internal/messaging/saaj/util/Base64.java | 2 +- .../messaging/saaj/util/ByteInputStream.java | 2 +- .../messaging/saaj/util/ByteOutputStream.java | 2 +- .../messaging/saaj/util/CharReader.java | 2 +- .../messaging/saaj/util/CharWriter.java | 2 +- .../saaj/util/FastInfosetReflection.java | 2 +- .../messaging/saaj/util/FinalArrayList.java | 2 +- .../messaging/saaj/util/JAXMStreamSource.java | 2 +- .../internal/messaging/saaj/util/JaxmURI.java | 9 +- .../saaj/util/LocalStrings.properties | 2 +- .../saaj/util/LocalStrings_de.properties | 33 + .../saaj/util/LocalStrings_es.properties | 33 + .../saaj/util/LocalStrings_fr.properties | 33 + .../saaj/util/LocalStrings_it.properties | 33 + .../saaj/util/LocalStrings_ja.properties | 33 + .../saaj/util/LocalStrings_ko.properties | 33 + .../saaj/util/LocalStrings_pt_BR.properties | 33 + .../saaj/util/LocalStrings_zh_CN.properties | 33 + .../saaj/util/LocalStrings_zh_TW.properties | 33 + .../saaj/util/LogDomainConstants.java | 2 +- .../messaging/saaj/util/MimeHeadersUtil.java | 2 +- .../saaj/util/NamespaceContextIterator.java | 2 +- .../messaging/saaj/util/ParseUtil.java | 2 +- .../messaging/saaj/util/ParserPool.java | 2 +- .../saaj/util/RejectDoctypeSaxFilter.java | 4 +- .../messaging/saaj/util/SAAJUtil.java | 2 +- .../messaging/saaj/util/TeeInputStream.java | 2 +- .../saaj/util/XMLDeclarationParser.java | 2 +- .../EfficientStreamingTransformer.java | 2 +- .../org/jvnet/mimepull/ASCIIUtility.java | 118 +++ .../jvnet/mimepull/BASE64DecoderStream.java | 485 ++++++++++++ .../internal/org/jvnet/mimepull/Chunk.java | 2 +- .../org/jvnet/mimepull/ChunkInputStream.java | 11 +- .../mimepull/CleanUpExecutorFactory.java | 2 +- .../xml/internal/org/jvnet/mimepull/Data.java | 2 +- .../internal/org/jvnet/mimepull/DataFile.java | 2 +- .../internal/org/jvnet/mimepull/DataHead.java | 28 +- .../org/jvnet/mimepull/DecodingException.java | 47 ++ .../org/jvnet/mimepull/FactoryFinder.java | 38 +- .../internal/org/jvnet/mimepull/FileData.java | 6 +- .../org/jvnet/mimepull/FinalArrayList.java | 2 +- .../internal/org/jvnet/mimepull/Header.java | 2 +- .../org/jvnet/mimepull/InternetHeaders.java | 37 +- .../org/jvnet/mimepull/LineInputStream.java | 140 ++++ .../org/jvnet/mimepull/MIMEConfig.java | 20 +- .../org/jvnet/mimepull/MIMEEvent.java | 2 +- .../org/jvnet/mimepull/MIMEMessage.java | 25 +- .../org/jvnet/mimepull/MIMEParser.java | 36 +- .../jvnet/mimepull/MIMEParsingException.java | 2 +- .../internal/org/jvnet/mimepull/MIMEPart.java | 57 +- .../org/jvnet/mimepull/MemoryData.java | 9 +- .../org/jvnet/mimepull/MimeUtility.java | 171 +++++ .../internal/org/jvnet/mimepull/PropUtil.java | 110 +++ .../org/jvnet/mimepull/QPDecoderStream.java | 207 +++++ .../org/jvnet/mimepull/UUDecoderStream.java | 357 +++++++++ .../org/jvnet/mimepull/WeakDataFile.java | 43 +- .../internal/org/jvnet/staxex/Base64Data.java | 57 +- .../org/jvnet/staxex/XMLStreamReaderEx.java | 4 +- .../databinding/DatabindingModeFeature.java | 77 -- .../org/jvnet/ws/message/ContentType.java | 59 -- .../ws/message/DistributedPropertySet.java | 77 -- .../org/jvnet/ws/message/MessageContext.java | 115 --- .../org/jvnet/ws/message/PropertySet.java | 116 --- .../stream/buffer/AbstractCreator.java | 4 +- .../stream/buffer/sax/SAXBufferProcessor.java | 16 +- .../buffer/stax/NamespaceContexHelper.java | 13 +- .../stax/StreamReaderBufferProcessor.java | 3 +- .../stax/StreamWriterBufferProcessor.java | 15 +- .../com/sun/xml/internal/ws/Closeable.java | 2 +- .../ws/addressing/EPRSDDocumentFilter.java | 3 +- .../ws/addressing/EndpointReferenceUtil.java | 61 +- .../internal/ws/addressing/ProblemAction.java | 2 +- .../ws/addressing/ProblemHeaderQName.java | 2 +- .../ws/addressing/W3CAddressingConstants.java | 2 +- .../W3CAddressingMetadataConstants.java | 2 +- .../ws/addressing/W3CWsaClientTube.java | 5 +- .../ws/addressing/W3CWsaServerTube.java | 57 +- .../ws/addressing/WSEPRExtension.java | 2 +- .../internal/ws/addressing/WsaActionUtil.java | 15 +- .../internal/ws/addressing/WsaClientTube.java | 12 +- .../ws/addressing/WsaPropertyBag.java | 10 +- .../internal/ws/addressing/WsaServerTube.java | 88 ++- .../xml/internal/ws/addressing/WsaTube.java | 34 +- .../internal/ws/addressing/WsaTubeHelper.java | 117 +-- .../ws/addressing/WsaTubeHelperImpl.java | 2 +- .../model/ActionNotSupportedException.java | 2 +- .../InvalidAddressingHeaderException.java | 2 +- .../MissingAddressingHeaderException.java | 2 +- .../policy/AddressingFeatureConfigurator.java | 2 +- .../AddressingPolicyMapConfigurator.java | 2 +- .../policy/AddressingPolicyValidator.java | 2 +- .../policy/AddressingPrefixMapper.java | 2 +- .../MemberSubmissionAddressingConstants.java | 7 +- .../MemberSubmissionWsaClientTube.java | 5 +- .../MemberSubmissionWsaServerTube.java | 2 +- .../ws/addressing/v200408/ProblemAction.java | 2 +- .../v200408/ProblemHeaderQName.java | 2 +- .../addressing/v200408/WsaTubeHelperImpl.java | 2 +- .../sun/xml/internal/ws/api/BindingID.java | 23 +- .../xml/internal/ws/api/BindingIDFactory.java | 25 +- .../sun/xml/internal/ws/api/Cancelable.java | 2 +- .../sun/xml/internal/ws/api/Component.java | 3 +- .../sun/xml/internal/ws/api/ComponentEx.java | 4 +- .../xml/internal/ws/api/ComponentFeature.java | 5 +- .../internal/ws/api/ComponentRegistry.java | 4 +- .../internal/ws/api/ComponentsFeature.java | 74 ++ .../ws/api/DistributedPropertySet.java | 163 +--- .../xml/internal/ws/api/EndpointAddress.java | 6 +- .../internal/ws/api/FeatureConstructor.java | 2 +- .../internal/ws/api/FeatureListValidator.java | 54 ++ .../api/FeatureListValidatorAnnotation.java | 51 ++ .../ws/api/ImpliesWebServiceFeature.java | 3 +- .../sun/xml/internal/ws/api/PropertySet.java | 288 +------ .../xml/internal/ws/api/ResourceLoader.java | 2 +- .../sun/xml/internal/ws/api/SOAPVersion.java | 6 +- .../ws/api/ServiceSharedFeatureMarker.java | 2 +- .../sun/xml/internal/ws/api/WSBinding.java | 22 +- .../sun/xml/internal/ws/api/WSDLLocator.java | 2 +- .../xml/internal/ws/api/WSFeatureList.java | 2 +- .../sun/xml/internal/ws/api/WSService.java | 8 +- .../ws/api/WebServiceFeatureFactory.java | 2 +- .../api/addressing/AddressingPropertySet.java | 82 ++ .../ws/api/addressing/AddressingVersion.java | 2 +- .../internal/ws/api/addressing/EPRHeader.java | 25 +- .../NonAnonymousResponseProcessor.java | 2 +- .../ws/api/addressing/OneWayFeature.java | 21 +- .../OutboundReferenceParameterHeader.java | 130 ++-- .../api/addressing/WSEndpointReference.java | 134 +++- .../ws/api/addressing/package-info.java | 2 +- .../ws/api/client/ClientPipelineHook.java | 2 +- .../client/SelectOptimalEncodingFeature.java | 4 +- .../ws/api/client/ServiceInterceptor.java | 2 +- .../api/client/ServiceInterceptorFactory.java | 2 +- .../ThrowableInPacketCompletionFeature.java} | 45 +- .../internal/ws/api/client/WSPortInfo.java | 2 +- .../EndpointCreationAttributes.java | 2 +- .../management/ManagedEndpointFactory.java | 2 +- .../api/config/management/Reconfigurable.java | 2 +- .../policy/ManagedClientAssertion.java | 2 +- .../policy/ManagedServiceAssertion.java | 2 +- .../policy/ManagementAssertion.java | 2 +- .../ws/api/databinding/ClientCallBridge.java | 3 +- .../ws/api/databinding/Databinding.java | 14 +- .../ws/api/databinding/DatabindingConfig.java | 2 +- .../api/databinding/DatabindingFactory.java | 6 +- .../api/databinding/EndpointCallBridge.java | 3 +- .../ws/api/databinding/JavaCallInfo.java | 4 +- .../ws/api/databinding/MappingInfo.java | 11 +- .../ws/api/databinding/MetadataReader.java | 2 +- .../ws/api/databinding/SoapBodyStyle.java | 2 +- .../ws/api/databinding/WSDLGenInfo.java | 14 +- .../api/fastinfoset/FastInfosetFeature.java | 2 +- .../sun/xml/internal/ws/api/ha/HaInfo.java | 2 +- .../xml/internal/ws/api/ha/StickyFeature.java | 2 +- .../ws/api/handler/MessageHandler.java | 2 +- .../ws/api/handler/MessageHandlerContext.java | 2 +- .../ws/api/message/AddressingUtils.java | 342 +++++++++ .../internal/ws/api/message/Attachment.java | 15 +- .../internal/ws/api/message/AttachmentEx.java | 2 +- .../ws/api/message/AttachmentSet.java | 2 +- .../ws/api/message/ExceptionHasMessage.java | 4 +- .../ws/api/message/FilterMessageImpl.java | 8 +- .../xml/internal/ws/api/message/Header.java | 2 +- .../internal/ws/api/message/HeaderList.java | 528 ++++++------- .../xml/internal/ws/api/message/Headers.java | 2 +- .../xml/internal/ws/api/message/Message.java | 58 +- .../ws/api/message/MessageContextFactory.java | 99 ++- .../ws/api/message/MessageHeaders.java | 123 +++ .../ws/api/message/MessageMetadata.java} | 21 +- .../ws/api/message/MessageWrapper.java | 245 ++++++ .../ws/api/message/MessageWritable.java | 77 ++ .../xml/internal/ws/api/message/Messages.java | 5 +- .../xml/internal/ws/api/message/Packet.java | 714 ++++++++++++++---- ...ressAutomaticWSARequestHeadersFeature.java | 2 +- .../internal/ws/api/message/package-info.java | 4 +- .../ws/api/message/saaj/SAAJFactory.java | 106 ++- .../api/message/saaj/SAAJMessageHeaders.java | 498 ++++++++++++ .../ws/api/message/saaj/SaajStaxWriter.java | 327 ++++++++ .../message/stream/InputStreamMessage.java | 2 +- .../message/stream/StreamBasedMessage.java | 2 +- .../stream/XMLStreamReaderMessage.java | 2 +- .../ws/api/model/CheckedException.java | 2 +- .../internal/ws/api/model/ExceptionType.java | 2 +- .../xml/internal/ws/api/model/JavaMethod.java | 15 +- .../sun/xml/internal/ws/api/model/MEP.java | 2 +- .../xml/internal/ws/api/model/Parameter.java | 2 +- .../ws/api/model/ParameterBinding.java | 2 +- .../xml/internal/ws/api/model/SEIModel.java | 10 +- .../ws/api/model/WSDLOperationMapping.java | 50 ++ .../ws/api/model/soap/SOAPBinding.java | 2 +- .../ws/api/model/wsdl/WSDLBoundFault.java | 2 +- .../ws/api/model/wsdl/WSDLBoundOperation.java | 2 +- .../ws/api/model/wsdl/WSDLBoundPortType.java | 4 +- .../ws/api/model/wsdl/WSDLDescriptorKind.java | 2 +- .../ws/api/model/wsdl/WSDLExtensible.java | 2 +- .../ws/api/model/wsdl/WSDLExtension.java | 2 +- .../internal/ws/api/model/wsdl/WSDLFault.java | 5 +- .../ws/api/model/wsdl/WSDLFeaturedObject.java | 2 +- .../internal/ws/api/model/wsdl/WSDLInput.java | 4 +- .../ws/api/model/wsdl/WSDLMessage.java | 2 +- .../internal/ws/api/model/wsdl/WSDLModel.java | 2 +- .../ws/api/model/wsdl/WSDLObject.java | 2 +- .../ws/api/model/wsdl/WSDLOperation.java | 2 +- .../ws/api/model/wsdl/WSDLOutput.java | 4 +- .../internal/ws/api/model/wsdl/WSDLPart.java | 2 +- .../ws/api/model/wsdl/WSDLPartDescriptor.java | 2 +- .../internal/ws/api/model/wsdl/WSDLPort.java | 2 +- .../ws/api/model/wsdl/WSDLPortType.java | 2 +- .../ws/api/model/wsdl/WSDLService.java | 2 +- .../sun/xml/internal/ws/api/package-info.java | 2 +- .../api/pipe/ClientPipeAssemblerContext.java | 2 +- .../api/pipe/ClientTubeAssemblerContext.java | 10 +- .../sun/xml/internal/ws/api/pipe/Codec.java | 12 +- .../sun/xml/internal/ws/api/pipe/Codecs.java | 2 +- .../xml/internal/ws/api/pipe/ContentType.java | 6 +- .../sun/xml/internal/ws/api/pipe/Engine.java | 48 +- .../sun/xml/internal/ws/api/pipe/Fiber.java | 691 ++++++++++------- .../pipe/FiberContextSwitchInterceptor.java | 2 +- .../FiberContextSwitchInterceptorFactory.java | 2 +- .../xml/internal/ws/api/pipe/NextAction.java | 54 +- .../sun/xml/internal/ws/api/pipe/Pipe.java | 3 +- .../xml/internal/ws/api/pipe/PipeCloner.java | 2 +- .../internal/ws/api/pipe/PipeClonerImpl.java | 2 +- .../ws/api/pipe/PipelineAssembler.java | 2 +- .../ws/api/pipe/PipelineAssemblerFactory.java | 2 +- .../ws/api/pipe/SOAPBindingCodec.java | 2 +- .../api/pipe/ServerPipeAssemblerContext.java | 2 +- .../api/pipe/ServerTubeAssemblerContext.java | 6 +- .../internal/ws/api/pipe/StreamSOAPCodec.java | 2 +- .../sun/xml/internal/ws/api/pipe/Stubs.java | 8 +- .../ws/api/pipe/SyncStartForAsyncFeature.java | 2 +- .../pipe/ThrowableContainerPropertySet.java | 120 +++ .../ws/api/pipe/TransportPipeFactory.java | 2 +- .../ws/api/pipe/TransportTubeFactory.java | 16 +- .../sun/xml/internal/ws/api/pipe/Tube.java | 3 +- .../xml/internal/ws/api/pipe/TubeCloner.java | 6 +- .../ws/api/pipe/TubelineAssembler.java | 2 +- .../ws/api/pipe/TubelineAssemblerFactory.java | 19 +- .../pipe/helper/AbstractFilterPipeImpl.java | 2 +- .../pipe/helper/AbstractFilterTubeImpl.java | 2 +- .../ws/api/pipe/helper/AbstractPipeImpl.java | 2 +- .../ws/api/pipe/helper/AbstractTubeImpl.java | 22 +- .../ws/api/pipe/helper/PipeAdapter.java | 2 +- .../ws/api/pipe/helper/package-info.java | 4 +- .../internal/ws/api/pipe/package-info.java | 2 +- .../ws/api/policy/AlternativeSelector.java | 2 +- .../ws/api/policy/ModelGenerator.java | 2 +- .../ws/api/policy/ModelTranslator.java | 2 +- .../ws/api/policy/ModelUnmarshaller.java | 3 +- .../ws/api/policy/PolicyResolver.java | 2 +- .../ws/api/policy/PolicyResolverFactory.java | 2 +- .../internal/ws/api/policy/SourceModel.java | 2 +- .../ws/api/policy/ValidationProcessor.java | 2 +- .../ws/api/policy/subject/BindingSubject.java | 2 +- .../api/server/AbstractInstanceResolver.java | 169 +---- .../server/AbstractServerAsyncTransport.java | 6 +- .../xml/internal/ws/api/server/Adapter.java | 2 +- .../internal/ws/api/server/AsyncProvider.java | 2 +- .../ws/api/server/AsyncProviderCallback.java | 2 +- .../internal/ws/api/server/BoundEndpoint.java | 2 +- .../xml/internal/ws/api/server/Container.java | 2 +- .../ws/api/server/ContainerResolver.java | 20 +- .../api/server/DocumentAddressResolver.java | 2 +- .../ws/api/server/EndpointAwareCodec.java | 4 +- .../ws/api/server/EndpointComponent.java | 2 +- .../internal/ws/api/server/EndpointData.java | 2 +- ...EndpointReferenceExtensionContributor.java | 2 +- .../internal/ws/api/server/HttpEndpoint.java | 2 +- .../ws/api/server/InstanceResolver.java | 2 +- .../server/InstanceResolverAnnotation.java | 2 +- .../xml/internal/ws/api/server/Invoker.java | 2 +- .../ws/api/server/LazyMOMProvider.java | 13 +- .../xml/internal/ws/api/server/Module.java | 2 +- .../ws/api/server/PortAddressResolver.java | 2 +- .../server/ProviderInvokerTubeFactory.java | 110 +++ .../ws/api/server/ResourceInjector.java | 2 +- .../internal/ws/api/server/SDDocument.java | 2 +- .../ws/api/server/SDDocumentFilter.java | 2 +- .../ws/api/server/SDDocumentSource.java | 2 +- .../ws/api/server/ServerPipelineHook.java | 2 +- .../ws/api/server/ServiceDefinition.java | 2 +- .../server/ThreadLocalContainerResolver.java | 106 +++ .../ws/api/server/TransportBackChannel.java | 2 +- .../internal/ws/api/server/WSEndpoint.java | 101 ++- .../ws/api/server/WSWebServiceContext.java | 2 +- .../xml/internal/ws/api/server/WebModule.java | 2 +- .../api/server/WebServiceContextDelegate.java | 2 +- .../internal/ws/api/server/package-info.java | 4 +- .../api/streaming/XMLStreamReaderFactory.java | 33 +- .../api/streaming/XMLStreamWriterFactory.java | 2 +- .../ws/api/wsdl/parser/MetaDataResolver.java | 2 +- .../wsdl/parser/MetadataResolverFactory.java | 2 +- .../parser/PolicyWSDLParserExtension.java | 2 +- .../ws/api/wsdl/parser/ServiceDescriptor.java | 2 +- .../api/wsdl/parser/WSDLParserExtension.java | 2 +- .../parser/WSDLParserExtensionContext.java | 2 +- .../ws/api/wsdl/parser/XMLEntityResolver.java | 2 +- .../ws/api/wsdl/parser/package-info.java | 2 +- .../api/wsdl/writer/WSDLGenExtnContext.java | 2 +- .../wsdl/writer/WSDLGeneratorExtension.java | 2 +- .../DefaultClientTubelineAssemblyContext.java | 161 ++++ .../DefaultServerTubelineAssemblyContext.java | 161 ++++ .../ws/assembler/MetroConfigLoader.java | 333 ++++++++ .../ws/assembler/MetroConfigName.java} | 21 +- .../ws/assembler/MetroConfigNameImpl.java | 52 ++ .../ws/assembler/MetroTubelineAssembler.java | 325 ++++++++ .../internal/ws/assembler/TubeCreator.java | 93 +++ .../TubelineAssemblyContextImpl.java | 90 +++ .../assembler/TubelineAssemblyController.java | 135 ++++ .../dev/ClientTubelineAssemblyContext.java | 124 +++ .../dev/ServerTubelineAssemblyContext.java | 132 ++++ .../dev/TubeFactory.java} | 43 +- .../dev/TubelineAssemblyContext.java} | 23 +- .../dev/TubelineAssemblyContextUpdater.java | 50 ++ .../dev/TubelineAssemblyDecorator.java | 176 +++++ .../ws/assembler/jaxws-tubes-default.xml | 59 ++ .../jaxws/AddressingTubeFactory.java | 49 ++ .../jaxws/BasicTransportTubeFactory.java | 51 ++ .../assembler/jaxws/HandlerTubeFactory.java | 49 ++ .../jaxws/MonitoringTubeFactory.java | 49 ++ .../jaxws/MustUnderstandTubeFactory.java | 49 ++ .../assembler/jaxws/TerminalTubeFactory.java | 49 ++ .../jaxws/ValidationTubeFactory.java | 51 ++ .../xml/internal/ws/binding/BindingImpl.java | 51 +- .../internal/ws/binding/FeatureListUtil.java | 2 +- .../internal/ws/binding/HTTPBindingImpl.java | 4 +- .../internal/ws/binding/SOAPBindingImpl.java | 10 +- .../ws/binding/WebServiceFeatureList.java | 78 +- .../xml/internal/ws/client/AsyncInvoker.java | 4 +- .../internal/ws/client/AsyncResponseImpl.java | 2 +- .../ws/client/BindingProviderProperties.java | 2 +- .../internal/ws/client/ClientContainer.java | 5 +- .../ws/client/ClientSchemaValidationTube.java | 2 +- .../ws/client/ClientTransportException.java | 4 +- .../ws/client/ContentNegotiation.java | 6 +- .../ws/client/HandlerConfiguration.java | 12 +- .../ws/client/HandlerConfigurator.java | 7 +- .../internal/ws/client/MonitorRootClient.java | 2 +- .../sun/xml/internal/ws/client/PortInfo.java | 2 +- .../internal/ws/client/RequestContext.java | 357 ++++----- .../internal/ws/client/ResponseContext.java | 2 +- .../ws/client/ResponseContextReceiver.java | 2 +- .../xml/internal/ws/client/SCAnnotations.java | 13 +- .../xml/internal/ws/client/SEIPortInfo.java | 5 +- .../internal/ws/client/SenderException.java | 4 +- .../com/sun/xml/internal/ws/client/Stub.java | 249 ++++-- .../internal/ws/client/WSServiceDelegate.java | 211 ++++-- .../client/dispatch/DataSourceDispatch.java | 4 +- .../ws/client/dispatch/DispatchImpl.java | 154 ++-- .../ws/client/dispatch/JAXBDispatch.java | 2 +- .../ws/client/dispatch/MessageDispatch.java | 2 +- .../ws/client/dispatch/PacketDispatch.java | 17 +- .../client/dispatch/RESTSourceDispatch.java | 2 +- .../client/dispatch/SOAPMessageDispatch.java | 2 +- .../client/dispatch/SOAPSourceDispatch.java | 2 +- .../xml/internal/ws/client/package-info.java | 2 +- .../ws/client/sei/AsyncMethodHandler.java | 13 +- .../internal/ws/client/sei/BodyBuilder.java | 96 +-- .../ws/client/sei/CallbackMethodHandler.java | 2 +- .../internal/ws/client/sei/MessageFiller.java | 2 +- .../internal/ws/client/sei/MethodHandler.java | 2 +- .../ws/client/sei/PollingMethodHandler.java | 2 +- .../ws/client/sei/ResponseBuilder.java | 211 +++--- .../ws/client/sei/SEIMethodHandler.java | 18 +- .../xml/internal/ws/client/sei/SEIStub.java | 38 +- .../ws/client/sei/StubAsyncHandler.java | 8 +- .../internal/ws/client/sei/StubHandler.java | 20 +- .../ws/client/sei/SyncMethodHandler.java | 15 +- .../internal/ws/client/sei/ValueGetter.java | 2 +- .../ws/client/sei/ValueGetterFactory.java | 2 +- .../internal/ws/client/sei/ValueSetter.java | 2 +- .../ws/client/sei/ValueSetterFactory.java | 2 +- .../internal/ws/client/sei/pacakge-info.java | 2 +- .../ws/commons/xmlutil/Converter.java | 193 +++++ .../policy/ManagementAssertionCreator.java | 2 +- .../policy/ManagementPolicyValidator.java | 2 +- .../policy/ManagementPrefixMapper.java | 2 +- .../metro/dev/FeatureReader.java} | 29 +- .../ws/config/metro/util/ParserUtil.java | 63 ++ .../ws/db/DatabindingFactoryImpl.java | 26 +- .../xml/internal/ws/db/DatabindingImpl.java | 73 +- .../ws/db/DatabindingProviderImpl.java | 16 +- .../ws/db/glassfish/BridgeWrapper.java | 238 +++--- .../ws/db/glassfish/JAXBRIContextFactory.java | 122 +-- .../ws/db/glassfish/JAXBRIContextWrapper.java | 213 +++--- .../ws/db/glassfish/MarshallerBridge.java | 2 +- .../ws/db/glassfish/RawAccessorWrapper.java | 58 +- .../ws/db/glassfish/WrapperBridge.java | 148 ++-- .../ws/developer/BindingTypeFeature.java | 2 +- .../xml/internal/ws/developer/EPRRecipe.java | 2 +- .../ws/developer/HttpConfigFeature.java | 4 +- .../ws/developer/JAXBContextFactory.java | 2 +- .../ws/developer/JAXWSProperties.java | 4 +- .../developer/MemberSubmissionAddressing.java | 2 +- .../MemberSubmissionAddressingFeature.java | 2 +- .../MemberSubmissionEndpointReference.java | 8 +- .../ws/developer/SchemaValidation.java | 4 +- .../ws/developer/SchemaValidationFeature.java | 3 +- .../internal/ws/developer/Serialization.java | 2 +- .../ws/developer/SerializationFeature.java | 2 +- .../ws/developer/ServerSideException.java | 2 +- .../ws/developer/StreamingAttachment.java | 2 +- .../developer/StreamingAttachmentFeature.java | 4 +- .../ws/developer/StreamingDataHandler.java | 19 +- .../ws/developer/UsesJAXBContext.java | 2 +- .../ws/developer/UsesJAXBContextFeature.java | 2 +- .../ws/developer/ValidationErrorHandler.java | 4 +- .../ws/developer/WSBindingProvider.java | 4 +- .../internal/ws/developer/package-info.java | 2 +- .../xml/internal/ws/dump/LoggingDumpTube.java | 131 ++++ .../xml/internal/ws/dump/MessageDumper.java | 107 +++ .../dump/MessageDumping.java} | 39 +- .../ws/dump/MessageDumpingFeature.java | 116 +++ .../internal/ws/dump/MessageDumpingTube.java | 120 +++ .../ws/dump/MessageDumpingTubeFactory.java | 54 ++ .../xml/internal/ws/encoding/ContentType.java | 2 +- .../internal/ws/encoding/ContentTypeImpl.java | 50 +- .../ws/encoding/DataHandlerDataSource.java | 2 +- .../DataSourceStreamingDataHandler.java | 24 +- .../xml/internal/ws/encoding/HasEncoding.java | 2 +- .../internal/ws/encoding/HeaderTokenizer.java | 2 +- .../ws/encoding/ImageDataContentHandler.java | 2 +- .../MIMEPartStreamingDataHandler.java | 9 +- .../xml/internal/ws/encoding/MimeCodec.java | 38 +- .../ws/encoding/MimeMultipartParser.java | 62 +- .../xml/internal/ws/encoding/MtomCodec.java | 211 ++++-- .../internal/ws/encoding/ParameterList.java | 2 +- .../internal/ws/encoding/RootOnlyCodec.java | 2 +- .../ws/encoding/SOAPBindingCodec.java | 169 ++--- .../ws/encoding/StreamSOAP11Codec.java | 16 +- .../ws/encoding/StreamSOAP12Codec.java | 16 +- .../internal/ws/encoding/StreamSOAPCodec.java | 64 +- .../ws/encoding/StringDataContentHandler.java | 2 +- .../xml/internal/ws/encoding/SwACodec.java | 7 +- .../xml/internal/ws/encoding/TagInfoset.java | 2 +- .../ws/encoding/XMLHTTPBindingCodec.java | 76 +- .../ws/encoding/XmlDataContentHandler.java | 2 +- .../fastinfoset/FastInfosetCodec.java | 14 +- .../fastinfoset/FastInfosetMIMETypes.java | 2 +- .../FastInfosetStreamReaderFactory.java | 2 +- .../FastInfosetStreamReaderRecyclable.java | 2 +- .../FastInfosetStreamSOAP11Codec.java | 2 +- .../FastInfosetStreamSOAP12Codec.java | 2 +- .../FastInfosetStreamSOAPCodec.java | 2 +- .../ws/encoding/policy/EncodingConstants.java | 2 +- .../policy/EncodingPolicyValidator.java | 2 +- .../encoding/policy/EncodingPrefixMapper.java | 2 +- .../FastInfosetFeatureConfigurator.java | 2 +- .../policy/MtomFeatureConfigurator.java | 3 +- .../policy/MtomPolicyMapConfigurator.java | 2 +- ...ectOptimalEncodingFeatureConfigurator.java | 2 +- .../soap/DeserializationException.java | 4 +- .../ws/encoding/soap/SOAP12Constants.java | 2 +- .../ws/encoding/soap/SOAPConstants.java | 2 +- .../encoding/soap/SerializationException.java | 5 +- .../ws/encoding/soap/SerializerConstants.java | 2 +- .../streaming/SOAP12NamespaceConstants.java | 2 +- .../streaming/SOAPNamespaceConstants.java | 2 +- .../internal/ws/encoding/xml/XMLCodec.java | 2 +- .../ws/encoding/xml/XMLConstants.java | 2 +- .../internal/ws/encoding/xml/XMLMessage.java | 24 +- .../ws/encoding/xml/XMLPropertyBag.java | 7 +- .../sun/xml/internal/ws/fault/CodeType.java | 2 +- .../sun/xml/internal/ws/fault/DetailType.java | 2 +- .../xml/internal/ws/fault/ExceptionBean.java | 12 +- .../sun/xml/internal/ws/fault/ReasonType.java | 2 +- .../xml/internal/ws/fault/SOAP11Fault.java | 10 +- .../xml/internal/ws/fault/SOAP12Fault.java | 2 +- .../internal/ws/fault/SOAPFaultBuilder.java | 23 +- .../ws/fault/ServerSOAPFaultException.java | 2 +- .../xml/internal/ws/fault/SubcodeType.java | 2 +- .../sun/xml/internal/ws/fault/TextType.java | 2 +- .../ws/handler/ClientLogicalHandlerTube.java | 2 +- .../ws/handler/ClientMessageHandlerTube.java | 6 +- .../ws/handler/ClientSOAPHandlerTube.java | 6 +- .../ws/handler/HandlerChainsModel.java | 2 +- .../internal/ws/handler/HandlerException.java | 4 +- .../internal/ws/handler/HandlerProcessor.java | 2 +- .../xml/internal/ws/handler/HandlerTube.java | 4 +- .../ws/handler/LogicalMessageContextImpl.java | 10 +- .../ws/handler/LogicalMessageImpl.java | 18 +- .../ws/handler/MessageContextImpl.java | 130 +--- .../ws/handler/MessageHandlerContextImpl.java | 2 +- .../ws/handler/MessageUpdatableContext.java | 9 +- .../xml/internal/ws/handler/PortInfoImpl.java | 2 +- .../ws/handler/SOAPHandlerProcessor.java | 2 +- .../ws/handler/SOAPMessageContextImpl.java | 3 +- .../ws/handler/ServerLogicalHandlerTube.java | 6 +- .../ws/handler/ServerMessageHandlerTube.java | 6 +- .../ws/handler/ServerSOAPHandlerTube.java | 5 +- .../ws/handler/XMLHandlerProcessor.java | 2 +- .../ws/message/AbstractHeaderImpl.java | 4 +- .../ws/message/AbstractMessageImpl.java | 62 +- .../ws/message/AttachmentSetImpl.java | 2 +- .../message/AttachmentUnmarshallerImpl.java | 2 +- .../ws/message/ByteArrayAttachment.java | 2 +- .../xml/internal/ws/message/DOMHeader.java | 24 +- .../xml/internal/ws/message/DOMMessage.java | 16 +- .../ws/message/DataHandlerAttachment.java | 13 +- .../internal/ws/message/EmptyMessageImpl.java | 20 +- .../ws/message/FaultDetailHeader.java | 2 +- .../xml/internal/ws/message/FaultMessage.java | 2 +- .../internal/ws/message/JAXBAttachment.java | 14 +- .../ws/message/MimeAttachmentSet.java | 2 +- .../ws/message/PayloadElementSniffer.java | 2 +- .../ws/message/ProblemActionHeader.java | 2 +- .../internal/ws/message/RelatesToHeader.java | 2 +- .../ws/message/RootElementSniffer.java | 2 +- .../xml/internal/ws/message/StringHeader.java | 2 +- .../com/sun/xml/internal/ws/message/Util.java | 2 +- .../internal/ws/message/XMLReaderImpl.java | 2 +- .../jaxb/AttachmentMarshallerImpl.java | 15 +- .../ws/message/jaxb/JAXBBridgeSource.java | 2 +- .../ws/message/jaxb/JAXBDispatchMessage.java | 10 +- .../internal/ws/message/jaxb/JAXBHeader.java | 6 +- .../internal/ws/message/jaxb/JAXBMessage.java | 32 +- .../ws/message/jaxb/MarshallerBridge.java | 2 +- .../ws/message/jaxb/package-info.java | 2 +- .../xml/internal/ws/message/package-info.java | 4 +- .../internal/ws/message/saaj/SAAJHeader.java | 2 +- .../internal/ws/message/saaj/SAAJMessage.java | 79 +- .../message/source/PayloadSourceMessage.java | 5 +- .../message/source/ProtocolSourceMessage.java | 17 +- .../ws/message/source/SourceUtils.java | 33 +- .../message/stream/OutboundStreamHeader.java | 2 +- .../stream/PayloadStreamReaderMessage.java | 15 +- .../ws/message/stream/StreamAttachment.java | 2 +- .../ws/message/stream/StreamHeader.java | 5 +- .../ws/message/stream/StreamHeader11.java | 2 +- .../ws/message/stream/StreamHeader12.java | 2 +- .../ws/message/stream/StreamMessage.java | 45 +- .../ws/model/AbstractSEIModelImpl.java | 47 +- .../model/AbstractWrapperBeanGenerator.java | 34 +- .../ws/model/CheckedExceptionImpl.java | 2 +- .../ws/model/ExternalMetadataReader.java | 549 ++++++++++++++ .../xml/internal/ws/model/FieldSignature.java | 8 +- .../sun/xml/internal/ws/model/Injector.java | 2 +- .../xml/internal/ws/model/JavaMethodImpl.java | 11 +- .../xml/internal/ws/model/ParameterImpl.java | 32 +- .../ws/model/ReflectAnnotationReader.java | 2 +- .../xml/internal/ws/model/RuntimeModeler.java | 92 ++- .../ws/model/RuntimeModelerException.java | 4 +- .../xml/internal/ws/model/SOAPSEIModel.java | 3 +- .../ws/model/WrapperBeanGenerator.java | 12 +- .../internal/ws/model/WrapperParameter.java | 19 +- .../ws/model/soap/SOAPBindingImpl.java | 2 +- .../ws/model/wsdl/AbstractExtensibleImpl.java | 2 +- .../wsdl/AbstractFeaturedObjectImpl.java | 2 +- .../ws/model/wsdl/AbstractObjectImpl.java | 2 +- .../ws/model/wsdl/WSDLBoundFaultImpl.java | 2 +- .../ws/model/wsdl/WSDLBoundOperationImpl.java | 7 +- .../ws/model/wsdl/WSDLBoundPortTypeImpl.java | 6 +- .../ws/model/wsdl/WSDLDirectProperties.java | 2 +- .../internal/ws/model/wsdl/WSDLFaultImpl.java | 2 +- .../internal/ws/model/wsdl/WSDLInputImpl.java | 2 +- .../ws/model/wsdl/WSDLMessageImpl.java | 2 +- .../internal/ws/model/wsdl/WSDLModelImpl.java | 2 +- .../ws/model/wsdl/WSDLOperationImpl.java | 2 +- .../ws/model/wsdl/WSDLOutputImpl.java | 2 +- .../ws/model/wsdl/WSDLPartDescriptorImpl.java | 2 +- .../internal/ws/model/wsdl/WSDLPartImpl.java | 2 +- .../internal/ws/model/wsdl/WSDLPortImpl.java | 2 +- .../ws/model/wsdl/WSDLPortProperties.java | 2 +- .../ws/model/wsdl/WSDLPortTypeImpl.java | 2 +- .../ws/model/wsdl/WSDLProperties.java | 8 +- .../ws/model/wsdl/WSDLServiceImpl.java | 2 +- .../ws/org/objectweb/asm/ClassAdapter.java | 151 ++++ .../ws/org/objectweb/asm/MethodAdapter.java | 225 ++++++ .../com/sun/xml/internal/ws/package-info.java | 2 +- .../ws/policy/jaxws/BuilderHandler.java | 2 +- .../jaxws/BuilderHandlerEndpointScope.java | 2 +- .../jaxws/BuilderHandlerMessageScope.java | 2 +- .../jaxws/BuilderHandlerOperationScope.java | 2 +- .../jaxws/BuilderHandlerServiceScope.java | 2 +- .../policy/jaxws/DefaultPolicyResolver.java | 2 +- .../ws/policy/jaxws/PolicyMapBuilder.java | 2 +- .../internal/ws/policy/jaxws/PolicyUtil.java | 2 +- .../jaxws/PolicyWSDLGeneratorExtension.java | 2 +- .../jaxws/PolicyWSDLParserExtension.java | 14 +- .../ws/policy/jaxws/SafePolicyReader.java | 2 +- .../policy/jaxws/WSDLBoundFaultContainer.java | 2 +- .../jaxws/spi/PolicyFeatureConfigurator.java | 2 +- .../jaxws/spi/PolicyMapConfigurator.java | 2 +- .../ws/protocol/soap/ClientMUTube.java | 5 +- .../xml/internal/ws/protocol/soap/MUTube.java | 30 +- .../soap/MessageCreationException.java | 2 +- .../ws/protocol/soap/ServerMUTube.java | 6 +- .../soap/VersionMismatchException.java | 2 +- .../ws/protocol/xml/XMLMessageException.java | 4 +- .../ws/resources/AddressingMessages.java | 9 +- .../ws/resources/BindingApiMessages.java | 9 +- .../internal/ws/resources/ClientMessages.java | 9 +- .../ws/resources/DispatchMessages.java | 9 +- .../ws/resources/EncodingMessages.java | 9 +- .../ws/resources/HandlerMessages.java | 9 +- .../ws/resources/HttpserverMessages.java | 9 +- .../ws/resources/ManagementMessages.java | 9 +- .../ws/resources/ModelerMessages.java | 57 +- .../internal/ws/resources/PolicyMessages.java | 21 +- .../ws/resources/ProviderApiMessages.java | 9 +- .../internal/ws/resources/SenderMessages.java | 9 +- .../internal/ws/resources/ServerMessages.java | 9 +- .../internal/ws/resources/SoapMessages.java | 9 +- .../ws/resources/StreamingMessages.java | 9 +- .../resources/TubelineassemblyMessages.java | 282 +++++++ .../internal/ws/resources/UtilMessages.java | 9 +- .../ws/resources/WsdlmodelMessages.java | 9 +- .../ws/resources/WsservletMessages.java | 9 +- .../ws/resources/XmlmessageMessages.java | 9 +- .../ws/resources/addressing.properties | 2 +- .../ws/resources/addressing_de.properties | 61 ++ .../ws/resources/addressing_es.properties | 61 ++ .../ws/resources/addressing_fr.properties | 61 ++ .../ws/resources/addressing_it.properties | 61 ++ .../ws/resources/addressing_ja.properties | 61 ++ .../ws/resources/addressing_ko.properties | 61 ++ .../ws/resources/addressing_pt_BR.properties | 61 ++ .../ws/resources/addressing_zh_CN.properties | 61 ++ .../ws/resources/addressing_zh_TW.properties | 61 ++ .../ws/resources/bindingApi.properties | 2 +- .../ws/resources/bindingApi_de.properties | 26 + .../ws/resources/bindingApi_es.properties | 26 + .../ws/resources/bindingApi_fr.properties | 26 + .../ws/resources/bindingApi_it.properties | 26 + .../ws/resources/bindingApi_ja.properties | 26 + .../ws/resources/bindingApi_ko.properties | 26 + .../ws/resources/bindingApi_pt_BR.properties | 26 + .../ws/resources/bindingApi_zh_CN.properties | 26 + .../ws/resources/bindingApi_zh_TW.properties | 26 + .../internal/ws/resources/client.properties | 2 +- .../ws/resources/client_de.properties | 61 ++ .../ws/resources/client_es.properties | 61 ++ .../ws/resources/client_fr.properties | 61 ++ .../ws/resources/client_it.properties | 61 ++ .../ws/resources/client_ja.properties | 61 ++ .../ws/resources/client_ko.properties | 61 ++ .../ws/resources/client_pt_BR.properties | 61 ++ .../ws/resources/client_zh_CN.properties | 61 ++ .../ws/resources/client_zh_TW.properties | 61 ++ .../internal/ws/resources/dispatch.properties | 2 +- .../ws/resources/dispatch_de.properties | 43 ++ .../ws/resources/dispatch_es.properties | 43 ++ .../ws/resources/dispatch_fr.properties | 43 ++ .../ws/resources/dispatch_it.properties | 43 ++ .../ws/resources/dispatch_ja.properties | 43 ++ .../ws/resources/dispatch_ko.properties | 43 ++ .../ws/resources/dispatch_pt_BR.properties | 43 ++ .../ws/resources/dispatch_zh_CN.properties | 43 ++ .../ws/resources/dispatch_zh_TW.properties | 43 ++ .../internal/ws/resources/encoding.properties | 2 +- .../ws/resources/encoding_de.properties | 45 ++ .../ws/resources/encoding_es.properties | 45 ++ .../ws/resources/encoding_fr.properties | 45 ++ .../ws/resources/encoding_it.properties | 45 ++ .../ws/resources/encoding_ja.properties | 45 ++ .../ws/resources/encoding_ko.properties | 45 ++ .../ws/resources/encoding_pt_BR.properties | 45 ++ .../ws/resources/encoding_zh_CN.properties | 45 ++ .../ws/resources/encoding_zh_TW.properties | 45 ++ .../internal/ws/resources/handler.properties | 2 +- .../ws/resources/handler_de.properties | 35 + .../ws/resources/handler_es.properties | 35 + .../ws/resources/handler_fr.properties | 35 + .../ws/resources/handler_it.properties | 35 + .../ws/resources/handler_ja.properties | 35 + .../ws/resources/handler_ko.properties | 35 + .../ws/resources/handler_pt_BR.properties | 35 + .../ws/resources/handler_zh_CN.properties | 35 + .../ws/resources/handler_zh_TW.properties | 35 + .../ws/resources/httpserver.properties | 2 +- .../ws/resources/httpserver_de.properties | 26 + .../ws/resources/httpserver_es.properties | 26 + .../ws/resources/httpserver_fr.properties | 26 + .../ws/resources/httpserver_it.properties | 26 + .../ws/resources/httpserver_ja.properties | 26 + .../ws/resources/httpserver_ko.properties | 26 + .../ws/resources/httpserver_pt_BR.properties | 26 + .../ws/resources/httpserver_zh_CN.properties | 26 + .../ws/resources/httpserver_zh_TW.properties | 26 + .../ws/resources/management.properties | 2 +- .../ws/resources/management_de.properties | 33 + .../ws/resources/management_es.properties | 33 + .../ws/resources/management_fr.properties | 33 + .../ws/resources/management_it.properties | 33 + .../ws/resources/management_ja.properties | 33 + .../ws/resources/management_ko.properties | 33 + .../ws/resources/management_pt_BR.properties | 33 + .../ws/resources/management_zh_CN.properties | 33 + .../ws/resources/management_zh_TW.properties | 33 + .../internal/ws/resources/modeler.properties | 6 +- .../ws/resources/modeler_de.properties | 60 ++ .../ws/resources/modeler_es.properties | 60 ++ .../ws/resources/modeler_fr.properties | 60 ++ .../ws/resources/modeler_it.properties | 60 ++ .../ws/resources/modeler_ja.properties | 60 ++ .../ws/resources/modeler_ko.properties | 60 ++ .../ws/resources/modeler_pt_BR.properties | 60 ++ .../ws/resources/modeler_zh_CN.properties | 60 ++ .../ws/resources/modeler_zh_TW.properties | 60 ++ .../internal/ws/resources/policy.properties | 3 +- .../ws/resources/policy_de.properties | 47 ++ .../ws/resources/policy_es.properties | 47 ++ .../ws/resources/policy_fr.properties | 47 ++ .../ws/resources/policy_it.properties | 47 ++ .../ws/resources/policy_ja.properties | 47 ++ .../ws/resources/policy_ko.properties | 47 ++ .../ws/resources/policy_pt_BR.properties | 47 ++ .../ws/resources/policy_zh_CN.properties | 47 ++ .../ws/resources/policy_zh_TW.properties | 47 ++ .../ws/resources/providerApi.properties | 2 +- .../ws/resources/providerApi_de.properties | 35 + .../ws/resources/providerApi_es.properties | 35 + .../ws/resources/providerApi_fr.properties | 35 + .../ws/resources/providerApi_it.properties | 35 + .../ws/resources/providerApi_ja.properties | 35 + .../ws/resources/providerApi_ko.properties | 35 + .../ws/resources/providerApi_pt_BR.properties | 35 + .../ws/resources/providerApi_zh_CN.properties | 35 + .../ws/resources/providerApi_zh_TW.properties | 35 + .../internal/ws/resources/sender.properties | 2 +- .../ws/resources/sender_de.properties | 30 + .../ws/resources/sender_es.properties | 30 + .../ws/resources/sender_fr.properties | 30 + .../ws/resources/sender_it.properties | 30 + .../ws/resources/sender_ja.properties | 30 + .../ws/resources/sender_ko.properties | 30 + .../ws/resources/sender_pt_BR.properties | 30 + .../ws/resources/sender_zh_CN.properties | 30 + .../ws/resources/sender_zh_TW.properties | 30 + .../internal/ws/resources/server.properties | 2 +- .../ws/resources/server_de.properties | 115 +++ .../ws/resources/server_es.properties | 115 +++ .../ws/resources/server_fr.properties | 115 +++ .../ws/resources/server_it.properties | 115 +++ .../ws/resources/server_ja.properties | 115 +++ .../ws/resources/server_ko.properties | 115 +++ .../ws/resources/server_pt_BR.properties | 115 +++ .../ws/resources/server_zh_CN.properties | 115 +++ .../ws/resources/server_zh_TW.properties | 115 +++ .../xml/internal/ws/resources/soap.properties | 2 +- .../internal/ws/resources/soap_de.properties | 31 + .../internal/ws/resources/soap_es.properties | 31 + .../internal/ws/resources/soap_fr.properties | 31 + .../internal/ws/resources/soap_it.properties | 31 + .../internal/ws/resources/soap_ja.properties | 31 + .../internal/ws/resources/soap_ko.properties | 31 + .../ws/resources/soap_pt_BR.properties | 31 + .../ws/resources/soap_zh_CN.properties | 31 + .../ws/resources/soap_zh_TW.properties | 31 + .../ws/resources/streaming.properties | 2 +- .../ws/resources/streaming_de.properties | 50 ++ .../ws/resources/streaming_es.properties | 50 ++ .../ws/resources/streaming_fr.properties | 50 ++ .../ws/resources/streaming_it.properties | 50 ++ .../ws/resources/streaming_ja.properties | 50 ++ .../ws/resources/streaming_ko.properties | 50 ++ .../ws/resources/streaming_pt_BR.properties | 50 ++ .../ws/resources/streaming_zh_CN.properties | 50 ++ .../ws/resources/streaming_zh_TW.properties | 50 ++ .../ws/resources/tubelineassembly.properties | 67 ++ .../xml/internal/ws/resources/util.properties | 2 +- .../internal/ws/resources/util_de.properties | 34 + .../internal/ws/resources/util_es.properties | 34 + .../internal/ws/resources/util_fr.properties | 34 + .../internal/ws/resources/util_it.properties | 34 + .../internal/ws/resources/util_ja.properties | 34 + .../internal/ws/resources/util_ko.properties | 34 + .../ws/resources/util_pt_BR.properties | 34 + .../ws/resources/util_zh_CN.properties | 34 + .../ws/resources/util_zh_TW.properties | 34 + .../ws/resources/wsdlmodel.properties | 2 +- .../ws/resources/wsdlmodel_de.properties | 29 + .../ws/resources/wsdlmodel_es.properties | 29 + .../ws/resources/wsdlmodel_fr.properties | 29 + .../ws/resources/wsdlmodel_it.properties | 29 + .../ws/resources/wsdlmodel_ja.properties | 29 + .../ws/resources/wsdlmodel_ko.properties | 29 + .../ws/resources/wsdlmodel_pt_BR.properties | 29 + .../ws/resources/wsdlmodel_zh_CN.properties | 29 + .../ws/resources/wsdlmodel_zh_TW.properties | 29 + .../ws/resources/wsservlet.properties | 2 +- .../ws/resources/wsservlet_de.properties | 243 ++++++ .../ws/resources/wsservlet_es.properties | 243 ++++++ .../ws/resources/wsservlet_fr.properties | 243 ++++++ .../ws/resources/wsservlet_it.properties | 243 ++++++ .../ws/resources/wsservlet_ja.properties | 243 ++++++ .../ws/resources/wsservlet_ko.properties | 243 ++++++ .../ws/resources/wsservlet_pt_BR.properties | 243 ++++++ .../ws/resources/wsservlet_zh_CN.properties | 243 ++++++ .../ws/resources/wsservlet_zh_TW.properties | 243 ++++++ .../ws/resources/xmlmessage.properties | 2 +- .../ws/resources/xmlmessage_de.properties | 36 + .../ws/resources/xmlmessage_es.properties | 36 + .../ws/resources/xmlmessage_fr.properties | 36 + .../ws/resources/xmlmessage_it.properties | 36 + .../ws/resources/xmlmessage_ja.properties | 36 + .../ws/resources/xmlmessage_ko.properties | 36 + .../ws/resources/xmlmessage_pt_BR.properties | 36 + .../ws/resources/xmlmessage_zh_CN.properties | 36 + .../ws/resources/xmlmessage_zh_TW.properties | 36 + .../ws/runtime/config/MetroConfig.java | 185 +++++ .../ws/runtime/config/ObjectFactory.java | 145 ++++ .../ws/runtime/config/TubeFactoryConfig.java | 151 ++++ .../ws/runtime/config/TubeFactoryList.java | 157 ++++ .../ws/runtime/config/TubelineDefinition.java | 212 ++++++ .../config/TubelineFeature.java} | 46 +- .../runtime/config/TubelineFeatureReader.java | 125 +++ .../ws/runtime/config/TubelineMapping.java | 182 +++++ .../internal/ws/runtime/config/Tubelines.java | 218 ++++++ .../ws/runtime/config/package-info.java | 34 + .../server/AbstractMultiInstanceResolver.java | 2 +- .../ws/server/AbstractWebServiceContext.java | 8 +- .../ws/server/DefaultResourceInjector.java | 6 +- .../DraconianValidationErrorHandler.java | 2 +- .../internal/ws/server/EndpointAwareTube.java | 2 +- .../internal/ws/server/EndpointFactory.java | 213 ++++-- .../ws/server/EndpointMessageContextImpl.java | 5 +- .../xml/internal/ws/server/InvokerTube.java | 2 +- .../xml/internal/ws/server/MonitorBase.java | 86 +-- .../ws/server/MonitorRootService.java | 69 +- .../internal/ws/server/SDDocumentImpl.java | 2 +- .../ws/server/ServerPropertyConstants.java | 2 +- .../internal/ws/server/ServerRtException.java | 4 +- .../ws/server/ServerSchemaValidationTube.java | 2 +- .../ws/server/ServiceDefinitionImpl.java | 2 +- .../internal/ws/server/SingletonResolver.java | 2 +- .../ws/server/UnsupportedMediaException.java | 2 +- .../internal/ws/server/WSDLGenResolver.java | 5 +- .../internal/ws/server/WSEndpointImpl.java | 398 +++++----- .../ws/server/WSEndpointMOMProxy.java | 178 ++++- .../xml/internal/ws/server/package-info.java | 2 +- .../provider/AsyncProviderInvokerTube.java | 34 +- .../MessageProviderArgumentBuilder.java | 4 +- .../provider/ProviderArgumentsBuilder.java | 24 +- .../provider/ProviderEndpointModel.java | 2 +- .../server/provider/ProviderInvokerTube.java | 13 +- .../provider/SOAPProviderArgumentBuilder.java | 8 +- .../provider/SyncProviderInvokerTube.java | 22 +- .../provider/XMLProviderArgumentBuilder.java | 4 +- .../server/sei/EndpointArgumentsBuilder.java | 216 +++--- .../sei/EndpointResponseMessageBuilder.java | 101 +-- .../ws/server/sei/EndpointValueSetter.java | 2 +- .../xml/internal/ws/server/sei/Invoker.java | 2 +- .../internal/ws/server/sei/InvokerSource.java | 2 +- .../internal/ws/server/sei/InvokerTube.java | 2 +- .../internal/ws/server/sei/MessageFiller.java | 2 +- .../ws/server/sei/SEIInvokerTube.java | 16 +- .../internal/ws/server/sei/TieHandler.java | 41 +- .../internal/ws/server/sei/ValueGetter.java | 2 +- .../sun/xml/internal/ws/spi/ProviderImpl.java | 2 +- .../internal/ws/spi/db/BindingContext.java | 6 +- .../ws/spi/db/BindingContextFactory.java | 8 +- .../xml/internal/ws/spi/db/BindingHelper.java | 2 +- .../xml/internal/ws/spi/db/BindingInfo.java | 2 +- .../ws/spi/db/DatabindingException.java | 2 +- .../ws/spi/db/DatabindingProvider.java | 8 +- .../xml/internal/ws/spi/db/FieldGetter.java | 2 +- .../xml/internal/ws/spi/db/FieldSetter.java | 2 +- .../ws/spi/db/JAXBWrapperAccessor.java | 20 +- .../xml/internal/ws/spi/db/MethodGetter.java | 2 +- .../xml/internal/ws/spi/db/MethodSetter.java | 2 +- .../sun/xml/internal/ws/spi/db/OldBridge.java | 2 +- .../internal/ws/spi/db/PropertyAccessor.java | 2 +- .../internal/ws/spi/db/PropertyGetter.java | 2 +- .../ws/spi/db/PropertyGetterBase.java | 2 +- .../internal/ws/spi/db/PropertySetter.java | 2 +- .../ws/spi/db/PropertySetterBase.java | 2 +- .../ws/spi/db/RepeatedElementBridge.java | 221 ++++++ .../sun/xml/internal/ws/spi/db/TypeInfo.java | 30 +- .../internal/ws/spi/db/WrapperAccessor.java | 2 +- .../xml/internal/ws/spi/db/WrapperBridge.java | 213 ++++++ .../internal/ws/spi/db/WrapperComposite.java | 4 +- .../sun/xml/internal/ws/spi/db/XMLBridge.java | 2 +- .../xml/internal/ws/streaming/Attributes.java | 2 +- .../ws/streaming/DOMStreamReader.java | 20 +- .../ws/streaming/MtomStreamWriter.java | 2 +- .../internal/ws/streaming/PrefixFactory.java | 2 +- .../ws/streaming/PrefixFactoryImpl.java | 2 +- .../ws/streaming/SourceReaderFactory.java | 2 +- .../ws/streaming/TidyXMLStreamReader.java | 2 +- .../ws/streaming/XMLReaderException.java | 4 +- .../streaming/XMLStreamReaderException.java | 4 +- .../ws/streaming/XMLStreamReaderUtil.java | 13 +- .../streaming/XMLStreamWriterException.java | 4 +- .../ws/streaming/XMLStreamWriterUtil.java | 2 +- .../ws/transport/DeferredTransportPipe.java | 2 +- .../xml/internal/ws/transport/Headers.java | 5 +- .../http/DeploymentDescriptorParser.java | 381 +++++----- .../ws/transport/http/HttpAdapter.java | 115 ++- .../ws/transport/http/HttpAdapterList.java | 37 +- .../transport/http/HttpMetadataPublisher.java | 2 +- .../ws/transport/http/ResourceLoader.java | 4 +- .../ws/transport/http/WSHTTPConnection.java | 17 +- .../http/client/HttpClientTransport.java | 2 +- .../http/client/HttpResponseProperties.java | 8 +- .../http/client/HttpTransportPipe.java | 128 ++-- .../transport/http/server/EndpointImpl.java | 12 +- .../transport/http/server/HttpEndpoint.java | 6 +- .../http/server/PortableConnectionImpl.java | 76 +- .../http/server/PortableHttpHandler.java | 18 +- .../transport/http/server/ServerAdapter.java | 12 +- .../http/server/ServerAdapterList.java | 2 +- .../http/server/ServerConnectionImpl.java | 4 +- .../http/server/ServerContainer.java | 5 +- .../ws/transport/http/server/ServerMgr.java | 2 +- .../transport/http/server/WSHttpHandler.java | 6 +- .../xml/internal/ws/util/ASCIIUtility.java | 20 +- .../xml/internal/ws/util/ByteArrayBuffer.java | 2 +- .../internal/ws/util/ByteArrayDataSource.java | 2 +- .../xml/internal/ws/util/CompletedFuture.java | 2 +- .../sun/xml/internal/ws/util/Constants.java | 2 +- .../com/sun/xml/internal/ws/util/DOMUtil.java | 61 +- .../ws/util/FastInfosetReflection.java | 2 +- .../xml/internal/ws/util/FastInfosetUtil.java | 2 +- .../ws/util/HandlerAnnotationInfo.java | 2 +- .../ws/util/HandlerAnnotationProcessor.java | 35 +- .../xml/internal/ws/util/InjectionPlan.java | 233 ++++++ .../sun/xml/internal/ws/util/JAXWSUtils.java | 13 +- .../xml/internal/ws/util/MetadataUtil.java | 2 +- .../internal/ws/util/NamespaceSupport.java | 4 +- .../internal/ws/util/NoCloseInputStream.java | 2 +- .../internal/ws/util/NoCloseOutputStream.java | 2 +- .../com/sun/xml/internal/ws/util/Pool.java | 17 +- .../sun/xml/internal/ws/util/QNameMap.java | 2 +- .../xml/internal/ws/util/ReadAllStream.java | 28 +- .../xml/internal/ws/util/RuntimeVersion.java | 2 +- .../ws/util/ServiceConfigurationError.java | 2 +- .../xml/internal/ws/util/ServiceFinder.java | 95 ++- .../sun/xml/internal/ws/util/StreamUtils.java | 2 +- .../sun/xml/internal/ws/util/StringUtils.java | 2 +- .../xml/internal/ws/util/UtilException.java | 4 +- .../com/sun/xml/internal/ws/util/Version.java | 2 +- .../sun/xml/internal/ws/util/VersionUtil.java | 2 +- .../ws/util/exception/JAXWSExceptionBase.java | 18 +- .../LocatableWebServiceException.java | 2 +- .../ws/util/localization/Localizer.java | 149 ---- .../pipe/AbstractSchemaValidationTube.java | 50 +- .../xml/internal/ws/util/pipe/DumpTube.java | 2 +- .../ws/util/pipe/StandalonePipeAssembler.java | 2 +- .../ws/util/pipe/StandaloneTubeAssembler.java | 2 +- .../ws/util/resources/Messages_en.properties | 2 +- .../util/resources/Messages_en_de.properties | 284 +++++++ .../util/resources/Messages_en_es.properties | 284 +++++++ .../util/resources/Messages_en_fr.properties | 284 +++++++ .../util/resources/Messages_en_it.properties | 284 +++++++ .../util/resources/Messages_en_ja.properties | 284 +++++++ .../util/resources/Messages_en_ko.properties | 284 +++++++ .../resources/Messages_en_pt_BR.properties | 284 +++++++ .../resources/Messages_en_zh_CN.properties | 284 +++++++ .../resources/Messages_en_zh_TW.properties | 284 +++++++ .../xml/internal/ws/util/version.properties | 11 +- .../sun/xml/internal/ws/util/xml/CDATA.java | 2 +- .../xml/ContentHandlerToXMLStreamWriter.java | 2 +- .../internal/ws/util/xml/DummyLocation.java | 2 +- .../ws/util/xml/NamedNodeMapIterator.java | 2 +- .../ws/util/xml/NodeListIterator.java | 2 +- .../xml/internal/ws/util/xml/StAXResult.java | 2 +- .../xml/internal/ws/util/xml/StAXSource.java | 28 +- .../ws/util/xml/XMLStreamReaderFilter.java | 2 +- .../xml/XMLStreamReaderToXMLStreamWriter.java | 45 +- .../ws/util/xml/XMLStreamWriterFilter.java | 2 +- .../sun/xml/internal/ws/util/xml/XmlUtil.java | 97 ++- .../ws/wsdl/ActionBasedOperationFinder.java | 64 +- .../wsdl/ActionBasedOperationSignature.java | 2 +- .../internal/ws/wsdl/DispatchException.java | 2 +- .../internal/ws/wsdl/OperationDispatcher.java | 15 +- .../PayloadQNameBasedOperationFinder.java | 15 +- .../internal/ws/wsdl/SDDocumentResolver.java | 2 +- .../wsdl/SOAPActionBasedOperationFinder.java | 14 +- .../internal/ws/wsdl/WSDLOperationFinder.java | 51 +- .../parser/DelegatingParserExtension.java | 2 +- .../ws/wsdl/parser/EntityResolverWrapper.java | 2 +- .../internal/ws/wsdl/parser/ErrorHandler.java | 2 +- .../wsdl/parser/FoolProofParserExtension.java | 2 +- .../parser/InaccessibleWSDLException.java | 4 +- .../ws/wsdl/parser/MIMEConstants.java | 14 +- ...bmissionAddressingWSDLParserExtension.java | 2 +- .../ws/wsdl/parser/MexEntityResolver.java | 2 +- .../internal/ws/wsdl/parser/ParserUtil.java | 2 +- .../ws/wsdl/parser/RuntimeWSDLParser.java | 66 +- .../ws/wsdl/parser/SOAPConstants.java | 2 +- ...AddressingMetadataWSDLParserExtension.java | 2 +- .../W3CAddressingWSDLParserExtension.java | 2 +- .../ws/wsdl/parser/WSDLConstants.java | 72 +- .../WSDLParserExtensionContextImpl.java | 2 +- .../parser/WSDLParserExtensionFacade.java | 2 +- .../wsdl/writer/DocumentLocationResolver.java | 2 +- .../ws/wsdl/writer/TXWContentHandler.java | 7 +- .../ws/wsdl/writer/UsingAddressing.java | 2 +- ...ressingMetadataWSDLGeneratorExtension.java | 2 +- .../W3CAddressingWSDLGeneratorExtension.java | 9 +- .../ws/wsdl/writer/WSDLGenerator.java | 173 +++-- .../writer/WSDLGeneratorExtensionFacade.java | 2 +- .../internal/ws/wsdl/writer/WSDLPatcher.java | 17 +- .../internal/ws/wsdl/writer/WSDLResolver.java | 48 +- .../ws/wsdl/writer/document/Binding.java | 2 +- .../writer/document/BindingOperationType.java | 2 +- .../ws/wsdl/writer/document/Definitions.java | 2 +- .../ws/wsdl/writer/document/Documented.java | 2 +- .../ws/wsdl/writer/document/Fault.java | 2 +- .../ws/wsdl/writer/document/FaultType.java | 2 +- .../ws/wsdl/writer/document/Import.java | 2 +- .../ws/wsdl/writer/document/Message.java | 2 +- .../ws/wsdl/writer/document/OpenAtts.java | 2 +- .../ws/wsdl/writer/document/Operation.java | 2 +- .../ws/wsdl/writer/document/ParamType.java | 2 +- .../ws/wsdl/writer/document/Part.java | 2 +- .../ws/wsdl/writer/document/Port.java | 2 +- .../ws/wsdl/writer/document/PortType.java | 2 +- .../ws/wsdl/writer/document/Service.java | 2 +- .../document/StartWithExtensionsType.java | 2 +- .../ws/wsdl/writer/document/Types.java | 2 +- .../ws/wsdl/writer/document/http/Address.java | 2 +- .../ws/wsdl/writer/document/http/Binding.java | 2 +- .../wsdl/writer/document/http/Operation.java | 2 +- .../writer/document/http/package-info.java | 2 +- .../ws/wsdl/writer/document/package-info.java | 2 +- .../ws/wsdl/writer/document/soap/Body.java | 2 +- .../wsdl/writer/document/soap/BodyType.java | 2 +- .../ws/wsdl/writer/document/soap/Header.java | 2 +- .../writer/document/soap/HeaderFault.java | 2 +- .../writer/document/soap/SOAPAddress.java | 2 +- .../writer/document/soap/SOAPBinding.java | 2 +- .../wsdl/writer/document/soap/SOAPFault.java | 2 +- .../writer/document/soap/SOAPOperation.java | 2 +- .../writer/document/soap/package-info.java | 2 +- .../ws/wsdl/writer/document/soap12/Body.java | 2 +- .../wsdl/writer/document/soap12/BodyType.java | 2 +- .../wsdl/writer/document/soap12/Header.java | 2 +- .../writer/document/soap12/HeaderFault.java | 2 +- .../writer/document/soap12/SOAPAddress.java | 2 +- .../writer/document/soap12/SOAPBinding.java | 2 +- .../writer/document/soap12/SOAPFault.java | 2 +- .../writer/document/soap12/SOAPOperation.java | 2 +- .../writer/document/soap12/package-info.java | 2 +- .../ws/wsdl/writer/document/xsd/Import.java | 2 +- .../ws/wsdl/writer/document/xsd/Schema.java | 6 +- .../writer/document/xsd/package-info.java | 2 +- .../javax/annotation/Generated.java | 10 +- .../javax/annotation/PostConstruct.java | 26 +- .../javax/annotation/PreDestroy.java | 24 +- .../javax/annotation/Resource.java | 4 +- .../javax/annotation/Resources.java | 2 +- .../javax/xml/bind/ContextFinder.java | 15 +- .../javax/xml/bind/DatatypeConverterImpl.java | 5 +- .../javax/xml/bind/JAXBContext.java | 16 +- .../javax/xml/bind/JAXBIntrospector.java | 2 +- .../javax/xml/bind/JAXBPermission.java | 3 +- .../javax/xml/bind/Marshaller.java | 2 +- .../javax/xml/bind/Unmarshaller.java | 2 +- .../bind/annotation/XmlInlineBinaryData.java | 5 +- .../xml/bind/annotation/XmlMimeType.java | 5 +- .../bind/annotation/adapters/XmlAdapter.java | 2 +- .../adapters/XmlJavaTypeAdapter.java | 2 +- .../javax/xml/soap/AttachmentPart.java | 2 +- .../jaxws_classes/javax/xml/soap/Detail.java | 2 +- .../javax/xml/soap/DetailEntry.java | 2 +- .../javax/xml/soap/FactoryFinder.java | 198 +++-- .../javax/xml/soap/MessageFactory.java | 6 +- .../javax/xml/soap/MimeHeader.java | 2 +- .../javax/xml/soap/MimeHeaders.java | 2 +- .../jaxws_classes/javax/xml/soap/Name.java | 2 +- .../jaxws_classes/javax/xml/soap/Node.java | 2 +- .../javax/xml/soap/SAAJMetaFactory.java | 2 +- .../javax/xml/soap/SAAJResult.java | 2 +- .../javax/xml/soap/SOAPBody.java | 2 +- .../javax/xml/soap/SOAPBodyElement.java | 2 +- .../javax/xml/soap/SOAPConnection.java | 2 +- .../javax/xml/soap/SOAPConnectionFactory.java | 2 +- .../javax/xml/soap/SOAPConstants.java | 2 +- .../javax/xml/soap/SOAPElement.java | 2 +- .../javax/xml/soap/SOAPElementFactory.java | 2 +- .../javax/xml/soap/SOAPEnvelope.java | 2 +- .../javax/xml/soap/SOAPException.java | 2 +- .../javax/xml/soap/SOAPFactory.java | 13 +- .../javax/xml/soap/SOAPFault.java | 2 +- .../javax/xml/soap/SOAPFaultElement.java | 2 +- .../javax/xml/soap/SOAPHeader.java | 2 +- .../javax/xml/soap/SOAPHeaderElement.java | 2 +- .../javax/xml/soap/SOAPMessage.java | 2 +- .../javax/xml/soap/SOAPPart.java | 2 +- .../jaxws_classes/javax/xml/soap/Text.java | 2 +- .../javax/xml/ws/WebServiceRefs.java | 4 +- .../javax/xml/ws/handler/Handler.java | 4 +- .../javax/xml/ws/soap/AddressingFeature.java | 9 +- .../javax/xml/ws/soap/MTOMFeature.java | 10 +- .../javax/xml/ws/spi/FactoryFinder.java | 45 +- .../ws/wsaddressing/W3CEndpointReference.java | 10 +- 2117 files changed, 67505 insertions(+), 10215 deletions(-) rename jaxws/src/share/jaxws_classes/com/{sun/xml/internal/org/jvnet/ws => oracle/webservices/internal/api}/EnvelopeStyle.java (54%) create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java rename jaxws/src/share/jaxws_classes/com/{sun/xml/internal/org/jvnet/ws => oracle/webservices/internal/api}/databinding/Databinding.java (53%) rename jaxws/src/share/jaxws_classes/com/{sun/xml/internal/org/jvnet/ws => oracle/webservices/internal/api}/databinding/DatabindingFactory.java (53%) create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java rename jaxws/src/share/jaxws_classes/com/{sun/xml/internal/org/jvnet/ws => oracle/webservices/internal/api}/databinding/JavaCallInfo.java (54%) create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java rename jaxws/src/share/jaxws_classes/com/{sun/xml/internal/org/jvnet/ws => oracle/webservices/internal/api}/message/MessageContextFactory.java (59%) create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java create mode 100644 jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java rename jaxws/src/share/jaxws_classes/com/sun/{xml/internal/ws/util => istack/internal}/localization/NullLocalizable.java (93%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties rename jaxws/src/share/jaxws_classes/com/sun/{xml/internal/org/jvnet/ws/EnvelopeStyleFeature.java => tools/internal/jxc/api/JXC.java} (69%) rename jaxws/src/share/jaxws_classes/com/sun/tools/internal/{xjc => jxc}/api/impl/j2s/JAXBModelImpl.java (99%) rename jaxws/src/share/jaxws_classes/com/sun/tools/internal/{xjc => jxc}/api/impl/j2s/JavaCompilerImpl.java (98%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/DefaultAuthenticator.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/util/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/bean/field/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/dtd/bindinfo/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/internalizer/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/bindinfo/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/ct/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/reader/xmlschema/parser/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/util/MessageBundle_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/api/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/marshaller/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/unmarshaller/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/annotation/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/model/impl/Messages_zh_TW.properties rename jaxws/src/share/jaxws_classes/com/sun/{tools/internal/xjc/generator/annotation/ri/XmlLocationWriter.java => xml/internal/bind/v2/model/impl/ModelBuilderI.java} (73%) rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/{ws/util/localization/LocalizableMessage.java => bind/v2/model/util/ArrayInfoUtil.java} (59%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/SwaRefAdapterMarker.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/property/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/reflect/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/unmarshaller/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/schemagen/Messages_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/client/p2p/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/impl/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/name/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_1/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/soap/ver1_2/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/util/LocalStrings_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ASCIIUtility.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/BASE64DecoderStream.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/LineInputStream.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingModeFeature.java delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/ContentType.java delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/DistributedPropertySet.java delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContext.java delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/PropertySet.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/{bind/v2/runtime/output/InPlaceDOMOutput.java => ws/api/client/ThrowableInPacketCompletionFeature.java} (52%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java rename jaxws/src/share/jaxws_classes/com/sun/{tools/internal/xjc/generator/annotation/ri/XmlIsSetWriter.java => xml/internal/ws/api/message/MessageMetadata.java} (75%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java rename jaxws/src/share/jaxws_classes/com/sun/{tools/internal/xjc/generator/annotation/ri/OverrideAnnotationOfWriter.java => xml/internal/ws/assembler/MetroConfigName.java} (74%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/{util/localization/Localizable.java => assembler/dev/TubeFactory.java} (56%) rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/{util/localization/LocalizableMessageFactory.java => assembler/dev/TubelineAssemblyContext.java} (71%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/{util/ReadOnlyPropertyException.java => config/metro/dev/FeatureReader.java} (62%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/{org/jvnet/ws/databinding/DatabindingMode.java => ws/dump/MessageDumping.java} (61%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java rename jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/{util/localization/LocalizableImpl.java => runtime/config/TubelineFeature.java} (57%) create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java delete mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizer.java create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties create mode 100644 jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties diff --git a/jaxws/makefiles/BuildJaxws.gmk b/jaxws/makefiles/BuildJaxws.gmk index 348cba90780..c70086e073b 100644 --- a/jaxws/makefiles/BuildJaxws.gmk +++ b/jaxws/makefiles/BuildJaxws.gmk @@ -55,7 +55,8 @@ $(eval $(call SetupJavaCompilation,BUILD_JAXWS,\ BIN:=$(JAXWS_OUTPUTDIR)/jaxws_classes,\ COPY:=.xsd,\ COPY_FILES:=$(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/JAXBContextFactory.java \ - $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java,\ + $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/tools/internal/xjc/runtime/ZeroOneBooleanAdapter.java \ + $(JAXWS_TOPDIR)/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml,\ ADD_JAVAC_FLAGS=-cp $(OUTPUT_ROOT)/jaxp/dist/lib/classes.jar)) $(JAXWS_OUTPUTDIR)/jaxws_classes/META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin: \ @@ -98,7 +99,7 @@ TARGET_PROP_FILES += $(patsubst $(JAXWS_TOPDIR)/src/share/jaf_classes/%,\ $(eval $(call SetupArchive,ARCHIVE_JAXWS,$(BUILD_JAXWS) $(BUILD_JAF) $(TARGET_PROP_FILES),\ SRCS:=$(JAXWS_OUTPUTDIR)/jaxws_classes $(JAXWS_OUTPUTDIR)/jaf_classes,\ - SUFFIXES:=.class .properties .xsd .java \ + SUFFIXES:=.class .properties .xsd .xml .java \ com.sun.mirror.apt.AnnotationProcessorFactory \ com.sun.tools.internal.xjc.Plugin,\ JAR:=$(JAXWS_OUTPUTDIR)/dist/lib/classes.jar)) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyle.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java similarity index 54% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyle.java rename to jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java index 5fb538bf60e..66c4d3afeb5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyle.java +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyle.java @@ -1,29 +1,44 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. * - * 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). + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. * - * 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. + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. */ -package com.sun.xml.internal.org.jvnet.ws; +package com.oracle.webservices.internal.api; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -47,7 +62,7 @@ import javax.xml.ws.spi.WebServiceFeatureAnnotation; * * @author shih-chang.chen@oracle.com */ -@WebServiceFeatureAnnotation(id="", bean=com.sun.xml.internal.org.jvnet.ws.EnvelopeStyleFeature.class) +@WebServiceFeatureAnnotation(id="", bean=com.oracle.webservices.internal.api.EnvelopeStyleFeature.class) @Retention(RetentionPolicy.RUNTIME) public @interface EnvelopeStyle { @@ -70,7 +85,7 @@ public @interface EnvelopeStyle { * SOAP1.2. For JAX-WS, this is mapped from: * javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING */ - SOAP12(SOAPBinding.SOAP11HTTP_BINDING), + SOAP12(SOAPBinding.SOAP12HTTP_BINDING), /** * The raw XML. For JAX-WS, this is mapped from: diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java new file mode 100644 index 00000000000..5b41eef5d6b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/EnvelopeStyleFeature.java @@ -0,0 +1,60 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api; + +import javax.xml.ws.WebServiceFeature; + +public class EnvelopeStyleFeature extends WebServiceFeature { + + private EnvelopeStyle.Style[] styles; + + public EnvelopeStyleFeature(EnvelopeStyle.Style... s) { + styles = s; + } + + public EnvelopeStyle.Style[] getStyles() { + return styles; + } + + public String getID() { + return EnvelopeStyleFeature.class.getName(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/Databinding.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java similarity index 53% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/Databinding.java rename to jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java index f1e1c50dfd8..45422a4b4bf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/Databinding.java +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/Databinding.java @@ -1,43 +1,56 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. * - * 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). + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. * - * 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. + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. */ -package com.sun.xml.internal.org.jvnet.ws.databinding; +package com.oracle.webservices.internal.api.databinding; -import java.io.File; import java.lang.reflect.Method; import java.net.URL; import javax.xml.namespace.QName; -import javax.xml.transform.Result; import javax.xml.transform.Source; -import javax.xml.ws.Holder; import javax.xml.ws.WebServiceFeature; -import com.sun.xml.internal.org.jvnet.ws.message.MessageContext; import org.xml.sax.EntityResolver; +import com.oracle.webservices.internal.api.message.MessageContext; + /** * {@code Databinding} is the entry point for all the WebService Databinding * functionality. Primarily, a Databinding is to serialize/deserialize an @@ -64,7 +77,7 @@ import org.xml.sax.EntityResolver; * * * - * @see com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingFactory + * @see com.oracle.webservices.internal.api.databinding.DatabindingFactory * * @author shih-chang.chen@oracle.com */ @@ -94,7 +107,7 @@ public interface Databinding { * Deserializes a response XML(SOAP) message to a JavaCallInfo instance * representing the return value or exception of a JAVA method call. * - * @param soap The response message + * @param message The response message * @param call The JavaCallInfo instance to be updated * * @return The JavaCallInfo updated with the return value or exception of a @@ -123,11 +136,19 @@ public interface Databinding { */ MessageContext serializeResponse(JavaCallInfo call); + /** + * Gets the MessageContextFactory + * + * @return The MessageContextFactory + */ +//Wait for WLS/src1212 - wls.jaxrpc wrapper +// MessageContextFactory getMessageContextFactory(); + /** * {@code Databinding.Builder}, created from the DatabindingFactory, is used to * configure how a Databinding instance is to be built from this builder. * - * @see com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingFactory + * @see com.oracle.webservices.internal.api.databinding.DatabindingFactory * @author shih-chang.chen@oracle.com */ public interface Builder { @@ -160,6 +181,8 @@ public interface Databinding { Builder portName(QName portName); /** + * @deprecated - no replacement - this was never implemented + * * Sets the WSDL URL where the WSDL can be read from * * @param wsdlURL The wsdlURL to set @@ -169,6 +192,8 @@ public interface Databinding { Builder wsdlURL(URL wsdlURL); /** + * @deprecated - no replacement - this was never implemented + * * Sets the WSDL Source where the WSDL can be read from * * @param wsdlSource The wsdlSource to set @@ -178,9 +203,11 @@ public interface Databinding { Builder wsdlSource(Source wsdlSource); /** - * Sets the EntityResolver for reading the WSDL + * @deprecated - no replacement - this was never implemented * - * @param wsdlURL The wsdlURL to set + * Sets the {@link EntityResolver} for reading the WSDL + * + * @param entityResolver The {@link EntityResolver} to set * * @return this Builder instance */ @@ -230,95 +257,6 @@ public interface Databinding { * * @return WSDLGenerator The WSDLGenerator */ - WSDLGenerator createWSDLGenerator(); - } - - /** - * WSDLGenerator is used to generate the WSDL representation of the service - * endpoint interface of the parent Databinding object. - */ - public interface WSDLGenerator { - - /** - * Sets the inlineSchema boolean. When the inlineSchema is true, the - * generated schema documents are embedded within the type element of - * the generated WSDL. When the inlineSchema is false, the generated - * schema documents are generated as standalone schema documents and - * imported into the generated WSDL. - * - * @param inline the inlineSchema boolean. - * @return - */ - WSDLGenerator inlineSchema(boolean inline); - - /** - * Sets A property of the WSDLGenerator - * - * @param name The name of the property - * @param value The value of the property - * - * @return this WSDLGenerator instance - */ - WSDLGenerator property(String name, Object value); - - /** - * Generates the WSDL using the wsdlResolver to output the generated - * documents. - * - * @param wsdlResolver The WSDLResolver - */ - void generate(WSDLResolver wsdlResolver); - - /** - * Generates the WSDL into the file directory - * - * @param outputDir The output file directory - * @param name The file name of the main WSDL document - */ - void generate(File outputDir, String name); - - /** - * WSDLResolver is used by WSDLGenerator while generating WSDL and its associated - * documents. It is used to control what documents need to be generated and what - * documents need to be picked from metadata. If endpont's document metadata - * already contains some documents, their systemids may be used for wsdl:import, - * and schema:import. The suggested filenames are relative urls(for e.g: EchoSchema1.xsd) - * The Result object systemids are also relative urls(for e.g: AbsWsdl.wsdl). - * - * @author Jitendra Kotamraju - */ - public interface WSDLResolver { - /** - * Create a Result object into which concrete WSDL is to be generated. - * - * @return Result for the concrete WSDL - */ - public Result getWSDL(String suggestedFilename); - - /** - * Create a Result object into which abstract WSDL is to be generated. If the the - * abstract WSDL is already in metadata, it is not generated. - * - * Update filename if the suggested filename need to be changed in wsdl:import. - * This needs to be done if the metadata contains abstract WSDL, and that systemid - * needs to be reflected in concrete WSDL's wsdl:import - * - * @return null if abstract WSDL need not be generated - */ - public Result getAbstractWSDL(Holder filename); - - /** - * Create a Result object into which schema doc is to be generated. Typically if - * there is a schema doc for namespace in metadata, then it is not generated. - * - * Update filename if the suggested filename need to be changed in xsd:import. This - * needs to be done if the metadata contains the document, and that systemid - * needs to be reflected in some other document's xsd:import - * - * @return null if schema need not be generated - */ - public Result getSchemaOutput(String namespace, Holder filename); - - } + com.oracle.webservices.internal.api.databinding.WSDLGenerator createWSDLGenerator(); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingFactory.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java similarity index 53% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingFactory.java rename to jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java index ebfa6862e02..351eb9f82ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingFactory.java +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingFactory.java @@ -1,29 +1,44 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. * - * 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). + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. * - * 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. + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. */ -package com.sun.xml.internal.org.jvnet.ws.databinding; +package com.oracle.webservices.internal.api.databinding; import java.util.Map; @@ -44,7 +59,7 @@ import java.util.Map; * * * - * @see com.sun.xml.internal.org.jvnet.ws.databinding.Databinding + * @see com.oracle.webservices.internal.api.databinding.Databinding * * @author shih-chang.chen@oracle.com */ @@ -91,10 +106,15 @@ public abstract class DatabindingFactory { static public DatabindingFactory newInstance() { try { Class cls = Class.forName(ImplClass); - return (DatabindingFactory) cls.newInstance(); + return convertIfNecessary(cls); } catch (Exception e) { e.printStackTrace(); } return null; } + + @SuppressWarnings("deprecation") + private static DatabindingFactory convertIfNecessary(Class cls) throws InstantiationException, IllegalAccessException { + return (DatabindingFactory) cls.newInstance(); + } } diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java new file mode 100644 index 00000000000..45f00f92a36 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingMode.java @@ -0,0 +1,52 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.databinding; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +import javax.xml.ws.spi.WebServiceFeatureAnnotation; + +@WebServiceFeatureAnnotation(id="", bean=com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class) +@Retention(RetentionPolicy.RUNTIME) +public @interface DatabindingMode { + String value(); +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java new file mode 100644 index 00000000000..f24a09e3ce3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/DatabindingModeFeature.java @@ -0,0 +1,92 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.databinding; + +import java.util.HashMap; +import java.util.Map; + +import javax.xml.ws.WebServiceFeature; + +public class DatabindingModeFeature extends WebServiceFeature { + /** + * Constant value identifying the DatabindingFeature + */ + static public final String ID = "http://jax-ws.java.net/features/databinding"; + + static public final String GLASSFISH_JAXB = "glassfish.jaxb"; + + //These constants should be defined in the corresponding plugin package +// static public final String ECLIPSELINK_JAXB = "eclipselink.jaxb"; +// static public final String ECLIPSELINK_SDO = "eclipselink.sdo"; +// static public final String TOPLINK_JAXB = "toplink.jaxb"; +// static public final String TOPLINK_SDO = "toplink.sdo"; + + private String mode; + private Map properties; + + public DatabindingModeFeature(String mode) { + super(); + this.mode = mode; + properties = new HashMap(); + } + + public String getMode() { + return mode; + } + + public String getID() { + return ID; + } + + public Map getProperties() { + return properties; + } + + public static Builder builder() { return new Builder(new DatabindingModeFeature(null)); } + + public final static class Builder { + final private DatabindingModeFeature o; + Builder(final DatabindingModeFeature x) { o = x; } + public DatabindingModeFeature build() { return o; } +// public DatabindingModeFeature build() { return (DatabindingModeFeature) FeatureValidator.validate(o); } + public Builder value(final String x) { o.mode = x; return this; } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java new file mode 100644 index 00000000000..776225028a2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/ExternalMetadataFeature.java @@ -0,0 +1,172 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.databinding; + +import com.sun.xml.internal.ws.api.databinding.MetadataReader; +import com.sun.xml.internal.ws.model.ExternalMetadataReader; + +import javax.xml.ws.WebServiceFeature; +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * WebServiceFeature allowing to define either on server or client side external xml descriptors replacing/supplementing + * WS metadata provided by class annotations. This can be useful if those annotations are missing (existing non-WS + * components) or if it is necessary to override those. + * + * @author Miroslav Kos (miroslav.kos at oracle.com) + */ +public class ExternalMetadataFeature extends WebServiceFeature { + + private static final String ID = "com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature"; + + /** + * Enable this feature. Defaults to true. + */ + private boolean enabled = true; + + private List resourceNames; + private List files; + + private ExternalMetadataFeature() { + } + + public void addResources(String... resourceNames) { + if (this.resourceNames == null) { + this.resourceNames = new ArrayList(); + } + Collections.addAll(this.resourceNames, resourceNames); + } + + public List getResourceNames() { return resourceNames; } + + public void addFiles(File... files) { + if (this.files == null) { + this.files = new ArrayList(); + } + Collections.addAll(this.files, files); + } + + public List getFiles() { return files; } + + public boolean isEnabled() { + return enabled; + } + + private void setEnabled(final boolean x) { + enabled = x; + } + + @Override + public String getID() { + return ID; + } + + public MetadataReader getMetadataReader(ClassLoader classLoader, boolean disableSecureXmlProcessing) { + return enabled ? new ExternalMetadataReader(files, resourceNames, classLoader, true, disableSecureXmlProcessing) : null; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + ExternalMetadataFeature that = (ExternalMetadataFeature) o; + + if (enabled != that.enabled) return false; + if (files != null ? !files.equals(that.files) : that.files != null) return false; + if (resourceNames != null ? !resourceNames.equals(that.resourceNames) : that.resourceNames != null) + return false; + + return true; + } + + @Override + public int hashCode() { + int result = (enabled ? 1 : 0); + result = 31 * result + (resourceNames != null ? resourceNames.hashCode() : 0); + result = 31 * result + (files != null ? files.hashCode() : 0); + return result; + } + + @Override + public String toString() { + return "[" + getID() + + ", enabled=" + enabled + + ", resourceNames=" + resourceNames + + ", files=" + files + + ']'; + } + + public static Builder builder() { + return new Builder(new ExternalMetadataFeature()); + } + + public final static class Builder { + final private ExternalMetadataFeature o; + + Builder(final ExternalMetadataFeature x) { + o = x; + } + + public ExternalMetadataFeature build() { + return o; + } + + public Builder addResources(String... res) { + o.addResources(res); + return this; + } + + public Builder addFiles(File... files) { + o.addFiles(files); + return this; + } + + public Builder setEnabled(boolean enabled) { + o.setEnabled(enabled); + return this; + } + + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/JavaCallInfo.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java similarity index 54% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/JavaCallInfo.java rename to jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java index 221958b650d..07c4f383e65 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/JavaCallInfo.java +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/JavaCallInfo.java @@ -1,29 +1,44 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. * - * 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). + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. * - * 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. + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. */ -package com.sun.xml.internal.org.jvnet.ws.databinding; +package com.oracle.webservices.internal.api.databinding; import java.lang.reflect.Method; diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java new file mode 100644 index 00000000000..70ff4e76276 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLGenerator.java @@ -0,0 +1,88 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.databinding; + +import java.io.File; + +/** + * WSDLGenerator is used to generate the WSDL representation of the service + * endpoint interface of the parent Databinding object. + */ +public interface WSDLGenerator { + + /** + * Sets the inlineSchema boolean. When the inlineSchema is true, the + * generated schema documents are embedded within the type element of + * the generated WSDL. When the inlineSchema is false, the generated + * schema documents are generated as standalone schema documents and + * imported into the generated WSDL. + * + * @param inline the inlineSchema boolean. + * @return + */ + WSDLGenerator inlineSchema(boolean inline); + + /** + * Sets A property of the WSDLGenerator + * + * @param name The name of the property + * @param value The value of the property + * + * @return this WSDLGenerator instance + */ + WSDLGenerator property(String name, Object value); + + /** + * Generates the WSDL using the wsdlResolver to output the generated + * documents. + * + * @param wsdlResolver The WSDLResolver + */ + void generate(com.oracle.webservices.internal.api.databinding.WSDLResolver wsdlResolver); + + /** + * Generates the WSDL into the file directory + * + * @param outputDir The output file directory + * @param name The file name of the main WSDL document + */ + void generate(File outputDir, String name); +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java new file mode 100644 index 00000000000..1cfb1b3a540 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/databinding/WSDLResolver.java @@ -0,0 +1,88 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.databinding; + +import javax.xml.transform.Result; +import javax.xml.ws.Holder; + +/** + * WSDLResolver is used by WSDLGenerator while generating WSDL and its associated + * documents. It is used to control what documents need to be generated and what + * documents need to be picked from metadata. If endpont's document metadata + * already contains some documents, their systemids may be used for wsdl:import, + * and schema:import. The suggested filenames are relative urls(for e.g: EchoSchema1.xsd) + * The Result object systemids are also relative urls(for e.g: AbsWsdl.wsdl). + * + * @author Jitendra Kotamraju + */ +public interface WSDLResolver { + /** + * Create a Result object into which concrete WSDL is to be generated. + * + * @return Result for the concrete WSDL + */ + public Result getWSDL(String suggestedFilename); + + /** + * Create a Result object into which abstract WSDL is to be generated. If the the + * abstract WSDL is already in metadata, it is not generated. + * + * Update filename if the suggested filename need to be changed in wsdl:import. + * This needs to be done if the metadata contains abstract WSDL, and that systemid + * needs to be reflected in concrete WSDL's wsdl:import + * + * @return null if abstract WSDL need not be generated + */ + public Result getAbstractWSDL(Holder filename); + + /** + * Create a Result object into which schema doc is to be generated. Typically if + * there is a schema doc for namespace in metadata, then it is not generated. + * + * Update filename if the suggested filename need to be changed in xsd:import. This + * needs to be done if the metadata contains the document, and that systemid + * needs to be reflected in some other document's xsd:import + * + * @return null if schema need not be generated + */ + public Result getSchemaOutput(String namespace, Holder filename); + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java new file mode 100644 index 00000000000..7d69c5fd7e9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BaseDistributedPropertySet.java @@ -0,0 +1,323 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.client.RequestContext; +import com.sun.xml.internal.ws.client.ResponseContext; + +import javax.xml.ws.WebServiceContext; + +import java.util.AbstractMap; +import java.util.Map.Entry; +import java.util.HashSet; +import java.util.IdentityHashMap; +import java.util.Map; +import java.util.Set; + +/** + * {@link PropertySet} that combines properties exposed from multiple + * {@link PropertySet}s into one. + * + *

+ * This implementation allows one {@link PropertySet} to assemble + * all properties exposed from other "satellite" {@link PropertySet}s. + * (A satellite may itself be a {@link DistributedPropertySet}, so + * in general this can form a tree.) + * + *

+ * This is useful for JAX-WS because the properties we expose to the application + * are contributed by different pieces, and therefore we'd like each of them + * to have a separate {@link PropertySet} implementation that backs up + * the properties. For example, this allows FastInfoset to expose its + * set of properties to {@link RequestContext} by using a strongly-typed fields. + * + *

+ * This is also useful for a client-side transport to expose a bunch of properties + * into {@link ResponseContext}. It simply needs to create a {@link PropertySet} + * object with methods for each property it wants to expose, and then add that + * {@link PropertySet} to {@link Packet}. This allows property values to be + * lazily computed (when actually asked by users), thus improving the performance + * of the typical case where property values are not asked. + * + *

+ * A similar benefit applies on the server-side, for a transport to expose + * a bunch of properties to {@link WebServiceContext}. + * + *

+ * To achieve these benefits, access to {@link DistributedPropertySet} is slower + * compared to {@link PropertySet} (such as get/set), while adding a satellite + * object is relatively fast. + * + * @author Kohsuke Kawaguchi + */ +public abstract class BaseDistributedPropertySet extends BasePropertySet implements DistributedPropertySet { + + /** + * All {@link PropertySet}s that are bundled into this {@link PropertySet}. + */ + private final Map, PropertySet> satellites + = new IdentityHashMap, PropertySet>(); + + private final Map viewthis; + + public BaseDistributedPropertySet() { + this.viewthis = super.createView(); + } + + @Override + public void addSatellite(@NotNull PropertySet satellite) { + addSatellite(satellite.getClass(), satellite); + } + + @Override + public void addSatellite(@NotNull Class keyClass, @NotNull PropertySet satellite) { + satellites.put(keyClass, satellite); + } + + @Override + public void removeSatellite(PropertySet satellite) { + satellites.remove(satellite.getClass()); + } + + public void copySatelliteInto(@NotNull DistributedPropertySet r) { + for (Map.Entry, PropertySet> entry : satellites.entrySet()) { + r.addSatellite(entry.getKey(), entry.getValue()); + } + } + + @Override + public void copySatelliteInto(MessageContext r) { + copySatelliteInto((DistributedPropertySet)r); + } + + @Override + public @Nullable T getSatellite(Class satelliteClass) { + T satellite = (T) satellites.get(satelliteClass); + if (satellite != null) { + return satellite; + } + + for (PropertySet child : satellites.values()) { + if (satelliteClass.isInstance(child)) { + return satelliteClass.cast(child); + } + + if (DistributedPropertySet.class.isInstance(child)) { + satellite = DistributedPropertySet.class.cast(child).getSatellite(satelliteClass); + if (satellite != null) { + return satellite; + } + } + } + return null; + } + + @Override + public Map, com.oracle.webservices.internal.api.message.PropertySet> getSatellites() { + return satellites; + } + + @Override + public Object get(Object key) { + // check satellites + for (PropertySet child : satellites.values()) { + if (child.supports(key)) { + return child.get(key); + } + } + + // otherwise it must be the master + return super.get(key); + } + + @Override + public Object put(String key, Object value) { + // check satellites + for (PropertySet child : satellites.values()) { + if(child.supports(key)) { + return child.put(key,value); + } + } + + // otherwise it must be the master + return super.put(key,value); + } + + @Override + public boolean containsKey(Object key) { + if (viewthis.containsKey(key)) + return true; + for (PropertySet child : satellites.values()) { + if (child.containsKey(key)) { + return true; + } + } + return false; + } + + @Override + public boolean supports(Object key) { + // check satellites + for (PropertySet child : satellites.values()) { + if (child.supports(key)) { + return true; + } + } + + return super.supports(key); + } + + @Override + public Object remove(Object key) { + // check satellites + for (PropertySet child : satellites.values()) { + if (child.supports(key)) { + return child.remove(key); + } + } + + return super.remove(key); + } + + @Override + protected void createEntrySet(Set> core) { + super.createEntrySet(core); + for (PropertySet child : satellites.values()) { + ((BasePropertySet) child).createEntrySet(core); + } + } + + protected Map asMapLocal() { + return viewthis; + } + + protected boolean supportsLocal(Object key) { + return super.supports(key); + } + + class DistributedMapView extends AbstractMap { + @Override + public Object get(Object key) { + for (PropertySet child : satellites.values()) { + if (child.supports(key)) { + return child.get(key); + } + } + + return viewthis.get(key); + } + + @Override + public int size() { + int size = viewthis.size(); + for (PropertySet child : satellites.values()) { + size += child.asMap().size(); + } + return size; + } + + @Override + public boolean containsKey(Object key) { + if (viewthis.containsKey(key)) + return true; + for (PropertySet child : satellites.values()) { + if (child.containsKey(key)) + return true; + } + return false; + } + + @Override + public Set> entrySet() { + Set> entries = new HashSet>(); + for (PropertySet child : satellites.values()) { + for (Entry entry : child.asMap().entrySet()) { + // the code below is here to avoid entries.addAll(child.asMap().entrySet()); which works differently on JDK6/7 + // see DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS + entries.add(new SimpleImmutableEntry(entry.getKey(), entry.getValue())); + } + } + for (Entry entry : viewthis.entrySet()) { + // the code below is here to avoid entries.addAll(child.asMap().entrySet()); which works differently on JDK6/7 + // see DMI_ENTRY_SETS_MAY_REUSE_ENTRY_OBJECTS + entries.add(new SimpleImmutableEntry(entry.getKey(), entry.getValue())); + } + + return entries; + } + + @Override + public Object put(String key, Object value) { + for (PropertySet child : satellites.values()) { + if (child.supports(key)) { + return child.put(key, value); + } + } + + return viewthis.put(key, value); + } + + @Override + public void clear() { + satellites.clear(); + viewthis.clear(); + } + + @Override + public Object remove(Object key) { + for (PropertySet child : satellites.values()) { + if (child.supports(key)) { + return child.remove(key); + } + } + + return viewthis.remove(key); + } + } + + @Override + protected Map createView() { + return new DistributedMapView(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java new file mode 100644 index 00000000000..7baf5c9a58f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/BasePropertySet.java @@ -0,0 +1,563 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.AbstractMap; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + + +/** + * A set of "properties" that can be accessed via strongly-typed fields + * as well as reflexibly through the property name. + * + * @author Kohsuke Kawaguchi + */ +@SuppressWarnings("SuspiciousMethodCalls") +public abstract class BasePropertySet implements PropertySet { + + /** + * Creates a new instance of TypedMap. + */ + protected BasePropertySet() { + } + + private Map mapView; + + /** + * Represents the list of strongly-typed known properties + * (keyed by property names.) + * + *

+ * Just giving it an alias to make the use of this class more fool-proof. + */ + protected static class PropertyMap extends HashMap { + + // the entries are often being iterated through so performance can be improved + // by their caching instead of iterating through the original (immutable) map each time + transient PropertyMapEntry[] cachedEntries = null; + + PropertyMapEntry[] getPropertyMapEntries() { + if (cachedEntries == null) { + cachedEntries = createPropertyMapEntries(); + } + return cachedEntries; + } + + private PropertyMapEntry[] createPropertyMapEntries() { + final PropertyMapEntry[] modelEntries = new PropertyMapEntry[size()]; + int i = 0; + for (final Entry e : entrySet()) { + modelEntries[i++] = new PropertyMapEntry(e.getKey(), e.getValue()); + } + return modelEntries; + } + + } + + /** + * PropertyMapEntry represents a Map.Entry in the PropertyMap with more efficient access. + */ + static public class PropertyMapEntry { + public PropertyMapEntry(String k, Accessor v) { + key = k; value = v; + } + String key; + Accessor value; + } + + /** + * Map representing the Fields and Methods annotated with {@link PropertySet.Property}. + * Model of {@link PropertySet} class. + * + *

+ * At the end of the derivation chain this method just needs to be implemented + * as: + * + *

+     * private static final PropertyMap model;
+     * static {
+     *   model = parse(MyDerivedClass.class);
+     * }
+     * protected PropertyMap getPropertyMap() {
+     *   return model;
+     * }
+     * 
+ */ + protected abstract PropertyMap getPropertyMap(); + + /** + * This method parses a class for fields and methods with {@link PropertySet.Property}. + */ + protected static PropertyMap parse(final Class clazz) { + // make all relevant fields and methods accessible. + // this allows runtime to skip the security check, so they runs faster. + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public PropertyMap run() { + PropertyMap props = new PropertyMap(); + for (Class c=clazz; c!=null; c=c.getSuperclass()) { + for (Field f : c.getDeclaredFields()) { + Property cp = f.getAnnotation(Property.class); + if(cp!=null) { + for(String value : cp.value()) { + props.put(value, new FieldAccessor(f, value)); + } + } + } + for (Method m : c.getDeclaredMethods()) { + Property cp = m.getAnnotation(Property.class); + if(cp!=null) { + String name = m.getName(); + assert name.startsWith("get") || name.startsWith("is"); + + String setName = name.startsWith("is") ? "set"+name.substring(2) : // isFoo -> setFoo + 's' +name.substring(1); // getFoo -> setFoo + Method setter; + try { + setter = clazz.getMethod(setName,m.getReturnType()); + } catch (NoSuchMethodException e) { + setter = null; // no setter + } + for(String value : cp.value()) { + props.put(value, new MethodAccessor(m, setter, value)); + } + } + } + } + + return props; + } + }); + } + + /** + * Represents a typed property defined on a {@link PropertySet}. + */ + protected interface Accessor { + String getName(); + boolean hasValue(PropertySet props); + Object get(PropertySet props); + void set(PropertySet props, Object value); + } + + static final class FieldAccessor implements Accessor { + /** + * Field with the annotation. + */ + private final Field f; + + /** + * One of the values in {@link Property} annotation on {@link #f}. + */ + private final String name; + + protected FieldAccessor(Field f, String name) { + this.f = f; + f.setAccessible(true); + this.name = name; + } + + @Override + public String getName() { + return name; + } + + @Override + public boolean hasValue(PropertySet props) { + return get(props)!=null; + } + + @Override + public Object get(PropertySet props) { + try { + return f.get(props); + } catch (IllegalAccessException e) { + throw new AssertionError(); + } + } + + @Override + public void set(PropertySet props, Object value) { + try { + f.set(props,value); + } catch (IllegalAccessException e) { + throw new AssertionError(); + } + } + } + + static final class MethodAccessor implements Accessor { + /** + * Getter method. + */ + private final @NotNull Method getter; + /** + * Setter method. + * Some property is read-only. + */ + private final @Nullable Method setter; + + /** + * One of the values in {@link Property} annotation on {@link #getter}. + */ + private final String name; + + protected MethodAccessor(Method getter, Method setter, String value) { + this.getter = getter; + this.setter = setter; + this.name = value; + getter.setAccessible(true); + if (setter!=null) { + setter.setAccessible(true); + } + } + + @Override + public String getName() { + return name; + } + + @Override + public boolean hasValue(PropertySet props) { + return get(props)!=null; + } + + @Override + public Object get(PropertySet props) { + try { + return getter.invoke(props); + } catch (IllegalAccessException e) { + throw new AssertionError(); + } catch (InvocationTargetException e) { + handle(e); + return 0; // never reach here + } + } + + @Override + public void set(PropertySet props, Object value) { + if(setter==null) { + throw new ReadOnlyPropertyException(getName()); + } + try { + setter.invoke(props,value); + } catch (IllegalAccessException e) { + throw new AssertionError(); + } catch (InvocationTargetException e) { + handle(e); + } + } + + /** + * Since we don't expect the getter/setter to throw a checked exception, + * it should be possible to make the exception propagation transparent. + * That's what we are trying to do here. + */ + private Exception handle(InvocationTargetException e) { + Throwable t = e.getTargetException(); + if (t instanceof Error) { + throw (Error)t; + } + if (t instanceof RuntimeException) { + throw (RuntimeException)t; + } + throw new Error(e); + } + } + + + /** + * Class allowing to work with PropertySet object as with a Map; it doesn't only allow to read properties from + * the map but also to modify the map in a way it is in sync with original strongly typed fields. It also allows + * (if necessary) to store additional properties those can't be found in strongly typed fields. + * + * @see com.sun.xml.internal.ws.api.PropertySet#asMap() method + */ + final class MapView extends HashMap { + + // flag if it should allow store also different properties + // than the from strongly typed fields + boolean extensible; + + MapView(boolean extensible) { + super(getPropertyMap().getPropertyMapEntries().length); + this.extensible = extensible; + initialize(); + } + + public void initialize() { + // iterate (cached) array instead of map to speed things up ... + PropertyMapEntry[] entries = getPropertyMap().getPropertyMapEntries(); + for (PropertyMapEntry entry : entries) { + super.put(entry.key, entry.value); + } + } + + @Override + public Object get(Object key) { + Object o = super.get(key); + if (o instanceof Accessor) { + return ((Accessor) o).get(BasePropertySet.this); + } else { + return o; + } + } + + @Override + public Set> entrySet() { + Set> entries = new HashSet>(); + for (String key : keySet()) { + entries.add(new SimpleImmutableEntry(key, get(key))); + } + return entries; + } + + @Override + public Object put(String key, Object value) { + + Object o = super.get(key); + if (o != null && o instanceof Accessor) { + + Object oldValue = ((Accessor) o).get(BasePropertySet.this); + ((Accessor) o).set(BasePropertySet.this, value); + return oldValue; + + } else { + + if (extensible) { + return super.put(key, value); + } else { + throw new IllegalStateException("Unknown property [" + key + "] for PropertySet [" + + BasePropertySet.this.getClass().getName() + "]"); + } + } + } + + @Override + public void clear() { + for (String key : keySet()) { + remove(key); + } + } + + @Override + public Object remove(Object key) { + Object o; + o = super.get(key); + if (o instanceof Accessor) { + ((Accessor)o).set(BasePropertySet.this, null); + } + return super.remove(key); + } + } + + @Override + public boolean containsKey(Object key) { + Accessor sp = getPropertyMap().get(key); + if (sp != null) { + return sp.get(this) != null; + } + return false; + } + + /** + * Gets the name of the property. + * + * @param key + * This field is typed as {@link Object} to follow the {@link Map#get(Object)} + * convention, but if anything but {@link String} is passed, this method + * just returns null. + */ + @Override + public Object get(Object key) { + Accessor sp = getPropertyMap().get(key); + if (sp != null) { + return sp.get(this); + } + throw new IllegalArgumentException("Undefined property "+key); + } + + /** + * Sets a property. + * + *

Implementation Note

+ * This method is slow. Code inside JAX-WS should define strongly-typed + * fields in this class and access them directly, instead of using this. + * + * @throws ReadOnlyPropertyException + * if the given key is an alias of a strongly-typed field, + * and if the name object given is not assignable to the field. + * + * @see Property + */ + @Override + public Object put(String key, Object value) { + Accessor sp = getPropertyMap().get(key); + if(sp!=null) { + Object old = sp.get(this); + sp.set(this,value); + return old; + } else { + throw new IllegalArgumentException("Undefined property "+key); + } + } + + /** + * Checks if this {@link PropertySet} supports a property of the given name. + */ + @Override + public boolean supports(Object key) { + return getPropertyMap().containsKey(key); + } + + @Override + public Object remove(Object key) { + Accessor sp = getPropertyMap().get(key); + if(sp!=null) { + Object old = sp.get(this); + sp.set(this,null); + return old; + } else { + throw new IllegalArgumentException("Undefined property "+key); + } + } + + /** + * Creates a {@link Map} view of this {@link PropertySet}. + * + *

+ * This map is partially live, in the sense that values you set to it + * will be reflected to {@link PropertySet}. + * + *

+ * However, this map may not pick up changes made + * to {@link PropertySet} after the view is created. + * + * @deprecated use newer implementation {@link PropertySet#asMap()} which produces + * readwrite {@link Map} + * + * @return + * always non-null valid instance. + */ + @Deprecated + @Override + public final Map createMapView() { + final Set> core = new HashSet>(); + createEntrySet(core); + + return new AbstractMap() { + @Override + public Set> entrySet() { + return core; + } + }; + } + + /** + * Creates a modifiable {@link Map} view of this {@link PropertySet}. + *

+ * Changes done on this {@link Map} or on {@link PropertySet} object work in both directions - values made to + * {@link Map} are reflected to {@link PropertySet} and changes done using getters/setters on {@link PropertySet} + * object are automatically reflected in this {@link Map}. + *

+ * If necessary, it also can hold other values (not present on {@link PropertySet}) - + * {@see PropertySet#mapAllowsAdditionalProperties} + * + * @return always non-null valid instance. + */ + @Override + public Map asMap() { + if (mapView == null) { + mapView = createView(); + } + return mapView; + } + + protected Map createView() { + return new MapView(mapAllowsAdditionalProperties()); + } + + /** + * Used when constructing the {@link MapView} for this object - it controls if the {@link MapView} servers only to + * access strongly typed values or allows also different values + * + * @return true if {@link Map} should allow also properties not defined as strongly typed fields + */ + protected boolean mapAllowsAdditionalProperties() { + return false; + } + + protected void createEntrySet(Set> core) { + for (final Entry e : getPropertyMap().entrySet()) { + core.add(new Entry() { + @Override + public String getKey() { + return e.getKey(); + } + + @Override + public Object getValue() { + return e.getValue().get(BasePropertySet.this); + } + + @Override + public Object setValue(Object value) { + Accessor acc = e.getValue(); + Object old = acc.get(BasePropertySet.this); + acc.set(BasePropertySet.this,value); + return old; + } + }); + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java new file mode 100644 index 00000000000..c6f0c1ec49d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ContentType.java @@ -0,0 +1,93 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +//TODO Do we want to remove this implementation dependency? +import com.sun.xml.internal.ws.encoding.ContentTypeImpl; + +/** + * A Content-Type transport header that will be returned by {@link MessageContext#write(java.io.OutputStream)}. + * It will provide the Content-Type header and also take care of SOAP 1.1 SOAPAction header. + * + * @author Vivek Pandey + */ +public interface ContentType { + + /** + * Gives non-null Content-Type header value. + */ + public String getContentType(); + + /** + * Gives SOAPAction transport header value. It will be non-null only for SOAP 1.1 messages. In other cases + * it MUST be null. The SOAPAction transport header should be written out only when its non-null. + * + * @return It can be null, in that case SOAPAction header should be written. + */ + public String getSOAPActionHeader(); + + /** + * Controls the Accept transport header, if the transport supports it. + * Returning null means the transport need not add any new header. + * + *

+ * We realize that this is not an elegant abstraction, but + * this would do for now. If another person comes and asks for + * a similar functionality, we'll define a real abstraction. + */ + public String getAcceptHeader(); + + static public class Builder { + private String contentType; + private String soapAction; + private String accept; + private String charset; + + public Builder contentType(String s) {contentType = s; return this; } + public Builder soapAction (String s) {soapAction = s; return this; } + public Builder accept (String s) {accept = s; return this; } + public Builder charset (String s) {charset = s; return this; } + public ContentType build() { + //TODO Do we want to remove this implementation dependency? + return new ContentTypeImpl(contentType, soapAction, accept, charset); + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java new file mode 100644 index 00000000000..76eaaa04e62 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/DistributedPropertySet.java @@ -0,0 +1,96 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +import java.util.Map; + +import com.sun.istack.internal.Nullable; + +/** + * {@link PropertySet} that combines properties exposed from multiple + * {@link PropertySet}s into one. + * + *

+ * This implementation allows one {@link PropertySet} to assemble + * all properties exposed from other "satellite" {@link PropertySet}s. + * (A satellite may itself be a {@link DistributedPropertySet}, so + * in general this can form a tree.) + * + *

+ * This is useful for JAX-WS because the properties we expose to the application + * are contributed by different pieces, and therefore we'd like each of them + * to have a separate {@link PropertySet} implementation that backs up + * the properties. For example, this allows FastInfoset to expose its + * set of properties to {@link RequestContext} by using a strongly-typed fields. + * + *

+ * This is also useful for a client-side transport to expose a bunch of properties + * into {@link ResponseContext}. It simply needs to create a {@link PropertySet} + * object with methods for each property it wants to expose, and then add that + * {@link PropertySet} to {@link Packet}. This allows property values to be + * lazily computed (when actually asked by users), thus improving the performance + * of the typical case where property values are not asked. + * + *

+ * A similar benefit applies on the server-side, for a transport to expose + * a bunch of properties to {@link WebServiceContext}. + * + *

+ * To achieve these benefits, access to {@link DistributedPropertySet} is slower + * compared to {@link PropertySet} (such as get/set), while adding a satellite + * object is relatively fast. + * + * @author Kohsuke Kawaguchi + */ +public interface DistributedPropertySet extends com.oracle.webservices.internal.api.message.PropertySet { + + public @Nullable T getSatellite(Class satelliteClass); + + public Map, com.oracle.webservices.internal.api.message.PropertySet> getSatellites(); + + public void addSatellite(com.oracle.webservices.internal.api.message.PropertySet satellite); + + public void addSatellite(Class keyClass, com.oracle.webservices.internal.api.message.PropertySet satellite); + + public void removeSatellite(com.oracle.webservices.internal.api.message.PropertySet satellite); + + public void copySatelliteInto(com.oracle.webservices.internal.api.message.MessageContext r); +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java new file mode 100644 index 00000000000..9ae9a03a3da --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContext.java @@ -0,0 +1,116 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +import java.io.IOException; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.nio.channels.WritableByteChannel; + +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPMessage; + +/** + * MessageContext represents a container of a SOAP message and all the properties + * including the transport headers. + * + * MessageContext is a composite {@link PropertySet} that combines properties exposed from multiple + * {@link PropertySet}s into one. + * + *

+ * This implementation allows one {@link PropertySet} to assemble + * all properties exposed from other "satellite" {@link PropertySet}s. + * (A satellite may itself be a {@link DistributedPropertySet}, so + * in general this can form a tree.) + * + * @author shih-chang.chen@oracle.com + */ +public interface MessageContext extends DistributedPropertySet { + /** + * Gets the SAAJ SOAPMessage representation of the SOAP message. + * + * @return The SOAPMessage + */ + SOAPMessage getAsSOAPMessage() throws SOAPException; + + /** + * Gets the SAAJ SOAPMessage representation of the SOAP message. + * @deprecated use getAsSOAPMessage + * @return The SOAPMessage + */ + SOAPMessage getSOAPMessage() throws SOAPException; + + /** + * Writes the XML infoset portion of this MessageContext + * (from <soap:Envelope> to </soap:Envelope>). + * + * @param out + * Must not be null. The caller is responsible for closing the stream, + * not the callee. + * + * @return + * The MIME content type of the encoded message (such as "application/xml"). + * This information is often ncessary by transport. + * + * @throws IOException + * if a {@link OutputStream} throws {@link IOException}. + */ + ContentType writeTo( OutputStream out ) throws IOException; + + /** + * The version of {@link #writeTo(OutputStream)} + * that writes to NIO {@link ByteBuffer}. + * + *

+ * TODO: for the convenience of implementation, write + * an adapter that wraps {@link WritableByteChannel} to {@link OutputStream}. + */ +// ContentType writeTo( WritableByteChannel buffer ); + + /** + * Gets the Content-type of this message. For an out-bound message that this getContentType() + * method returns a null, the Content-Type can be determined only by calling the writeTo + * method to write the MessageContext to an OutputStream. + * + * @return The MIME content type of this message + */ + ContentType getContentType(); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContextFactory.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java similarity index 59% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContextFactory.java rename to jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java index de131291188..39baadbd25f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContextFactory.java +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/MessageContextFactory.java @@ -1,125 +1,65 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. * - * 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). + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. * - * 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. + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. */ -package com.sun.xml.internal.org.jvnet.ws.message; +package com.oracle.webservices.internal.api.message; import java.io.IOException; import java.io.InputStream; +import com.oracle.webservices.internal.api.EnvelopeStyle; import com.sun.xml.internal.ws.api.SOAPVersion; // TODO leaking RI APIs -import com.sun.xml.internal.ws.api.message.Message; -import com.sun.xml.internal.ws.api.message.Messages; -import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.util.ServiceFinder; -//import java.io.InputStream; +import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPMessage; import javax.xml.transform.Source; import javax.xml.ws.WebServiceFeature; -import com.sun.xml.internal.org.jvnet.ws.EnvelopeStyle; -import com.sun.xml.internal.org.jvnet.ws.message.MessageContext; - public abstract class MessageContextFactory { private static final MessageContextFactory DEFAULT = new com.sun.xml.internal.ws.api.message.MessageContextFactory(new WebServiceFeature[0]); - /** - * @deprecated - */ - public abstract MessageContext doCreate(); - - /** - * @deprecated - */ - public abstract MessageContext doCreate(SOAPMessage m); - //public abstract MessageContext doCreate(InputStream x); - - /** - * @deprecated - */ - public abstract MessageContext doCreate(Source x, SOAPVersion soapVersion); - - /** - * @deprecated - */ - public static MessageContext create(final ClassLoader... classLoader) { - return serviceFinder(classLoader, - new Creator() { - public MessageContext create(final MessageContextFactory f) { - return f.doCreate(); - } - }); - } - - /** - * @deprecated - */ - public static MessageContext create(final SOAPMessage m, final ClassLoader... classLoader) { - return serviceFinder(classLoader, - new Creator() { - public MessageContext create(final MessageContextFactory f) { - return f.doCreate(m); - } - }); - } - - /** - * @deprecated - */ - public static MessageContext create(final Source m, final SOAPVersion v, final ClassLoader... classLoader) { - return serviceFinder(classLoader, - new Creator() { - public MessageContext create(final MessageContextFactory f) { - return f.doCreate(m, v); - } - }); - } - - /** - * @deprecated - */ - private static MessageContext serviceFinder(final ClassLoader[] classLoader, final Creator creator) { - final ClassLoader cl = classLoader.length == 0 ? null : classLoader[0]; - for (MessageContextFactory factory : ServiceFinder.find(MessageContextFactory.class, cl)) { - final MessageContext messageContext = creator.create(factory); - if (messageContext != null) - return messageContext; - } - return creator.create(DEFAULT); - } - - /** - * @deprecated - */ - private static interface Creator { - public MessageContext create(MessageContextFactory f); - } - protected abstract MessageContextFactory newFactory(WebServiceFeature ... f); + public abstract MessageContext createContext(); + public abstract MessageContext createContext(SOAPMessage m); public abstract MessageContext createContext(Source m); @@ -128,6 +68,12 @@ public abstract class MessageContextFactory public abstract MessageContext createContext(InputStream in, String contentType) throws IOException; + /** + * @deprecated http://java.net/jira/browse/JAX_WS-1077 + */ + @Deprecated + public abstract MessageContext createContext(InputStream in, MimeHeaders headers) throws IOException; + static public MessageContextFactory createFactory(WebServiceFeature ... f) { return createFactory(null, f); } @@ -139,4 +85,61 @@ public abstract class MessageContextFactory } return new com.sun.xml.internal.ws.api.message.MessageContextFactory(f); } + + @Deprecated + public abstract MessageContext doCreate(); + + @Deprecated + public abstract MessageContext doCreate(SOAPMessage m); + + //public abstract MessageContext doCreate(InputStream x); + + @Deprecated + public abstract MessageContext doCreate(Source x, SOAPVersion soapVersion); + + @Deprecated + public static MessageContext create(final ClassLoader... classLoader) { + return serviceFinder(classLoader, + new Creator() { + public MessageContext create(final MessageContextFactory f) { + return f.doCreate(); + } + }); + } + + @Deprecated + public static MessageContext create(final SOAPMessage m, final ClassLoader... classLoader) { + return serviceFinder(classLoader, + new Creator() { + public MessageContext create(final MessageContextFactory f) { + return f.doCreate(m); + } + }); + } + + @Deprecated + public static MessageContext create(final Source m, final SOAPVersion v, final ClassLoader... classLoader) { + return serviceFinder(classLoader, + new Creator() { + public MessageContext create(final MessageContextFactory f) { + return f.doCreate(m, v); + } + }); + } + + @Deprecated + private static MessageContext serviceFinder(final ClassLoader[] classLoader, final Creator creator) { + final ClassLoader cl = classLoader.length == 0 ? null : classLoader[0]; + for (MessageContextFactory factory : ServiceFinder.find(MessageContextFactory.class, cl)) { + final MessageContext messageContext = creator.create(factory); + if (messageContext != null) + return messageContext; + } + return creator.create(DEFAULT); + } + + @Deprecated + private static interface Creator { + public MessageContext create(MessageContextFactory f); + } } diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java new file mode 100644 index 00000000000..6a765a4f3ff --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/PropertySet.java @@ -0,0 +1,149 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import java.util.Map; + +import javax.xml.ws.handler.MessageContext; + +/** + * A set of "properties" that can be accessed via strongly-typed fields + * as well as reflexibly through the property name. + * + * @author Kohsuke Kawaguchi + */ +public interface PropertySet { + + /** + * Marks a field on {@link PropertySet} as a + * property of {@link MessageContext}. + * + *

+ * To make the runtime processing easy, this annotation + * must be on a public field (since the property name + * can be set through {@link Map} anyway, you won't be + * losing abstraction by doing so.) + * + *

+ * For similar reason, this annotation can be only placed + * on a reference type, not primitive type. + * + * @author Kohsuke Kawaguchi + */ + @Inherited + @Retention(RetentionPolicy.RUNTIME) + @Target({ElementType.FIELD,ElementType.METHOD}) + public @interface Property { + /** + * Name of the property. + */ + String[] value(); + } + + public boolean containsKey(Object key); + + /** + * Gets the name of the property. + * + * @param key + * This field is typed as {@link Object} to follow the {@link Map#get(Object)} + * convention, but if anything but {@link String} is passed, this method + * just returns null. + */ + public Object get(Object key); + + /** + * Sets a property. + * + *

Implementation Note

+ * This method is slow. Code inside JAX-WS should define strongly-typed + * fields in this class and access them directly, instead of using this. + * + * @see Property + */ + public Object put(String key, Object value); + + /** + * Checks if this {@link PropertySet} supports a property of the given name. + */ + public boolean supports(Object key); + + public Object remove(Object key); + + /** + * Creates a {@link Map} view of this {@link PropertySet}. + * + *

+ * This map is partially live, in the sense that values you set to it + * will be reflected to {@link PropertySet}. + * + *

+ * However, this map may not pick up changes made + * to {@link PropertySet} after the view is created. + * + * @deprecated use newer implementation {@link com.sun.xml.internal.ws.api.PropertySet#asMap()} which produces + * readwrite {@link Map} + * + * @return + * always non-null valid instance. + */ + @Deprecated + public Map createMapView(); + + /** + * Creates a modifiable {@link Map} view of this {@link PropertySet}. + *

+ * Changes done on this {@link Map} or on {@link PropertySet} object work in both directions - values made to + * {@link Map} are reflected to {@link PropertySet} and changes done using getters/setters on {@link PropertySet} + * object are automatically reflected in this {@link Map}. + *

+ * If necessary, it also can hold other values (not present on {@link PropertySet}) - + * {@see PropertySet#mapAllowsAdditionalProperties} + * + * @return always non-null valid instance. + */ + public Map asMap(); +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java new file mode 100644 index 00000000000..0bf45691db3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/api/message/ReadOnlyPropertyException.java @@ -0,0 +1,63 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.api.message; + +/** + * Used to indicate that {@link PropertySet#put(String, Object)} failed + * because a property is read-only. + * + * @author Kohsuke Kawaguchi + */ +public class ReadOnlyPropertyException extends IllegalArgumentException { + private final String propertyName; + + public ReadOnlyPropertyException(String propertyName) { + super(propertyName+" is a read-only property."); + this.propertyName = propertyName; + } + + /** + * Gets the name of the property that was read-only. + */ + public String getPropertyName() { + return propertyName; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java new file mode 100644 index 00000000000..198f19e3b34 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/encoding/StreamDecoderImpl.java @@ -0,0 +1,67 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.impl.encoding; + +import java.io.IOException; +import java.io.InputStream; + +import javax.xml.stream.XMLStreamReader; + +import com.oracle.webservices.internal.impl.internalspi.encoding.StreamDecoder; + +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.message.AttachmentSet; +import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; +import com.sun.xml.internal.ws.encoding.StreamSOAPCodec; +import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader; + +public class StreamDecoderImpl implements StreamDecoder { + + @Override + public Message decode(InputStream in, String charset, + AttachmentSet att, SOAPVersion soapVersion) throws IOException { + XMLStreamReader reader = XMLStreamReaderFactory.create(null, in, charset, true); + reader = new TidyXMLStreamReader(reader, in); + return StreamSOAPCodec.decode(soapVersion, reader, att); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java new file mode 100644 index 00000000000..5e1ddea28b4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/webservices/internal/impl/internalspi/encoding/StreamDecoder.java @@ -0,0 +1,60 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 1997-2013 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.webservices.internal.impl.internalspi.encoding; + +import java.io.IOException; +import java.io.InputStream; + +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.message.AttachmentSet; +import com.sun.xml.internal.ws.api.message.Message; + +/** + * Decodes SOAPEnvelope read from an InputStream into a Message instance. + * This SPI allows for other implementations instead of the default, which is based on XMLStreamReader. + * + * @since 2.2.9 + */ +public interface StreamDecoder { + Message decode( + InputStream in, String charset, + AttachmentSet att, SOAPVersion soapVersion) throws IOException; +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java new file mode 100644 index 00000000000..f0a6d6489e8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ExistingAnnotationsType.java @@ -0,0 +1,92 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import javax.xml.bind.annotation.XmlType; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for existing-annotations-type. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="existing-annotations-type">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="merge"/>
+ *     <enumeration value="ignore"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "existing-annotations-type") +@XmlEnum +public enum ExistingAnnotationsType { + + @XmlEnumValue("merge") + MERGE("merge"), + @XmlEnumValue("ignore") + IGNORE("ignore"); + private final String value; + + ExistingAnnotationsType(String v) { + value = v; + } + + public String value() { + return value; + } + + public static ExistingAnnotationsType fromValue(String v) { + for (ExistingAnnotationsType c: ExistingAnnotationsType.values()) { + if (c.value.equals(v)) { + return c; + } + } + throw new IllegalArgumentException(v); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java new file mode 100644 index 00000000000..d668bb8cf87 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaMethod.java @@ -0,0 +1,280 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <group ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}method-annotation" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="java-params" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-param" maxOccurs="unbounded"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <anyAttribute processContents='skip' namespace='##other'/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "methodAnnotation", + "javaParams" +}) +@XmlRootElement(name = "java-method") +public class JavaMethod { + + @XmlElementRefs({ + @XmlElementRef(name = "web-endpoint", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebEndpoint.class, required = false), + @XmlElementRef(name = "oneway", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlOneway.class, required = false), + @XmlElementRef(name = "action", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlAction.class, required = false), + @XmlElementRef(name = "soap-binding", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlSOAPBinding.class, required = false), + @XmlElementRef(name = "web-result", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebResult.class, required = false), + @XmlElementRef(name = "web-method", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebMethod.class, required = false) + }) + @XmlAnyElement + protected List methodAnnotation; + @XmlElement(name = "java-params") + protected JavaMethod.JavaParams javaParams; + @XmlAttribute(name = "name", required = true) + protected String name; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the methodAnnotation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the methodAnnotation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getMethodAnnotation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XmlWebEndpoint } + * {@link XmlOneway } + * {@link XmlAction } + * {@link XmlSOAPBinding } + * {@link XmlWebResult } + * {@link XmlWebMethod } + * {@link Element } + * + * + */ + public List getMethodAnnotation() { + if (methodAnnotation == null) { + methodAnnotation = new ArrayList(); + } + return this.methodAnnotation; + } + + /** + * Gets the value of the javaParams property. + * + * @return + * possible object is + * {@link JavaMethod.JavaParams } + * + */ + public JavaMethod.JavaParams getJavaParams() { + return javaParams; + } + + /** + * Sets the value of the javaParams property. + * + * @param value + * allowed object is + * {@link JavaMethod.JavaParams } + * + */ + public void setJavaParams(JavaMethod.JavaParams value) { + this.javaParams = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-param" maxOccurs="unbounded"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "javaParam" + }) + public static class JavaParams { + + @XmlElement(name = "java-param", required = true) + protected List javaParam; + + /** + * Gets the value of the javaParam property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the javaParam property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getJavaParam().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JavaParam } + * + * + */ + public List getJavaParam() { + if (javaParam == null) { + javaParam = new ArrayList(); + } + return this.javaParam; + } + + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java new file mode 100644 index 00000000000..e08ba7304a1 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaParam.java @@ -0,0 +1,167 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <group ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}param-annotation" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="java-type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <anyAttribute processContents='skip' namespace='##other'/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "paramAnnotation" +}) +@XmlRootElement(name = "java-param") +public class JavaParam { + + @XmlElementRef(name = "web-param", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebParam.class, required = false) + @XmlAnyElement + protected List paramAnnotation; + @XmlAttribute(name = "java-type") + protected String javaType; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the paramAnnotation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the paramAnnotation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getParamAnnotation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XmlWebParam } + * {@link Element } + * + * + */ + public List getParamAnnotation() { + if (paramAnnotation == null) { + paramAnnotation = new ArrayList(); + } + return this.paramAnnotation; + } + + /** + * Gets the value of the javaType property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getJavaType() { + return javaType; + } + + /** + * Sets the value of the javaType property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setJavaType(String value) { + this.javaType = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java new file mode 100644 index 00000000000..c352bb8f8d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/JavaWsdlMappingType.java @@ -0,0 +1,466 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAnyAttribute; +import javax.xml.bind.annotation.XmlAnyElement; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementRef; +import javax.xml.bind.annotation.XmlElementRefs; +import javax.xml.bind.annotation.XmlType; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for java-wsdl-mapping-type complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType name="java-wsdl-mapping-type">
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element name="xml-schema-mapping" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <any maxOccurs="unbounded" minOccurs="0"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *         <group ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}class-annotation" maxOccurs="unbounded" minOccurs="0"/>
+ *         <element name="java-methods" minOccurs="0">
+ *           <complexType>
+ *             <complexContent>
+ *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *                 <sequence>
+ *                   <element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-method" maxOccurs="unbounded" minOccurs="0"/>
+ *                 </sequence>
+ *               </restriction>
+ *             </complexContent>
+ *           </complexType>
+ *         </element>
+ *       </sequence>
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="java-type-name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="existing-annotations" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}existing-annotations-type" />
+ *       <attribute name="databinding" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <anyAttribute processContents='skip' namespace='##other'/>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "java-wsdl-mapping-type", propOrder = { + "xmlSchemaMapping", + "classAnnotation", + "javaMethods" +}) +public class JavaWsdlMappingType { + + @XmlElement(name = "xml-schema-mapping") + protected JavaWsdlMappingType.XmlSchemaMapping xmlSchemaMapping; + @XmlElementRefs({ + @XmlElementRef(name = "web-service-client", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebServiceClient.class, required = false), + @XmlElementRef(name = "binding-type", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlBindingType.class, required = false), + @XmlElementRef(name = "web-service", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebService.class, required = false), + @XmlElementRef(name = "web-fault", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlWebFault.class, required = false), + @XmlElementRef(name = "service-mode", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlServiceMode.class, required = false), + @XmlElementRef(name = "mtom", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlMTOM.class, required = false), + @XmlElementRef(name = "handler-chain", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlHandlerChain.class, required = false), + @XmlElementRef(name = "soap-binding", namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", type = XmlSOAPBinding.class, required = false) + }) + @XmlAnyElement + protected List classAnnotation; + @XmlElement(name = "java-methods") + protected JavaWsdlMappingType.JavaMethods javaMethods; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "java-type-name") + protected String javaTypeName; + @XmlAttribute(name = "existing-annotations") + protected ExistingAnnotationsType existingAnnotations; + @XmlAttribute(name = "databinding") + protected String databinding; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the xmlSchemaMapping property. + * + * @return + * possible object is + * {@link JavaWsdlMappingType.XmlSchemaMapping } + * + */ + public JavaWsdlMappingType.XmlSchemaMapping getXmlSchemaMapping() { + return xmlSchemaMapping; + } + + /** + * Sets the value of the xmlSchemaMapping property. + * + * @param value + * allowed object is + * {@link JavaWsdlMappingType.XmlSchemaMapping } + * + */ + public void setXmlSchemaMapping(JavaWsdlMappingType.XmlSchemaMapping value) { + this.xmlSchemaMapping = value; + } + + /** + * + * The class-annotation group defines the set of + * annotations applicable to the Java class + * declaration. + * Gets the value of the classAnnotation property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the classAnnotation property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getClassAnnotation().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XmlWebServiceClient } + * {@link XmlBindingType } + * {@link XmlWebService } + * {@link XmlWebFault } + * {@link XmlServiceMode } + * {@link XmlMTOM } + * {@link XmlHandlerChain } + * {@link Element } + * {@link XmlSOAPBinding } + * + * + */ + public List getClassAnnotation() { + if (classAnnotation == null) { + classAnnotation = new ArrayList(); + } + return this.classAnnotation; + } + + /** + * Gets the value of the javaMethods property. + * + * @return + * possible object is + * {@link JavaWsdlMappingType.JavaMethods } + * + */ + public JavaWsdlMappingType.JavaMethods getJavaMethods() { + return javaMethods; + } + + /** + * Sets the value of the javaMethods property. + * + * @param value + * allowed object is + * {@link JavaWsdlMappingType.JavaMethods } + * + */ + public void setJavaMethods(JavaWsdlMappingType.JavaMethods value) { + this.javaMethods = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the javaTypeName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getJavaTypeName() { + return javaTypeName; + } + + /** + * Sets the value of the javaTypeName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setJavaTypeName(String value) { + this.javaTypeName = value; + } + + /** + * Gets the value of the classAnnotations property. + * + * @return + * possible object is + * {@link ExistingAnnotationsType } + * + */ + public ExistingAnnotationsType getExistingAnnotations() { + return existingAnnotations; + } + + /** + * Sets the value of the classAnnotations property. + * + * @param value + * allowed object is + * {@link ExistingAnnotationsType } + * + */ + public void setExistingAnnotations(ExistingAnnotationsType value) { + this.existingAnnotations = value; + } + + /** + * Gets the value of the databinding property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDatabinding() { + return databinding; + } + + /** + * Sets the value of the databinding property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDatabinding(String value) { + this.databinding = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

+ * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}java-method" maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "javaMethod" + }) + public static class JavaMethods { + + @XmlElement(name = "java-method") + protected List javaMethod; + + /** + * Gets the value of the javaMethod property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the javaMethod property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getJavaMethod().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link JavaMethod } + * + * + */ + public List getJavaMethod() { + if (javaMethod == null) { + javaMethod = new ArrayList(); + } + return this.javaMethod; + } + + } + + + /** + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+     * <complexType>
+     *   <complexContent>
+     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+     *       <sequence>
+     *         <any maxOccurs="unbounded" minOccurs="0"/>
+     *       </sequence>
+     *     </restriction>
+     *   </complexContent>
+     * </complexType>
+     * 
+ * + * + */ + @XmlAccessorType(XmlAccessType.FIELD) + @XmlType(name = "", propOrder = { + "any" + }) + public static class XmlSchemaMapping { + + @XmlAnyElement(lax = true) + protected List any; + + /** + * Gets the value of the any property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

+ * For example, to add a new item, do as follows: + *

+         *    getAny().add(newItem);
+         * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java new file mode 100644 index 00000000000..5e8de6b7515 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/ObjectFactory.java @@ -0,0 +1,283 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the com.sun.xml.internal.ws.ext2.java_wsdl package. + *

An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _JavaWsdlMapping_QNAME = new QName("http://xmlns.oracle.com/webservices/jaxws-databinding", "java-wsdl-mapping"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.sun.xml.internal.ws.ext2.java_wsdl + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link JavaMethod } + * + */ + public JavaMethod createJavaMethod() { + return new JavaMethod(); + } + + /** + * Create an instance of {@link JavaWsdlMappingType } + * + */ + public JavaWsdlMappingType createJavaWsdlMappingType() { + return new JavaWsdlMappingType(); + } + + /** + * Create an instance of {@link XmlWebEndpoint } + * + */ + public XmlWebEndpoint createWebEndpoint() { + return new XmlWebEndpoint(); + } + + /** + * Create an instance of {@link XmlMTOM } + * + */ + public XmlMTOM createMtom() { + return new XmlMTOM(); + } + + /** + * Create an instance of {@link XmlWebServiceClient } + * + */ + public XmlWebServiceClient createWebServiceClient() { + return new XmlWebServiceClient(); + } + + /** + * Create an instance of {@link XmlServiceMode } + * + */ + public XmlServiceMode createServiceMode() { + return new XmlServiceMode(); + } + + /** + * Create an instance of {@link XmlBindingType } + * + */ + public XmlBindingType createBindingType() { + return new XmlBindingType(); + } + + /** + * Create an instance of {@link XmlWebServiceRef } + * + */ + public XmlWebServiceRef createWebServiceRef() { + return new XmlWebServiceRef(); + } + + /** + * Create an instance of {@link JavaParam } + * + */ + public JavaParam createJavaParam() { + return new JavaParam(); + } + + /** + * Create an instance of {@link XmlWebParam } + * + */ + public XmlWebParam createWebParam() { + return new XmlWebParam(); + } + + /** + * Create an instance of {@link XmlWebMethod } + * + */ + public XmlWebMethod createWebMethod() { + return new XmlWebMethod(); + } + + /** + * Create an instance of {@link XmlWebResult } + * + */ + public XmlWebResult createWebResult() { + return new XmlWebResult(); + } + + /** + * Create an instance of {@link XmlOneway } + * + */ + public XmlOneway createOneway() { + return new XmlOneway(); + } + + /** + * Create an instance of {@link XmlSOAPBinding } + * + */ + public XmlSOAPBinding createSoapBinding() { + return new XmlSOAPBinding(); + } + + /** + * Create an instance of {@link XmlAction } + * + */ + public XmlAction createAction() { + return new XmlAction(); + } + + /** + * Create an instance of {@link XmlFaultAction } + * + */ + public XmlFaultAction createFaultAction() { + return new XmlFaultAction(); + } + + /** + * Create an instance of {@link JavaMethod.JavaParams } + * + */ + public JavaMethod.JavaParams createJavaMethodJavaParams() { + return new JavaMethod.JavaParams(); + } + + /** + * Create an instance of {@link XmlHandlerChain } + * + */ + public XmlHandlerChain createHandlerChain() { + return new XmlHandlerChain(); + } + + /** + * Create an instance of {@link XmlWebServiceProvider } + * + */ + public XmlWebServiceProvider createWebServiceProvider() { + return new XmlWebServiceProvider(); + } + + /** + * Create an instance of {@link XmlWebFault } + * + */ + public XmlWebFault createWebFault() { + return new XmlWebFault(); + } + + /** + * Create an instance of {@link XmlResponseWrapper } + * + */ + public XmlResponseWrapper createResponseWrapper() { + return new XmlResponseWrapper(); + } + + /** + * Create an instance of {@link XmlWebService } + * + */ + public XmlWebService createWebService() { + return new XmlWebService(); + } + + /** + * Create an instance of {@link XmlRequestWrapper } + * + */ + public XmlRequestWrapper createRequestWrapper() { + return new XmlRequestWrapper(); + } + + /** + * Create an instance of {@link JavaWsdlMappingType.XmlSchemaMapping } + * + */ + public JavaWsdlMappingType.XmlSchemaMapping createJavaWsdlMappingTypeXmlSchemaMapping() { + return new JavaWsdlMappingType.XmlSchemaMapping(); + } + + /** + * Create an instance of {@link JavaWsdlMappingType.JavaMethods } + * + */ + public JavaWsdlMappingType.JavaMethods createJavaWsdlMappingTypeJavaMethods() { + return new JavaWsdlMappingType.JavaMethods(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link JavaWsdlMappingType }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", name = "java-wsdl-mapping") + public JAXBElement createJavaWsdlMapping(JavaWsdlMappingType value) { + return new JAXBElement(_JavaWsdlMapping_QNAME, JavaWsdlMappingType.class, null, value); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java new file mode 100644 index 00000000000..67c13ab4f6e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingParameterStyle.java @@ -0,0 +1,78 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for soap-binding-parameter-style. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="soap-binding-parameter-style">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="BARE"/>
+ *     <enumeration value="WRAPPED"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "soap-binding-parameter-style") +@XmlEnum +public enum SoapBindingParameterStyle { + + BARE, + WRAPPED; + + public String value() { + return name(); + } + + public static SoapBindingParameterStyle fromValue(String v) { + return valueOf(v); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java new file mode 100644 index 00000000000..8c042d66bf5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingStyle.java @@ -0,0 +1,78 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for soap-binding-style. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="soap-binding-style">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="DOCUMENT"/>
+ *     <enumeration value="RPC"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "soap-binding-style") +@XmlEnum +public enum SoapBindingStyle { + + DOCUMENT, + RPC; + + public String value() { + return name(); + } + + public static SoapBindingStyle fromValue(String v) { + return valueOf(v); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java new file mode 100644 index 00000000000..ebf08de9837 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/SoapBindingUse.java @@ -0,0 +1,78 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for soap-binding-use. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="soap-binding-use">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="LITERAL"/>
+ *     <enumeration value="ENCODED"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "soap-binding-use") +@XmlEnum +public enum SoapBindingUse { + + LITERAL, + ENCODED; + + public String value() { + return name(); + } + + public static SoapBindingUse fromValue(String v) { + return valueOf(v); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java new file mode 100644 index 00000000000..d49cfe39b91 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/Util.java @@ -0,0 +1,72 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; + +import com.sun.xml.internal.ws.model.RuntimeModelerException; + +/** + * Simple util to handle default values. + * + * @author miroslav.kos@oracle.com + */ +class Util { + + static String nullSafe(String value) { + return value == null ? "" : value; + } + + static T nullSafe(T value, T defaultValue) { + return value == null ? defaultValue : value; + } + + @SuppressWarnings("unchecked") + static T nullSafe(Enum value, T defaultValue) { + return value == null ? defaultValue : (T) T.valueOf(defaultValue.getClass(), value.toString()); + } + + public static Class findClass(String className) { + try { + return Class.forName(className); + } catch (ClassNotFoundException e) { + throw new RuntimeModelerException("runtime.modeler.external.metadata.generic", e); + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java new file mode 100644 index 00000000000..83f533cb009 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/WebParamMode.java @@ -0,0 +1,80 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlType; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for web-param-mode. + * + *

The following schema fragment specifies the expected content contained within this class. + *

+ *

+ * <simpleType name="web-param-mode">
+ *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
+ *     <enumeration value="IN"/>
+ *     <enumeration value="OUT"/>
+ *     <enumeration value="INOUT"/>
+ *   </restriction>
+ * </simpleType>
+ * 
+ * + */ +@XmlType(name = "web-param-mode") +@XmlEnum +public enum WebParamMode { + + IN, + OUT, + INOUT; + + public String value() { + return name(); + } + + public static WebParamMode fromValue(String v) { + return valueOf(v); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java new file mode 100644 index 00000000000..bd88a42ea36 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAction.java @@ -0,0 +1,188 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; +import java.util.ArrayList; +import java.util.List; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *         <element ref="{http://xmlns.oracle.com/webservices/jaxws-databinding}fault-action" maxOccurs="unbounded" minOccurs="0"/>
+ *       </sequence>
+ *       <attribute name="input" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="output" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "faultAction" +}) +@XmlRootElement(name = "action") +public class XmlAction implements javax.xml.ws.Action { + + @XmlElement(name = "fault-action") + protected List faultAction; + @XmlAttribute(name = "input") + protected String input; + @XmlAttribute(name = "output") + protected String output; + + /** + * Gets the value of the faultAction property. + * + *

+ * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the faultAction property. + * + *

+ * For example, to add a new item, do as follows: + *

+     *    getFaultAction().add(newItem);
+     * 
+ * + * + *

+ * Objects of the following type(s) are allowed in the list + * {@link XmlFaultAction } + * + * + */ + public List getFaultAction() { + if (faultAction == null) { + faultAction = new ArrayList(); + } + return this.faultAction; + } + + /** + * Gets the value of the input property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getInput() { + return nullSafe(input); + } + + /** + * Sets the value of the input property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setInput(String value) { + this.input = value; + } + + /** + * Gets the value of the output property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOutput() { + return nullSafe(output); + } + + /** + * Sets the value of the output property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOutput(String value) { + this.output = value; + } + + @Override + public String input() { + return nullSafe(input); + } + + @Override + public String output() { + return nullSafe(output); + } + + @Override + public javax.xml.ws.FaultAction[] fault() { + return new javax.xml.ws.FaultAction[0]; + } + + @Override + public Class annotationType() { + return javax.xml.ws.Action.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java new file mode 100644 index 00000000000..1ab48c5bbd9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlAddressing.java @@ -0,0 +1,116 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.ws.soap.AddressingFeature; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "addressing") +public class XmlAddressing implements javax.xml.ws.soap.Addressing { + + @XmlAttribute(name = "enabled") + protected Boolean enabled; + + @XmlAttribute(name = "required") + protected Boolean required; + + public Boolean getEnabled() { + return enabled(); + } + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public Boolean getRequired() { + return required(); + } + + public void setRequired(Boolean required) { + this.required = required; + } + + @Override + public boolean enabled() { + return nullSafe(enabled, true); + } + + @Override + public boolean required() { + return nullSafe(required, false); + } + + @Override + public AddressingFeature.Responses responses() { + return AddressingFeature.Responses.ALL; + } + + @Override + public Class annotationType() { + return javax.xml.ws.soap.Addressing.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java new file mode 100644 index 00000000000..16839d231a8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlBindingType.java @@ -0,0 +1,109 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "binding-type") +public class XmlBindingType implements javax.xml.ws.BindingType { + + @XmlAttribute(name = "value") + protected String value; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + @Override + public String value() { + return nullSafe(value); + } + @Override + public Class annotationType() { + return javax.xml.ws.BindingType.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java new file mode 100644 index 00000000000..70b31c0bcec --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlFaultAction.java @@ -0,0 +1,145 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.findClass; +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="className" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "fault-action") +public class XmlFaultAction implements javax.xml.ws.FaultAction { + + @XmlAttribute(name = "className", required = true) + protected String className; + @XmlAttribute(name = "value") + protected String value; + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + return className; + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return nullSafe(value); + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + @Override + @SuppressWarnings("unchecked") + public Class className() { + return (Class) findClass(className); + } + + @Override + public String value() { + return nullSafe(value); + } + + @Override + public Class annotationType() { + return javax.xml.ws.FaultAction.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java new file mode 100644 index 00000000000..70c6bff0e57 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlHandlerChain.java @@ -0,0 +1,115 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="file" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "handler-chain") +public class XmlHandlerChain implements javax.jws.HandlerChain { + + @XmlAttribute(name = "file") + protected String file; + + /** + * Gets the value of the file property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFile() { + return file; + } + + /** + * Sets the value of the file property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFile(String value) { + this.file = value; + } + + @Override + public String file() { + return nullSafe(file); + } + + @Override + public String name() { + return ""; // deprecated, so let's ignore it ... + } + + @Override + public Class annotationType() { + return javax.jws.HandlerChain.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java new file mode 100644 index 00000000000..1f5684a20a5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlMTOM.java @@ -0,0 +1,153 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.ws.soap.MTOM; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="enabled" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
+ *       <attribute name="threshold" type="{http://www.w3.org/2001/XMLSchema}int" default="0" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "mtom") +public class XmlMTOM implements MTOM { + + @XmlAttribute(name = "enabled") + protected Boolean enabled; + @XmlAttribute(name = "threshold") + protected Integer threshold; + + /** + * Gets the value of the enabled property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isEnabled() { + if (enabled == null) { + return true; + } else { + return enabled; + } + } + + /** + * Sets the value of the enabled property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setEnabled(Boolean value) { + this.enabled = value; + } + + /** + * Gets the value of the threshold property. + * + * @return + * possible object is + * {@link Integer } + * + */ + public int getThreshold() { + if (threshold == null) { + return 0; + } else { + return threshold; + } + } + + /** + * Sets the value of the threshold property. + * + * @param value + * allowed object is + * {@link Integer } + * + */ + public void setThreshold(Integer value) { + this.threshold = value; + } + + @Override + public boolean enabled() { + return nullSafe(enabled, Boolean.TRUE); + } + + @Override + public int threshold() { + return nullSafe(threshold, 0); + } + + @Override + public Class annotationType() { + return MTOM.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java new file mode 100644 index 00000000000..48eaa3d5d46 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlOneway.java @@ -0,0 +1,79 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <sequence>
+ *       </sequence>
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "oneway") +public class XmlOneway implements javax.jws.Oneway { + + @Override + public Class annotationType() { + return javax.jws.Oneway.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java new file mode 100644 index 00000000000..d8ce81ad841 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlRequestWrapper.java @@ -0,0 +1,203 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="local-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="class-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "request-wrapper") +public class XmlRequestWrapper implements javax.xml.ws.RequestWrapper { + + @XmlAttribute(name = "local-name") + protected String localName; + @XmlAttribute(name = "target-namespace") + protected String targetNamespace; + @XmlAttribute(name = "class-name") + protected String className; + @XmlAttribute(name = "part-name") + protected String partName; + + /** + * Gets the value of the localName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocalName() { + if (localName == null) { + return ""; + } else { + return localName; + } + } + + /** + * Sets the value of the localName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocalName(String value) { + this.localName = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + if (targetNamespace == null) { + return ""; + } else { + return targetNamespace; + } + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + if (className == null) { + return ""; + } else { + return className; + } + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + + public String getPartName() { + return partName; + } + + public void setPartName(String partName) { + this.partName = partName; + } + + @Override + public String localName() { + return nullSafe(localName); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public String className() { + return nullSafe(className); + } + + @Override + public String partName() { + return nullSafe(partName); + } + + @Override + public Class annotationType() { + return javax.xml.ws.RequestWrapper.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java new file mode 100644 index 00000000000..4eae7611476 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlResponseWrapper.java @@ -0,0 +1,202 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="local-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="class-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "response-wrapper") +public class XmlResponseWrapper implements javax.xml.ws.ResponseWrapper { + + @XmlAttribute(name = "local-name") + protected String localName; + @XmlAttribute(name = "target-namespace") + protected String targetNamespace; + @XmlAttribute(name = "class-name") + protected String className; + @XmlAttribute(name = "part-name") + protected String partName; + + /** + * Gets the value of the localName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getLocalName() { + if (localName == null) { + return ""; + } else { + return localName; + } + } + + /** + * Sets the value of the localName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setLocalName(String value) { + this.localName = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + if (targetNamespace == null) { + return ""; + } else { + return targetNamespace; + } + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + if (className == null) { + return ""; + } else { + return className; + } + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + + public String getPartName() { + return partName; + } + + public void setPartName(String partName) { + this.partName = partName; + } + + @Override + public String localName() { + return nullSafe(localName); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public String className() { + return nullSafe(className); + } + + @Override + public String partName() { + return nullSafe(partName); + } + + @Override + public Class annotationType() { + return javax.xml.ws.ResponseWrapper.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java new file mode 100644 index 00000000000..0756ae9b93e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlSOAPBinding.java @@ -0,0 +1,186 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="style" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}soap-binding-style" default="DOCUMENT" />
+ *       <attribute name="use" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}soap-binding-use" default="LITERAL" />
+ *       <attribute name="parameter-style" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}soap-binding-parameter-style" default="WRAPPED" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "soap-binding") +public class XmlSOAPBinding implements javax.jws.soap.SOAPBinding { + + @XmlAttribute(name = "style") + protected SoapBindingStyle style; + @XmlAttribute(name = "use") + protected SoapBindingUse use; + @XmlAttribute(name = "parameter-style") + protected SoapBindingParameterStyle parameterStyle; + + /** + * Gets the value of the style property. + * + * @return + * possible object is + * {@link SoapBindingStyle } + * + */ + public SoapBindingStyle getStyle() { + if (style == null) { + return SoapBindingStyle.DOCUMENT; + } else { + return style; + } + } + + /** + * Sets the value of the style property. + * + * @param value + * allowed object is + * {@link SoapBindingStyle } + * + */ + public void setStyle(SoapBindingStyle value) { + this.style = value; + } + + /** + * Gets the value of the use property. + * + * @return + * possible object is + * {@link SoapBindingUse } + * + */ + public SoapBindingUse getUse() { + if (use == null) { + return SoapBindingUse.LITERAL; + } else { + return use; + } + } + + /** + * Sets the value of the use property. + * + * @param value + * allowed object is + * {@link SoapBindingUse } + * + */ + public void setUse(SoapBindingUse value) { + this.use = value; + } + + /** + * Gets the value of the parameterStyle property. + * + * @return + * possible object is + * {@link SoapBindingParameterStyle } + * + */ + public SoapBindingParameterStyle getParameterStyle() { + if (parameterStyle == null) { + return SoapBindingParameterStyle.WRAPPED; + } else { + return parameterStyle; + } + } + + /** + * Sets the value of the parameterStyle property. + * + * @param value + * allowed object is + * {@link SoapBindingParameterStyle } + * + */ + public void setParameterStyle(SoapBindingParameterStyle value) { + this.parameterStyle = value; + } + + @Override + public Style style() { + return nullSafe(style, Style.DOCUMENT); + } + + @Override + public Use use() { + return nullSafe(use, Use.LITERAL); + } + + @Override + public ParameterStyle parameterStyle() { + return nullSafe(parameterStyle, ParameterStyle.WRAPPED); + } + + @Override + public Class annotationType() { + return javax.jws.soap.SOAPBinding.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java new file mode 100644 index 00000000000..2d10bfb5c22 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlServiceMode.java @@ -0,0 +1,118 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.ws.Service; + +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" default="PAYLOAD" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "service-mode") +public class XmlServiceMode implements javax.xml.ws.ServiceMode { + + @XmlAttribute(name = "value") + protected String value; + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + if (value == null) { + return "PAYLOAD"; + } else { + return value; + } + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + @Override + public Service.Mode value() { + return Service.Mode.valueOf(nullSafe(value, "PAYLOAD")); + } + + @Override + public Class annotationType() { + return javax.xml.ws.ServiceMode.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java new file mode 100644 index 00000000000..8e1453fdf1a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebEndpoint.java @@ -0,0 +1,110 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-endpoint") +public class XmlWebEndpoint implements javax.xml.ws.WebEndpoint { + + @XmlAttribute(name = "name") + protected String name; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public Class annotationType() { + return javax.xml.ws.WebEndpoint.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java new file mode 100644 index 00000000000..48ff756e3e2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebFault.java @@ -0,0 +1,183 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="faultBean" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-fault") +public class XmlWebFault implements javax.xml.ws.WebFault { + + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "targetNamespace") + protected String targetNamespace; + @XmlAttribute(name = "faultBean") + protected String faultBean; + @XmlAttribute(name = "messageName") + protected String messageName; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + return targetNamespace; + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + /** + * Gets the value of the faultBean property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getFaultBean() { + return faultBean; + } + + /** + * Sets the value of the faultBean property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setFaultBean(String value) { + this.faultBean = value; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public String faultBean() { + return nullSafe(faultBean); + } + + @Override + public String messageName() { + return nullSafe(messageName); + } + + @Override + public Class annotationType() { + return javax.xml.ws.WebFault.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java new file mode 100644 index 00000000000..c7c250f5b41 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebMethod.java @@ -0,0 +1,187 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="action" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="exclude" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *       <attribute name="operation-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-method") +public class XmlWebMethod implements javax.jws.WebMethod { + + @XmlAttribute(name = "action") + protected String action; + @XmlAttribute(name = "exclude") + protected Boolean exclude; + @XmlAttribute(name = "operation-name") + protected String operationName; + + /** + * Gets the value of the action property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getAction() { + if (action == null) { + return ""; + } else { + return action; + } + } + + /** + * Sets the value of the action property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setAction(String value) { + this.action = value; + } + + /** + * Gets the value of the exclude property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isExclude() { + if (exclude == null) { + return false; + } else { + return exclude; + } + } + + /** + * Sets the value of the exclude property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setExclude(Boolean value) { + this.exclude = value; + } + + /** + * Gets the value of the operationName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getOperationName() { + if (operationName == null) { + return ""; + } else { + return operationName; + } + } + + /** + * Sets the value of the operationName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setOperationName(String value) { + this.operationName = value; + } + + @Override + public String operationName() { + return nullSafe(operationName); + } + + @Override + public String action() { + return nullSafe(action); + } + + @Override + public boolean exclude() { + return nullSafe(exclude, false); + } + + @Override + public Class annotationType() { + return javax.jws.WebMethod.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java new file mode 100644 index 00000000000..6abc7f55d45 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebParam.java @@ -0,0 +1,258 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="header" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *       <attribute name="mode" type="{http://xmlns.oracle.com/webservices/jaxws-databinding}web-param-mode" default="IN" />
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-param") +public class XmlWebParam implements javax.jws.WebParam { + + @XmlAttribute(name = "header") + protected Boolean header; + @XmlAttribute(name = "mode") + protected WebParamMode mode; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "part-name") + protected String partName; + @XmlAttribute(name = "target-namespace") + protected String targetNamespace; + + /** + * Gets the value of the header property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isHeader() { + if (header == null) { + return false; + } else { + return header; + } + } + + /** + * Sets the value of the header property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setHeader(Boolean value) { + this.header = value; + } + + /** + * Gets the value of the mode property. + * + * @return + * possible object is + * {@link WebParamMode } + * + */ + public WebParamMode getMode() { + if (mode == null) { + return WebParamMode.IN; + } else { + return mode; + } + } + + /** + * Sets the value of the mode property. + * + * @param value + * allowed object is + * {@link WebParamMode } + * + */ + public void setMode(WebParamMode value) { + this.mode = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + if (name == null) { + return ""; + } else { + return name; + } + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the partName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartName() { + if (partName == null) { + return ""; + } else { + return partName; + } + } + + /** + * Sets the value of the partName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartName(String value) { + this.partName = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + if (targetNamespace == null) { + return ""; + } else { + return targetNamespace; + } + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public String partName() { + return nullSafe(partName); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public Mode mode() { + return nullSafe(mode, Mode.IN); + } + + @Override + public boolean header() { + return nullSafe(header, false); + } + + @Override + public Class annotationType() { + return javax.jws.WebParam.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java new file mode 100644 index 00000000000..fcea0052d85 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebResult.java @@ -0,0 +1,222 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="header" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="part-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-result") +public class XmlWebResult implements javax.jws.WebResult { + + @XmlAttribute(name = "header") + protected Boolean header; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "part-name") + protected String partName; + @XmlAttribute(name = "target-namespace") + protected String targetNamespace; + + /** + * Gets the value of the header property. + * + * @return + * possible object is + * {@link Boolean } + * + */ + public boolean isHeader() { + if (header == null) { + return false; + } else { + return header; + } + } + + /** + * Sets the value of the header property. + * + * @param value + * allowed object is + * {@link Boolean } + * + */ + public void setHeader(Boolean value) { + this.header = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + if (name == null) { + return ""; + } else { + return name; + } + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the partName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPartName() { + if (partName == null) { + return ""; + } else { + return partName; + } + } + + /** + * Sets the value of the partName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPartName(String value) { + this.partName = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + if (targetNamespace == null) { + return ""; + } else { + return targetNamespace; + } + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public String partName() { + return nullSafe(partName); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public boolean header() { + return nullSafe(header, false); + } + + @Override + public Class annotationType() { + return javax.jws.WebResult.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java new file mode 100644 index 00000000000..5cc9d4fe3c3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebService.java @@ -0,0 +1,296 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="endpoint-interface" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="port-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="service-name" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="target-namespace" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *       <attribute name="wsdl-location" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-service") +public class XmlWebService implements javax.jws.WebService { + + @XmlAttribute(name = "endpoint-interface") + protected String endpointInterface; + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "port-name") + protected String portName; + @XmlAttribute(name = "service-name") + protected String serviceName; + @XmlAttribute(name = "target-namespace") + protected String targetNamespace; + @XmlAttribute(name = "wsdl-location") + protected String wsdlLocation; + + /** + * Gets the value of the endpointInterface property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEndpointInterface() { + if (endpointInterface == null) { + return ""; + } else { + return endpointInterface; + } + } + + /** + * Sets the value of the endpointInterface property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEndpointInterface(String value) { + this.endpointInterface = value; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + if (name == null) { + return ""; + } else { + return name; + } + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the portName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPortName() { + if (portName == null) { + return ""; + } else { + return portName; + } + } + + /** + * Sets the value of the portName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPortName(String value) { + this.portName = value; + } + + /** + * Gets the value of the serviceName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getServiceName() { + if (serviceName == null) { + return ""; + } else { + return serviceName; + } + } + + /** + * Sets the value of the serviceName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setServiceName(String value) { + this.serviceName = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + if (targetNamespace == null) { + return ""; + } else { + return targetNamespace; + } + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + /** + * Gets the value of the wsdlLocation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWsdlLocation() { + if (wsdlLocation == null) { + return ""; + } else { + return wsdlLocation; + } + } + + /** + * Sets the value of the wsdlLocation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWsdlLocation(String value) { + this.wsdlLocation = value; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public String serviceName() { + return nullSafe(serviceName); + } + + @Override + public String portName() { + return nullSafe(portName); + } + + @Override + public String wsdlLocation() { + return nullSafe(wsdlLocation); + } + + @Override + public String endpointInterface() { + return nullSafe(endpointInterface); + } + + @Override + public Class annotationType() { + return javax.jws.WebService.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java new file mode 100644 index 00000000000..379b301c994 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceClient.java @@ -0,0 +1,174 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="wsdlLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-service-client") +public class XmlWebServiceClient implements javax.xml.ws.WebServiceClient { + + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "targetNamespace") + protected String targetNamespace; + @XmlAttribute(name = "wsdlLocation") + protected String wsdlLocation; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + return targetNamespace; + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + /** + * Gets the value of the wsdlLocation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWsdlLocation() { + return wsdlLocation; + } + + /** + * Sets the value of the wsdlLocation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWsdlLocation(String value) { + this.wsdlLocation = value; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public String wsdlLocation() { + return nullSafe(wsdlLocation); + } + + @Override + public Class annotationType() { + return javax.xml.ws.WebServiceClient.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java new file mode 100644 index 00000000000..31d6c324350 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceProvider.java @@ -0,0 +1,206 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="targetNamespace" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="serviceName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="portName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="wsdlLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-service-provider") +public class XmlWebServiceProvider implements javax.xml.ws.WebServiceProvider { + + @XmlAttribute(name = "targetNamespace") + protected String targetNamespace; + @XmlAttribute(name = "serviceName") + protected String serviceName; + @XmlAttribute(name = "portName") + protected String portName; + @XmlAttribute(name = "wsdlLocation") + protected String wsdlLocation; + + /** + * Gets the value of the targetNamespace property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTargetNamespace() { + return targetNamespace; + } + + /** + * Sets the value of the targetNamespace property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTargetNamespace(String value) { + this.targetNamespace = value; + } + + /** + * Gets the value of the serviceName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getServiceName() { + return serviceName; + } + + /** + * Sets the value of the serviceName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setServiceName(String value) { + this.serviceName = value; + } + + /** + * Gets the value of the portName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getPortName() { + return portName; + } + + /** + * Sets the value of the portName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setPortName(String value) { + this.portName = value; + } + + /** + * Gets the value of the wsdlLocation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWsdlLocation() { + return wsdlLocation; + } + + /** + * Sets the value of the wsdlLocation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWsdlLocation(String value) { + this.wsdlLocation = value; + } + + @Override + public String wsdlLocation() { + return nullSafe(wsdlLocation); + } + + @Override + public String serviceName() { + return nullSafe(serviceName); + } + + @Override + public String targetNamespace() { + return nullSafe(targetNamespace); + } + + @Override + public String portName() { + return nullSafe(portName); + } + + @Override + public Class annotationType() { + return javax.xml.ws.WebServiceProvider.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java new file mode 100644 index 00000000000..97fb67e5681 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/XmlWebServiceRef.java @@ -0,0 +1,262 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ +package com.oracle.xmlns.internal.webservices.jaxws_databinding; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.ws.Service; +import java.lang.annotation.Annotation; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.findClass; +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.Util.nullSafe; + + +/** + * This file was generated by JAXB-RI v2.2.6 and afterwards modified + * to implement appropriate Annotation + * + *

Java class for anonymous complex type. + * + *

The following schema fragment specifies the expected content contained within this class. + * + *

+ * <complexType>
+ *   <complexContent>
+ *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="mappedName" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *       <attribute name="wsdlLocation" type="{http://www.w3.org/2001/XMLSchema}string" />
+ *     </restriction>
+ *   </complexContent>
+ * </complexType>
+ * 
+ */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "") +@XmlRootElement(name = "web-service-ref") +public class XmlWebServiceRef implements javax.xml.ws.WebServiceRef { + + @XmlAttribute(name = "name") + protected String name; + @XmlAttribute(name = "type") + protected String type; + @XmlAttribute(name = "mappedName") + protected String mappedName; + @XmlAttribute(name = "value") + protected String value; + @XmlAttribute(name = "wsdlLocation") + protected String wsdlLocation; + @XmlAttribute(name = "lookup") + protected String lookup; + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets the value of the type property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getType() { + return type; + } + + /** + * Sets the value of the type property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setType(String value) { + this.type = value; + } + + /** + * Gets the value of the mappedName property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getMappedName() { + return mappedName; + } + + /** + * Sets the value of the mappedName property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setMappedName(String value) { + this.mappedName = value; + } + + /** + * Gets the value of the value property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getValue() { + return value; + } + + /** + * Sets the value of the value property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setValue(String value) { + this.value = value; + } + + /** + * Gets the value of the wsdlLocation property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getWsdlLocation() { + return wsdlLocation; + } + + /** + * Sets the value of the wsdlLocation property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setWsdlLocation(String value) { + this.wsdlLocation = value; + } + + public String getLookup() { + return lookup; + } + + public void setLookup(String lookup) { + this.lookup = lookup; + } + + @Override + public String name() { + return nullSafe(name); + } + + @Override + public Class type() { + if (type == null) { + return Object.class; + } + return findClass(type); + } + + @Override + public String mappedName() { + return nullSafe(mappedName); + } + + @Override + @SuppressWarnings("unchecked") + public Class value() { + if (value == null) { + return Service.class; + } + return (Class) findClass(value); + } + + @Override + public String wsdlLocation() { + return nullSafe(wsdlLocation); + } + + @Override + public String lookup() { + return nullSafe(lookup); + } + + @Override + public Class annotationType() { + return javax.xml.ws.WebServiceRef.class; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java new file mode 100644 index 00000000000..f9a486561d1 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/oracle/xmlns/internal/webservices/jaxws_databinding/package-info.java @@ -0,0 +1,49 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common Development + * and Distribution License("CDDL") (collectively, the "License"). You + * may not use this file except in compliance with the License. You can + * obtain a copy of the License at + * http://glassfish.java.net/public/CDDL+GPL_1_1.html + * or packager/legal/LICENSE.txt. See the License for the specific + * language governing permissions and limitations under the License. + * + * When distributing the software, include this License Header Notice in each + * file and include the License file at packager/legal/LICENSE.txt. + * + * GPL Classpath Exception: + * Oracle designates this particular file as subject to the "Classpath" + * exception as provided by Oracle in the GPL Version 2 section of the License + * file that accompanied this code. + * + * Modifications: + * If applicable, add the following below the License Header, with the fields + * enclosed by brackets [] replaced by your own identifying information: + * "Portions Copyright [year] [name of copyright owner]" + * + * Contributor(s): + * If you wish your version of this file to be governed by only the CDDL or + * only the GPL Version 2, indicate your decision by adding "[Contributor] + * elects to include this software in this distribution under the [CDDL or GPL + * Version 2] license." If you don't indicate a single choice of license, a + * recipient has the option to distribute your version of this file under + * either the CDDL, the GPL Version 2 or to extend the choice of license to + * its licensees as provided above. However, if you add GPL Version 2 code + * and therefore, elected the GPL Version 2 license, then the option applies + * only if the new code is made subject to such option by the copyright + * holder. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6-SNAPSHOT +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2012.03.21 at 10:57:01 AM CET +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://xmlns.oracle.com/webservices/jaxws-databinding", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package com.oracle.xmlns.internal.webservices.jaxws_databinding; diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Builder.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Builder.java index d62413afed0..b0345f39596 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Builder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Builder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java index c4f1e21c8da..b52d12fa66f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/ByteArrayDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java index b101731dec5..00ad81e3387 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FinalArrayList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java index 50bc344ec73..0b0bd73c42e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/FragmentContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Interned.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Interned.java index a02edbab4bf..a0b44a4f9f2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Interned.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Interned.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java index 77c46d435cf..fcb6f036da7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/NotNull.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java index a482f405e89..26f9dcc55c3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Nullable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Pool.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Pool.java index c8e825b415e..3ff315fc3b4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Pool.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/Pool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java index 025e2530e00..d60ff04b3ec 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXException2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java index d51daf9dcc9..230685b69d7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/SAXParseException2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java index ace5d2a5e13..bc78015fbea 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamException2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java index ad2ad91ca03..7c83129082b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/XMLStreamReaderToContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java index 79eeba20cc6..32b12d4f30b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,5 +59,5 @@ public interface Localizable { *

* Use of "new" is to create an unique instance. */ - public static final String NOT_LOCALIZABLE = new String("\u0000"); + public static final String NOT_LOCALIZABLE = "\u0000"; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java index 95a6f6ca6d4..c38730ea2b4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package com.sun.istack.internal.localization; +import java.util.Arrays; + /** * @author WS Development Team */ @@ -47,7 +49,7 @@ public final class LocalizableMessage implements Localizable { } public Object[] getArguments() { - return _args; + return Arrays.copyOf(_args, _args.length); } public String getResourceBundleName() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java index 7cc7b5f236a..1b3aea5b673 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/LocalizableMessageFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java index c3c932143ec..16185e77a86 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/Localizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,8 +88,14 @@ public class Localizer { alternateBundleName, _locale); } catch (MissingResourceException e2) { - // give up - return getDefaultMessage(l); + //try context classloader + try { + bundle = ResourceBundle.getBundle(bundlename, _locale, Thread.currentThread().getContextClassLoader()); + } catch (MissingResourceException e3) { + // give up + return getDefaultMessage(l); + } + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/NullLocalizable.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java similarity index 93% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/NullLocalizable.java rename to jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java index 070591dce61..7b071b18325 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/NullLocalizable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/localization/NullLocalizable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ * questions. */ -package com.sun.xml.internal.ws.util.localization; +package com.sun.istack.internal.localization; /** * {@link Localizable} that wraps a non-localizable string. diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java index 2c00143e611..59a02d5b7d9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/logging/Logger.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.util.StringTokenizer; import java.util.logging.Level; /** - * This is a helper class that provides some conveniece methods wrapped around the + * This is a helper class that provides some convenience methods wrapped around the * standard {@link java.util.logging.Logger} interface. * * The class also makes sure that logger names of each Metro subsystem are consistent @@ -129,6 +129,20 @@ public class Logger { logger.logp(level, componentClassName, getCallerMethodName(), message); } + public void log(final Level level, final String message, Object param1) { + if (!this.logger.isLoggable(level)) { + return; + } + logger.logp(level, componentClassName, getCallerMethodName(), message, param1); + } + + public void log(final Level level, final String message, Object[] params) { + if (!this.logger.isLoggable(level)) { + return; + } + logger.logp(level, componentClassName, getCallerMethodName(), message, params); + } + public void log(final Level level, final String message, final Throwable thrown) { if (!this.logger.isLoggable(level)) { return; @@ -143,6 +157,13 @@ public class Logger { logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message); } + public void finest(final String message, Object[] params) { + if (!this.logger.isLoggable(Level.FINEST)) { + return; + } + logger.logp(Level.FINEST, componentClassName, getCallerMethodName(), message, params); + } + public void finest(final String message, final Throwable thrown) { if (!this.logger.isLoggable(Level.FINEST)) { return; @@ -157,6 +178,13 @@ public class Logger { logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message); } + public void finer(final String message, Object[] params) { + if (!this.logger.isLoggable(Level.FINER)) { + return; + } + logger.logp(Level.FINER, componentClassName, getCallerMethodName(), message, params); + } + public void finer(final String message, final Throwable thrown) { if (!this.logger.isLoggable(Level.FINER)) { return; @@ -185,6 +213,13 @@ public class Logger { logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message); } + public void info(final String message, Object[] params) { + if (!this.logger.isLoggable(Level.INFO)) { + return; + } + logger.logp(Level.INFO, componentClassName, getCallerMethodName(), message, params); + } + public void info(final String message, final Throwable thrown) { if (!this.logger.isLoggable(Level.INFO)) { return; @@ -199,6 +234,13 @@ public class Logger { logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message); } + public void config(final String message, Object[] params) { + if (!this.logger.isLoggable(Level.CONFIG)) { + return; + } + logger.logp(Level.CONFIG, componentClassName, getCallerMethodName(), message, params); + } + public void config(final String message, final Throwable thrown) { if (!this.logger.isLoggable(Level.CONFIG)) { return; @@ -213,6 +255,13 @@ public class Logger { logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message); } + public void warning(final String message, Object[] params) { + if (!this.logger.isLoggable(Level.WARNING)) { + return; + } + logger.logp(Level.WARNING, componentClassName, getCallerMethodName(), message, params); + } + public void warning(final String message, final Throwable thrown) { if (!this.logger.isLoggable(Level.WARNING)) { return; @@ -227,6 +276,13 @@ public class Logger { logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message); } + public void severe(final String message, Object[] params) { + if (!this.logger.isLoggable(Level.SEVERE)) { + return; + } + logger.logp(Level.SEVERE, componentClassName, getCallerMethodName(), message, params); + } + public void severe(final String message, final Throwable thrown) { if (!this.logger.isLoggable(Level.SEVERE)) { return; diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/package-info.java index 66d999da93e..8c9941a0006 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java new file mode 100644 index 00000000000..d4feaeecb91 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/DefaultAuthenticator.java @@ -0,0 +1,324 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.istack.internal.tools; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Field; +import java.net.Authenticator; +import java.net.Authenticator.RequestorType; +import java.net.MalformedURLException; +import java.net.PasswordAuthentication; +import java.net.URL; +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.regex.Pattern; +import org.xml.sax.Locator; +import org.xml.sax.helpers.LocatorImpl; + +/** + * @author Vivek Pandey + * @author Lukas Jungmann + */ +public class DefaultAuthenticator extends Authenticator { + + private static DefaultAuthenticator instance; + private static Authenticator systemAuthenticator = getCurrentAuthenticator(); + private String proxyUser; + private String proxyPasswd; + private final List authInfo = new ArrayList(); + private static int counter = 0; + + DefaultAuthenticator() { + //try undocumented but often used properties + if (System.getProperty("http.proxyUser") != null) { + proxyUser = System.getProperty("http.proxyUser"); + } else { + proxyUser = System.getProperty("proxyUser"); + } + if (System.getProperty("http.proxyPassword") != null) { + proxyPasswd = System.getProperty("http.proxyPassword"); + } else { + proxyPasswd = System.getProperty("proxyPassword"); + } + } + + public static synchronized DefaultAuthenticator getAuthenticator() { + if (instance == null) { + instance = new DefaultAuthenticator(); + Authenticator.setDefault(instance); + } + counter++; + return instance; + } + + public static synchronized void reset() { + --counter; + if (instance != null && counter == 0) { + Authenticator.setDefault(systemAuthenticator); + } + } + + @Override + protected PasswordAuthentication getPasswordAuthentication() { + //If user sets proxy user and passwd and the RequestType is from proxy server then create + // PasswordAuthentication using proxyUser and proxyPasswd; + if ((getRequestorType() == RequestorType.PROXY) && proxyUser != null && proxyPasswd != null) { + return new PasswordAuthentication(proxyUser, proxyPasswd.toCharArray()); + } + for (AuthInfo auth : authInfo) { + if (auth.matchingHost(getRequestingURL())) { + return new PasswordAuthentication(auth.getUser(), auth.getPassword().toCharArray()); + } + } + return null; + } + + /** + * Proxy authorization string in form of username:password. + * + * @param proxyAuth + */ + public void setProxyAuth(String proxyAuth) { + if (proxyAuth == null) { + this.proxyUser = null; + this.proxyPasswd = null; + } else { + int i = proxyAuth.indexOf(':'); + if (i < 0) { + this.proxyUser = proxyAuth; + this.proxyPasswd = ""; + } else if (i == 0) { + this.proxyUser = ""; + this.proxyPasswd = proxyAuth.substring(1); + } else { + this.proxyUser = proxyAuth.substring(0, i); + this.proxyPasswd = proxyAuth.substring(i + 1); + } + } + } + + public void setAuth(File f, Receiver l) { + Receiver listener = l == null ? new DefaultRImpl() : l; + BufferedReader in = null; + FileInputStream fi = null; + InputStreamReader is = null; + try { + String text; + LocatorImpl locator = new LocatorImpl(); + locator.setSystemId(f.getAbsolutePath()); + try { + fi = new FileInputStream(f); + is = new InputStreamReader(fi, "UTF-8"); + in = new BufferedReader(is); + } catch (UnsupportedEncodingException e) { + listener.onError(e, locator); + return; + } catch (FileNotFoundException e) { + listener.onError(e, locator); + return; + } + try { + int lineno = 1; + locator.setSystemId(f.getCanonicalPath()); + while ((text = in.readLine()) != null) { + locator.setLineNumber(lineno++); + //ignore empty lines and treat those starting with '#' as comments + if ("".equals(text.trim()) || text.startsWith("#")) { + continue; + } + try { + AuthInfo ai = parseLine(text); + authInfo.add(ai); + } catch (Exception e) { + listener.onParsingError(text, locator); + } + } + } catch (IOException e) { + listener.onError(e, locator); + Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e); + } + } finally { + try { + if (in != null) { + in.close(); + } + if (is != null) { + is.close(); + } + if (fi != null) { + fi.close(); + } + } catch (IOException ex) { + Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, null, ex); + } + } + } + + private AuthInfo parseLine(String text) throws Exception { + URL url; + try { + url = new URL(text); + } catch (MalformedURLException mue) { + //possible cause of this can be that password contains + //character which has to be encoded in URL, + //such as '@', ')', '#' and few others + //so try to recreate the URL with encoded string + //between 2nd ':' and last '@' + int i = text.indexOf(':', text.indexOf(':') + 1) + 1; + int j = text.lastIndexOf('@'); + String encodedUrl = + text.substring(0, i) + + URLEncoder.encode(text.substring(i, j), "UTF-8") + + text.substring(j); + url = new URL(encodedUrl); + } + + String authinfo = url.getUserInfo(); + + if (authinfo != null) { + int i = authinfo.indexOf(':'); + + if (i >= 0) { + String user = authinfo.substring(0, i); + String password = authinfo.substring(i + 1); + return new AuthInfo( + new URL(url.getProtocol(), url.getHost(), url.getPort(), url.getFile()), + user, URLDecoder.decode(password, "UTF-8")); + } + } + throw new Exception(); + } + + static Authenticator getCurrentAuthenticator() { + final Field f = getTheAuthenticator(); + if (f == null) { + return null; + } + + try { + AccessController.doPrivileged(new PrivilegedAction() { + @Override + public Void run() { + f.setAccessible(true); + return null; + } + }); + return (Authenticator) f.get(null); + } catch (Exception ex) { + return null; + } finally { + AccessController.doPrivileged(new PrivilegedAction() { + @Override + public Void run() { + f.setAccessible(false); + return null; + } + }); + } + } + + private static Field getTheAuthenticator() { + try { + return Authenticator.class.getDeclaredField("theAuthenticator"); + } catch (Exception ex) { + return null; + } + } + + public static interface Receiver { + + void onParsingError(String line, Locator loc); + + void onError(Exception e, Locator loc); + } + + private static class DefaultRImpl implements Receiver { + + @Override + public void onParsingError(String line, Locator loc) { + System.err.println(getLocationString(loc) + ": " + line); + } + + @Override + public void onError(Exception e, Locator loc) { + System.err.println(getLocationString(loc) + ": " + e.getMessage()); + Logger.getLogger(DefaultAuthenticator.class.getName()).log(Level.SEVERE, e.getMessage(), e); + } + + private String getLocationString(Locator l) { + return "[" + l.getSystemId() + "#" + l.getLineNumber() + "]"; + } + } + + /** + * Represents authorization information needed by + * {@link DefaultAuthenticator} to authenticate access to remote resources. + * + * @author Vivek Pandey + * @author Lukas Jungmann + */ + final static class AuthInfo { + + private final String user; + private final String password; + private final Pattern urlPattern; + + public AuthInfo(URL url, String user, String password) { + String u = url.toExternalForm().replaceFirst("\\?", "\\\\?"); + this.urlPattern = Pattern.compile(u.replace("*", ".*"), Pattern.CASE_INSENSITIVE); + this.user = user; + this.password = password; + } + + public String getUser() { + return user; + } + + public String getPassword() { + return password; + } + + /** + * Returns if the requesting host and port are associated with this + * {@link AuthInfo} + */ + public boolean matchingHost(URL requestingURL) { + return urlPattern.matcher(requestingURL.toExternalForm()).matches(); + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java index 426d5478f69..b8fb81828a9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/MaskingClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java index 49a131601c3..50cfa7470b8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/ParallelWorldClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java index ffb60ae2b5c..813bbb6a884 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/SecureLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,6 +72,19 @@ class SecureLoader { } } + static ClassLoader getParentClassLoader(final ClassLoader cl) { + if (System.getSecurityManager() == null) { + return cl.getParent(); + } else { + return (ClassLoader) java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public java.lang.Object run() { + return cl.getParent(); + } + }); + } + } + static void setContextClassLoader(final ClassLoader cl) { if (System.getSecurityManager() == null) { Thread.currentThread().setContextClassLoader(cl); diff --git a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java index 61e7dade1a2..f43efa72e1d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/istack/internal/tools/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java index bbc7ea2c05a..d41cb1ec476 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMX.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.amx; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java index 842b83858e0..4ec51902bbb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXGlassfish.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.amx; import javax.management.ObjectName; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java index 314bbccbf63..cb726795f74 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/AMXUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.amx; import javax.management.MBeanServerConnection; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java index fa8f3ffa888..ef3a76bdd16 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/BootAMXMBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.amx; import javax.management.ObjectName; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java index 0bf5b606bc6..c2378d8af7e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/amx/MBeanListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.amx; import java.util.Set; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java index bcd53a7082c..f550707ff0c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Stability.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,10 +23,9 @@ * questions. */ + package com.sun.org.glassfish.external.arc; - - /** Taxonomy values. See http://opensolaris.org/os/community/arc/policies/interface-taxonomy/ diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java index f0f956c19c6..bd4e4169d57 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/arc/Taxonomy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.arc; import java.lang.annotation.Documented; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java index 3c55bb6923c..01a14a9e752 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/PluginPoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,10 +22,8 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ + + package com.sun.org.glassfish.external.probe.provider; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java index f4198c29739..ada14b7503f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.probe.provider; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java index ad12f72e174..860a9cf64a1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.probe.provider; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java index 618526a54ce..b20a68bdd03 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManager.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.probe.provider; import java.util.Vector; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java index a79405b0c49..342fc4a75e7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/StatsProviderManagerDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.probe.provider; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java index 965a8369bce..e66c91ace9e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/Probe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ */ + package com.sun.org.glassfish.external.probe.provider.annotations; import java.lang.annotation.Retention; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java index 2c491e29c71..b49822f8f0a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.probe.provider.annotations; import java.lang.annotation.Retention; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java index 7b88ea7185f..a8610b1d123 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeParam.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ */ + package com.sun.org.glassfish.external.probe.provider.annotations; import java.lang.annotation.Retention; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java index c306548554a..a25d94dfdff 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/probe/provider/annotations/ProbeProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,7 @@ */ + package com.sun.org.glassfish.external.probe.provider.annotations; import java.lang.annotation.Retention; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java index d3e9b8bb701..b99bb14cac6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/AverageRangeStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + /* * AverageRangeStatistic.java * diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java index 38aa8e96113..180a5c9ad3b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundaryStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java index 5a18c6ab5e7..c833ecfae34 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/BoundedRangeStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java index e6453765b88..5458b56956b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/CountStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java index fad5c54e8c7..8c0cbe6cd6d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/RangeStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java index 57949e37fee..39304e6db24 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Statistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java index e359eeef9e1..63e9d26ddd1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/Stats.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics; public interface Stats { diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java index 486545ad6a1..b4b77dc2fd8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/StringStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java index b962f0d5e23..5590b8a871f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/TimeStatistic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java index 6abc25c2fff..1a29ef61ea2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/annotations/Reset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.annotations; import java.lang.annotation.Retention; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java index 702ad1324b8..3f6df88592b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/AverageRangeStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; import java.util.concurrent.atomic.AtomicLong; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java index 239edfca6b0..5eeafaf5ae5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundaryStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.BoundaryStatistic; import java.util.concurrent.atomic.AtomicLong; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java index 491b78b1adb..9cbf7b5fa51 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/BoundedRangeStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.BoundedRangeStatistic; import java.util.concurrent.atomic.AtomicLong; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java index 81d58a14abf..f593de23e75 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/CountStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.CountStatistic; import java.util.concurrent.atomic.AtomicLong; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java index fcf6dd050db..cfe702a01c6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/RangeStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.RangeStatistic; import java.util.concurrent.atomic.AtomicLong; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java index 0815a60d179..708f06a5393 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,7 @@ * questions. */ + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.Statistic; import java.io.Serializable; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java index 45763070407..200c907942c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StatsImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.Stats; import com.sun.org.glassfish.external.statistics.Statistic; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java index 493903d8178..972f1c175cb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/StringStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,6 +23,8 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; import com.sun.org.glassfish.external.statistics.StringStatistic; import java.util.Map; diff --git a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java index 5b121f4fbe9..6e6bd723382 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/org/glassfish/external/statistics/impl/TimeStatisticImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,10 @@ * questions. */ + + package com.sun.org.glassfish.external.statistics.impl; + import com.sun.org.glassfish.external.statistics.TimeStatistic; import java.util.concurrent.atomic.AtomicLong; import java.util.Map; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin b/jaxws/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin index d1c50c8001c..ac63b19854c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/etc/META-INF/services/com.sun.tools.internal.xjc.Plugin @@ -3,3 +3,4 @@ com.sun.tools.internal.xjc.addon.locator.SourceLocationAddOn com.sun.tools.internal.xjc.addon.sync.SynchronizedMethodAddOn com.sun.tools.internal.xjc.addon.at_generated.PluginImpl com.sun.tools.internal.xjc.addon.episode.PluginImpl +com.sun.tools.internal.xjc.addon.accessors.PluginImpl diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java index 73df1a6476e..5b7834dd824 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ConfigReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.tools.internal.jxc; +import com.sun.tools.internal.jxc.ap.Options; import java.io.File; import java.io.IOException; import java.util.Collection; @@ -51,6 +52,7 @@ import com.sun.tools.internal.xjc.SchemaCache; import com.sun.tools.internal.xjc.api.Reference; import com.sun.tools.internal.xjc.util.ForkContentHandler; +import com.sun.xml.internal.bind.v2.util.XmlFactory; import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -94,7 +96,7 @@ public final class ConfigReader { */ public ConfigReader(ProcessingEnvironment env, Collection classes, File xmlFile, ErrorHandler errorHandler) throws SAXException, IOException { this.env = env; - Config config = parseAndGetConfig(xmlFile,errorHandler); + Config config = parseAndGetConfig(xmlFile, errorHandler, env.getOptions().containsKey(Options.DISABLE_XML_SECURITY)); checkAllClasses(config,classes); String path = xmlFile.getAbsolutePath(); String xmlPath = path.substring(0,path.lastIndexOf(File.separatorChar)); @@ -150,14 +152,14 @@ public final class ConfigReader { private SchemaOutputResolver createSchemaOutputResolver(Config config, String xmlpath) { File baseDir = new File(xmlpath, config.getBaseDir().getPath()); - SchemaOutputResolverImpl schemaOutputResolver = new SchemaOutputResolverImpl (baseDir); + SchemaOutputResolverImpl outResolver = new SchemaOutputResolverImpl (baseDir); for( Schema schema : (List)config.getSchema() ) { String namespace = schema.getNamespace(); File location = schema.getLocation(); - schemaOutputResolver.addSchemaInfo(namespace,location); + outResolver.addSchemaInfo(namespace,location); } - return schemaOutputResolver; + return outResolver; } /** @@ -190,11 +192,10 @@ public final class ConfigReader { * @return * A non null Config object */ - private Config parseAndGetConfig (File xmlFile, ErrorHandler errorHandler) throws SAXException, IOException { + private Config parseAndGetConfig (File xmlFile, ErrorHandler errorHandler, boolean disableSecureProcessing) throws SAXException, IOException { XMLReader reader; try { - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setNamespaceAware(true); + SAXParserFactory factory = XmlFactory.createParserFactory(disableSecureProcessing); reader = factory.newSAXParser().getXMLReader(); } catch (ParserConfigurationException e) { // in practice this will never happen diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties index 2e390b1e395..b68f941bda4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -30,10 +30,10 @@ BASEDIR_DOESNT_EXIST = \ Non-existent directory: {0} VERSION = \ - schemagen 2.2.5-b10 + schemagen 2.2.7-b63 FULLVERSION = \ - schemagen full version "2.2.5-b10" + schemagen full version "2.2.7-b63" USAGE = \ Usage: schemagen [-options ...] \n\ @@ -43,6 +43,7 @@ Options: \n\ \ \ \ \ -classpath : specify where to find user specified files\n\ \ \ \ \ -encoding : specify encoding to be used for annotation processing/javac invocation \n\ \ \ \ \ -episode : generate episode file for separate compilation\n\ +\ \ \ \ -disableXmlSecurity : disables XML security features for usage on xml parsing apis \n\ \ \ \ \ -version : display version information\n\ \ \ \ \ -fullversion : display full version information\n\ \ \ \ \ -help : display this usage message diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties new file mode 100644 index 00000000000..77b472d313c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_de.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = Nicht erkanntes {0} in Zeile {1} Spalte {2} + +BASEDIR_DOESNT_EXIST = Nicht vorhandenes Verzeichnis: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = schemagen vollst\u00E4ndige Version "2.2.7-b63" + +USAGE = Verwendung: schemagen [-options ...] \nOptionen: \n\\ \\ \\ \\ -d : Gibt an, wo die von Prozessor und javac generierten Klassendateien gespeichert werden sollen\n\\ \\ \\ \\ -cp : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -classpath : Gibt an, wo die vom Benutzer angegebenen Dateien gespeichert sind\n\\ \\ \\ \\ -encoding : Gibt die Codierung f\u00FCr die Annotationsverarbeitung/den javac-Aufruf an \n\\ \\ \\ \\ -episode : Generiert Episodendatei f\u00FCr separate Kompilierung\n\\ \\ \\ \\ -version : Zeigt Versionsinformation an\n\\ \\ \\ \\ -fullversion : Zeigt vollst\u00E4ndige Versionsinformationen an\n\\ \\ \\ \\ -help : Zeigt diese Verwendungsmeldung an diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties new file mode 100644 index 00000000000..4281c08073f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_es.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = Aparece un {0} inesperado en la l\u00EDnea {1} y la columna {2} + +BASEDIR_DOESNT_EXIST = Directorio no existente: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = versi\u00F3n completa de schemagen "2.2.7-b63" + +USAGE = Sintaxis: schemagen [-options ...] \nOpciones: \n\\ \\ \\ \\ -d : especifique d\u00F3nde se colocan los archivos de clase generados por javac y el procesador\n\\ \\ \\ \\ -cp : especifique d\u00F3nde se encuentran los archivos especificados por el usuario\n\\ \\ \\ \\ -encoding : especifique la codificaci\u00F3n que se va a utilizar para el procesamiento de anotaciones/llamada de javac\n\\ \\ \\ \\ -episode : genera un archivo de episodio para una compilaci\u00F3n diferente\n\\ \\ \\ \\ -version : muestra la informaci\u00F3n de la versi\u00F3n\n\\ \\ \\ \\ -fullversion : muestra la informaci\u00F3n completa de la versi\u00F3n\n\\ \\ \\ \\ -help : muestra este mensaje de sintaxis diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties new file mode 100644 index 00000000000..e72bfd541b2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_fr.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = Un \u00E9l\u00E9ment {0} inattendu appara\u00EEt \u00E0 la ligne {1}, colonne {2} + +BASEDIR_DOESNT_EXIST = R\u00E9pertoire {0} inexistant + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = version compl\u00E8te de schemagen "2.2.7-b63" + +USAGE = Syntaxe : schemagen [-options ...] \nOptions : \n\ \ \ \ -d : indiquez o\u00F9 placer les fichiers de classe g\u00E9n\u00E9r\u00E9s par le processeur et le compilateur javac\n\ \ \ \ -cp : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -classpath : indiquez o\u00F9 trouver les fichiers sp\u00E9cifi\u00E9s par l'utilisateur\n\ \ \ \ -encoding : indiquez l'encodage \u00E0 utiliser pour l'appel de javac/traitement de l'annotation \n\ \ \ \ -episode : g\u00E9n\u00E9rez un fichier d'\u00E9pisode pour la compilation s\u00E9par\u00E9e\n\ \ \ \ -version : affichez les informations de version\n\ \ \ \ -fullversion : affichez les informations compl\u00E8tes de version\n\ \ \ \ -help : affichez ce message de syntaxe diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties new file mode 100644 index 00000000000..25a9f06a15d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_it.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = {0} imprevisto visualizzato sulla riga {1} colonna {2} + +BASEDIR_DOESNT_EXIST = Directory non esistente: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = versione completa schemagen "2.2.7-b63" + +USAGE = Uso: schemagen [-options ...] \nOpzioni: \n\ \ \ \ -d : specifica dove posizionare il processore e i file della classe generata javac\n\ \ \ \ -cp : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -classpath : specifica dove trovare i file specificati dall'utente\n\ \ \ \ -encoding : specifica la codifica da usare per l'elaborazione dell'annotazione/richiamo javac \n\ \ \ \ -episode : genera il file di episodio per la compilazione separata\n\ \ \ \ -version : visualizza le informazioni sulla versione\n\ \ \ \ -fullversion : visualizza le informazioni sulla versione completa\n\ \ \ \ -help : visualizza questo messaggio sull'uso diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties new file mode 100644 index 00000000000..42dcb00216a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ja.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = \u4E88\u671F\u3057\u306A\u3044{0}\u304C\u884C{1}\u3001\u5217{2}\u306B\u3042\u308A\u307E\u3059 + +BASEDIR_DOESNT_EXIST = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u5B58\u5728\u3057\u307E\u305B\u3093: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = schemagen\u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3"2.2.7-b63" + +USAGE = \u4F7F\u7528\u65B9\u6CD5: schemagen [-options ...] \n\u30AA\u30D7\u30B7\u30E7\u30F3: \n\ \ \ \ -d : \u30D7\u30ED\u30BB\u30C3\u30B5\u304A\u3088\u3073javac\u304C\u751F\u6210\u3057\u305F\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u7F6E\u304F\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -cp : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -classpath : \u30E6\u30FC\u30B6\u30FC\u304C\u6307\u5B9A\u3057\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u4F4D\u7F6E\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -encoding : \u6CE8\u91C8\u51E6\u7406/javac\u547C\u51FA\u3057\u306B\u4F7F\u7528\u3059\u308B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3057\u307E\u3059\n\ \ \ \ -episode : \u30B3\u30F3\u30D1\u30A4\u30EB\u3054\u3068\u306B\u30A8\u30D4\u30BD\u30FC\u30C9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3057\u307E\u3059\n\ \ \ \ -version : \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -fullversion : \u30D5\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3057\u307E\u3059\n\ \ \ \ -help : \u3053\u306E\u4F7F\u7528\u4F8B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u307E\u3059 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties new file mode 100644 index 00000000000..8bc7bf0b1c4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_ko.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = \uC608\uC0C1\uCE58 \uC54A\uC740 {0}\uC774(\uAC00) {1}\uD589 {2}\uC5F4\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4. + +BASEDIR_DOESNT_EXIST = \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 \uB514\uB809\uD1A0\uB9AC: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = schemagen \uC815\uC2DD \uBC84\uC804 "2.2.7-b63" + +USAGE = \uC0AC\uC6A9\uBC95: schemagen [-options ...] \n\uC635\uC158: \n\ \ \ \ -d : \uD504\uB85C\uC138\uC11C \uBC0F javac\uC5D0\uC11C \uC0DD\uC131\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uBC30\uCE58\uD560 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -cp : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -classpath : \uC0AC\uC6A9\uC790\uAC00 \uC9C0\uC815\uD55C \uD30C\uC77C\uC744 \uCC3E\uC744 \uC704\uCE58\uB97C \uC9C0\uC815\uD569\uB2C8\uB2E4.\n\ \ \ \ -encoding : \uC8FC\uC11D \uCC98\uB9AC/javac \uD638\uCD9C\uC5D0 \uC0AC\uC6A9\uD560 \uC778\uCF54\uB529\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. \n\ \ \ \ -episode : \uBCC4\uB3C4 \uCEF4\uD30C\uC77C\uC744 \uC704\uD574 episode \uD30C\uC77C\uC744 \uC0DD\uC131\uD569\uB2C8\uB2E4.\n\ \ \ \ -version : \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -fullversion : \uC815\uC2DD \uBC84\uC804 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.\n\ \ \ \ -help : \uC774 \uC0AC\uC6A9\uBC95 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties new file mode 100644 index 00000000000..e6339ca7ec2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_pt_BR.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = {0} inesperado aparece na linha {1} coluna {2} + +BASEDIR_DOESNT_EXIST = Diret\u00F3rio n\u00E3o existente: {0} + +VERSION = gera\u00E7\u00E3o do esquema 2.2.7-b63 + +FULLVERSION = vers\u00E3o completa da gera\u00E7\u00E3o do esquema "2.2.7-b63" + +USAGE = Uso: gera\u00E7\u00E3o do esquema [-options ...] \nOp\u00E7\u00F5es: \n\\ \\ \\ \\ -d : especificar onde colocar o processador e os arquivos da classe gerados por javac\n\\ \\ \\ \\ -cp : especificar onde localizar arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -classpath : especificar onde localizar os arquivos especificados pelo usu\u00E1rio\n\\ \\ \\ \\ -encoding : especificar codifica\u00E7\u00E3o a ser usada para processamento de anota\u00E7\u00E3o/chamada javac \n\\ \\ \\ \\ -episode : gerar arquivo do epis\u00F3dio para compila\u00E7\u00E3o separada\n\\ \\ \\ \\ -version : exibir informa\u00E7\u00F5es da vers\u00E3o\n\\ \\ \\ \\ -fullversion : exibir informa\u00E7\u00F5es da vers\u00E3o completa\n\\ \\ \\ \\ -help : exibir esta mensagem de uso diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties new file mode 100644 index 00000000000..c059a4fd23a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_CN.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = \u5728\u7B2C {1} \u884C, \u7B2C {2} \u5217\u51FA\u73B0\u610F\u5916\u7684{0} + +BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u5F55: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.7-b63" + +USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9009\u9879: \n\ \ \ \ -d : \u6307\u5B9A\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u548C javac \u751F\u6210\u7684\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -cp : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -classpath : \u6307\u5B9A\u67E5\u627E\u7528\u6237\u6307\u5B9A\u6587\u4EF6\u7684\u4F4D\u7F6E\n\ \ \ \ -encoding : \u6307\u5B9A\u7528\u4E8E\u6CE8\u91CA\u5904\u7406/javac \u8C03\u7528\u7684\u7F16\u7801\n\ \ \ \ -episode : \u751F\u6210\u7247\u6BB5\u6587\u4EF6\u4EE5\u4F9B\u5355\u72EC\u7F16\u8BD1\n\ \ \ \ -version : \u663E\u793A\u7248\u672C\u4FE1\u606F\n\ \ \ \ -fullversion : \u663E\u793A\u5B8C\u6574\u7684\u7248\u672C\u4FE1\u606F\n\ \ \ \ -help : \u663E\u793A\u6B64\u7528\u6CD5\u6D88\u606F diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties new file mode 100644 index 00000000000..1e73e423250 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/MessageBundle_zh_TW.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +UNEXPECTED_NGCC_TOKEN = \u672A\u9810\u671F\u7684 {0} \u986F\u793A\u65BC\u884C {1} \u8CC7\u6599\u6B04 {2} + +BASEDIR_DOESNT_EXIST = \u4E0D\u5B58\u5728\u7684\u76EE\u9304: {0} + +VERSION = schemagen 2.2.7-b63 + +FULLVERSION = schemagen \u5B8C\u6574\u7248\u672C "2.2.7-b63" + +USAGE = \u7528\u6CD5: schemagen [-options ...] \n\u9078\u9805: \n\\ \\ \\ \\ -d : \u6307\u5B9A\u8655\u7406\u5668\u4EE5\u53CA javac \u7522\u751F\u7684\u985E\u5225\u6A94\u6848\u653E\u7F6E\u4F4D\u7F6E\n\\ \\ \\ \\ -cp : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -classpath : \u6307\u5B9A\u8981\u5C0B\u627E\u4F7F\u7528\u8005\u6307\u5B9A\u6A94\u6848\u7684\u4F4D\u7F6E\n\\ \\ \\ \\ -encoding : \u6307\u5B9A\u8981\u7528\u65BC\u8A3B\u89E3\u8655\u7406/javac \u547C\u53EB\u7684\u7DE8\u78BC \n\\ \\ \\ \\ -episode : \u7522\u751F\u7368\u7ACB\u7DE8\u8B6F\u7684\u4E8B\u4EF6 (episode) \u6A94\u6848\n\\ \\ \\ \\ -version : \u986F\u793A\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -fullversion : \u986F\u793A\u5B8C\u6574\u7248\u672C\u8CC7\u8A0A\n\\ \\ \\ \\ -help : \u986F\u793A\u6B64\u7528\u6CD5\u8A0A\u606F diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java index d9568cfca18..ffc3b147936 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/NGCCRuntimeEx.java @@ -83,10 +83,9 @@ public final class NGCCRuntimeEx extends NGCCRuntime { * @return * A list of regular expression patterns {@link Pattern} */ - public List getIncludePatterns(List includeContent ) { + public List getIncludePatterns(List includeContent ) { List includeRegexList = new ArrayList(); - for (int i = 0 ; i < includeContent.size(); i ++){ - String includes = (String)includeContent.get(i); + for (String includes : includeContent) { String regex = convertToRegex(includes); Pattern pattern = Pattern.compile(regex); includeRegexList.add(pattern); @@ -103,10 +102,9 @@ public final class NGCCRuntimeEx extends NGCCRuntime { * @return * A list of regular expression patterns {@link Pattern} */ - public List getExcludePatterns(List excludeContent ) { - List excludeRegexList = new ArrayList(); - for (int i = 0 ; i < excludeContent.size(); i ++){ - String excludes = (String)excludeContent.get(i); + public List getExcludePatterns(List excludeContent ) { + List excludeRegexList = new ArrayList(); + for (String excludes : excludeContent) { String regex = convertToRegex(excludes); Pattern pattern = Pattern.compile(regex); excludeRegexList.add(pattern); @@ -126,17 +124,16 @@ public final class NGCCRuntimeEx extends NGCCRuntime { for ( int i = 0 ; i < pattern.length(); i ++ ) { char c = pattern.charAt(i); - int j = i; nc = ' '; - if ((j+1) != pattern.length()) { - nc = pattern.charAt(j+1); + if ((i +1) != pattern.length()) { + nc = pattern.charAt(i +1); } //escape single '.' - if ((c=='.') && ( nc !='.')){ + if (c == '.' && nc != '.'){ regex.append('\\'); regex.append('.'); //do not allow patterns like a..b - } else if ((c=='.') && ( nc =='.')){ + } else if (c == '.'){ continue; // "**" gets replaced by ".*" } else if ((c=='*') && (nc == '*')) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java index 1e5900c5c0e..cd4619ad336 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ package com.sun.tools.internal.jxc; import com.sun.tools.internal.jxc.ap.Options; import com.sun.tools.internal.xjc.BadCommandLineException; -import com.sun.tools.internal.xjc.api.util.ApClassLoader; -import com.sun.tools.internal.xjc.api.util.ToolsJarNotFoundException; import com.sun.xml.internal.bind.util.Which; import javax.lang.model.SourceVersion; @@ -45,7 +43,9 @@ import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; +import java.net.URLClassLoader; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.logging.Level; @@ -70,7 +70,6 @@ public class SchemaGenerator { if (cl==null) { cl = SecureLoader.getSystemClassLoader(); } -// ClassLoader classLoader = new ApClassLoader(cl, packagePrefixes); // todo: check if can be removed return run(args, cl); } catch(Exception e) { System.err.println(e.getMessage()); @@ -78,19 +77,6 @@ public class SchemaGenerator { } } - /** - * List of package prefixes we want to load in the same package - */ - private static final String[] packagePrefixes = { - "com.sun.tools.internal.jxc.", - "com.sun.tools.internal.xjc.", - "com.sun.istack.internal.tools.", - "com.sun.tools.javac.", - "com.sun.tools.javadoc.", - "javax.annotation.processing.", - "javax.lang.model." - }; - /** * Runs the schema generator. * @@ -148,18 +134,8 @@ public class SchemaGenerator { aptargs.add(options.encoding); } - // make jaxb-api.jar visible to classpath - File jaxbApi = findJaxbApiJar(); - if(jaxbApi!=null) { - if(options.classpath!=null) { - options.classpath = options.classpath+File.pathSeparatorChar+jaxbApi; - } else { - options.classpath = jaxbApi.getPath(); - } - } - aptargs.add("-cp"); - aptargs.add(options.classpath); + aptargs.add(setClasspath(options.classpath)); // set original classpath + jaxb-api to be visible to annotation processor if(options.targetDir!=null) { aptargs.add("-d"); @@ -172,6 +148,31 @@ public class SchemaGenerator { return ((Boolean) compileMethod.invoke(null, argsarray, options.episodeFile)) ? 0 : 1; } + private static String setClasspath(String givenClasspath) { + StringBuilder cp = new StringBuilder(); + appendPath(cp, givenClasspath); + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + while (cl != null) { + if (cl instanceof URLClassLoader) { + for (URL url : ((URLClassLoader) cl).getURLs()) { + appendPath(cp, url.getPath()); + } + } + cl = cl.getParent(); + } + + appendPath(cp, findJaxbApiJar()); + return cp.toString(); + } + + private static void appendPath(StringBuilder cp, String url) { + if (url == null || url.trim().isEmpty()) + return; + if (cp.length() != 0) + cp.append(File.pathSeparatorChar); + cp.append(url); + } + /** * Computes the file system path of jaxb-api.jar so that * Annotation Processing will see them in the -cp option. @@ -183,7 +184,7 @@ public class SchemaGenerator { * @return * null if failed to locate it. */ - private static File findJaxbApiJar() { + private static String findJaxbApiJar() { String url = Which.which(JAXBContext.class); if(url==null) return null; // impossible, but hey, let's be defensive @@ -198,11 +199,11 @@ public class SchemaGenerator { try { File f = new File(new URL(jarFileUrl).toURI()); if (f.exists() && f.getName().endsWith(".jar")) { // see 6510966 - return f; + return f.getPath(); } f = new File(new URL(jarFileUrl).getFile()); if (f.exists() && f.getName().endsWith(".jar")) { // this is here for potential backw. compatibility issues - return f; + return f.getPath(); } } catch (URISyntaxException ex) { Logger.getLogger(SchemaGenerator.class.getName()).log(Level.SEVERE, null, ex); @@ -212,18 +213,6 @@ public class SchemaGenerator { return null; } - /** - * Returns true if the list of arguments have an argument - * that looks like a class name. - */ - private static boolean hasClass(List args) { - for (String arg : args) { - if(!arg.endsWith(".java")) - return true; - } - return false; - } - private static void usage( ) { System.out.println(Messages.USAGE.format()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java index 46e9a52cfad..eeb4203fc1f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SchemaGeneratorFacade.java @@ -25,7 +25,6 @@ package com.sun.tools.internal.jxc; -import com.sun.tools.internal.jxc.SecureLoader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java index f78b4452d10..af9be004c6c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/SecureLoader.java @@ -37,9 +37,9 @@ class SecureLoader { if (System.getSecurityManager() == null) { return Thread.currentThread().getContextClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public ClassLoader run() { return Thread.currentThread().getContextClassLoader(); } }); @@ -50,9 +50,9 @@ class SecureLoader { if (System.getSecurityManager() == null) { return c.getClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public ClassLoader run() { return c.getClassLoader(); } }); @@ -63,9 +63,9 @@ class SecureLoader { if (System.getSecurityManager() == null) { return ClassLoader.getSystemClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public ClassLoader run() { return ClassLoader.getSystemClassLoader(); } }); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java index 7379322727b..f933c7c30e0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/AnnotationParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,10 +26,10 @@ package com.sun.tools.internal.jxc.ap; import com.sun.tools.internal.jxc.ConfigReader; +import com.sun.tools.internal.jxc.api.JXC; import com.sun.tools.internal.xjc.ErrorReceiver; import com.sun.tools.internal.xjc.api.J2SJAXBModel; import com.sun.tools.internal.xjc.api.Reference; -import com.sun.tools.internal.xjc.api.XJC; import org.xml.sax.SAXException; import javax.annotation.processing.AbstractProcessor; @@ -37,7 +37,6 @@ import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedAnnotationTypes; import javax.annotation.processing.SupportedOptions; -import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; @@ -50,7 +49,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; -import java.util.List; import java.util.Set; import java.util.StringTokenizer; @@ -60,11 +58,12 @@ import java.util.StringTokenizer; * and the config files * It also reads config files * + * Used in unit tests + * * @author Bhakti Mehta (bhakti.mehta@sun.com) */ @SupportedAnnotationTypes("javax.xml.bind.annotation.*") -@SupportedOptions("jaxb.config") // Const.CONFIG_FILE_OPTION.getValue() -@SupportedSourceVersion(SourceVersion.RELEASE_6) +@SupportedOptions("jaxb.config") public final class AnnotationParser extends AbstractProcessor { private ErrorReceiver errorListener; @@ -110,7 +109,7 @@ public final class AnnotationParser extends AbstractProcessor { ); Collection classesToBeIncluded = configReader.getClassesToBeIncluded(); - J2SJAXBModel model = XJC.createJavaCompiler().bind( + J2SJAXBModel model = JXC.createJavaCompiler().bind( classesToBeIncluded, Collections.emptyMap(), null, processingEnv); SchemaOutputResolver schemaOutputResolver = configReader.getSchemaOutputResolver(); @@ -128,10 +127,19 @@ public final class AnnotationParser extends AbstractProcessor { private void filterClass(Collection rootElements, Collection elements) { for (Element element : elements) { - if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.INTERFACE)) { + if (element.getKind().equals(ElementKind.CLASS) || element.getKind().equals(ElementKind.INTERFACE) || + element.getKind().equals(ElementKind.ENUM)) { rootElements.add((TypeElement) element); filterClass(rootElements, ElementFilter.typesIn(element.getEnclosedElements())); } } } + + @Override + public SourceVersion getSupportedSourceVersion() { + if (SourceVersion.latest().compareTo(SourceVersion.RELEASE_6) > 0) + return SourceVersion.valueOf("RELEASE_7"); + else + return SourceVersion.RELEASE_6; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties new file mode 100644 index 00000000000..73c5fc203d5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_de.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = Verzeichnis "{0}" ist nicht vorhanden. + +UNRECOGNIZED_PARAMETER = Unbekannte Option {0} ist nicht g\u00FCltig. + +OPERAND_MISSING = In Option "{0}" fehlt ein Operand. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties new file mode 100644 index 00000000000..ee609111f1e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_es.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = El directorio "{0}" no existe. + +UNRECOGNIZED_PARAMETER = La opci\u00F3n no reconocida {0} no es v\u00E1lida. + +OPERAND_MISSING = A la opci\u00F3n "{0}" le falta un operando. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties new file mode 100644 index 00000000000..b190fd5e453 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_fr.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = Le r\u00E9pertoire "{0}" n''existe pas. + +UNRECOGNIZED_PARAMETER = L''option {0} non reconnue n''est pas valide. + +OPERAND_MISSING = Un op\u00E9rande est manquant dans l''option "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties new file mode 100644 index 00000000000..1fd311f8f08 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_it.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = La directory "{0}" non esiste. + +UNRECOGNIZED_PARAMETER = L''opzione non riconosciuta {0} non \u00E8 valida. + +OPERAND_MISSING = Operando mancante nell''opzione "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties new file mode 100644 index 00000000000..564ccd9d423 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ja.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA"{0}"\u304C\u5B58\u5728\u3057\u307E\u305B\u3093\u3002 + +UNRECOGNIZED_PARAMETER = \u8A8D\u8B58\u3055\u308C\u306A\u3044\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306F\u7121\u52B9\u3067\u3059\u3002 + +OPERAND_MISSING = \u30AA\u30D7\u30B7\u30E7\u30F3"{0}"\u306B\u30AA\u30DA\u30E9\u30F3\u30C9\u304C\u3042\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties new file mode 100644 index 00000000000..69aad4b3673 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_ko.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = "{0}" \uB514\uB809\uD1A0\uB9AC\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +UNRECOGNIZED_PARAMETER = \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC635\uC158 {0}\uC740(\uB294) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. + +OPERAND_MISSING = "{0}" \uC635\uC158\uC5D0 \uD53C\uC5F0\uC0B0\uC790\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties new file mode 100644 index 00000000000..a5fde132741 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_pt_BR.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = O diret\u00F3rio "{0}" n\u00E3o existe. + +UNRECOGNIZED_PARAMETER = A op\u00E7\u00E3o {0} n\u00E3o reconhecida \u00E9 inv\u00E1lida. + +OPERAND_MISSING = A op\u00E7\u00E3o "{0}" n\u00E3o encontrou um operando. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties new file mode 100644 index 00000000000..14908ab4ffd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_CN.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = \u76EE\u5F55 "{0}" \u4E0D\u5B58\u5728\u3002 + +UNRECOGNIZED_PARAMETER = \u65E0\u6CD5\u8BC6\u522B\u7684\u9009\u9879{0}, \u8BE5\u9009\u9879\u65E0\u6548\u3002 + +OPERAND_MISSING = \u9009\u9879 "{0}" \u7F3A\u5C11\u64CD\u4F5C\u6570\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties new file mode 100644 index 00000000000..2f761f08dc3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/MessageBundle_zh_TW.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +NON_EXISTENT_FILE = \u76EE\u9304 "{0}" \u4E0D\u5B58\u5728. + +UNRECOGNIZED_PARAMETER = \u7121\u6CD5\u8FA8\u8B58\u7684\u9078\u9805 {0} \u7121\u6548. + +OPERAND_MISSING = \u9078\u9805 "{0}" \u907A\u6F0F\u904B\u7B97\u5143. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java index 0ab2a2e066e..dc1a3b288d7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/Options.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,6 +39,8 @@ import com.sun.tools.internal.xjc.BadCommandLineException; */ public class Options { + public static final String DISABLE_XML_SECURITY = "-disableXmlSecurity"; + // honor CLASSPATH environment variable, but it will be overrided by -cp public String classpath = System.getenv("CLASSPATH"); @@ -46,6 +48,8 @@ public class Options { public File episodeFile = null; + private boolean disableXmlSecurity = false; + // encoding is not required for JDK5, 6, but JDK 7 javac is much more strict - see issue 6859289 public String encoding = null; @@ -85,6 +89,14 @@ public class Options { return 1; } + if (args[i].equals(DISABLE_XML_SECURITY)) { + if (i == args.length - 1) + throw new BadCommandLineException( + (Messages.OPERAND_MISSING.format(args[i]))); + disableXmlSecurity = true; + return 1; + } + if (args[i].equals("-encoding")) { if (i == args.length - 1) throw new BadCommandLineException( @@ -106,5 +118,13 @@ public class Options { } + /** + * @return the disableXmlSecurity + */ + public boolean isDisableXmlSecurity() { + return disableXmlSecurity; + } + + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java index b320b88e7c0..4f84ade729c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SchemaGenerator.java @@ -27,15 +27,14 @@ package com.sun.tools.internal.jxc.ap; +import com.sun.tools.internal.jxc.api.JXC; import com.sun.tools.internal.xjc.api.J2SJAXBModel; import com.sun.tools.internal.xjc.api.Reference; -import com.sun.tools.internal.xjc.api.XJC; import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.Processor; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedAnnotationTypes; -import javax.annotation.processing.SupportedSourceVersion; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.ElementKind; @@ -66,7 +65,6 @@ import java.util.Set; * @author Kohsuke Kawaguchi */ @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_6) public class SchemaGenerator extends AbstractProcessor { /** @@ -96,7 +94,7 @@ public class SchemaGenerator extends AbstractProcessor { // so that users won't have to manually exclude interfaces, which is silly. filterClass(classes, roundEnv.getRootElements()); - J2SJAXBModel model = XJC.createJavaCompiler().bind(classes, Collections.emptyMap(), null, processingEnv); + J2SJAXBModel model = JXC.createJavaCompiler().bind(classes, Collections.emptyMap(), null, processingEnv); if (model == null) return false; // error @@ -143,4 +141,12 @@ public class SchemaGenerator extends AbstractProcessor { } } } + + @Override + public SourceVersion getSupportedSourceVersion() { + if (SourceVersion.latest().compareTo(SourceVersion.RELEASE_6) > 0) + return SourceVersion.valueOf("RELEASE_7"); + else + return SourceVersion.RELEASE_6; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java index 09774a802fa..3652e9b0b08 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/ap/SecureLoader.java @@ -37,9 +37,9 @@ class SecureLoader { if (System.getSecurityManager() == null) { return Thread.currentThread().getContextClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public ClassLoader run() { return Thread.currentThread().getContextClassLoader(); } }); @@ -50,9 +50,9 @@ class SecureLoader { if (System.getSecurityManager() == null) { return c.getClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public ClassLoader run() { return c.getClassLoader(); } }); @@ -63,9 +63,9 @@ class SecureLoader { if (System.getSecurityManager() == null) { return ClassLoader.getSystemClassLoader(); } else { - return (ClassLoader) java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.lang.Object run() { + return java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public ClassLoader run() { return ClassLoader.getSystemClassLoader(); } }); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyleFeature.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java similarity index 69% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyleFeature.java rename to jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java index 8e39ef357eb..6f97773d23e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/EnvelopeStyleFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/JXC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,23 +23,23 @@ * questions. */ -package com.sun.xml.internal.org.jvnet.ws; +package com.sun.tools.internal.jxc.api; -import javax.xml.ws.WebServiceFeature; +import com.sun.tools.internal.xjc.api.JavaCompiler; +import com.sun.tools.internal.jxc.api.impl.j2s.JavaCompilerImpl; -public class EnvelopeStyleFeature extends WebServiceFeature { - - private EnvelopeStyle.Style[] styles; - - public EnvelopeStyleFeature(EnvelopeStyle.Style... s) { - styles = s; - } - - public EnvelopeStyle.Style[] getStyles() { - return styles; - } - - public String getID() { - return EnvelopeStyleFeature.class.getName(); +/** + * User: Iaroslav Savytskyi + * Date: 25/05/12 + */ +public class JXC { + /** + * Gets a fresh {@link JavaCompiler}. + * + * @return + * always return non-null object. + */ + public static JavaCompiler createJavaCompiler() { + return new JavaCompilerImpl(); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/j2s/JAXBModelImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java similarity index 99% rename from jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/j2s/JAXBModelImpl.java rename to jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java index 441b037140c..ce768a0c19d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/j2s/JAXBModelImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JAXBModelImpl.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.internal.xjc.api.impl.j2s; +package com.sun.tools.internal.jxc.api.impl.j2s; import java.io.IOException; import java.util.ArrayList; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/j2s/JavaCompilerImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java similarity index 98% rename from jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/j2s/JavaCompilerImpl.java rename to jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java index ae57cce9718..6fb4b732661 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/api/impl/j2s/JavaCompilerImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/api/impl/j2s/JavaCompilerImpl.java @@ -23,7 +23,7 @@ * questions. */ -package com.sun.tools.internal.xjc.api.impl.j2s; +package com.sun.tools.internal.jxc.api.impl.j2s; import java.util.Collection; import java.util.Collections; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java index 9d59a45e6d1..be038f6a6d0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/AttributesImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java index 83b5624e842..b95cf71ad2b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Classes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,29 +78,6 @@ public class Classes extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 12: - { - if(($__uri.equals("") && $__local.equals("classes"))) { - $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); - $_ngcc_current_state = 11; - } - else { - unexpectedEnterElement($__qname); - } - } - break; - case 2: - { - if(($__uri.equals("") && $__local.equals("excludes"))) { - $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); - $_ngcc_current_state = 6; - } - else { - $_ngcc_current_state = 1; - $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); - } - } - break; case 0: { revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); @@ -123,6 +100,29 @@ public class Classes extends NGCCHandler { } } break; + case 2: + { + if(($__uri.equals("") && $__local.equals("excludes"))) { + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); + $_ngcc_current_state = 6; + } + else { + $_ngcc_current_state = 1; + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + } + } + break; + case 12: + { + if(($__uri.equals("") && $__local.equals("classes"))) { + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); + $_ngcc_current_state = 11; + } + else { + unexpectedEnterElement($__qname); + } + } + break; default: { unexpectedEnterElement($__qname); @@ -137,11 +137,11 @@ public class Classes extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 3: + case 8: { - if(($__uri.equals("") && $__local.equals("excludes"))) { + if(($__uri.equals("") && $__local.equals("includes"))) { $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); - $_ngcc_current_state = 1; + $_ngcc_current_state = 2; } else { unexpectedLeaveElement($__qname); @@ -159,12 +159,6 @@ public class Classes extends NGCCHandler { } } break; - case 2: - { - $_ngcc_current_state = 1; - $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); - } - break; case 0: { revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); @@ -176,17 +170,23 @@ public class Classes extends NGCCHandler { $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); } break; - case 8: + case 3: { - if(($__uri.equals("") && $__local.equals("includes"))) { + if(($__uri.equals("") && $__local.equals("excludes"))) { $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); - $_ngcc_current_state = 2; + $_ngcc_current_state = 1; } else { unexpectedLeaveElement($__qname); } } break; + case 2: + { + $_ngcc_current_state = 1; + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + break; default: { unexpectedLeaveElement($__qname); @@ -201,12 +201,6 @@ public class Classes extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 2: - { - $_ngcc_current_state = 1; - $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); - } - break; case 0: { revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); @@ -218,6 +212,12 @@ public class Classes extends NGCCHandler { $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); } break; + case 2: + { + $_ngcc_current_state = 1; + $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; default: { unexpectedEnterAttribute($__qname); @@ -232,12 +232,6 @@ public class Classes extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 2: - { - $_ngcc_current_state = 1; - $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); - } - break; case 0: { revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); @@ -249,6 +243,12 @@ public class Classes extends NGCCHandler { $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); } break; + case 2: + { + $_ngcc_current_state = 1; + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; default: { unexpectedLeaveAttribute($__qname); @@ -260,26 +260,6 @@ public class Classes extends NGCCHandler { public void text(String $value) throws SAXException { int $ai; switch($_ngcc_current_state) { - case 6: - { - __text = $value; - $_ngcc_current_state = 4; - action1(); - } - break; - case 3: - { - exclude_content = $value; - $_ngcc_current_state = 3; - action0(); - } - break; - case 2: - { - $_ngcc_current_state = 1; - $runtime.sendText(super._cookie, $value); - } - break; case 9: { include_content = $value; @@ -287,6 +267,13 @@ public class Classes extends NGCCHandler { action2(); } break; + case 8: + { + include_content = $value; + $_ngcc_current_state = 8; + action2(); + } + break; case 0: { revertToParentFromText(this, super._cookie, $value); @@ -299,6 +286,26 @@ public class Classes extends NGCCHandler { action0(); } break; + case 3: + { + exclude_content = $value; + $_ngcc_current_state = 3; + action0(); + } + break; + case 6: + { + __text = $value; + $_ngcc_current_state = 4; + action1(); + } + break; + case 2: + { + $_ngcc_current_state = 1; + $runtime.sendText(super._cookie, $value); + } + break; case 10: { __text = $value; @@ -306,13 +313,6 @@ public class Classes extends NGCCHandler { action3(); } break; - case 8: - { - include_content = $value; - $_ngcc_current_state = 8; - action2(); - } - break; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java index 39a03ac07e3..7777f955275 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Config.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,11 +74,11 @@ public class Config extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 7: + case 1: { - if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { - $runtime.consumeAttribute($ai); - $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + if(($__uri.equals("") && $__local.equals("schema"))) { + NGCCHandler h = new Schema(this, super._source, $runtime, 31, baseDir); + spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); } else { unexpectedEnterElement($__qname); @@ -90,11 +90,22 @@ public class Config extends NGCCHandler { revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); } break; - case 1: + case 7: { - if(($__uri.equals("") && $__local.equals("schema"))) { - NGCCHandler h = new Schema(this, super._source, $runtime, 31, baseDir); - spawnChildFromEnterElement(h, $__uri, $__local, $__qname, $attrs); + if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { + $runtime.consumeAttribute($ai); + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + } + else { + unexpectedEnterElement($__qname); + } + } + break; + case 8: + { + if(($__uri.equals("") && $__local.equals("config"))) { + $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); + $_ngcc_current_state = 7; } else { unexpectedEnterElement($__qname); @@ -113,17 +124,6 @@ public class Config extends NGCCHandler { } } break; - case 8: - { - if(($__uri.equals("") && $__local.equals("config"))) { - $runtime.onEnterElementConsumed($__uri, $__local, $__qname, $attrs); - $_ngcc_current_state = 7; - } - else { - unexpectedEnterElement($__qname); - } - } - break; case 4: { if(($__uri.equals("") && $__local.equals("classes"))) { @@ -149,11 +149,11 @@ public class Config extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 7: + case 1: { - if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { - $runtime.consumeAttribute($ai); - $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + if(($__uri.equals("") && $__local.equals("config"))) { + $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); + $_ngcc_current_state = 0; } else { unexpectedLeaveElement($__qname); @@ -165,11 +165,11 @@ public class Config extends NGCCHandler { revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); } break; - case 1: + case 7: { - if(($__uri.equals("") && $__local.equals("config"))) { - $runtime.onLeaveElementConsumed($__uri, $__local, $__qname); - $_ngcc_current_state = 0; + if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { + $runtime.consumeAttribute($ai); + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); } else { unexpectedLeaveElement($__qname); @@ -196,6 +196,11 @@ public class Config extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { + case 0: + { + revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); + } + break; case 7: { if(($__uri.equals("") && $__local.equals("baseDir"))) { @@ -206,11 +211,6 @@ public class Config extends NGCCHandler { } } break; - case 0: - { - revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); - } - break; case 2: { $_ngcc_current_state = 1; @@ -236,6 +236,12 @@ public class Config extends NGCCHandler { revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); } break; + case 2: + { + $_ngcc_current_state = 1; + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; case 5: { if(($__uri.equals("") && $__local.equals("baseDir"))) { @@ -246,12 +252,6 @@ public class Config extends NGCCHandler { } } break; - case 2: - { - $_ngcc_current_state = 1; - $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); - } - break; default: { unexpectedLeaveAttribute($__qname); @@ -263,6 +263,18 @@ public class Config extends NGCCHandler { public void text(String $value) throws SAXException { int $ai; switch($_ngcc_current_state) { + case 0: + { + revertToParentFromText(this, super._cookie, $value); + } + break; + case 6: + { + bd = $value; + $_ngcc_current_state = 5; + action1(); + } + break; case 7: { if(($ai = $runtime.getAttributeIndex("","baseDir"))>=0) { @@ -271,24 +283,12 @@ public class Config extends NGCCHandler { } } break; - case 0: - { - revertToParentFromText(this, super._cookie, $value); - } - break; case 2: { $_ngcc_current_state = 1; $runtime.sendText(super._cookie, $value); } break; - case 6: - { - bd = $value; - $_ngcc_current_state = 5; - action1(); - } - break; } } @@ -301,6 +301,12 @@ public class Config extends NGCCHandler { $_ngcc_current_state = 1; } break; + case 34: + { + this.classes = ((Classes)result); + $_ngcc_current_state = 2; + } + break; case 32: { this._schema = ((Schema)result); @@ -308,12 +314,6 @@ public class Config extends NGCCHandler { $_ngcc_current_state = 1; } break; - case 34: - { - this.classes = ((Classes)result); - $_ngcc_current_state = 2; - } - break; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java index ee14b720997..15fbe303731 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventReceiver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java index 4f81eddb34c..b90624a9648 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCEventSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java index 026afb1e9da..8fe7a1a84f0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java index b0330127a85..ddb023451ae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCInterleaveFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java index 4c546c7820b..74837e33070 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/NGCCRuntime.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java index e224db30e99..489de1c9ffc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/gen/config/Schema.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,23 +67,6 @@ public class Schema extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 6: - { - if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { - $runtime.consumeAttribute($ai); - $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); - } - else { - $_ngcc_current_state = 2; - $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); - } - } - break; - case 0: - { - revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); - } - break; case 2: { if(($ai = $runtime.getAttributeIndex("","location"))>=0) { @@ -107,6 +90,23 @@ public class Schema extends NGCCHandler { } } break; + case 0: + { + revertToParentFromEnterElement(this, super._cookie, $__uri, $__local, $__qname, $attrs); + } + break; + case 6: + { + if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { + $runtime.consumeAttribute($ai); + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + } + else { + $_ngcc_current_state = 2; + $runtime.sendEnterElement(super._cookie, $__uri, $__local, $__qname, $attrs); + } + } + break; default: { unexpectedEnterElement($__qname); @@ -121,23 +121,6 @@ public class Schema extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 6: - { - if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { - $runtime.consumeAttribute($ai); - $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); - } - else { - $_ngcc_current_state = 2; - $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); - } - } - break; - case 0: - { - revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); - } - break; case 1: { if(($__uri.equals("") && $__local.equals("schema"))) { @@ -161,6 +144,23 @@ public class Schema extends NGCCHandler { } } break; + case 0: + { + revertToParentFromLeaveElement(this, super._cookie, $__uri, $__local, $__qname); + } + break; + case 6: + { + if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { + $runtime.consumeAttribute($ai); + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + else { + $_ngcc_current_state = 2; + $runtime.sendLeaveElement(super._cookie, $__uri, $__local, $__qname); + } + } + break; default: { unexpectedLeaveElement($__qname); @@ -175,13 +175,13 @@ public class Schema extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { - case 6: + case 2: { - if(($__uri.equals("") && $__local.equals("namespace"))) { - $_ngcc_current_state = 8; + if(($__uri.equals("") && $__local.equals("location"))) { + $_ngcc_current_state = 4; } else { - $_ngcc_current_state = 2; + $_ngcc_current_state = 1; $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); } } @@ -191,13 +191,13 @@ public class Schema extends NGCCHandler { revertToParentFromEnterAttribute(this, super._cookie, $__uri, $__local, $__qname); } break; - case 2: + case 6: { - if(($__uri.equals("") && $__local.equals("location"))) { - $_ngcc_current_state = 4; + if(($__uri.equals("") && $__local.equals("namespace"))) { + $_ngcc_current_state = 8; } else { - $_ngcc_current_state = 1; + $_ngcc_current_state = 2; $runtime.sendEnterAttribute(super._cookie, $__uri, $__local, $__qname); } } @@ -216,6 +216,12 @@ public class Schema extends NGCCHandler { $localName = $__local; $qname = $__qname; switch($_ngcc_current_state) { + case 2: + { + $_ngcc_current_state = 1; + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; case 7: { if(($__uri.equals("") && $__local.equals("namespace"))) { @@ -226,23 +232,6 @@ public class Schema extends NGCCHandler { } } break; - case 6: - { - $_ngcc_current_state = 2; - $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); - } - break; - case 0: - { - revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); - } - break; - case 2: - { - $_ngcc_current_state = 1; - $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); - } - break; case 3: { if(($__uri.equals("") && $__local.equals("location"))) { @@ -253,6 +242,17 @@ public class Schema extends NGCCHandler { } } break; + case 0: + { + revertToParentFromLeaveAttribute(this, super._cookie, $__uri, $__local, $__qname); + } + break; + case 6: + { + $_ngcc_current_state = 2; + $runtime.sendLeaveAttribute(super._cookie, $__uri, $__local, $__qname); + } + break; default: { unexpectedLeaveAttribute($__qname); @@ -264,14 +264,14 @@ public class Schema extends NGCCHandler { public void text(String $value) throws SAXException { int $ai; switch($_ngcc_current_state) { - case 6: + case 2: { - if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { + if(($ai = $runtime.getAttributeIndex("","location"))>=0) { $runtime.consumeAttribute($ai); $runtime.sendText(super._cookie, $value); } else { - $_ngcc_current_state = 2; + $_ngcc_current_state = 1; $runtime.sendText(super._cookie, $value); } } @@ -283,25 +283,25 @@ public class Schema extends NGCCHandler { action0(); } break; - case 0: - { - revertToParentFromText(this, super._cookie, $value); - } - break; case 8: { namespace = $value; $_ngcc_current_state = 7; } break; - case 2: + case 0: { - if(($ai = $runtime.getAttributeIndex("","location"))>=0) { + revertToParentFromText(this, super._cookie, $value); + } + break; + case 6: + { + if(($ai = $runtime.getAttributeIndex("","namespace"))>=0) { $runtime.consumeAttribute($ai); $runtime.sendText(super._cookie, $value); } else { - $_ngcc_current_state = 1; + $_ngcc_current_state = 2; $runtime.sendText(super._cookie, $value); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java index da1cf800e89..8ffebd2a81c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/jxc/model/nav/ApNavigator.java @@ -31,7 +31,6 @@ import com.sun.source.util.Trees; import com.sun.xml.internal.bind.v2.model.nav.Navigator; import com.sun.xml.internal.bind.v2.runtime.Location; -import java.lang.annotation.Annotation; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.AnnotationMirror; import javax.lang.model.element.Element; @@ -53,6 +52,7 @@ import javax.lang.model.util.ElementFilter; import javax.lang.model.util.Elements; import javax.lang.model.util.SimpleTypeVisitor6; import javax.lang.model.util.Types; +import java.lang.annotation.Annotation; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; @@ -375,17 +375,17 @@ public class ApNavigator implements Navigator getAnnotationMirrors() { throw new IllegalStateException(); } - @Override +// @Override public A getAnnotation(Class annotationType) { throw new IllegalStateException(); } - @Override +// @Override public A[] getAnnotationsByType(Class annotationType) { throw new IllegalStateException(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java index d7718436b76..a0368e87109 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/Invoker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,6 +55,45 @@ import java.util.List; * @author Kohsuke Kawaguchi */ public final class Invoker { + + /** + * The list of package prefixes we want the + * {@link MaskingClassLoader} to prevent the parent + * classLoader from loading + */ + static final String[] maskedPackages = new String[]{ + "com.sun.istack.internal.tools.", + "com.sun.tools.internal.jxc.", + "com.sun.tools.internal.xjc.", + "com.sun.tools.internal.ws.", + "com.sun.codemodel.internal.", + "com.sun.relaxng.", + "com.sun.xml.internal.xsom.", + "com.sun.xml.internal.bind.", + "com.ctc.wstx.", //wsimport, wsgen ant task + "org.codehaus.stax2.", //wsimport, wsgen ant task + "com.sun.xml.internal.messaging.saaj.", //wsgen ant task + "com.sun.xml.internal.ws.", + "com.oracle.webservices.internal.api." //wsgen + }; + + /** + * 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 final boolean noSystemProxies; + + static { + boolean noSysProxiesProperty = false; + try { + noSysProxiesProperty = Boolean.getBoolean(Invoker.class.getName()+".noSystemProxies"); + } catch(SecurityException e) { + // ignore + } finally { + noSystemProxies = noSysProxiesProperty; + } + } + static int invoke(String mainClass, String[] args) throws Throwable { // use the platform default proxy if available. // see sun.net.spi.DefaultProxySelector for details. @@ -107,7 +146,7 @@ public final class Invoker { // finally load the rest of the RI. The actual class files are loaded from ancestors cl = new ParallelWorldClassLoader(cl,""); - } + } } @@ -193,29 +232,6 @@ public final class Invoker { return cl; } - /** - * Creates a classloader for loading JAXB/WS 2.1 jar and tools.jar - */ - private static URL[] findIstack21APIs(ClassLoader cl) throws ClassNotFoundException, MalformedURLException, ToolsJarNotFoundException { - List urls = new ArrayList(); - - if(Service.class.getClassLoader()==null) { - // JAX-WS API is loaded from bootstrap classloader - URL res = cl.getResource("javax/xml/ws/EndpointReference.class"); - if(res==null) - throw new ClassNotFoundException("There's no JAX-WS 2.1 API in the classpath"); - urls.add(ParallelWorldClassLoader.toJarUrl(res)); - - res = cl.getResource("javax/xml/bind/annotation/XmlSeeAlso.class"); - if(res==null) - throw new ClassNotFoundException("There's no JAXB 2.1 API in the classpath"); - urls.add(ParallelWorldClassLoader.toJarUrl(res)); - } - - findToolsJar(cl, urls); - - return urls.toArray(new URL[urls.size()]); - } /** * Creates a classloader for loading JAXB/WS 2.2 jar and tools.jar */ @@ -258,37 +274,4 @@ public final class Invoker { } } - /** - * The list of package prefixes we want the - * {@link MaskingClassLoader} to prevent the parent - * classLoader from loading - */ - public static String[] maskedPackages = new String[]{ - "com.sun.istack.internal.tools.", - "com.sun.tools.internal.jxc.", - "com.sun.tools.internal.xjc.", - "com.sun.tools.internal.ws.", - "com.sun.codemodel.internal.", - "com.sun.relaxng.", - "com.sun.xml.internal.xsom.", - "com.sun.xml.internal.bind.", - "com.ctc.wstx.", //wsimport, wsgen ant task - "org.codehaus.stax2.", //wsimport, wsgen ant task - "com.sun.xml.internal.messaging.saaj.", //wsgen ant task - "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 - } - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java index 1dbe103471f..c65187bbb5f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/ToolVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java index efb0fc133fa..193b3979828 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsGen.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java index 7a41c71e105..14cf3d129c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/WsImport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java index 8ac5b599876..a19881d0936 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/TJavaGeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java index 48b0f14d39d..8adfba30798 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java index 59bcb091593..afb1d868a0f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/WsgenProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,13 +41,13 @@ import java.lang.annotation.*; public @interface WsgenProtocol { /** * Token for wsgen -wsdl[:protocol] - * @return + * @return Token for wsgen -wsdl[:protocol] */ String token(); /** * The corresponding lexical string used to create BindingID - * @return + * @return lexical string used to create BindingID */ String lexical(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java index f96cd425794..59096e3e438 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensible.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java index 83d977009af..19d2105a2c1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java index 1eee97676ba..c81fb1d5034 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java index e5a50f85fac..af722834e9f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java index 9083d373961..86fb27d13dc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/api/wsdl/TWSDLParserContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java index 3fb491a1203..d40f124a055 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java index dbe1eb7b350..51007945236 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/ProcessorException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java index 4b416471bc4..70b32d9a16a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/CustomExceptionGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java index 53c3989311e..5cefc79c05e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -60,11 +60,11 @@ import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import javax.annotation.processing.Filer; +import javax.tools.FileObject; + +import javax.tools.StandardLocation; -/** - * - * @author WS Development Team - */ public abstract class GeneratorBase implements ModelVisitor { private File destDir; private String targetVersion; @@ -96,28 +96,33 @@ public abstract class GeneratorBase implements ModelVisitor { } } + @Override public void visit(Model model) throws Exception { for (Service service : model.getServices()) { service.accept(this); } } + @Override public void visit(Service service) throws Exception { for (Port port : service.getPorts()) { port.accept(this); } } + @Override public void visit(Port port) throws Exception { for (Operation operation : port.getOperations()) { operation.accept(this); } } + @Override public void visit(Operation operation) throws Exception { operation.getRequest().accept(this); - if (operation.getResponse() != null) + if (operation.getResponse() != null) { operation.getResponse().accept(this); + } Iterator faults = operation.getFaultsSet().iterator(); if (faults != null) { Fault fault; @@ -128,21 +133,20 @@ public abstract class GeneratorBase implements ModelVisitor { } } - public void visit(Parameter param) throws Exception { - } + @Override + public void visit(Parameter param) throws Exception {} - public void visit(Block block) throws Exception { - } + @Override + public void visit(Block block) throws Exception {} - public void visit(Response response) throws Exception { - } + @Override + public void visit(Response response) throws Exception {} + @Override + public void visit(Request request) throws Exception {} - public void visit(Request request) throws Exception { - } - - public void visit(Fault fault) throws Exception { - } + @Override + public void visit(Fault fault) throws Exception {} public List getJAXWSClassComment(){ return getJAXWSClassComment(targetVersion); @@ -162,8 +166,9 @@ public abstract class GeneratorBase implements ModelVisitor { cls = cm._class(className, type); } catch (JClassAlreadyExistsException e){ cls = cm._getClass(className); - if(cls == null) + if (cls == null) { throw e; + } } return cls; } @@ -181,8 +186,9 @@ public abstract class GeneratorBase implements ModelVisitor { protected void writeHandlerConfig(String className, JDefinedClass cls, WsimportOptions options) { Element e = options.getHandlerChainConfiguration(); - if(e == null) + if (e == null) { return; + } JAnnotationUse handlerChainAnn = cls.annotate(cm.ref(HandlerChain.class)); NodeList nl = e.getElementsByTagNameNS( "http://java.sun.com/xml/ns/javaee", "handler-chain"); @@ -199,17 +205,25 @@ public abstract class GeneratorBase implements ModelVisitor { } private void generateHandlerChainFile(Element hChains, String name) { - String hcName = getHandlerConfigFileName(name); - File packageDir = DirectoryUtil.getOutputDirectoryFor(name, destDir); - File hcFile = new File(packageDir, hcName); - - options.addGeneratedFile(hcFile); + Filer filer = options.filer; try { - IndentingWriter p = - new IndentingWriter( - new OutputStreamWriter(new FileOutputStream(hcFile))); + IndentingWriter p; + FileObject jfo; + if (filer != null) { + jfo = filer.createResource(StandardLocation.SOURCE_OUTPUT, + Names.getPackageName(name), getHandlerConfigFileName(name)); + options.addGeneratedFile(new File(jfo.toUri())); + p = new IndentingWriter(new OutputStreamWriter(jfo.openOutputStream())); + } else { // leave for backw. compatibility now + String hcName = getHandlerConfigFileName(name); + File packageDir = DirectoryUtil.getOutputDirectoryFor(name, destDir); + File hcFile = new File(packageDir, hcName); + options.addGeneratedFile(hcFile); + p = new IndentingWriter(new OutputStreamWriter(new FileOutputStream(hcFile))); + } + Transformer it = XmlUtil.newTransformer(); it.setOutputProperty(OutputKeys.METHOD, "xml"); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java index c7d2c9c49da..a108db2a5bf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java index aa1252f17b3..6769f85c61e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java index c431b77ff75..e9edc067571 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,7 +62,7 @@ public abstract class GeneratorExtension { /** * Allow additional wsimport options - * @param name, for instance, "-neoption" + * @param name for instance, "-neoption" * @return whether the name specifies an option recognized by the extension */ public boolean validateOption(String name) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java index 95571fa9828..52cfd51501c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/GeneratorUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java index ce67afdabaa..d5ebd8627b3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JavaGeneratorExtensionFacade.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java index bfbc6bfe26e..6f79c943299 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/JwsImplGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -50,6 +50,7 @@ import javax.xml.ws.BindingType; import javax.xml.namespace.QName; import javax.xml.ws.Holder; import java.io.File; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -84,12 +85,12 @@ public final class JwsImplGenerator extends GeneratorBase { jwsImplGenerator.init(model, options, receiver); jwsImplGenerator.doGeneration(); // print a warning message while implFiles.size() is zero - if (jwsImplGenerator.implFiles.size() == 0) { - StringBuffer msg = new StringBuffer(); + if (jwsImplGenerator.implFiles.isEmpty()) { + StringBuilder msg = new StringBuilder(); if (options.implServiceName != null) - msg.append("serviceName=[" + options.implServiceName + "] "); + msg.append("serviceName=[").append(options.implServiceName).append("] "); if (options.implPortName != null) - msg.append("portName=[" + options.implPortName + "] "); + msg.append("portName=[").append(options.implPortName).append("] "); if (msg.length() > 0) msg.append(", Not found in wsdl file.\n"); @@ -107,7 +108,7 @@ public final class JwsImplGenerator extends GeneratorBase { public static boolean moveToImplDestDir(List gImplFiles, WsimportOptions options, ErrorReceiver receiver) { if (options.implDestDir == null || gImplFiles == null - || gImplFiles.size() == 0) + || gImplFiles.isEmpty()) return true; List generatedImplFiles = ImplFile.toImplFiles(gImplFiles); @@ -335,24 +336,29 @@ public final class JwsImplGenerator extends GeneratorBase { webServiceAnn.param("wsdlLocation", wsdlLocation); webServiceAnn.param("endpointInterface", port.getJavaInterface().getName()); } - //CR373098 To transform the java class name as validate. - private String transToValidJavaIdentifier(String s) { - if (s == null) return null; - final int len = s.length(); - StringBuffer retSB = new StringBuffer(); - if (len == 0 || !Character.isJavaIdentifierStart(s.charAt(0))) - retSB.append("J"); //update to a default start char - else - retSB.append(s.charAt(0)); - for (int i = 1; i < len; i++) { - if (!Character.isJavaIdentifierPart(s.charAt(i))) - ; //delete it if it is illegal //TODO: It might conflict "a-b" vs. "ab" - else - retSB.append(s.charAt(i)); - } - return retSB.toString(); - } + //CR373098 To transform the java class name as validate. + private String transToValidJavaIdentifier(String s) { + if (s == null) { + return null; + } + final int len = s.length(); + StringBuilder retSB = new StringBuilder(); + if (len == 0 || !Character.isJavaIdentifierStart(s.charAt(0))) { + retSB.append("J"); //update to a default start char + } else { + retSB.append(s.charAt(0)); + } + + for (int i = 1; i < len; i++) { + if (!Character.isJavaIdentifierPart(s.charAt(i))) + ; //delete it if it is illegal //TODO: It might conflict "a-b" vs. "ab" + else { + retSB.append(s.charAt(i)); + } + } + return retSB.toString(); + } private String makePackageQualified(String s) { s = transToValidJavaIdentifier(s); @@ -446,21 +452,20 @@ public final class JwsImplGenerator extends GeneratorBase { } } - // process the bindings in backup list of model + // process the bindings in whole document if (value == null) { - // TODO: The property "BAKEUP_BINDINGS" is set in WsdlModeler when init - // the model - // make this as a const if needed. - HashMap hm = (HashMap) model.getProperty("BAKEUP_BINDINGS"); - Binding b = (Binding) hm.get(bName); - if (b != null) { + if (model.getEntity() instanceof Definitions) { + Definitions definitions = (Definitions) model.getEntity(); + Binding b = (Binding) definitions.resolveBindings().get(bName); + if (b != null) { List bindextends = (List) b .extensions(); for (TWSDLExtension wsdlext : bindextends) { - value = resolveBindingValue(wsdlext); - if (value != null) - break; + value = resolveBindingValue(wsdlext); + if (value != null) + break; } + } } } @@ -478,14 +483,14 @@ public final class JwsImplGenerator extends GeneratorBase { * retrieved from WSDL * @return Standard BindingType URI defined by JAX-WS 2.0 specification. */ - private String translate(String transportURI) - { - String translatedBindingId = TRANSLATION_MAP.get(transportURI); - if (translatedBindingId == null) - translatedBindingId = transportURI; - - return translatedBindingId; - } +// private String translate(String transportURI) +// { +// String translatedBindingId = TRANSLATION_MAP.get(transportURI); +// if (translatedBindingId == null) +// translatedBindingId = transportURI; +// +// return translatedBindingId; +// } /***************************************************************************** * Inner classes definition @@ -529,7 +534,10 @@ public final class JwsImplGenerator extends GeneratorBase { ret = options.implDestDir; } - ret.mkdirs(); + boolean created = ret.mkdirs(); + if (options.verbose && !created) { + System.out.println(MessageFormat.format("Directory not created: {0}", ret)); + } return ret; } @@ -549,7 +557,7 @@ public final class JwsImplGenerator extends GeneratorBase { private static File findFile(WsimportOptions options, String qualifiedFileName) throws java.io.IOException { - String baseDir = options.destDir.getCanonicalPath(); + String baseDir = options.sourceDir.getCanonicalPath(); String fp = null; for (File f : options.getGeneratedFiles()) { fp = getQualifiedFileName(baseDir, f); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java index de713379793..93b682d366c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/Names.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java index 6fcd7a5742b..0a4223f1b69 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/SeiGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,10 +36,8 @@ import com.sun.tools.internal.ws.processor.model.jaxb.JAXBTypeAndAnnotation; 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; @@ -55,7 +53,6 @@ import java.util.List; import org.xml.sax.Locator; public class SeiGenerator extends GeneratorBase { - private String serviceNS; private TJavaGeneratorExtension extension; private List extensionHandlers; @@ -76,10 +73,11 @@ public class SeiGenerator extends GeneratorBase { register(new W3CAddressingJavaGeneratorExtension()); } - for (TJavaGeneratorExtension j : extensions) + for (TJavaGeneratorExtension j : extensions) { register(j); + } - this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[0])); + this.extension = new JavaGeneratorExtensionFacade(extensionHandlers.toArray(new TJavaGeneratorExtension[extensionHandlers.size()])); } private void write(Port port) { @@ -92,7 +90,7 @@ public class SeiGenerator extends GeneratorBase { } - JDefinedClass cls = null; + JDefinedClass cls; try { cls = getClass(className, ClassType.INTERFACE); } catch (JClassAlreadyExistsException e) { @@ -102,16 +100,18 @@ public class SeiGenerator extends GeneratorBase { Locator loc = null; if(portTypeName != null){ PortType pt = port.portTypes.get(portTypeName); - if(pt!=null) + 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()) + if (!cls.methods().isEmpty()) { return; + } //write class comment - JAXWS warning JDocComment comment = cls.javadoc(); @@ -138,8 +138,9 @@ public class SeiGenerator extends GeneratorBase { writeSOAPBinding(port, cls); //@XmlSeeAlso - if(options.target.isLaterThan(Options.Target.V2_1)) + if (options.target.isLaterThan(Options.Target.V2_1)) { writeXmlSeeAlso(cls); + } for (Operation operation: port.getOperations()) { JavaMethod method = operation.getJavaMethod(); @@ -159,8 +160,9 @@ public class SeiGenerator extends GeneratorBase { JCommentPart ret = methodDoc.addReturn(); ret.add("returns "+retType.getName()); } - if(methodJavaDoc != null) + if (methodJavaDoc != null) { methodDoc.add(methodJavaDoc); + } writeWebMethod(operation, m); JClass holder = cm.ref(Holder.class); @@ -196,8 +198,9 @@ public class SeiGenerator extends GeneratorBase { List objectFactories = model.getJAXBModel().getS2JJAXBModel().getAllObjectFactories(); //if there are no object facotires, dont generate @XmlSeeAlso - if(objectFactories.size() == 0) + if (objectFactories.isEmpty()) { return; + } JAnnotationUse xmlSeeAlso = cls.annotate(cm.ref(XmlSeeAlso.class)); JAnnotationArrayMember paramArray = xmlSeeAlso.paramArray("value"); @@ -261,21 +264,24 @@ public class SeiGenerator extends GeneratorBase { wr = m.annotate(javax.jws.WebResult.class); wr.param("name", resultName); } - if((nsURI != null) && (!nsURI.equals(serviceNS) || (isDocStyle && operation.isWrapped()))){ - if(wr == null) + if (nsURI != null || (isDocStyle && operation.isWrapped())) { + if(wr == null) { wr = m.annotate(javax.jws.WebResult.class); + } wr.param("targetNamespace", nsURI); } //doclit wrapped could have additional headers if(!(isDocStyle && operation.isWrapped()) || (parameter.getBlock().getLocation() == Block.HEADER)){ - if(wr == null) + if (wr == null) { wr = m.annotate(javax.jws.WebResult.class); + } wr.param("partName", parameter.getName()); } if(parameter.getBlock().getLocation() == Block.HEADER){ - if(wr == null) + if (wr == null) { wr = m.annotate(javax.jws.WebResult.class); + } wr.param("header",true); } } @@ -318,34 +324,43 @@ public class SeiGenerator extends GeneratorBase { } private boolean isHeaderParam(Parameter param, Message message) { - if (message.getHeaderBlockCount() == 0) + if (message.getHeaderBlockCount() == 0) { return false; + } - for (Block headerBlock : message.getHeaderBlocksMap().values()) - if (param.getBlock().equals(headerBlock)) + for (Block headerBlock : message.getHeaderBlocksMap().values()) { + if (param.getBlock().equals(headerBlock)) { return true; + } + } return false; } private boolean isAttachmentParam(Parameter param, Message message){ - if (message.getAttachmentBlockCount() == 0) + if (message.getAttachmentBlockCount() == 0) { return false; + } - for (Block attBlock : message.getAttachmentBlocksMap().values()) - if (param.getBlock().equals(attBlock)) + for (Block attBlock : message.getAttachmentBlocksMap().values()) { + if (param.getBlock().equals(attBlock)) { return true; + } + } return false; } private boolean isUnboundParam(Parameter param, Message message){ - if (message.getUnboundBlocksCount() == 0) + if (message.getUnboundBlocksCount() == 0) { return false; + } - for (Block unboundBlock : message.getUnboundBlocksMap().values()) - if (param.getBlock().equals(unboundBlock)) + for (Block unboundBlock : message.getUnboundBlocksMap().values()) { + if (param.getBlock().equals(unboundBlock)) { return true; + } + } return false; } @@ -361,10 +376,11 @@ public class SeiGenerator extends GeneratorBase { String name; boolean isWrapped = operation.isWrapped(); - if((param.getBlock().getLocation() == Block.HEADER) || (isDocStyle && !isWrapped)) + if ((param.getBlock().getLocation() == Block.HEADER) || (isDocStyle && !isWrapped)) { name = param.getBlock().getName().getLocalPart(); - else + } else { name = param.getName(); + } paramAnno.param("name", name); @@ -379,8 +395,9 @@ public class SeiGenerator extends GeneratorBase { ns = param.getBlock().getName().getNamespaceURI(); } - if((ns != null) && (!ns.equals(serviceNS) || (isDocStyle && isWrapped))) + if (ns != null || (isDocStyle && isWrapped)) { paramAnno.param("targetNamespace", ns); + } if (header) { paramAnno.param("header", true); @@ -394,8 +411,9 @@ public class SeiGenerator extends GeneratorBase { } //doclit wrapped could have additional headers - if(!(isDocStyle && isWrapped) || header) + if (!(isDocStyle && isWrapped) || header) { paramAnno.param("partName", javaParameter.getParameter().getName()); + } } private boolean isDocStyle = true; @@ -418,15 +436,18 @@ public class SeiGenerator extends GeneratorBase { continue; } sameParamStyle = (isWrapper == operation.isWrapped()); - if(!sameParamStyle) + if (!sameParamStyle) { break; + } } - if(sameParamStyle) + if (sameParamStyle) { port.setWrapped(isWrapper); + } } if(sameParamStyle && !port.isWrapped()){ - if(soapBindingAnn == null) + if (soapBindingAnn == null) { soapBindingAnn = cls.annotate(SOAPBinding.class); + } soapBindingAnn.param("parameterStyle", SOAPBinding.ParameterStyle.BARE); } } @@ -437,15 +458,14 @@ public class SeiGenerator extends GeneratorBase { wsa.param("targetNamespace", name.getNamespaceURI()); } - - - + @Override public void visit(Model model) throws Exception { for(Service s:model.getServices()){ s.accept(this); } } + @Override public void visit(Service service) throws Exception { String jd = model.getJavaDoc(); if(jd != null){ diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java index 4dddb7eae49..958484e7b60 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/ServiceGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,6 +66,7 @@ import java.net.MalformedURLException; import java.net.URL; import com.sun.xml.internal.ws.util.ServiceFinder; +import java.util.Locale; /** * @author WS Development Team @@ -100,7 +101,7 @@ public class ServiceGenerator extends GeneratorBase { } cls._extends(javax.xml.ws.Service.class); - String serviceFieldName = BindingHelper.mangleNameToClassName(service.getName().getLocalPart()).toUpperCase(); + String serviceFieldName = BindingHelper.mangleNameToClassName(service.getName().getLocalPart()).toUpperCase(Locale.ENGLISH); String wsdlLocationName = serviceFieldName + "_WSDL_LOCATION"; JFieldVar urlField = cls.field(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, URL.class, wsdlLocationName); @@ -219,8 +220,9 @@ public class ServiceGenerator extends GeneratorBase { Locator loc = null; if (portTypeName != null) { PortType pt = port.portTypes.get(portTypeName); - if (pt != null) + if (pt != null) { loc = pt.getLocator(); + } } receiver.error(loc, GeneratorMessages.GENERATOR_SEI_CLASS_ALREADY_EXIST(port.getJavaInterface().getName(), portTypeName)); return; @@ -230,8 +232,9 @@ public class ServiceGenerator extends GeneratorBase { writeDefaultGetPort(port, retType, cls); //write getXyzPort(WebServicesFeature...) - if (options.target.isLaterThan(Options.Target.V2_1)) + if (options.target.isLaterThan(Options.Target.V2_1)) { writeGetPort(port, retType, cls); + } } writeGetWsdlLocation(cm.ref(URL.class), cls, urlField, exField); @@ -240,8 +243,9 @@ public class ServiceGenerator extends GeneratorBase { 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 "); @@ -250,7 +254,7 @@ public class ServiceGenerator extends GeneratorBase { ret.add("returns " + retType.name()); m.varParam(WebServiceFeature.class, "features"); JBlock body = m.body(); - StringBuffer statement = new StringBuffer("return "); + StringBuilder statement = new StringBuilder("return "); statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), "); statement.append(retType.name()); statement.append(".class, features);"); @@ -389,12 +393,13 @@ public class ServiceGenerator extends GeneratorBase { 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()); JBlock body = m.body(); - StringBuffer statement = new StringBuffer("return "); + StringBuilder statement = new StringBuilder("return "); statement.append("super.getPort(new QName(\"").append(port.getName().getNamespaceURI()).append("\", \"").append(port.getName().getLocalPart()).append("\"), "); statement.append(retType.name()); statement.append(".class);"); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java index 6fbebf322ad..f235bf3c1a4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/generator/W3CAddressingJavaGeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java index a2def158843..dd2b484a10e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AbstractType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java index ab3ed87e7e4..864baed022f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java index b00c147f1de..9cf2c8b009e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/AsyncOperationType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java index 34f51d4d5e7..536189f6715 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Block.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java index e87a20f0306..e441a53a307 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ExtendedModelVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java index e4553a1ef89..22755636fbb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Fault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,6 @@ package com.sun.tools.internal.ws.processor.model; import com.sun.codemodel.internal.JClass; -import com.sun.tools.internal.ws.processor.generator.GeneratorUtil; import com.sun.tools.internal.ws.processor.model.java.JavaException; import com.sun.tools.internal.ws.wsdl.framework.Entity; @@ -34,7 +33,6 @@ import javax.xml.namespace.QName; import java.util.HashSet; import java.util.Iterator; import java.util.Set; -import java.util.TreeSet; /** * @@ -49,7 +47,6 @@ public class Fault extends ModelObject { public Fault(String name, Entity entity) { super(entity); this.name = name; - parentFault = null; } public String getName() { @@ -80,12 +77,8 @@ public class Fault extends ModelObject { visitor.visit(this); } - public Fault getParentFault() { - return parentFault; - } - public Iterator getSubfaults() { - if (subfaults.size() == 0) { + if (subfaults.isEmpty()) { return null; } return subfaults.iterator(); @@ -103,7 +96,7 @@ public class Fault extends ModelObject { public Iterator getAllFaults() { Set allFaults = getAllFaultsSet(); - if (allFaults.size() == 0) { + if (allFaults.isEmpty()) { return null; } return allFaults.iterator(); @@ -160,7 +153,6 @@ public class Fault extends ModelObject { private String name; private Block block; private JavaException javaException; - private Fault parentFault; private Set subfaults = new HashSet(); private QName elementName = null; private String javaMemberName = null; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java index a0841349d56..5945b40e052 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/HeaderFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java index f7b2a1f4886..5c51ae19306 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Message.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java index f5cfa063b86..e3b19b85be7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Model.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java index 136c2ffaeef..4194ad16b75 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.tools.internal.ws.processor.model; +import com.sun.istack.internal.localization.Localizable; import com.sun.tools.internal.ws.processor.ProcessorException; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * ModelException represents an exception that occurred while diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java index 886d04b60b8..0272003d441 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java index 6bef70393a6..d5994d84dbb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java index cadf2f30a55..98e94bd39b9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/ModelVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java index c0b9b21093c..0e285394bb9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Operation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java index e7d2fbfd2a4..a4d05f19887 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Parameter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java index 8f3010b7b36..33c52b78605 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Port.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java index 006c1a35c30..06408051240 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Request.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java index 37fd0ace089..07e81dc40cd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Response.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java index 4bd86cf12fc..3769ee7ab4b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/Service.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java index c0f65c777de..62e63bc56c2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/exporter/ExternalObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java index 6bd8b511e2b..76a5e6df7d4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaArrayType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java index adb9005aa67..0079a259c25 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java index 03606592b64..bf324384f72 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaInterface.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java index 43e34f51b36..0f0ba36d1e9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -86,14 +86,14 @@ public class JavaMethod { public void addParameter(JavaParameter param) { // verify that this member does not already exist if (hasParameter(param.getName())) { - if(options.isExtensionMode()){ + if (options.isExtensionMode()) { param.setName(getUniqueName(param.getName())); - }else{ + } 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{ + } 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())); } @@ -121,7 +121,7 @@ public class JavaMethod { private String getUniqueName(String param){ int parmNum = 0; - while(hasParameter(param)){ + while (hasParameter(param)) { param = param + Integer.toString(parmNum++); } return param; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java index a5379252c65..fe537878100 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaParameter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java index d022de53bdb..7ef5ce58e0b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaSimpleType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java index 1c03591fbaf..0849c482b56 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureMember.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java index 32de656f674..453a8cd8f95 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaStructureType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java index 8cbba7f8bc1..989b2fae375 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/java/JavaType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java index abb02aa30ba..44611d8e1f4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBElementMember.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java index f1265cf2b54..ba1f8d6e546 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBMapping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java index ffe6167df24..bda172e212a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java index 78a6dbbd5a4..7be1da8e65d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBProperty.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java index fbba6adb65f..257421f93a9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBStructuredType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java index 9d586206fb0..d95659acbd8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java index 854e6707cf4..494f9a66af4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeAndAnnotation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java index b8b2814e7bd..b54d2f71d59 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/JAXBTypeVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java index f0c901bc6cf..8e35bcb0e24 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitMember.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java index 8c2c030c0f1..f889dd99e2a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/RpcLitStructure.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java index 3d1a56b6e8c..d4cc024e495 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/model/jaxb/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java index 704c0284a6d..8e4fa274322 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/JavaSimpleTypeCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java index 047423faa69..e6cae5ceafa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/Modeler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java index 1f27b8716cf..086df5d4b77 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java index d4c0c473a05..45e111bd4bb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/ModelerException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.tools.internal.ws.processor.modeler; +import com.sun.istack.internal.localization.Localizable; import com.sun.tools.internal.ws.processor.ProcessorException; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * ModelerException represents an exception that occurred while @@ -38,6 +38,10 @@ import com.sun.xml.internal.ws.util.localization.Localizable; */ public class ModelerException extends ProcessorException { + public ModelerException(String key) { + super(key); + } + public ModelerException(String key, Object... args) { super(key, args); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java index 2adcf411ab3..65477911ac1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/AnnotationProcessorContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -57,7 +57,7 @@ public class AnnotationProcessorContext { public SeiContext getSeiContext(Name seiName) { SeiContext context = seiContextMap.get(seiName); if (context == null) { - context = new SeiContext(seiName); + context = new SeiContext(); addSeiContext(seiName, context); } return context; @@ -107,14 +107,17 @@ public class AnnotationProcessorContext { private Map resOperationWrapperMap = new HashMap(); private Map exceptionBeanMap = new HashMap(); - private Name seiName; private Name seiImplName; private boolean implementsSei; private String namespaceUri; - public SeiContext(Name seiName) { - this.seiName = seiName; - } + public SeiContext() {}; + + /** + * @deprecated use empty constructor, seiName value is ignored + * @param seiName + */ + public SeiContext(Name seiName) {}; public void setImplementsSei(boolean implementsSei) { this.implementsSei = implementsSei; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java index 97173c8d545..782bfde6dc9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/FaultInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java index ffadb217f3c..90a787b9acf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MakeSafeTypeVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java index 36fe6d04bce..747cae68f12 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/MemberInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import java.lang.annotation.Annotation; import java.util.List; /** - * + * Note: this class has a natural ordering that is inconsistent with equals. * @author WS Development Team */ final class MemberInfo implements Comparable { @@ -57,7 +57,23 @@ final class MemberInfo implements Comparable { return paramName; } + @Override public int compareTo(MemberInfo member) { return paramName.compareTo(member.paramName); } + + @Override + public boolean equals(Object o) { + return super.equals(o); + } + + @Override + public int hashCode() { + int hash = 5; + hash = 47 * hash + (this.paramType != null ? this.paramType.hashCode() : 0); + hash = 47 * hash + (this.paramName != null ? this.paramName.hashCode() : 0); + hash = 47 * hash + (this.jaxbAnnotations != null ? this.jaxbAnnotations.hashCode() : 0); + return hash; + } + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java index 91905007d5b..a4652b027b1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/ModelBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java index 1e56f85df12..a5a0bc22743 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeModeler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,8 +63,9 @@ final class TypeModeler { retClass = getDeclaringClassMethod(superClass, methodName, args); } if (retClass == null) { - for (TypeMirror interfaceType : theClass.getInterfaces()) + for (TypeMirror interfaceType : theClass.getInterfaces()) { retClass = getDeclaringClassMethod(interfaceType, methodName, args); + } } if (retClass == null) { Collection methods = ElementFilter.methodsIn(theClass.getEnclosedElements()); @@ -105,7 +106,7 @@ final class TypeModeler { Collection argTypes = ((DeclaredType) type).getTypeArguments(); if (argTypes.size() == 1) { return argTypes.iterator().next(); - } else if (argTypes.size() == 0) { + } else if (argTypes.isEmpty()) { VariableElement member = getValueMember(typeElement); if (member != null) { return member.asType(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java index 75fde4186fc..f3fc9d033ba 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMoniker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java index 81b04cf698a..6cb3e86042e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/TypeMonikerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java index b0c81646342..233f0c32a4c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceAp.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.tools.internal.ws.processor.modeler.annotation; +import com.sun.istack.internal.logging.Logger; import com.sun.tools.internal.ws.processor.generator.GeneratorUtil; import com.sun.tools.internal.ws.processor.modeler.ModelerException; import com.sun.tools.internal.ws.resources.WebserviceapMessages; @@ -36,7 +37,6 @@ import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.RoundEnvironment; import javax.annotation.processing.SupportedAnnotationTypes; import javax.annotation.processing.SupportedOptions; -import javax.annotation.processing.SupportedSourceVersion; import javax.jws.WebService; import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; @@ -51,12 +51,15 @@ import javax.xml.ws.WebServiceProvider; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.PrintStream; +import java.lang.reflect.Method; import java.rmi.Remote; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; +import java.util.Scanner; import java.util.Set; +import java.util.logging.Level; /** * WebServiceAp is a AnnotationProcessor for processing javax.jws.* and @@ -87,9 +90,10 @@ import java.util.Set; "javax.xml.ws.WebServiceRef" }) @SupportedOptions({WebServiceAp.DO_NOT_OVERWRITE, WebServiceAp.IGNORE_NO_WEB_SERVICE_FOUND_WARNING}) -@SupportedSourceVersion(SourceVersion.RELEASE_6) public class WebServiceAp extends AbstractProcessor implements ModelBuilder { + private static final Logger LOGGER = Logger.getLogger(WebServiceAp.class); + public static final String DO_NOT_OVERWRITE = "doNotOverWrite"; public static final String IGNORE_NO_WEB_SERVICE_FOUND_WARNING = "ignoreNoWebServiceFoundWarning"; @@ -120,7 +124,7 @@ public class WebServiceAp extends AbstractProcessor implements ModelBuilder { } @Override - public void init(ProcessingEnvironment processingEnv) { + public synchronized void init(ProcessingEnvironment processingEnv) { super.init(processingEnv); remoteElement = processingEnv.getElementUtils().getTypeElement(Remote.class.getName()); remoteExceptionElement = processingEnv.getElementUtils().getTypeElement(RemoteException.class.getName()).asType(); @@ -135,18 +139,67 @@ public class WebServiceAp extends AbstractProcessor implements ModelBuilder { doNotOverWrite = getOption(DO_NOT_OVERWRITE); ignoreNoWebServiceFoundWarning = getOption(IGNORE_NO_WEB_SERVICE_FOUND_WARNING); - String property = System.getProperty("sun.java.command"); // todo: check if property can be null - options.verbose = property != null && property.contains("-verbose"); - // todo: check how to get -s and -d, -classpath options - String classDir = "."; - sourceDir = new File(classDir); - property = System.getProperty("java.class.path"); + String classDir = parseArguments(); + String property = System.getProperty("java.class.path"); options.classpath = classDir + File.pathSeparator + (property != null ? property : ""); isCommandLineInvocation = true; } options.filer = processingEnv.getFiler(); } + private String parseArguments() { + // let's try to parse JavacOptions + + String classDir = null; + try { + ClassLoader cl = WebServiceAp.class.getClassLoader(); + Class javacProcessingEnvironmentClass = Class.forName("com.sun.tools.javac.processing.JavacProcessingEnvironment", false, cl); + if (javacProcessingEnvironmentClass.isInstance(processingEnv)) { + Method getContextMethod = javacProcessingEnvironmentClass.getDeclaredMethod("getContext"); + Object tmpContext = getContextMethod.invoke(processingEnv); + Class optionsClass = Class.forName("com.sun.tools.javac.util.Options", false, cl); + Class contextClass = Class.forName("com.sun.tools.javac.util.Context", false, cl); + Method instanceMethod = optionsClass.getDeclaredMethod("instance", new Class[]{contextClass}); + Object tmpOptions = instanceMethod.invoke(null, tmpContext); + if (tmpOptions != null) { + Method getMethod = optionsClass.getDeclaredMethod("get", new Class[]{String.class}); + Object result = getMethod.invoke(tmpOptions, "-s"); // todo: we have to check for -d also + if (result != null) { + classDir = (String) result; + } + this.options.verbose = getMethod.invoke(tmpOptions, "-verbose") != null; + } + } + } catch (Exception e) { + /// some Error was here - problems with reflection or security + processWarning(WebserviceapMessages.WEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR()); + report(e.getMessage()); + } + + if (classDir == null) { // some error within reflection block + String property = System.getProperty("sun.java.command"); + if (property != null) { + Scanner scanner = new Scanner(property); + boolean sourceDirNext = false; + while (scanner.hasNext()) { + String token = scanner.next(); + if (sourceDirNext) { + classDir = token; + sourceDirNext = false; + } else if ("-verbose".equals(token)) { + options.verbose = true; + } else if ("-s".equals(token)) { + sourceDirNext = true; + } + } + } + } + if (classDir != null) { + sourceDir = new File(classDir); + } + return classDir; + } + private boolean getOption(String key) { String value = processingEnv.getOptions().get(key); if (value != null) { @@ -186,8 +239,9 @@ public class WebServiceAp extends AbstractProcessor implements ModelBuilder { } if (!processedEndpoint) { if (isCommandLineInvocation) { - if (!ignoreNoWebServiceFoundWarning) + if (!ignoreNoWebServiceFoundWarning) { processWarning(WebserviceapMessages.WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND()); + } } else { processError(WebserviceapMessages.WEBSERVICEAP_NO_WEBSERVICE_ENDPOINT_FOUND()); } @@ -214,9 +268,14 @@ public class WebServiceAp extends AbstractProcessor implements ModelBuilder { } protected void report(String msg) { - PrintStream outStream = out != null ? out : new PrintStream(out, true); - outStream.println(msg); - outStream.flush(); + if (out == null) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "No output set for web service annotation processor reporting."); + } + return; + } + out.println(msg); + out.flush(); } @Override @@ -296,4 +355,9 @@ public class WebServiceAp extends AbstractProcessor implements ModelBuilder { public String getOperationName(Name messageName) { return messageName != null ? messageName.toString() : null; } + + @Override + public SourceVersion getSupportedSourceVersion() { + return SourceVersion.latest(); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java index 5c677d0bc53..0818c799195 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java index a3a1501fd63..26c868d716e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import com.sun.tools.internal.ws.util.ClassNameInfo; import com.sun.tools.internal.ws.wsdl.document.soap.SOAPStyle; import com.sun.xml.internal.ws.model.RuntimeModeler; +import javax.annotation.processing.ProcessingEnvironment; import javax.jws.Oneway; import javax.jws.WebMethod; import javax.jws.WebParam; @@ -53,6 +54,7 @@ import javax.lang.model.type.TypeMirror; import javax.lang.model.util.ElementFilter; import javax.lang.model.util.SimpleElementVisitor6; import javax.lang.model.util.SimpleTypeVisitor6; +import javax.lang.model.util.Types; import java.lang.annotation.Annotation; import java.util.Collection; import java.util.HashSet; @@ -139,7 +141,10 @@ public abstract class WebServiceVisitor extends SimpleElementVisitor6 classMethods = ElementFilter.methodsIn(classElement.getEnclosedElements()); + List classMethods = getClassMethods(classElement); boolean implementsMethod; for (ExecutableElement interfaceMethod : ElementFilter.methodsIn(interfaceElement.getEnclosedElements())) { implementsMethod = false; @@ -566,17 +577,32 @@ public abstract class WebServiceVisitor extends SimpleElementVisitor6 getClassMethods(TypeElement classElement) { + if (classElement.getQualifiedName().toString().equals(Object.class.getName())) // we don't need Object's methods + return null; + TypeElement superclassElement = (TypeElement) ((DeclaredType) classElement.getSuperclass()).asElement(); + List superclassesMethods = getClassMethods(superclassElement); + List classMethods = ElementFilter.methodsIn(classElement.getEnclosedElements()); + if (superclassesMethods == null) + return classMethods; + else + superclassesMethods.addAll(classMethods); + return superclassesMethods; + } + protected boolean sameMethod(ExecutableElement method1, ExecutableElement method2) { if (!method1.getSimpleName().equals(method2.getSimpleName())) return false; - if (!method1.getReturnType().equals(method2.getReturnType())) + Types typeUtils = builder.getProcessingEnvironment().getTypeUtils(); + if(!typeUtils.isSameType(method1.getReturnType(), method2.getReturnType()) + && !typeUtils.isSubtype(method2.getReturnType(), method1.getReturnType())) return false; List parameters1 = method1.getParameters(); List parameters2 = method2.getParameters(); if (parameters1.size() != parameters2.size()) return false; for (int i = 0; i < parameters1.size(); i++) { - if (!builder.getProcessingEnvironment().getTypeUtils().isSameType(parameters1.get(i).asType(), parameters2.get(i).asType())) + if (!typeUtils.isSameType(parameters1.get(i).asType(), parameters2.get(i).asType())) return false; } return true; @@ -616,9 +642,9 @@ public abstract class WebServiceVisitor extends SimpleElementVisitor6 annotationType() { return SOAPBinding.class; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java index 7a20734294e..99742dea010 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WebServiceWrapperGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -124,14 +124,17 @@ public class WebServiceWrapperGenerator extends WebServiceVisitor { super(annReader, nav, beanMemberFactory); } + @Override protected TypeMirror getSafeType(TypeMirror type) { return WebServiceWrapperGenerator.this.getSafeType(type); } + @Override protected TypeMirror getHolderValueType(TypeMirror paramType) { return builder.getHolderValueType(paramType); } + @Override protected boolean isVoidType(TypeMirror type) { return type != null && type.getKind().equals(TypeKind.VOID); } @@ -140,6 +143,7 @@ public class WebServiceWrapperGenerator extends WebServiceVisitor { private static final class FieldFactory implements AbstractWrapperBeanGenerator.BeanMemberFactory { + @Override public MemberInfo createWrapperBeanMember(TypeMirror paramType, String paramName, List jaxb) { return new MemberInfo(paramType, paramName, jaxb); @@ -151,17 +155,20 @@ public class WebServiceWrapperGenerator extends WebServiceVisitor { makeSafeVisitor = new MakeSafeTypeVisitor(builder.getProcessingEnvironment()); } + @Override protected void processWebService(WebService webService, TypeElement d) { cm = new JCodeModel(); wrapperNames = new HashSet(); processedExceptions = new HashSet(); } + @Override protected void postProcessWebService(WebService webService, TypeElement d) { super.postProcessWebService(webService, d); doPostProcessWebService(webService, d); } + @SuppressWarnings("CallToThreadDumpStack") protected void doPostProcessWebService(WebService webService, TypeElement d) { if (cm != null) { File sourceDir = builder.getSourceDir(); @@ -178,6 +185,7 @@ public class WebServiceWrapperGenerator extends WebServiceVisitor { } } + @Override protected void processMethod(ExecutableElement method, WebMethod webMethod) { builder.log("WrapperGen - method: "+method); builder.log("method.getDeclaringType(): " + method.asType()); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java index 63b735020a1..4d9a1628458 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/annotation/WrapperInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java index e425bd0484c..744c0025e6e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/AccessorElement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java index 8d3b9bea8ed..7ab52bb2ebb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ClassNameAllocatorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java index b352f635b20..bf62bc3d593 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ConsoleErrorReporter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java index b1021efda5d..96c58af4971 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/JAXBModelBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java index 8423196ec22..93e06b94efe 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/ModelerUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -107,7 +107,7 @@ class ModelerUtils { * @param prop * @param jaxbType * @param block - * @return + * @return unwrapped parameter */ private static Parameter createUnwrappedParameter(JAXBProperty prop, JAXBType jaxbType, Block block, JAXBStructuredType type, diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java index c7602bf44f7..b274b42114f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/PseudoSchemaBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -128,13 +128,15 @@ public class PseudoSchemaBuilder { } private void build() { - for(Iterator itr=wsdlDocument.getDefinitions().services(); itr.hasNext(); ) + for(Iterator itr=wsdlDocument.getDefinitions().services(); itr.hasNext(); ) { build(itr.next()); + } } private void build(Service service) { - for( Iterator itr=service.ports(); itr.hasNext(); ) + for( Iterator itr=service.ports(); itr.hasNext(); ) { build(itr.next() ); + } } private void build(Port port) { @@ -193,7 +195,7 @@ public class PseudoSchemaBuilder { outputMessage = operation.getOutput().resolveMessage(wsdlDocument); if(outputMessage != null){ List allParts = new ArrayList(outputMessage.getParts()); - if(options.additionalHeaders) { + if(options != null && options.additionalHeaders) { List addtionalHeaderParts = wsdlModeler.getAdditionHeaderParts(bindingOperation, outputMessage, false); allParts.addAll(addtionalHeaderParts); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java index 15593be0c5c..d13bf989c8d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModeler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package com.sun.tools.internal.ws.processor.modeler.wsdl; import com.sun.codemodel.internal.JType; +import com.sun.istack.internal.NotNull; import com.sun.istack.internal.SAXParseException2; import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible; import com.sun.tools.internal.ws.processor.generator.Names; @@ -54,7 +55,6 @@ import com.sun.tools.internal.ws.wsdl.parser.WSDLParser; import com.sun.tools.internal.xjc.api.S2JJAXBModel; import com.sun.tools.internal.xjc.api.TypeAndAnnotation; import com.sun.tools.internal.xjc.api.XJC; -import com.sun.xml.internal.ws.spi.db.BindingContext; import com.sun.xml.internal.ws.spi.db.BindingHelper; import com.sun.xml.internal.ws.util.xml.XmlUtil; import org.xml.sax.InputSource; @@ -95,10 +95,12 @@ public class WSDLModeler extends WSDLModelerBase { private JAXBModelBuilder jaxbModelBuilder; + @Override public Model buildModel() { try { parser = new WSDLParser(options, errReceiver, forest); parser.addParserListener(new ParserListener() { + @Override public void ignoringExtension(Entity entity, QName name, QName parent) { if (parent.equals(WSDLConstants.QNAME_TYPES)) { // check for a schema element with the wrong namespace URI @@ -110,23 +112,27 @@ public class WSDLModeler extends WSDLModelerBase { } + @Override public void doneParsingEntity(QName element, Entity entity) { } }); document = parser.parse(); - if (document == null || document.getDefinitions() == null) + if (document == null || document.getDefinitions() == null) { return null; + } document.validateLocally(); Model model = internalBuildModel(document); - if(model == null || errReceiver.hadError()) + if (model == null || errReceiver.hadError()) { return null; + } //ClassNameCollector classNameCollector = new ClassNameCollector(); classNameCollector.process(model); if (classNameCollector.getConflictingClassNames().isEmpty()) { - if(errReceiver.hadError()) + if (errReceiver.hadError()) { return null; + } return model; } // do another pass, this time with conflict resolution enabled @@ -135,12 +141,13 @@ public class WSDLModeler extends WSDLModelerBase { classNameCollector.process(model); if (classNameCollector.getConflictingClassNames().isEmpty()) { // we're done - if(errReceiver.hadError()) + if (errReceiver.hadError()) { return null; + } return model; } // give up - StringBuffer conflictList = new StringBuffer(); + StringBuilder conflictList = new StringBuilder(); boolean first = true; for (Iterator iter = classNameCollector.getConflictingClassNames().iterator(); @@ -208,7 +215,6 @@ public class WSDLModeler extends WSDLModelerBase { ) { processService((com.sun.tools.internal.ws.wsdl.document.Service) iter.next(), model, document); - hasServices = true; } } else { // emit a warning if there are no service definitions @@ -276,8 +282,9 @@ public class WSDLModeler extends WSDLModelerBase { return false; } } - if(soapAddress != null) + if (soapAddress != null) { port.setAddress(soapAddress.getLocation()); + } Binding binding = wsdlPort.resolveBinding(document); QName bindingName = getQNameOf(binding); PortType portType = binding.resolvePortType(document); @@ -393,7 +400,7 @@ public class WSDLModeler extends WSDLModelerBase { null; Set operations = portType.getOperationsNamed(bindingOperation.getName()); - if (operations.size() == 0) { + if (operations.isEmpty()) { // the WSDL document is invalid error(bindingOperation, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_NOT_IN_PORT_TYPE(bindingOperation.getName(), binding.getName())); } else if (operations.size() == 1) { @@ -455,9 +462,9 @@ public class WSDLModeler extends WSDLModelerBase { Operation operation; - if(soapBinding != null) + if (soapBinding != null) { operation = processSOAPOperation(); - else{ + } else { operation = processNonSOAPOperation(); } if (operation != null) { @@ -600,19 +607,21 @@ public class WSDLModeler extends WSDLModelerBase { private void setNonSoapStyle(Message inputMessage, Message outputMessage) { SOAPStyle style = SOAPStyle.DOCUMENT; for(MessagePart part:inputMessage.getParts()){ - if(part.getDescriptorKind() == SchemaKinds.XSD_TYPE) + if (part.getDescriptorKind() == SchemaKinds.XSD_TYPE) { style = SOAPStyle.RPC; - else + } else { style = SOAPStyle.DOCUMENT; + } } //check the outputMessage parts if(outputMessage != null){ for(MessagePart part:outputMessage.getParts()){ - if(part.getDescriptorKind() == SchemaKinds.XSD_TYPE) + if (part.getDescriptorKind() == SchemaKinds.XSD_TYPE) { style = SOAPStyle.RPC; - else + } else { style = SOAPStyle.DOCUMENT; + } } } info.modelPort.setStyle(style); @@ -666,7 +675,6 @@ public class WSDLModeler extends WSDLModelerBase { } info.operation = operation; - info.uniqueOperationName = uniqueOperationName; //attachment SOAPBody soapRequestBody = getSOAPRequestBody(); @@ -692,8 +700,9 @@ public class WSDLModeler extends WSDLModelerBase { protected Operation processLiteralSOAPOperation(StyleAndUse styleAndUse) { //returns false if the operation name is not acceptable - if (!applyOperationNameCustomization()) + if (!applyOperationNameCustomization()) { return null; + } boolean isRequestResponse = info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE; Message inputMessage = getInputMessage(); @@ -724,9 +733,9 @@ public class WSDLModeler extends WSDLModelerBase { //ignore operation if there are more than one root part if (!validateMimeParts(getMimeParts(info.bindingOperation.getInput())) || - !validateMimeParts(getMimeParts(info.bindingOperation.getOutput()))) + !validateMimeParts(getMimeParts(info.bindingOperation.getOutput()))) { return null; - + } if (!validateBodyParts(info.bindingOperation)) { // BP 1.1 @@ -735,16 +744,18 @@ public class WSDLModeler extends WSDLModelerBase { // R2203 An rpc-literal binding in a DESCRIPTION MUST refer, in its soapbind:body element(s), // only to wsdNl:part element(s) that have been defined using the type attribute. - if (isOperationDocumentLiteral(styleAndUse)) - if (options.isExtensionMode()) + if (isOperationDocumentLiteral(styleAndUse)) { + if (options.isExtensionMode()) { warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_TYPE_MESSAGE_PART(info.portTypeOperation.getName())); - else + } else { error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_DOCLITOPERATION(info.portTypeOperation.getName())); - else if (isOperationRpcLiteral(styleAndUse)) { - if (options.isExtensionMode()) + } + } else if (isOperationRpcLiteral(styleAndUse)) { + if (options.isExtensionMode()) { warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_CANNOT_HANDLE_ELEMENT_MESSAGE_PART(info.portTypeOperation.getName())); - else + } else { error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_RPCLITOPERATION(info.portTypeOperation.getName())); + } } return null; } @@ -753,8 +764,9 @@ public class WSDLModeler extends WSDLModelerBase { List parameterList = getParameterOrder(); //binding is invalid in the wsdl, ignore the operation. - if (!setMessagePartsBinding(styleAndUse)) + if (!setMessagePartsBinding(styleAndUse)) { return null; + } List params = null; boolean unwrappable = isUnwrappable(); @@ -902,13 +914,15 @@ public class WSDLModeler extends WSDLModelerBase { private boolean validateParameterName(List params) { - if (options.isExtensionMode()) + if (options.isExtensionMode()) { return true; + } Message msg = getInputMessage(); for (Parameter param : params) { - if (param.isOUT()) + if (param.isOUT()) { continue; + } if (param.getCustomName() != null) { if (Names.isJavaReservedWord(param.getCustomName())) { error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(info.operation.getName(), param.getCustomName())); @@ -935,8 +949,9 @@ public class WSDLModeler extends WSDLModelerBase { if (isRequestResponse) { msg = getOutputMessage(); for (Parameter param : params) { - if (param.isIN()) + if (param.isIN()) { continue; + } if (param.getCustomName() != null) { if (Names.isJavaReservedWord(param.getCustomName())) { error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(info.operation.getName(), param.getCustomName())); @@ -946,15 +961,17 @@ public class WSDLModeler extends WSDLModelerBase { } //process doclit wrapper style if (param.isEmbedded() && !(param.getBlock().getType() instanceof RpcLitStructure)) { - if (param.isReturn()) + if (param.isReturn()) { continue; + } if (!param.getName().equals("return") && Names.isJavaReservedWord(param.getName())) { error(param.getEntity(), ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_WRAPPER_STYLE(info.operation.getName(), param.getName(), param.getBlock().getName())); return false; } } else { - if (param.isReturn()) + if (param.isReturn()) { continue; + } //non-wrapper style and rpclit if (Names.isJavaReservedWord(param.getName())) { @@ -972,21 +989,24 @@ public class WSDLModeler extends WSDLModelerBase { //first we look at binding operation JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.bindingOperation, JAXWSBinding.class); Boolean mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null; - if (mimeContentMapping != null) + if (mimeContentMapping != null) { return mimeContentMapping; + } //then in wsdl:binding Binding binding = info.port.resolveBinding(info.document); jaxwsCustomization = (JAXWSBinding) getExtensionOfType(binding, JAXWSBinding.class); mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null; - if (mimeContentMapping != null) + if (mimeContentMapping != null) { return mimeContentMapping; + } //at last look in wsdl:definitions jaxwsCustomization = (JAXWSBinding) getExtensionOfType(info.document.getDefinitions(), JAXWSBinding.class); mimeContentMapping = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableMimeContentMapping() : null; - if (mimeContentMapping != null) + if (mimeContentMapping != null) { return mimeContentMapping; + } return false; } @@ -995,10 +1015,11 @@ public class WSDLModeler extends WSDLModelerBase { String operationName = (jaxwsCustomization != null) ? ((jaxwsCustomization.getMethodName() != null) ? jaxwsCustomization.getMethodName().getName() : null) : null; if (operationName != null) { if (Names.isJavaReservedWord(operationName)) { - if (options.isExtensionMode()) + if (options.isExtensionMode()) { warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName)); - else + } else { error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOMIZED_OPERATION_NAME(info.operation.getName(), operationName)); + } return false; } @@ -1006,10 +1027,11 @@ public class WSDLModeler extends WSDLModelerBase { } if (Names.isJavaReservedWord(info.operation.getJavaMethodName())) { - if (options.isExtensionMode()) + if (options.isExtensionMode()) { warning(info.portTypeOperation, ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName())); - else + } else { error(info.portTypeOperation, ModelerMessages.WSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_OPERATION_NAME(info.operation.getName())); + } return false; } return true; @@ -1017,8 +1039,9 @@ public class WSDLModeler extends WSDLModelerBase { protected String getAsyncOperationName(Operation operation) { String name = operation.getCustomizedName(); - if (name == null) + if (name == null) { name = operation.getUniqueName(); + } return name; } @@ -1027,28 +1050,32 @@ public class WSDLModeler extends WSDLModelerBase { */ private void addAsyncOperations(Operation syncOperation, StyleAndUse styleAndUse) { Operation operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.POLLING); - if (operation != null) + if (operation != null) { info.modelPort.addOperation(operation); + } operation = createAsyncOperation(syncOperation, styleAndUse, AsyncOperationType.CALLBACK); - if (operation != null) + if (operation != null) { info.modelPort.addOperation(operation); + } } private Operation createAsyncOperation(Operation syncOperation, StyleAndUse styleAndUse, AsyncOperationType asyncType) { boolean isRequestResponse = info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE; - if (!isRequestResponse) + if (!isRequestResponse) { return null; + } //create async operations AsyncOperation operation = new AsyncOperation(info.operation, info.bindingOperation); //creation the async operation name: operationName+Async or customized name //operation.setName(new QName(operation.getName().getNamespaceURI(), getAsyncOperationName(info.portTypeOperation, operation))); - if (asyncType.equals(AsyncOperationType.CALLBACK)) + if (asyncType.equals(AsyncOperationType.CALLBACK)) { operation.setUniqueName(info.operation.getUniqueName() + "_async_callback"); - else if (asyncType.equals(AsyncOperationType.POLLING)) + } else if (asyncType.equals(AsyncOperationType.POLLING)) { operation.setUniqueName(info.operation.getUniqueName() + "_async_polling"); + } setDocumentationIfPresent( operation, @@ -1149,7 +1176,7 @@ public class WSDLModeler extends WSDLModelerBase { //create response bean String nspace = ""; QName responseBeanName = new QName(nspace, getAsyncOperationName(info.operation) + "Response"); - JAXBType responseBeanType = jaxbModelBuilder.getJAXBType(responseBeanName); + JAXBType responseBeanType = getJAXBModelBuilder().getJAXBType(responseBeanName); if (responseBeanType == null) { error(info.operation.getEntity(), ModelerMessages.WSDLMODELER_RESPONSEBEAN_NOTFOUND(info.operation.getName())); } @@ -1166,20 +1193,19 @@ public class WSDLModeler extends WSDLModelerBase { operation.setProperty(WSDL_RESULT_PARAMETER, respParam.getName()); - List definitiveParameterList = new ArrayList(); int parameterOrderPosition = 0; for (String name : parameterList) { Parameter inParameter = ModelerUtils.getParameter(name, inParameters); if (inParameter == null) { - if (options.isExtensionMode()) + if (options.isExtensionMode()) { warning(info.operation.getEntity(), ModelerMessages.WSDLMODELER_WARNING_IGNORING_OPERATION_PART_NOT_FOUND(info.operation.getName().getLocalPart(), name)); - else + } else { error(info.operation.getEntity(), ModelerMessages.WSDLMODELER_ERROR_PART_NOT_FOUND(info.operation.getName().getLocalPart(), name)); + } return null; } request.addParameter(inParameter); inParameter.setParameterIndex(parameterOrderPosition); - definitiveParameterList.add(name); parameterOrderPosition++; } @@ -1203,25 +1229,27 @@ public class WSDLModeler extends WSDLModelerBase { JAXWSBinding jaxwsCustomization = (JAXWSBinding) getExtensionOfType(wsdlOperation, JAXWSBinding.class); Boolean isAsync = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableAsyncMapping() : null; - if (isAsync != null) + if (isAsync != null) { return isAsync; + } // then into wsdl:portType - QName portTypeName = new QName(portType.getDefining().getTargetNamespaceURI(), portType.getName()); jaxwsCustomization = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class); isAsync = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableAsyncMapping() : null; - if (isAsync != null) + if (isAsync != null) { return isAsync; + } //then wsdl:definitions jaxwsCustomization = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); isAsync = (jaxwsCustomization != null) ? jaxwsCustomization.isEnableAsyncMapping() : null; - if (isAsync != null) + if (isAsync != null) { return isAsync; + } return false; } - protected void handleLiteralSOAPHeaders(Request request, Response response, Iterator headerParts, Set duplicateNames, List definitiveParameterList, boolean processRequest) { + protected void handleLiteralSOAPHeaders(Request request, Response response, Iterator headerParts, Set duplicateNames, @NotNull List definitiveParameterList, boolean processRequest) { QName headerName; Block headerBlock; JAXBType jaxbType; @@ -1248,26 +1276,22 @@ public class WSDLModeler extends WSDLModelerBase { Parameter parameter = ModelerUtils.createParameter(part.getName(), jaxbType, headerBlock); parameter.setParameterIndex(parameterOrderPosition); setCustomizedParameterName(info.bindingOperation, headerMessage, part, parameter, false); - if (processRequest && definitiveParameterList != null) { + if (processRequest) { request.addParameter(parameter); definitiveParameterList.add(parameter.getName()); } else { - if (definitiveParameterList != null) { - for (Iterator iterInParams = definitiveParameterList.iterator(); iterInParams.hasNext();) { - String inParamName = - (String) iterInParams.next(); - if (inParamName.equals(parameter.getName())) { - Parameter inParam = request.getParameterByName(inParamName); - parameter.setLinkedParameter(inParam); - inParam.setLinkedParameter(parameter); - //its in/out parameter, input and output parameter have the same order position. - parameter.setParameterIndex(inParam.getParameterIndex()); - } - } - if (!definitiveParameterList.contains(parameter.getName())) { - definitiveParameterList.add(parameter.getName()); + for (String inParamName : definitiveParameterList) { + if (inParamName.equals(parameter.getName())) { + Parameter inParam = request.getParameterByName(inParamName); + parameter.setLinkedParameter(inParam); + inParam.setLinkedParameter(parameter); + //its in/out parameter, input and output parameter have the same order position. + parameter.setParameterIndex(inParam.getParameterIndex()); } } + if (!definitiveParameterList.contains(parameter.getName())) { + definitiveParameterList.add(parameter.getName()); + } response.addParameter(parameter); } parameterOrderPosition++; @@ -1311,7 +1335,6 @@ public class WSDLModeler extends WSDLModelerBase { Fault fault = new Fault(faultName, portTypeFault); fault.setWsdlFaultName(portTypeFault.getName()); setDocumentationIfPresent(fault, portTypeFault.getDocumentation()); - String faultNamespaceURI = null; if (bindingFault != null) { //get the soapbind:fault from wsdl:fault in the binding SOAPFault soapFault = (SOAPFault) getExtensionOfType(bindingFault, SOAPFault.class); @@ -1328,10 +1351,11 @@ public class WSDLModeler extends WSDLModelerBase { //the soapbind:fault must have use="literal" or no use attribute, in that case its assumed "literal" if (!soapFault.isLiteral()) { - if (options.isExtensionMode()) + if (options.isExtensionMode()) { warning(soapFault, ModelerMessages.WSDLMODELER_WARNING_IGNORING_FAULT_NOT_LITERAL(bindingFault.getName(), info.bindingOperation.getName())); - else + } else { error(soapFault, ModelerMessages.WSDLMODELER_INVALID_OPERATION_FAULT_NOT_LITERAL(bindingFault.getName(), info.bindingOperation.getName())); + } continue; } @@ -1344,10 +1368,6 @@ public class WSDLModeler extends WSDLModelerBase { warning(soapFault, ModelerMessages.WSDLMODELER_WARNING_R_2716_R_2726("soapbind:fault", soapFault.getName())); } - faultNamespaceURI = soapFault.getNamespace(); - } - if (faultNamespaceURI == null) { - faultNamespaceURI = portTypeFault.getMessage().getNamespaceURI(); } com.sun.tools.internal.ws.wsdl.document.Message faultMessage = portTypeFault.resolveMessage(info.document); @@ -1371,7 +1391,11 @@ public class WSDLModeler extends WSDLModelerBase { } if (faultPart.getDescriptorKind() != SchemaKinds.XSD_ELEMENT) { - error(faultPart, ModelerMessages.WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(faultMessage.getName(), faultPart.getName())); + if (options.isExtensionMode()) { + warning(faultPart, ModelerMessages.WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(faultMessage.getName(), faultPart.getName())); + } else { + error(faultPart, ModelerMessages.WSDLMODELER_INVALID_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(faultMessage.getName(), faultPart.getName())); + } } JAXBType jaxbType = getJAXBType(faultPart); @@ -1383,8 +1407,9 @@ public class WSDLModeler extends WSDLModelerBase { fault.setBlock(faultBlock); //createParentFault(fault); //createSubfaults(fault); - if (!response.getFaultBlocksMap().containsKey(faultBlock.getName())) + if (!response.getFaultBlocksMap().containsKey(faultBlock.getName())) { response.addFaultBlock(faultBlock); + } info.operation.addFault(fault); } } @@ -1403,21 +1428,22 @@ public class WSDLModeler extends WSDLModelerBase { protected boolean setMessagePartsBinding(StyleAndUse styleAndUse) { SOAPBody inBody = getSOAPRequestBody(); Message inMessage = getInputMessage(); - if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) + if (!setMessagePartsBinding(inBody, inMessage, styleAndUse, true)) { return false; + } if (isRequestResponse()) { SOAPBody outBody = getSOAPResponseBody(); Message outMessage = getOutputMessage(); - if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) + if (!setMessagePartsBinding(outBody, outMessage, styleAndUse, false)) { return false; + } } return true; } //returns false if the wsdl is invalid and operation should be ignored protected boolean setMessagePartsBinding(SOAPBody body, Message message, StyleAndUse styleAndUse, boolean isInput) { - List parts = new ArrayList(); //get Mime parts List mimeParts; @@ -1448,10 +1474,11 @@ public class WSDLModeler extends WSDLModelerBase { if (mimeParts.contains(mPart) || headerParts.contains(mPart) || boundToFault(mPart.getName())) { //throw error that a part cant be bound multiple times, not ignoring operation, if there //is conflict it will fail latter - if (options.isExtensionMode()) + if (options.isExtensionMode()) { warning(mPart, ModelerMessages.WSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(info.bindingOperation.getName(), mPart.getName())); - else + } else { error(mPart, ModelerMessages.WSDLMODELER_INVALID_BINDING_OPERATION_MULTIPLE_PART_BINDING(info.bindingOperation.getName(), mPart.getName())); + } } bodyParts.add(mPart); } @@ -1462,23 +1489,21 @@ public class WSDLModeler extends WSDLModelerBase { MessagePart mPart = (MessagePart) iter.next(); if (mimeParts.contains(mPart)) { mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING); - parts.add(mPart); } else if (headerParts.contains(mPart)) { mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_HEADER_BINDING); - parts.add(mPart); } else if (bodyParts.contains(mPart)) { mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING); - parts.add(mPart); } else { mPart.setBindingExtensibilityElementKind(MessagePart.PART_NOT_BOUNDED); } } if (isOperationDocumentLiteral(styleAndUse) && bodyParts.size() > 1) { - if (options.isExtensionMode()) + if (options.isExtensionMode()) { warning(message, ModelerMessages.WSDLMODELER_WARNING_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(info.portTypeOperation.getName())); - else + } else { error(message, ModelerMessages.WSDLMODELER_INVALID_OPERATION_MORE_THAN_ONE_PART_IN_MESSAGE(info.portTypeOperation.getName())); + } return false; } return true; @@ -1486,8 +1511,9 @@ public class WSDLModeler extends WSDLModelerBase { private boolean boundToFault(String partName) { for (BindingFault bindingFault : info.bindingOperation.faults()) { - if (partName.equals(bindingFault.getName())) + if (partName.equals(bindingFault.getName())) { return true; + } } return false; } @@ -1518,8 +1544,9 @@ public class WSDLModeler extends WSDLModelerBase { List headers = getHeaderParts(bindingOperation, isInput); for(MessagePart part: headers){ - if(parts.contains(part)) + if (parts.contains(part)) { continue; + } headerParts.add(part); } return headerParts; @@ -1542,15 +1569,18 @@ public class WSDLModeler extends WSDLModelerBase { Iterator headers = getHeaderExtensions(ext).iterator(); while (headers.hasNext()) { SOAPHeader header = headers.next(); - if (!header.isLiteral()) + if (!header.isLiteral()) { continue; + } com.sun.tools.internal.ws.wsdl.document.Message headerMessage = findMessage(header.getMessage(), document); - if (headerMessage == null) + if (headerMessage == null) { continue; + } MessagePart headerPart = headerMessage.getPart(header.getPart()); - if (headerPart == part) + if (headerPart == part) { return headerMessage; + } } return null; } @@ -1584,7 +1614,11 @@ public class WSDLModeler extends WSDLModelerBase { error(header, ModelerMessages.WSDLMODELER_INVALID_HEADER_NOT_FOUND(header.getPart(), bindingOperation.getName())); } if (part.getDescriptorKind() != SchemaKinds.XSD_ELEMENT) { - error(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName())); + if (options.isExtensionMode()) { + warning(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName())); + } else { + error(part, ModelerMessages.WSDLMODELER_INVALID_HEADER_MESSAGE_PART_MUST_HAVE_ELEMENT_DESCRIPTOR(part.getName(), bindingOperation.getName())); + } } part.setBindingExtensibilityElementKind(MessagePart.SOAP_HEADER_BINDING); parts.add(part); @@ -1608,7 +1642,7 @@ public class WSDLModeler extends WSDLModelerBase { JAXBType type; QName name = part.getDescriptor(); if (part.getDescriptorKind().equals(SchemaKinds.XSD_ELEMENT)) { - type = jaxbModelBuilder.getJAXBType(name); + type = getJAXBModelBuilder().getJAXBType(name); if(type == null){ error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(name, part.getName())); } @@ -1625,8 +1659,9 @@ public class WSDLModeler extends WSDLModelerBase { } private List getDoclitParameters(Request req, Response res, List parameterList) { - if (parameterList.size() == 0) + if (parameterList.isEmpty()) { return new ArrayList(); + } List params = new ArrayList(); Message inMsg = getInputMessage(); Message outMsg = getOutputMessage(); @@ -1651,15 +1686,14 @@ public class WSDLModeler extends WSDLModelerBase { res.addBodyBlock(block); } } else if (ModelerUtils.isUnbound(part)) { - if (part.isIN()) + if (part.isIN()) { req.addUnboundBlock(block); - else if (part.isOUT()) + } else if (part.isOUT()) { res.addUnboundBlock(block); - else if (part.isINOUT()) { + } else if (part.isINOUT()) { req.addUnboundBlock(block); res.addUnboundBlock(block); } - } if (part.isIN() || part.isINOUT()) { params = ModelerUtils.createUnwrappedParameters(jaxbStructType, block); @@ -1756,10 +1790,11 @@ public class WSDLModeler extends WSDLModelerBase { param.setParameterIndex(pIndex++); } - if (part.isIN()) + if (part.isIN()) { setCustomizedParameterName(info.portTypeOperation, inMsg, part, param, false); - else if (outMsg != null) + } else if (outMsg != null) { setCustomizedParameterName(info.portTypeOperation, outMsg, part, param, false); + } params.add(param); } @@ -1807,8 +1842,9 @@ public class WSDLModeler extends WSDLModelerBase { S2JJAXBModel jaxbModel = ((RpcLitStructure) reqBlock.getType()).getJaxbModel().getS2JJAXBModel(); List inParams = ModelerUtils.createRpcLitParameters(inMsg, reqBlock, jaxbModel, errReceiver); List outParams = null; - if (outMsg != null) + if (outMsg != null) { outParams = ModelerUtils.createRpcLitParameters(outMsg, resBlock, jaxbModel, errReceiver); + } //create parameters for header and mime parts int index = 0; @@ -1835,12 +1871,13 @@ public class WSDLModeler extends WSDLModelerBase { } } else if (ModelerUtils.isBoundToMimeContent(part)) { List mimeContents; - if (part.isIN() || part.isINOUT()) + if (part.isIN() || part.isINOUT()) { mimeContents = getMimeContents(info.bindingOperation.getInput(), getInputMessage(), part.getName()); - else + } else { mimeContents = getMimeContents(info.bindingOperation.getOutput(), getOutputMessage(), part.getName()); + } JAXBType type = getAttachmentType(mimeContents, part); //create Parameters in request or response @@ -1892,10 +1929,11 @@ public class WSDLModeler extends WSDLModelerBase { } } for (Parameter param : params) { - if (param.isIN()) + if (param.isIN()) { setCustomizedParameterName(info.portTypeOperation, inMsg, inMsg.getPart(param.getName()), param, false); - else if (outMsg != null) + } else if (outMsg != null) { setCustomizedParameterName(info.portTypeOperation, outMsg, outMsg.getPart(param.getName()), param, false); + } } return params; } @@ -1903,8 +1941,9 @@ public class WSDLModeler extends WSDLModelerBase { private List getRequestParameters(Request request, List parameterList) { Message inputMessage = getInputMessage(); //there is no input message, return zero parameters - if (inputMessage != null && !inputMessage.parts().hasNext()) + if (inputMessage != null && !inputMessage.parts().hasNext()) { return new ArrayList(); + } List inParameters = null; QName reqBodyName; @@ -1915,8 +1954,9 @@ public class WSDLModeler extends WSDLModelerBase { //setup request parameters for (String inParamName : parameterList) { MessagePart part = inputMessage.getPart(inParamName); - if (part == null) + if (part == null) { continue; + } reqBodyName = part.getDescriptor(); jaxbReqType = getJAXBType(part); if (unwrappable) { @@ -1949,8 +1989,9 @@ public class WSDLModeler extends WSDLModelerBase { } else if (ModelerUtils.isUnbound(part)) { request.addUnboundBlock(reqBlock); } - if (inParameters == null) + if (inParameters == null) { inParameters = new ArrayList(); + } Parameter param = ModelerUtils.createParameter(part.getName(), jaxbReqType, reqBlock); setCustomizedParameterName(info.portTypeOperation, inputMessage, part, param, false); inParameters.add(param); @@ -1966,25 +2007,29 @@ public class WSDLModeler extends WSDLModelerBase { */ private void setCustomizedParameterName(TWSDLExtensible extension, Message msg, MessagePart part, Parameter param, boolean wrapperStyle) { JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(extension, JAXWSBinding.class); - if (jaxwsBinding == null) + if (jaxwsBinding == null) { return; + } String paramName = part.getName(); QName elementName = part.getDescriptor(); - if (wrapperStyle) + if (wrapperStyle) { elementName = param.getType().getName(); + } String customName = jaxwsBinding.getParameterName(msg.getName(), paramName, elementName, wrapperStyle); if (customName != null && !customName.equals("")) { param.setCustomName(customName); } } + @Override protected boolean isConflictingPortClassName(String name) { return false; } protected boolean isUnwrappable() { - if (!getWrapperStyleCustomization()) + if (!getWrapperStyleCustomization()) { return false; + } com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage(); com.sun.tools.internal.ws.wsdl.document.Message outputMessage = getOutputMessage(); @@ -2006,14 +2051,16 @@ public class WSDLModeler extends WSDLModelerBase { // is equal to the operation name // Wrapper style if the output message part refers to a global element declaration if ((inputPart != null && !inputPart.getDescriptor().getLocalPart().equals(operationName)) || - (outputPart != null && outputPart.getDescriptorKind() != SchemaKinds.XSD_ELEMENT)) + (outputPart != null && outputPart.getDescriptorKind() != SchemaKinds.XSD_ELEMENT)) { return false; + } //check to see if either input or output message part not bound to soapbing:body //in that case the operation is not wrapper style if (((inputPart != null) && (inputPart.getBindingExtensibilityElementKind() != MessagePart.SOAP_BODY_BINDING)) || - ((outputPart != null) && (outputPart.getBindingExtensibilityElementKind() != MessagePart.SOAP_BODY_BINDING))) + ((outputPart != null) && (outputPart.getBindingExtensibilityElementKind() != MessagePart.SOAP_BODY_BINDING))) { return false; + } // Wrapper style if the elements referred to by the input and output message parts // (henceforth referred to as wrapper elements) are both complex types defined @@ -2034,8 +2081,9 @@ public class WSDLModeler extends WSDLModelerBase { return inputWrappable; } JAXBType outputType = getJAXBType(outputPart); - if ((inputType != null) && (outputType != null)) + if ((inputType != null) && (outputType != null)) { return inputType.isUnwrappable() && outputType.isUnwrappable(); + } } return false; @@ -2047,8 +2095,9 @@ public class WSDLModeler extends WSDLModelerBase { JAXWSBinding jaxwsBinding = (JAXWSBinding) getExtensionOfType(portTypeOperation, JAXWSBinding.class); if (jaxwsBinding != null) { Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle(); - if (isWrappable != null) + if (isWrappable != null) { return isWrappable; + } } //then into wsdl:portType @@ -2056,16 +2105,18 @@ public class WSDLModeler extends WSDLModelerBase { jaxwsBinding = (JAXWSBinding) getExtensionOfType(portType, JAXWSBinding.class); if (jaxwsBinding != null) { Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle(); - if (isWrappable != null) + if (isWrappable != null) { return isWrappable; + } } //then wsdl:definitions jaxwsBinding = (JAXWSBinding) getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); if (jaxwsBinding != null) { Boolean isWrappable = jaxwsBinding.isEnableWrapperStyle(); - if (isWrappable != null) + if (isWrappable != null) { return isWrappable; + } } return true; } @@ -2083,8 +2134,9 @@ public class WSDLModeler extends WSDLModelerBase { Iterator iter = getInputMessage().parts(); while (iter.hasNext()) { MessagePart part = (MessagePart) iter.next(); - if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) + if (outputPart.getName().equals(part.getName()) && outputPart.getDescriptor().equals(part.getDescriptor())) { return true; + } } } else if (soapOperation != null && soapOperation.isRPC() || info.soapBinding.isRPC()) { com.sun.tools.internal.ws.wsdl.document.Message inputMessage = getInputMessage(); @@ -2105,11 +2157,13 @@ public class WSDLModeler extends WSDLModelerBase { //create parameters for header and mime parts for (String paramName : parameterList) { MessagePart part = message.getPart(paramName); - if (part == null) + if (part == null) { continue; + } if (ModelerUtils.isBoundToSOAPHeader(part)) { - if (parameters == null) + if (parameters == null) { parameters = new ArrayList(); + } QName headerName = part.getDescriptor(); JAXBType jaxbType = getJAXBType(part); Block headerBlock = new Block(headerName, jaxbType, part); @@ -2119,8 +2173,9 @@ public class WSDLModeler extends WSDLModelerBase { parameters.add(param); } } else if (ModelerUtils.isBoundToMimeContent(part)) { - if (parameters == null) + if (parameters == null) { parameters = new ArrayList(); + } List mimeContents = getMimeContents(info.bindingOperation.getInput(), getInputMessage(), paramName); @@ -2134,8 +2189,9 @@ public class WSDLModeler extends WSDLModelerBase { parameters.add(param); } } else if (ModelerUtils.isUnbound(part)) { - if (parameters == null) + if (parameters == null) { parameters = new ArrayList(); + } QName name = part.getDescriptor(); JAXBType type = getJAXBType(part); Block unboundBlock = new Block(name, type, part); @@ -2186,10 +2242,8 @@ public class WSDLModeler extends WSDLModelerBase { if(typeAnno == null){ error(part, ModelerMessages.WSDLMODELER_JAXB_JAVATYPE_NOTFOUND(part.getDescriptor(), part.getName())); } - for (Iterator mimeTypeIter = mimeTypes.iterator(); mimeTypeIter.hasNext();) { - String mimeType = (String) mimeTypeIter.next(); - if ((!mimeType.equals("text/xml") && - !mimeType.equals("application/xml"))) { + for (String mimeType : mimeTypes) { + if ((!mimeType.equals("text/xml") && !mimeType.equals("application/xml"))) { //According to AP 1.0, //RZZZZ: In a DESCRIPTION, if a wsdl:part element refers to a //global element declaration (via the element attribute of the wsdl:part @@ -2210,13 +2264,13 @@ public class WSDLModeler extends WSDLModelerBase { } protected void buildJAXBModel(WSDLDocument wsdlDocument) { - JAXBModelBuilder jaxbModelBuilder = new JAXBModelBuilder(options, classNameCollector, forest, errReceiver); + JAXBModelBuilder tempJaxbModelBuilder = new JAXBModelBuilder(options, classNameCollector, forest, errReceiver); //set the java package where wsdl artifacts will be generated //if user provided package name using -p switch (or package property on wsimport ant task) //ignore the package customization in the wsdl and schema bidnings //formce the -p option only in the first pass if (explicitDefaultPackage != null) { - jaxbModelBuilder.getJAXBSchemaCompiler().forcePackageName(options.defaultPackage); + tempJaxbModelBuilder.getJAXBSchemaCompiler().forcePackageName(options.defaultPackage); } else { options.defaultPackage = getJavaPackage(); } @@ -2224,10 +2278,10 @@ public class WSDLModeler extends WSDLModelerBase { //create pseudo schema for async operations(if any) response bean List schemas = PseudoSchemaBuilder.build(this, options, errReceiver); for (InputSource schema : schemas) { - jaxbModelBuilder.getJAXBSchemaCompiler().parseSchema(schema); + tempJaxbModelBuilder.getJAXBSchemaCompiler().parseSchema(schema); } - jaxbModelBuilder.bind(); - this.jaxbModelBuilder = jaxbModelBuilder; + tempJaxbModelBuilder.bind(); + this.jaxbModelBuilder = tempJaxbModelBuilder; } protected String getJavaPackage() { @@ -2270,8 +2324,9 @@ public class WSDLModeler extends WSDLModelerBase { for (JavaParameter jParam : operation.getJavaMethod().getParametersList()) { Parameter param = jParam.getParameter(); - if (param.getCustomName() != null) + if (param.getCustomName() != null) { jParam.setName(param.getCustomName()); + } } } @@ -2283,8 +2338,9 @@ public class WSDLModeler extends WSDLModelerBase { JAXWSBinding jaxwsCust = (JAXWSBinding) getExtensionOfType(wsdlService, JAXWSBinding.class); if (jaxwsCust != null && jaxwsCust.getClassName() != null) { CustomName name = jaxwsCust.getClassName(); - if (name != null && !name.getName().equals("")) + if (name != null && !name.getName().equals("")) { return makePackageQualified(name.getName()); + } } return makePackageQualified(BindingHelper.mangleNameToClassName(serviceName)); } @@ -2323,28 +2379,13 @@ public class WSDLModeler extends WSDLModelerBase { JavaInterface intf) { String candidateName = getJavaNameForOperation(operation); JavaMethod method = new JavaMethod(candidateName, options, errReceiver); - Request request = operation.getRequest(); - Iterator requestBodyBlocks = request.getBodyBlocks(); - Block requestBlock = - (requestBodyBlocks.hasNext() - ? request.getBodyBlocks().next() - : null); + assert (operation.getRequest() != null); Response response = operation.getResponse(); - Iterator responseBodyBlocks = null; - Block responseBlock; - if (response != null) { - responseBodyBlocks = response.getBodyBlocks(); - responseBlock = - responseBodyBlocks.hasNext() - ? response.getBodyBlocks().next() - : null; - } // build a signature of the form "opName%arg1type%arg2type%...%argntype so that we // detect overloading conflicts in the generated java interface/classes - String signature = candidateName; - for (Iterator iter = request.getParameters(); iter.hasNext();) { + for (Iterator iter = operation.getRequest().getParameters(); iter.hasNext();) { Parameter parameter = (Parameter) iter.next(); if (parameter.getJavaParameter() != null) { @@ -2364,7 +2405,6 @@ public class WSDLModeler extends WSDLModelerBase { method.addParameter(javaParameter); parameter.setJavaParameter(javaParameter); - signature += "%" + parameterType.getName(); } if (response != null) { @@ -2390,7 +2430,6 @@ public class WSDLModeler extends WSDLModelerBase { } String candidateName = getJavaNameForOperation(operation); JavaMethod method = new JavaMethod(candidateName, options, errReceiver); - Request request = operation.getRequest(); Parameter returnParam = (Parameter) operation.getProperty(WSDL_RESULT_PARAMETER); if (returnParam != null) { JavaType parameterType = returnParam.getType().getJavaType(); @@ -2514,7 +2553,7 @@ public class WSDLModeler extends WSDLModelerBase { protected List getParameterOrder() { List params = new ArrayList(); String parameterOrder = info.portTypeOperation.getParameterOrder(); - java.util.List parameterList = new ArrayList(); + java.util.List parameterList; boolean parameterOrderPresent = false; if ((parameterOrder != null) && !(parameterOrder.trim().equals(""))) { parameterList = XmlUtil.parseTokenList(parameterOrder); @@ -2636,7 +2675,6 @@ public class WSDLModeler extends WSDLModelerBase { } //parameterOrder attribute is not valid, we ignore it warning(info.operation.getEntity(), ModelerMessages.WSDLMODELER_INVALID_PARAMETER_ORDER_INVALID_PARAMETER_ORDER(info.operation.getName().getLocalPart())); - parameterOrderPresent = false; parameterList.clear(); } @@ -2660,8 +2698,9 @@ public class WSDLModeler extends WSDLModelerBase { //append the out parts to the parameterList for (MessagePart part : outParts) { - if (outParts.size() == 1) + if (outParts.size() == 1) { part.setReturn(true); + } params.add(part); } } @@ -2678,6 +2717,7 @@ public class WSDLModeler extends WSDLModelerBase { return options.defaultPackage + "." + prefix + suffix; } + @Override protected boolean isConflictingServiceClassName(String name) { return conflictsWithSEIClass(name) || conflictsWithJAXBClass(name) || conflictsWithExceptionClass(name); } @@ -2697,6 +2737,7 @@ public class WSDLModeler extends WSDLModelerBase { return exceptionNames != null && exceptionNames.contains(name); } + @Override protected boolean isConflictingExceptionClassName(String name) { return conflictsWithSEIClass(name) || conflictsWithJAXBClass(name); } @@ -2710,15 +2751,17 @@ public class WSDLModeler extends WSDLModelerBase { (SOAPBinding) getExtensionOfType(binding, SOAPBinding.class); //dont process the binding - if (soapBinding == null) - soapBinding = - (SOAPBinding) getExtensionOfType(binding, SOAP12Binding.class); - if (soapBinding == null) + if (soapBinding == null) { + soapBinding = (SOAPBinding) getExtensionOfType(binding, SOAP12Binding.class); + } + if (soapBinding == null) { return false; + } //if soapbind:binding has no style attribute, the default is DOCUMENT - if (soapBinding.getStyle() == null) + if (soapBinding.getStyle() == null) { soapBinding.setStyle(SOAPStyle.DOCUMENT); + } SOAPStyle opStyle = soapBinding.getStyle(); for (Iterator iter = binding.operations(); iter.hasNext();) { @@ -2730,8 +2773,9 @@ public class WSDLModeler extends WSDLModelerBase { if (soapOperation != null) { SOAPStyle currOpStyle = (soapOperation.getStyle() != null) ? soapOperation.getStyle() : soapBinding.getStyle(); //dont check for the first operation - if (!currOpStyle.equals(opStyle)) + if (!currOpStyle.equals(opStyle)) { return false; + } } } return true; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java index eabcdc443ab..a56f30d4662 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/modeler/wsdl/WSDLModelerBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import com.sun.tools.internal.ws.processor.model.Fault; import com.sun.tools.internal.ws.processor.model.Operation; import com.sun.tools.internal.ws.processor.model.Port; import com.sun.tools.internal.ws.processor.model.java.JavaException; -import com.sun.tools.internal.ws.processor.modeler.JavaSimpleTypeCreator; import com.sun.tools.internal.ws.processor.modeler.Modeler; import com.sun.tools.internal.ws.resources.ModelerMessages; import com.sun.tools.internal.ws.wscompile.AbortException; @@ -49,10 +48,8 @@ import com.sun.tools.internal.ws.wsdl.document.soap.*; import com.sun.tools.internal.ws.wsdl.framework.Entity; import com.sun.tools.internal.ws.wsdl.framework.GloballyKnown; import com.sun.tools.internal.ws.wsdl.framework.NoSuchEntityException; -import com.sun.tools.internal.ws.wsdl.parser.DOMForest; import com.sun.tools.internal.ws.wsdl.parser.WSDLParser; import com.sun.tools.internal.ws.wsdl.parser.MetadataFinder; -import com.sun.xml.internal.ws.spi.db.BindingContext; import com.sun.xml.internal.ws.spi.db.BindingHelper; import org.xml.sax.helpers.LocatorImpl; @@ -84,8 +81,9 @@ public abstract class WSDLModelerBase implements Modeler { * @param wsdlPort */ protected void applyPortMethodCustomization(Port port, com.sun.tools.internal.ws.wsdl.document.Port wsdlPort) { - if(isProvider(wsdlPort)) + if (isProvider(wsdlPort)) { return; + } JAXWSBinding jaxwsBinding = (JAXWSBinding)getExtensionOfType(wsdlPort, JAXWSBinding.class); String portMethodName = (jaxwsBinding != null)?((jaxwsBinding.getMethodName() != null)?jaxwsBinding.getMethodName().getName():null):null; @@ -108,8 +106,9 @@ public abstract class WSDLModelerBase implements Modeler { JAXWSBinding jaxwsGlobalCustomization = (JAXWSBinding)getExtensionOfType(document.getDefinitions(), JAXWSBinding.class); isProvider = (jaxwsGlobalCustomization != null)?jaxwsGlobalCustomization.isProvider():null; - if(isProvider != null) + if (isProvider != null) { return isProvider; + } return false; } @@ -157,8 +156,9 @@ public abstract class WSDLModelerBase implements Modeler { } protected com.sun.tools.internal.ws.wsdl.document.Message getOutputMessage() { - if (info.portTypeOperation.getOutput() == null) + if (info.portTypeOperation.getOutput() == null) { return null; + } return info.portTypeOperation.getOutput().resolveMessage(info.document); } @@ -180,10 +180,11 @@ public abstract class WSDLModelerBase implements Modeler { //get Mime parts List mimeParts; - if(isInput) + if (isInput) { mimeParts = getMimeContentParts(message, info.bindingOperation.getInput()); - else + } else { mimeParts = getMimeContentParts(message, info.bindingOperation.getOutput()); + } if (bodyParts != null) { StringTokenizer in = new StringTokenizer(bodyParts.trim(), " "); @@ -198,17 +199,18 @@ public abstract class WSDLModelerBase implements Modeler { } } else { for (MessagePart mPart : message.getParts()) { - if (!mimeParts.contains(mPart)) + if (!mimeParts.contains(mPart)) { mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING); + } partsList.add(mPart); } } for (MessagePart mPart : message.getParts()) { - if(mimeParts.contains(mPart)) { + if (mimeParts.contains(mPart)) { mPart.setBindingExtensibilityElementKind(MessagePart.WSDL_MIME_BINDING); parts.add(mPart); - }else if(partsList.contains(mPart)) { + } else if(partsList.contains(mPart)) { mPart.setBindingExtensibilityElementKind(MessagePart.SOAP_BODY_BINDING); parts.add(mPart); } @@ -226,8 +228,9 @@ public abstract class WSDLModelerBase implements Modeler { for (MIMEPart mimePart : getMimeParts(ext)) { MessagePart part = getMimeContentPart(message, mimePart); - if (part != null) + if (part != null) { mimeContentParts.add(part); + } } return mimeContentParts; } @@ -250,8 +253,9 @@ public abstract class WSDLModelerBase implements Modeler { mimeContents.add((MIMEContent) obj); } } - if(!validateMimeContentPartNames(mimeContents)) + if (!validateMimeContentPartNames(mimeContents)) { return false; + } if(mPart.getName() != null) { warning(mPart, ModelerMessages.MIMEMODELER_INVALID_MIME_PART_NAME_NOT_ALLOWED(info.portTypeOperation.getName())); } @@ -281,8 +285,9 @@ public abstract class WSDLModelerBase implements Modeler { // String mimeType = null; for(MIMEContent mimeContent:mimeContents){ String mimeType = getMimeContentType(mimeContent); - if(!mimeTypes.contains(mimeType)) + if (!mimeTypes.contains(mimeType)) { mimeTypes.add(mimeType); + } } return mimeTypes; } @@ -432,8 +437,9 @@ public abstract class WSDLModelerBase implements Modeler { */ private boolean isRootPart(MIMEPart part) { for (TWSDLExtension twsdlExtension : part.extensions()) { - if (twsdlExtension instanceof SOAPBody) + if (twsdlExtension instanceof SOAPBody) { return true; + } } return false; } @@ -506,13 +512,15 @@ public abstract class WSDLModelerBase implements Modeler { info.portTypeOperation.getStyle() == OperationStyle.REQUEST_RESPONSE; List inputParts = getMessageParts(getSOAPRequestBody(), getInputMessage(), true); - if(!validateStyleAndPart(operation, inputParts)) + if (!validateStyleAndPart(operation, inputParts)) { return false; + } if(isRequestResponse){ List outputParts = getMessageParts(getSOAPResponseBody(), getOutputMessage(), false); - if(!validateStyleAndPart(operation, outputParts)) + if (!validateStyleAndPart(operation, outputParts)) { return false; + } } return true; } @@ -526,8 +534,9 @@ public abstract class WSDLModelerBase implements Modeler { (SOAPOperation) getExtensionOfType(operation, SOAPOperation.class); for (MessagePart part : parts) { if (part.getBindingExtensibilityElementKind() == MessagePart.SOAP_BODY_BINDING) { - if (!isStyleAndPartMatch(soapOperation, part)) + if (!isStyleAndPartMatch(soapOperation, part)) { return false; + } } } return true; @@ -538,8 +547,9 @@ public abstract class WSDLModelerBase implements Modeler { QName memberName = fault.getElementName(); javaMemberName = fault.getJavaMemberName(); - if (javaMemberName == null) + if (javaMemberName == null) { javaMemberName = memberName.getLocalPart(); + } return javaMemberName; } @@ -553,8 +563,9 @@ public abstract class WSDLModelerBase implements Modeler { for (MIMEPart mimePart : getMimeParts(ext)) { List mimeContents = getMimeContents(mimePart); for (MIMEContent mimeContent : mimeContents) { - if (mimeContent.getPart().equals(name)) + if (mimeContent.getPart().equals(name)) { return mimeContents; + } } } return null; @@ -605,8 +616,9 @@ public abstract class WSDLModelerBase implements Modeler { protected TWSDLExtension getAnyExtensionOfType( TWSDLExtensible extensible, Class type) { - if(extensible == null) + if (extensible == null) { return null; + } for (TWSDLExtension extension:extensible.extensions()) { if(extension.getClass().equals(type)) { return extension; @@ -616,8 +628,9 @@ public abstract class WSDLModelerBase implements Modeler { for (MIMEPart part : ((MIMEMultipartRelated)extension).getParts()) { //bug fix: 5024001 TWSDLExtension extn = getExtensionOfType(part, type); - if (extn != null) + if (extn != null) { return extn; + } } } } @@ -660,11 +673,11 @@ public abstract class WSDLModelerBase implements Modeler { protected String getUniqueClassName(String className) { int cnt = 2; String uniqueName = className; - while (reqResNames.contains(uniqueName.toLowerCase())) { + while (reqResNames.contains(uniqueName.toLowerCase(Locale.ENGLISH))) { uniqueName = className + cnt; cnt++; } - reqResNames.add(uniqueName.toLowerCase()); + reqResNames.add(uniqueName.toLowerCase(Locale.ENGLISH)); return uniqueName; } @@ -700,19 +713,22 @@ public abstract class WSDLModelerBase implements Modeler { protected void warning(Entity entity, String message){ //avoid duplicate warning for the second pass - if(numPasses > 1) + if (numPasses > 1) { return; - if(entity == null) + } + if (entity == null) { errReceiver.warning(null, message); - else + } else { errReceiver.warning(entity.getLocator(), message); + } } protected void error(Entity entity, String message){ - if(entity == null) + if (entity == null) { errReceiver.error(null, message); - else + } else { errReceiver.error(entity.getLocator(), message); + } throw new AbortException(); } @@ -732,11 +748,10 @@ public abstract class WSDLModelerBase implements Modeler { protected Map _javaExceptions; protected Map _faultTypeToStructureMap; protected Map _bindingNameToPortMap; - protected boolean useWSIBasicProfile = true; private final Set reqResNames = new HashSet(); - public class ProcessSOAPOperationInfo { + public static class ProcessSOAPOperationInfo { public ProcessSOAPOperationInfo( Port modelPort, @@ -768,18 +783,8 @@ public abstract class WSDLModelerBase implements Modeler { // additional data public Operation operation; - public String uniqueOperationName; } - public static class WSDLExceptionInfo { - public String exceptionType; - public QName wsdlMessage; - public String wsdlMessagePartName; - public HashMap constructorOrder; // mapping of element name to - // constructor order (of type Integer) - } - - protected WSDLParser parser; protected WSDLDocument document; protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java index b8f08864951..df805dbe838 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/ClassNameCollector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -144,9 +144,6 @@ public class ClassNameCollector extends ExtendedModelVisitor _exceptions.add(fault.getJavaException()); addExceptionClassName(fault.getJavaException().getName()); - if (fault.getParentFault() != null) { - preVisit(fault.getParentFault()); - } for (Iterator iter = fault.getSubfaults(); iter != null && iter.hasNext();) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java index aaaeb2f3871..7efdbe4fc0f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/DirectoryUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -96,12 +96,10 @@ public class DirectoryUtil { } - private static void ensureDirectory(File dir) - throws GeneratorException { - + private static void ensureDirectory(File dir) throws GeneratorException { if (!dir.exists()) { - dir.mkdirs(); - if (!dir.exists()) { + boolean created = dir.mkdirs(); + if (!created || !dir.exists()) { throw new GeneratorException("generator.cannot.create.dir", dir.getAbsolutePath()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java index f3920bc7cb6..373c7a13cca 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/processor/util/IndentingWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java index 930ea241dec..37ed62daf11 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ConfigurationMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java index 73637e7cfaf..4395cbcb61e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/GeneratorMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java index ea1545cad61..79a670f32db 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/JavacompilerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java index 4384e4013e0..83289cd0d71 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java index 188b34adc00..3b915bc13b3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ModelerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** @@ -460,6 +459,18 @@ public final class ModelerMessages { return localizer.localize(localizableWSDLMODELER_INVALID_OPERATION_JAVA_RESERVED_WORD_NOT_ALLOWED_CUSTOM_NAME(arg0, arg1)); } + public static Localizable localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) { + return messageFactory.getMessage("wsdlmodeler.warning.memberSubmissionAddressingUsed", arg0, arg1); + } + + /** + * obsolete addressing version 08-2004:"{0}" used; version "{1}" should be used instead. + * + */ + public static String WSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(Object arg0, Object arg1) { + return localizer.localize(localizableWSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED(arg0, arg1)); + } + public static Localizable localizableWSDLMODELER_WARNING_BINDING_OPERATION_MULTIPLE_PART_BINDING(Object arg0, Object arg1) { return messageFactory.getMessage("wsdlmodeler.warning.bindingOperation.multiplePartBinding", arg0, arg1); } @@ -988,6 +999,18 @@ public final class ModelerMessages { return localizer.localize(localizableWSDLMODELER_WARNING_R_2716_R_2726(arg0, arg1)); } + public static Localizable localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) { + return messageFactory.getMessage("wsdlmodeler.invalid.ignoringMemberSubmissionAddressing", arg0, arg1); + } + + /** + * ignoring wsa:Action attribute since obsolete addressing version 08-2004:"{0}" used; expecting addressing version "{1}". To use version 08-2004 anyway run wsimport with -extension switch. + * + */ + public static String WSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(Object arg0, Object arg1) { + return localizer.localize(localizableWSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING(arg0, arg1)); + } + public static Localizable localizableWSDLMODELER_WARNING_NO_SOAP_ADDRESS(Object arg0) { return messageFactory.getMessage("wsdlmodeler.warning.noSOAPAddress", arg0); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java index 71a5d5efc1f..a85e4079a4a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/ProcessorMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,11 +23,10 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java index e01f81497cd..58094b9670c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/UtilMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java index 1e2167577b1..d0530e95001 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WebserviceapMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** @@ -700,6 +699,18 @@ public final class WebserviceapMessages { return localizer.localize(localizableWEBSERVICEAP_METHOD_NOT_IMPLEMENTED(arg0, arg1, arg2)); } + public static Localizable localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() { + return messageFactory.getMessage("webserviceap.parsing.javac.options.error"); + } + + /** + * Can't get javac options from processingEnv. + * + */ + public static String WEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR() { + return localizer.localize(localizableWEBSERVICEAP_PARSING_JAVAC_OPTIONS_ERROR()); + } + public static Localizable localizableWEBSERVICE_ENCODED_NOT_SUPPORTED(Object arg0, Object arg1) { return messageFactory.getMessage("webservice.encoded.not.supported", arg0, arg1); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java index 0da2e58f00b..0cf792a87b3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WscompileMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** @@ -213,7 +212,7 @@ public final class WscompileMessages { } /** - * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or use -Xendorsed option. + * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), or use -Xendorsed option. * */ public static String INVOKER_NEED_ENDORSED(Object arg0, Object arg1) { @@ -331,7 +330,8 @@ public final class WscompileMessages { * result in applications that are not portable or * may not interoperate with other implementations * -help display help - * -httpproxy:: specify a HTTP proxy server (port defaults to 8080) + * -httpproxy: set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort + * (port defaults to 8080) * -keep keep generated files * -p specifies the target package * -quiet suppress wsimport output @@ -568,7 +568,7 @@ public final class WscompileMessages { } /** - * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <{2}>. + * You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), or set xendorsed="true" on <{2}>. * */ public static String WRAPPER_TASK_NEED_ENDORSED(Object arg0, Object arg1, Object arg2) { @@ -910,6 +910,18 @@ public final class WscompileMessages { return localizer.localize(localizableWSIMPORT_ILLEGAL_TARGET_VERSION(arg0)); } + public static Localizable localizableWSIMPORT_ILLEGAL_PROXY(Object arg0) { + return messageFactory.getMessage("wsimport.ILLEGAL_PROXY", arg0); + } + + /** + * "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort + * + */ + public static String WSIMPORT_ILLEGAL_PROXY(Object arg0) { + return localizer.localize(localizableWSIMPORT_ILLEGAL_PROXY(arg0)); + } + public static Localizable localizableWSGEN_PORTNAME_MISSING_LOCALNAME(Object arg0) { return messageFactory.getMessage("wsgen.portname.missing.localname", arg0); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java index 1e6cd3e5621..fe11f4b9738 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/WsdlMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.tools.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** @@ -730,6 +729,18 @@ public final class WsdlMessages { return localizer.localize(localizablePARSING_WSDL_NOT_DEFAULT_NAMESPACE(arg0)); } + public static Localizable localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) { + return messageFactory.getMessage("parsing.unknownExtensibilityElementOrAttribute", arg0, arg1); + } + + /** + * unknown extensibility element or attribute "{0}" (in namespace "{1}") + * + */ + public static String PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(Object arg0, Object arg1) { + return localizer.localize(localizablePARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(arg0, arg1)); + } + public static Localizable localizableVALIDATION_DUPLICATED_ELEMENT(Object arg0) { return messageFactory.getMessage("validation.duplicatedElement", arg0); } @@ -927,7 +938,7 @@ public final class WsdlMessages { } /** - * failed.noservice=Could not find wsdl:service in the provided WSDL(s): + * 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. * diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties index b5a80446a8c..6c521b34d55 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties new file mode 100644 index 00000000000..b4678e6640f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_de.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=Wird ignoriert: Binding-Datei "\\"{0}\\". Es handelt sich nicht um eine jaxws- oder jaxb-Binding-Datei. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties new file mode 100644 index 00000000000..965e4976d7c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_es.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=Ignorando el archivo de enlace "\\"{0}\\". No es un archivo de enlace jaxws ni jaxb. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties new file mode 100644 index 00000000000..9ce29804e12 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_fr.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=Non-prise en compte : fichier de binding "\"{0}\". Il ne s''agit pas d''un fichier de binding jaxws ou jaxb. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties new file mode 100644 index 00000000000..772b23fcb61 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_it.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=Il file di associazione "\"{0}\" verr\u00E0 ignorato. Non si tratta di un file di associazione jaxws o jaxb. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties new file mode 100644 index 00000000000..7eaa981b743 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ja.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=\u7121\u8996\u3057\u307E\u3059: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB"\"{0}\"\u3002\u3053\u308C\u306FJAXWS\u307E\u305F\u306FJAXB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties new file mode 100644 index 00000000000..e2ce7c47b53 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_ko.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=\uBC14\uC778\uB529 \uD30C\uC77C "\"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. JAXWS \uB610\uB294 JAXB \uBC14\uC778\uB529 \uD30C\uC77C\uC774 \uC544\uB2D9\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties new file mode 100644 index 00000000000..bddb2c54653 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_pt_BR.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=Ignorando: arquivo de bind "\"{0}\". N\u00E3o \u00E9 um arquivo bind jaxws ou jaxb. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties new file mode 100644 index 00000000000..8b8847a6b68 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_CN.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=\u5FFD\u7565: \u7ED1\u5B9A\u6587\u4EF6 "\"{0}\"\u3002\u8BE5\u6587\u4EF6\u4E0D\u662F jaxws \u6216 jaxb \u7ED1\u5B9A\u6587\u4EF6\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties new file mode 100644 index 00000000000..6d81fb3cc18 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/configuration_zh_TW.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#configuration.invalidElement=invalid element \"{2}\" in file \"{0}\" (line {1}) +configuration.notBindingFile=\u5FFD\u7565: \u9023\u7D50\u6A94 "\"{0}\". \u8A72\u6A94\u6848\u4E0D\u662F jaxws \u6216 jaxb \u9023\u7D50\u6A94. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties index 48d3ba04a80..563530e5288 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties new file mode 100644 index 00000000000..2b840dcb7ca --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_de.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=Generatorfehler: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=Verzeichnis {0} kann nicht erstellt werden +generator.internal.error.should.not.happen=Interner Fehler (sollte nicht auftreten): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=WSDL enth\u00E4lt einige Zeichen, die der native Java Encoder nicht codieren kann: \\"{0}\\" +generator.sei.classAlreadyExist=SEI konnte nicht generiert werden, Klasse {0} ist bereits vorhanden. Benennen Sie wsdl:portType \\"{1}\\" mit der JAX-WS-Anpassung um +generator.service.classAlreadyExist=Service konnte nicht generiert werden, Klasse {0} ist bereits vorhanden. Benennen Sie wsdl:Service \\"{1}\\" mit der JAX-WS-Anpassung um diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties new file mode 100644 index 00000000000..f30a0c96a61 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_es.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=error del generador: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=No se puede crear el directorio: {0}. +generator.internal.error.should.not.happen=error interno (no debe ocurrir): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=El WSDL posee algunos caracteres que no puede codificar el codificador de java nativo: \\"{0}\\" +generator.sei.classAlreadyExist=No se ha podido generar la interfaz de punto final de servicio; la clase {0} ya existe. Cambie el nombre de wsdl:portType \\"{1}\\" utilizando la personalizaci\u00F3n JAX-WS +generator.service.classAlreadyExist=No se ha podido generar el servicio; la clase {0} ya existe. Cambie el nombre de wsdl:Service \\"{1}\\" utilizando la personalizaci\u00F3n JAX-WS diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties new file mode 100644 index 00000000000..d2729f9e459 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_fr.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=erreur de g\u00E9n\u00E9rateur : {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=impossible de cr\u00E9er le r\u00E9pertoire : {0} +generator.internal.error.should.not.happen=erreur interne (inattendue) : {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=WSDL contient certains caract\u00E8res que l''encodeur Java natif ne peut pas encoder : \"{0}\" +generator.sei.classAlreadyExist=Impossible de g\u00E9n\u00E9rer l''interface d''adresse de service, la classe {0} existe d\u00E9j\u00E0. Renommez wsdl:portType \"{1}\" \u00E0 l''aide de la personnalisation JAX-WS +generator.service.classAlreadyExist=Impossible de g\u00E9n\u00E9rer le service, la classe {0} existe d\u00E9j\u00E0. Renommez wsdl:Service \"{1}\" \u00E0 l''aide de la personnalisation JAX-WS diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties new file mode 100644 index 00000000000..57336d7502e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_it.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=errore del generatore: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=impossibile creare la directory: {0} +generator.internal.error.should.not.happen=errore interno (non deve verificarsi): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=WSDL contiene dei caratteri che il codificatore Java nativo non riesce a codificare: \"{0}\" +generator.sei.classAlreadyExist=Impossibile generare SEI. La classe: {0} esiste gi\u00E0. Rinominare wsdl:portType \"{1}\" usando la personalizzazione JAX-WS. +generator.service.classAlreadyExist=Impossibile generare il servizio. La classe: {0} esiste gi\u00E0. Rinominare wsdl:portType \"{1}\" usando la personalizzazione JAX-WS. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties new file mode 100644 index 00000000000..60391124edc --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ja.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=\u30B8\u30A7\u30CD\u30EC\u30FC\u30BF\u30FB\u30A8\u30E9\u30FC: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093: {0} +generator.internal.error.should.not.happen=\u5185\u90E8\u30A8\u30E9\u30FC(\u7981\u6B62\u3055\u308C\u3066\u3044\u307E\u3059): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=WSDL\u306B\u306F\u3001\u30CD\u30A4\u30C6\u30A3\u30D6Java\u30A8\u30F3\u30B3\u30FC\u30C0\u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3067\u304D\u306A\u3044\u6587\u5B57\u304C\u542B\u307E\u308C\u307E\u3059: \"{0}\" +generator.sei.classAlreadyExist=SEI\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30AF\u30E9\u30B9: {0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u3002JAX-WS\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:portType \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044 +generator.service.classAlreadyExist=\u30B5\u30FC\u30D3\u30B9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30AF\u30E9\u30B9: {0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u3002JAX-WS\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:Service \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties new file mode 100644 index 00000000000..1759924f0fc --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_ko.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=\uC0DD\uC131\uAE30 \uC624\uB958: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=\uB514\uB809\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0} +generator.internal.error.should.not.happen=\uB0B4\uBD80 \uC624\uB958(\uBC1C\uC0DD\uD558\uBA74 \uC548\uB428): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=WSDL\uC5D0 \uACE0\uC720 java \uC778\uCF54\uB354\uAC00 \uC778\uCF54\uB529\uD560 \uC218 \uC5C6\uB294 \uBB38\uC790\uAC00 \uC788\uC74C: \"{0}\" +generator.sei.classAlreadyExist=SEI\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {0} \uD074\uB798\uC2A4\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4. JAX-WS \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:portType \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFB8\uC2ED\uC2DC\uC624. +generator.service.classAlreadyExist=\uC11C\uBE44\uC2A4\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {0} \uD074\uB798\uC2A4\uAC00 \uC874\uC7AC\uD569\uB2C8\uB2E4. JAX-WS \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:Service \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFB8\uC2ED\uC2DC\uC624. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties new file mode 100644 index 00000000000..1e88fbb21a5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_pt_BR.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=erro do gerador: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=n\u00E3o \u00E9 poss\u00EDvel criar o diret\u00F3rio: {0} +generator.internal.error.should.not.happen=Erro interno (n\u00E3o deve ocorrer): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=O WSDL tem alguns caracteres cujo codificador java nativo n\u00E3o pode codificar: \"{0}\" +generator.sei.classAlreadyExist=N\u00E3o foi poss\u00EDvel gerar SEI, a classe: {0} j\u00E1 existe. Renomeie wsdl:portType \"{1}\" usando a personaliza\u00E7\u00E3o JAX-WS +generator.service.classAlreadyExist=N\u00E3o foi poss\u00EDvel gerar o Servi\u00E7o, a classe: {0} j\u00E1 existe. Renomeie o wsdl:Service \"{1}\" usando a personaliza\u00E7\u00E3o JAX-WS diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties new file mode 100644 index 00000000000..faaca38f7a8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_CN.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=\u751F\u6210\u5668\u9519\u8BEF: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55: {0} +generator.internal.error.should.not.happen=\u5185\u90E8\u9519\u8BEF (\u4E0D\u5E94\u51FA\u73B0): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=WSDL \u5305\u542B\u672C\u673A java \u7F16\u7801\u5668\u65E0\u6CD5\u7F16\u7801\u7684\u4E00\u4E9B\u5B57\u7B26: \"{0}\" +generator.sei.classAlreadyExist=\u65E0\u6CD5\u751F\u6210 SEI, \u7C7B{0}\u5DF2\u5B58\u5728\u3002\u8BF7\u4F7F\u7528 JAX-WS \u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:portType \"{1}\" +generator.service.classAlreadyExist=\u65E0\u6CD5\u751F\u6210\u670D\u52A1, \u7C7B{0}\u5DF2\u5B58\u5728\u3002\u8BF7\u4F7F\u7528 JAX-WS \u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:Service \"{1}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties new file mode 100644 index 00000000000..780183cb49e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/generator_zh_TW.properties @@ -0,0 +1,39 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Generator +# Wrapped into an Exception. {0} - exception message of another exception. +generator.nestedGeneratorError=\u7522\u751F\u5668\u932F\u8AA4: {0} +# Usage not found. TODO Remove +#generator.cant.write=can''t write file: {0} +# Wrapped into an Exception. Not concatenated with any other string. +generator.cannot.create.dir=\u7121\u6CD5\u5EFA\u7ACB\u76EE\u9304: {0} +generator.internal.error.should.not.happen=\u5167\u90E8\u932F\u8AA4 (\u4E0D\u61C9\u8A72\u767C\u751F): {0} + + +#IndentingWriter +generator.indentingwriter.charset.cantencode=\u539F\u751F Java \u7DE8\u78BC\u5668\u7121\u6CD5\u7DE8\u78BC WSDL \u7684\u67D0\u4E9B\u5B57\u5143: \"{0}\" +generator.sei.classAlreadyExist=\u7121\u6CD5\u7522\u751F SEI, \u985E\u5225: {0} \u5DF2\u5B58\u5728. \u8ACB\u4F7F\u7528 JAX-WS \u81EA\u8A02\u9805\u76EE\u91CD\u65B0\u547D\u540D wsdl:portType \"{1}\" +generator.service.classAlreadyExist=\u7121\u6CD5\u7522\u751F Service, \u985E\u5225: {0} \u5DF2\u5B58\u5728. \u8ACB\u4F7F\u7528 JAX-WS \u81EA\u8A02\u9805\u76EE\u91CD\u65B0\u547D\u540D wsdl:Service \\"{1}\\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties index ab9888e8298..9ccbdc43de9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties new file mode 100644 index 00000000000..29f8c90e353 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_de.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0} ist im Classpath nicht vorhanden, erfordert Sun JDK Version 5.0 oder h\u00F6her. +javacompiler.nosuchmethod.error=Es ist keine derartige Methode {0} verf\u00FCgbar, erfordert Sun JDK Version 5.0 oder h\u00F6her. +javacompiler.error=Fehler: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties new file mode 100644 index 00000000000..1c60742877d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_es.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0} no est\u00E1 disponible en la classpath; se necesita la versi\u00F3n 5.0 o posterior de JDK de Sun. +javacompiler.nosuchmethod.error=Ese m\u00E9todo {0} no est\u00E1 disponible. Se necesita la versi\u00F3n 5.0 o posterior de JDK de Sun. +javacompiler.error=error: {0}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties new file mode 100644 index 00000000000..1f12bb58f70 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_fr.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0} n''est pas disponible dans le classpath, il exige Sun JDK version 5.0 ou sup\u00E9rieure. +javacompiler.nosuchmethod.error=Aucune m\u00E9thode de type {0} n''est disponible, exige Sun JDK version 5.0 ou sup\u00E9rieure. +javacompiler.error=erreur : {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties new file mode 100644 index 00000000000..2e650467e68 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_it.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0} non \u00E8 disponibile nel classpath. \u00C8 richiesta la versione 5.0 o successiva di JDK Sun. +javacompiler.nosuchmethod.error=Nessun metodo {0} disponibile. \u00C8 richiesta la versione 5.0 o successiva di JDK Sun. +javacompiler.error=errore: {0}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties new file mode 100644 index 00000000000..ad411dcc045 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ja.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error=\u30AF\u30E9\u30B9\u30D1\u30B9\u3067{0}\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002Sun\u306EJDK\u30D0\u30FC\u30B8\u30E7\u30F35.0\u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\u3002 +javacompiler.nosuchmethod.error=\u3053\u3046\u3057\u305F\u30E1\u30BD\u30C3\u30C9{0}\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002Sun\u306EJDK\u30D0\u30FC\u30B8\u30E7\u30F35.0\u4EE5\u4E0A\u304C\u5FC5\u8981\u3067\u3059\u3002 +javacompiler.error=\u30A8\u30E9\u30FC: {0}\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties new file mode 100644 index 00000000000..fbd2e625515 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_ko.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0}\uC744(\uB97C) \uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. Sun\uC758 JDK 5.0 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +javacompiler.nosuchmethod.error=\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uD574\uB2F9 \uBA54\uC18C\uB4DC {0}\uC774(\uAC00) \uC5C6\uC2B5\uB2C8\uB2E4. Sun\uC758 JDK 5.0 \uB610\uB294 \uC774\uD6C4 \uBC84\uC804\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +javacompiler.error=\uC624\uB958: {0}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties new file mode 100644 index 00000000000..3bdee78aeb9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_pt_BR.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0} n\u00E3o est\u00E1 dispon\u00EDvel no classpath, requer a vers\u00E3o 5.0 ou posterior de JDK da Sun. +javacompiler.nosuchmethod.error=N\u00E3o h\u00E1 m\u00E9todo {0} dispon\u00EDvel, requer a vers\u00E3o 5.0 ou posterior de JDK da Sun. +javacompiler.error=erro : {0}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties new file mode 100644 index 00000000000..c839e874c05 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_CN.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error={0}\u5728\u7C7B\u8DEF\u5F84\u4E2D\u4E0D\u53EF\u7528, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u9AD8\u7248\u672C\u3002 +javacompiler.nosuchmethod.error=\u8FD9\u79CD\u65B9\u6CD5{0}\u4E0D\u53EF\u7528, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u9AD8\u7248\u672C\u3002 +javacompiler.error=\u9519\u8BEF: {0}\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties new file mode 100644 index 00000000000..74c734820f0 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/javacompiler_zh_TW.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# Generic Messages +# +javacompiler.classpath.error=\u985E\u5225\u8DEF\u5F91\u4E2D\u7121\u6CD5\u4F7F\u7528 {0}, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u65B0\u7248\u672C. +javacompiler.nosuchmethod.error=\u6B64\u65B9\u6CD5 {0} \u7121\u6CD5\u4F7F\u7528, \u9700\u8981 Sun \u7684 JDK \u7248\u672C 5.0 \u6216\u66F4\u65B0\u7248\u672C. +javacompiler.error=\u932F\u8AA4 : {0}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties index 5c288b39382..729b62703e9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties new file mode 100644 index 00000000000..0b30444e07b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_de.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=Modellfehler: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=Ung\u00FCltiger Meldungstyp: {0} + +model.schema.notImplemented=Nicht unterst\u00FCtztes XML-Schema-Feature ({0}) +model.schema.circularity=Zirkularit\u00E4t in Schema ermittelt: \\"{0}\\" + +model.schema.unsupportedType=nicht unterst\u00FCtzter Typ ({0}): \\"{1}\\" (Namespace: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=ung\u00FCltiges Literal \\"{0}\\" in anonymer Enumeration + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=Facet \\"{0}\\" bei einfachem Typ nicht unterst\u00FCtzt: \\"{0}\\" +model.schema.unionNotSupported=simpleType: \\"{0}\\" Ableitung durch xsd:union nicht unterst\u00FCtzt +model.schema.listNotSupported=simpleType: \\"{0}\\" Ableitung durch xsd:list nicht unterst\u00FCtzt +model.schema.invalidSimpleType.invalidItemType=in simpleType: \\"{0}\\", kann itemType \\"{1}\\" nicht durch Liste abgeleitet werden +model.schema.invalidSimpleType.noItemLiteralType=in simpleType: \"{0}\", ist xsd:list itemType \"{1}\" ung\u00FCltig +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=xsd:all-Gestaltung f\u00FCr den Platzhalter in Schematyp nicht unterst\u00FCtzt: \\"{0}\\" + +model.uniqueness=Verletzung des UNIQUE Constraints +model.part.notUnique=Teile in wsdl:message \\"{0}\\", referenzieren \\"{1}\\", sie m\u00FCssen eindeutige globale Elemente referenzieren. +model.exception.notunique=Java-Signatur konnte nicht generiert werden: Doppelte Ausnahmenamen {0}. Verwenden Sie JAXWS-Binding-Anpassung, um wsdl:part \\"{1}\\" umzubenennen +model.uniqueness.javastructuretype=Verletzung des UNIQUE Constraints, doppeltes Member \\"{0}\\" wurde JavaStructureType \\"{1}\\" hinzugef\u00FCgt +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=\u00DCbergeordnetes Objekt von Typ \"{0}\" ist bereits auf \"{1}\" festgelegt. Neuer Wert = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=Modell-Exporter: Nicht unterst\u00FCtzte Klasse: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=ung\u00FCltige Version \"{1}\" in Modelldokument (Zeile {0}) +model.importer.invalidMinorMinorOrPatchVersion=Modellversion \"{1}\" neuer als Laufzeitversion \"{2}\" (Zeile {0}): Upgrade auf neuere Laufzeitumgebung ist erforderlich +model.importer.invalidClass=ung\u00FCltiger Klassenname \"{1}\" in Modelldokument (Zeile {0}) +model.importer.invalidId=ung\u00FCltige ID \"{1} in Modelldokument (Zeile {0}) +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper darf nur ein Element-Member haben. +model.arraywrapper.member.already.set=LiteralArrayWrapper-Element-Member ist bereits festgelegt. +model.arraywrapper.no.parent=LiteralArrayWrapper darf keinen \u00FCbergeordneten Typ haben +model.arraywrapper.no.subtypes=LiteralArrayWrapper darf keine untergeordneten Typen haben +model.arraywrapper.no.content.member=LiteralArrayWrapper darf kein Inhalts-Member haben +model.complexType.simpleContent.reservedName=ung\u00FCltiger Attributname: "_value" in complexType: \\"{0}\\", _value ist reservierter JAXWS-Name, dieser Name wird in der generierten Javabean-Klasse zur Aufnahme des Contentwertes in der generierten Javabean-Klasse f\u00FCr complexType/simpleContent generiert. +model.parameter.notunique.wrapper=Java-Signatur konnte nicht generiert werden: doppelter Parametername \\"{0}\\". Versuchen Sie eine der folgenden L\u00F6sungen\n\t1. Verwenden Sie die JAXWS-Binding-Anpassung, um wsdl:part \\"{1}\\" umzubenennen.\n\t2. F\u00FChren Sie wsimport mit dem Switch "-extension" aus.\n\t3. Dies ist ein Wrapper-Vorgang; um den Parameternamenskonflikt zu l\u00F6sen, k\u00F6nnen Sie auch versuchen, den Wrapper-Vorgang mit der WSDL-Anpassung false zu deaktivieren. +model.parameter.notunique=Java-Signatur konnte nicht generiert werden: doppelter Parametername \\"{0}\\". Versuchen Sie eine der folgenden L\u00F6sungen\n\t1. Verwenden Sie JAXWS-Binding-Anpassung, um wsdl:part \\"{1}\\" umzubenennen\n\t2. F\u00FChren Sie wsimport mit dem Switch "-extension" aus. + +#JAXWS 2.0 +model.schema.elementNotFound=Element \"{0}\" wurde nicht gefunden. +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = unbekanntes Verzeichnis + +ConsoleErrorReporter.LineXOfY = \ \ Zeile {0} von {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties new file mode 100644 index 00000000000..56b6a2f833b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_es.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=error de modelo: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=tipo de mensaje no v\u00E1lido: {0} + +model.schema.notImplemented=funci\u00F3n de esquema XML no soportada ({0}) +model.schema.circularity=se ha detectado una circularidad en el esquema: \\"{0}\\" + +model.schema.unsupportedType=tipo no soportado ({0}): \"{1}\" (espacio de nombres: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=literal no v\u00E1lido \\"{0}\\" en la enumeraci\u00F3n an\u00F3nima + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=la faceta \"{0}\" no est\u00E1 soportada en un tipo simple: \"{0}\" +model.schema.unionNotSupported=simpleType: \\"{0}\\" la derivaci\u00F3n por xsd:union no est\u00E1 soportada +model.schema.listNotSupported=simpleType: \\"{0}\\" la derivaci\u00F3n por xsd:list no est\u00E1 soportada +model.schema.invalidSimpleType.invalidItemType=en simpleType: \\"{0}\\", itemType \\"{1}\\" no se puede derivar por lista +model.schema.invalidSimpleType.noItemLiteralType=en simpleType: \"{0}\", xsd:list itemType \"{1}\" no es v\u00E1lido +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=el compositor xsd:all no est\u00E1 soportado para el comod\u00EDn en el tipo de esquema: \\"{0}\\" + +model.uniqueness=violaci\u00F3n de la restricci\u00F3n de unicidad +model.part.notUnique=partes de wsdl:message \\"{0}\\", referencia \\"{1}\\", deben hacer referencia a elementos globales \u00FAnicos. +model.exception.notunique=Fallo al generar la firma de Java: nombres de excepci\u00F3n duplicados {0}. Utilice la personalizaci\u00F3n de enlaces JAX-WS para cambiar el nombre de wsdl:part \\"{1}\\" +model.uniqueness.javastructuretype=violaci\u00F3n de la restricci\u00F3n de unicidad; se ha agregado un miembro duplicado \\"{0}\\" a JavaStructureType \\"{1}\\" +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=El principal del tipo \"{0}\" ya se ha definido en \"{1}\", nuevo valor = \"{2}\". +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=exportador de modelo: clase no soportada: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=versi\u00F3n no v\u00E1lida \"{1}\" en el documento del modelo (l\u00EDnea {0}) +model.importer.invalidMinorMinorOrPatchVersion=la versi\u00F3n del modelo \\"{1}\\" es m\u00E1s reciente que la versi\u00F3n en tiempo de ejecuci\u00F3n \\"{2}\\" (l\u00EDnea {0}): hay que actualizarla a un tiempo de ejecuci\u00F3n m\u00E1s reciente +model.importer.invalidClass=nombre de clase no v\u00E1lido \"{1}\" en el documento del modelo (l\u00EDnea {0}) +model.importer.invalidId=Identificador no v\u00E1lido \\"{1}\\" en el documento del modelo (l\u00EDnea {0}) +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper s\u00F3lo puede tener un miembro de elemento. +model.arraywrapper.member.already.set=El miembro del elemento LiteralArrayWrapper ya est\u00E1 definido. +model.arraywrapper.no.parent=LiteralArrayWrapper no puede tener un tipo principal +model.arraywrapper.no.subtypes=LiteralArrayWrapper no puede tener subtipos +model.arraywrapper.no.content.member=LiteralArrayWrapper no puede tener un miembro de contenido +model.complexType.simpleContent.reservedName=nombre de atributo no v\u00E1lido: "_value" en complexType: \\"{0}\\", _value es un nombre reservado de JAX-WS; este nombre se genera en la clase javabean generada para incluir el valor de contenido en la clase javabean generada para complexType/simpleContent. +model.parameter.notunique.wrapper=Fallo al generar la firma de Java: nombre de par\u00E1metro duplicado \\"{0}\\". Intente una de las siguientes acciones\n\t1. Utilice la personalizaci\u00F3n de enlace JAX-WS para cambiar el nombre de wsdl:part \\"{1}\\"\n\t2. Ejecute wsimport con el conmutador -extension.\n\t3. Esta operaci\u00F3n es de estilo de envoltorio. Para resolver el conflicto de nombres de par\u00E1metros, intente tambi\u00E9n desactivar el estilo de envoltorio utilizando la personalizaci\u00F3n wsdl false. +model.parameter.notunique=Fallo al generar la firma de Java: nombre de par\u00E1metro duplicado \\"{0}\\". Intente realizar una de las siguientes acciones\n\t1. Utilice la personalizaci\u00F3n de enlace JAX-WS para cambiar el nombre de wsdl:part \\"{1}\\"\n\t2. Ejecute wsimport con el conmutador -extension. + +#JAXWS 2.0 +model.schema.elementNotFound=No se ha encontrado el elemento \"{0}\". +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = ubicaci\u00F3n desconocida + +ConsoleErrorReporter.LineXOfY = \ \ l\u00EDnea {0} de {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties new file mode 100644 index 00000000000..1efe6c0f25c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_fr.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=erreur de mod\u00E8le : {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=type de message non valide : {0} + +model.schema.notImplemented=fonction XML Schema ({0}) non prise en charge +model.schema.circularity=circularit\u00E9 d\u00E9tect\u00E9e dans le sch\u00E9ma : \"{0}\" + +model.schema.unsupportedType=type non pris en charge ({0}) : \"{1}\" (espace de noms : {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=litt\u00E9ral non valide \"{0}\" dans l''\u00E9num\u00E9ration anonyme + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=facet \"{0}\" non pris en charge sur le type simple : \"{0}\" +model.schema.unionNotSupported=simpleType : \"{0}\" d\u00E9rivation par xsd:union non prise en charge +model.schema.listNotSupported=simpleType : \"{0}\" d\u00E9rivation par xsd:list non prise en charge +model.schema.invalidSimpleType.invalidItemType=dans simpleType : \"{0}\", l''\u00E9l\u00E9ment itemType \"{1}\" ne peut pas \u00EAtre d\u00E9riv\u00E9 par liste +model.schema.invalidSimpleType.noItemLiteralType=dans simpleType : \"{0}\", l''\u00E9l\u00E9ment xsd:list itemType \"{1}\" n''est pas valide +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=compositeur xsd:all non pris en charge pour le caract\u00E8re g\u00E9n\u00E9rique dans le type de sch\u00E9ma : \"{0}\" + +model.uniqueness=violation de contrainte d'unicit\u00E9 +model.part.notUnique=les parties dans wsdl:message \"{0}\", r\u00E9f\u00E9rence \"{1}\", doivent r\u00E9f\u00E9rencer des \u00E9l\u00E9ments globaux uniques. +model.exception.notunique=Echec de la g\u00E9n\u00E9ration de la signature Java : noms d''exception {0} en double. Utilisez la personnalisation de binding JAXWS pour renommer l''\u00E9l\u00E9ment wsdl:part \"{1}\" +model.uniqueness.javastructuretype=violation de la contrainte d''unicit\u00E9, membre \"{0}\" en double ajout\u00E9 \u00E0 JavaStructureType \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=le parent de type \"{0}\" a d\u00E9j\u00E0 la valeur \"{1}\" ; nouvelle valeur = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=programme d''export de mod\u00E8le : classe non prise en charge : {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=version \"{1}\" non valide dans le document de mod\u00E8le (ligne {0}) +model.importer.invalidMinorMinorOrPatchVersion=version de mod\u00E8le \"{1}\" plus r\u00E9cente que la version d''ex\u00E9cution \"{2}\" (ligne {0}) : vous devez mettre \u00E0 jour vers une version d''ex\u00E9cution plus r\u00E9cente +model.importer.invalidClass=nom de classe \"{1}\" non valide dans le document de mod\u00E8le (ligne {0}) +model.importer.invalidId=ID \"{1}\ non valide dans le document de mod\u00E8le (ligne {0}) +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper ne peut avoir qu'un membre d'\u00E9l\u00E9ment. +model.arraywrapper.member.already.set=Le membre de l'\u00E9l\u00E9ment LiteralArrayWrapper existe d\u00E9j\u00E0. +model.arraywrapper.no.parent=LiteralArrayWrapper ne peut pas avoir de type parent +model.arraywrapper.no.subtypes=LiteralArrayWrapper ne peut pas avoir de sous-types +model.arraywrapper.no.content.member=LiteralArrayWrapper ne peut pas avoir de membre de contenu +model.complexType.simpleContent.reservedName=nom d''attribut non valide : "_value" dans complexType : \"{0}\", _value est un nom r\u00E9serv\u00E9 JAXWS, ce nom est g\u00E9n\u00E9r\u00E9 dans la classe JavaBean g\u00E9n\u00E9r\u00E9e pour contenir la valeur de contenu dans la classe JavaBean g\u00E9n\u00E9r\u00E9e pour complexType/simpleContent. +model.parameter.notunique.wrapper=Echec de la g\u00E9n\u00E9ration de la signature Java : nom de param\u00E8tre en double \"{0}\". Essayez l''une de ces solutions :\n\t1. Utilisez la personnalisation de binding JAXWS pour renommer l''\u00E9l\u00E9ment wsdl:part \"{1}\".\n\t2. Ex\u00E9cutez wsimport avec le commutateur -extension.\n\t3. Il s''agit d''une op\u00E9ration de style wrapper ; pour r\u00E9soudre le conflit de nom de param\u00E8tre, vous pouvez \u00E9galement essayer de d\u00E9sactiver le style wrapper \u00E0 l''aide de la personnalisation WSDL false. +model.parameter.notunique=Echec de la g\u00E9n\u00E9ration de la signature Java : nom de param\u00E8tre en double \"{0}\". Essayez l''une de ces solutions :\n\t1. Utilisez la personnalisation de binding JAXWS pour renommer l''\u00E9l\u00E9ment wsdl:part \"{1}\".\n\t2. Ex\u00E9cutez wsimport avec le commutateur -extension. + +#JAXWS 2.0 +model.schema.elementNotFound=El\u00E9ment \"{0}\" introuvable. +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = emplacement inconnu + +ConsoleErrorReporter.LineXOfY = \ \ ligne {0} sur {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties new file mode 100644 index 00000000000..c278fe077dc --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_it.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=errore del modello: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=tipo di messaggio non valido: {0} + +model.schema.notImplemented=funzione di schema XML ({0}) non supportata +model.schema.circularity=circolarit\u00E0 rilevata nello schema: \"{0}\" + +model.schema.unsupportedType=tipo non supportato ({0}): \"{1}\" (spazio di nomi: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=valore non valido \"{0}\" nell''enumerazione anonima + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=facet \"{0}\" non supportato sul tipo semplice: \"{0}\" +model.schema.unionNotSupported=simpleType: derivazione \"{0}\" mediante xsd:union non supportata +model.schema.listNotSupported=simpleType: derivazione \"{0}\" mediante xsd:list non supportata +model.schema.invalidSimpleType.invalidItemType=in simpleType: \"{0}\", impossibile derivare itemType \"{1}\" mediante lista +model.schema.invalidSimpleType.noItemLiteralType=in simpleType: \"{0}\", xsd:list itemType \"{1}\" non valido +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=compositore xsd:all non supportato per il carattere jolly nel tipo di schema: \"{0}\" + +model.uniqueness=Violazione del vincolo di univocit\u00E0 +model.part.notUnique=parti di wsdl:message \"{0}\", riferimento \"{1}\", devono fare riferimento a elementi globali univoci. +model.exception.notunique=Generazione della firma Java non riuscita: nomi di eccezioni duplicati {0}. Usare la personalizzazione dell''associazione JAXWS per rinominare wsdl:part \"{1}\" +model.uniqueness.javastructuretype=violazione del vincolo di univocit\u00E0, membro duplicato \"{0}\" aggiunto a JavaStructureType \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=elemento padre del tipo \"{0}\" gi\u00E0 impostato su \"{1}\"; nuovo valore = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=strumento di esportazione del modello: classe non supportata: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=versione non valida \"{1}\" nel documento del modello (riga {0}) +model.importer.invalidMinorMinorOrPatchVersion=la versione del modello \"{1}\" \u00E8 pi\u00F9 recente della versione di runtime \"{2}\" (riga {0}): \u00E8 necessario eseguire l''aggiornamento a un runtime pi\u00F9 recente +model.importer.invalidClass=nome di classe non valido \"{1}\" nel documento del modello (riga {0}) +model.importer.invalidId=ID non valido \"{1}\" nel documento del modello (riga {0}) +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper pu\u00F2 avere solo un membro di elemento. +model.arraywrapper.member.already.set=membro dell'elemento LiteralArrayWrapper gi\u00E0 impostato. +model.arraywrapper.no.parent=LiteralArrayWrapper non pu\u00F2 avere un tipo padre +model.arraywrapper.no.subtypes=LiteralArrayWrapper non pu\u00F2 avere sottotipi +model.arraywrapper.no.content.member=LiteralArrayWrapper non pu\u00F2 avere un membro di contenuto +model.complexType.simpleContent.reservedName=nome attributo non valido: "_value" in complexType: \"{0}\", _value \u00E8 un nome riservato JAXWS. Questo nome viene generato nella classe javabean generata per contenere il valore del contenuto per complexType/simpleContent. +model.parameter.notunique.wrapper=Generazione della firma Java non riuscita: nome di parametro duplicato \"{0}\". Tentare una delle seguenti operazioni:\n\t1. Usare la personalizzazione dell''associazione JAXWS per rinominare wsdl:part \"{1}\"\n\t2. Eseguire wsimport con il parametro -extension.\n\t3. Poich\u00E9 questa \u00E8 un''operazione con stile wrapper, per risolvere il conflitto del nome del parametro, \u00E8 anche possibile provare a disabilitare lo stile wrapper usando la personalizzazione WSDL false. +model.parameter.notunique=Generazione della firma Java non riuscita: nome di parametro duplicato \"{0}\". Tentare una delle seguenti operazioni:\n\t1. Usare la personalizzazione dell''associazione JAXWS per rinominare wsdl:part \"{1}\"\n\t2. Eseguire wsimport con il parametro -extension. + +#JAXWS 2.0 +model.schema.elementNotFound=Elemento \"{0}\" non trovato. +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = posizione sconosciuta + +ConsoleErrorReporter.LineXOfY = \ \ riga {0} di {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties new file mode 100644 index 00000000000..5d334070351 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ja.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=\u30E2\u30C7\u30EB\u30FB\u30A8\u30E9\u30FC: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=\u7121\u52B9\u306A\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30BF\u30A4\u30D7: {0} + +model.schema.notImplemented=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044XML\u30B9\u30AD\u30FC\u30DE\u6A5F\u80FD({0}) +model.schema.circularity=\u30B9\u30AD\u30FC\u30DE: \"{0}\"\u306B\u5FAA\u74B0\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F + +model.schema.unsupportedType=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30BF\u30A4\u30D7({0}): \"{1}\" (\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=\u533F\u540D\u5217\u6319\u306E\u30EA\u30C6\u30E9\u30EB\"{0}\"\u304C\u7121\u52B9\u3067\u3059 + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=\u30D5\u30A1\u30BB\u30C3\u30C8\"{0}\"\u306F\u5358\u7D14\u578B: \"{0}\"\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +model.schema.unionNotSupported=xsd:union\u306B\u3088\u308BsimpleType: \"{0}\"\u306E\u5C0E\u51FA\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +model.schema.listNotSupported=xsd:list\u306B\u3088\u308BsimpleType: \"{0}\"\u306E\u5C0E\u51FA\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +model.schema.invalidSimpleType.invalidItemType=simpleType: \"{0}\"\u3067\u3001itemType \"{1}\"\u3092\u30EA\u30B9\u30C8\u306B\u3088\u308A\u5C0E\u51FA\u3067\u304D\u307E\u305B\u3093 +model.schema.invalidSimpleType.noItemLiteralType=simpleType: \"{0}\"\u3067\u3001xsd:list itemType \"{1}\"\u304C\u7121\u52B9\u3067\u3059 +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=xsd:all\u30B3\u30F3\u30DD\u30B8\u30BF\u306F\u3001\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7: \"{0}\"\u306E\u30EF\u30A4\u30EB\u30C9\u30AB\u30FC\u30C9\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 + +model.uniqueness=\u4E00\u610F\u6027\u5236\u7D04\u9055\u53CD +model.part.notUnique=wsdl:message \"{0}\"\u306E\u30D1\u30FC\u30C8\u3001\u53C2\u7167\"{1}\"\u306F\u3001\u4E00\u610F\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +model.exception.notunique=Java\u7F72\u540D\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u4F8B\u5916\u540D{0}\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002JAXWS\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:part \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044 +model.uniqueness.javastructuretype=\u4E00\u610F\u6027\u5236\u7D04\u9055\u53CD\u3067\u3059\u3002\u91CD\u8907\u3057\u305F\u30E1\u30F3\u30D0\u30FC\"{0}\"\u304CJavaStructureType \"{1}\"\u306B\u8FFD\u52A0\u3055\u308C\u307E\u3057\u305F +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=\u30BF\u30A4\u30D7\"{0}\"\u306E\u89AA\u304C\u3059\u3067\u306B\"{1}\"\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u65B0\u898F\u306E\u5024= \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=\u30E2\u30C7\u30EB\u30FB\u30A8\u30AF\u30B9\u30DD\u30FC\u30BF: \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30AF\u30E9\u30B9: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=\u30E2\u30C7\u30EB\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u884C{0})\u3067\u30D0\u30FC\u30B8\u30E7\u30F3\"{1}\"\u304C\u7121\u52B9\u3067\u3059 +model.importer.invalidMinorMinorOrPatchVersion=\u30E2\u30C7\u30EB\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\"{1}\"\u304C\u30E9\u30F3\u30BF\u30A4\u30E0\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\"{2}\" (\u884C{0})\u3088\u308A\u65B0\u3057\u3044\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u3059: \u65B0\u3057\u3044\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +model.importer.invalidClass=\u30E2\u30C7\u30EB\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u884C{0})\u3067\u30AF\u30E9\u30B9\u540D\"{1}\"\u304C\u7121\u52B9\u3067\u3059 +model.importer.invalidId=\u30E2\u30C7\u30EB\u30FB\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u884C{0})\u3067ID \"{1}\"\u304C\u7121\u52B9\u3067\u3059 +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper\u306F\u3001\u8981\u7D20\u30E1\u30F3\u30D0\u30FC1\u3064\u306E\u307F\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 +model.arraywrapper.member.already.set=LiteralArrayWrapper\u8981\u7D20\u306E\u30E1\u30F3\u30D0\u30FC\u306F\u3059\u3067\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002 +model.arraywrapper.no.parent=LiteralArrayWrapper\u306F\u89AA\u30BF\u30A4\u30D7\u3092\u6301\u3066\u307E\u305B\u3093 +model.arraywrapper.no.subtypes=LiteralArrayWrapper\u306F\u30B5\u30D6\u30BF\u30A4\u30D7\u3092\u6301\u3066\u307E\u305B\u3093 +model.arraywrapper.no.content.member=LiteralArrayWrapper\u306F\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E1\u30F3\u30D0\u30FC\u3092\u6301\u3066\u307E\u305B\u3093 +model.complexType.simpleContent.reservedName=complexType: \"{0}\"\u306E\u5C5E\u6027\u540D: "_value"\u304C\u7121\u52B9\u3067\u3059\u3002_value\u306FJAXWS\u4E88\u7D04\u540D\u3067\u3042\u308A\u3001\u3053\u306E\u540D\u524D\u306F\u3001complexType/simpleContent\u306E\u751F\u6210\u6E08\u306EJavaBean\u30AF\u30E9\u30B9\u306B\u30B3\u30F3\u30C6\u30F3\u30C4\u5024\u3092\u4FDD\u6301\u3059\u308B\u305F\u3081\u306B\u3001\u751F\u6210\u6E08\u306EJavaBean\u30AF\u30E9\u30B9\u3067\u751F\u6210\u3055\u308C\u307E\u3059\u3002 +model.parameter.notunique.wrapper=Java\u7F72\u540D\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u30D1\u30E9\u30E1\u30FC\u30BF\u5024\"{0}\"\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002\u6B21\u306E\u3044\u305A\u308C\u304B\u3092\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\n\t1.JAXWS\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:part \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u307E\u3059\n\t2.-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002\n\t3.\u3053\u308C\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u306E\u7AF6\u5408\u3092\u89E3\u6C7A\u3059\u308B\u305F\u3081\u306E\u30E9\u30C3\u30D1\u30FC\u30FB\u30B9\u30BF\u30A4\u30EB\u306E\u64CD\u4F5C\u3067\u3042\u308A\u3001false wsdl\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u30E9\u30C3\u30D1\u30FC\u30FB\u30B9\u30BF\u30A4\u30EB\u3092\u7121\u52B9\u306B\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002 +model.parameter.notunique=Java\u7F72\u540D\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F: \u30D1\u30E9\u30E1\u30FC\u30BF\u540D\"{0}\"\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059\u3002\u6B21\u306E\u3044\u305A\u308C\u304B\u3092\u8A66\u884C\u3057\u3066\u304F\u3060\u3055\u3044\n\t1.JAXWS\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001wsdl:part \"{1}\"\u306E\u540D\u524D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\n\t2.-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +#JAXWS 2.0 +model.schema.elementNotFound=\u8981\u7D20\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = \u4E0D\u660E\u306A\u5834\u6240 + +ConsoleErrorReporter.LineXOfY = \ \ \u884C{0}/{1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties new file mode 100644 index 00000000000..ce1056ef559 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_ko.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=\uBAA8\uB378 \uC624\uB958: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=\uBD80\uC801\uD569\uD55C \uBA54\uC2DC\uC9C0 \uC720\uD615: {0} + +model.schema.notImplemented=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 XML \uC2A4\uD0A4\uB9C8 \uAE30\uB2A5({0}) +model.schema.circularity=\uC2A4\uD0A4\uB9C8\uC5D0\uC11C \uC21C\uD658\uC131\uC774 \uAC10\uC9C0\uB428: \"{0}\" + +model.schema.unsupportedType=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC720\uD615({0}): \"{1}\"(\uB124\uC784\uC2A4\uD398\uC774\uC2A4: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=\uC775\uBA85 \uBAA9\uB85D\uC5D0 \uBD80\uC801\uD569\uD55C \uB9AC\uD130\uB7F4 \"{0}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=\uB2E8\uC21C \uC720\uD615\uC5D0\uC11C\uB294 \"{0}\" \uD328\uC2EF\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: \"{0}\" +model.schema.unionNotSupported=xsd:union\uC5D0 \uC758\uD55C simpleType \"{0}\" \uD30C\uC0DD\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +model.schema.listNotSupported=xsd:list\uC5D0 \uC758\uD55C simpleType \"{0}\" \uD30C\uC0DD\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +model.schema.invalidSimpleType.invalidItemType=simpleType \"{0}\"\uC5D0\uC11C itemType \"{1}\"\uC740(\uB294) list\uC5D0 \uC758\uD574 \uD30C\uC0DD\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +model.schema.invalidSimpleType.noItemLiteralType=simpleType \"{0}\"\uC5D0\uC11C xsd:list itemType \"{1}\"\uC740(\uB294) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=\uC2A4\uD0A4\uB9C8 \uC720\uD615 \"{0}\"\uC5D0\uC11C\uB294 \uC640\uC77C\uB4DC \uCE74\uB4DC \uBB38\uC790\uC5D0 \uB300\uD574 xsd:all compositor\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +model.uniqueness=\uACE0\uC720\uC131 \uC81C\uC57D \uC870\uAC74 \uC704\uBC18 +model.part.notUnique=wsdl:message \"{0}\"\uC758 \uBD80\uBD84\uC774 \"{1}\"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4. \uACE0\uC720\uD55C \uC804\uC5ED \uC694\uC18C\uB97C \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4. +model.exception.notunique=Java \uC11C\uBA85 \uC0DD\uC131 \uC2E4\uD328: \uC608\uC678 \uC0AC\uD56D \uC774\uB984 {0}\uC774(\uAC00) \uC911\uBCF5\uB429\uB2C8\uB2E4. JAXWS \uBC14\uC778\uB529 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:part \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFB8\uC2ED\uC2DC\uC624. +model.uniqueness.javastructuretype=\uACE0\uC720\uC131 \uC81C\uC57D \uC870\uAC74 \uC704\uBC18\uC785\uB2C8\uB2E4. \uC911\uBCF5 \uBA64\uBC84 \"{0}\"\uC774(\uAC00) JavaStructureType \"{1}\"\uC5D0 \uCD94\uAC00\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=\"{0}\" \uC720\uD615\uC758 \uC0C1\uC704\uAC00 \uC774\uBBF8 \"{1}\"\uC73C(\uB85C) \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uC0C8 \uAC12 = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=\uBAA8\uB378 \uC775\uC2A4\uD3EC\uD130: \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uD074\uB798\uC2A4: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=\uBAA8\uB378 \uBB38\uC11C({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uBC84\uC804 \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +model.importer.invalidMinorMinorOrPatchVersion=\uBAA8\uB378 \uBC84\uC804 \"{1}\"\uC774(\uAC00) \uB7F0\uD0C0\uC784 \uBC84\uC804 \"{2}\"({0}\uD589)\uBCF4\uB2E4 \uCD5C\uC2E0\uC784: \uCD5C\uC2E0 \uB7F0\uD0C0\uC784\uC73C\uB85C \uC5C5\uADF8\uB808\uC774\uB4DC\uD574\uC57C \uD569\uB2C8\uB2E4. +model.importer.invalidClass=\uBAA8\uB378 \uBB38\uC11C({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uD074\uB798\uC2A4 \uC774\uB984 \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +model.importer.invalidId=\uBAA8\uB378 \uBB38\uC11C({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C ID \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper\uB294 \uC694\uC18C \uBA64\uBC84\uB97C \uD558\uB098\uB9CC \uAC00\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +model.arraywrapper.member.already.set=LiteralArrayWrapper \uC694\uC18C \uBA64\uBC84\uAC00 \uC774\uBBF8 \uC124\uC815\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +model.arraywrapper.no.parent=LiteralArrayWrapper\uB294 \uC0C1\uC704 \uC720\uD615\uC744 \uAC00\uC9C8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +model.arraywrapper.no.subtypes=LiteralArrayWrapper\uB294 \uD558\uC704 \uC720\uD615\uC744 \uAC00\uC9C8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +model.arraywrapper.no.content.member=LiteralArrayWrapper\uB294 \uCF58\uD150\uCE20 \uBA64\uBC84\uB97C \uAC00\uC9C8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +model.complexType.simpleContent.reservedName=complexType \"{0}\"\uC5D0 \uBD80\uC801\uD569\uD55C \uC18D\uC131 \uC774\uB984 "_value"\uAC00 \uC788\uC2B5\uB2C8\uB2E4. _value\uB294 JAXWS \uC608\uC57D \uC774\uB984\uC785\uB2C8\uB2E4. \uC774 \uC774\uB984\uC740 complexType/simpleContent\uC5D0 \uB300\uD574 \uC0DD\uC131\uB41C javabean \uD074\uB798\uC2A4\uC5D0 \uCF58\uD150\uCE20 \uAC12\uC744 \uBCF4\uAD00\uD558\uAE30 \uC704\uD574 \uC0DD\uC131\uB41C javabean \uD074\uB798\uC2A4\uC5D0\uC11C \uC0DD\uC131\uB429\uB2C8\uB2E4. +model.parameter.notunique.wrapper=Java \uC11C\uBA85 \uC0DD\uC131 \uC2E4\uD328: \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984 \"{0}\"\uC774(\uAC00) \uC911\uBCF5\uB429\uB2C8\uB2E4. \uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC2DC\uB3C4\uD574 \uBCF4\uC2ED\uC2DC\uC624.\n\t1. JAXWS \uBC14\uC778\uB529 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:part \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFC9\uB2C8\uB2E4.\n\t2. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4.\n\t3. \uC774\uB294 \uB798\uD37C \uC2A4\uD0C0\uC77C \uC791\uC5C5\uC785\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984 \uCDA9\uB3CC\uC744 \uD574\uACB0\uD558\uAE30 \uC704\uD574 false WSDL \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB798\uD37C \uC2A4\uD0C0\uC77C\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD574 \uBCFC \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. +model.parameter.notunique=Java \uC11C\uBA85 \uC0DD\uC131 \uC2E4\uD328: \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984 \"{0}\"\uC774(\uAC00) \uC911\uBCF5\uB429\uB2C8\uB2E4. \uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC2DC\uB3C4\uD574 \uBCF4\uC2ED\uC2DC\uC624.\n\t1. JAXWS \uBC14\uC778\uB529 \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 wsdl:part \"{1}\"\uC758 \uC774\uB984\uC744 \uBC14\uAFC9\uB2C8\uB2E4.\n\t2. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD569\uB2C8\uB2E4. + +#JAXWS 2.0 +model.schema.elementNotFound=\"{0}\" \uC694\uC18C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = \uC54C \uC218 \uC5C6\uB294 \uC704\uCE58 + +ConsoleErrorReporter.LineXOfY = \ \ {1}\uC758 {0}\uD589 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties new file mode 100644 index 00000000000..291441e1ecd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_pt_BR.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=erro do modelo: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=tipo de mensagem inv\u00E1lida: {0} + +model.schema.notImplemented=recurso do Esquema XML n\u00E3o suportado ({0}) +model.schema.circularity=circularidade detectada no esquema: \"{0}\" + +model.schema.unsupportedType=tipo n\u00E3o suportado ({0}): \"{1}\" (namespace: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=literal inv\u00E1lida \"{0}\" na enumera\u00E7\u00E3o an\u00F4nima + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=faceta \"{0}\" n\u00E3o suportada no tipo simples: \"{0}\" +model.schema.unionNotSupported=simpleType: \"{0}\" deriva\u00E7\u00E3o de xsd:union n\u00E3o suportada +model.schema.listNotSupported=simpleType: \"{0}\" deriva\u00E7\u00E3o de xsd:list n\u00E3o suportada +model.schema.invalidSimpleType.invalidItemType=no simpleType: \"{0}\", itemType \"{1}\" n\u00E3o pode ser derivado pela lista +model.schema.invalidSimpleType.noItemLiteralType=no simpleType: \"{0}\", xsd:list itemType \"{1}\" \u00E9 inv\u00E1lido +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=o compositor xsd:all n\u00E3o \u00E9 suportado para o curinga no tipo de esquema: \"{0}\" + +model.uniqueness=viola\u00E7\u00E3o de constraint de exclusividade +model.part.notUnique=partes em wsdl:message \\"{0}\\", refer\u00EAncia \\"{1}\\", elas devem fazer refer\u00EAncia aos elementos globais exclusivos. +model.exception.notunique=Falha ao gerar a assinatura Java: nomes da exce\u00E7\u00E3o duplicadas {0}. Use a personaliza\u00E7\u00E3o JAXWS de bind para renomear o wsdl:part \\"{1}\\" +model.uniqueness.javastructuretype=viola\u00E7\u00E3o de constraint de exclusividade, membro \\"{0}\\" duplicado adicionado ao JavaStructureType \\"{1}\\" +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=pai do tipo \"{0}\" j\u00E1 definido como \"{1}\", novo valor = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=exportador de modelo: classe n\u00E3o suportada: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=vers\u00E3o inv\u00E1lida \"{1}\" no documento do modelo (linha {0}) +model.importer.invalidMinorMinorOrPatchVersion=vers\u00E3o do modelo \"{1}\" mais recente que a vers\u00E3o \"{2}\" de runtime (linha {0}): \u00E9 necess\u00E1rio fazer upgrade para um runtime mais recente +model.importer.invalidClass=nome de classe \"{1}\" inv\u00E1lido no documento do modelo (linha {0}) +model.importer.invalidId=id \"{1}\ inv\u00E1lido no documento do modelo (linha {0}) +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper somente pode ter um membro do elemento. +model.arraywrapper.member.already.set=o membro do elemento LiteralArrayWrapper j\u00E1 foi definido. +model.arraywrapper.no.parent=LiteralArrayWrapper n\u00E3o pode ter um tipo pai +model.arraywrapper.no.subtypes=LiteralArrayWrapper n\u00E3o pode ter subtipos +model.arraywrapper.no.content.member=LiteralArrayWrapper n\u00E3o pode ter um membro do conte\u00FAdo +model.complexType.simpleContent.reservedName=nome do atributo inv\u00E1lido: "_value" no complexType: \"{0}\", o _value \u00E9 um nome de JAXWS reservado, este nome \u00E9 gerado na classe javabean gerada para manter o valor de conte\u00FAdo na classe javabean gerada para complexType/simpleContent. +model.parameter.notunique.wrapper=Falha ao gerar a assinatura Java: nome do par\u00E2metro \\"{0}\\" duplicado. Tente uma das seguintes a\u00E7\u00F5es\n\t1. Use personaliza\u00E7\u00E3o de bind de JAXWS para renomear wsdl:part \\"{1}\\"\n\t2. Execute wsimport com a chave -extension.\n\t3. Esta \u00E9 a opera\u00E7\u00E3o de estilo do encapsulador, para resolver o conflito de nome do par\u00E2metro, voc\u00EA tamb\u00E9m pode tentar desativar o estilo do encapsulador usando a personaliza\u00E7\u00E3o false wsdl. +model.parameter.notunique=Falha ao gerar a assinatura Java: nome do par\u00E2metro \"{0}\" duplicado. Tente uma das seguintes op\u00E7\u00F5es\n\t1. Use a personaliza\u00E7\u00E3o de bind de JAXWS para renomear a wsdl:part \"{1}\"\n\t2. Execute wsimport com a chave -extension. + +#JAXWS 2.0 +model.schema.elementNotFound=Elemento \"{0}\" n\u00E3o encontrado. +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = localiza\u00E7\u00E3o desconhecida + +ConsoleErrorReporter.LineXOfY = \ \ linha {0} de {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties new file mode 100644 index 00000000000..bb0d31f7a51 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_CN.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=\u6A21\u578B\u9519\u8BEF: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=\u6D88\u606F\u7C7B\u578B\u65E0\u6548: {0} + +model.schema.notImplemented=\u4E0D\u652F\u6301\u7684 XML \u6A21\u5F0F\u529F\u80FD ({0}) +model.schema.circularity=\u5728\u6A21\u5F0F\u4E2D\u68C0\u6D4B\u5230\u5FAA\u73AF: \"{0}\" + +model.schema.unsupportedType=\u4E0D\u652F\u6301\u7C7B\u578B ({0}): \"{1}\" (\u540D\u79F0\u7A7A\u95F4: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=\u533F\u540D\u679A\u4E3E\u4E2D\u7684\u6587\u5B57 \"{0}\" \u65E0\u6548 + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=\u7B80\u5355\u7C7B\u578B\u4E0D\u652F\u6301\u9762 \"{0}\": \"{0}\" +model.schema.unionNotSupported=\u4E0D\u652F\u6301\u7531 xsd:union \u6D3E\u751F\u7684 simpleType: \"{0}\" +model.schema.listNotSupported=\u4E0D\u652F\u6301\u7531 xsd:list \u6D3E\u751F\u7684 simpleType: \"{0}\" +model.schema.invalidSimpleType.invalidItemType=\u5728 simpleType: \"{0}\" \u4E2D, \u4E0D\u80FD\u7531\u5217\u8868\u6D3E\u751F itemType \"{1}\" +model.schema.invalidSimpleType.noItemLiteralType=\u5728 simpleType: \"{0}\" \u4E2D, xsd:list itemType \"{1}\" \u65E0\u6548 +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=xsd:all \u7EC4\u5408\u5668\u4E0D\u652F\u6301\u6A21\u5F0F\u7C7B\u578B\u4E2D\u7684\u901A\u914D\u7B26: \"{0}\" + +model.uniqueness=\u8FDD\u53CD\u4E86\u552F\u4E00\u6027\u7EA6\u675F\u6761\u4EF6 +model.part.notUnique=wsdl:message \"{0}\", \u5F15\u7528 \"{1}\" \u4E2D\u7684\u90E8\u5206\u5FC5\u987B\u5F15\u7528\u552F\u4E00\u7684\u5168\u5C40\u5143\u7D20\u3002 +model.exception.notunique=\u65E0\u6CD5\u751F\u6210 Java \u7B7E\u540D: \u5F02\u5E38\u9519\u8BEF\u540D\u79F0{0}\u91CD\u590D\u3002\u8BF7\u4F7F\u7528 JAXWS \u7ED1\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:part \"{1}\" +model.uniqueness.javastructuretype=\u8FDD\u53CD\u4E86\u552F\u4E00\u6027\u7EA6\u675F\u6761\u4EF6, \u6DFB\u52A0\u5230 JavaStructureType \"{1}\" \u7684\u6210\u5458 \"{0}\" \u91CD\u590D +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=\u7C7B\u578B \"{0}\" \u7684\u7236\u7EA7\u5DF2\u8BBE\u7F6E\u4E3A \"{1}\", \u65B0\u503C = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=\u6A21\u578B\u5BFC\u51FA\u7A0B\u5E8F: \u4E0D\u652F\u6301\u7684\u7C7B: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=\u6A21\u578B\u6587\u6863\u4E2D\u7684\u7248\u672C \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C) +model.importer.invalidMinorMinorOrPatchVersion=\u6A21\u578B\u7248\u672C \"{1}\" \u6BD4\u8FD0\u884C\u65F6\u7248\u672C \"{2}\" \u66F4\u65B0 (\u7B2C {0} \u884C): \u9700\u8981\u5347\u7EA7\u5230\u66F4\u65B0\u7684\u8FD0\u884C\u65F6 +model.importer.invalidClass=\u6A21\u578B\u6587\u6863\u4E2D\u7684\u7C7B\u540D \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C) +model.importer.invalidId=\u6A21\u578B\u6587\u6863\u4E2D\u7684 ID \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C) +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper \u53EA\u80FD\u6709\u4E00\u4E2A\u5143\u7D20\u6210\u5458\u3002 +model.arraywrapper.member.already.set=LiteralArrayWrapper \u5143\u7D20\u6210\u5458\u5DF2\u8BBE\u7F6E\u3002 +model.arraywrapper.no.parent=LiteralArrayWrapper \u4E0D\u80FD\u6709\u7236\u7C7B\u578B +model.arraywrapper.no.subtypes=LiteralArrayWrapper \u4E0D\u80FD\u6709\u5B50\u7C7B\u578B +model.arraywrapper.no.content.member=LiteralArrayWrapper \u4E0D\u80FD\u6709\u5185\u5BB9\u6210\u5458 +model.complexType.simpleContent.reservedName=complexType \"{0}\" \u4E2D\u7684\u5C5E\u6027\u540D "_value" \u65E0\u6548, _value \u662F JAXWS \u4FDD\u7559\u540D\u79F0, \u5C06\u5728\u751F\u6210\u7684 javabean \u7C7B\u4E2D\u751F\u6210\u6B64\u540D\u79F0, \u4EE5\u4FBF\u5728\u4E3A complexType/simpleContent \u751F\u6210\u7684 javabean \u7C7B\u4E2D\u4FDD\u5B58\u5185\u5BB9\u503C\u3002 +model.parameter.notunique.wrapper=\u65E0\u6CD5\u751F\u6210 Java \u7B7E\u540D: \u53C2\u6570\u540D \"{0}\" \u91CD\u590D\u3002\u8BF7\u5C1D\u8BD5\u4EE5\u4E0B\u64CD\u4F5C\u4E4B\u4E00\n\t1. \u4F7F\u7528 JAXWS \u7ED1\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:part \"{1}\"\n\t2. \u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002\n\t3. \u8FD9\u662F\u5305\u88C5\u6837\u5F0F\u64CD\u4F5C, \u7528\u4E8E\u89E3\u51B3\u53C2\u6570\u540D\u51B2\u7A81, \u4E5F\u53EF\u4EE5\u5C1D\u8BD5\u4F7F\u7528 false wsdl \u5B9A\u5236\u8BBE\u7F6E\u6765\u7981\u7528\u5305\u88C5\u6837\u5F0F\u3002 +model.parameter.notunique=\u65E0\u6CD5\u751F\u6210 Java \u7B7E\u540D: \u53C2\u6570\u540D \"{0}\" \u91CD\u590D\u3002\u8BF7\u5C1D\u8BD5\u4EE5\u4E0B\u64CD\u4F5C\u4E4B\u4E00\n\t1. \u4F7F\u7528 JAXWS \u7ED1\u5B9A\u5B9A\u5236\u8BBE\u7F6E\u91CD\u547D\u540D wsdl:part \"{1}\"\n\t2. \u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002 + +#JAXWS 2.0 +model.schema.elementNotFound=\u672A\u627E\u5230\u5143\u7D20 \"{0}\"\u3002 +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = \u672A\u77E5\u4F4D\u7F6E + +ConsoleErrorReporter.LineXOfY = \ \ {1}\u7684\u7B2C {0} \u884C diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties new file mode 100644 index 00000000000..84cc1170858 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/model_zh_TW.properties @@ -0,0 +1,110 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + + +model.nestedModelError=\u6A21\u578B\u932F\u8AA4: {0} +# Usage not found. TODO Remove +#model.duplicate.porttype=duplicate PortType added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.operation=duplicate Operation added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.faultmessage=duplicate fault message added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.part=duplicate part added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.property=duplicate property added to model: {0} +# Usage not found. TODO Remove +#model.duplicate.service=duplicate service added to model: {0} +model.invalid.message.type=\u7121\u6548\u7684\u8A0A\u606F\u985E\u578B: {0} + +model.schema.notImplemented=\u4E0D\u652F\u63F4\u7684 XML \u7DB1\u8981\u529F\u80FD ({0}) +model.schema.circularity=\u5728\u7DB1\u8981\u4E2D\u5075\u6E2C\u5230\u5FAA\u74B0: \"{0}\" + +model.schema.unsupportedType=\u4E0D\u652F\u63F4\u7684\u985E\u578B ({0}): \"{1}\" (\u547D\u540D\u7A7A\u9593: {2}) +# Usage not found. TODO Remove +#model.schema.unsupportedType.anonymous=unsupported anonymous type ({0}) +# Usage not found. TODO Remove +#model.schema.invalidLiteralInEnumeration=invalid literal \"{0}\" in enumeration \"{1}\" (namespace: {2}) +model.schema.invalidLiteralInEnumeration.anonymous=\u533F\u540D\u5217\u8209\u4E2D\u6709\u7121\u6548\u7684\u6587\u5B57 \"{0}\" + +# Usage not found. TODO Remove +#model.schema.notImplemented.generatingSOAPElement=unsupported XML Schema feature: \"{0}\" in component {1}, mapping it to javax.xml.soap.SOAPElement + +//replacement for Uxxx codes +# Usage not found. TODO Remove +#model.schema.unsupportedSchemaType=unsupported schema type: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType=invalid simpleType: \"{0}\" +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noJavaType=no java mapping for simpleType: \"{0}\" +model.schema.simpleTypeWithFacets=\u7C21\u55AE\u985E\u578B: \"{0}\" \u4E0D\u652F\u63F4 Facet \"{0}\" +model.schema.unionNotSupported=\u4E0D\u652F\u63F4 xsd:union \u884D\u751F\u7684 simpleType: \\"{0}\\" +model.schema.listNotSupported=\u4E0D\u652F\u63F4 xsd:list \u884D\u751F\u7684 simpleType: \\"{0}\\" +model.schema.invalidSimpleType.invalidItemType=\u5728 simpleType: \\"{0}\\" \u4E2D, \u7121\u6CD5\u4EE5 list \u884D\u751F itemType \\"{1}\\" +model.schema.invalidSimpleType.noItemLiteralType=\u5728 simpleType: \"{0}\" \u4E2D, xsd:list itemType \"{1}\" \u7121\u6548 +# Usage not found. TODO Remove +#model.schema.invalidSimpleType.noNamespaceURI=invalid simpleType: \"{0}\", had null namespaceURI +# Usage not found. TODO Remove +#model.schema.encoderNotFound=no encoder found for simpleType: \"{0}\" +model.schema.invalidWildcard.allCompositor=\u7DB1\u8981\u985E\u578B: \"{0}\" \u4E2D\u7684\u842C\u7528\u5B57\u5143\u4E0D\u652F\u63F4 xsd:all \u5408\u6210\u5668 + +model.uniqueness=\u9055\u53CD\u552F\u4E00\u6027\u9650\u5236\u689D\u4EF6 +model.part.notUnique=wsdl:message \\"{0}\\"\u3001\u53C3\u7167 \\"{1}\\" \u4E2D\u7684\u67D0\u4E9B\u90E8\u5206, \u5FC5\u9808\u53C3\u7167\u552F\u4E00\u7684\u5168\u57DF\u5143\u7D20. +model.exception.notunique=\u7121\u6CD5\u7522\u751F Java \u7C3D\u7AE0: \u7570\u5E38\u72C0\u6CC1\u540D\u7A31 {0} \u91CD\u8907. \u8ACB\u4F7F\u7528 JAXWS \u9023\u7D50\u81EA\u8A02\u9805\u76EE, \u5C07 wsdl:part \\"{1}\\" \u91CD\u65B0\u547D\u540D +model.uniqueness.javastructuretype=\u9055\u53CD\u552F\u4E00\u6027\u9650\u5236\u689D\u4EF6, \u91CD\u8907\u7684\u6210\u54E1 \\"{0}\\" \u65B0\u589E\u5230 JavaStructureType \\"{1}\\" +# Wrapped into an Exception. Not concatenated with any other string. +model.parent.type.already.set=\u985E\u578B \"{0}\" \u7684\u7236\u9805\u5DF2\u7D93\u8A2D\u5B9A\u6210 \"{1}\", \u65B0\u503C = \"{2}\" +# Usage not found. TODO Remove +#model.parent.fault.already.set=parent of fault \"{0}\" already set to \"{1}\", new value = \"{2}\" +model.exporter.unsupportedClass=\u6A21\u578B\u532F\u51FA: \u4E0D\u652F\u63F4\u7684\u985E\u5225: {0} +# Usage not found. TODO Remove +#model.importer.nonModel=not a valid model document +# Usage not found. TODO Remove +#model.importer.syntaxError=syntax error in model document (line {0}) +model.importer.invalidVersion=\u6A21\u578B\u6587\u4EF6 (\u884C {0}) \u4E2D\u7684\u7248\u672C \"{1}\" \u7121\u6548 +model.importer.invalidMinorMinorOrPatchVersion=\u6A21\u578B\u7248\u672C \"{1}\" \u6BD4\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u7248\u672C \"{2}\" \u66F4\u65B0 (\u884C {0}): \u5FC5\u9808\u5347\u7D1A\u81F3\u8F03\u65B0\u7684\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C +model.importer.invalidClass=\u6A21\u578B\u6587\u4EF6 (\u884C {0}) \u4E2D\u7684\u985E\u5225\u540D\u7A31 \"{1}\" \u7121\u6548 +model.importer.invalidId=\u6A21\u578B\u6587\u4EF6 (\u884C {0}) \u4E2D\u7684 ID \"{1}\ \u7121\u6548 +# Usage not found. TODO Remove +#model.importer.invalidLiteral=invalid literal value in model document (line {0}) +# Usage not found. TODO Remove +#model.importer.invalidProperty=invalid property in model document (line {0}) +model.arraywrapper.only.one.member=LiteralArrayWrapper \u53EA\u80FD\u6709\u4E00\u500B\u5143\u7D20\u6210\u54E1. +model.arraywrapper.member.already.set=\u5DF2\u7D93\u8A2D\u5B9A LiteralArrayWrapper \u5143\u7D20\u6210\u54E1. +model.arraywrapper.no.parent=LiteralArrayWrapper \u4E0D\u53EF\u4EE5\u6709\u4E00\u500B\u7236\u9805\u985E\u578B +model.arraywrapper.no.subtypes=LiteralArrayWrapper \u4E0D\u53EF\u4EE5\u6709\u5B50\u985E\u578B +model.arraywrapper.no.content.member=LiteralArrayWrapper \u4E0D\u53EF\u4EE5\u6709\u5167\u5BB9\u6210\u54E1 +model.complexType.simpleContent.reservedName=complexType: \\"{0}\\" \u4E2D\u7684\u5C6C\u6027\u540D\u7A31: "_value" \u7121\u6548, _value \u662F JAXWS \u4FDD\u7559\u540D\u7A31, \u6B64\u540D\u7A31\u6703\u5728\u7522\u751F\u7684 JavaBean \u985E\u5225\u4E2D\u7522\u751F, \u7528\u65BC\u4FDD\u7559\u91DD\u5C0D complexType/simpleContent \u7522\u751F\u4E4B JavaBean \u985E\u5225\u4E2D\u7684\u5167\u5BB9\u503C. +model.parameter.notunique.wrapper=\u7121\u6CD5\u7522\u751F Java \u7C3D\u7AE0: \u53C3\u6578\u540D\u7A31 \"{0}\" \u91CD\u8907. \u8ACB\u5617\u8A66\u4E0B\u5217\u5176\u4E2D\u4E00\u9805\u52D5\u4F5C\n\t1. \u4F7F\u7528 JAXWS \u9023\u7D50\u81EA\u8A02\u9805\u76EE\u4F86\u91CD\u65B0\u547D\u540D wsdl:part \"{1}\"\n\t2. \u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport.\n\t3. \u6B64\u70BA\u5305\u88DD\u51FD\u5F0F\u6A23\u5F0F\u4F5C\u696D, \u53EF\u89E3\u6C7A\u53C3\u6578\u540D\u7A31\u885D\u7A81, \u60A8\u4E5F\u53EF\u4F7F\u7528 false wsdl \u81EA\u8A02\u9805\u76EE\u5617\u8A66\u505C\u7528\u5305\u88DD\u51FD\u5F0F. +model.parameter.notunique=\u7121\u6CD5\u7522\u751F Java \u7C3D\u7AE0: \u53C3\u6578\u540D\u7A31 \"{0}\" \u91CD\u8907. \u8ACB\u5617\u8A66\u4E0B\u5217\u5176\u4E2D\u4E00\u9805\u52D5\u4F5C\n\t1. \u4F7F\u7528 JAXWS \u9023\u7D50\u81EA\u8A02\u9805\u76EE\u4F86\u91CD\u65B0\u547D\u540D wsdl:part \"{1}\"\n\t2. \u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport. + +#JAXWS 2.0 +model.schema.elementNotFound=\u627E\u4E0D\u5230\u5143\u7D20 \"{0}\". +model.schema.jaxbException.message="{0}" +model.saxparser.exception:{0}\n{1} + +ConsoleErrorReporter.UnknownLocation = \u4E0D\u660E\u7684\u4F4D\u7F6E + +ConsoleErrorReporter.LineXOfY = \ \ {1} \u7684\u7B2C {0} \u884C diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties index 155485a35d2..497c906a736 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -106,6 +106,8 @@ wsdlmodeler.invalid.doclitoperation=Invalid wsdl:operation \"{0}\": its a docume wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=ignoring operation \"{0}\": message part does not refer to a schema type declaration wsdlmodeler.invalid.rpclitoperation=Invalid wsdl:operation \"{0}\": its a rpc-literal operation, message part must refer to a schema type declaration +wsdlmodeler.invalid.ignoringMemberSubmissionAddressing=ignoring wsa:Action attribute since obsolete addressing version 08-2004:\"{0}\" used; expecting addressing version \"{1}\". To use version 08-2004 anyway run wsimport with -extension switch. +wsdlmodeler.warning.memberSubmissionAddressingUsed=obsolete addressing version 08-2004:\"{0}\" used; version \"{1}\" should be used instead. wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=ignoring operation \"{0}\": cannot handle document-style operations wsdlmodeler.warning.bindingOperation.multiplePartBinding=Check the abstract operation \"{0}\" binding, part \"{1}\" has multiple binding. Will try to generated artifacts anyway... diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties new file mode 100644 index 00000000000..4f4b178ad96 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_de.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=Modeler-Fehler: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=Ung\u00FCltiger Vorgang: {0} +wsdlmodeler.invalidState.modelingOperation=Ung\u00FCltiger Status beim Modellieren des Vorgangs: {0} +wsdlmodeler.resultIsInOutParameter=Ergebnis ist der \"inout\"-Parameter in Vorgang: {0} +wsdlmodeler.invalid.parameterorder.parameter=\\"{0}\\" wurde in dem parameterOrder-Attribut von Vorgang \\"{1}\\" angegeben und ist kein g\u00FCltiger Teil der Nachricht. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=Mehr als ein Teil wurde im parameterOrder-Attribut von Vorgang \"{0}\" ausgelassen +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=parameterOrder-Attribut f\u00FCr Vorgang \\"{0}\\" ist ung\u00FCltig, parameterOrder-Hinweis wird ignoriert +wsdlmodeler.invalid.parameter.differentTypes=Parameter \"{0}\" von Vorgang \"{1}\" wird mit unterschiedlichen Typen in Eingangs- und Ausgangsnachrichten angezeigt +wsdlmodeler.invalid.bindingOperation.notInPortType=In Binding \"{1}\" wird Vorgang \"{0}\" nicht im entsprechenden Porttyp angezeigt +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=Eingangsnachricht des Binding-Vorgangs \"{0}\" hat keine SOAP-Inhaltserweiterung +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=Ausgangsnachricht des Binding-Vorgangs \"{0}\" hat keine SOAP-Inhaltserweiterung +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=Binding-Vorgang \"{0}\" muss einen Namen f\u00FCr die Eingabemeldung angeben +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=Binding-Vorgang \"{0}\" muss einen Namen f\u00FCr die Ausgabemeldung angeben +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=In Binding \\"{1}\\" referenziert Vorgang \\"{0}\\" keinen eindeutigen Vorgang im entsprechenden Porttyp +wsdlmodeler.invalid.bindingOperation.notFound=In Binding \\"{1}\\" stimmt Vorgang \\"{0}\\" mit keinem Vorgang im entsprechenden Porttyp \u00FCberein +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=Eingangsnachricht des Binding-Vorgangs \"{0}\" muss einen Wert f\u00FCr das \"namespace\"-Attribut angeben +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=Ausgangsnachricht des Binding-Vorgangs \"{0}\" muss einen Wert f\u00FCr das \"namespace\"-Attribut angeben +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=Eingabe-Header "{1}" des Binding-Vorgangs \\"{0}\\" muss einen Wert f\u00FCr das \\"namespace\\"-Attribut angeben +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=Ausgabe-Header "{1}" des Binding-Vorgangs \\"{0}\\" muss einen Wert f\u00FCr das \\"namespace\\"-Attribut angeben +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=Fault \"{0}\" in Vorgang \"{1}\" stimmt im entsprechenden Porttypvorgang mit mehr als einem Fault \u00FCberein +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=Fault \"{0}\" in Vorgang \"{1}\" stimmt im entsprechenden Porttypvorgang mit keinem Fault \u00FCberein +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=Fault \\"{0}\\" in portType-Vorgang \\"{1}\\" stimmt im entsprechenden Binding-Vorgang mit keinem Fault \u00FCberein +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=Fault \"{0}\" in Vorgang \"{1}\" hat keine SOAP-Fault-Erweiterung +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=Fault \\"{0}\\" in Vorgang \\"{1}\\" muss einen Wert f\u00FCr das \\"name\\"-Attribut angeben +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=Fault \\"{0}\\" in Vorgang \\"{1}\\" muss einen Wert f\u00FCr das \\"namespace\\"-Attribut angeben +wsdlmodeler.invalid.bindingFault.emptyMessage=Fault \"{0}\" referenziert Nachricht \"{1}\", die Nachricht hat aber keine Teile +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=Fault \"{0}\" referenziert Nachricht \"{1}\", die Nachricht hat aber mehr als ein Teil +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=In Nachricht \\"{0}\\" muss Teil \\"{1}\\" ein \\"element\\"-Attribut angeben +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=die folgenden Benennungskonflikte sind aufgetreten: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=Schemaelement wird ignoriert (nicht unterst\u00FCtzte Version): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes={0} unbekannte Typen wurden ermittelt +wsdlmodeler.warning.noServiceDefinitionsFound=WSDL-Dokument definiert keine Services +wsdlmodeler.warning.noPortsInService=Service \"{0}\" enth\u00E4lt keine verwendbaren Ports. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren. +wsdlmodeler.warning.noOperationsInPort=Port \"{0}\" enth\u00E4lt keine verwendbaren Vorg\u00E4nge +wsdlmodeler.warning.ignoringNonSOAPPort=Port \\"{0}\\" wird ignoriert: Kein Standard-SOAP-Port. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=Port \\"{0}\\": Kein Standard-SOAP-Port. Die generierten Artefakte k\u00F6nnen m\u00F6glicherweise nicht mit der JAX-WS-Laufzeitumgebung ausgef\u00FChrt werden. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=Port \\"{0}\\" wird ignoriert: Keine SOAP-Adresse angegeben. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=Port \\"{0}\\" ist kein SOAP-Port, er enth\u00E4lt keine soap:address +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:SOAP-Port \\"{0}\\" wird ignoriert: Unbekannter Transport. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=Port \\"{0}\\" wird ignoriert, er ist nicht mit WS-I BP 1.1 konform: Das WSDL-Binding hat einen gemischten Stil. Es muss ein rpc-literal- oder document-literal-Vorgang sein. Versuchen Sie, wsimport mit dem Switch "-extension" auszuf\u00FChren. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=kein mit WS-I BP1.1 konformer SOAP-Port \\"{0}\\": Das WSDL-Binding hat einen gemischten Stil. Es muss ein rpc-literal- oder document-literal-Vorgang sein. + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=Vorgang \"{0}\" wird ignoriert: keine Anforderungsantwort oder unidirektionaler Vorgang +wsdlmodeler.invalid.operation.notSupportedStyle=Ung\u00FCltige WSDL, wsdl:operation \\"{0}\\" in wsdl:portType \\"{1}\\": Keine request-response oder unidirektional +wsdlmodeler.warning.ignoringOperation.notEncoded=RPC-konformer Vorgang \"{0}\" wird ignoriert: Parameter sind nicht codiert +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=Vorgang \\"{0}\\" wird ignoriert: \\"parts\\"-Attribut von \\"soap:body\\"-Element kann nicht bearbeitet werden + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=Vorgang \"{0}\" wird ignoriert: Nachrichtenteil referenziert keine Schemaelementdeklaration +wsdlmodeler.invalid.doclitoperation=Ung\u00FCltiger wsdl:-Vorgang \\"{0}\\": Es handelt sich um einen document-literal-Vorgang, der Nachrichtenteil muss jedoch eine Schemaelementdeklaration referenzieren + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=Vorgang \\"{0}\\" wird ignoriert: Nachrichtenteil referenziert keine Schematypdeklaration +wsdlmodeler.invalid.rpclitoperation=Ung\u00FCltiger wsdl:-Vorgang \\"{0}\\": Es handelt sich um einen rpc-literal-Vorgang, der Nachrichtenteil muss jedoch eine Schematypdeklaration referenzieren + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=Vorgang \\"{0}\\" wird ignoriert: document-style-Vorg\u00E4nge k\u00F6nnen nicht verarbeitet werden +wsdlmodeler.warning.bindingOperation.multiplePartBinding=Pr\u00FCfen Sie den abstrakten Vorgang \"{0}\" Binding, Teil \"{1}\" hat mehrere Bindings. Es wird dennoch versucht, Artefakte zu generieren ... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=abstrakter Vorgang \"{0}\" Binding, Teil \"{1}\" hat mehrere Bindings. +wsdlmodeler.warning.ignoringFaults=Von Vorgang \\"{0}\\" deklarierte Faults werden ignoriert +wsdlmodeler.warning.ignoringFault.notEncoded=Literal-Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert +wsdlmodeler.warning.ignoringFault.notLiteral=Codierter Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert +wsdlmodeler.invalid.operation.fault.notLiteral=Codierter Fault \\"{0}\\" in literalem Binding-Vorgang \\"{1}\\" wird ignoriert +wsdlmodeler.warning.ignoringHeader=Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert +wsdlmodeler.warning.ignoringHeader.partFromBody=Header-Teil: \\"{0}\\" ist bereits durch soapbind:body gebunden, der Teil kann nicht zweimal gebunden werden +wsdlmodeler.warning.ignoringHeader.notLiteral=Header \"{0}\" des Binding-Vorgangs \"{1}\" wird ignoriert: Nicht literal +wsdlmodeler.invalid.header.notLiteral=Ung\u00FCltiger Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\": Nicht literal +wsdlmodeler.warning.ignoringHeader.notFound=Header \"{0}\" des Binding-Vorgangs \"{1}\" wird ignoriert: Nicht gefunden +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=Header \"{0}\" des Binding-Vorgangs \"{1}\" nicht gefunden +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert: Nachricht kann nicht aufgel\u00F6st werden +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=Header \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert: Nachricht kann nicht aufgel\u00F6st werden + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\" wird ignoriert: Nachricht kann nicht aufgel\u00F6st werden +wsdlmodeler.invalid.fault.cant.resolve.message=Fault-Nachricht \\"{0}\\" in Binding-Vorgang \\"{1}\\" konnte nicht aufgel\u00F6st werden + +wsdlmodeler.warning.ignoringHeader.notEncoded=Header \"{0}\" des Binding-Vorgangs \"{1}\" wird ignoriert: Nicht SOAP-codiert +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=Header \"{0}\" des Vorgangs \"{1}\" wird ignoriert: Teil nicht gefunden +# +wsdlmodeler.warning.ignoringOperation.notLiteral=Dokumentkonformer Vorgang \"{0}\" wird ignoriert: Parameter sind keine Literale +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=Vorgang \\"{0}\\" wird ignoriert: mehr als ein Teil in Eingabenachricht +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=Vorgang \"{0}\" wird ignoriert: Eingabenachricht ist leer +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=Vorgang \\"{0}\\" wird ignoriert: mehr als ein Teil in Ausgabenachricht +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Vorgang \\"{0}\\" wird ignoriert: mehr als ein Teil an Nachrichtentext gebunden +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=Vorgang \\"{0}\\": mehr als ein Teil an Nachrichtentext gebunden +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=Vorgang \"{0}\" wird ignoriert: Ausgabenachricht ist leer +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=Vorgang \"{0}\" wird ignoriert: Binding-Stil und Vorgangsstil stimmen nicht \u00FCberein +wsdlmodeler.warning.ignoringOperation.partNotFound=Vorgang \"{0}\" wird ignoriert: Teil \"{1}\" nicht gefunden +wsdlmodeler.error.partNotFound=Teil \"{1}\" des Vorgangs \"{0}\" konnte nicht aufgel\u00F6st werden. +wsdlmodeler.warning.ignoringFault.documentOperation=Fault \\"{0}\\" des document-style-Vorgangs \\"{1}\\" wird ignoriert +wsdlmodler.warning.operation.use=Die verwendete WSDL-Datei hat Vorg\u00E4nge mit Literalen und codierter Verwendung. -f:searchschema wird f\u00FCr dieses Szenario nicht unterst\u00FCtzt. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=Name von soap:fault \\"{0}\\" stimmt nicht mit Name von wsdl:fault \\"{1}\\" in Vorgang \\"{2}\\" \u00FCberein +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault-Name nicht angegeben, wsdl:fault \\"{0}\\" in Vorgang \\"{1}\\" + +wsdlmodeler.duplicate.fault.part.name=Fault \"{0}\" von Vorgang \"{1}\" wird ignoriert. Teilname \"{2}\" ist nicht eindeutig +wsdlmodeler.duplicate.fault.soap.name=Fault \"{0}\" von Vorgang \"{1}\" wird ignoriert. soap:fault-Name \"{2}\" ist nicht eindeutig + +wsdlmodeler.warning.ignoringHeaderFault.notFound=Header Fault \"{0}\" wird ignoriert, Teil \"{1}\" kann in Binding \"{2}\" nicht gefunden werden +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=Header Fault-Teil=\\"{0}\\" Nachricht=\\"{1}\\" von Vorgang {2} wird ignoriert, use-Attribut muss \\"literal\\" sein + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=Header Fault-Teil=\"{0}\" Nachricht=\"{1}\" von Vorgang {2} wird ignoriert + +wsdlmodeler.invalid.headerfault.notLiteral=Ung\u00FCltiger Header Fault \\"{0}\\" des Binding-Vorgangs \\"{1}\\": Nicht literal +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Ung\u00FCltiger Header Fault \\"{0}\\" f\u00FCr Header {1} in Vorgang {2}: Teil muss ein \\"element\\"-Attribut angeben +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Ung\u00FCltiger Header \"{0}\" in Vorgang {1}: Teil muss ein \"element\"-Attribut angeben + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=Nicht konformes WS-I-WSDL f\u00FCr wsdl:import verwendet +wsdlmodeler.warning.nonconforming.wsdl.types=Nicht konformes WS-I-WSDL f\u00FCr wsdl:types verwendet +wsdlmodeler.warning.nonconforming.wsdl.use=Nicht konformer WS-I-Vorgang \\"{0}\\" wird mit RPC und SOAP-codiert verarbeitet + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=Teil \"{0}\" wurde in Nachricht \"{1}\" nicht gefunden, falsche WSDL + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=SOAP-Port \\"{0}\\": Verwendet ein Nicht-Standard-SOAP 1.2-Binding. +wsdlmodeler.warning.ignoringSOAPBinding12=SOAP-Port \"{0}\" wird ignoriert: Er verwendet Nicht-Standard-SOAP 1.2-Binding.\nSie m\u00FCssen die Option \"-extension\" angeben, um dieses Binding zu verwenden. + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile Version 1.0, Namespace-Attribut nicht zul\u00E4ssig in doc/lit f\u00FCr {0}: \\"{1}\\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile Version 1.0, Namespace-Attribut nicht zul\u00E4ssig in doc/lit oder rpc/lit f\u00FCr {0}: \\"{1}\\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=Vorgang \\"{0}\\" wird ignoriert. Die Multipart/Related-Struktur enth\u00E4lt einen ung\u00FCltigen Root Part: mehr als ein soap:body Part gefunden + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Header nicht in Root mime:part mit soap:body, Header in Vorgang \\"{0}\\" werden ignoriert + +# R2909 +mimemodeler.invalidMimeContent.differentPart=Mime:part wird ignoriert. mime:part ung\u00FCltig, mime:content enth\u00E4lt anderes Part-Attribut. + +mimemodeler.invalidMimeContent.invalidSchemaType=Mime:part wird ignoriert. MIME-Part: {0} kann Schematyp nicht zugeordnet werden: {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part-Element, das von mime:content Part-Attribut referenziert wird: {0} muss mit type-Attribut definiert werden. + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=Vorgang \\"{0}\\" wird ignoriert, Part-Attribut in mime:content fehlt. Part-Attribut muss in mime:content-Deklaration vorhanden sein. + +mimemodeler.invalidMimeContent.missingTypeAttribute=Type-Attribut fehlt in mime:content in Vorgang \"{0}\". Part-Attribut muss in mime:content-Deklaration vorhanden sein. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=Unbekannter Schematyp: {1} f\u00FCr mime:content Part: {0} +mimemodeler.invalidMimeContent.errorLoadingJavaClass=Klasse \\"{0}\\" f\u00FCr MIME-Typ \\"{1}\\" konnte nicht gefunden werden + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=Mime:part wird ignoriert, Part-Element \\"{0}\\", das von mime:content im WSDL-Vorgang \\"{1}\\" referenziert wird, kann nicht gefunden werden + +mimemodeler.elementPart.invalidElementMimeType=Das mime:content-Part-Element bezieht sich auf wsdl:part \\"{0}\\", das mit element-Attribut definiert wird. Stellen Sie sicher, dass der MIME-Typ: \\"{1}\\" zur Serialisierung von XML geeignet ist. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=Name-Attribut in wsdl:part in Vorgang \"{0}\" wird ignoriert. Es ist gem\u00E4\u00DF WS-I AP 1.0 nicht zul\u00E4ssig. + + +wsdlmodeler20.rpcenc.not.supported=RPC-/codierte WSDLs werden in JAXWS 2.0 nicht unterst\u00FCtzt. +wsdlmodeler.warning.ignoringOperation.notNCName=Vorgang \\"{0}\\" wird ignoriert, sein Name enth\u00E4lt ein ung\u00FCltiges Zeichen ''{1}''. Es handelt sich um einen rpc-literal-Vorgang - jaxws kann diesen nicht serialisieren. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Vorgang \\"{0}\\" wird ignoriert, Java-Methode kann nicht generiert werden. Parameter: part "{2}\\" in wsdl:message \\"{1}\\", ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern, oder \u00E4ndern Sie den wsdl:part-Namen. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Ung\u00FCltiger Vorgang \\"{0}\\", Java-Methode kann nicht generiert werden. Parameter: part "{2}\\" in wsdl:message \\"{1}\\", ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern, oder \u00E4ndern Sie den wsdl:part-Namen. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Vorgang \\"{0}\\" wird ignoriert, Java-Methodenparameter kann nicht generiert werden. Lokaler Name des untergeordneten Elements des Wrappers \\"{1}\\" im globalen Element \\"{2}\\" ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Ung\u00FCltiger Vorgang \\"{0}\\", Java-Methodenparameter kann nicht generiert werden. Lokaler Name des untergeordneten Elements des Wrappers \\"{1}\\" im globalen Element \\"{2}\\" ist ein Java-Schl\u00FCsselwort. Verwenden Sie die Anpassung, um den Parameternamen zu \u00E4ndern. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Vorgang \"{0}\" wird ignoriert, Java-Methode kann nicht generiert werden. Parameter, angepasster Name \"{1}\" ist ein Java-Schl\u00FCsselwort. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Ung\u00FCltiger Vorgang \"{0}\", Java-Methode kann nicht generiert werden. Parameter, angepasster Name \"{1}\" ist ein Java-Schl\u00FCsselwort. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Vorgang \"{0}\" wird ignoriert, er ist ein reserviertes Java-Wort, Java-Methode kann nicht generiert werden. Verwenden Sie die Anpassung, um den Vorgangsnamen zu \u00E4ndern. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Ung\u00FCltiger Vorgang \"{0}\", er ist ein reserviertes Java-Wort, Java-Methode kann nicht generiert werden. Verwenden Sie die Anpassung, um den Vorgangsnamen zu \u00E4ndern. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Vorgang \\"{0}\\" wird ignoriert, Java-Methode kann nicht generiert werden, angepasster Name \\"{1}\\" von wsdl:operation ist ein Java-Schl\u00FCsselwort. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Ung\u00FCltiger Vorgang \\"{0}\\", Java-Methode kann nicht generiert werden, angepasster Name \\"{1}\\" von wsdl:operation ist ein Java-Schl\u00FCsselwort. + +wsdlmodeler.jaxb.javatype.notfound=Schemabeschreibung {0} in Nachrichtenteil \\"{1}\\" ist nicht definiert und konnte nicht an Java gebunden werden. M\u00F6glicherweise ist der Schemadeskriptor {0} nicht in dem Schema definiert, das in WSDL importiert/einbezogen wurde. Sie k\u00F6nnen diese Importe/Includes entweder hinzuf\u00FCgen oder wsimport ausf\u00FChren und das Schemaverzeichnis mit dem Switch "-b" angeben. +wsdlmodeler.unsupportedBinding.mime=WSDL-MIME-Binding wird aktuell nicht unterst\u00FCtzt. + +wsdlmodeler.nonUnique.body.error=Keine eindeutigen Nachrichtentextteile. Gem\u00E4\u00DF BP 1.1 R2710 m\u00FCssen Vorg\u00E4nge in einem Port eine eindeutige Vorgangssignatur bei dem Transport enthalten, um eine erfolgreiche \u00DCbertragung zu gew\u00E4hrleisten. In Port {0} haben die Vorg\u00E4nge \\"{1}\\" und \\"{2}\\" denselben Anforderungsnachrichtentextblock {3}. Versuchen Sie, wsimport mit -extension Switch auszuf\u00FChren, die Laufzeitumgebung wird versuchen, die \u00DCbertragung mit SOAPAction vorzunehmen +wsdlmodeler.nonUnique.body.warning=Keine eindeutigen Nachrichtentextteile. Gem\u00E4\u00DF BP 1.1 R2710 m\u00FCssen Vorg\u00E4nge in einem Port eine eindeutige Vorgangssignatur bei dem Transport enthalten, um eine erfolgreiche \u00DCbertragung zu gew\u00E4hrleisten. In Port {0} haben die Vorg\u00E4nge \\"{1}\\" und \\"{2}\\" denselben Anforderungsnachrichtentextblock {3}. Die Methode kann m\u00F6glicherweise nicht gesendet werden, die Laufzeitumgebung wird versuchen, die \u00DCbertragung mit SOAPAction vorzunehmen + +wsdlmodeler.rpclit.unkownschematype=XML-Typ \\"{0}\\" konnte nicht aufgel\u00F6st werden, Binding von XML mit JAVA war nicht erfolgreich. Pr\u00FCfen Sie wsdl:part \\"{1}\\" in wsdl:message \\"{2}\\". + +wsdlmodeler.responsebean.notfound=Wsimport konnte kein asynchrones Antwort-Bean f\u00FCr Vorgang {0} generieren diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties new file mode 100644 index 00000000000..31b0d9cd838 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_es.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=error de modelador: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=operaci\u00F3n no v\u00E1lida: {0} +wsdlmodeler.invalidState.modelingOperation=estado no v\u00E1lido al modelar la operaci\u00F3n: {0} +wsdlmodeler.resultIsInOutParameter=el resultado es el par\u00E1metro \"inout\" en la operaci\u00F3n: {0} +wsdlmodeler.invalid.parameterorder.parameter=\\"{0}\\" especificado en el atributo parameterOrder de la operaci\u00F3n \\"{1}\\" no es una parte v\u00E1lida del mensaje. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=se ha dejado m\u00E1s de una parte en el atributo parameterOrder de la operaci\u00F3n \"{0}\" +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=El atributo parameterOrder en la operaci\u00F3n \\"{0}\\" no es v\u00E1lido; ignorando la indicaci\u00F3n parameterOrder +wsdlmodeler.invalid.parameter.differentTypes=el par\u00E1metro \"{0}\" de la operaci\u00F3n \"{1}\" aparece con diferentes tipos en los mensajes de entrada y salida +wsdlmodeler.invalid.bindingOperation.notInPortType=en el enlace \"{1}\", la operaci\u00F3n \"{0}\" no aparece en el tipo de puerto correspondiente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=El mensaje de entrada de la operaci\u00F3n de enlace \"{0}\" no tiene ninguna extensi\u00F3n de cuerpo de SOAP. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=El mensaje de salida de la operaci\u00F3n de enlace \"{0}\" no tiene ninguna extensi\u00F3n de cuerpo de SOAP. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=La operaci\u00F3n de enlace \"{0}\" debe especificar un nombre para su mensaje de entrada. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=La operaci\u00F3n de enlace \"{0}\" debe especificar un nombre para su mensaje de salida. +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=en el enlace \\"{1}\\", la operaci\u00F3n \\"{0}\\" no hace referencia a una operaci\u00F3n \u00FAnica en el tipo de puerto correspondiente +wsdlmodeler.invalid.bindingOperation.notFound=en el enlace \\"{1}\\", la operaci\u00F3n \\"{0}\\" no coincide con ninguna operaci\u00F3n en el tipo de puerto correspondiente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=El mensaje de entrada de la operaci\u00F3n de enlace \\"{0}\\" debe especificar un valor para el atributo \\"namespace\\". +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=El mensaje de salida de la operaci\u00F3n de enlace \"{0}\" debe especificar un valor para el atributo \"namespace\". +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=la cabecera de entrada \\"{1}\\" de la operaci\u00F3n de enlace \\"{0}\\" debe especificar un valor para el atributo \\"namespace\\" +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=la cabecera de salida \\"{1}\\" de la operaci\u00F3n de enlace \\"{0}\\" debe especificar un valor para el atributo \\"namespace\\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=El fallo \"{0}\" de la operaci\u00F3n \"{1}\" coincide con m\u00E1s de un fallo de la operaci\u00F3n de tipo de puerto correspondiente. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=El fallo \"{0}\" de la operaci\u00F3n \"{1}\" no coincide con ning\u00FAn fallo de la operaci\u00F3n de tipo de puerto correspondiente. +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=El fallo \\"{0}\\" de la operaci\u00F3n portType \\"{1}\\" no coincide con ning\u00FAn fallo en la operaci\u00F3n de enlace correspondiente. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=El fallo \"{0}\" de la operaci\u00F3n \"{1}\" no tiene ninguna extensi\u00F3n de fallo de SOAP. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=El fallo \\"{0}\\" en la operaci\u00F3n \\"{1}\\" debe especificar un valor para el atributo \\"name\\". +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=El fallo \\"{0}\\" en la operaci\u00F3n \\"{1}\\" debe especificar un valor para el atributo \\"namespace\\". +wsdlmodeler.invalid.bindingFault.emptyMessage=el fallo \"{0}\" hace referencia al mensaje \"{1}\", pero el mensaje no tiene partes +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=el fallo \"{0}\" hace referencia al mensaje \"{1}\", pero el mensaje tiene varias partes +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=En el mensaje \\"{0}\\", la parte \\"{1}\\" debe especificar un atributo \\"element\\". +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=se han producido los siguientes conflictos de nomenclatura: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=ignorando elemento de esquema (versi\u00F3n no soportada): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes=se han encontrado {0} tipos no reconocidos +wsdlmodeler.warning.noServiceDefinitionsFound=en el documento WSDL no se define ning\u00FAn servicio +wsdlmodeler.warning.noPortsInService=El servicio \\"{0}\\" no contiene ning\u00FAn puerto que se pueda utilizar. Pruebe a ejecutar wsimport con el conmutador -extension. +wsdlmodeler.warning.noOperationsInPort=El puerto \"{0}\" no contiene ninguna operaci\u00F3n que se pueda utilizar +wsdlmodeler.warning.ignoringNonSOAPPort=ignorando puerto \"{0}\": no es un puerto SOAP est\u00E1ndar. Pruebe a ejecutar wsimport con el conmutador -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=El puerto \"{0}\": no es un puerto SOAP est\u00E1ndar. Es posible que los artefactos generados no funcionen con JAV-WS en tiempo de ejecuci\u00F3n. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=ignorando puerto \"{0}\": no se ha especificado ninguna direcci\u00F3n SOAP. Pruebe a ejecutar wsimport con el conmutador -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=El puerto \\"{0}\\" no es un puerto SOAP. No tiene soap:address. +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:ignorando puerto SOAP \"{0}\": transporte no reconocido. Pruebe a ejecutar wsimport con el conmutador -extension. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=ignorando puerto \\"{0}\\"; no es compatible con WS-I BP 1.1: el enlace WSDL tiene un estilo mixto. Debe ser una operaci\u00F3n de literal RPC o literal de documento. Pruebe a ejecutar wsimport con el conmutador -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=No es un puerto SOAP compatible con WS-I BP 1.1 \\"{0}\\": el enlace WSDL tiene un estilo mixto. Debe ser una operaci\u00F3n de literal RPC o literal de documento. + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=ignorando operaci\u00F3n \"{0}\": No es petici\u00F3n-respuesta o unidireccional +wsdlmodeler.invalid.operation.notSupportedStyle=WSDL no v\u00E1lido, wsdl:operation \\"{0}\\" en wsdl:portType \\"{1}\\": no es una respuesta de solicitud ni unidireccional +wsdlmodeler.warning.ignoringOperation.notEncoded=ignorando operaci\u00F3n de estilo RPC \"{0}\": Los par\u00E1metros no est\u00E1n codificados +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=ignorando operaci\u00F3n \\"{0}\\": no se puede manejar el atributo \\"parts\\" del elemento \\"soap:body\\" + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=ignorando operaci\u00F3n \"{0}\": la parte del mensaje no hace referencia a una declaraci\u00F3n de elemento de esquema +wsdlmodeler.invalid.doclitoperation=wsdl:operation \\"{0}\\" no v\u00E1lido: es una operaci\u00F3n de literal de documento; la parte del mensaje debe hacer referencia a una declaraci\u00F3n de elemento de esquema + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=ignorando operaci\u00F3n \"{0}\": la parte del mensaje no hace referencia a una declaraci\u00F3n de tipo de esquema +wsdlmodeler.invalid.rpclitoperation=wsdl:operation \\"{0}\\" no v\u00E1lido: es una operaci\u00F3n de literal RPC; la parte del mensaje debe hacer referencia a una declaraci\u00F3n de tipo de esquema + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=ignorando la operaci\u00F3n \"{0}\": no se pueden manejar operaciones de estilo de documento +wsdlmodeler.warning.bindingOperation.multiplePartBinding=Compruebe el enlace \\"{0}\\" de la operaci\u00F3n abstracta; la parte \\"{1}\\" tiene varios enlaces. De todas formas, se intentar\u00E1 generar artefactos... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=enlace \"{0}\" de la operaci\u00F3n abstracta; la parte \"{1}\" tiene varios enlaces. +wsdlmodeler.warning.ignoringFaults=ignorando los fallos declarados por la operaci\u00F3n \\"{0}\\" +wsdlmodeler.warning.ignoringFault.notEncoded=ignorando el fallo de literal \"{0}\" de la operaci\u00F3n de enlace \"{1}\" +wsdlmodeler.warning.ignoringFault.notLiteral=ignorando el fallo codificado \"{0}\" de la operaci\u00F3n de enlace \"{1}\" +wsdlmodeler.invalid.operation.fault.notLiteral=ignorando el fallo codificado \"{0}\"en la operaci\u00F3n de enlace de literal \"{1}\" +wsdlmodeler.warning.ignoringHeader=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\" +wsdlmodeler.warning.ignoringHeader.partFromBody=la parte de la cabecera: \\"{0}\\" ya est\u00E1 enlazada por soapbind:body; no es v\u00E1lido enlazar dos veces la parte +wsdlmodeler.warning.ignoringHeader.notLiteral=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": No es literal +wsdlmodeler.invalid.header.notLiteral=Cabecera no v\u00E1lida \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no es literal +wsdlmodeler.warning.ignoringHeader.notFound=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se ha encontrado +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=No se ha encontrado la cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\". +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se puede resolver el mensaje +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=Cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se puede resolver el mensaje. + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=ignorando fallo \"{0}\" de la operaci\u00F3n de enlace \"{1}\": no se puede resolver el mensaje +wsdlmodeler.invalid.fault.cant.resolve.message=el mensaje de fallo \\"{0}\\" de la operaci\u00F3n de enlace \\"{1}\\" no se ha podido resolver + +wsdlmodeler.warning.ignoringHeader.notEncoded=ignorando cabecera \"{0}\" de la operaci\u00F3n de enlace \"{1}\": No es SOAP-Encoded +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=ignorando cabecera \"{0}\" de la operaci\u00F3n \"{1}\": parte no encontrada +# +wsdlmodeler.warning.ignoringOperation.notLiteral=ignorando operaci\u00F3n de estilo de documento \"{0}\": Los par\u00E1metros no son literales +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=ignorando operaci\u00F3n \"{0}\": hay m\u00E1s de una parte en el mensaje de entrada +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=ignorando operaci\u00F3n \\"{0}\\": el mensaje de entrada est\u00E1 vac\u00EDo +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=ignorando operaci\u00F3n \"{0}\": hay m\u00E1s de una parte en el mensaje de salida +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Ignorando operaci\u00F3n \"{0}\": hay m\u00E1s de una parte enlazada al cuerpo +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=Operaci\u00F3n \"{0}\": hay m\u00E1s de una parte enlazada al cuerpo. +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=ignorando operaci\u00F3n \\"{0}\\": el mensaje de salida est\u00E1 vac\u00EDo +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=ignorando operaci\u00F3n \"{0}\": hay un conflicto entre el estilo del enlace y el estilo de la operaci\u00F3n +wsdlmodeler.warning.ignoringOperation.partNotFound=ignorando operaci\u00F3n \"{0}\": la parte \"{1}\" no se ha encontrado +wsdlmodeler.error.partNotFound=la parte \"{1}\" de la operaci\u00F3n \"{0}\" no se ha podido resolver. +wsdlmodeler.warning.ignoringFault.documentOperation=ignorando el fallo \"{0}\" de la operaci\u00F3n de estilo de documento \"{1}\" +wsdlmodler.warning.operation.use=El WSDL utilizado tiene operaciones con uso literal y codificado. -f:searchschema no est\u00E1 soportado para este caso. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=el nombre de soap:fault \\"{0}\\" no coincide con el nombre de wsdl:fault \\"{1}\\" en la operaci\u00F3n \\"{2}\\" +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=no se ha especificado el nombre de soap:fault, wsdl:fault \\"{0}\\" en la operaci\u00F3n \\"{1}\\" + +wsdlmodeler.duplicate.fault.part.name=ignorando fallo \"{0}\" de la operaci\u00F3n \"{1}\", el nombre de parte \"{2}\" no es \u00FAnico +wsdlmodeler.duplicate.fault.soap.name=ignorando fallo \\"{0}\\" de la operaci\u00F3n \\"{1}\\"; el nombre de soap:fault \\"{2}\\" no es \u00FAnico + +wsdlmodeler.warning.ignoringHeaderFault.notFound=ignorando fallo de cabecera \"{0}\"; no se ha encontrado la parte \"{1}\" en el enlace \"{2}\" +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=ignorando parte de fallo de la cabecera=\\"{0}\\" mensaje=\\"{1}\\" de operaci\u00F3n {2}; el atributo de uso debe ser \\"literal\\" + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=ignorando parte de fallo de la cabecera=\\"{0}\\" mensaje=\\"{1}\\" de operaci\u00F3n {2} + +wsdlmodeler.invalid.headerfault.notLiteral=Headerfault \\"{0}\\" no v\u00E1lido de la operaci\u00F3n de enlace \\"{1}\\": no es literal +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Headerfault no v\u00E1lido \\"{0}\\" para la cabecera {1} en la operaci\u00F3n {2}: la parte debe especificar un atributo \\"element\\" +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Cabecera no v\u00E1lida \\"{0}\\" en la operaci\u00F3n {1}: la parte debe especificar un atributo \\"element\\" + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=Se ha utilizado un WSDL no compatible con WS-I para wsdl:import +wsdlmodeler.warning.nonconforming.wsdl.types=Se ha utilizado un WSDL no compatible con WS-I para wsdl:types +wsdlmodeler.warning.nonconforming.wsdl.use=Procesando operaci\u00F3n incompatible con WS-I \"{0}\" con estilo RPC y codificada con SOAP + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=No se han encontrado las partes \"{0}\" en el mensaje \"{1}\", WSDL incorrecto. + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=El puerto de SOAP \"{0}\": utiliza un enlace SOAP 1.2 no est\u00E1ndar. +wsdlmodeler.warning.ignoringSOAPBinding12=Ignorando el puerto SOAP \\"{0}\\": utiliza un enlace SOAP 1.2 no est\u00E1ndar.\nDebe especificar la opci\u00F3n \\"-extension\\" para utilizar este enlace. + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=El atributo namespace de R2716 WSI-BasicProfile ver. 1.0 no est\u00E1 permitido en doc/lit para {0}: \\"{1}\\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=El atributo namespace de R2716/R2726 WSI-BasicProfile ver. 1.0 no est\u00E1 permitido en doc/lit o RPC/lit para {0}: \\"{1}\\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=Ignorando operaci\u00F3n \\"{0}\\". La estructura de varias partes/relacionada tiene una parte ra\u00EDz no v\u00E1lida: se ha encontrado m\u00E1s de una parte soap:body + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Las cabeceras no est\u00E1n en mime:part ra\u00EDz con soap:body; ignorando cabeceras en la operaci\u00F3n \\"{0}\\" + +# R2909 +mimemodeler.invalidMimeContent.differentPart=Ignorando mime:part. Mime:part no v\u00E1lida; mime:content tiene un atributo part diferente. + +mimemodeler.invalidMimeContent.invalidSchemaType=Ignorando mime:part. La mime part: {0} no se puede asignar a un tipo de esquema {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=El elemento wsdl:part al que hace referencia el atributo part de mime:content: {0} se debe definir utilizando el atributo type. + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=Ignorando operaci\u00F3n \"{0}\"; falta el atributo part en mime:content. El atributo part debe encontrarse en la declaraci\u00F3n de mime:content. + +mimemodeler.invalidMimeContent.missingTypeAttribute=Falta el atributo type en mime:content en la operaci\u00F3n \"{0}\". El atributo part debe encontrarse en la declaraci\u00F3n de mime:content. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=Tipo de esquema desconocido: {1} para la parte mime:content: {0} +mimemodeler.invalidMimeContent.errorLoadingJavaClass=No se ha encontrado la clase \"{0}\" para el tipo mime \"{1}\" + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=ignorando mime:part; no se ha encontrado la parte \\"{0}\\" a la que hace referencia mime:content en wsdl:operation \\"{1}\\" + +mimemodeler.elementPart.invalidElementMimeType=La parte mime:content hace referencia a wsdl:part \\"{0}\\", que se ha definido utilizando el atributo element. Aseg\u00FArese de que el tipo mime: \\"{1}\\" es adecuado para serializar XML. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=se ha ignorado el atributo name en wsdl:part en la operaci\u00F3n \\"{0}\\". No est\u00E1 permitido de acuerdo con WS-I AP 1.0. + + +wsdlmodeler20.rpcenc.not.supported=las WSDL de RPC/codificadas no est\u00E1n soportadas en JAX-WS 2.0. +wsdlmodeler.warning.ignoringOperation.notNCName=Ignorando operaci\u00F3n \\"{0}\\"; tiene el car\u00E1cter no v\u00E1lido ''{1}'' en el nombre. Su operaci\u00F3n de literal RPC, jaxws, no podr\u00E1 serializarla. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Ignorando operaci\u00F3n \\"{0}\\"; no se puede generar el m\u00E9todo Java. El par\u00E1metro part "{2}\\" de wsdl:message \\"{1}\\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro o el nombre de wsdl:part. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Operaci\u00F3n \"{0}\" no v\u00E1lida; no se puede generar el m\u00E9todo Java. El par\u00E1metro part "{2}\\" de wsdl:message \\"{1}\\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro o el nombre de wsdl:part. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Ignorando operaci\u00F3n \"{0}\"; no se puede generar el par\u00E1metro del m\u00E9todo Java. El nombre local del envoltorio secundario \"{1}\" en el elemento global \"{2}\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Operaci\u00F3n no v\u00E1lida \"{0}\"; no se puede generar el par\u00E1metro del m\u00E9todo Java. El nombre local del envoltorio secundario \"{1}\" en el elemento global \"{2}\" es una palabra clave de Java. Utilice la personalizaci\u00F3n para cambiar el nombre del par\u00E1metro. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Ignorando operaci\u00F3n \\"{0}\\"; no se puede generar el m\u00E9todo Java. El nombre personalizado del par\u00E1metro \\"{1}\\" es una palabra clave de Java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Operaci\u00F3n \"{0}\" no v\u00E1lida; no se puede generar el m\u00E9todo Java. El nombre personalizado del par\u00E1metro \\"{1}\\" es una palabra clave de Java. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Ignorando operaci\u00F3n \\"{0}\\"; es una palabra reservada de Java. No se puede generar el m\u00E9todo Java. Utilice la personalizaci\u00F3n para cambiar el nombre de la operaci\u00F3n. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Operaci\u00F3n no v\u00E1lida \"{0}\"; es una palabra reservada de Java. No se puede generar el m\u00E9todo Java. Utilice la personalizaci\u00F3n para cambiar el nombre de la operaci\u00F3n. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Ignorando operaci\u00F3n \\"{0}\\"; no se puede generar el m\u00E9todo Java. El nombre personalizado \\"{1}\\" de wsdl:operation es una palabra clave de Java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Operaci\u00F3n no v\u00E1lida \"{0}\"; no se puede generar el m\u00E9todo Java. El nombre personalizado \\"{1}\\" de wsdl:operation es una palabra clave de Java. + +wsdlmodeler.jaxb.javatype.notfound=No se ha definido el descriptor de esquema {0} en la parte del mensaje \\"{1}\\" y no puede estar enlazada a Java. Quiz\u00E1 el descriptor de esquema {0} no est\u00E1 definido en el esquema importado/incluido en el WSDL. Puede agregar dichas importaciones/inclusiones o ejecutar wsimport y proporcionar la ubicaci\u00F3n del esquema utilizando el conmutador -b. +wsdlmodeler.unsupportedBinding.mime=El enlace WSDL MIME no est\u00E1 soportado actualmente. + +wsdlmodeler.nonUnique.body.error=Partes de cuerpo no \u00FAnicas. De acuerdo con RBP 1.1 R2710, en un puerto, las operaciones deben tener una firma de operaci\u00F3n \u00FAnica en la transmisi\u00F3n para que se distribuyan correctamente. En el puerto {0}, las operaciones \\"{1}\\" y \\"{2}\\" tienen el mismo bloque de cuerpo de solicitud {3}. Pruebe a ejecutar wsimport con el conmutador -extension. El tiempo de ejecuci\u00F3n intentar\u00E1 distribuirlo utilizando SOAPAction +wsdlmodeler.nonUnique.body.warning=Partes de cuerpo no \u00FAnicas. De acuerdo con RBP 1.1 R2710, en un puerto, las operaciones deben tener una firma de operaci\u00F3n \u00FAnica en la transmisi\u00F3n para que se distribuyan correctamente. En el puerto {0}, las operaciones \\"{1}\\" y \\"{2}\\" tienen el mismo bloque de cuerpo de solicitud {3}. Puede que la distribuci\u00F3n del m\u00E9todo falle. El tiempo de ejecuci\u00F3n intentar\u00E1 distribuirlo utilizando SOAPAction. + +wsdlmodeler.rpclit.unkownschematype=El tipo XML \\"{0}\\" no se ha podido resolver. Fallo del enlace entre XML y JAVA. Compruebe wsdl:part \\"{1}\\" en wsdl:message \\"{2}\\". + +wsdlmodeler.responsebean.notfound=Fallo de wsimport al generar el bean de respuesta as\u00EDncrona para la operaci\u00F3n: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties new file mode 100644 index 00000000000..a1121628abb --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_fr.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=erreur de modeleur : {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=op\u00E9ration non valide : {0} +wsdlmodeler.invalidState.modelingOperation=\u00E9tat non valide lors de la mod\u00E9lisation de l''op\u00E9ration : {0} +wsdlmodeler.resultIsInOutParameter=le r\u00E9sultat est le param\u00E8tre \"inout\" dans l''op\u00E9ration : {0} +wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" indiqu\u00E9 dans l''attribut parameterOrder de l''op\u00E9ration \"{1}\" n''est pas une partie valide du message. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=plusieurs \u00E9l\u00E9ments PART n''ont pas \u00E9t\u00E9 indiqu\u00E9s dans l''attribut parameterOrder de l''op\u00E9ration \"{0}\" +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=L''attribut parameterOrder sur l''op\u00E9ration \"{0}\" n''est pas valide, non-prise en compte du conseil parameterOrder +wsdlmodeler.invalid.parameter.differentTypes=le param\u00E8tre \"{0}\" de l''op\u00E9ration \"{1}\" comporte des types diff\u00E9rents dans les messages d''entr\u00E9e et de sortie +wsdlmodeler.invalid.bindingOperation.notInPortType=dans le binding \"{1}\", l''op\u00E9ration \"{0}\" n''appara\u00EEt pas dans le type de port correspondant +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=le message d''entr\u00E9e de l''op\u00E9ration bind \"{0}\" ne comporte pas d''extension de corps SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=le message de sortie de l''op\u00E9ration bind \"{0}\" ne comporte pas d''extension de corps SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=l''op\u00E9ration de binding \"{0}\" doit indiquer un nom pour son message d''entr\u00E9e +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=l''op\u00E9ration de binding \"{0}\" doit indiquer un nom pour son message de sortie +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=dans le binding \"{1}\", l''op\u00E9ration \"{0}\" ne r\u00E9f\u00E9rence pas une op\u00E9ration unique dans le type de port correspondant +wsdlmodeler.invalid.bindingOperation.notFound=dans le binding \"{1}\", l''op\u00E9ration \"{0}\" ne correspond \u00E0 aucune op\u00E9ration dans le type de port correspondant +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=le message d''entr\u00E9e de l''op\u00E9ration bind \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=le message de sortie de l''op\u00E9ration bind \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\" +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=l''en-t\u00EAte d''entr\u00E9e \"{1}\" de l''op\u00E9ration de binding \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\" +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=l''en-t\u00EAte de sortie \"{1}\" de l''op\u00E9ration de binding \"{0}\" doit indiquer une valeur pour l''attribut \"namespace\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" concorde avec plus d''une erreur dans l''op\u00E9ration de type port correspondant +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" ne concorde avec aucune erreur dans l''op\u00E9ration de type port correspondant +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=l''erreur \"{0}\" dans l''op\u00E9ration portType \"{1}\" ne concorde avec aucune erreur dans l''op\u00E9ration de binding correspondant +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" ne comporte pas d''extension d''erreur SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" doit indiquer une valeur pour l''attribut \"name\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=l''erreur \"{0}\" dans l''op\u00E9ration \"{1}\" doit indiquer une valeur pour l''attribut \"namespace\" +wsdlmodeler.invalid.bindingFault.emptyMessage=l''erreur \"{0}\" fait r\u00E9f\u00E9rence au message \"{1}\", mais celui-ci ne comporte pas d''\u00E9l\u00E9ment PART +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=l''erreur \"{0}\" fait r\u00E9f\u00E9rence au message \"{1}\", mais celui-ci comporte plus d''un \u00E9l\u00E9ment PART +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=dans le message \"{0}\", la partie \"{1}\" doit indiquer un attribut \"element\" +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=les conflits de d\u00E9nomination suivants sont survenus : {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=non-prise en compte de l''\u00E9l\u00E9ment de sch\u00E9ma (version non prise en charge) : {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes={0} types non reconnus d\u00E9tect\u00E9s +wsdlmodeler.warning.noServiceDefinitionsFound=Le document WSDL ne d\u00E9finit aucun service +wsdlmodeler.warning.noPortsInService=Le service \"{0}\" ne contient aucun port utilisable. Essayez d''utiliser wsimport avec le commutateur -extension. +wsdlmodeler.warning.noOperationsInPort=Le port \"{0}\" ne contient aucune op\u00E9ration utilisable +wsdlmodeler.warning.ignoringNonSOAPPort=non-prise en compte du port \"{0}\" : il ne s''agit pas d''un port SOAP standard. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=port \"{0}\" : il ne s''agit pas d''un port SOAP standard. Les artefacts g\u00E9n\u00E9r\u00E9s peuvent ne pas fonctionner avec l''ex\u00E9cution JAX-WS. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=non-prise en compte du port \"{0}\" : aucune adresse SOAP indiqu\u00E9e. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=Le port \"{0}\" n''est pas un port SOAP, il n''a aucun \u00E9l\u00E9ment soap:address +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:non-prise en compte du port SOAP \"{0}\" : transport non reconnu. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=non-prise en compte du port \"{0}\", il n''est pas conforme \u00E0 WS-I BP 1.1 : le binding WSDL a un style mixte, il doit s''agir d''une op\u00E9ration rpc-literal ou document-literal. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=n''est pas un port SOAP conforme \u00E0 WS-I BP1.1 \"{0}\" : le binding WSDL comporte un environnement mixte, il doit s''agir d''une op\u00E9ration rpc-literal ou document-literal. + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=non-prise en compte de l''op\u00E9ration \"{0}\" : le type n''est pas request-response ou one-way +wsdlmodeler.invalid.operation.notSupportedStyle=WSDL non valide, wsdl:operation \"{0}\" dans wsdl:portType \"{1}\" : n''est pas de type request-response ou one-way +wsdlmodeler.warning.ignoringOperation.notEncoded=non-prise en compte de l''op\u00E9ration RPC-style \"{0}\" : les param\u00E8tres ne sont pas encod\u00E9s +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=non-prise en compte de l''op\u00E9ration \"{0}\" : impossible de g\u00E9rer l''attribut \"parts\" de l''\u00E9l\u00E9ment \"soap:body\" + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=non-prise en compte de l''op\u00E9ration \"{0}\" : la partie message ne fait pas r\u00E9f\u00E9rence \u00E0 une d\u00E9claration d''\u00E9l\u00E9ment de sch\u00E9ma +wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\" non valide : il s''agit d''une op\u00E9ration document-literal, la partie message doit faire r\u00E9f\u00E9rence \u00E0 une d\u00E9claration d''\u00E9l\u00E9ment de sch\u00E9ma + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=non-prise en compte de l''op\u00E9ration \"{0}\" : la partie message ne fait pas r\u00E9f\u00E9rence \u00E0 une d\u00E9claration de type de sch\u00E9ma +wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\"non valide : il s''agit d''une op\u00E9ration rpc-literal, la partie message doit faire r\u00E9f\u00E9rence \u00E0 une d\u00E9claration de type de sch\u00E9ma + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=non-prise en compte de l''op\u00E9ration \"{0}\" : impossible de g\u00E9rer les op\u00E9rations document-style +wsdlmodeler.warning.bindingOperation.multiplePartBinding=V\u00E9rifiez le binding \"{0}\" de l''op\u00E9ration abstract, la partie \"{1}\" a un binding multiple. Le syst\u00E8me essaiera tout de m\u00EAme de g\u00E9n\u00E9rer des artefacts... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=binding \"{0}\" de l''op\u00E9ration abstract, la partie \"{1}\" a un binding multiple. +wsdlmodeler.warning.ignoringFaults=non-prise en compte des erreurs d\u00E9clar\u00E9es par l''op\u00E9ration \"{0}\" +wsdlmodeler.warning.ignoringFault.notEncoded=non-prise en compte de l''erreur de type literal \"{0}\" de l''op\u00E9ration de binding \"{1}\" +wsdlmodeler.warning.ignoringFault.notLiteral=non-prise en compte de l''erreur de type encoded \"{0}\" de l''op\u00E9ration de binding \"{1}\" +wsdlmodeler.invalid.operation.fault.notLiteral=non-prise en compte de l''erreur de type encoded \"{0}\" dans l''op\u00E9ration de binding de type literal \"{1}\" +wsdlmodeler.warning.ignoringHeader=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" +wsdlmodeler.warning.ignoringHeader.partFromBody=partie d''en-t\u00EAte \"{0}\" d\u00E9j\u00E0 li\u00E9e par soapbind:body, la partie ne peut pas \u00EAtre li\u00E9e deux fois +wsdlmodeler.warning.ignoringHeader.notLiteral=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration bind \"{1}\" : le type n''est pas literal +wsdlmodeler.invalid.header.notLiteral=en-t\u00EAte \"{0}\" non valide de l''op\u00E9ration de binding \"{1}\" : le type n''est pas literal +wsdlmodeler.warning.ignoringHeader.notFound=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : introuvable +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : introuvable +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : impossible de r\u00E9soudre le message +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=en-t\u00EAte \"{0}\" de l''op\u00E9ration de binding \"{1}\" : impossible de r\u00E9soudre le message + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration de binding \"{1}\" : impossible de r\u00E9soudre le message +wsdlmodeler.invalid.fault.cant.resolve.message=le message d''erreur \"{0}\" dans l''op\u00E9ration de binding \"{1}\" n''a pas pu \u00EAtre r\u00E9solu + +wsdlmodeler.warning.ignoringHeader.notEncoded=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration bind \"{1}\" : le type n''est pas SOAP-encoded +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=non-prise en compte de l''en-t\u00EAte \"{0}\" de l''op\u00E9ration \"{1}\" : partie introuvable +# +wsdlmodeler.warning.ignoringOperation.notLiteral=non-prise en compte de l''op\u00E9ration document-style \"{0}\" : les param\u00E8tres ne sont pas de type literal +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : plusieurs parties dans le message d''entr\u00E9e +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : le message d''entr\u00E9e est vide +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : plusieurs parties dans le message de sortie +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : plusieurs parties li\u00E9es au corps +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=op\u00E9ration \"{0}\" : plusieurs parties li\u00E9es au corps +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=non-prise en compte de l''op\u00E9ration \"{0}\" : le message de sortie est vide +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=non-prise en compte de l''op\u00E9ration \"{0}\" : style de binding et style d''op\u00E9ration en conflit +wsdlmodeler.warning.ignoringOperation.partNotFound=non-prise en compte de l''op\u00E9ration \"{0}\" : partie \"{1}\" introuvable +wsdlmodeler.error.partNotFound=la partie \"{1}\" de l''op\u00E9ration \"{0}\" n''a pas pu \u00EAtre r\u00E9solue. +wsdlmodeler.warning.ignoringFault.documentOperation=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration document-style \"{1}\" +wsdlmodler.warning.operation.use=Le WSDL utilis\u00E9 comporte des op\u00E9rations avec utilisation de type literal et encoded. -f:searchschema n'est pas pris en charge pour ce sc\u00E9nario. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=le nom de soap:fault \"{0}\" ne correspond pas au nom de wsdl:fault \"{1}\" dans l''op\u00E9ration \"{2}\" +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=nom soap:fault non indiqu\u00E9, wsdl:fault \"{0}\" dans l''op\u00E9ration \"{1}\" + +wsdlmodeler.duplicate.fault.part.name=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration \"{1}\" : le nom d''\u00E9l\u00E9ment PART \"{2}\" n''est pas unique +wsdlmodeler.duplicate.fault.soap.name=non-prise en compte de l''erreur \"{0}\" de l''op\u00E9ration \"{1}\" : le nom soap:fault \"{2}\" n''est pas unique + +wsdlmodeler.warning.ignoringHeaderFault.notFound=non-prise en compte de l''\u00E9l\u00E9ment headerfault \"{0}\", partie \"{1}\" introuvable dans le binding \"{2}\" +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=non-prise en compte de la partie headerfault \"{0}\" du message \"{1}\" de l''op\u00E9ration {2}, l''attribut utilis\u00E9 doit \u00EAtre \"literal\" + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=non-prise en compte de la partie headerfault \"{0}\" du message \"{1}\" de l''op\u00E9ration {2} + +wsdlmodeler.invalid.headerfault.notLiteral=El\u00E9ment headerfault \"{0}\" non valide de l''op\u00E9ration de binding \"{1}\" : le type n''est pas literal +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=El\u00E9ment headerfault \"{0}\" non valide pour l''en-t\u00EAte {1} dans l''op\u00E9ration {2} : la partie doit indiquer un attribut \"element\" +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=En-t\u00EAte \"{0}\" non valide dans l''op\u00E9ration {1} : la partie doit indiquer un attribut \"element\" + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=WSDL non conforme \u00E0 WS-I utilis\u00E9 pour wsdl:import +wsdlmodeler.warning.nonconforming.wsdl.types=WSDL non conforme \u00E0 WS-I utilis\u00E9 pour wsdl:types +wsdlmodeler.warning.nonconforming.wsdl.use=Traitement de l''op\u00E9ration non conforme \u00E0 WS-I \"{0}\" avec RPC-Style et SOAP-encoded + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=\u00E9l\u00E9ments PART \"{0}\" introuvable dans le message \"{1}\" ; WSDL erron\u00E9 + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=Port SOAP \"{0}\" : utilise un binding SOAP 1.2 non standard. +wsdlmodeler.warning.ignoringSOAPBinding12=Non-prise en compte du port SOAP \"{0}\" : il utilise un binding SOAP 1.2 non standard.\nVous devez indiquer l''option \"-extension\" pour utiliser ce binding. + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile version 1.0, attribut d''espace de noms non autoris\u00E9 dans doc/lit pour {0} : \"{1}\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile version 1.0, attribut d''espace de noms non autoris\u00E9 dans doc/lit ou rpc/lit pour {0} : \"{1}\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=Non-prise en compte de l''op\u00E9ration \"{0}\". La structure Multipart/Related comporte un \u00E9l\u00E9ment Part racine non valide : plusieurs \u00E9l\u00E9ment Part soap:body trouv\u00E9s + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Les en-t\u00EAtes ne figurent pas dans l''\u00E9l\u00E9ment mime:part racine avec soap:body, non-prise en compte des en-t\u00EAtes dans l''op\u00E9ration \"{0}\" + +# R2909 +mimemodeler.invalidMimeContent.differentPart=Non-prise en compte de mime:part. mime:part non valide, mime:content a un autre attribut d'\u00E9l\u00E9ment Part. + +mimemodeler.invalidMimeContent.invalidSchemaType=Non-prise en compte de mime:part. L''\u00E9l\u00E9ment Part MIME {0} ne peut pas \u00EAtre mapp\u00E9 avec le type de sch\u00E9ma : {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=l''\u00E9l\u00E9ment wsdl:part r\u00E9f\u00E9renc\u00E9 par l''attribut d''\u00E9l\u00E9ment Part mime:content {0} doit \u00EAtre d\u00E9fini \u00E0 l''aide de l''attribut de type. + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=Non-prise en compte de l''op\u00E9ration \"{0}\", attribut d''\u00E9l\u00E9ment Part manquant dans mime:content. L''attribut d''\u00E9l\u00E9ment Part doit figurer dans la d\u00E9claration mime:content. + +mimemodeler.invalidMimeContent.missingTypeAttribute=Attribut de type manquant dans mime:content dans l''op\u00E9ration \"{0}\". L''attribut d''\u00E9l\u00E9ment Part doit figurer dans la d\u00E9claration mime:content. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=Type de sch\u00E9ma {1} inconnu pour l''\u00E9l\u00E9ment Part mime:content : {0} +mimemodeler.invalidMimeContent.errorLoadingJavaClass=Classe \"{0}\" introuvable pour le type MIME \"{1}\" + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=non-prise en compte de mime:part, \u00E9l\u00E9ment Part \"{0}\" r\u00E9f\u00E9renc\u00E9 par la d\u00E9claration mime:content introuvable dans l''\u00E9l\u00E9ment wsdl:operation \"{1}\" + +mimemodeler.elementPart.invalidElementMimeType=L''\u00E9l\u00E9ment Part mime:content fait r\u00E9f\u00E9rence \u00E0 l''\u00E9l\u00E9ment wsdl:part \"{0}\", d\u00E9finie \u00E0 l''aide de l''attribut d''\u00E9l\u00E9ment. Assurez-vous que le type MIME \"{1}\" est appropri\u00E9 pour s\u00E9rialiser XML. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=l''attribut de nom sur l''\u00E9l\u00E9ment wsdl:part dans l''op\u00E9ration \"{0}\" n''est pas pris en compte. Il n''est pas autoris\u00E9 comme WS-I AP 1.0. + + +wsdlmodeler20.rpcenc.not.supported=Les WSDL RPC/encoded ne sont pas pris en charge dans JAXWS 2.0. +wsdlmodeler.warning.ignoringOperation.notNCName=Non-prise en compte de l''op\u00E9ration \"{0}\", son nom comporte le caract\u00E8re interdit ''{1}''. Son op\u00E9ration rpc-literal -jaxws ne pourra pas le s\u00E9rialiser. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Param\u00E8tre : la partie "{2}\" de wsdl:message \"{1}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre ou le nom wsdl:part. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Op\u00E9ration \"{0}\" non valide, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Param\u00E8tre : la partie "{2}\" de wsdl:message \"{1}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre ou le nom wsdl:part. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer le param\u00E8tre de m\u00E9thode Java. Le nom local de l''enfant wrapper \"{1}\" dans l''\u00E9l\u00E9ment global \"{2}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Op\u00E9ration \"{0}\" non valide, impossible de g\u00E9n\u00E9rer le param\u00E8tre de m\u00E9thode Java. Le nom local de l''enfant wrapper \"{1}\" dans l''\u00E9l\u00E9ment global \"{2}\" est un mot-cl\u00E9 Java. Utilisez la personnalisation pour modifier le nom de param\u00E8tre. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Le nom personnalis\u00E9 de param\u00E8tre \"{1}\" est un mot-cl\u00E9 Java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Op\u00E9ration \"{0}\" non valide, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Le nom personnalis\u00E9 de param\u00E8tre \"{1}\" est un mot-cl\u00E9 Java. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Non-prise en compte de l''op\u00E9ration \"{0}\", il s''agit d''un mot r\u00E9serv\u00E9 Java, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Utilisez la personnalisation pour modifier le nom de l''op\u00E9ration. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Op\u00E9ration \"{0}\" non valide, il s''agit d''un mot r\u00E9serv\u00E9 Java, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java. Utilisez la personnalisation pour modifier le nom de l''op\u00E9ration. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Non-prise en compte de l''op\u00E9ration \"{0}\", impossible de g\u00E9n\u00E9rer la m\u00E9thode Java, le nom personnalis\u00E9 \"{1}\" de l''\u00E9l\u00E9ment wsdl:operation est un mot-cl\u00E9 Java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Op\u00E9ration \"{0}\"non valide, impossible de g\u00E9n\u00E9rer la m\u00E9thode Java, le nom personnalis\u00E9 \"{1}\" de l''\u00E9l\u00E9ment wsdl:operation est un mot-cl\u00E9 Java. + +wsdlmodeler.jaxb.javatype.notfound=Le descripteur de sch\u00E9ma {0} dans la partie message \"{1}\" n''est pas d\u00E9fini et n''a pas pu \u00EAtre li\u00E9 \u00E0 Java. Le descripteur de sch\u00E9ma {0} n''est peut-\u00EAtre pas d\u00E9fini dans le sch\u00E9ma import\u00E9/inclus dans le WSDL. Vous pouvez ajouter ces imports/inclusions ou ex\u00E9cuter wsimport et fournir l''emplacement du sch\u00E9ma \u00E0 l''aide du commutateur -b. +wsdlmodeler.unsupportedBinding.mime=Le binding MIME WSDL n'est pas pris en charge actuellement. + +wsdlmodeler.nonUnique.body.error=Parties du corps non uniques. Dans un port, les op\u00E9rations BP 1.1 R2710 doivent comporter une signature d''op\u00E9ration unique sur le wire pour une r\u00E9partition r\u00E9ussie. Dans le port {0}, les op\u00E9rations \"{1}\" et \"{2}\" comportent le m\u00EAme bloc de corps de demande {3}. Essayez d''ex\u00E9cuter wsimport avec le commutateur -extension, le runtime essaiera d''effectuer la r\u00E9partition \u00E0 l''aide de SOAPAction +wsdlmodeler.nonUnique.body.warning=Parties du corps non uniques. Dans un port, les op\u00E9rations BP 1.1 R2710 doivent comporter une signature d''op\u00E9ration unique sur le wire pour une r\u00E9partition r\u00E9ussie. Dans le port {0}, les op\u00E9rations \"{1}\" et \"{2}\" comportent le m\u00EAme bloc de corps de demande {3}. La r\u00E9partition de m\u00E9thode risque d''\u00E9chouer, le runtime essaiera d''effectuer la r\u00E9partition \u00E0 l''aide de SOAPAction + +wsdlmodeler.rpclit.unkownschematype=Le type XML \"{0}\" n''a pas pu \u00EAtre r\u00E9solu, \u00E9chec du binding XML vers JAVA. V\u00E9rifiez l''\u00E9l\u00E9ment wsdl:part \"{1}\" dans wsdl:message \"{2}\". + +wsdlmodeler.responsebean.notfound=wsimport n''a pas pu g\u00E9n\u00E9rer le bean de r\u00E9ponse asynchrone pour l''op\u00E9ration : {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties new file mode 100644 index 00000000000..a1d903d57bd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_it.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=errore del modeler: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=operazione non valida: {0} +wsdlmodeler.invalidState.modelingOperation=stato non valido durante la modellazione dell''operazione: {0} +wsdlmodeler.resultIsInOutParameter=il risultato \u00E8 il parametro \"inout\" nell''operazione: {0} +wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" specificato nell''attributo parameterOrder dell''operazione \"{1}\" non \u00E8 una parte valida del messaggio. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=sono state escluse pi\u00F9 parti nell''attributo parameterOrder dell''operazione \"{0}\" +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=l''attributo parameterOrder sull''operazione \"{0}\" non \u00E8 valido. Il suggerimento parameterOrder verr\u00E0 ignorato. +wsdlmodeler.invalid.parameter.differentTypes=il parametro \"{0}\" dell''operazione \"{1}\" ha tipi diversi nei messaggi di input e di output +wsdlmodeler.invalid.bindingOperation.notInPortType=durante l''associazione di \"{1}\", l''operazione \"{0}\" non compare nel tipo di porta corrispondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=il messaggio di input dell''operazione di associazione \"{0}\" non contiene un''estensione del corpo SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=il messaggio di output dell''operazione di associazione \"{0}\" non contiene un''estensione del corpo SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=l''operazione di associazione \"{0}\" deve specificare un nome per il relativo messaggio di input +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=l''operazione di associazione \"{0}\" deve specificare un nome per il relativo messaggio di output +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=durante l''associazione di \"{1}\", l''operazione \"{0}\" non fa riferimento a un''operazione univoca nel tipo di porta corrispondente +wsdlmodeler.invalid.bindingOperation.notFound=durante l''associazione di \"{1}\", l''operazione \"{0}\" non corrisponde ad alcuna operazione nel tipo di porta corrispondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=il messaggio di input dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=il messaggio di output dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\" +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=l''intestazione di input \"{1}\" dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\" +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=l''intestazione di output \"{1}\" dell''operazione di associazione \"{0}\" deve specificare un valore per l''attributo \"namespace\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=l''errore \"{0}\" nell''operazione \"{1}\" corrisponde a pi\u00F9 di un errore nell''operazione del tipo di porta corrispondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=l''errore \"{0}\" nell''operazione \"{1}\" non corrisponde a nessun errore nell''operazione del tipo di porta corrispondente +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=l''errore \"{0}\" nell''operazione portType \"{1}\" non corrisponde a nessun errore nell''operazione di associazione corrispondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=l''errore \"{0}\" nell''operazione \"{1}\" non ha un''estensione di errore SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=l''errore \"{0}\" nell''operazione \"{1}\" deve specificare un valore per l''attributo \"name\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=l''errore \"{0}\" nell''operazione \"{1}\" deve specificare un valore per l''attributo \"namespace\" +wsdlmodeler.invalid.bindingFault.emptyMessage=l''errore \"{0}\" fa riferimento al messaggio \"{1}\", ma il messaggio non contiene parti +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=l''errore \"{0}\" fa riferimento al messaggio \"{1}\", ma il messaggio ha pi\u00F9 parti +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=nel messaggio \"{0}\", la parte \"{1}\" deve specificare un attributo \"element\" +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=si sono verificati i seguenti conflitti di denominazione: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=l''elemento dello schema verr\u00E0 ignorato (versione non supportata): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes=rilevati {0} tipi non riconosciuti +wsdlmodeler.warning.noServiceDefinitionsFound=il documento WSDL non definisce alcun servizio +wsdlmodeler.warning.noPortsInService=Il servizio \"{0}\" non contiene porte utilizzabili. Provare a eseguire wsimport con il parametro -extension. +wsdlmodeler.warning.noOperationsInPort=La porta \"{0}\" non contiene operazioni utilizzabili +wsdlmodeler.warning.ignoringNonSOAPPort=la porta \"{0}\" verr\u00E0 ignorata: non \u00E8 una porta SOAP standard. Provare a eseguire wsimport con il parametro -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=la porta \"{0}\": non \u00E8 una porta SOAP standard. Gli artifact generati potrebbero non funzionare con il runtime JAX-WS. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=la porta \"{0}\" verr\u00E0 ignorata: nessun indirizzo SOAP specificato. Provare a eseguire wsimport con il parametro -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=La porta \"{0}\" non \u00E8 una porta SOAP. Non contiene soap:address. +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:la porta SOAP \"{0}\" verr\u00E0 ignorata: trasporto non riconosciuto. Provare a eseguire wsimport con il parametro -extension. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=la porta \"{0}\" verr\u00E0 ignorata poich\u00E9 non \u00E8 conforme a WS-I BP 1.1: l''associazione WSDL ha uno stile misto e deve essere un''operazione rpc-literal o document-literal. Provare a eseguire wsimport con il parametro -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=non \u00E8 una porta SOAP \"{0}\" conforme a WS-I BP1.1: l''associazione WSDL ha uno stile misto e deve essere un''operazione rpc-literal o document-literal. + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=l''operazione \"{0}\" verr\u00E0 ignorata: non \u00E8 di tipo richiesta/risposta o monodirezionale +wsdlmodeler.invalid.operation.notSupportedStyle=WSDL non valido, wsdl:operation \"{0}\" in wsdl:portType \"{1}\": non \u00E8 di tipo richiesta/risposta o monodirezionale +wsdlmodeler.warning.ignoringOperation.notEncoded=l''operazione con stile RPC \"{0}\" verr\u00E0 ignorata: parametri non codificati +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=l''operazione \"{0}\" verr\u00E0 ignorata: impossibile gestire l''attributo \"parts\" dell''elemento \"soap:body\" + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=l''operazione \"{0}\" verr\u00E0 ignorata: la parte del messaggio non fa riferimento a una dichiarazione di elemento di schema +wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\" non valido: \u00E8 un''operazione document-literal e la parte del messaggio deve fare riferimento a una dichiarazione di elemento di schema + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=l''operazione \"{0}\" verr\u00E0 ignorata: la parte del messaggio non fa riferimento a una dichiarazione di tipo di schema +wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\" non valido: \u00E8 un''operazione rpc-literal e la parte del messaggio deve fare riferimento a una dichiarazione di tipo di schema + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=l''operazione \"{0}\" verr\u00E0 ignorata: impossibile gestire le operazioni per lo stile del documento +wsdlmodeler.warning.bindingOperation.multiplePartBinding=Controllare l''associazione \"{0}\" dell''operazione astratta, la parte \"{1}\" ha pi\u00F9 associazioni. Verr\u00E0 comunque tentato di generare gli artifact... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=associazione \"{0}\" dell''operazione astratta, la parte \"{1}\" ha pi\u00F9 associazioni. +wsdlmodeler.warning.ignoringFaults=gli errori dichiarati dall''operazione \"{0}\" verranno ignorati +wsdlmodeler.warning.ignoringFault.notEncoded=l''errore del valore \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorato +wsdlmodeler.warning.ignoringFault.notLiteral=l''errore codificato \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorato +wsdlmodeler.invalid.operation.fault.notLiteral=l''errore codificato \"{0}\" nell''operazione di associazione del valore \"{1}\" verr\u00E0 ignorato +wsdlmodeler.warning.ignoringHeader=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata +wsdlmodeler.warning.ignoringHeader.partFromBody=parte dell''intestazione: \"{0}\" gi\u00E0 associata da soapbind:body. L''operazione di associazione della parte due volte non \u00E8 valida +wsdlmodeler.warning.ignoringHeader.notLiteral=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: non \u00E8 un valore +wsdlmodeler.invalid.header.notLiteral=Intestazione \"{0}\" dell''operazione di associazione \"{1}\" non valida: non \u00E8 un valore +wsdlmodeler.warning.ignoringHeader.notFound=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: non trovata +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=intestazione \"{0}\" dell''operazione di associazione \"{1}\": non trovata +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: impossibile risolvere il messaggio +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=intestazione \"{0}\" dell''operazione di associazione \"{1}\": impossibile risolvere il messaggio + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=l''errore \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorato: impossibile risolvere il messaggio +wsdlmodeler.invalid.fault.cant.resolve.message=impossibile risolvere il messaggio di errore \"{0}\" nell''operazione di associazione \"{1}\" + +wsdlmodeler.warning.ignoringHeader.notEncoded=l''intestazione \"{0}\" dell''operazione di associazione \"{1}\" verr\u00E0 ignorata: non ha una codifica SOAP +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=l''intestazione \"{0}\" dell''operazione \"{1}\" verr\u00E0 ignorata: parte non trovata +# +wsdlmodeler.warning.ignoringOperation.notLiteral=l''operazione \"{0}\" per lo stile del documento verr\u00E0 ignorata: i parametri non sono valori +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: pi\u00F9 parti nel messaggio di input +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: il messaggio di input \u00E8 vuoto +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: pi\u00F9 parti nel messaggio di output +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=L''operazione \"{0}\" viene ignorata: pi\u00F9 parti associate al corpo +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=operazione \"{0}\": pi\u00F9 parti associate al corpo +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=l''operazione \"{0}\" verr\u00E0 ignorata: il messaggio di output \u00E8 vuoto +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=l''operazione \"{0}\" verr\u00E0 ignorata: lo stile di associazione e quello dell''operazione sono in conflitto +wsdlmodeler.warning.ignoringOperation.partNotFound=l''operazione \"{0}\" verr\u00E0 ignorata: parte \"{1}\" non trovata +wsdlmodeler.error.partNotFound=impossibile risolvere la parte \"{1}\" dell''operazione \"{0}\" +wsdlmodeler.warning.ignoringFault.documentOperation=l''errore \"{0}\" dell''operazione per lo stile del documento \"{1}\" verr\u00E0 ignorato +wsdlmodler.warning.operation.use=Il WSDL usato comprende operazioni con uso \"literal\" e \"encoded\". -f:searchschema non supportato in questo scenario. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=il nome di soap:fault \"{0}\" non corrisponde al nome di wsdl:fault \"{1}\" nell''operazione \"{2}\" +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=nome di soap:fault non specificato, wsdl:fault \"{0}\" nell''operazione \"{1}\" + +wsdlmodeler.duplicate.fault.part.name=l''errore \"{0}\" dell''operazione \"{1}\" verr\u00E0 ignorato: il nome parte \"{2}\" non \u00E8 univoco +wsdlmodeler.duplicate.fault.soap.name=l''errore \"{0}\" dell''operazione \"{1}\" verr\u00E0 ignorato: il nome soap:fault \"{2}\" non \u00E8 univoco + +wsdlmodeler.warning.ignoringHeaderFault.notFound=l''errore di intestazione \"{0}\" verr\u00E0 ignorato: impossibile trovare la parte \"{1}\" nell''associazione \"{2}\" +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=l''errore di intestazione part=\"{0}\" message=\"{1}\" dell''operazione {2} verr\u00E0 ignorato. L''attributo di uso deve essere \"literal\" + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=l''errore di intestazione part=\"{0}\" message=\"{1}\" dell''operazione {2} verr\u00E0 ignorato + +wsdlmodeler.invalid.headerfault.notLiteral=Errore di intestazione \"{0}\" dell''operazione di associazione \"{1}\" non valido: non \u00E8 un valore +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=Errore di intestazione \"{0}\" non valido per l''intestazione {1} nell''operazione {2}: la parte deve specificare un attributo \"element\" +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=Intestazione \"{0}\" non valida nell''operazione {1}: la parte deve specificare un attributo \"element\" + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=\u00C8 stato usato un WS-I WSDL non conforme per wsdl:import +wsdlmodeler.warning.nonconforming.wsdl.types=\u00C8 stato usato un WS-I WSDL non conforme per wsdl:types +wsdlmodeler.warning.nonconforming.wsdl.use=Elaborazione dell''operazione \"{0}\" non conforme a WS-I con stile RPC e codifica SOAP + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=parti \"{0}\" non trovate nel messaggio \"{1}\": WSDL errato + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=La porta SOAP \"{0}\": usa un''associazione SOAP 1.2 non standard. +wsdlmodeler.warning.ignoringSOAPBinding12=La porta SOAP \"{0}\" verr\u00E0 ignorata: usa un''associazione SOAP 1.2 non standard.\nPer usare questa associazione, \u00E8 necessario specificare l''opzione \"-extension\". + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile ver. 1.0, attributo namespace non consentito in doc/lit per {0}: \"{1}\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile ver. 1.0, attributo namespace non consentito in doc/lit o rpc/lit per {0}: \"{1}\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=L''operazione \"{0}\" verr\u00E0 ignorata. La struttura Multipart/Related ha una parte radice non valida: sono state trovate pi\u00F9 parti soap:body + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Intestazioni non in mime:part radice con soap:body. Le intestazioni nell''operazione \"{0}\" verranno ignorate. + +# R2909 +mimemodeler.invalidMimeContent.differentPart=mime:part verr\u00E0 ignorato. mime:part non valido, mime:content ha un attributo part diverso. + +mimemodeler.invalidMimeContent.invalidSchemaType=mime:part verr\u00E0 ignorato. mime part: {0} non pu\u00F2 essere mappato al tipo di schema: {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=L''elemento wsdl:part a cui fa riferimento l''attributo part mime:content: {0} deve essere definito usando l''attributo type. + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=L''operazione \"{0}\" verr\u00E0 ignorata, attributo part mancante in mime:content. L''attributo part deve essere presente nella dichiarazione mime:content. + +mimemodeler.invalidMimeContent.missingTypeAttribute=Attributo type mancante in mime:content nell''operazione \"{0}\". L''attributo part deve essere presente nella dichiarazione mime:content. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=Tipo di schema: {1} sconosciuto per la parte mime:content: {0} +mimemodeler.invalidMimeContent.errorLoadingJavaClass=Impossibile trovare la classe \"{0}\" per il tipo MIME \"{1}\" + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=mime:part verr\u00E0 ignorato. Impossibile trovare la parte \"{0}\" a cui viene fatto riferimento da mime:content in wsdl:operation \"{1}\" + +mimemodeler.elementPart.invalidElementMimeType=La parte mime:content fa riferimento a wsdl:part \"{0}\" definita usando l''attributo element. Assicurarsi che il tipo MIME: \"{1}\" sia appropriato per serializzare XML. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=L''attributo name su wsdl:part nell''operazione \"{0}\" viene ignorato. Non \u00E8 consentito come per WS-I AP 1.0. + + +wsdlmodeler20.rpcenc.not.supported=I WSDL RPC/codificati non sono supportati in JAXWS 2.0. +wsdlmodeler.warning.ignoringOperation.notNCName=L''operazione \"{0}\" verr\u00E0 ignorata poich\u00E9 nel nome \u00E8 contenuto il carattere non valido ''{1}''. Il valore - jaxws dell''operazione rpc-literal non sar\u00E0 in grado di serializzarlo. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il metodo Java. Il parametro: part "{2}\" in wsdl:message \"{1}\", \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro o il nome di wsdl:part. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Operazione \"{0}\" non valida: impossibile generare il metodo Java. Il parametro: part "{2}\" in wsdl:message \"{1}\", \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro o il nome di wsdl:part. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il parametro del metodo Java. Il nome locale dell''elemento figlio del wrapper "{1}\" nell''elemento globale \"{2}\" \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Operazione \"{0}\" non valida: impossibile generare il parametro del metodo Java. Il nome locale dell''elemento figlio del wrapper "{1}\" nell''elemento globale \"{2}\" \u00E8 una parola chiave Java. Usare la personalizzazione per modificare il nome del parametro. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il metodo Java. Il nome personalizzato del parametro "{1}\" \u00E8 una parola chiave Java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Operazione \"{0}\" non valida: impossibile generare il metodo Java. Il nome personalizzato del parametro "{1}\" \u00E8 una parola chiave Java. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=L''operazione \"{0}\" verr\u00E0 ignorata: \u00E8 una parola riservata Java e non pu\u00F2 generare il metodo Java. Usare la personalizzazione per modificare il nome dell''operazione. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Operazione \"{0}\" non valida: \u00E8 una parola riservata Java e non pu\u00F2 generare il metodo Java. Usare la personalizzazione per modificare il nome dell''operazione. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=L''operazione \"{0}\" verr\u00E0 ignorata: impossibile generare il metodo Java. Il nome personalizzato "{1}\" di wsdl:operation \u00E8 una parola chiave Java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Operazione \"{0}\" non valida: impossibile generare il metodo Java. Il nome personalizzato "{1}\" di wsdl:operation \u00E8 una parola chiave Java. + +wsdlmodeler.jaxb.javatype.notfound=Il descrittore dello schema {0} nella parte del messaggio \"{1}\" non \u00E8 definito e non pu\u00F2 essere associato a Java. Il descrittore dello schema {0} potrebbe non essere definito nello schema importato/incluso in WSDL. \u00C8 possibile aggiungere tali importazioni/inclusioni oppure eseguire wsimport e fornire la posizione dello schema usando il parametro -b. +wsdlmodeler.unsupportedBinding.mime=Associazione MIME WSDL attualmente non supportata + +wsdlmodeler.nonUnique.body.error=Parti del corpo non univoche. In una porta, come per BP 1.1 R2710, le operazioni devono avere una firma dell''operazione univoca in rete affinch\u00E9 la spedizione riesca. Nella porta {0}, le operazioni \"{1}\" e \"{2}\" hanno lo stesso blocco del corpo della richiesta {3}. Se si prova a eseguire wsimport con il parametro -extension, runtime prover\u00E0 a spedire usando SOAPAction +wsdlmodeler.nonUnique.body.warning=Parti del corpo non univoche. In una porta, come per BP 1.1 R2710, le operazioni devono avere una firma dell''operazione univoca in rete affinch\u00E9 la spedizione riesca. Nella porta {0}, le operazioni \"{1}\" e \"{2}\" hanno lo stesso blocco del corpo della richiesta {3}. Se il metodo di spedizione non riesce, runtime prover\u00E0 a spedire usando SOAPAction + +wsdlmodeler.rpclit.unkownschematype=Impossibile risolvere il tipo XML \"{0}\". Associazione di XML a JAVA non riuscita. Controllare wsdl:part \"{1}\" in wsdl:message \"{2}\". + +wsdlmodeler.responsebean.notfound=Generazione del bean di risposta asincrona da parte di wsimport non riuscita per l''operazione: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties new file mode 100644 index 00000000000..8f6c36ac7c1 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ja.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=\u30E2\u30C7\u30E9\u30FC\u30FB\u30A8\u30E9\u30FC: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=\u7121\u52B9\u306A\u64CD\u4F5C: {0} +wsdlmodeler.invalidState.modelingOperation=\u64CD\u4F5C\u306E\u30E2\u30C7\u30EA\u30F3\u30B0\u6642\u306E\u7121\u52B9\u306A\u72B6\u614B: {0} +wsdlmodeler.resultIsInOutParameter=\u7D50\u679C\u3068\u3057\u3066\u64CD\u4F5C: {0}\u306B\"inout\"\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u8A2D\u5B9A\u3055\u308C\u307E\u3059 +wsdlmodeler.invalid.parameterorder.parameter=\u64CD\u4F5C\"{1}\"\u306EparameterOrder\u5C5E\u6027\u306B\u6307\u5B9A\u3055\u308C\u305F\"{0}\"\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u6709\u52B9\u306A\u30D1\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=2\u3064\u4EE5\u4E0A\u306E\u30D1\u30FC\u30C8\u304C\u64CD\u4F5C\"{0}\"\u306EparameterOrder\u5C5E\u6027\u306B\u6B8B\u3055\u308C\u3066\u3044\u307E\u3059 +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\u64CD\u4F5C\"{0}\"\u306EparameterOrder\u5C5E\u6027\u304C\u7121\u52B9\u3067\u3059\u3002parameterOrder\u30D2\u30F3\u30C8\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodeler.invalid.parameter.differentTypes=\u64CD\u4F5C\"{1}\"\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\"{0}\"\u304C\u3001\u5165\u529B\u304A\u3088\u3073\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u305D\u308C\u305E\u308C\u7570\u306A\u308B\u30BF\u30A4\u30D7\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 +wsdlmodeler.invalid.bindingOperation.notInPortType=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{1}\"\u3067\u3001\u64CD\u4F5C\"{0}\"\u304C\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001SOAP\u672C\u6587\u306E\u62E1\u5F35\u306F\u3042\u308A\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001SOAP\u672C\u6587\u306E\u62E1\u5F35\u306F\u3042\u308A\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{1}\"\u3067\u3001\u64CD\u4F5C\"{0}\"\u304C\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u306E\u4E00\u610F\u306E\u64CD\u4F5C\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.invalid.bindingOperation.notFound=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{1}\"\u3067\u3001\u64CD\u4F5C\"{0}\"\u304C\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u306E\u3069\u306E\u64CD\u4F5C\u306B\u3082\u4E00\u81F4\u3057\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u5165\u529B\u30D8\u30C3\u30C0\u30FC\"{1}\"\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{0}\"\u306E\u51FA\u529B\u30D8\u30C3\u30C0\u30FC\"{1}\"\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u64CD\u4F5C\u306E2\u3064\u4EE5\u4E0A\u306E\u30D5\u30A9\u30EB\u30C8\u3068\u4E00\u81F4\u3057\u3066\u3044\u307E\u3059 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7\u64CD\u4F5C\u306E\u3069\u306E\u30D5\u30A9\u30EB\u30C8\u3068\u3082\u4E00\u81F4\u3057\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=portType\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\u306E\u3069\u306E\u30D5\u30A9\u30EB\u30C8\u3068\u3082\u4E00\u81F4\u3057\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u306B\u306F\u3001SOAP\u30D5\u30A9\u30EB\u30C8\u306E\u62E1\u5F35\u306F\u3042\u308A\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u306B\u306F\u3001\"name\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u306B\u306F\u3001\"namespace\"\u5C5E\u6027\u306E\u5024\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.invalid.bindingFault.emptyMessage=\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u30E1\u30C3\u30BB\u30FC\u30B8\"{1}\"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u30E1\u30C3\u30BB\u30FC\u30B8\"{1}\"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u306F\u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059 +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\u30E1\u30C3\u30BB\u30FC\u30B8\"{0}\"\u3067\u306F\u3001\u30D1\u30FC\u30C8\"{1}\"\u306B\"element\"\u5C5E\u6027\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=\u6B21\u306E\u30CD\u30FC\u30DF\u30F3\u30B0\u306E\u7AF6\u5408\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u3092\u7121\u8996\u3057\u307E\u3059(\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30F3): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes={0}\u306E\u8A8D\u8B58\u3067\u304D\u306A\u3044\u30BF\u30A4\u30D7\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F +wsdlmodeler.warning.noServiceDefinitionsFound=WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u30B5\u30FC\u30D3\u30B9\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.warning.noPortsInService=\u30B5\u30FC\u30D3\u30B9\"{0}\"\u306B\u4F7F\u7528\u53EF\u80FD\u306A\u30DD\u30FC\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +wsdlmodeler.warning.noOperationsInPort=\u30DD\u30FC\u30C8\"{0}\"\u306B\u4F7F\u7528\u53EF\u80FD\u306A\u64CD\u4F5C\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringNonSOAPPort=\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u6A19\u6E96SOAP\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=\u30DD\u30FC\u30C8\"{0}\": \u6A19\u6E96SOAP\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u751F\u6210\u3055\u308C\u305F\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u306FJAX-WS\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u306F\u52D5\u4F5C\u3057\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: SOAP\u30A2\u30C9\u30EC\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=\u30DD\u30FC\u30C8\"{0}\"\u306FSOAP\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002soap:address\u304C\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:SOAP\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u8A8D\u8B58\u3067\u304D\u306A\u3044\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u3067\u3059\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: WS-I BP 1.1\u6E96\u62E0\u3067\u306F\u3042\u308A\u307E\u305B\u3093: WSDL\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u8907\u5408\u30B9\u30BF\u30A4\u30EB\u304C\u542B\u307E\u308C\u307E\u3059\u3002RPC\u30EA\u30C6\u30E9\u30EB\u307E\u305F\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EA\u30C6\u30E9\u30EB\u306E\u64CD\u4F5C\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=WS-I BP1.1\u6E96\u62E0\u306ESOAP\u30DD\u30FC\u30C8\"{0}\"\u3067\u306F\u3042\u308A\u307E\u305B\u3093: WSDL\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u8907\u5408\u30B9\u30BF\u30A4\u30EB\u304C\u542B\u307E\u308C\u307E\u3059\u3002RPC\u30EA\u30C6\u30E9\u30EB\u307E\u305F\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EA\u30C6\u30E9\u30EB\u306E\u64CD\u4F5C\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002request-response\u3067\u306A\u3044\u304B\u3001\u4E00\u65B9\u5411\u3067\u3059 +wsdlmodeler.invalid.operation.notSupportedStyle=wsdl:portType \"{1}\"\u306EWSDL\u3001wsdl:operation \"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002request-response\u3068one-way\u306E\u3069\u3061\u3089\u3067\u3082\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringOperation.notEncoded=RPC\u30B9\u30BF\u30A4\u30EB\u306E\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \"soap:body\"\u8981\u7D20\u306E\"parts\"\u5C5E\u6027\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093 + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u3053\u308C\u306F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30EA\u30C6\u30E9\u30EB\u64CD\u4F5C\u3067\u3059\u3002\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u8981\u7D20\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u3053\u308C\u306FRPC\u30EA\u30C6\u30E9\u30EB\u64CD\u4F5C\u3067\u3059\u3002\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\u304C\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7\u306E\u5BA3\u8A00\u3092\u53C2\u7167\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30B9\u30BF\u30A4\u30EB\u64CD\u4F5C\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093 +wsdlmodeler.warning.bindingOperation.multiplePartBinding=\u62BD\u8C61\u64CD\u4F5C\"{0}\"\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30D1\u30FC\u30C8\"{1}\"\u306B\u8907\u6570\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u751F\u6210\u3055\u308C\u305F\u30A2\u30FC\u30C6\u30A3\u30D5\u30A1\u30AF\u30C8\u3092\u8A66\u884C\u3057\u307E\u3059... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\u62BD\u8C61\u64CD\u4F5C\"{0}\"\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3067\u3059\u3002\u30D1\u30FC\u30C8\"{1}\"\u306B\u8907\u6570\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u542B\u307E\u308C\u307E\u3059\u3002 +wsdlmodeler.warning.ignoringFaults=\u64CD\u4F5C\"{0}\"\u3067\u5BA3\u8A00\u3055\u308C\u305F\u30D5\u30A9\u30EB\u30C8\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodeler.warning.ignoringFault.notEncoded=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30EA\u30C6\u30E9\u30EB\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodeler.warning.ignoringFault.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodeler.invalid.operation.fault.notLiteral=\u30EA\u30C6\u30E9\u30EB\u30FB\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodeler.warning.ignoringHeader=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodeler.warning.ignoringHeader.partFromBody=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D1\u30FC\u30C8: \"{0}\"\u306F\u3059\u3067\u306Bsoapbind:body\u306B\u3088\u308A\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D1\u30FC\u30C8\u30922\u56DE\u30D0\u30A4\u30F3\u30C9\u3059\u308B\u306E\u306F\u4E0D\u6B63\u3067\u3059 +wsdlmodeler.warning.ignoringHeader.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.invalid.header.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringHeader.notFound=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u898B\u3064\u304B\u308A\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\": \u898B\u3064\u304B\u308A\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093 +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\": \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093 + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093 +wsdlmodeler.invalid.fault.cant.resolve.message=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\"{0}\"\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F + +wsdlmodeler.warning.ignoringHeader.notEncoded=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002SOAP\u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30D1\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +# +wsdlmodeler.warning.ignoringOperation.notLiteral=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B9\u30BF\u30A4\u30EB\u306E\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u5165\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7A7A\u3067\u3059 +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u672C\u6587\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059 +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\u64CD\u4F5C\"{0}\": \u8907\u6570\u306E\u30D1\u30FC\u30C8\u304C\u672C\u6587\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059 +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u51FA\u529B\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7A7A\u3067\u3059 +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30B9\u30BF\u30A4\u30EB\u304A\u3088\u3073\u64CD\u4F5C\u30B9\u30BF\u30A4\u30EB\u304C\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 +wsdlmodeler.warning.ignoringOperation.partNotFound=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u30D1\u30FC\u30C8\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +wsdlmodeler.error.partNotFound=\u64CD\u4F5C\"{0}\"\u306E\u30D1\u30FC\u30C8\"{1}\"\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002 +wsdlmodeler.warning.ignoringFault.documentOperation=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30B9\u30BF\u30A4\u30EB\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059 +wsdlmodler.warning.operation.use=\u4F7F\u7528\u3055\u308C\u305FWSDL\u306B\u306F\u3001use\u5C5E\u6027\u304Cliteral\u304A\u3088\u3073encoded\u4F7F\u7528\u306E\u64CD\u4F5C\u304C\u3042\u308A\u307E\u3059\u3002-f:searchschema\u306F\u3001\u3053\u306E\u4E8B\u4F8B\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u307E\u305B\u3093\u3002 +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=soap:fault \"{0}\"\u306E\u540D\u524D\u304C\u64CD\u4F5C\"{2}\"\u306Ewsdl:fault \"{1}\"\u306E\u540D\u524D\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault\u306E\u540D\u524D\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u64CD\u4F5C\"{1}\"\u306Ewsdl:fault \"{0}\" + +wsdlmodeler.duplicate.fault.part.name=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30FC\u30C8\u540D\"{2}\"\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.duplicate.fault.soap.name=\u64CD\u4F5C\"{1}\"\u306E\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002soap:fault\u540D\"{2}\"\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +wsdlmodeler.warning.ignoringHeaderFault.notFound=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{2}\"\u306B\u30D1\u30FC\u30C8\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=\u64CD\u4F5C{2}\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8part=\"{0}\" message=\"{1}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002use\u5C5E\u6027\u306F\"literal\"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=\u64CD\u4F5C{2}\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8part=\"{0}\" message=\"{1}\"\u3092\u7121\u8996\u3057\u307E\u3059 + +wsdlmodeler.invalid.headerfault.notLiteral=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\"{1}\"\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30EA\u30C6\u30E9\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=\u64CD\u4F5C{2}\u306E\u30D8\u30C3\u30C0\u30FC{1}\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A9\u30EB\u30C8\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30D1\u30FC\u30C8\u3067\u306F\"element\"\u5C5E\u6027\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=\u64CD\u4F5C{1}\u306E\u30D8\u30C3\u30C0\u30FC\"{0}\"\u304C\u7121\u52B9\u3067\u3059: \u30D1\u30FC\u30C8\u3067\u306F\"element\"\u5C5E\u6027\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=\u6E96\u62E0\u3057\u306A\u3044WS-I WSDL\u304Cwsdl:import\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 +wsdlmodeler.warning.nonconforming.wsdl.types=\u6E96\u62E0\u3057\u306A\u3044WS-I WSDL\u304Cwsdl:types\u306B\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 +wsdlmodeler.warning.nonconforming.wsdl.use=RPC\u30B9\u30BF\u30A4\u30EB\u3067\u3042\u308ASOAP\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305FWS-I\u975E\u6E96\u62E0\u306E\u64CD\u4F5C\"{0}\"\u3092\u51E6\u7406\u3057\u3066\u3044\u307E\u3059 + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=\u30D1\u30FC\u30C8\"{0}\"\u304C\u30E1\u30C3\u30BB\u30FC\u30B8\"{1}\"\u306B\u3042\u308A\u307E\u305B\u3093\u3002\u9593\u9055\u3063\u305FWSDL\u3067\u3059 + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=SOAP\u30DD\u30FC\u30C8\"{0}\": \u975E\u6A19\u6E96SOAP 1.2\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002 +wsdlmodeler.warning.ignoringSOAPBinding12=SOAP\u30DD\u30FC\u30C8\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059: \u3053\u308C\u306F\u975E\u6A19\u6E96SOAP 1.2\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\n\u3053\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001\"-extension\"\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile\u30D0\u30FC\u30B8\u30E7\u30F31.0\u3001{0}\u306B\u3064\u3044\u3066doc/lit\u3067\u306Fnamespace\u5C5E\u6027\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: \"{1}\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile\u30D0\u30FC\u30B8\u30E7\u30F31.0\u3001{0}\u306B\u3064\u3044\u3066doc/lit\u307E\u305F\u306Frpc/lit\u3067\u306Fnamespace\u5C5E\u6027\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093: \"{1}\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002Multipart/Related\u69CB\u9020\u306B\u7121\u52B9\u306A\u30EB\u30FC\u30C8\u30FB\u30D1\u30FC\u30C8\u304C\u542B\u307E\u308C\u307E\u3059: \u8907\u6570\u306Esoap:body\u30D1\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=\u30D8\u30C3\u30C0\u30FC\u306F\u30EB\u30FC\u30C8\u306Emime:part\u306Bsoap:body\u3068\u3068\u3082\u306B\u3042\u308A\u307E\u305B\u3093\u3002\u64CD\u4F5C\"{0}\"\u306E\u30D8\u30C3\u30C0\u30FC\u3092\u7121\u8996\u3057\u307E\u3059 + +# R2909 +mimemodeler.invalidMimeContent.differentPart=mime:part\u3092\u7121\u8996\u3057\u307E\u3059\u3002mime:part\u304C\u7121\u52B9\u3067\u3059\u3002mime:content\u306B\u306F\u7570\u306A\u308Bpart\u5C5E\u6027\u304C\u542B\u307E\u308C\u307E\u3059\u3002 + +mimemodeler.invalidMimeContent.invalidSchemaType=mime:part\u3092\u7121\u8996\u3057\u307E\u3059\u3002MIME\u30D1\u30FC\u30C8: {0}\u306F\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7: {1}\u306B\u30DE\u30C3\u30D7\u3067\u304D\u307E\u305B\u3093 + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part\u8981\u7D20\u304Cmime:content\u306Epart\u5C5E\u6027\u306B\u3088\u308A\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059: {0}\u306Ftype\u5C5E\u6027\u3092\u4F7F\u7528\u3057\u3066\u5B9A\u7FA9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002mime:content\u306Bpart\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002mime:content\u5BA3\u8A00\u306Bpart\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 + +mimemodeler.invalidMimeContent.missingTypeAttribute=\u64CD\u4F5C\"{0}\"\u306Emime:content\u306Btype\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093\u3002mime:content\u5BA3\u8A00\u306Bpart\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=mime:content part: {0}\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30BF\u30A4\u30D7: {1}\u304C\u4E0D\u660E\u3067\u3059 +mimemodeler.invalidMimeContent.errorLoadingJavaClass=MIME\u30BF\u30A4\u30D7\"{1}\"\u306E\u30AF\u30E9\u30B9\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=mime:part\u3092\u7121\u8996\u3057\u307E\u3059\u3002wsdl:operation \"{1}\"\u306Emime:content\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\u30D1\u30FC\u30C8\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 + +mimemodeler.elementPart.invalidElementMimeType=mime:content\u306Epart\u306F\u3001\u8981\u7D20\u5C5E\u6027\u3092\u4F7F\u7528\u3057\u3066\u5B9A\u7FA9\u3055\u308C\u305Fwsdl:part \"{0}\"\u3092\u53C2\u7167\u3057\u3066\u3044\u307E\u3059\u3002MIME\u30BF\u30A4\u30D7: \"{1}\"\u304CXML\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306B\u9069\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=\u64CD\u4F5C\"{0}\"\u306Ewsdl:part\u306Ename\u5C5E\u6027\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FWS-I AP 1.0\u3067\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 + + +wsdlmodeler20.rpcenc.not.supported=rpc/encoded wsdl\u306FJAXWS 2.0\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +wsdlmodeler.warning.ignoringOperation.notNCName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u540D\u524D\u306B\u4E0D\u6B63\u306A\u6587\u5B57''{1}''\u304C\u542B\u307E\u308C\u307E\u3059\u3002RPC\u30EA\u30C6\u30E9\u30EB\u64CD\u4F5C\u306Ejaxws\u3067\u306F\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3067\u304D\u307E\u305B\u3093\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF: wsdl:message \"{1}\"\u306E\u30D1\u30FC\u30C8"{2}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3059\u308B\u304B\u3001wsdl:part\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF: wsdl:message \"{1}\"\u306E\u30D1\u30FC\u30C8"{2}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3059\u308B\u304B\u3001wsdl:part\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\"{2}\"\u306E\u30E9\u30C3\u30D1\u30FC\u306E\u5B50\"{1}\"\u306E\u30ED\u30FC\u30AB\u30EB\u540D\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30B0\u30ED\u30FC\u30D0\u30EB\u8981\u7D20\"{2}\"\u306E\u30E9\u30C3\u30D1\u30FC\u306E\u5B50\"{1}\"\u306E\u30ED\u30FC\u30AB\u30EB\u540D\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u4E88\u7D04\u8A9E\u3067\u3042\u308A\u3001Java\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u64CD\u4F5C\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u4E88\u7D04\u8A9E\u3067\u3042\u308A\u3001Java\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3092\u4F7F\u7528\u3057\u3066\u64CD\u4F5C\u540D\u3092\u5909\u66F4\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\u64CD\u4F5C\"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002wsdl:operation\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\u64CD\u4F5C\"{0}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u308C\u306FJava\u30E1\u30BD\u30C3\u30C9\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093\u3002wsdl:operation\u306E\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u3055\u308C\u305F\u540D\u524D\"{1}\"\u306FJava\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u3059\u3002 + +wsdlmodeler.jaxb.javatype.notfound=\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D1\u30FC\u30C8\"{1}\"\u306E\u30B9\u30AD\u30FC\u30DE\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u304A\u3089\u305A\u3001Java\u306B\u30D0\u30A4\u30F3\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B9\u30AD\u30FC\u30DE\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF{0}\u304CWSDL\u306B\u30A4\u30F3\u30DD\u30FC\u30C8/\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3055\u308C\u305F\u30B9\u30AD\u30FC\u30DE\u3067\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u3053\u3046\u3057\u305F\u30A4\u30F3\u30DD\u30FC\u30C8/\u30A4\u30F3\u30AF\u30EB\u30FC\u30C9\u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001wsimport\u3092\u5B9F\u884C\u3057\u3001-b\u30B9\u30A4\u30C3\u30C1\u3092\u4F7F\u7528\u3057\u3066\u30B9\u30AD\u30FC\u30DE\u306E\u5834\u6240\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002 +wsdlmodeler.unsupportedBinding.mime=WSDL MIME\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u73FE\u5728\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 + +wsdlmodeler.nonUnique.body.error=\u672C\u6587\u30D1\u30FC\u30C8\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30DD\u30FC\u30C8\u306B\u304A\u3044\u3066BP 1.1 R2710\u306E\u3068\u304A\u308A\u3001\u6B63\u5E38\u306B\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u3059\u308B\u305F\u3081\u306B\u64CD\u4F5C\u306B\u306F\u901A\u4FE1\u4E0A\u306B\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30DD\u30FC\u30C8{0}\u3067\u306F\u3001\u64CD\u4F5C\"{1}\"\u304A\u3088\u3073\"{2}\"\u306B\u540C\u3058\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF{3}\u304C\u3042\u308A\u307E\u3059\u3002-extension\u30B9\u30A4\u30C3\u30C1\u3092\u6307\u5B9A\u3057\u3066wsimport\u3092\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066SOAPAction\u3092\u4F7F\u7528\u3057\u305F\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u8A66\u884C\u3055\u308C\u307E\u3059 +wsdlmodeler.nonUnique.body.warning=\u672C\u6587\u30D1\u30FC\u30C8\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30DD\u30FC\u30C8\u306B\u304A\u3044\u3066BP 1.1 R2710\u306E\u3068\u304A\u308A\u3001\u6B63\u5E38\u306B\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u3059\u308B\u305F\u3081\u306B\u64CD\u4F5C\u306B\u306F\u901A\u4FE1\u4E0A\u306B\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30DD\u30FC\u30C8{0}\u3067\u306F\u3001\u64CD\u4F5C\"{1}\"\u304A\u3088\u3073\"{2}\"\u306B\u540C\u3058\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF{3}\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u306F\u5931\u6557\u3057\u305F\u5834\u5408\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066SOAPAction\u3092\u4F7F\u7528\u3057\u305F\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u8A66\u884C\u3055\u308C\u307E\u3059 + +wsdlmodeler.rpclit.unkownschematype=XML\u30BF\u30A4\u30D7\"{0}\"\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002XML\u306EJAVA\u3078\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002wsdl:message \"{2}\"\u306Ewsdl:part \"{1}\"\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +wsdlmodeler.responsebean.notfound=wsimport\u3067\u64CD\u4F5C: {0}\u306E\u975E\u540C\u671F\u30EC\u30B9\u30DD\u30F3\u30B9Bean\u306E\u751F\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties new file mode 100644 index 00000000000..c3073685762 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_ko.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=\uBAA8\uB378\uB7EC \uC624\uB958: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=\uBD80\uC801\uD569\uD55C \uC791\uC5C5: {0} +wsdlmodeler.invalidState.modelingOperation=\uC791\uC5C5\uC744 \uBAA8\uB378\uB9C1\uD558\uB294 \uC911 \uBD80\uC801\uD569\uD55C \uC0C1\uD0DC \uBC1C\uC0DD: {0} +wsdlmodeler.resultIsInOutParameter=\uACB0\uACFC\uB294 \uC791\uC5C5\uC758 \"inout\" \uB9E4\uAC1C\uBCC0\uC218\uC784: {0} +wsdlmodeler.invalid.parameterorder.parameter=\"{1}\" \uC791\uC5C5\uC758 parameterOrder \uC18D\uC131\uC5D0 \uC9C0\uC815\uB41C \"{0}\"\uC740(\uB294) \uC801\uD569\uD55C \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=\"{0}\" \uC791\uC5C5\uC758 parameterOrder \uC18D\uC131\uC5D0 \uB204\uB77D\uB41C \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\"{0}\" \uC791\uC5C5\uC758 parameterOrder \uC18D\uC131\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. parameterOrder \uD78C\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodeler.invalid.parameter.differentTypes=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC785\uB825 \uBC0F \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0\uC11C \uB2E4\uB978 \uC720\uD615\uC73C\uB85C \uB098\uD0C0\uB0A9\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingOperation.notInPortType=\"{1}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{0}\" \uC791\uC5C5\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615\uC5D0 \uB098\uD0C0\uB098\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 SOAP \uBCF8\uBB38 \uD655\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 SOAP \uBCF8\uBB38 \uD655\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC5D0\uB294 \uD574\uB2F9 \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC5D0\uB294 \uD574\uB2F9 \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\"{1}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{0}\" \uC791\uC5C5\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615\uC758 \uACE0\uC720\uD55C \uC791\uC5C5\uC744 \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingOperation.notFound=\"{1}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{0}\" \uC791\uC5C5\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615\uC758 \uC791\uC5C5\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uC785\uB825 \uD5E4\uB354 \"{1}\"\uC5D0\uB294 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\uBC14\uC778\uB529 \uC791\uC5C5 \"{0}\"\uC758 \uCD9C\uB825 \uD5E4\uB354 \"{1}\"\uC5D0\uB294 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=\"{1}\" \uC791\uC5C5\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615 \uC791\uC5C5\uC758 \uACB0\uD568\uACFC \uB450 \uAC1C \uC774\uC0C1 \uC77C\uCE58\uD569\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=\"{1}\" \uC791\uC5C5\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC774 \uD574\uB2F9 \uD3EC\uD2B8 \uC720\uD615 \uC791\uC5C5\uC758 \uACB0\uD568\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=portType \uC791\uC5C5 \"{1}\"\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC774 \uD574\uB2F9 \uBC14\uC778\uB529 \uC791\uC5C5\uC758 \uACB0\uD568\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\"{1}\" \uC791\uC5C5\uC5D0\uC11C \uBC1C\uC0DD\uD55C \"{0}\" \uACB0\uD568\uC5D0 SOAP \uACB0\uD568 \uD655\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568\uC5D0\uB294 \"name\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568\uC5D0\uB294 \"namespace\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingFault.emptyMessage=\"{0}\" \uACB0\uD568\uC774 \"{1}\" \uBA54\uC2DC\uC9C0\uB97C \uCC38\uC870\uD558\uB098 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\"{0}\" \uACB0\uD568\uC774 \"{1}\" \uBA54\uC2DC\uC9C0\uB97C \uCC38\uC870\uD558\uB098 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\"{0}\" \uBA54\uC2DC\uC9C0\uC758 \"{1}\" \uBD80\uBD84\uC5D0\uB294 \"element\" \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=\uBC1C\uC0DD\uD55C \uC774\uB984 \uC9C0\uC815 \uCDA9\uB3CC: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\uC2A4\uD0A4\uB9C8 \uC694\uC18C(\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uBC84\uC804)\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes={0}\uAC1C\uC758 \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC720\uD615\uC744 \uBC1C\uACAC\uD588\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.noServiceDefinitionsFound=WSDL \uBB38\uC11C\uC5D0 \uC815\uC758\uB41C \uC11C\uBE44\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.noPortsInService=\"{0}\" \uC11C\uBE44\uC2A4\uC5D0 \uD3EC\uD568\uB41C \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uD3EC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. +wsdlmodeler.warning.noOperationsInPort=\"{0}\" \uD3EC\uD2B8\uAC00 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC5B4\uB5A4 \uC791\uC5C5\uB3C4 \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringNonSOAPPort=\"{0}\" \uD3EC\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uD45C\uC900 SOAP \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=\"{0}\" \uD3EC\uD2B8\uB294 \uD45C\uC900 SOAP \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. \uC0DD\uC131\uB41C \uC544\uD2F0\uD329\uD2B8\uAC00 JAX-WS \uB7F0\uD0C0\uC784\uC5D0\uC11C \uC791\uB3D9\uD558\uC9C0 \uC54A\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\"{0}\" \uD3EC\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uC9C0\uC815\uB41C SOAP \uC8FC\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=\"{0}\" \uD3EC\uD2B8\uB294 SOAP \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. soap:address\uB97C \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:SOAP \uD3EC\uD2B8 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911: \uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uC804\uC1A1\uC785\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=WS-I BP 1.1\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \"{0}\" \uD3EC\uD2B8\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: WSDL \uBC14\uC778\uB529\uC5D0 \uD63C\uD569 \uC2A4\uD0C0\uC77C\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. RPC \uB9AC\uD130\uB7F4 \uB610\uB294 \uBB38\uC11C \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=WS-I BP1.1\uACFC \uD638\uD658\uB418\uC9C0 \uC54A\uB294 SOAP \uD3EC\uD2B8 \"{0}\": WSDL \uBC14\uC778\uB529\uC5D0 \uD63C\uD569 \uC2A4\uD0C0\uC77C\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. RPC \uB9AC\uD130\uB7F4 \uB610\uB294 \uBB38\uC11C \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4! + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\"{0}\" \uC791\uC5C5 \uBB34\uC2DC \uC911: \uC694\uCCAD-\uC751\uB2F5 \uB610\uB294 \uB2E8\uBC29\uD5A5\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.invalid.operation.notSupportedStyle=wsdl:portType \"{1}\"\uC5D0 wsdl:operation \"{0}\"\uC774(\uAC00) \uC788\uB294 \uBD80\uC801\uD569\uD55C WSDL: \uC694\uCCAD-\uC751\uB2F5 \uB610\uB294 \uB2E8\uBC29\uD5A5\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.notEncoded=RPC \uC2A4\uD0C0\uC77C \uC791\uC5C5 \"{0}\" \uBB34\uC2DC \uC911: \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC778\uCF54\uB529\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \"soap:body\" \uC694\uC18C\uC758 \"parts\" \uC18D\uC131\uC744 \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC774 \uC2A4\uD0A4\uB9C8 \uC694\uC18C \uC120\uC5B8\uC744 \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.invalid.doclitoperation=\uBD80\uC801\uD569\uD55C wsdl:operation \"{0}\": \uBB38\uC11C \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC785\uB2C8\uB2E4. \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC740 \uC2A4\uD0A4\uB9C8 \uC694\uC18C \uC120\uC5B8\uC744 \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC774 \uC2A4\uD0A4\uB9C8 \uC720\uD615 \uC120\uC5B8\uC744 \uCC38\uC870\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.invalid.rpclitoperation=\uBD80\uC801\uD569\uD55C wsdl:operation \"{0}\": RPC \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC785\uB2C8\uB2E4. \uBA54\uC2DC\uC9C0 \uBD80\uBD84\uC740 \uC2A4\uD0A4\uB9C8 \uC720\uD615 \uC120\uC5B8\uC744 \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4. + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0 \uC2A4\uD0C0\uC77C \uC791\uC5C5\uC744 \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.bindingOperation.multiplePartBinding=\uCD94\uC0C1 \uC791\uC5C5 \"{0}\" \uBC14\uC778\uB529\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \"{1}\" \uBD80\uBD84\uC5D0 \uBC14\uC778\uB529\uC774 \uC5EC\uB7EC \uAC1C \uC788\uC2B5\uB2C8\uB2E4. \uC544\uD2F0\uD329\uD2B8 \uC0DD\uC131\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4. +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\uCD94\uC0C1 \uC791\uC5C5 \"{0}\" \uBC14\uC778\uB529\uC785\uB2C8\uB2E4. \"{1}\" \uBD80\uBD84\uC5D0 \uBC14\uC778\uB529\uC774 \uC5EC\uB7EC \uAC1C \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringFaults=\"{0}\" \uC791\uC5C5\uC73C\uB85C \uC120\uC5B8\uB41C \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodeler.warning.ignoringFault.notEncoded=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uB9AC\uD130\uB7F4 \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodeler.warning.ignoringFault.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uC778\uCF54\uB529\uB41C \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodeler.invalid.operation.fault.notLiteral=\uB9AC\uD130\uB7F4 \uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uC778\uCF54\uB529\uB41C \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodeler.warning.ignoringHeader=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodeler.warning.ignoringHeader.partFromBody=\uD5E4\uB354 \uBD80\uBD84 \"{0}\"\uC774(\uAC00) soapbind:body\uC5D0 \uC758\uD574 \uC774\uBBF8 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uBD80\uBD84\uC744 \uB450 \uBC88 \uBC14\uC778\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringHeader.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.invalid.header.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \"{0}\": \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringHeader.notFound=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354: \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354: \uBA54\uC2DC\uC9C0\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBA54\uC2DC\uC9C0\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.invalid.fault.cant.resolve.message=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uACB0\uD568 \uBA54\uC2DC\uC9C0 \"{0}\"\uC744(\uB97C) \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringHeader.notEncoded=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: SOAP \uC778\uCF54\uB529\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911: \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# +wsdlmodeler.warning.ignoringOperation.notLiteral=document \uC2A4\uD0C0\uC77C \uC791\uC5C5 \"{0}\" \uBB34\uC2DC \uC911: \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uC785\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uC785\uB825 \uBA54\uC2DC\uC9C0\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uC5D0 \uBD80\uBD84\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uB450 \uAC1C \uC774\uC0C1\uC758 \uBD80\uBD84\uC774 \uBCF8\uBB38\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\"{0}\" \uC791\uC5C5: \uB450 \uAC1C \uC774\uC0C1\uC758 \uBD80\uBD84\uC774 \uBCF8\uBB38\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uCD9C\uB825 \uBA54\uC2DC\uC9C0\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \uBC14\uC778\uB529 \uC2A4\uD0C0\uC77C\uACFC \uC791\uC5C5 \uC2A4\uD0C0\uC77C\uC774 \uCDA9\uB3CC\uD569\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.partNotFound=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911: \"{1}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +wsdlmodeler.error.partNotFound=\"{0}\" \uC791\uC5C5\uC758 \"{1}\" \uBD80\uBD84\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! +wsdlmodeler.warning.ignoringFault.documentOperation=\uBB38\uC11C \uC2A4\uD0C0\uC77C \uC791\uC5C5 \"{1}\"\uC758 \"{0}\" \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911 +wsdlmodler.warning.operation.use=\uC0AC\uC6A9\uB41C WSDL\uC5D0 \uB9AC\uD130\uB7F4 \uBC0F \uC778\uCF54\uB529\uC744 \uC0AC\uC6A9\uD558\uB294 \uC791\uC5C5\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uACBD\uC6B0 -f:searchschema\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=soap:fault \"{0}\"\uC758 \uC774\uB984\uACFC \"{2}\" \uC791\uC5C5\uC5D0 \uC788\uB294 wsdl:fault \"{1}\"\uC758 \uC774\uB984\uC774 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=soap:fault \uC774\uB984\uC774 \"{1}\" \uC791\uC5C5\uC758 wsdl:fault \"{0}\"\uC5D0 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. + +wsdlmodeler.duplicate.fault.part.name=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568 \uBB34\uC2DC \uC911... \uBD80\uBD84 \uC774\uB984 \"{2}\"\uC774(\uAC00) \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.duplicate.fault.soap.name=\"{1}\" \uC791\uC5C5\uC758 \"{0}\" \uACB0\uD568\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. soap:fault \uC774\uB984 \"{2}\"\uC774(\uAC00) \uACE0\uC720\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringHeaderFault.notFound=\uD5E4\uB354 \uACB0\uD568 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \"{2}\" \uBC14\uC778\uB529\uC5D0\uC11C \"{1}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral={2} \uC791\uC5C5\uC758 \uD5E4\uB354 \uACB0\uD568 \uBD80\uBD84=\"{0}\" \uBA54\uC2DC\uC9C0=\"{1}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC0AC\uC6A9 \uC18D\uC131\uC740 \"literal\"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute={2} \uC791\uC5C5\uC758 \uD5E4\uB354 \uACB0\uD568 \uBD80\uBD84=\"{0}\" \uBA54\uC2DC\uC9C0=\"{1}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911 + +wsdlmodeler.invalid.headerfault.notLiteral=\uBC14\uC778\uB529 \uC791\uC5C5 \"{1}\"\uC758 \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \uACB0\uD568 \"{0}\": \uB9AC\uD130\uB7F4\uC774 \uC544\uB2D9\uB2C8\uB2E4. +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor={2} \uC791\uC5C5\uC758 {1} \uD5E4\uB354\uC5D0 \uB300\uD55C \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \uACB0\uD568 \"{0}\": \uBD80\uBD84\uC5D0\uB294 \"element\" \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor={1} \uC791\uC5C5\uC5D0 \uBD80\uC801\uD569\uD55C \uD5E4\uB354 \"{0}\"\uC774(\uAC00) \uC788\uC74C: \uBD80\uBD84\uC5D0\uB294 \"element\" \uC18D\uC131\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=wsdl:import\uC5D0 \uBE44\uC900\uC218 WS-I WSDL\uC774 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.nonconforming.wsdl.types=wsdl:types\uC5D0 \uBE44\uC900\uC218 WS-I WSDL\uC774 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.nonconforming.wsdl.use=RPC \uC2A4\uD0C0\uC77C \uBC0F SOAP \uC778\uCF54\uB529\uC744 \uC0AC\uC6A9\uD558\uB294 WS-I \uBE44\uC900\uC218 \uC791\uC5C5 \"{0}\"\uC744(\uB97C) \uCC98\uB9AC\uD558\uB294 \uC911 + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=\"{1}\" \uBA54\uC2DC\uC9C0\uC5D0\uC11C \"{0}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC798\uBABB\uB41C WSDL\uC785\uB2C8\uB2E4. + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=SOAP \uD3EC\uD2B8 \"{0}\": \uBE44\uD45C\uC900 SOAP 1.2 \uBC14\uC778\uB529\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringSOAPBinding12=SOAP \uD3EC\uD2B8 \"{0}\"\uC744(\uB97C) \uBB34\uC2DC\uD558\uB294 \uC911: \uBE44\uD45C\uC900 SOAP 1.2 \uBC14\uC778\uB529\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.\n\uC774 \uBC14\uC778\uB529\uC744 \uC0AC\uC6A9\uD558\uB824\uBA74 \"-extension\" \uC635\uC158\uC744 \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile \uBC84\uC804 1.0\uC5D0\uC11C\uB294 {0}\uC5D0 \uB300\uD55C \uBB38\uC11C/\uB9AC\uD130\uB7F4\uC5D0\uC11C namespace \uC18D\uC131\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: \"{1}\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile \uBC84\uC804 1.0\uC5D0\uC11C\uB294 {0}\uC5D0 \uB300\uD55C \uBB38\uC11C/\uB9AC\uD130\uB7F4\uC5D0\uC11C namespace \uC18D\uC131\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC74C: \"{1}\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. Multipart/Related \uAD6C\uC870\uC5D0 \uBD80\uC801\uD569\uD55C \uB8E8\uD2B8 \uBD80\uBD84\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uB450 \uAC1C \uC774\uC0C1\uC758 soap:body \uBD80\uBD84\uC774 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=soap:body\uAC00 \uC788\uB294 \uB8E8\uD2B8 mime:part\uC5D0 \uD5E4\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \"{0}\" \uC791\uC5C5\uC758 \uD5E4\uB354\uB97C \uBB34\uC2DC\uD558\uB294 \uC911 + +# R2909 +mimemodeler.invalidMimeContent.differentPart=mime:part\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. mime:part\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. mime:content\uC758 part \uC18D\uC131\uC774 \uB2E4\uB985\uB2C8\uB2E4. + +mimemodeler.invalidMimeContent.invalidSchemaType=mime:part\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. mime part {0}\uC744(\uB97C) \uC2A4\uD0A4\uB9C8 \uC720\uD615 {1}\uC5D0 \uB9E4\uD551\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part \uC694\uC18C\uAC00 mime:content part \uC18D\uC131\uC5D0\uC11C \uCC38\uC870\uB428: {0}\uC740(\uB294) type \uC18D\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC815\uC758\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4! + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. mime:content\uC5D0 part \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. mime:content \uC120\uC5B8\uC5D0\uB294 part \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +mimemodeler.invalidMimeContent.missingTypeAttribute=\"{0}\" \uC791\uC5C5\uC758 mime:content\uC5D0 type \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. mime:content \uC120\uC5B8\uC5D0\uB294 part \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType={1}\uC740(\uB294) mime:content \uBD80\uBD84 {0}\uC5D0 \uB300\uD574 \uC54C \uC218 \uC5C6\uB294 \uC2A4\uD0A4\uB9C8 \uC720\uD615\uC785\uB2C8\uB2E4. +mimemodeler.invalidMimeContent.errorLoadingJavaClass=mime \uC720\uD615 \"{1}\"\uC5D0 \uB300\uD55C \"{0}\" \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=mime:part\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. wsdl:operation \"{1}\"\uC5D0\uC11C mime:content\uAC00 \uCC38\uC870\uD55C \"{0}\" \uBD80\uBD84\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +mimemodeler.elementPart.invalidElementMimeType=mime:content \uBD80\uBD84\uC774 element \uC18D\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC815\uC758\uB41C wsdl:part \"{0}\"\uC744(\uB97C) \uCC38\uC870\uD569\uB2C8\uB2E4. mime \uC720\uD615 \"{1}\"\uC774(\uAC00) XML \uC9C1\uB82C\uD654\uC5D0 \uC801\uD569\uD55C\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=\"{0}\" \uC791\uC5C5\uC758 wsdl:part\uC5D0 \uB300\uD55C name \uC18D\uC131\uC774 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. WS-I AP 1.0\uC5D0 \uB530\uB77C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + + +wsdlmodeler20.rpcenc.not.supported=JAXWS 2.0\uC5D0\uC11C\uB294 RPC/\uC778\uCF54\uB529\uB41C WSDL\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wsdlmodeler.warning.ignoringOperation.notNCName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC774\uB984\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 ''{1}''\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. RPC \uB9AC\uD130\uB7F4 \uC791\uC5C5\uC785\uB2C8\uB2E4. JAXWS\uAC00 \uC9C1\uB82C\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 wsdl:message \"{1}\"\uC758 "{2}\" \uBD80\uBD84\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uAC70\uB098 wsdl:part \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 wsdl:message \"{1}\"\uC758 "{2}\" \uBD80\uBD84\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uAC70\uB098 wsdl:part \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC804\uC5ED \uC694\uC18C \"{2}\"\uC5D0 \uC788\uB294 \uB798\uD37C \uD558\uC704 \"{1}\"\uC758 \uB85C\uCEEC \uC774\uB984\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC804\uC5ED \uC694\uC18C \"{2}\"\uC5D0 \uC788\uB294 \uB798\uD37C \uD558\uC704 \"{1}\"\uC758 \uB85C\uCEEC \uC774\uB984\uC774 java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\"{0}\" \uC791\uC5C5\uC744 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB9E4\uAC1C\uBCC0\uC218\uC778 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uC608\uC57D\uC5B4\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC791\uC5C5 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uC608\uC57D\uC5B4\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uD1B5\uD574 \uC791\uC5C5 \uC774\uB984\uC744 \uBCC0\uACBD\uD558\uC2ED\uC2DC\uC624. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\"{0}\" \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. wsdl:operation\uC758 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\"{0}\" \uC791\uC5C5\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. java \uBA54\uC18C\uB4DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. wsdl:operation\uC758 \uC0AC\uC6A9\uC790 \uC815\uC758\uB41C \uC774\uB984 \"{1}\"\uC774(\uAC00) java \uD0A4\uC6CC\uB4DC\uC785\uB2C8\uB2E4. + +wsdlmodeler.jaxb.javatype.notfound=\uBA54\uC2DC\uC9C0 \uBD80\uBD84 \"{1}\"\uC758 \uC2A4\uD0A4\uB9C8 \uAE30\uC220\uC790 {0}\uC774(\uAC00) \uC815\uC758\uB418\uC9C0 \uC54A\uC558\uC73C\uBA70 Java\uC5D0 \uBC14\uC778\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC2A4\uD0A4\uB9C8 \uAE30\uC220\uC790 {0}\uC774(\uAC00) WSDL\uC5D0 \uC784\uD3EC\uD2B8/\uD3EC\uD568\uB41C \uC2A4\uD0A4\uB9C8\uC5D0 \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uD574\uB2F9 \uC784\uD3EC\uD2B8/\uD3EC\uD568\uC744 \uCD94\uAC00\uD560 \uC218\uB3C4 \uC788\uACE0, wsimport\uB97C \uC2E4\uD589\uD55C \uD6C4 -b \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC2A4\uD0A4\uB9C8 \uC704\uCE58\uB97C \uC81C\uACF5\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. +wsdlmodeler.unsupportedBinding.mime=\uD604\uC7AC WSDL MIME \uBC14\uC778\uB529\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! + +wsdlmodeler.nonUnique.body.error=\uACE0\uC720\uD558\uC9C0 \uC54A\uC740 \uBCF8\uBB38 \uBD80\uBD84\uC785\uB2C8\uB2E4! \uC791\uC5C5 \uD560\uB2F9\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC218\uD589\uD558\uB824\uBA74 BP 1.1 R2710\uC5D0 \uB530\uB77C \uD3EC\uD2B8\uC5D0\uC11C \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. {0} \uD3EC\uD2B8\uC5D0\uC11C \"{1}\" \uC791\uC5C5\uACFC \"{2}\" \uC791\uC5C5\uC758 \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D {3}\uC774(\uAC00) \uB3D9\uC77C\uD569\uB2C8\uB2E4. -extension \uC2A4\uC704\uCE58\uB97C \uC0AC\uC6A9\uD558\uC5EC wsimport\uB97C \uC2E4\uD589\uD574 \uBCF4\uC2ED\uC2DC\uC624. \uB7F0\uD0C0\uC784\uC774 SOAPAction\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4. +wsdlmodeler.nonUnique.body.warning=\uACE0\uC720\uD558\uC9C0 \uC54A\uC740 \uBCF8\uBB38 \uBD80\uBD84\uC785\uB2C8\uB2E4! \uC791\uC5C5 \uD560\uB2F9\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC218\uD589\uD558\uB824\uBA74 BP 1.1 R2710\uC5D0 \uB530\uB77C \uD3EC\uD2B8\uC5D0\uC11C \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. {0} \uD3EC\uD2B8\uC5D0\uC11C \"{1}\" \uC791\uC5C5\uACFC \"{2}\" \uC791\uC5C5\uC758 \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D {3}\uC774(\uAC00) \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uBA54\uC18C\uB4DC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB7F0\uD0C0\uC784\uC774 SOAPAction\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4. + +wsdlmodeler.rpclit.unkownschematype=XML \uC720\uD615 \"{0}\"\uC744(\uB97C) \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. XML\uACFC JAVA \uAC04\uC758 \uBC14\uC778\uB529\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4! wsdl:message \"{2}\"\uC758 wsdl:part \"{1}\"\uC744(\uB97C) \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +wsdlmodeler.responsebean.notfound=wsimport\uAC00 \uC791\uC5C5\uC5D0 \uB300\uD55C \uBE44\uB3D9\uAE30 \uC751\uB2F5 Bean \uC0DD\uC131\uC744 \uC2E4\uD328\uD568: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties new file mode 100644 index 00000000000..91b9cd09a58 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_pt_BR.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=erro do modelador: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=opera\u00E7\u00E3o inv\u00E1lida: {0} +wsdlmodeler.invalidState.modelingOperation=estado inv\u00E1lido ao modelar a opera\u00E7\u00E3o: {0} +wsdlmodeler.resultIsInOutParameter=o resultado \u00E9 o par\u00E2metro \"inout\" na opera\u00E7\u00E3o: {0} +wsdlmodeler.invalid.parameterorder.parameter=\"{0}\" especificado no atributo parameterOrder da opera\u00E7\u00E3o \"{1}\" n\u00E3o \u00E9 uma parte v\u00E1lida da mensagem. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=mais de uma parte omitida no atributo parameterOrder da opera\u00E7\u00E3o \"{0}\" +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=o atributo parameterOrder na opera\u00E7\u00E3o \"{0}\" \u00E9 inv\u00E1lido, ignorando a dica parameterOrder +wsdlmodeler.invalid.parameter.differentTypes=o par\u00E2metro \"{0}\" da opera\u00E7\u00E3o \"{1}\" aparece com diferentes tipos nas mensagens de entrada e sa\u00EDda +wsdlmodeler.invalid.bindingOperation.notInPortType=na opera\u00E7\u00E3o de bind \"{1}\", a opera\u00E7\u00E3o \"{0}\" n\u00E3o aparece no tipo de porta correspondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=a mensagem de entrada da opera\u00E7\u00E3o de bind \"{0}\" n\u00E3o tem uma extens\u00E3o de corpo SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=a mensagem de sa\u00EDda da opera\u00E7\u00E3o de bind \"{0}\" n\u00E3o tem uma extens\u00E3o de corpo SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=a opera\u00E7\u00E3o de bind \"{0}\" deve especificar um nome para sua mensagem de entrada +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=a opera\u00E7\u00E3o de bind \"{0}\" deve especificar um nome para sua mensagem de sa\u00EDda +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=na opera\u00E7\u00E3o de bind \"{1}\", a opera\u00E7\u00E3o \"{0}\" n\u00E3o faz refer\u00EAncia a uma opera\u00E7\u00E3o exclusiva no tipo de porta correspondente +wsdlmodeler.invalid.bindingOperation.notFound=na opera\u00E7\u00E3o de bind \"{1}\", a opera\u00E7\u00E3o \"{0}\" n\u00E3o corresponde a uma opera\u00E7\u00E3o exclusiva no tipo de porta correspondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=a mensagem de entrada da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=a mensagem de sa\u00EDda da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\" +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=o cabe\u00E7alho de entrada \"{1}\" da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\" +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=o cabe\u00E7alho de sa\u00EDda \"{1}\" da opera\u00E7\u00E3o de bind \"{0}\" deve especificar um valor para o atributo \"namespace\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=a falha \"{0}\" na opera\u00E7\u00E3o \"{1}\" corresponde a mais de uma falha na opera\u00E7\u00E3o do tipo de porta correspondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=a falha \"{0}\" na opera\u00E7\u00E3o \"{1}\" n\u00E3o corresponde a nenhuma falha na opera\u00E7\u00E3o do tipo de porta correspondente +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=a falha \\"{0}\\" na opera\u00E7\u00E3o portType \\"{1}\\" n\u00E3o corresponde a nenhuma falha na opera\u00E7\u00E3o de bind correspondente +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=a falha \"{0}\" na opera\u00E7\u00E3o \"{1}\" n\u00E3o tem uma extens\u00E3o de falha SOAP +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=a falha \\"{0}\\" na opera\u00E7\u00E3o \\"{1}\\" deve especificar um valor para o atributo \\"name\\" +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=a falha \\"{0}\\" na opera\u00E7\u00E3o \\"{1}\\" deve especificar um valor para o atributo \\"namespace\\" +wsdlmodeler.invalid.bindingFault.emptyMessage=a falha \"{0}\" refere-se \u00E0 mensagem \"{1}\", mas a mensagem n\u00E3o tem partes +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=a falha \"{0}\" refere-se \u00E0 mensagem \"{1}\", mas a mensagem tem mais de uma parte +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=na mensagem \\"{0}\\", a parte \\"{1}\\" deve especificar um atributo \\"element\\" +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=ocorreu o seguinte conflito de nomea\u00E7\u00E3o: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=ignorando o elemento do esquema (vers\u00E3o n\u00E3o suportada): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes=encontrou {0} tipo(s) reconhecido(s) +wsdlmodeler.warning.noServiceDefinitionsFound=O documento WSDL n\u00E3o define nenhum servi\u00E7o +wsdlmodeler.warning.noPortsInService=O servi\u00E7o \\"{0}\\" n\u00E3o cont\u00E9m nenhuma porta utiliz\u00E1vel. Tente executar wsimport com a chave -extension. +wsdlmodeler.warning.noOperationsInPort=A porta \"{0}\" n\u00E3o cont\u00E9m nenhuma opera\u00E7\u00E3o utiliz\u00E1vel +wsdlmodeler.warning.ignoringNonSOAPPort=ignorando a porta \\"{0}\\": n\u00E3o \u00E9 uma porta SOAP padr\u00E3o. Tente executar wsimport com a chave -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=a porta \\"{0}\\": n\u00E3o \u00E9 uma porta SOAP padr\u00E3o. Os artefatos gerados n\u00E3o funcionam com o runtime de JAX-WS. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=ignorando a porta \\"{0}\\": nenhum endere\u00E7o SOAP especificado. Tente executar wsimport com a chave -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=A porta \\"{0}\\" n\u00E3o \u00E9 uma porta SOAP; ela n\u00E3o tem soap:address +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:ignorando a porta \\"{0}\\" SOAP: transporte n\u00E3o reconhecido. Tente executar wsimport com a chave -extension. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=ignorando a porta \\"{0}\\", ela n\u00E3o \u00E9 compat\u00EDvel com WS-I BP 1.1: o bind do wsdl tem estilo misturado. Ele deve ser literal de rpc ou uma opera\u00E7\u00E3o literal do documento. Tente executar wsimport com a chave -extension. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=n\u00E3o \u00E9 uma porta SOAP \\"{0}\\" compat\u00EDvel com WS-I BP1.1: o bind do WSDL tem estilo misto, deve ser uma opera\u00E7\u00E3o de literal do documento ou literal de rpc! + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=ignorando opera\u00E7\u00E3o \"{0}\": n\u00E3o \u00E9 solicita\u00E7\u00E3o-resposta ou unidirecional +wsdlmodeler.invalid.operation.notSupportedStyle=WSDL inv\u00E1lido, wsdl:operation \\"{0}\\" no wsdl:portType \\"{1}\\": nenhuma solicita\u00E7\u00E3o-resposta ou unidirecional +wsdlmodeler.warning.ignoringOperation.notEncoded=ignorando opera\u00E7\u00E3o RPC-style \"{0}\": par\u00E2metros n\u00E3o codificados +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=ignorando opera\u00E7\u00E3o \\"{0}\\": n\u00E3o \u00E9 poss\u00EDvel tratar o atributo \\"parts\\" do elemento \\"soap:body\\" + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=ignorando opera\u00E7\u00E3o \"{0}\": a parte da mensagem n\u00E3o se refere a uma declara\u00E7\u00E3o de elemento do esquema +wsdlmodeler.invalid.doclitoperation=wsdl:operation \\"{0}\\" inv\u00E1lida: \u00E9 uma opera\u00E7\u00E3o do documento-literal, a parte da mensagem deve se referir a uma declara\u00E7\u00E3o de elemento do esquema + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=ignorando opera\u00E7\u00E3o \"{0}\": a parte da mensagem n\u00E3o se refere a uma declara\u00E7\u00E3o do tipo de esquema +wsdlmodeler.invalid.rpclitoperation=wsdl:operation \\"{0}\\" inv\u00E1lida: \u00E9 uma opera\u00E7\u00E3o de literal de rpc, a parte da mensagem deve se referir a uma declara\u00E7\u00E3o do tipo de esquema + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=ignorando opera\u00E7\u00E3o \\"{0}\\": n\u00E3o \u00E9 poss\u00EDvel tratar as opera\u00E7\u00F5es de estilo do documento +wsdlmodeler.warning.bindingOperation.multiplePartBinding=Verifique o bind da opera\u00E7\u00E3o \\"{0}\\" abstrata, a parte \\"{1}\\" tem v\u00E1rios binds. Tentar\u00E1 gerar artefatos... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=bind da opera\u00E7\u00E3o \\"{0}\\" abstrata, a parte \\"{1}\\" tem v\u00E1rios binds. +wsdlmodeler.warning.ignoringFaults=ignorando falhas declaradas pela opera\u00E7\u00E3o \"{0}\" +wsdlmodeler.warning.ignoringFault.notEncoded=ignorando a falha \\"{0}\\" literal da opera\u00E7\u00E3o \\"{1}\\" de bind +wsdlmodeler.warning.ignoringFault.notLiteral=ignorando a falha \\"{0}\\" codificada da opera\u00E7\u00E3o \\"{1}\\" de bind +wsdlmodeler.invalid.operation.fault.notLiteral=ignorando a falha \"{0}\" codificada da opera\u00E7\u00E3o \\"{1}\\" de associa\u00E7\u00E3o literal +wsdlmodeler.warning.ignoringHeader=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\" +wsdlmodeler.warning.ignoringHeader.partFromBody=a parte do cabe\u00E7alho: \\"{0}\\" j\u00E1 foi associada por soapbind:body, inv\u00E1lida para associar a parte duas vezes +wsdlmodeler.warning.ignoringHeader.notLiteral=ignorando cabe\u00E7alho \"{0}\" da opera\u00E7\u00E3o de bind \"{1}\": n\u00E3o literal +wsdlmodeler.invalid.header.notLiteral=Cabe\u00E7alho \\"{0}\\" inv\u00E1lido da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o literal +wsdlmodeler.warning.ignoringHeader.notFound=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o encontrado +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o encontrado +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o \u00E9 poss\u00EDvel resolver a mensagem +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o \u00E9 poss\u00EDvel resolver a mensagem + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=ignorando falha \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o \u00E9 poss\u00EDvel resolver a mensagem +wsdlmodeler.invalid.fault.cant.resolve.message=n\u00E3o foi poss\u00EDvel resolver a mensagem de falha "{0}\\" na opera\u00E7\u00E3o de bind \\"{1}\\" + +wsdlmodeler.warning.ignoringHeader.notEncoded=ignorando cabe\u00E7alho \"{0}\" da opera\u00E7\u00E3o de bind \"{1}\": n\u00E3o codificado por SOAP +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=ignorando cabe\u00E7alho \\"{0}\\" da opera\u00E7\u00E3o de bind \\"{1}\\": parte n\u00E3o encontrada +# +wsdlmodeler.warning.ignoringOperation.notLiteral=ignorando opera\u00E7\u00E3o de estilo do documento \"{0}\": os par\u00E2metros n\u00E3o s\u00E3o literais +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mais de uma parta na mensagem de entrada +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mensagem de entrada vazia +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mais de uma parta na mensagem de sa\u00EDda +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=Ignorando opera\u00E7\u00E3o \"{0}\": mais de uma parte vinculada ao corpo +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=opera\u00E7\u00E3o \"{0}\": mais de uma parte vinculada ao corpo +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=ignorando opera\u00E7\u00E3o \"{0}\": mensagem de sa\u00EDda vazia +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=ignorando opera\u00E7\u00E3o \\"{0}\\": o estilo de bind e o estilo da opera\u00E7\u00E3o est\u00E3o em conflito +wsdlmodeler.warning.ignoringOperation.partNotFound=ignorando opera\u00E7\u00E3o \"{0}\": parte \"{1}\" n\u00E3o encontrada +wsdlmodeler.error.partNotFound=n\u00E3o foi poss\u00EDvel resolver a parte \"{1}\" da opera\u00E7\u00E3o \"{0}\"! +wsdlmodeler.warning.ignoringFault.documentOperation=ignorando falha \"{0}\" da opera\u00E7\u00E3o \"{1}\" do estilo de documento +wsdlmodler.warning.operation.use=O WSDL usado tem opera\u00E7\u00F5es com uso codificado e literal. -f:searchschema n\u00E3o \u00E9 suportado para este cen\u00E1rio. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=o nome de soap:fault \\"{0}\\" n\u00E3o corresponde ao nome do wsdl:fault \\"{1}\\" na opera\u00E7\u00E3o \\"{2}\\" +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=nome de soap:fault n\u00E3o especificado, wsdl:fault \\"{0}\\" na opera\u00E7\u00E3o \\"{1}\\" + +wsdlmodeler.duplicate.fault.part.name=ignorando falha \"{0}\" da opera\u00E7\u00E3o \"{1}\", o nome da parte \"{2}\" n\u00E3o \u00E9 exclusivo +wsdlmodeler.duplicate.fault.soap.name=ignorando falha \\"{0}\\" da opera\u00E7\u00E3o \\"{1}\\", o nome de soap:fault \\"{2}\\" n\u00E3o \u00E9 exclusivo + +wsdlmodeler.warning.ignoringHeaderFault.notFound=ignorando falha do cabe\u00E7alho \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel localizar a parte \\"{1}\\" no bind \\"{2}\\" +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=ignorando parte de falha do cabe\u00E7alho=\"{0}\" mensagem=\"{1}\" da opera\u00E7\u00E3o {2}, o atributo de uso deve ser \"literal\" + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=ignorando parte de falha do cabe\u00E7alho=\"{0}\" mensagem=\"{1}\" da opera\u00E7\u00E3o {2} + +wsdlmodeler.invalid.headerfault.notLiteral=headerfault \\"{0}\\" inv\u00E1lido da opera\u00E7\u00E3o de bind \\"{1}\\": n\u00E3o literal +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=headerfault \\"{0}\\" inv\u00E1lido do cabe\u00E7alho {1} na opera\u00E7\u00E3o {2}: a parte deve especificar um atributo \\"element\\" +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=cabe\u00E7alho \\"{0}\\" inv\u00E1lido na opera\u00E7\u00E3o {1}: a parte deve especificar um atributo \\"element\\" + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=WSDL de WS-I incompat\u00EDvel usado para wsdl:import +wsdlmodeler.warning.nonconforming.wsdl.types=WSDL de WS-I incompat\u00EDvel usado para wsdl:types +wsdlmodeler.warning.nonconforming.wsdl.use=Processando opera\u00E7\u00E3o incompat\u00EDvel com WS-I \"{0}\" com Estilo RPC e codificada com SOAP + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=partes \"{0}\" n\u00E3o encontradas na mensagem \"{1}\", WSDL incorreto + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=a porta SOAP \\"{0}\\": usa um bind de SOAP 1.2 n\u00E3o padr\u00E3o. +wsdlmodeler.warning.ignoringSOAPBinding12=Ignorando a porta SOAP \\"{0}\\": ela usa bind de SOAP 1.2 n\u00E3o padr\u00E3o.\nVoc\u00EA deve especificar a op\u00E7\u00E3o \\"-extension\\" para usar este bind. + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile vers\u00E3o 1.0, atributo de namespace n\u00E3o permitido em doc/lit para {0}: \\"{1}\\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile vers\u00E3o 1.0, atributo de namespace n\u00E3o permitido em doc/lit ou rpc/lit para {0}: \\"{1}\\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=Ignorando opera\u00E7\u00E3o \\"{0}\\". A estrutura com V\u00E1rias Partes/Relacionada tem parte da raiz inv\u00E1lida: mais de uma parte soap:body encontrada + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=Os cabe\u00E7alhos n\u00E3o est\u00E3o na raiz mime:parte com soap:body, ignorando cabe\u00E7alhos na opera\u00E7\u00E3o \\"{0}\\" + +# R2909 +mimemodeler.invalidMimeContent.differentPart=Ignorando mime:part. mime:part inv\u00E1lido, mime:content tem atributo de parte diferente. + +mimemodeler.invalidMimeContent.invalidSchemaType=Ignorando mime:part. mime part: {0} n\u00E3o pode ser mapeado para o tipo de esquema: {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=elemento wsdl:part mencionado pelo atributo da parte mime:content: {0} deve ser definido usando o atributo de tipo! + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=Ignorando a opera\u00E7\u00E3o \\"{0}\\", atributo da parte n\u00E3o encontrado no mime:content. O atributo da parte deve estar presente na declara\u00E7\u00E3o de mime:content. + +mimemodeler.invalidMimeContent.missingTypeAttribute=Atributo do tipo n\u00E3o encontrado no mime:content na opera\u00E7\u00E3o \\"{0}\\". O atributo da parte deve estar presente na declara\u00E7\u00E3o de mime:content. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=Tipo de esquema: {1} desconhecido para a parte mime:content: {0} +mimemodeler.invalidMimeContent.errorLoadingJavaClass=N\u00E3o foi poss\u00EDvel localizar a classe \"{0}\" do tipo de mime \"{1}\" + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=ignorando mime:part, n\u00E3o \u00E9 poss\u00EDvel localizar a parte \\"{0}\\" mencionada por mime:content em wsdl:operation \\"{1}\\" + +mimemodeler.elementPart.invalidElementMimeType=A parte mime:content refere-se a wsdl:part \\"{0}\\", definida usando o atributo do elemento. Certifique-se de que o tipo mime: \\"{1}\\" \u00E9 apropriado para serializar o XML. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=o atributo de nome em wsdl:part na Opera\u00E7\u00E3o \\"{0}\\" foi ignorado. N\u00E3o \u00E9 permitido conforme WS-I AP 1.0. + + +wsdlmodeler20.rpcenc.not.supported=wsdls de rpc/codificados n\u00E3o s\u00E3o suportados em JAXWS 2.0. +wsdlmodeler.warning.ignoringOperation.notNCName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", ela tem caractere ''{1}'' inv\u00E1lido em seu nome. Sua opera\u00E7\u00E3o literal de rpc - jaxws n\u00E3o poder\u00E1 serializ\u00E1-la! + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Par\u00E2metro: parte "{2}\\" em wsdl:message \\"{1}\\", \u00E9 uma palavra-chave de java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro ou alterar o wsdl:part name. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=Opera\u00E7\u00E3o inv\u00E1lida \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Par\u00E2metro: parte "{2}\\" em wsdl:message \\"{1}\\", \u00E9 uma palavra-chave de java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro ou alterar o wsdl:part name. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o par\u00E2metro do m\u00E9todo java. O nome do local do filho do encapsulador do filho do encapsulador \\"{1}\\" no elemento \\"{2}\\" global \u00E9 uma palavra-chave java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=Opera\u00E7\u00E3o \\"{0}\\" inv\u00E1lida, n\u00E3o \u00E9 poss\u00EDvel gerar o par\u00E2metro do m\u00E9todo java. O nome do local do filho do encapsulador do filho do encapsulador \\"{1}\\" no elemento \\"{2}\\" global \u00E9 uma palavra-chave java. Use a personaliza\u00E7\u00E3o para alterar o nome do par\u00E2metro. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. O par\u00E2metro, nome personalizado \\"{1}\\" \u00E9 uma palavra-chave de java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=Opera\u00E7\u00E3o \\"{0}\\" inv\u00E1lida, n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. O par\u00E2metro, nome personalizado \\"{1}\\" \u00E9 uma palavra-chave de java. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", \u00E9 uma palavra reservada de java, n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Use a personaliza\u00E7\u00E3o para alterar o nome da opera\u00E7\u00E3o. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=Opera\u00E7\u00E3o inv\u00E1lida \\"{0}\\", \u00E9 uma palavra reservada de java, n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java. Use a personaliza\u00E7\u00E3o para alterar o nome da opera\u00E7\u00E3o. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=Ignorando a opera\u00E7\u00E3o \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java, o nome personalizado \\"{1}\\" de wsdl:operation \u00E9 uma palavra-chave de java. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=Opera\u00E7\u00E3o inv\u00E1lida \\"{0}\\", n\u00E3o \u00E9 poss\u00EDvel gerar o m\u00E9todo java, o nome personalizado \\"{1}\\" de wsdl:operation \u00E9 uma palavra-chave de java. + +wsdlmodeler.jaxb.javatype.notfound=O descritor do esquema {0} na parte da mensagem \\"{1}\\" n\u00E3o foi definido e n\u00E3o p\u00F4de ser vinculado ao Java. Talvez o descritor do esquema {0} n\u00E3o seja definido no esquema importado/inclu\u00EDdo no WSDL. Voc\u00EA pode adicionar importa\u00E7\u00F5es/inclus\u00F5es ou executar wsimport e fornecer a localiza\u00E7\u00E3o do esquema usando a chave -b. +wsdlmodeler.unsupportedBinding.mime=O bind de MIME do WSDL n\u00E3o \u00E9 suportado no momento! + +wsdlmodeler.nonUnique.body.error=Sem partes do corpo exclusivas! Em uma porta, conforme BP 1.1 R2710, as opera\u00E7\u00F5es devem ter assinatura de opera\u00E7\u00E3o exclusiva na conex\u00E3o para obter despacho com sucesso. Na porta {0}, as Opera\u00E7\u00F5es \\"{1}\\" e \\"{2}\\" t\u00EAm o mesmo bloco do corpo da solicita\u00E7\u00E3o {3}. Tente executar wsimport com a chave -extension, o runtime tentar\u00E1 despachar usando SOAPAction +wsdlmodeler.nonUnique.body.warning=Sem partes do corpo exclusivas! Em uma porta, conforme BP 1.1 R2710, as opera\u00E7\u00F5es devem ter assinatura de opera\u00E7\u00E3o exclusiva na conex\u00E3o para obter despacho com sucesso. Na porta {0}, as Opera\u00E7\u00F5es \\"{1}\\" e \\"{2}\\" t\u00EAm o mesmo bloco do corpo da solicita\u00E7\u00E3o {3}. O m\u00E9todo de despacho pode falhar, o runtime tentar\u00E1 despachar usando SOAPAction + +wsdlmodeler.rpclit.unkownschematype=O tipo \\"{0}\\" de XML n\u00E3o p\u00F4de ser resolvido, falha de bind de JAVA! Verifique a wsdl:part \\"{1}\\" em wsdl:message \\"{2}\\". + +wsdlmodeler.responsebean.notfound=falha de wsimport ao gerar o bean de resposta ass\u00EDncrona da opera\u00E7\u00E3o: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties new file mode 100644 index 00000000000..a97b1cee1d3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_CN.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=\u5EFA\u6A21\u7A0B\u5E8F\u9519\u8BEF: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=\u64CD\u4F5C\u65E0\u6548: {0} +wsdlmodeler.invalidState.modelingOperation=\u5BF9\u64CD\u4F5C\u5EFA\u6A21\u65F6\u7684\u72B6\u6001\u65E0\u6548: {0} +wsdlmodeler.resultIsInOutParameter=\u7ED3\u679C\u4E3A\u64CD\u4F5C\u4E2D\u7684 \"inout\" \u53C2\u6570: {0} +wsdlmodeler.invalid.parameterorder.parameter=\u64CD\u4F5C \"{1}\" \u7684 parameterOrder \u5C5E\u6027\u4E2D\u6307\u5B9A\u7684 \"{0}\" \u4E0D\u662F\u6D88\u606F\u7684\u6709\u6548\u90E8\u5206\u3002 +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=\u64CD\u4F5C \"{0}\" \u7684 parameterOrder \u5C5E\u6027\u9057\u6F0F\u4E86\u591A\u4E2A\u90E8\u5206 +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\u64CD\u4F5C \"{0}\" \u4E0A\u7684 parameterOrder \u5C5E\u6027\u65E0\u6548, \u5FFD\u7565 parameterOrder \u63D0\u793A +wsdlmodeler.invalid.parameter.differentTypes=\u64CD\u4F5C \"{1}\" \u7684\u53C2\u6570 \"{0}\" \u5728\u8F93\u5165\u548C\u8F93\u51FA\u6D88\u606F\u4E2D\u4EE5\u4E0D\u540C\u7C7B\u578B\u663E\u793A +wsdlmodeler.invalid.bindingOperation.notInPortType=\u5728\u7ED1\u5B9A \"{1}\" \u4E2D, \u64CD\u4F5C \"{0}\" \u6CA1\u6709\u663E\u793A\u5728\u76F8\u5E94\u7684\u7AEF\u53E3\u7C7B\u578B\u4E2D +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u5165\u6D88\u606F\u6CA1\u6709 SOAP \u4E3B\u4F53\u6269\u5C55 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u51FA\u6D88\u606F\u6CA1\u6709 SOAP \u4E3B\u4F53\u6269\u5C55 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u5FC5\u987B\u4E3A\u5176\u8F93\u5165\u6D88\u606F\u6307\u5B9A\u540D\u79F0 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u5FC5\u987B\u4E3A\u5176\u8F93\u51FA\u6D88\u606F\u6307\u5B9A\u540D\u79F0 +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\u5728\u7ED1\u5B9A \"{1}\" \u4E2D, \u64CD\u4F5C \"{0}\" \u672A\u5F15\u7528\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u4E2D\u7684\u552F\u4E00\u64CD\u4F5C +wsdlmodeler.invalid.bindingOperation.notFound=\u5728\u7ED1\u5B9A \"{1}\" \u4E2D, \u64CD\u4F5C \"{0}\" \u4E0D\u4E0E\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u4E2D\u7684\u4EFB\u4F55\u64CD\u4F5C\u5339\u914D +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u5165\u6D88\u606F\u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u51FA\u6D88\u606F\u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u5165\u6807\u5934 \"{1}\" \u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\u7ED1\u5B9A\u64CD\u4F5C \"{0}\" \u7684\u8F93\u51FA\u6807\u5934 \"{1}\" \u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u4E0E\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u64CD\u4F5C\u4E2D\u7684\u591A\u4E2A\u6545\u969C\u5339\u914D +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u4E0D\u4E0E\u76F8\u5E94\u7AEF\u53E3\u7C7B\u578B\u64CD\u4F5C\u4E2D\u7684\u4EFB\u4F55\u6545\u969C\u5339\u914D +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=portType \u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u4E0D\u4E0E\u76F8\u5E94\u7ED1\u5B9A\u64CD\u4F5C\u4E2D\u7684\u4EFB\u4F55\u6545\u969C\u5339\u914D +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u6CA1\u6709 SOAP \u6545\u969C\u6269\u5C55 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u5FC5\u987B\u6307\u5B9A \"name\" \u5C5E\u6027\u7684\u503C +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C \"{0}\" \u5FC5\u987B\u6307\u5B9A \"namespace\" \u5C5E\u6027\u7684\u503C +wsdlmodeler.invalid.bindingFault.emptyMessage=\u6545\u969C \"{0}\" \u5F15\u7528\u4E86\u6D88\u606F \"{1}\", \u4F46\u6D88\u606F\u6CA1\u6709\u4EFB\u4F55\u90E8\u5206 +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\u6545\u969C \"{0}\" \u5F15\u7528\u4E86\u6D88\u606F \"{1}\", \u4F46\u8BE5\u6D88\u606F\u6709\u591A\u4E2A\u90E8\u5206 +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\u5728\u6D88\u606F \"{0}\" \u4E2D, \u90E8\u5206 \"{1}\" \u5FC5\u987B\u6307\u5B9A \"element\" \u5C5E\u6027 +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=\u53D1\u751F\u4EE5\u4E0B\u547D\u540D\u51B2\u7A81: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\u5FFD\u7565\u6A21\u5F0F\u5143\u7D20 (\u4E0D\u652F\u6301\u7684\u7248\u672C): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes=\u9047\u5230{0}\u65E0\u6CD5\u8BC6\u522B\u7684\u7C7B\u578B +wsdlmodeler.warning.noServiceDefinitionsFound=WSDL \u6587\u6863\u672A\u5B9A\u4E49\u4EFB\u4F55\u670D\u52A1 +wsdlmodeler.warning.noPortsInService=\u670D\u52A1 \"{0}\" \u4E0D\u5305\u542B\u4EFB\u4F55\u53EF\u7528\u7AEF\u53E3\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002 +wsdlmodeler.warning.noOperationsInPort=\u7AEF\u53E3 \"{0}\" \u4E0D\u5305\u542B\u4EFB\u4F55\u53EF\u7528\u64CD\u4F5C +wsdlmodeler.warning.ignoringNonSOAPPort=\u5FFD\u7565\u7AEF\u53E3 \"{0}\": \u4E0D\u662F\u6807\u51C6 SOAP \u7AEF\u53E3\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002 +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=\u7AEF\u53E3 \"{0}\": \u4E0D\u662F\u6807\u51C6 SOAP \u7AEF\u53E3\u3002\u751F\u6210\u7684 Artifact \u53EF\u80FD\u65E0\u6CD5\u7528\u4E8E JAX-WS \u8FD0\u884C\u65F6\u3002 +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\u5FFD\u7565\u7AEF\u53E3 \"{0}\": \u672A\u6307\u5B9A SOAP \u5730\u5740\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002 +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=\u7AEF\u53E3 \"{0}\" \u4E0D\u662F SOAP \u7AEF\u53E3, \u5B83\u6CA1\u6709 soap:address +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:\u5FFD\u7565 SOAP \u7AEF\u53E3 \"{0}\": \u65E0\u6CD5\u8BC6\u522B\u7684\u4F20\u8F93\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002 + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=\u5FFD\u7565\u7AEF\u53E3 \"{0}\", \u5B83\u4E0E WS-I BP 1.1 \u4E0D\u517C\u5BB9: wsdl \u7ED1\u5B9A\u5177\u6709\u6DF7\u5408\u6837\u5F0F, \u5B83\u5FC5\u987B\u662F rpc-literal \u6216 document-literal \u64CD\u4F5C\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport\u3002 +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=\u4E0D\u662F WS-I BP1.1 \u517C\u5BB9\u7684 SOAP \u7AEF\u53E3 \"{0}\": WSDL \u7ED1\u5B9A\u5177\u6709\u6DF7\u5408\u6837\u5F0F, \u5B83\u5FC5\u987B\u662F rpc-literal \u6216 document-literal \u64CD\u4F5C! + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u4E0D\u662F\u8BF7\u6C42/\u54CD\u5E94\u6216\u5355\u5411 +wsdlmodeler.invalid.operation.notSupportedStyle=WSDL \u65E0\u6548, wsdl:portType \"{1}\" \u4E2D\u7684 wsdl:operation \"{0}\": \u4E0D\u662F\u8BF7\u6C42/\u54CD\u5E94\u6216\u5355\u5411 +wsdlmodeler.warning.ignoringOperation.notEncoded=\u5FFD\u7565 RPC \u6837\u5F0F\u64CD\u4F5C \"{0}\": \u53C2\u6570\u672A\u7F16\u7801 +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u65E0\u6CD5\u5904\u7406 \"soap:body\" \u5143\u7D20\u7684 \"parts\" \u5C5E\u6027 + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u6D88\u606F\u90E8\u5206\u672A\u5F15\u7528\u6A21\u5F0F\u5143\u7D20\u58F0\u660E +wsdlmodeler.invalid.doclitoperation=wsdl:operation \"{0}\" \u65E0\u6548: \u5B83\u662F document-literal \u64CD\u4F5C, \u6D88\u606F\u90E8\u5206\u5FC5\u987B\u5F15\u7528\u6A21\u5F0F\u5143\u7D20\u58F0\u660E + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u6D88\u606F\u90E8\u5206\u672A\u5F15\u7528\u6A21\u5F0F\u7C7B\u578B\u58F0\u660E +wsdlmodeler.invalid.rpclitoperation=wsdl:operation \"{0}\" \u65E0\u6548: \u5B83\u662F rpc-literal \u64CD\u4F5C, \u6D88\u606F\u90E8\u5206\u5FC5\u987B\u5F15\u7528\u6A21\u5F0F\u7C7B\u578B\u58F0\u660E + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u65E0\u6CD5\u5904\u7406\u6587\u6863\u6837\u5F0F\u64CD\u4F5C +wsdlmodeler.warning.bindingOperation.multiplePartBinding=\u68C0\u67E5\u62BD\u8C61\u64CD\u4F5C \"{0}\" \u7ED1\u5B9A, \u90E8\u5206 \"{1}\" \u5177\u6709\u591A\u4E2A\u7ED1\u5B9A\u3002\u4ECD\u5C06\u5C1D\u8BD5\u751F\u6210\u7684 Artifact... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\u62BD\u8C61\u64CD\u4F5C \"{0}\" \u7ED1\u5B9A, \u90E8\u5206 \"{1}\" \u5177\u6709\u591A\u4E2A\u7ED1\u5B9A\u3002 +wsdlmodeler.warning.ignoringFaults=\u5FFD\u7565\u64CD\u4F5C \"{0}\" \u58F0\u660E\u7684\u6545\u969C +wsdlmodeler.warning.ignoringFault.notEncoded=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6587\u5B57\u6545\u969C \"{0}\" +wsdlmodeler.warning.ignoringFault.notLiteral=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u7F16\u7801\u6545\u969C \"{0}\" +wsdlmodeler.invalid.operation.fault.notLiteral=\u5FFD\u7565\u6587\u5B57\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u7F16\u7801\u6545\u969C \"{0}\" +wsdlmodeler.warning.ignoringHeader=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\" +wsdlmodeler.warning.ignoringHeader.partFromBody=\u6807\u5934\u90E8\u5206: \"{0}\" \u5DF2\u7531 soapbind:body \u7ED1\u5B9A, \u4E24\u6B21\u7ED1\u5B9A\u8BE5\u90E8\u5206\u662F\u975E\u6CD5\u7684 +wsdlmodeler.warning.ignoringHeader.notLiteral=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\" : \u4E0D\u662F\u6587\u5B57 +wsdlmodeler.invalid.header.notLiteral=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\" \u65E0\u6548: \u4E0D\u662F\u6587\u5B57 +wsdlmodeler.warning.ignoringHeader.notFound=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u672A\u627E\u5230 +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u672A\u627E\u5230 +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u65E0\u6CD5\u89E3\u6790\u6D88\u606F +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u65E0\u6CD5\u89E3\u6790\u6D88\u606F + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\": \u65E0\u6CD5\u89E3\u6790\u6D88\u606F +wsdlmodeler.invalid.fault.cant.resolve.message=\u65E0\u6CD5\u89E3\u6790\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u4E2D\u7684\u6545\u969C\u6D88\u606F \"{0}\" + +wsdlmodeler.warning.ignoringHeader.notEncoded=\u5FFD\u7565\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u4E0D\u662F SOAP \u7F16\u7801 +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\u5FFD\u7565\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934 \"{0}\": \u672A\u627E\u5230\u90E8\u5206 +# +wsdlmodeler.warning.ignoringOperation.notLiteral=\u5FFD\u7565\u6587\u6863\u6837\u5F0F\u64CD\u4F5C \"{0}\": \u53C2\u6570\u4E0D\u662F\u6587\u5B57 +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u5165\u6D88\u606F\u4E2D\u5305\u542B\u591A\u4E2A\u90E8\u5206 +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u5165\u6D88\u606F\u4E3A\u7A7A +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u51FA\u6D88\u606F\u4E2D\u5305\u542B\u591A\u4E2A\u90E8\u5206 +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u6709\u591A\u4E2A\u90E8\u5206\u7ED1\u5B9A\u5230\u4E3B\u4F53 +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\u64CD\u4F5C \"{0}\": \u6709\u591A\u4E2A\u90E8\u5206\u7ED1\u5B9A\u5230\u4E3B\u4F53 +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u8F93\u51FA\u6D88\u606F\u4E3A\u7A7A +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u7ED1\u5B9A\u6837\u5F0F\u4E0E\u64CD\u4F5C\u6837\u5F0F\u53D1\u751F\u51B2\u7A81 +wsdlmodeler.warning.ignoringOperation.partNotFound=\u5FFD\u7565\u64CD\u4F5C \"{0}\": \u672A\u627E\u5230\u90E8\u5206 \"{1}\" +wsdlmodeler.error.partNotFound=\u65E0\u6CD5\u89E3\u6790\u64CD\u4F5C \"{0}\" \u7684\u90E8\u5206 \"{1}\"! +wsdlmodeler.warning.ignoringFault.documentOperation=\u5FFD\u7565\u6587\u6863\u6837\u5F0F\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\" +wsdlmodler.warning.operation.use=\u4F7F\u7528\u7684 WSDL \u6709\u4F7F\u7528\u4E86\u6587\u5B57\u548C\u7F16\u7801\u7684\u64CD\u4F5C\u3002\u8FD9\u79CD\u60C5\u51B5\u4E0B\u4E0D\u652F\u6301 -f:searchschema\u3002 +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=\u5728\u64CD\u4F5C \"{2}\" \u4E2D, soap:fault \"{0}\" \u7684\u540D\u79F0\u4E0E wsdl:fault \"{1}\" \u7684\u540D\u79F0\u4E0D\u5339\u914D +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=\u5728\u64CD\u4F5C \"{1}\" \u4E2D, \u6CA1\u6709\u4E3A wsdl:fault \"{0}\" \u6307\u5B9A soap:fault \u540D\u79F0 + +wsdlmodeler.duplicate.fault.part.name=\u5FFD\u7565\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\", \u90E8\u5206\u540D\u79F0 \"{2}\" \u4E0D\u552F\u4E00 +wsdlmodeler.duplicate.fault.soap.name=\u5FFD\u7565\u64CD\u4F5C \"{1}\" \u7684\u6545\u969C \"{0}\", soap:fault \u540D\u79F0 \"{2}\" \u4E0D\u552F\u4E00 + +wsdlmodeler.warning.ignoringHeaderFault.notFound=\u5FFD\u7565\u6807\u5934\u6545\u969C \"{0}\", \u5728\u7ED1\u5B9A \"{2}\" \u4E2D\u627E\u4E0D\u5230\u90E8\u5206 \"{1}\" +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=\u5FFD\u7565\u64CD\u4F5C{2}\u7684\u6807\u5934\u6545\u969C\u90E8\u5206=\"{0}\" \u6D88\u606F=\"{1}\", \u4F7F\u7528\u5C5E\u6027\u5FC5\u987B\u4E3A \"literal\" + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=\u5FFD\u7565\u64CD\u4F5C{2}\u7684\u6807\u5934\u6545\u969C\u90E8\u5206=\"{0}\" \u6D88\u606F=\"{1}\" + +wsdlmodeler.invalid.headerfault.notLiteral=\u7ED1\u5B9A\u64CD\u4F5C \"{1}\" \u7684\u6807\u5934\u6545\u969C \"{0}\" \u65E0\u6548: \u4E0D\u662F\u6587\u5B57 +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=\u64CD\u4F5C{2}\u4E2D\u6807\u5934{1}\u7684\u6807\u5934\u6545\u969C \"{0}\" \u65E0\u6548: \u90E8\u5206\u5FC5\u987B\u6307\u5B9A \"element\" \u5C5E\u6027 +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=\u64CD\u4F5C{1}\u4E2D\u7684\u6807\u5934 \"{0}\" \u65E0\u6548: \u90E8\u5206\u5FC5\u987B\u6307\u5B9A \"element\" \u5C5E\u6027 + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=\u4E3A wsdl:import \u4F7F\u7528\u4E86\u4E0D\u4E00\u81F4\u7684 WS-I WSDL +wsdlmodeler.warning.nonconforming.wsdl.types=\u4E3A wsdl:types \u4F7F\u7528\u4E86\u4E0D\u4E00\u81F4\u7684 WS-I WSDL +wsdlmodeler.warning.nonconforming.wsdl.use=\u4F7F\u7528 RPC \u6837\u5F0F\u548C SOAP \u7F16\u7801\u5904\u7406 WS-I \u4E0D\u4E00\u81F4\u7684\u64CD\u4F5C \"{0}\" + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=\u5728\u6D88\u606F \"{1}\" \u4E2D\u627E\u4E0D\u5230\u90E8\u5206 \"{0}\", WSDL \u4E0D\u6B63\u786E + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=SOAP \u7AEF\u53E3 \"{0}\": \u4F7F\u7528\u975E\u6807\u51C6 SOAP 1.2 \u7ED1\u5B9A\u3002 +wsdlmodeler.warning.ignoringSOAPBinding12=\u5FFD\u7565 SOAP \u7AEF\u53E3 \"{0}\": \u5B83\u4F7F\u7528\u975E\u6807\u51C6 SOAP 1.2 \u7ED1\u5B9A\u3002\n\u5FC5\u987B\u6307\u5B9A \"-extension\" \u9009\u9879\u4EE5\u4F7F\u7528\u6B64\u7ED1\u5B9A\u3002 + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile \u7248\u672C 1.0, {0}\u7684 doc/lit \u4E2D\u4E0D\u5141\u8BB8\u6709\u540D\u79F0\u7A7A\u95F4\u5C5E\u6027: \"{1}\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile \u7248\u672C 1.0, {0}\u7684 doc/lit \u6216 rpc/lit \u4E2D\u4E0D\u5141\u8BB8\u6709\u540D\u79F0\u7A7A\u95F4\u5C5E\u6027: \"{1}\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=\u5FFD\u7565\u64CD\u4F5C \"{0}\"\u3002\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u7ED3\u6784\u5305\u542B\u65E0\u6548\u7684\u6839\u90E8\u5206: \u627E\u5230\u591A\u4E2A soap:body \u90E8\u5206 + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=\u6807\u5934\u4E0D\u5728\u5E26\u6709 soap:body \u7684\u6839 mime:part \u4E2D, \u5FFD\u7565\u64CD\u4F5C \"{0}\" \u4E2D\u7684\u6807\u5934 + +# R2909 +mimemodeler.invalidMimeContent.differentPart=\u5FFD\u7565 mime:part\u3002mime:part \u65E0\u6548, mime:content \u5177\u6709\u4E0D\u540C\u7684\u90E8\u5206\u5C5E\u6027\u3002 + +mimemodeler.invalidMimeContent.invalidSchemaType=\u5FFD\u7565 mime:part\u3002mime part: {0}\u65E0\u6CD5\u6620\u5C04\u5230\u6A21\u5F0F\u7C7B\u578B: {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=wsdl:part \u5143\u7D20\u7531 mime:content \u90E8\u5206\u5C5E\u6027\u5F15\u7528: \u5FC5\u987B\u4F7F\u7528\u7C7B\u578B\u5C5E\u6027\u5B9A\u4E49{0}! + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=\u5FFD\u7565\u64CD\u4F5C \"{0}\", mime:content \u4E2D\u7F3A\u5C11\u90E8\u5206\u5C5E\u6027\u3002mime:content \u58F0\u660E\u4E2D\u5FC5\u987B\u5B58\u5728\u90E8\u5206\u5C5E\u6027\u3002 + +mimemodeler.invalidMimeContent.missingTypeAttribute=\u64CD\u4F5C \"{0}\" \u7684 mime:content \u4E2D\u7F3A\u5C11\u7C7B\u578B\u5C5E\u6027\u3002mime:content \u58F0\u660E\u4E2D\u5FC5\u987B\u5B58\u5728\u90E8\u5206\u5C5E\u6027\u3002 + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=mime:content \u90E8\u5206\u7684\u672A\u77E5\u6A21\u5F0F\u7C7B\u578B{1}: {0} +mimemodeler.invalidMimeContent.errorLoadingJavaClass=\u627E\u4E0D\u5230 mime \u7C7B\u578B \"{1}\" \u7684\u7C7B \"{0}\" + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=\u5FFD\u7565 mime:part, \u5728 wsdl:operation \"{1}\" \u4E2D\u627E\u4E0D\u5230\u7531 mime:content \u5F15\u7528\u7684\u90E8\u5206 \"{0}\" + +mimemodeler.elementPart.invalidElementMimeType=mime:content \u90E8\u5206\u5F15\u7528\u4F7F\u7528\u5143\u7D20\u5C5E\u6027\u5B9A\u4E49\u7684 wsdl:part \"{0}\"\u3002\u8BF7\u786E\u4FDD mime \u7C7B\u578B \"{1}\" \u9002\u5408\u5E8F\u5217\u5316 XML\u3002 + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=\u5FFD\u7565\u64CD\u4F5C \"{0}\" \u4E2D\u7684 wsdl:part \u7684\u540D\u79F0\u5C5E\u6027\u3002\u6839\u636E WS-I AP 1.0 \u89C4\u5B9A, \u4E0D\u5141\u8BB8\u6709\u8BE5\u5C5E\u6027\u3002 + + +wsdlmodeler20.rpcenc.not.supported=JAXWS 2.0 \u4E2D\u4E0D\u652F\u6301 rpc/\u7F16\u7801\u7684 wsdl\u3002 +wsdlmodeler.warning.ignoringOperation.notNCName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u8BE5\u64CD\u4F5C\u7684\u540D\u79F0\u4E2D\u5305\u542B\u975E\u6CD5\u5B57\u7B26 ''{1}''\u3002jaxws \u65E0\u6CD5\u5BF9\u5176 rpc-literal \u64CD\u4F5C\u8FDB\u884C\u5E8F\u5217\u5316! + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002wsdl:message \"{1}\" \u4E2D\u7684\u53C2\u6570\u90E8\u5206 "{2}\" \u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u6216\u66F4\u6539 wsdl:part \u540D\u79F0\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002wsdl:message \"{1}\" \u4E2D\u7684\u53C2\u6570\u90E8\u5206 "{2}\" \u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u6216\u66F4\u6539 wsdl:part \u540D\u79F0\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u53C2\u6570\u3002\u5168\u5C40\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88C5\u5B50\u7EA7 \"{1}\" \u7684\u672C\u5730\u540D\u79F0\u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u53C2\u6570\u3002\u5168\u5C40\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88C5\u5B50\u7EA7 \"{1}\" \u7684\u672C\u5730\u540D\u79F0\u662F java \u5173\u952E\u5B57\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u53C2\u6570\u540D\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u53C2\u6570\u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u53C2\u6570\u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u5B83\u662F java \u4FDD\u7559\u5173\u952E\u5B57, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u64CD\u4F5C\u540D\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u5B83\u662F java \u4FDD\u7559\u5173\u952E\u5B57, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002\u8BF7\u4F7F\u7528\u5B9A\u5236\u8BBE\u7F6E\u66F4\u6539\u8BE5\u64CD\u4F5C\u540D\u3002 + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\u5FFD\u7565\u64CD\u4F5C \"{0}\", \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5\u3002wsdl:operation \u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002 +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\u64CD\u4F5C \"{0}\" \u65E0\u6548, \u65E0\u6CD5\u751F\u6210 java \u65B9\u6CD5, wsdl:operation \u7684\u5B9A\u5236\u540D\u79F0 \"{1}\" \u662F java \u5173\u952E\u5B57\u3002 + +wsdlmodeler.jaxb.javatype.notfound=\u6D88\u606F\u90E8\u5206 \"{1}\" \u4E2D\u7684\u6A21\u5F0F\u63CF\u8FF0\u7B26{0}\u672A\u5B9A\u4E49, \u65E0\u6CD5\u7ED1\u5B9A\u5230 Java\u3002\u53EF\u80FD\u662F\u672A\u5728\u5DF2\u5BFC\u5165/\u5305\u542B\u5728 WSDL \u4E2D\u7684\u6A21\u5F0F\u4E2D\u5B9A\u4E49\u6A21\u5F0F\u63CF\u8FF0\u7B26{0}\u3002\u53EF\u4EE5\u6DFB\u52A0\u6B64\u7C7B\u5BFC\u5165/\u5305\u542B\u9879, \u6216\u8005\u8FD0\u884C wsimport \u5E76\u4F7F\u7528 -b \u5F00\u5173\u63D0\u4F9B\u6A21\u5F0F\u4F4D\u7F6E\u3002 +wsdlmodeler.unsupportedBinding.mime=\u5F53\u524D\u4E0D\u652F\u6301 WSDL MIME \u7ED1\u5B9A! + +wsdlmodeler.nonUnique.body.error=\u975E\u552F\u4E00\u4E3B\u4F53\u90E8\u5206! \u6309\u7167 BP 1.1 R2710 \u89C4\u5B9A, \u5728\u7AEF\u53E3\u4E2D\u64CD\u4F5C\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u901A\u4FE1\u64CD\u4F5C\u7B7E\u540D\u624D\u80FD\u6210\u529F\u5206\u6D3E\u3002\u5728\u7AEF\u53E3 {0} \u4E2D, \u64CD\u4F5C \"{1}\" \u548C \"{2}\" \u5177\u6709\u76F8\u540C\u7684\u8BF7\u6C42\u4E3B\u4F53\u5757{3}\u3002\u8BF7\u5C1D\u8BD5\u8FD0\u884C\u5E26 -extension \u5F00\u5173\u7684 wsimport, \u8FD0\u884C\u65F6\u5C06\u5C1D\u8BD5\u4F7F\u7528 SOAPAction \u8FDB\u884C\u5206\u6D3E +wsdlmodeler.nonUnique.body.warning=\u975E\u552F\u4E00\u4E3B\u4F53\u90E8\u5206! \u6309\u7167 BP 1.1 R2710 \u89C4\u5B9A, \u5728\u7AEF\u53E3\u4E2D\u64CD\u4F5C\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u901A\u4FE1\u64CD\u4F5C\u7B7E\u540D\u624D\u80FD\u6210\u529F\u5206\u6D3E\u3002\u5728\u7AEF\u53E3 {0} \u4E2D, \u64CD\u4F5C \"{1}\" \u548C \"{2}\" \u5177\u6709\u76F8\u540C\u7684\u8BF7\u6C42\u4E3B\u4F53\u5757{3}\u3002\u65B9\u6CD5\u5206\u6D3E\u53EF\u80FD\u5931\u8D25, \u8FD0\u884C\u65F6\u5C06\u5C1D\u8BD5\u4F7F\u7528 SOAPAction \u8FDB\u884C\u5206\u6D3E + +wsdlmodeler.rpclit.unkownschematype=\u65E0\u6CD5\u89E3\u6790 XML \u7C7B\u578B \"{0}\", XML \u5230 JAVA \u7684\u7ED1\u5B9A\u5931\u8D25! \u8BF7\u68C0\u67E5 wsdl:message \"{2}\" \u4E2D\u7684 wsdl:part \"{1}\"\u3002 + +wsdlmodeler.responsebean.notfound=wsimport \u65E0\u6CD5\u4E3A\u64CD\u4F5C\u751F\u6210\u5F02\u6B65\u54CD\u5E94 bean: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties new file mode 100644 index 00000000000..5287edaa04e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/modeler_zh_TW.properties @@ -0,0 +1,246 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# general +# Wrapped into an Exception. {0} - localizable exception message of another exception +modeler.nestedModelError=\u6A21\u578B\u88FD\u4F5C\u5668\u932F\u8AA4: {0} + + +# WSDLModeler +# Usage not found. TODO Remove +#wsdlmodeler.multipleOutputParameters=multiple \"out\" parameters in operation: {0} +wsdlmodeler.invalidOperation=\u7121\u6548\u7684\u4F5C\u696D: {0} +wsdlmodeler.invalidState.modelingOperation=\u9032\u884C\u6A21\u578B\u5316\u4F5C\u696D\u6642\u7684\u72C0\u614B\u7121\u6548: {0} +wsdlmodeler.resultIsInOutParameter=\u7D50\u679C\u662F\u4F5C\u696D {0} \u4E2D\u7684 \"inout\" \u53C3\u6578 +wsdlmodeler.invalid.parameterorder.parameter=\u4F5C\u696D \\"{1}\\" \u4E4B parameterOrder \u5C6C\u6027\u6307\u5B9A\u7684 \\"{0}\\" \u4E0D\u662F\u6709\u6548\u7684\u8A0A\u606F\u7D44\u4EF6. +wsdlmodeler.invalid.parameterOrder.tooManyUnmentionedParts=\u4F5C\u696D \"{0}\" \u7684 parameterOrder \u5C6C\u6027\u6F0F\u6389\u4E00\u500B\u4EE5\u4E0A\u7684\u7D44\u4EF6 +wsdlmodeler.invalid.parameterOrder.invalidParameterOrder=\u4F5C\u696D \"{0}\" \u7684 parameterOrder \u5C6C\u6027\u7121\u6548, \u5FFD\u7565 parameterOrder \u63D0\u793A +wsdlmodeler.invalid.parameter.differentTypes=\u4F5C\u696D \"{1}\" \u7684\u53C3\u6578 \"{0}\" \u5728\u8F38\u5165\u548C\u8F38\u51FA\u8A0A\u606F\u4E2D\u4EE5\u4E0D\u540C\u7684\u985E\u578B\u51FA\u73FE +wsdlmodeler.invalid.bindingOperation.notInPortType=\u5728\u9023\u7D50 \"{1}\" \u4E2D, \u4F5C\u696D \"{0}\" \u672A\u986F\u793A\u5728\u5C0D\u61C9\u7684\u9023\u63A5\u57E0\u985E\u578B\u4E2D +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputMissingSoapBody=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u5165\u8A0A\u606F\u6C92\u6709 SOAP \u4E3B\u9AD4\u64F4\u5145 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputMissingSoapBody=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u51FA\u8A0A\u606F\u6C92\u6709 SOAP \u4E3B\u9AD4\u64F4\u5145 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingInputName=\u9023\u7D50\u4F5C\u696D \"{0}\" \u5FC5\u9808\u6307\u5B9A\u5176\u8F38\u5165\u8A0A\u606F\u7684\u540D\u7A31 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.missingOutputName=\u9023\u7D50\u4F5C\u696D \"{0}\" \u5FC5\u9808\u6307\u5B9A\u5176\u8F38\u51FA\u8A0A\u606F\u7684\u540D\u7A31 +wsdlmodeler.invalid.bindingOperation.multipleMatchingOperations=\u5728\u9023\u7D50 \"{1}\" \u4E2D, \u4F5C\u696D \"{0}\" \u672A\u53C3\u7167\u76F8\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4E2D\u7684\u4E00\u9805\u552F\u4E00\u4F5C\u696D +wsdlmodeler.invalid.bindingOperation.notFound=\u5728\u9023\u7D50 \"{1}\" \u4E2D, \u4F5C\u696D \"{0}\" \u4E0D\u7B26\u5408\u76F8\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4E2D\u7684\u4EFB\u4F55\u4F5C\u696D +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.inputSoapBody.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u5165\u8A0A\u606F\u5FC5\u9808\u70BA \"namespace\" \u5C6C\u6027\u6307\u5B9A\u4E00\u500B\u503C +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingOperation.outputSoapBody.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u51FA\u8A0A\u606F\u5FC5\u9808\u70BA \"namespace\" \u5C6C\u6027\u6307\u5B9A\u4E00\u500B\u503C +wsdlmodeler.invalid.bindingOperation.inputHeader.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u5165\u6A19\u982D \"{1}\" \u5FC5\u9808\u6307\u5B9A \"namespace\" \u5C6C\u6027\u7684\u503C +wsdlmodeler.invalid.bindingOperation.outputHeader.missingNamespace=\u9023\u7D50\u4F5C\u696D \"{0}\" \u7684\u8F38\u51FA\u6A19\u982D \"{1}\" \u5FC5\u9808\u6307\u5B9A \"namespace\" \u5C6C\u6027\u7684\u503C +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notUnique=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u7B26\u5408\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4F5C\u696D\u4E2D\u4E00\u500B\u4EE5\u4E0A\u7684\u932F\u8AA4 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.notFound=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u4E0D\u7B26\u5408\u5C0D\u61C9\u9023\u63A5\u57E0\u985E\u578B\u4F5C\u696D\u4E2D\u7684\u4EFB\u4F55\u932F\u8AA4 +# Not concatenated with any other string. +wsdlmodeler.invalid.portTypeFault.notFound=portType \u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u4E0D\u7B26\u5408\u76F8\u5C0D\u61C9\u9023\u7D50\u4F5C\u696D\u4E2D\u7684\u4EFB\u4F55\u932F\u8AA4 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.outputMissingSoapFault=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u6C92\u6709 SOAP \u932F\u8AA4\u64F4\u5145 +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingName=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u5FC5\u9808\u6307\u5B9A \"name\" \u5C6C\u6027\u7684\u503C +# Not concatenated with any other string. +wsdlmodeler.invalid.bindingFault.missingNamespace=\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" \u5FC5\u9808\u6307\u5B9A \"namespace\" \u5C6C\u6027\u7684\u503C +wsdlmodeler.invalid.bindingFault.emptyMessage=\u932F\u8AA4 \"{0}\" \u8207\u8A0A\u606F \"{1}\" \u6709\u95DC, \u4F46\u662F\u8A0A\u606F\u6C92\u6709\u7D44\u4EF6 +wsdlmodeler.invalid.bindingFault.messageHasMoreThanOnePart=\u932F\u8AA4 \"{0}\" \u8207\u8A0A\u606F \"{1}\" \u6709\u95DC, \u4F46\u662F\u8A0A\u606F\u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u7D44\u4EF6 +# Usage not found. TODO Remove +#wsdlmodeler.invalid.message.partMustHaveTypeDescriptor=in message \"{0}\", part \"{1}\" must specify a \"type\" attribute +# Not concatenated with any other string. +wsdlmodeler.invalid.message.partMustHaveElementDescriptor=\u5728\u8A0A\u606F \"{0}\" \u4E2D, \u7D44\u4EF6 \"{1}\" \u5FC5\u9808\u6307\u5B9A \"element\" \u5C6C\u6027 +# Usage not found. TODO Remove +#wsdlmodeler.invalid=invalid WSDL document +wsdlmodeler.unsolvableNamingConflicts=\u767C\u751F\u4E0B\u5217\u547D\u540D\u885D\u7A81: {0} +# +wsdlmodeler.warning.ignoringUnrecognizedSchemaExtension=\u5FFD\u7565\u7DB1\u8981\u5143\u7D20 (\u4E0D\u652F\u63F4\u7684\u7248\u672C): {0} +wsdlmodeler.warning.searchSchema.unrecognizedTypes=\u767C\u73FE {0} \u500B\u7121\u6CD5\u8FA8\u8B58\u7684\u985E\u578B +wsdlmodeler.warning.noServiceDefinitionsFound=WSDL \u6587\u4EF6\u672A\u5B9A\u7FA9\u4EFB\u4F55\u670D\u52D9 +wsdlmodeler.warning.noPortsInService=\u670D\u52D9 \"{0}\" \u672A\u5305\u542B\u4EFB\u4F55\u53EF\u4F7F\u7528\u7684\u9023\u63A5\u57E0. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport. +wsdlmodeler.warning.noOperationsInPort=\u9023\u63A5\u57E0 \"{0}\" \u672A\u5305\u542B\u4EFB\u4F55\u53EF\u4F7F\u7528\u7684\u4F5C\u696D +wsdlmodeler.warning.ignoringNonSOAPPort=\u5FFD\u7565\u9023\u63A5\u57E0 \"{0}\": \u4E0D\u662F\u6A19\u6E96\u7684 SOAP \u9023\u63A5\u57E0. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport. +# Not concatenated with any other string. +wsdlmodeler.warning.nonSOAPPort=\u9023\u63A5\u57E0 \"{0}\" \u4E0D\u662F\u6A19\u6E96\u7684 SOAP \u9023\u63A5\u57E0. \u7522\u751F\u7684\u4F7F\u7528\u8005\u81EA\u5EFA\u7269\u4EF6\u53EF\u80FD\u4E0D\u9069\u7528\u65BC JAX-WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C. +wsdlmodeler.warning.ignoringNonSOAPPort.noAddress=\u5FFD\u7565\u9023\u63A5\u57E0 \"{0}\": \u672A\u6307\u5B9A SOAP \u4F4D\u5740. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport. +# Not concatenated with any other string. +wsdlmodeler.warning.noSOAPAddress=\u9023\u63A5\u57E0 \"{0}\" \u4E0D\u662F SOAP \u9023\u63A5\u57E0, \u5B83\u6C92\u6709 soap:address +wsdlmodeler.warning.ignoringSOAPBinding.nonHTTPTransport:\u5FFD\u7565 SOAP \u9023\u63A5\u57E0 \"{0}\": \u7121\u6CD5\u8FA8\u8B58\u7684\u50B3\u8F38. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport. + +#BP1.1 R2705 +wsdlmodeler.warning.ignoringSOAPBinding.mixedStyle=\u5FFD\u7565\u9023\u63A5\u57E0 \"{0}\", \u672A\u8207 WS-I BP 1.1 \u76F8\u5BB9: WSDL \u9023\u7D50\u70BA\u6DF7\u5408\u6A23\u5F0F, \u5B83\u5FC5\u9808\u662F rpc-literal \u6216 document-literal \u4F5C\u696D. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport. +# Not concatenated with any other string. +wsdlmodeler.warning.port.SOAPBinding.mixedStyle=\u4E0D\u662F WS-I BP1.1 \u76F8\u5BB9\u7684 SOAP \u9023\u63A5\u57E0 \"{0}\": WSDL \u9023\u7D50\u70BA\u6DF7\u5408\u6A23\u5F0F, \u5B83\u5FC5\u9808\u662F rpc-literal \u6216 document-literal \u4F5C\u696D! + +wsdlmodeler.warning.ignoringOperation.notSupportedStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u975E\u8981\u6C42\u56DE\u61C9\u6216\u55AE\u5411 +wsdlmodeler.invalid.operation.notSupportedStyle=\u7121\u6548\u7684 WSDL, wsdl:portType \"{1}\" \u4E2D\u7684 wsdl:operation \"{0}\" \u975E\u8981\u6C42\u56DE\u61C9\u6216\u55AE\u5411 +wsdlmodeler.warning.ignoringOperation.notEncoded=\u5FFD\u7565 RPC \u6A23\u5F0F\u4F5C\u696D \"{0}\": \u672A\u7DE8\u78BC\u53C3\u6578 +wsdlmodeler.warning.ignoringOperation.cannotHandleBodyPartsAttribute=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u7121\u6CD5\u8655\u7406 \"soap:body\" \u5143\u7D20\u7684 \"parts\" \u5C6C\u6027 + +wsdlmodeler.warning.ignoringOperation.cannotHandleTypeMessagePart=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8A0A\u606F\u7D44\u4EF6\u672A\u53C3\u7167\u7DB1\u8981\u5143\u7D20\u5BA3\u544A +wsdlmodeler.invalid.doclitoperation=\u7121\u6548\u7684 wsdl:operation \\"{0}\\": \u5B83\u662F document-literal \u4F5C\u696D, \u8A0A\u606F\u7D44\u4EF6\u5FC5\u9808\u53C3\u7167\u7DB1\u8981\u5143\u7D20\u5BA3\u544A + +wsdlmodeler.warning.ignoringOperation.cannotHandleElementMessagePart=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8A0A\u606F\u7D44\u4EF6\u672A\u53C3\u7167\u7DB1\u8981\u985E\u578B\u5BA3\u544A +wsdlmodeler.invalid.rpclitoperation=\u7121\u6548\u7684 wsdl:operation \\"{0}\\": \u5B83\u662F rpc-literal \u4F5C\u696D, \u8A0A\u606F\u7D44\u4EF6\u5FC5\u9808\u53C3\u7167\u7DB1\u8981\u985E\u578B\u5BA3\u544A + + +wsdlmodeler.warning.ignoringOperation.cannotHandleDocumentStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u7121\u6CD5\u8655\u7406\u6587\u4EF6\u6A23\u5F0F\u4F5C\u696D +wsdlmodeler.warning.bindingOperation.multiplePartBinding=\u6AA2\u67E5\u6458\u8981\u4F5C\u696D \"{0}\" \u9023\u7D50, \u7D44\u4EF6 \"{1}\" \u542B\u6709\u591A\u500B\u9023\u7D50. \u4ECD\u5C07\u5617\u8A66\u7522\u751F\u4F7F\u7528\u8005\u81EA\u5EFA\u7269\u4EF6... +wsdlmodeler.invalid.bindingOperation.multiplePartBinding=\u6458\u8981\u4F5C\u696D \"{0}\" \u9023\u7D50, \u7D44\u4EF6 \"{1}\" \u542B\u6709\u591A\u500B\u9023\u7D50. +wsdlmodeler.warning.ignoringFaults=\u5FFD\u7565\u4F5C\u696D \"{0}\" \u6240\u5BA3\u544A\u7684\u932F\u8AA4 +wsdlmodeler.warning.ignoringFault.notEncoded=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u5E38\u503C\u932F\u8AA4 \"{0}\" +wsdlmodeler.warning.ignoringFault.notLiteral=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u7DE8\u78BC\u932F\u8AA4 \"{0}\" +wsdlmodeler.invalid.operation.fault.notLiteral=\u5FFD\u7565\u5E38\u503C\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u7DE8\u78BC\u932F\u8AA4 \"{0}\" +wsdlmodeler.warning.ignoringHeader=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\" +wsdlmodeler.warning.ignoringHeader.partFromBody=\u6A19\u982D\u90E8\u5206 \\"{0}\\" \u5DF2\u7531 soapbind:body \u9023\u7D50, \u6B64\u90E8\u5206\u9023\u7D50\u5169\u6B21\u7121\u6548 +wsdlmodeler.warning.ignoringHeader.notLiteral=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u4E0D\u662F\u5E38\u503C +wsdlmodeler.invalid.header.notLiteral=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\" \u7121\u6548: \u4E0D\u662F\u5E38\u503C +wsdlmodeler.warning.ignoringHeader.notFound=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u627E\u4E0D\u5230 +# Not concatenated with any other string. +wsdlmodeler.invalid.header.notFound=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u627E\u4E0D\u5230 +wsdlmodeler.warning.ignoringHeader.cant.resolve.message=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u7121\u6CD5\u89E3\u6790\u8A0A\u606F +# Not concatenated with any other string. +wsdlmodeler.invalid.header.cant.resolve.message=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u7121\u6CD5\u89E3\u6790\u8A0A\u606F + +wsdlmodeler.warning.ignoringFault.cant.resolve.message=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\": \u7121\u6CD5\u89E3\u6790\u8A0A\u606F +wsdlmodeler.invalid.fault.cant.resolve.message=\u7121\u6CD5\u89E3\u6790\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4\u8A0A\u606F \"{0}\" + +wsdlmodeler.warning.ignoringHeader.notEncoded=\u5FFD\u7565\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u4E0D\u662F SOAP \u7DE8\u78BC +wsdlmodeler.warning.ignoringHeader.inconsistentDefinition=\u5FFD\u7565\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D \"{0}\": \u627E\u4E0D\u5230\u7D44\u4EF6 +# +wsdlmodeler.warning.ignoringOperation.notLiteral=\u5FFD\u7565\u6587\u4EF6\u6A23\u5F0F\u4F5C\u696D \"{0}\": \u53C3\u6578\u4E0D\u662F\u5E38\u503C +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInInputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u5165\u8A0A\u606F\u5305\u542B\u591A\u500B\u7D44\u4EF6 +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyInputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u5165\u8A0A\u606F\u7A7A\u767D +wsdlmodeler.warning.ignoringOperation.cannotHandleMoreThanOnePartInOutputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u51FA\u8A0A\u606F\u5305\u542B\u591A\u500B\u7D44\u4EF6 +wsdlmodeler.warning.operation.MoreThanOnePartInMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u591A\u500B\u7D44\u4EF6\u9023\u7D50\u81F3\u4E3B\u9AD4 +# Not concatenated with any other string. +wsdlmodeler.invalid.operation.MoreThanOnePartInMessage=\u4F5C\u696D \"{0}\": \u591A\u500B\u7D44\u4EF6\u9023\u7D50\u81F3\u4E3B\u9AD4 +wsdlmodeler.warning.ignoringOperation.cannotHandleEmptyOutputMessage=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u8F38\u51FA\u8A0A\u606F\u7A7A\u767D +wsdlmodeler.warning.ignoringOperation.conflictStyleInWSIMode=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u9023\u7D50\u6A23\u5F0F\u8207\u4F5C\u696D\u6A23\u5F0F\u885D\u7A81 +wsdlmodeler.warning.ignoringOperation.partNotFound=\u5FFD\u7565\u4F5C\u696D \"{0}\": \u627E\u4E0D\u5230\u7D44\u4EF6 \"{1}\" +wsdlmodeler.error.partNotFound=\u7121\u6CD5\u89E3\u6790\u4F5C\u696D \"{0}\" \u7684\u7D44\u4EF6 \"{1}\"! +wsdlmodeler.warning.ignoringFault.documentOperation=\u5FFD\u7565\u6587\u4EF6\u6A23\u5F0F\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\" +wsdlmodler.warning.operation.use=\u4F7F\u7528\u7684 WSDL \u5305\u542B\u4F5C\u696D\u9644\u5E36\u5E38\u503C\u548C\u7DE8\u78BC\u7684\u7528\u6CD5. \u6B64\u6848\u4F8B\u4E0D\u652F\u63F4 -f:searchschema. +#wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=The name of the SOAP fault extension does not match the name of the \"{0}\" fault in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.wrongSoapFaultName=soap:fault \"{0}\" \u7684\u540D\u7A31\u8207\u4F5C\u696D \"{2}\" \u4E2D wsdl:fault \"{1}\" \u7684\u540D\u7A31\u4E0D\u7B26 +#wsdlmodeler.invalid.bindingFault.noSoapFaultName=The name of the SOAP fault extension is missing from the fault \"{0}\" in operation \"{1}\" +wsdlmodeler.invalid.bindingFault.noSoapFaultName=\u4F5C\u696D \\"{1}\\" \u4E2D\u7684 wsdl:fault \\"{0}\\" \u6C92\u6709\u6307\u5B9A soap:fault \u540D\u7A31 + +wsdlmodeler.duplicate.fault.part.name=\u5FFD\u7565\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\", \u7D44\u4EF6\u540D\u7A31 \"{2}\" \u4E0D\u662F\u552F\u4E00\u7684 +wsdlmodeler.duplicate.fault.soap.name=\u5FFD\u7565\u4F5C\u696D \"{1}\" \u7684\u932F\u8AA4 \"{0}\", soap:fault \u540D\u7A31 \"{2}\" \u4E0D\u662F\u552F\u4E00\u7684 + +wsdlmodeler.warning.ignoringHeaderFault.notFound=\u5FFD\u7565\u6A19\u982D\u932F\u8AA4 \"{0}\", \u5728\u9023\u7D50 \"{2}\" \u4E2D\u627E\u4E0D\u5230\u7D44\u4EF6 \"{1}\" +# Usage not found. TODO Remove +#wsdlmodeler.headerfault.part.notFound=part \"{1}\" not found for the header fault \"{0}\", in binding \"{2}\" + +wsdlmodeler.warning.ignoringHeaderFault.notLiteral=\u5FFD\u7565\u4F5C\u696D {2} \u4E4B\u8A0A\u606F \"{1}\" \u7684\u6A19\u982D\u932F\u8AA4\u7D44\u4EF6 \"{0}\", \u4F7F\u7528\u7684\u5C6C\u6027\u5FC5\u9808\u662F \"literal\" + +wsdlmodeler.warning.ignoringHeaderFault.noElementAttribute=\u5FFD\u7565\u4F5C\u696D {2} \u4E4B\u8A0A\u606F \"{1}\" \u7684\u6A19\u982D\u932F\u8AA4\u7D44\u4EF6 \"{0}\" + +wsdlmodeler.invalid.headerfault.notLiteral=\u9023\u7D50\u4F5C\u696D \"{1}\" \u7684\u6A19\u982D\u932F\u8AA4 \"{0}\" \u7121\u6548: \u4E0D\u662F\u5E38\u503C +wsdlmodeler.invalid.headerfault.message.partMustHaveElementDescriptor=\u4F5C\u696D {2} \u4E2D\u6A19\u982D {1} \u7684\u6A19\u982D\u932F\u8AA4 \"{0}\" \u7121\u6548: \u7D44\u4EF6\u5FC5\u9808\u6307\u5B9A \"element\" \u5C6C\u6027 +wsdlmodeler.invalid.header.message.partMustHaveElementDescriptor=\u4F5C\u696D {1} \u4E2D\u7684\u6A19\u982D \"{0}\" \u7121\u6548: \u7D44\u4EF6\u5FC5\u9808\u6307\u5B9A \"element\" \u5C6C\u6027 + + +#wsi warnings +wsdlmodeler.warning.nonconforming.wsdl.import=\u4E0D\u7B26\u5408\u7528\u65BC wsdl:import \u7684 WS-I WSDL +wsdlmodeler.warning.nonconforming.wsdl.types=\u4E0D\u7B26\u5408\u7528\u65BC wsdl:types \u7684 WS-I WSDL +wsdlmodeler.warning.nonconforming.wsdl.use=\u6B63\u5728\u8655\u7406 RPC \u6A23\u5F0F\u4E14 SOAP \u7DE8\u78BC\u7684\u4E0D\u7B26\u5408 WS-I \u4F5C\u696D \"{0}\" + +# optional parts +# Not concatenated with any other string. +wsdlmodeler.error.partsNotFound=\u5728\u8A0A\u606F \"{1}\" \u627E\u4E0D\u5230\u7D44\u4EF6 \"{0}\", \u932F\u8AA4\u7684 WSDL + +# soap 1.2 +wsdlmodeler.warning.port.SOAPBinding12=SOAP \u9023\u63A5\u57E0 \"{0}\" \u4F7F\u7528\u975E\u6A19\u6E96\u7684 SOAP 1.2 \u9023\u7D50. +wsdlmodeler.warning.ignoringSOAPBinding12=\u5FFD\u7565 SOAP \u9023\u63A5\u57E0 \"{0}\": \u5B83\u4F7F\u7528\u975E\u6A19\u6E96\u7684 SOAP 1.2 \u9023\u7D50.\n\u60A8\u5FC5\u9808\u6307\u5B9A \"-extension\" \u9078\u9805, \u624D\u80FD\u5920\u4F7F\u7528\u6B64\u9023\u7D50. + +#WSI-BP1.0 Warning/Errors +wsdlmodeler.warning.r2716=R2716 WSI-BasicProfile \u7248\u672C 1.0, \u4E0D\u5141\u8A31\u5728 {0} \u7684 doc/lit \u4E2D\u4F7F\u7528 namespace \u5C6C\u6027: \"{1}\" + +# {0} - "soapbind:header"/"soapbind:fault", {1} - binding operation name / soap fault name e.g.: R2716/R2726 WSI-BasicProfile ver. 1.0, namespace attribute not allowed in doc/lit or rpc/lit for soapbind:fault: "RemoteValidationException" +wsdlmodeler.warning.r2716r2726=R2716/R2726 WSI-BasicProfile \u7248\u672C 1.0, \u4E0D\u5141\u8A31\u5728 {0} \u7684 doc/lit \u6216 rpc/lit \u4E2D\u4F7F\u7528 namespace \u5C6C\u6027: \"{1}\" + +#WSI-BP 1.1 Warning/Errors +# R2911 +mimemodeler.invalidMimePart.moreThanOneSOAPBody=\u5FFD\u7565\u4F5C\u696D \\"{0}\\". Multipart/Related \u7D50\u69CB\u7684\u6839\u90E8\u5206\u7121\u6548: \u767C\u73FE\u591A\u500B soap:body \u90E8\u5206 + +# R2906 +mimemodeler.warning.IgnoringinvalidHeaderPart.notDeclaredInRootPart=\u6A19\u982D\u4E0D\u662F\u5728 soap:body \u7684\u6839 mime:part \u4E2D, \u5FFD\u7565\u4F5C\u696D \"{0}\" \u4E2D\u7684\u6A19\u982D + +# R2909 +mimemodeler.invalidMimeContent.differentPart=\u5FFD\u7565 mime:part. \u7121\u6548\u7684 mime:part, mime:content \u542B\u6709\u4E0D\u540C\u7684 part \u5C6C\u6027. + +mimemodeler.invalidMimeContent.invalidSchemaType=\u5FFD\u7565 mime:part. mime \u90E8\u5206 {0} \u7121\u6CD5\u5C0D\u61C9\u81F3\u7DB1\u8981\u985E\u578B {1} + +# Rxxxx A mime:content in a DESCRIPTION MUST refer to a wsdl:part element defined using the type attribute. +mimemodeler.invalidMimeContent.mesagePartElementKind=mime:content part \u5C6C\u6027 {0} \u53C3\u7167\u7684 wsdl:part \u5143\u7D20\u5FC5\u9808\u4F7F\u7528 type \u5C6C\u6027\u5B9A\u7FA9! + +# RXXXX RYYYY: In a description, a mime:content element MUST include the part attribute. +mimemodeler.invalidMimeContent.missingPartAttribute=\u5FFD\u7565\u4F5C\u696D \"{0}\", mime:content \u4E2D\u6C92\u6709 part \u5C6C\u6027. mime:content \u5BA3\u544A\u4E2D\u5FC5\u9808\u8981\u6709 part \u5C6C\u6027. + +mimemodeler.invalidMimeContent.missingTypeAttribute=\u4F5C\u696D \"{0}\" \u7684 mime:content \u4E2D\u6C92\u6709 type \u5C6C\u6027. mime:content \u5BA3\u544A\u4E2D\u5FC5\u9808\u8981\u6709 part \u5C6C\u6027. + +# unknown schematype +mimemodeler.invalidMimeContent.unknownSchemaType=mime:content part: {0} \u7684\u7DB1\u8981\u985E\u578B {1} \u4E0D\u660E +mimemodeler.invalidMimeContent.errorLoadingJavaClass=\u627E\u4E0D\u5230 mime \u985E\u578B \"{1}\" \u7684\u985E\u5225 \"{0}\" + +# missing wsdl:part referenced by the mime:content +wsdlmodeler.warning.ignoringMimePart.notFound=\u5FFD\u7565 mime:part, \u627E\u4E0D\u5230 wsdl:operation \"{1}\" \u4E2D mime:content \u6240\u53C3\u7167\u7684\u90E8\u5206 \"{0}\" + +mimemodeler.elementPart.invalidElementMimeType=mime:content part \u53C3\u7167\u4E86\u4F7F\u7528 element \u5C6C\u6027\u5B9A\u7FA9\u7684 wsdl:part \"{0}\". \u8ACB\u78BA\u5B9A mime \u985E\u578B \"{1}\" \u9069\u5408\u5E8F\u5217\u5316 XML. + +# R2708 The mime:part element in a DESCRIPTION MUST NOT have a name attribute. +mimemodeler.invalidMimePart.nameNotAllowed=\u5DF2\u5FFD\u7565\u4F5C\u696D \"{0}\" \u4E2D wsdl:part \u7684 name \u5C6C\u6027. WS-I AP 1.0 \u4E0D\u5141\u8A31. + + +wsdlmodeler20.rpcenc.not.supported=JAXWS 2.0 \u4E0D\u652F\u63F4 rpc/encoded wsdl. +wsdlmodeler.warning.ignoringOperation.notNCName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u5B83\u7684\u540D\u7A31\u4E2D\u542B\u6709\u7121\u6548\u7684\u5B57\u5143 ''{1}''. \u5B83\u7684 rpc-literal \u4F5C\u696D - jaxws \u7121\u6CD5\u5C07\u5B83\u5E8F\u5217\u5316! + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.nonWrapperStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. wsdl:message \"{1}\" \u4E2D\u7684\u53C3\u6578 part "{2}\" \u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31\u6216\u8B8A\u66F4 wsdl:part \u540D\u7A31. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.nonWrapperStyle=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. wsdl:message \"{1}\" \u4E2D\u7684\u53C3\u6578 part "{2}\" \u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31\u6216\u8B8A\u66F4 wsdl:part \u540D\u7A31. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.wrapperStyle=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5\u53C3\u6578. \u5168\u57DF\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88DD\u51FD\u5F0F\u5B50\u9805 \"{1}\" \u7684\u672C\u6A5F\u540D\u7A31\u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.wrapperStyle=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5\u53C3\u6578. \u5168\u57DF\u5143\u7D20 \"{2}\" \u4E2D\u5305\u88DD\u51FD\u5F0F\u5B50\u9805 \"{1}\" \u7684\u672C\u6A5F\u540D\u7A31\u70BA java \u95DC\u9375\u5B57. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u53C3\u6578\u540D\u7A31. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u53C3\u6578\u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customName=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u53C3\u6578\u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.operationName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u5B83\u70BA java \u4FDD\u7559\u5B57, \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u4F5C\u696D\u540D\u7A31. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.operationName=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u5B83\u70BA java \u4FDD\u7559\u5B57, \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5. \u8ACB\u5229\u7528\u81EA\u8A02\u4F86\u8B8A\u66F4\u4F5C\u696D\u540D\u7A31. + +wsdlmodeler.warning.ignoringOperation.javaReservedWordNotAllowed.customizedOperationName=\u5FFD\u7565\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5, wsdl:operation \u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57. +wsdlmodeler.invalid.operation.javaReservedWordNotAllowed.customizedOperationName=\u7121\u6548\u7684\u4F5C\u696D \"{0}\", \u7121\u6CD5\u7522\u751F java \u65B9\u6CD5, wsdl:operation \u7684\u81EA\u8A02\u540D\u7A31 \"{1}\" \u70BA java \u95DC\u9375\u5B57. + +wsdlmodeler.jaxb.javatype.notfound=\u672A\u5B9A\u7FA9\u8A0A\u606F\u7D44\u4EF6 \\"{1}\\" \u4E2D\u7684\u7DB1\u8981\u63CF\u8FF0\u5340 {0}, \u56E0\u6B64\u7121\u6CD5\u9023\u7D50\u81F3 Java. \u53EF\u80FD\u672A\u5728 WSDL \u532F\u5165/\u5305\u62EC\u7684\u7DB1\u8981\u4E2D\u5B9A\u7FA9\u7DB1\u8981\u63CF\u8FF0\u5340 {0}. \u60A8\u53EF\u4EE5\u65B0\u589E\u6B64\u985E\u532F\u5165\u9805/\u5305\u62EC\u9805, \u6216\u8005\u4F7F\u7528 -b \u53C3\u6578\u57F7\u884C wsimport \u4E26\u63D0\u4F9B\u7DB1\u8981\u4F4D\u7F6E. +wsdlmodeler.unsupportedBinding.mime=\u76EE\u524D\u4E0D\u652F\u63F4 WSDL MIME \u9023\u7D50! + +wsdlmodeler.nonUnique.body.error=\u975E\u552F\u4E00\u7684\u4E3B\u9AD4\u90E8\u5206! \u6839\u64DA BP 1.1 R2710, \u5728\u9023\u63A5\u57E0\u4E2D, \u4F5C\u696D\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u7DDA\u5F0F\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u9806\u5229\u9032\u884C\u5206\u914D. \u5728\u9023\u63A5\u57E0 {0} \u4E2D, \"{1}\" \u548C \"{2}\" \u4F5C\u696D\u5747\u6709\u76F8\u540C\u7684\u8981\u6C42\u4E3B\u9AD4\u5340\u584A {3}. \u8ACB\u5617\u8A66\u4F7F\u7528 -extension \u53C3\u6578\u57F7\u884C wsimport, \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5C07\u6703\u5617\u8A66\u4F7F\u7528 SOAPAction \u9032\u884C\u5206\u914D. +wsdlmodeler.nonUnique.body.warning=\u975E\u552F\u4E00\u7684\u4E3B\u9AD4\u90E8\u5206! \u6839\u64DA BP 1.1 R2710, \u5728\u9023\u63A5\u57E0\u4E2D, \u4F5C\u696D\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u7DDA\u5F0F\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u9806\u5229\u9032\u884C\u5206\u914D. \u5728\u9023\u63A5\u57E0 {0} \u4E2D, \"{1}\" \u548C \"{2}\" \u4F5C\u696D\u5747\u6709\u76F8\u540C\u7684\u8981\u6C42\u4E3B\u9AD4\u5340\u584A {3}. \u65B9\u6CD5\u5206\u914D\u6709\u53EF\u80FD\u6703\u5931\u6557, \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5C07\u6703\u5617\u8A66\u4F7F\u7528 SOAPAction \u9032\u884C\u5206\u914D. + +wsdlmodeler.rpclit.unkownschematype=\u7121\u6CD5\u89E3\u6790 XML \u985E\u578B \"{0}\", \u5F9E XML \u81F3 JAVA \u7684\u9023\u7D50\u5931\u6557! \u8ACB\u6AA2\u67E5 wsdl:message \"{2}\" \u4E2D\u7684 wsdl:part \"{1}\". + +wsdlmodeler.responsebean.notfound=wsimport \u7121\u6CD5\u7522\u751F\u4F5C\u696D\u7684\u975E\u540C\u6B65\u56DE\u61C9 bean: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties index d1fa4c504e5..e1fc0a211d4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_de.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_es.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_fr.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_it.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ja.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_ko.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_pt_BR.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_CN.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties new file mode 100644 index 00000000000..e1fc0a211d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/processor_zh_TW.properties @@ -0,0 +1,27 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#processor.missing.model=model is missing diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties index 7beec56ee5d..f69475986e9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties new file mode 100644 index 00000000000..33da0f686dc --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_de.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=Das Feld im Holder, das den Wert {0} des Holders enth\u00E4lt, konnte nicht gefunden werden +null.namespace.found=Fehler in WSDL aufgetreten. Pr\u00FCfen Sie den Namespace von Element <{0}> +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties new file mode 100644 index 00000000000..0e4dcade0ea --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_es.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=No se ha encontrado el campo en el propietario que contiene el valor de propietario: {0} +null.namespace.found=Se ha encontrado un error en WSDL. Compruebe el espacio de nombres del elemento <{0}> +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties new file mode 100644 index 00000000000..29598ee43ed --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_fr.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=Champ introuvable dans le d\u00E9tenteur contenant les valeurs du d\u00E9tenteur : {0} +null.namespace.found=Erreur d\u00E9tect\u00E9e dans le WSDL. V\u00E9rifiez l''espace de noms de l''\u00E9l\u00E9ment <{0}> +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs : {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties new file mode 100644 index 00000000000..5d6709ba5df --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_it.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=Impossibile trovare il campo nel contenitore al cui interno si trova il valore del contenitore: {0} +null.namespace.found=Rilevato errore in WSDL. Controllare lo spazio di nomi dell''elemento <{0}> +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties new file mode 100644 index 00000000000..117992ae6ea --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ja.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=Holder\u306E\u5024: {0}\u3092\u542B\u3080\u30D5\u30A3\u30FC\u30EB\u30C9\u304CHolder\u5185\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F +null.namespace.found=wsdl\u306B\u30A8\u30E9\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002\u8981\u7D20<{0}>\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties new file mode 100644 index 00000000000..bb684a6c69c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_ko.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=\uD640\uB354\uC5D0\uC11C \uD640\uB354 \uAC12\uC744 \uD3EC\uD568\uD558\uB294 \uD544\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} +null.namespace.found=WSDL\uC5D0 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. <{0}> \uC694\uC18C\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties new file mode 100644 index 00000000000..876e62cda92 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_pt_BR.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=N\u00E3o foi poss\u00EDvel localizar o campo no Detentor que cont\u00E9m o valor do Detentor: {0} +null.namespace.found=Erro encontrado no wsdl. Verifique o namespace do elemento <{0}> +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties new file mode 100644 index 00000000000..5d78e4aabdd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_CN.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=\u5728\u4FDD\u5B58\u5668\u4E2D\u627E\u4E0D\u5230\u5305\u542B\u4FDD\u5B58\u5668\u503C\u7684\u5B57\u6BB5: {0} +null.namespace.found=wsdl \u4E2D\u51FA\u73B0\u9519\u8BEF\u3002\u8BF7\u68C0\u67E5\u5143\u7D20 <{0}> \u7684\u540D\u79F0\u7A7A\u95F4 +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties new file mode 100644 index 00000000000..5ad716e440d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/util_zh_TW.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +holder.valuefield.not.found=\u5728 Holder \u4E2D\u627E\u4E0D\u5230\u5305\u542B Holder \u503C {0} \u7684\u6B04\u4F4D +null.namespace.found=WSDL \u767C\u751F\u932F\u8AA4. \u8ACB\u6AA2\u67E5\u5143\u7D20 <{0}> \u7684\u547D\u540D\u7A7A\u9593. +sax2dom.notsupported.createelement=SAX2DOMEx.DomImplDoesntSupportCreateElementNs: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties index 634d3286400..abb411bfb4d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -158,3 +158,5 @@ webserviceap.no.package.class.must.have.targetnamespace=@javax.jws.Webservice an webserviceap.webservice.and.webserviceprovider=Classes cannot be annotated with both @javax.jws.WebService and @javax.xml.ws.WebServiceProvider. Class\: {0} webserviceap.invalid.soapbinding.parameterstyle= Incorrect usage of Annotation {0} on {1}, ParameterStyle can only be WRAPPED with RPC Style Web service. + +webserviceap.parsing.javac.options.error=Can't get javac options from processingEnv. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties new file mode 100644 index 00000000000..c488518569d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_de.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=Fehler: Datei nicht gefunden: {0} +webserviceap.error=Fehler: {0} +webserviceap.warning=Warnung: {0} +webserviceap.info=Informationen: {0} +webserviceap.compilationFailed=Kompilierung nicht erfolgreich, Fehler sollten gemeldet worden sein +webserviceap.succeeded: Erfolgreich + +webserviceap.method.not.annotated=Die Methode {0} in Klasse {1} verf\u00FCgt \u00FCber keine Annotation. +webserviceap.rpc.encoded.not.supported=Die Klasse {0} enth\u00E4lt ein RPC/codiertes SOAPBinding. RPC/codierte SOAPBindings werden in JAXWS 2.0 nicht unterst\u00FCtzt. +webservice.encoded.not.supported=Die {0}-Klasse enth\u00E4lt eine ung\u00FCltige SOAPBinding-Annotation. {1}/codiertes SOAPBinding wird nicht unterst\u00FCtzt +webserviceap.model.already.exists=Modell ist bereits vorhanden +webserviceap.endpointinterface.on.interface=Service-End Point-Schnittstelle\\: {0} darf keine WebService.endpointInterface-Annotation enthalten\\: {1} +webserviceap.java.typeNotFound=Der Typ: {0} wurde in der Zuordnung nicht gefunden +webserviceap.endpointinterfaces.do.not.match=Die End Point-Schnittstelle {0} stimmt nicht mit der Schnittstelle {1} \u00FCberein. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=TypeElement f\u00FCr:\\ {0} konnte bei Annotationsverarbeitung nicht abgerufen werden:\\ {1} + +webserviceap.no.webservice.endpoint.found=Ein Webservice-End Point konnte nicht gefunden werden + +webserviceap.endpointinterface.has.no.webservice.annotation=Die End Point-Schnittstelle {0} muss eine WebService-Annotation aufweisen + +webserviceap.oneway.operation.cannot.have.return.type=Die Methode {1} von Klasse {0} ist mit @Oneway-Annotation versehen, hat jedoch einen R\u00FCckgabetyp. + +webserviceap.oneway.operation.cannot.have.holders=Die Methode {1} von Klasse {0} ist mit @Oneway-Annotation versehen, enth\u00E4lt jedoch INOUT- oder OUT-Parameter (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=Die Methode {1} von Klasse {0} ist mit @Oneway-Annotation versehen, deklariert jedoch die Ausnahme {2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Sie k\u00F6nnen HandlerChain- und SOAPMessageHandlers-Annotationen nicht gemeinsam angeben + +webserviceap.invalid.handlerchain.file.nohandler-config=Die Handlerchain-Datei {0} ist ung\u00FCltig, sie enth\u00E4lt kein handler-config-Element + +webserviceap.could.not.find.handlerchain=Handlerchain {0} konnte in der Handler-Datei {1} nicht gefunden werden + +webserviceap.handlerclass.notspecified=Ein Handler in der HandlerChain-Datei\\: {0} gibt keine handler-class an + +webserviceap.init_param.format.error=ein -Element muss genau 1 und 1 enthalten + +webserviceap.document.literal.bare.method.return.not.unique=Document/Literal BARE-Methoden m\u00FCssen eine eindeutige Ergebnisname-/R\u00FCckgabetyp-Kombination aufweisen. Klasse {0} Methode\\: {1}, Ergebnisname\\: {2} Ergebnistyp\\: {3} + +webserviceap.document.literal.bare.method.not.unique=Document/Literal BARE-Methoden m\u00FCssen eindeutige Parameternamen haben. Klasse\\: {0} Methode\\: {1} Parametername\\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=Document/Literal BARE-Methoden m\u00FCssen einen R\u00FCckgabewert oder einen OUT-Parameter aufweisen. Klasse\\: {0} Methode\\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=Document/Literal BARE-Methoden d\u00FCrfen nicht mehr als 1 Nicht-Header IN-Parameter enthalten. Klasse\\: {0} Methode\\: {1} Anzahl Nicht-Header-Parameter\\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=Document/Literal BARE-Methoden m\u00FCssen mindestens einen der folgenden Parameter enthalten: R\u00FCckgabe-Parameter, IN-Parameter oder OUT-Parameter. Klasse\: {0} Methode\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder-Parameter d\u00FCrfen nicht mit WebParam.Mode.IN-Eigenschaft versehen werden. Klasse\\: {0} Methode\\: {1} Parameter\\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=javax.xml.ws.Holder-Parameter in Document BARE-Vorg\u00E4ngen m\u00FCssen WebParam.Mode.INOUT enthalten; Klasse\\: {0} Methode\\: {1} Parameter\\: {2} + +webserviceap.endpointinterface.class.not.found=Die endpointInterface-Klasse {0} konnte nicht gefunden werden + +webserviceap.sei.cannot.contain.constant.values=Eine Service-End Point-Schnittstelle darf keine konstante Deklaration enthalten\: Schnittstelle\: {0}-Feld\: {1}. + +webserviceap.method.return.type.cannot.implement.remote=Methodenr\u00FCckgabetypen k\u00F6nnen java.rmi.Remote nicht implementieren. Klasse\\: {0} Methode\\: {1} R\u00FCckgabetyp\\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=Methodenparametertypen k\u00F6nnen java.rmi.Remote nicht implementieren. Klasse\\: {0} Methode\\: {1} Parameter\: {2} Typ\\: {3} + +webserviceap.operation.name.not.unique=Vorgangsnamen m\u00FCssen eindeutig sein. Klasse\: {0} Methode\: {1} Vorgangsname\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=Namen von Anforderungs-Wrapper Beans m\u00FCssen eindeutig sein und m\u00FCssen mit anderen generierten Klassennamen vereinbar sein. Klasse\\: {0} Methode {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=Namen von Antwort-Wrapper Beans m\u00FCssen eindeutig sein und m\u00FCssen mit anderen generierten Klassennamen vereinbar sein. Klasse\\: {0} Methode {1} + +webserviceap.method.exception.bean.name.not.unique=Namen von Ausnahme-Beans m\u00FCssen eindeutig sein und m\u00FCssen mit anderen generierten Klassennamen vereinbar sein. Klasse\\: {0} Ausnahme {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=Alle literalen RPC-Parameter m\u00FCssen eine WebParam-Annotation aufweisen. Klasse\\: {0} Methode\\: {1} Parameter {2} + +webserviceap.rpc.literal.webparams.must.specify.name=Alle literalen RPC-WebParams m\u00FCssen einen Namen angeben. Klasse\\: {0} Methode {1} Parameter {2} + +webserviceap.rpc.literal.must.not.be.bare=Literale RPC-SOAPBindings m\u00FCssen den parameterStyle WRAPPED aufweisen. Klasse\\: {0}. + +webserviceap.header.parameters.must.have.webparam.name=Alle WebParam-Annotationen bei Header-Parametern m\u00FCssen einen Namen angeben. Klasse\\: {0} Methode {1} Parameter {2} + +webserviceap.failed.to.find.handlerchain.file=HandlerChain-Datei kann nicht gefunden werden. Klasse\: {0}, Datei:\ {1} + +webserviceap.failed.to.parse.handlerchain.file=HandlerChain-Datei konnte nicht geparst werden. Klasse\: {0}, Datei\: {1} + +webserviceap.class.not.found=Klasse nicht gefunden: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=SOAPBinding.Style.RPC-Binding-Annotationen sind bei Methoden nicht zul\u00E4ssig. Klasse\\: {0} Methode\\: {1} + +webserviceap.mixed.binding.style=Klasse\\: {0} enth\u00E4lt gemischte Bindings. SOAPBinding.Style.RPC und SOAPBinding.Style.DOCUMENT d\u00FCrfen nicht gemischt werden. + +webserviceap.endpointinteface.plus.annotation=Die @{0}-Annotation kann nicht mit @javax.jws.WebService.endpointInterface-Element verwendet werden. + +webserviceap.endpointinteface.plus.element=Das @javax.jws.WebService.{0}-Element kann nicht mit @javax.jws.WebService.endpointInterface-Element verwendet werden. + +webserviceap.non.in.parameters.must.be.holder=Klasse:\\ {0}, Methode: {1}, Parameter: {2} ist nicht WebParam.Mode.IN und ist nicht vom Typ javax.xml.ws.Holder. + +webserviceap.invalid.sei.annotation.element=Das @javax.jws.WebService.{0}-Element kann nicht bei Service End Point-Schnittstelle angegeben werden. Klasse\: {1} + +webserviceap.invalid.sei.annotation=Die @{0}-Annotation kann nicht bei einer Service-End Point-Schnittstelle verwendet werden. Klasse\\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=Die @javax.jws.WebMethod({0}) kann nicht bei einer Service-End Point-Schnittstelle verwendet werden. Klasse\\: {1} Methode\\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=Das @javax.jws.WebMethod.{0}-Element kann nicht mit dem @javax.jws.WebMethod.exclude-Element angegeben werden. Klasse\\: {1} Methode\\: {2} + +webserviceap.doc.bare.no.out=Document/Literal BARE-Methoden ohne R\u00FCckgabetyp oder OUT-/INOUT-Parameter m\u00FCssen mit @Oneway-Annotation versehen werden. Klasse\\: {0}, Methode: {1} +webserviceap.doc.bare.return.and.out=Document/Literal BARE-Methoden d\u00FCrfen keinen R\u00FCckgabetyp und OUT-Parameter enthalten. Klasse\\: {0} Methode\\: {1} +webserviceap.oneway.and.out=@Oneway-Methoden d\u00FCrfen keine Out-Parameter enthalten. Klasse\\: {0} Methode {1} + +webserviceap.webservice.class.not.public=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, m\u00FCssen vom Typ "public" sein. Klasse\\: {0} + +webserviceap.webservice.class.is.final=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, d\u00FCrfen nicht vom Typ "final" sein. Klasse\\: {0} + +webserviceap.webservice.class.is.abstract=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, d\u00FCrfen nicht vom Typ "abstract" sein. Klasse\\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=Innere Klassen, die mit @javax.jws.WebService-Annotation versehen sind, m\u00FCssen vom Typ "static" sein. Klasse\\: {0} + +webserviceap.webservice.method.is.abstract=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, d\u00FCrfen keine Methoden vom Typ "abstract" enthalten. Klasse\\: {0} Methode: {1} + +webserviceap.webservice.method.is.static.or.final=Methode, die mit @javax.jws.WebMethod-Annotation versehen ist, darf nicht vom Typ "static" oder "final" sein. Klasse\\: {0} Methode: {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=Klassen, die mit @javax.jws.WebService-Annotation versehen sind, m\u00FCssen einen \u00F6ffentlichen Standardkonstruktor enthalten. Klasse\\: {0} + +webserviceap.oneway.and.not.one.in=Document/Literal BARE-Methoden, die mit @javax.jws.Oneway-Annotation versehen sind, m\u00FCssen einen Nicht-Header IN-Parameter enthalten. Klasse\\: {0} Methode\\: {1} + +webserviceap.doc.bare.no.return.and.no.out=Document/Literal BARE-Methoden, die keinen R\u00FCckgabewert enthalten, m\u00FCssen einen einzelnen OUT-/INOUT-Parameter enthalten. Klasse\: {0} Methode\: {1} + +webserviceap.doc.bare.and.no.one.in=Document/Literal BARE-Methoden m\u00FCssen einen Nicht-Header IN-/INOUT-Parameter enthalten. Klasse\: {0} Methode\: {1} + +webserviceap.method.not.implemented=Methoden in einer endpointInterface m\u00FCssen in der Implementierungsklasse implementiert sein. Schnittstellenklasse\\:{0} Implementierungsklasse\\:{1} Methode\\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=Mit @javax.jws.Webservice-Annotation versehene Klassen, die nicht zu einem Package geh\u00F6ren, m\u00FCssen das @javax.jws.Webservice.targetNamespace-Element aufweisen. Klasse\\: {0} + +webserviceap.webservice.and.webserviceprovider=Klassen k\u00F6nnen nicht sowohl mit @javax.jws.WebService- als auch mit @javax.xml.ws.WebServiceProvider-Annotation versehen sein. Klasse\\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= Nicht korrekte Verwendung von Annotation {0} in {1}, ParameterStyle kann nur WRAPPED mit RPC-Webservice sein. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties new file mode 100644 index 00000000000..98df66bdeec --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_es.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=error: archivo no encontrado: {0} +webserviceap.error=error: {0} +webserviceap.warning=advertencia: {0} +webserviceap.info=informaci\u00F3n: {0} +webserviceap.compilationFailed=fallo de compilaci\u00F3n; se ha debido informar de los errores +webserviceap.succeeded: Correcto + +webserviceap.method.not.annotated=El m\u00E9todo {0} de la clase {1} no est\u00E1 anotado. +webserviceap.rpc.encoded.not.supported=La clase {0} tiene un enlace SOAP RPC/codificado. Los enlaces SOAP RPC/codificados no est\u00E1n soportados en JAX-WS 2.0. +webservice.encoded.not.supported=La clase {0} tiene una anotaci\u00F3n SOAPBinding no v\u00E1lida. El enlace SOAP {1}/codificado no est\u00E1 soportado +webserviceap.model.already.exists=el modelo ya existe +webserviceap.endpointinterface.on.interface=La interfaz de punto final de servicio \\: {0} no puede tener una anotaci\u00F3n WebService.endpointInterface\\: {1} +webserviceap.java.typeNotFound=El tipo {0} no se ha encontrado en la asignaci\u00F3n +webserviceap.endpointinterfaces.do.not.match=La interfaz de punto final {0} no coincide con la interfaz {1}. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=No se ha podido obtener TypeElement para:\\ {0} en la ronda de procesamiento de anotaciones:\\ {1} + +webserviceap.no.webservice.endpoint.found=No se ha encontrado un punto final del servicio web + +webserviceap.endpointinterface.has.no.webservice.annotation=La interfaz de punto final {0} debe tener una anotaci\u00F3n de servicio web + +webserviceap.oneway.operation.cannot.have.return.type=El m\u00E9todo {1} de la clase {0} est\u00E1 anotado con @Oneway, pero tiene un tipo de retorno. + +webserviceap.oneway.operation.cannot.have.holders=El m\u00E9todo {1} de la clase {0} est\u00E1 anotado con @Oneway, pero contiene los par\u00E1metros INOUT o OUT (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=El m\u00E9todo {1} de la clase {0} est\u00E1 anotado con @Oneway, pero declara la excepci\u00F3n {2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=No se pueden especificar las anotaciones HanlderChain y SOAPMessageHandlers + +webserviceap.invalid.handlerchain.file.nohandler-config=El archivo handlerchain {0} no es v\u00E1lido. No contiene un elemento handler-config + +webserviceap.could.not.find.handlerchain=No se ha encontrado handlerchain {0} en el archivo de manejador {1} + +webserviceap.handlerclass.notspecified=Un manejador del archivo HandlerChain\\: {0} no especifica una clase de manejador + +webserviceap.init_param.format.error=el elemento debe tener exactamente 1 y 1 + +webserviceap.document.literal.bare.method.return.not.unique=Los m\u00E9todos BARE del literal de documento deben tener una combinaci\u00F3n de tipo de retorno del nombre de resultado \u00FAnica. Clase {0} m\u00E9todo\\: {1}, nombre de resultado\\: {2} tipo de retorno\\: {3} + +webserviceap.document.literal.bare.method.not.unique=Los m\u00E9todos BARE del literal de documentos deben tener nombres de par\u00E1metros \u00FAnicos. Clase\\: {0} m\u00E9todo\\: {1} nombre de par\u00E1metro\\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=Los m\u00E9todos BARE del literal de documentos deben tener un valor de retorno o un par\u00E1metro OUT. Clase\\: {0} M\u00E9todo\\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=Los m\u00E9todos BARE del literal de documento no deben tener m\u00E1s de 1 elemento no de cabecera en el par\u00E1metro. Clase\\: {0} m\u00E9todo\\: {1} n\u00FAmero de par\u00E1metros no de cabecera\\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=Los m\u00E9todos BARE del literal de documento deben tener al menos: un par\u00E1metro de retorno, un par\u00E1metro IN o un par\u00E1metro OUT. Clase\: {0} M\u00E9todo\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=Los par\u00E1metros javax.xml.ws.Holder no se deben anotar con la propiedad WebParam.Mode.IN. Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro\\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=Los par\u00E1metros javax.xml.ws.Holder de las operaciones BARE de documento deben tener WebParam.Mode.INOUT; Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro\\: {2} + +webserviceap.endpointinterface.class.not.found=No se ha encontrado la clase endpointInterface {0} + +webserviceap.sei.cannot.contain.constant.values=Una interfaz de punto final de servicio no puede contener una declaraci\u00F3n de constantes\\: Interfaz\\: {0} campo\\: {1}. + +webserviceap.method.return.type.cannot.implement.remote=Los tipos de retorno de m\u00E9todo no pueden implantar java.rmi.Remote. Clase\\: {0} m\u00E9todo\\: {1} tipo de retorno\\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=Los tipos de par\u00E1metros de m\u00E9todo no pueden implantar java.rmi.Remote. Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro\\: {2} tipo\\: {3} + +webserviceap.operation.name.not.unique=Los nombres de operaciones deben ser \u00FAnicos. Clase\\: {0} m\u00E9todo\\: {1} nombre de operaci\u00F3n\\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=Los nombres de bean de envoltorio de solicitud deben ser \u00FAnicos y no deben entrar en conflicto con otras clases generadas. Clase\\: {0} m\u00E9todo {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=Los nombres de bean de envoltorio de respuesta deben ser \u00FAnicos y no deben entrar en conflicto con otras clases generadas. Clase\\: {0} m\u00E9todo {1} + +webserviceap.method.exception.bean.name.not.unique=Los nombres de bean de excepci\u00F3n deben ser \u00FAnicos y no deben entrar en conflicto con otras clases generadas. Clase\: {0} excepci\u00F3n {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=Todos los par\u00E1metros de literales RPC deben tener una anotaci\u00F3n WebParam. Clase\\: {0} m\u00E9todo\\: {1} par\u00E1metro {2} + +webserviceap.rpc.literal.webparams.must.specify.name=Todos los par\u00E1metros web de literales RPC deben especificar un nombre. Clase\\: {0} m\u00E9todo {1}, par\u00E1metro {2} + +webserviceap.rpc.literal.must.not.be.bare=El literal de RPC SOAPBindings debe tener el elemento parameterStyle WRAPPED. Clase\\: {0}. + +webserviceap.header.parameters.must.have.webparam.name=Todas las anotaciones de par\u00E1metros web en los par\u00E1metros de cabecera deben especificar un nombre. Clase\: {0} m\u00E9todo {1}, par\u00E1metro {2} + +webserviceap.failed.to.find.handlerchain.file=No se ha encontrado el archivo HandlerChain. Clase\\: {0}, archivo:\\ {1} + +webserviceap.failed.to.parse.handlerchain.file=Fallo al analizar el archivo HandlerChain. Clase\\: {0}, archivo\\: {1} + +webserviceap.class.not.found=No se ha encontrado la clase: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=Las anotaciones del enlace SOAPBinding.Style.RPC no est\u00E1n permitidas en los m\u00E9todos. Clase\\: {0} M\u00E9todo\\: {1} + +webserviceap.mixed.binding.style=La clase \\: {0} contiene enlaces mixtos. SOAPBinding.Style.RPC y SOAPBinding.Style.DOCUMENT no se pueden mezclar. + +webserviceap.endpointinteface.plus.annotation=La anotaci\u00F3n @{0} no se puede utilizar con el elemento @javax.jws.WebService.endpointInterface. + +webserviceap.endpointinteface.plus.element=El elemento @javax.jws.WebService.{0} no se puede utilizar con el elemento @javax.jws.WebService.endpointInterface. + +webserviceap.non.in.parameters.must.be.holder=La clase:\\ {0},m\u00E9todo: {1}, par\u00E1metro: {2} no es WebParam.Mode.IN y no es del tipo javax.xml.ws.Holder. + +webserviceap.invalid.sei.annotation.element=El elemento @javax.jws.WebService.{0} no se puede especificar en una interfaz de punto final de servicio. Clase\\: {1} + +webserviceap.invalid.sei.annotation=La anotaci\u00F3n @{0} no se puede utilizar en una interfaz de punto final de servicio. Clase\\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=@javax.jws.WebMethod({0}) no se puede utilizar en una interfaz de punto final de servicio. Clase\\: {1} m\u00E9todo\\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=El elemento @javax.jws.WebMethod.{0} no se puede especificar con el elemento @javax.jws.WebMethod.exclude. Clase\\: {1} m\u00E9todo\\: {2} + +webserviceap.doc.bare.no.out=Los m\u00E9todos BARE de documento/literal que no tienen tipo de retorno o par\u00E1metros OUT/INOUT se deben anotar como @Oneway. Clase\\: {0}, m\u00E9todo: {1} +webserviceap.doc.bare.return.and.out=Los m\u00E9todos BARE de documento/literal no pueden tener un tipo de retorno ni par\u00E1metros OUT. Clase\: {0}, m\u00E9todo\: {1} +webserviceap.oneway.and.out=Los m\u00E9todos @Oneway no pueden tener par\u00E1metros OUT. Clase\\: {0} m\u00E9todo {1} + +webserviceap.webservice.class.not.public=Las clases anotadas con @javax.jws.WebService deben ser public. Clase\\: {0} + +webserviceap.webservice.class.is.final=Las clases anotadas con @javax.jws.WebService no deben ser final. Clase\: {0} + +webserviceap.webservice.class.is.abstract=Las clases anotadas con @javax.jws.WebService no deben ser abstract. Clase\\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=Las clases internas anotadas con @javax.jws.WebService deben ser static. Clase\: {0} + +webserviceap.webservice.method.is.abstract=Las clases anotadas con @javax.jws.WebService no deben tener m\u00E9todos abstract. Clase\: {0} M\u00E9todo: {1} + +webserviceap.webservice.method.is.static.or.final=El m\u00E9todo anotado con @javax.jws.WebMethod no debe ser static ni final. Clase:\\: {0} M\u00E9todo: {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=Las clases anotadas con @javax.jws.WebService deben tener un constructor por defecto p\u00FAblico. Clase\: {0} + +webserviceap.oneway.and.not.one.in=Los m\u00E9todos BARE de literales de documentos anotados con @javax.jws.Oneway deben tener un par\u00E1metro IN no de cabecera. Clase\\: {0} M\u00E9todo\\: {1} + +webserviceap.doc.bare.no.return.and.no.out=Los m\u00E9todos BARE de literales de documentos que no tienen un valor de retorno deben tener un solo par\u00E1metro OUT/INOUT. Clase\: {0} M\u00E9todo\: {1} + +webserviceap.doc.bare.and.no.one.in=Los m\u00E9todos BARE de literales de documentos deben tener un par\u00E1metro IN/INOUT no de cabecera. Clase\\: {0} M\u00E9todo\\: {1} + +webserviceap.method.not.implemented=Los m\u00E9todos de endpointInterface se deben implantar en la clase de implantaci\u00F3n. Clase de Interfaz\\:{0} Clase de Implantaci\u00F3n\\:{1} M\u00E9todo\\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=Las clases anotadas con @javax.jws.Webservice que no pertenecen a un paquete deben tener el elemento @javax.jws.Webservice.targetNamespace. Clase\\: {0} + +webserviceap.webservice.and.webserviceprovider=Clases que no se pueden anotar con @javax.jws.WebService y @javax.xml.ws.WebServiceProvider. Clase\\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= Uso incorrecto de la anotaci\u00F3n {0} en {1}. ParameterStyle s\u00F3lo puede ser WRAPPED con el servicio web de estilo RPC. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties new file mode 100644 index 00000000000..9c0cd225eb4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_fr.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=erreur : fichier introuvable : {0} +webserviceap.error=erreur : {0} +webserviceap.warning=avertissement : {0} +webserviceap.info=informations : {0} +webserviceap.compilationFailed=\u00E9chec de la compilation, les erreurs auraient d\u00FB \u00EAtre signal\u00E9es +webserviceap.succeeded: Succ\u00E8s + +webserviceap.method.not.annotated=La m\u00E9thode {0} sur la classe {1} n''est pas annot\u00E9e. +webserviceap.rpc.encoded.not.supported=La classe {0} comporte une annotation SOAPBinding rpc/encoded. Les annotations SOAPBinding rpc/encoded ne sont pas prises en charge dans JAXWS 2.0. +webservice.encoded.not.supported=La classe {0} comporte une annotation SOAPBinding non valide. L''annotation SOAPBinding {1}/encoded n''est pas prise en charge +webserviceap.model.already.exists=le mod\u00E8le existe d\u00E9j\u00E0 +webserviceap.endpointinterface.on.interface=L''interface d''adresse de service {0} ne peut comporter aucune annotation WebService.endpointInterface \: {1} +webserviceap.java.typeNotFound=Le type {0} est introuvable dans le mapping +webserviceap.endpointinterfaces.do.not.match=L''interface d''adresse {0} ne correspond pas \u00E0 l''interface {1}. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=Impossible d''obtenir TypeElement pour {0} dans le cycle de traitement d''annotation \: {1} + +webserviceap.no.webservice.endpoint.found=Une adresse de service Web est introuvable + +webserviceap.endpointinterface.has.no.webservice.annotation=L''interface d''adresse {0} doit comporter une annotation WebService + +webserviceap.oneway.operation.cannot.have.return.type=La m\u00E9thode {1} de classe {0} a l''annotation @Oneway mais comporte un type de donn\u00E9es renvoy\u00E9. + +webserviceap.oneway.operation.cannot.have.holders=La m\u00E9thode {1} de classe {0} \u00E0 l''annotation @Oneway mais contient des param\u00E8tres INOUT ou OUT (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=La m\u00E9thode {1} de classe {0} a l''annotation @Oneway mais d\u00E9clare l''exception {2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Vous ne pouvez pas indiquer \u00E0 la fois les annotations HanlderChain et SOAPMessageHandlers + +webserviceap.invalid.handlerchain.file.nohandler-config=Le fichier HandlerChain {0} n''est pas valide, il ne contient aucun \u00E9l\u00E9ment handler-config + +webserviceap.could.not.find.handlerchain=Handlerchain {0} introuvable dans le fichier de gestionnaire {1} + +webserviceap.handlerclass.notspecified=Un gestionnaire du fichier HandlerChain \: {0} ne sp\u00E9cifie aucun \u00E9l\u00E9ment handler-class + +webserviceap.init_param.format.error=un \u00E9l\u00E9ment doit comporter exactement 1 \u00E9l\u00E9ment et 1 \u00E9l\u00E9ment + +webserviceap.document.literal.bare.method.return.not.unique=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter une combinaison unique de type de donn\u00E9es renvoy\u00E9 et de nom de r\u00E9sultat. Classe {0} m\u00E9thode \: {1}, nom de r\u00E9sultat \: {2} type de donn\u00E9es renvoy\u00E9 \: {3} + +webserviceap.document.literal.bare.method.not.unique=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter des noms de param\u00E8tre uniques. Classe \: {0}, m\u00E9thode \: {1}, nom de param\u00E8tre \: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter une valeur renvoy\u00E9e ou un param\u00E8tre OUT. Classe \: {0}, m\u00E9thode \: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=Les m\u00E9thodes BARE de document/litt\u00E9ral ne doivent pas comporter plus d''un param\u00E8tre IN non destin\u00E9 \u00E0 un en-t\u00EAte. Classe \: {0}, m\u00E9thode \: {1}, nombre de param\u00E8tres non destin\u00E9s \u00E0 un en-t\u00EAte \: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter au moins un des \u00E9l\u00E9ments suivants : une valeur renvoy\u00E9e, un param\u00E8tre IN ou un param\u00E8tre OUT. Classe \: {0}, m\u00E9thode \: {1} + +webserviceap.holder.parameters.must.not.be.in.only=Les param\u00E8tres javax.xml.ws.Holder ne doivent pas \u00EAtre annot\u00E9s avec la propri\u00E9t\u00E9 WebParam.Mode.IN. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre \: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=Les param\u00E8tres javax.xml.ws.Holder dans les op\u00E9rations BARE de document doivent \u00EAtre WebParam.Mode.INOUT. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre \: {2} + +webserviceap.endpointinterface.class.not.found=La classe endpointInterface {0} est introuvable + +webserviceap.sei.cannot.contain.constant.values=Une interface d''adresse de service ne peut contenir aucune d\u00E9claration constante \: interface \: {0}, champ \: {1}. + +webserviceap.method.return.type.cannot.implement.remote=Les types de donn\u00E9es renvoy\u00E9s de m\u00E9thode ne peuvent pas impl\u00E9menter java.rmi.Remote. Classe \: {0}, m\u00E9thode \: {1}, type de donn\u00E9es renvoy\u00E9 \: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=Les types de param\u00E8tre de m\u00E9thode ne peuvent pas impl\u00E9menter java.rmi.Remote. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre \: {2}, type \: {3} + +webserviceap.operation.name.not.unique=Les noms d''op\u00E9ration doivent \u00EAtre uniques. Classe \: {0}, m\u00E9thode \: {1}, nom d''op\u00E9ration \: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=Les noms de bean de wrapper de demande doivent \u00EAtre uniques et ne doivent pas \u00EAtre en conflit avec les autres classes g\u00E9n\u00E9r\u00E9es. Classe \: {0}, m\u00E9thode : {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=Les noms de bean de wrapper de r\u00E9ponse doivent \u00EAtre uniques et ne doivent pas \u00EAtre en conflit avec les autres classes g\u00E9n\u00E9r\u00E9es. Classe \: {0}, m\u00E9thode : {1} + +webserviceap.method.exception.bean.name.not.unique=Les noms de bean d''exception doivent \u00EAtre uniques et ne doivent pas \u00EAtre en conflit avec les autres classes g\u00E9n\u00E9r\u00E9es. Classe \: {0}, exception : {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=Tous les param\u00E8tres de litt\u00E9ral RPC doivent comporter une annotation WebParam. Classe \: {0}, m\u00E9thode \: {1}, param\u00E8tre : {2} + +webserviceap.rpc.literal.webparams.must.specify.name=Tous les annotations WebParam de litt\u00E9ral RPC doivent indiquer un nom. Classe \: {0}, m\u00E9thode : {1}, param\u00E8tre : {2} + +webserviceap.rpc.literal.must.not.be.bare=Les annotations SOAPBinding de litt\u00E9ral RPC doivent comporter le parameterStyle WRAPPED. Classe \: {0}. + +webserviceap.header.parameters.must.have.webparam.name=Toutes les annotations WebParam sur les param\u00E8tres d''en-t\u00EAte doivent indiquer un nom. Classe \: {0}, m\u00E9thode : {1}, param\u00E8tre : {2} + +webserviceap.failed.to.find.handlerchain.file=Fichier HandlerChain introuvable. classe\ : {0}, fichier :\ {1} + +webserviceap.failed.to.parse.handlerchain.file=Echec de l''analyse du fichier HandlerChain. Classe \: {0}, fichier \: {1} + +webserviceap.class.not.found=Classe introuvable : {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=Les annotations de binding SOAPBinding.Style.RPC ne sont pas autoris\u00E9es sur les m\u00E9thodes. Classe \: {0}, m\u00E9thode \: {1} + +webserviceap.mixed.binding.style=La classe {0} contient des bindings mixtes. SOAPBinding.Style.RPC et SOAPBinding.Style.DOCUMENT ne peuvent pas \u00EAtre mixtes. + +webserviceap.endpointinteface.plus.annotation=L''annotation @{0} ne peut pas \u00EAtre utilis\u00E9e avec l''\u00E9l\u00E9ment @javax.jws.WebService.endpointInterface. + +webserviceap.endpointinteface.plus.element=L''\u00E9l\u00E9ment @javax.jws.WebService.{0} ne peut pas \u00EAtre utilis\u00E9 avec l''\u00E9l\u00E9ment @javax.jws.WebService.endpointInterface. + +webserviceap.non.in.parameters.must.be.holder=Classe {0}, m\u00E9thode : {1}, param\u00E8tre : {2} n''est pas WebParam.Mode.IN et n''est pas de type javax.xml.ws.Holder. + +webserviceap.invalid.sei.annotation.element=L''\u00E9l\u00E9ment @javax.jws.WebService.{0} ne peut pas \u00EAtre indiqu\u00E9 sur une interface d''adresse de service. Classe \: {1} + +webserviceap.invalid.sei.annotation=L''annotation @{0} ne peut pas \u00EAtre utilis\u00E9e sur une interface d''adresse de service. Classe \: {1} + +webserviceap.invalid.sei.annotation.element.exclude=L''\u00E9l\u00E9ment @javax.jws.WebMethod({0}) ne peut pas \u00EAtre utilis\u00E9 sur une interface d''adresse de service. Classe \: {1}, m\u00E9thode \: {2} + +webserviceap.invalid.webmethod.element.with.exclude=L''\u00E9l\u00E9ment @javax.jws.WebMethod.{0} ne peut pas \u00EAtre indiqu\u00E9 avec l''\u00E9l\u00E9ment @javax.jws.WebMethod.exclude. Classe \: {1}, m\u00E9thode \: {2} + +webserviceap.doc.bare.no.out=Les m\u00E9thodes BARE de document/litt\u00E9ral sans aucun type de donn\u00E9es renvoy\u00E9 ou param\u00E8tre OUT/INOUT doivent \u00EAtre annot\u00E9es comme @Oneway. Classe \: {0}, m\u00E9thode : {1} +webserviceap.doc.bare.return.and.out=Les m\u00E9thodes BARE de document/litt\u00E9ral ne peuvent pas comporter de type de donn\u00E9es renvoy\u00E9 et de param\u00E8tres OUT. Classe \: {0}, m\u00E9thode : {1} +webserviceap.oneway.and.out=Les m\u00E9thodes @Oneway ne peuvent comporter aucun param\u00E8tre OUT. Classe \: {0}, m\u00E9thode : {1} + +webserviceap.webservice.class.not.public=Les classes annot\u00E9es avec @javax.jws.WebService doivent \u00EAtre de type public. Classe \: {0} + +webserviceap.webservice.class.is.final=Les classes annot\u00E9es avec @javax.jws.WebService ne doivent pas \u00EAtre de type final. Classe \: {0} + +webserviceap.webservice.class.is.abstract=Les classes annot\u00E9es avec @javax.jws.WebService ne doivent pas \u00EAtre de type abstract. Classe \: {0} + +webserviceap.webservice.class.is.innerclass.not.static=Les classes internes annot\u00E9es avec @javax.jws.WebService doivent \u00EAtre de type static. Classe \: {0} + +webserviceap.webservice.method.is.abstract=Les classes annot\u00E9es avec @javax.jws.WebService ne doivent comporter aucune m\u00E9thode abstract. Classe \: {0}, m\u00E9thode : {1} + +webserviceap.webservice.method.is.static.or.final=La m\u00E9thode annot\u00E9e avec @javax.jws.WebMethod ne doit pas \u00EAtre static ou final. Classe \: {0}, m\u00E9thode : {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=Les classes annot\u00E9es avec @javax.jws.WebService doivent avoir un constructeur par d\u00E9faut public. Classe \: {0} + +webserviceap.oneway.and.not.one.in=Les m\u00E9thodes BARE de document/litt\u00E9ral annot\u00E9es avec @javax.jws.Oneway doivent comporter un param\u00E8tre IN non destin\u00E9 \u00E0 un en-t\u00EAte. Classe \: {0}, m\u00E9thode \: {1} + +webserviceap.doc.bare.no.return.and.no.out=Les m\u00E9thodes BARE de document/litt\u00E9ral ne comportant aucune valeur renvoy\u00E9e doivent avoir un seul param\u00E8tre OUT/INOUT. Classe \: {0}, m\u00E9thode \: {1} + +webserviceap.doc.bare.and.no.one.in=Les m\u00E9thodes BARE de document/litt\u00E9ral doivent comporter un param\u00E8tre IN/INOUT non destin\u00E9 \u00E0 un en-t\u00EAte. Classe \: {0}, m\u00E9thode \: {1} + +webserviceap.method.not.implemented=Les m\u00E9thodes d''une classe endpointInterface doivent \u00EAtre impl\u00E9ment\u00E9es dans la classe d''impl\u00E9mentation. Classe d''interface \:{0}, classe d''impl\u00E9mentation \: {1}, m\u00E9thode \: {2} + +webserviceap.no.package.class.must.have.targetnamespace=Les classes annot\u00E9es avec @javax.jws.Webservice qui n''appartiennent \u00E0 aucun package doivent comporter l''\u00E9l\u00E9ment @javax.jws.Webservice.targetNamespace. Classe \: {0} + +webserviceap.webservice.and.webserviceprovider=Les classes ne peuvent pas \u00EAtre annot\u00E9es \u00E0 la fois avec @javax.jws.WebService et @javax.xml.ws.WebServiceProvider. Classe \: {0} + +webserviceap.invalid.soapbinding.parameterstyle= Syntaxe incorrecte de l''annotation {0} sur {1}, ParameterStyle ne peut \u00EAtre que WRAPPED avec le service Web de style RPC. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties new file mode 100644 index 00000000000..621d45dd420 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_it.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=errore: file non trovato: {0} +webserviceap.error=errore: {0} +webserviceap.warning=avvertenza: {0} +webserviceap.info=informazioni: {0} +webserviceap.compilationFailed=compilazione non riuscita. Gli errori dovrebbero essere stati segnalati. +webserviceap.succeeded: Operazione riuscita + +webserviceap.method.not.annotated=Il metodo {0} sulla classe {1} non \u00E8 annotato. +webserviceap.rpc.encoded.not.supported=La classe {0} ha una SOAPBinding RPC/codificata. Le SOAPBinding RPC/codificate non sono supportate in JAXWS 2.0. +webservice.encoded.not.supported=La classe {0} ha un''annotazione SOAPBinding non valida. Le SOAPBinding {1}/codificate non sono supportate +webserviceap.model.already.exists=il modello esiste gi\u00E0 +webserviceap.endpointinterface.on.interface=L''interfaccia endpoint del servizio\: {0} non pu\u00F2 avere un''annotazione WebService.endpointInterface\: {1} +webserviceap.java.typeNotFound=Tipo: {0} non trovato nel mapping +webserviceap.endpointinterfaces.do.not.match=L''interfaccia endpoint {0} non corrisponde all''interfaccia {1}. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=Impossibile ottenere TypeElement per:\ {0} nel ciclo di elaborazione dell''annotazione:\ {1} + +webserviceap.no.webservice.endpoint.found=Impossibile trovare un endpoint del servizio Web + +webserviceap.endpointinterface.has.no.webservice.annotation=L''interfaccia endpoint {0} deve avere un''annotazione WebService + +webserviceap.oneway.operation.cannot.have.return.type=Il metodo {1} della classe {0} \u00E8 annotato con @Oneway ma ha un tipo restituito. + +webserviceap.oneway.operation.cannot.have.holders=Il metodo {1} della classe {0} \u00E8 annotato con @Oneway ma contiene i parametri INOUT o OUT (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=Il metodo {1} della classe {0} \u00E8 annotato con @Oneway ma dichiara l''eccezione {2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Impossibile specificare entrambe le annotazioni HanlderChain e SOAPMessageHandlers + +webserviceap.invalid.handlerchain.file.nohandler-config=Il file HandlerChain {0} non \u00E8 valido poich\u00E9 non contiene un elemento handler-config + +webserviceap.could.not.find.handlerchain=Impossibile trovare la catena di handler {0} nel file di handler {1} + +webserviceap.handlerclass.notspecified=Un handler del file HandlerChain\: {0} non specifica un elemento handler-class + +webserviceap.init_param.format.error=un elemento deve avere esattamente 1 e 1 + +webserviceap.document.literal.bare.method.return.not.unique=I metodi BARE document-literal devono avere una combinazione di nome risultato e tipo restituito univoca. Classe {0} metodo\: {1}, nome risultato\: {2} tipo restituito\: {3} + +webserviceap.document.literal.bare.method.not.unique=I metodi BARE document-literal devono avere nomi di parametro univoci. Classe\: {0} metodo\: {1}, nome parametro\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=I metodi BARE document-literal devono avere un tipo restituito o un parametro OUT. Classe\: {0} Metodo\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=I metodi BARE document-literal non devono avere pi\u00F9 di 1 parametro IN non di intestazione. Classe\: {0} metodo\: {1}, numero di parametri non di intestazione\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=I metodi BARE document-literal devono avere almeno uno dei seguenti elementi: tipo restituito, parametro IN o parametro OUT. Classe\: {0} Metodo\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=I parametri javax.xml.ws.Holder non devono essere annotati con la propriet\u00E0 WebParam.Mode.IN. Classe\: {0} metodo\: {1} parametro\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=I parametri javax.xml.ws.Holder nelle operazioni BARE document devono essere WebParam.Mode.INOUT. Classe\: {0} metodo\: {1} parametro\: {2} + +webserviceap.endpointinterface.class.not.found=Impossibile trovare la classe endpointInterface {0} + +webserviceap.sei.cannot.contain.constant.values=Un''interfaccia endpoint del servizio non pu\u00F2 contenere una dichiarazione della costante\: Interfaccia\: {0} campo\: {1}. + +webserviceap.method.return.type.cannot.implement.remote=I tipi restituiti del metodo non possono implementare java.rmi.Remote. Classe\: {0} metodo\: {1} tipo restituito\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=I tipi di parametro del metodo non possono implementare java.rmi.Remote. Classe\: {0} metodo\: {1} parametro\: {2} tipo\: {3} + +webserviceap.operation.name.not.unique=I nomi delle operazioni devono essere univoci. Classe\: {0} metodo\: {1} nome operazione\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=I nomi di bean wrapper di richiesta devono essere univoci e non devono essere in conflitto con le altre classi generate. Classe\: {0} metodo {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=I nomi di bean wrapper di risposta devono essere univoci e non devono essere in conflitto con le altre classi generate. Classe\: {0} metodo {1} + +webserviceap.method.exception.bean.name.not.unique=I nomi di bean di eccezione devono essere univoci e non devono essere in conflitto con le altre classi generate. Classe\: {0} eccezione {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=Tutti i parametri RPC-literal devono avere un''annotazione WebParam. Classe\: {0} metodo\: {1} parametro {2} + +webserviceap.rpc.literal.webparams.must.specify.name=Tutti i WebParams RPC-literal devono specificare un nome. Classe\: {0} metodo\: {1} parametro {2} + +webserviceap.rpc.literal.must.not.be.bare=Tutte le SOAPBindings RPC-literal devono avere parameterStyle WRAPPED. Classe\: {0}. + +webserviceap.header.parameters.must.have.webparam.name=Tutte le annotazioni WebParam sui parametri dell''intestazione devono specificare un nome. Classe\: {0} metodo\: {1} parametro {2} + +webserviceap.failed.to.find.handlerchain.file=Impossibile trovare il file HandlerChain. Classe\: {0}, file:\ {1} + +webserviceap.failed.to.parse.handlerchain.file=Analisi del file HandlerChain non riuscita. Classe\: {0}, file:\ {1} + +webserviceap.class.not.found=Classe non trovata: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=Le annotazioni di associazione SOAPBinding.Style.RPC non sono consentite sui metodi. Classe\: {0} Metodo\: {1} + +webserviceap.mixed.binding.style=La classe\: {0} contiene associazioni miste. SOAPBinding.Style.RPC e SOAPBinding.Style.DOCUMENT non posso essere mischiati. + +webserviceap.endpointinteface.plus.annotation=Impossibile usare l''annotazione @{0} con l''elemento @javax.jws.WebService.endpointInterface. + +webserviceap.endpointinteface.plus.element=Impossibile usare l''elemento @javax.jws.WebService.{0} con l''elemento @javax.jws.WebService.endpointInterface. + +webserviceap.non.in.parameters.must.be.holder=La classe:\ {0}, metodo: {1}, parametro: {2} non \u00E8 WebParam.Mode.IN e non \u00E8 di tipo javax.xml.ws.Holder. + +webserviceap.invalid.sei.annotation.element=Impossibile specificare l''elemento @javax.jws.WebService.{0} su un''interfaccia endpoint del servizio. Classe\: {1} + +webserviceap.invalid.sei.annotation=Impossibile usare l''annotazione @{0} su un''interfaccia endpoint del servizio. Classe\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=Impossibile usare @javax.jws.WebMethod({0}) su un''interfaccia endpoint del servizio. Classe\: {1} metodo\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=L''elemento @javax.jws.WebMethod.{0} non pu\u00F2 essere specificato con l''elemento @javax.jws.WebMethod.exclude. Classe\: {1} metodo\: {2} + +webserviceap.doc.bare.no.out=I metodi BARE document-literal senza tipo restituito o parametri OUT/INOUT devono essere annotati come @Oneway. Classe\: {0}, metodo: {1} +webserviceap.doc.bare.return.and.out=I metodi BARE document-literal non possono avere un tipo restituito e parametri OUT. Classe\: {0}, metodo: {1} +webserviceap.oneway.and.out=I metodi @Oneway non possono avere parametri OUT. Classe\: {0} metodo: {1} + +webserviceap.webservice.class.not.public=Le classi annotate con @javax.jws.WebService devono essere pubbliche. Classe\: {0} + +webserviceap.webservice.class.is.final=Le classi annotate con @javax.jws.WebService non devono essere finali. Classe\: {0} + +webserviceap.webservice.class.is.abstract=Le classi annotate con @javax.jws.WebService non devono essere astratte. Classe\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=Le classi interne annotate con @javax.jws.WebService devono essere statiche. Classe\: {0} + +webserviceap.webservice.method.is.abstract=Le classi annotate con @javax.jws.WebService non devono avere metodi astratti. Classe\: {0} Metodo: {1} + +webserviceap.webservice.method.is.static.or.final=I metodi annotati con @javax.jws.WebMethod non devono essere statici o finali. Classe\: {0} Metodo: {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=Le classi annotate con @javax.jws.WebService devono avere un costruttore predefinito pubblico. Classe\: {0} + +webserviceap.oneway.and.not.one.in=I metodi BARE document-literal annotati con @javax.jws.Oneway devono avere un parametro IN non di intestazione. Classe\: {0} Metodo\: {1} + +webserviceap.doc.bare.no.return.and.no.out=I metodi BARE document-literal che non hanno un tipo restituito devono avere un singolo parametro OUT/INOUT. Classe\: {0} Metodo\: {1} + +webserviceap.doc.bare.and.no.one.in=I metodi BARE document-literal devono avere un parametro IN/INOUT non di intestazione. Classe\: {0} Metodo\: {1} + +webserviceap.method.not.implemented=I metodi di un endpointInterface devono essere implementati nella classe di implementazione. Classe interfaccia\:{0} Classe implementazione\:{1} Metodo\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=Le classi annotate @javax.jws.Webservice che non appartengono a un package devono avere l''elemento @javax.jws.Webservice.targetNamespace. Classe\: {0} + +webserviceap.webservice.and.webserviceprovider=Le classi non possono essere annotate sia con @javax.jws.WebService che con @javax.xml.ws.WebServiceProvider. Classe\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= Uso errato dell''annotazione {0} su {1}. ParameterStyle pu\u00F2 essere solo WRAPPED con il servizio Web dello stile RPC. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties new file mode 100644 index 00000000000..9e1025260f5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ja.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=\u30A8\u30E9\u30FC: \u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} +webserviceap.error=\u30A8\u30E9\u30FC: {0} +webserviceap.warning=\u8B66\u544A: {0} +webserviceap.info=\u60C5\u5831: {0} +webserviceap.compilationFailed=\u30B3\u30F3\u30D1\u30A4\u30EB\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30A8\u30E9\u30FC\u306F\u5831\u544A\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +webserviceap.succeeded: \u6210\u529F + +webserviceap.method.not.annotated=\u30AF\u30E9\u30B9{1}\u306E\u30E1\u30BD\u30C3\u30C9{0}\u306B\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +webserviceap.rpc.encoded.not.supported=\u30AF\u30E9\u30B9{0}\u306Brpc/encoded SOAPBinding\u304C\u542B\u307E\u308C\u307E\u3059\u3002Rpc/encoded SOAPBinding\u306FJAXWS 2.0\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +webservice.encoded.not.supported={0}\u30AF\u30E9\u30B9\u306B\u7121\u52B9\u306ASOAPBinding\u6CE8\u91C8\u304C\u542B\u307E\u308C\u307E\u3059\u3002{1}/encoded SOAPBinding\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +webserviceap.model.already.exists=\u30E2\u30C7\u30EB\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059 +webserviceap.endpointinterface.on.interface=\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\: {0}\u306B\u306FWebService.endpointInterface\u6CE8\u91C8\: {1}\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 +webserviceap.java.typeNotFound=\u30BF\u30A4\u30D7: {0}\u304C\u30DE\u30C3\u30D4\u30F3\u30B0\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F +webserviceap.endpointinterfaces.do.not.match=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{1}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002 + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=\u6CE8\u91C8\u51E6\u7406\u30E9\u30A6\u30F3\u30C9:\ {1}\u3067{0}\u306ETypeElement\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F + +webserviceap.no.webservice.endpoint.found=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F + +webserviceap.endpointinterface.has.no.webservice.annotation=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u306B\u306FWebService\u6CE8\u91C8\u304C\u5FC5\u8981\u3067\u3059 + +webserviceap.oneway.operation.cannot.have.return.type=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u623B\u308A\u5024\u306E\u578B\u304C\u542B\u307E\u308C\u307E\u3059\u3002 + +webserviceap.oneway.operation.cannot.have.holders=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u304C\u3001INOUT\u307E\u305F\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF(javax.xml.ws.Holder)\u304C\u542B\u307E\u308C\u307E\u3059 + +webserviceap.oneway.operation.cannot.declare.exceptions=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u4F8B\u5916{2}\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=HanlderChain\u304A\u3088\u3073SOAPMessageHandlers\u6CE8\u91C8\u306E\u4E21\u65B9\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 + +webserviceap.invalid.handlerchain.file.nohandler-config=handlerchain\u30D5\u30A1\u30A4\u30EB{0}\u304C\u7121\u52B9\u3067\u3059\u3002\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u306Fhandler-config\u8981\u7D20\u304C\u542B\u307E\u308C\u307E\u305B\u3093 + +webserviceap.could.not.find.handlerchain=\u30CF\u30F3\u30C9\u30E9\u30FB\u30D5\u30A1\u30A4\u30EB{1}\u306Bhandlerchain {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F + +webserviceap.handlerclass.notspecified=HandlerChain\u30D5\u30A1\u30A4\u30EB\: {0}\u306E\u30CF\u30F3\u30C9\u30E9\u306Fhandler-class\u3092\u6307\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093 + +webserviceap.init_param.format.error=1\u3064\u306E\u8981\u7D20\u306B\u306F\u304A\u3088\u3073\u304C1\u3064\u305A\u3064\u5FC5\u8981\u3067\u3059 + +webserviceap.document.literal.bare.method.return.not.unique=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u4E00\u610F\u306E\u7D50\u679C\u540D\u3068\u623B\u308A\u5024\u306E\u578B\u306E\u7D44\u5408\u305B\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9{0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u7D50\u679C\u540D\: {2}\u3001\u623B\u308A\u5024\u306E\u578B\: {3} + +webserviceap.document.literal.bare.method.not.unique=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u4E00\u610F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u623B\u308A\u5024\u307E\u305F\u306F1\u3064\u306EOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306EIN\u30D1\u30E9\u30E1\u30FC\u30BF\u304C1\u3064\u306E\u307F\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u6570\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u623B\u308A\u5024\u3001IN\u30D1\u30E9\u30E1\u30FC\u30BF\u307E\u305F\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u306FWebParam.Mode.IN\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8bare\u64CD\u4F5C\u306Ejavax.xml.ws.Holder\u30D1\u30E9\u30E1\u30FC\u30BF\u306F\u3001WebParam.Mode.INOUT\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\: {2} + +webserviceap.endpointinterface.class.not.found=endpointInterface\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F + +webserviceap.sei.cannot.contain.constant.values=\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u5B9A\u6570\u5BA3\u8A00\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\: \u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\: {0}\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\: {1}\u3002 + +webserviceap.method.return.type.cannot.implement.remote=\u30E1\u30BD\u30C3\u30C9\u306E\u623B\u308A\u5024\u306E\u578B\u306Fjava.rmi.Remote\u3092\u5B9F\u88C5\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u623B\u308A\u5024\u306E\u578B\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30BF\u30A4\u30D7\u306Fjava.rmi.Remote\u3092\u5B9F\u88C5\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\: {2}\u3001\u30BF\u30A4\u30D7\: {3} + +webserviceap.operation.name.not.unique=\u64CD\u4F5C\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u64CD\u4F5C\u540D\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E9\u30C3\u30D1\u30FCBean\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u4ED6\u306E\u751F\u6210\u6E08\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1} + +webserviceap.method.response.wrapper.bean.name.not.unique=\u30EC\u30B9\u30DD\u30F3\u30B9\u30FB\u30E9\u30C3\u30D1\u30FCBean\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u4ED6\u306E\u751F\u6210\u6E08\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1} + +webserviceap.method.exception.bean.name.not.unique=\u4F8B\u5916Bean\u540D\u306F\u4E00\u610F\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u4ED6\u306E\u751F\u6210\u6E08\u30AF\u30E9\u30B9\u3068\u7AF6\u5408\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u4F8B\u5916{1} + +webserviceap.rpc.literal.parameters.must.have.webparam=\u3059\u3079\u3066\u306ERPC\u30EA\u30C6\u30E9\u30EB\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306BWebParam\u6CE8\u91C8\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF{2} + +webserviceap.rpc.literal.webparams.must.specify.name=\u3059\u3079\u3066\u306ERPC\u30EA\u30C6\u30E9\u30EBWebParams\u304C\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF{2} + +webserviceap.rpc.literal.must.not.be.bare=RPC\u30EA\u30C6\u30E9\u30EBSOAPBindings\u306B\u306FparameterStyle WRAPPED\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3002 + +webserviceap.header.parameters.must.have.webparam.name=\u30D8\u30C3\u30C0\u30FC\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u3059\u3079\u3066\u306EWebParam\u6CE8\u91C8\u304C\u540D\u524D\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF{2} + +webserviceap.failed.to.find.handlerchain.file=HandlerChain\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30D5\u30A1\u30A4\u30EB:\ {1} + +webserviceap.failed.to.parse.handlerchain.file=HandlerChain\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30D5\u30A1\u30A4\u30EB:\ {1} + +webserviceap.class.not.found=\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=\u30E1\u30BD\u30C3\u30C9\u3067\u306ESOAPBinding.Style.RPC\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u64CD\u4F5C\u306F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} + +webserviceap.mixed.binding.style=\u30AF\u30E9\u30B9\: {0}\u306B\u8907\u5408\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u542B\u307E\u308C\u307E\u3059\u3002SOAPBinding.Style.RPC\u304A\u3088\u3073SOAPBinding.Style.DOCUMENT\u306F\u7D44\u307F\u5408\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3002 + +webserviceap.endpointinteface.plus.annotation=@{0}\u6CE8\u91C8\u306F@javax.jws.WebService.endpointInterface\u8981\u7D20\u3068\u3068\u3082\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002 + +webserviceap.endpointinteface.plus.element=@javax.jws.WebService.{0}\u8981\u7D20\u306F@javax.jws.WebService.endpointInterface\u8981\u7D20\u3068\u3068\u3082\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002 + +webserviceap.non.in.parameters.must.be.holder=\u30AF\u30E9\u30B9:\ {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}\u3001\u30D1\u30E9\u30E1\u30FC\u30BF: {2}\u306FWebParam.Mode.IN\u3067\u306F\u306A\u304F\u3001\u30BF\u30A4\u30D7\u304Cjavax.xml.ws.Holder\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 + +webserviceap.invalid.sei.annotation.element=@javax.jws.WebService.{0}\u8981\u7D20\u306F\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1} + +webserviceap.invalid.sei.annotation=@{0}\u6CE8\u91C8\u306F\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=@javax.jws.WebMethod({0})\u306F\u30B5\u30FC\u30D3\u30B9\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1}\u3001\u30E1\u30BD\u30C3\u30C9\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=@javax.jws.WebMethod.{0}\u8981\u7D20\u306F@javax.jws.WebMethod.exclude\u8981\u7D20\u3068\u3068\u3082\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {1}\u3001\u30E1\u30BD\u30C3\u30C9\: {2} + +webserviceap.doc.bare.no.out=\u623B\u308A\u5024\u306E\u578B\u307E\u305F\u306FOUT/INOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u306A\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001@Oneway\u3068\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1} +webserviceap.doc.bare.return.and.out=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8/\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u623B\u308A\u5024\u306E\u578B\u304A\u3088\u3073OUT\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} +webserviceap.oneway.and.out=@Oneway\u30E1\u30BD\u30C3\u30C9\u306B\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9{1} + +webserviceap.webservice.class.not.public=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306Fpublic\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.webservice.class.is.final=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306Ffinal\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.webservice.class.is.abstract=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306Fabstract\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u5185\u90E8\u30AF\u30E9\u30B9\u306Fstatic\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.webservice.method.is.abstract=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306B\u306Fabstract\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1} + +webserviceap.webservice.method.is.static.or.final=@javax.jws.WebMethod\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30E1\u30BD\u30C3\u30C9\u306Fstatic\u307E\u305F\u306Ffinal\u306B\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {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=@javax.jws.WebService\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306B\u306Fpublic\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.oneway.and.not.one.in=@javax.jws.Oneway\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306EIN\u30D1\u30E9\u30E1\u30FC\u30BF\u304C1\u3064\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} + +webserviceap.doc.bare.no.return.and.no.out=\u623B\u308A\u5024\u306E\u306A\u3044\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u30011\u3064\u306EOUT/INOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} + +webserviceap.doc.bare.and.no.one.in=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30EA\u30C6\u30E9\u30EBbare\u30E1\u30BD\u30C3\u30C9\u306B\u306F\u3001\u30D8\u30C3\u30C0\u30FC\u4EE5\u5916\u306EIN/INOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u304C1\u3064\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0}\u3001\u30E1\u30BD\u30C3\u30C9\: {1} + +webserviceap.method.not.implemented=endpointInterface\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u5B9F\u88C5\u30AF\u30E9\u30B9\u5185\u306B\u5B9F\u88C5\u3055\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u30FB\u30AF\u30E9\u30B9\:{0}\u3001\u5B9F\u88C5\u30AF\u30E9\u30B9\:{1}\u3001\u30E1\u30BD\u30C3\u30C9\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u5C5E\u3055\u306A\u3044\u3001@javax.jws.Webservice\u3068\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30AF\u30E9\u30B9\u306B\u306F\u3001@javax.jws.Webservice.targetNamespace\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.webservice.and.webserviceprovider=\u30AF\u30E9\u30B9\u306B\u306F\u3001@javax.jws.WebService\u304A\u3088\u3073@javax.xml.ws.WebServiceProvider\u306E\u4E21\u65B9\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= {1}\u306B\u304A\u3051\u308B\u6CE8\u91C8{0}\u306E\u4F7F\u7528\u65B9\u6CD5\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002RPC\u30B9\u30BF\u30A4\u30EBWeb\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3001ParameterStyle\u306FWRAPPED\u306E\u307F\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties new file mode 100644 index 00000000000..8c65394bda8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_ko.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=\uC624\uB958: \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} +webserviceap.error=\uC624\uB958: {0} +webserviceap.warning=\uACBD\uACE0: {0} +webserviceap.info=\uC815\uBCF4: {0} +webserviceap.compilationFailed=\uCEF4\uD30C\uC77C\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC624\uB958\uB97C \uBCF4\uACE0\uD574\uC57C \uD569\uB2C8\uB2E4. +webserviceap.succeeded: \uC131\uACF5 + +webserviceap.method.not.annotated={1} \uD074\uB798\uC2A4\uC758 {0} \uBA54\uC18C\uB4DC\uAC00 \uC8FC\uC11D \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +webserviceap.rpc.encoded.not.supported={0} \uD074\uB798\uC2A4\uC5D0 RPC/\uC778\uCF54\uB529\uB41C SOAPBinding\uC774 \uC788\uC2B5\uB2C8\uB2E4. JAXWS 2.0\uC5D0\uC11C\uB294 RPC/\uC778\uCF54\uB529\uB41C SOAPBinding\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +webservice.encoded.not.supported={0} \uD074\uB798\uC2A4\uC5D0 \uBD80\uC801\uD569\uD55C SOAPBinding \uC8FC\uC11D\uC774 \uC788\uC2B5\uB2C8\uB2E4. {1}/\uC778\uCF54\uB529\uB41C SOAPBinding\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +webserviceap.model.already.exists=\uBAA8\uB378\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4. +webserviceap.endpointinterface.on.interface=\uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0\uB294 WebService.endpointInterface \uC8FC\uC11D\uC774 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC74C\: {1} +webserviceap.java.typeNotFound={0} \uC720\uD615\uC744 \uB9E4\uD551\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +webserviceap.endpointinterfaces.do.not.match=\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC774(\uAC00) {1} \uC778\uD130\uD398\uC774\uC2A4\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=\uC8FC\uC11D \uCC98\uB9AC \uC8FC\uAE30 {1}\uC5D0\uC11C {0}\uC5D0 \uB300\uD55C TypeElement\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.no.webservice.endpoint.found=\uC6F9 \uC11C\uBE44\uC2A4 \uB05D\uC810\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.endpointinterface.has.no.webservice.annotation=\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0\uB294 WebService \uC8FC\uC11D\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +webserviceap.oneway.operation.cannot.have.return.type={0} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC \uBC18\uD658 \uC720\uD615\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4. + +webserviceap.oneway.operation.cannot.have.holders={0} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC INOUT \uB610\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218(javax.xml.ws.Holder)\uB97C \uD3EC\uD568\uD569\uB2C8\uB2E4. + +webserviceap.oneway.operation.cannot.declare.exceptions={0} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC {2} \uC608\uC678 \uC0AC\uD56D\uC744 \uC120\uC5B8\uD569\uB2C8\uB2E4. + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=HanlderChain \uC8FC\uC11D\uACFC SOAPMessageHandlers \uC8FC\uC11D\uC744 \uD568\uAED8 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.invalid.handlerchain.file.nohandler-config=handlerchain \uD30C\uC77C {0}\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. handler-config \uC694\uC18C\uB97C \uD3EC\uD568\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +webserviceap.could.not.find.handlerchain=\uCC98\uB9AC\uAE30 \uD30C\uC77C {1}\uC5D0\uC11C handlerchain {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.handlerclass.notspecified=HandlerChain \uD30C\uC77C {0}\uC758 \uCC98\uB9AC\uAE30\uC5D0 handler-class\uAC00 \uC9C0\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. + +webserviceap.init_param.format.error= \uC694\uC18C\uC5D0\uB294 \uC815\uD655\uD788 \uD55C \uAC1C\uC758 \uACFC \uD55C \uAC1C\uC758 \uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +webserviceap.document.literal.bare.method.return.not.unique=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC758 \uACB0\uACFC \uC774\uB984\uACFC \uBC18\uD658 \uC720\uD615 \uC870\uD569\uC740 \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uACB0\uACFC \uC774\uB984\: {2}, \uBC18\uD658 \uC720\uD615\: {3} + +webserviceap.document.literal.bare.method.not.unique=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC758 \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218 \uC774\uB984\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD55C \uAC1C\uC758 \uBC18\uD658 \uAC12 \uB610\uB294 \uD55C \uAC1C\uC758 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD55C \uAC1C \uC774\uD558\uC758 \uBE44\uD5E4\uB354 IN \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uBE44\uD5E4\uB354 \uB9E4\uAC1C\uBCC0\uC218 \uC218\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD55C \uAC1C \uC774\uC0C1\uC758 \uBC18\uD658, IN \uB9E4\uAC1C\uBCC0\uC218 \uB610\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder \uB9E4\uAC1C\uBCC0\uC218\uB294 WebParam.Mode.IN \uC18D\uC131\uC73C\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=\uBB38\uC11C BARE \uC791\uC5C5\uC758 javax.xml.ws.Holder \uB9E4\uAC1C\uBCC0\uC218\uB294 WebParam.Mode.INOUT\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2} + +webserviceap.endpointinterface.class.not.found=endpointInterface \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.sei.cannot.contain.constant.values=\uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uB294 \uC0C1\uC218 \uC120\uC5B8\uC774 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC778\uD130\uD398\uC774\uC2A4\: {0}, \uD544\uB4DC\: {1}. + +webserviceap.method.return.type.cannot.implement.remote=\uBA54\uC18C\uB4DC \uBC18\uD658 \uC720\uD615\uC740 java.rmi.Remote\uB97C \uAD6C\uD604\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uBC18\uD658 \uC720\uD615\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=\uBA54\uC18C\uB4DC \uB9E4\uAC1C\uBCC0\uC218 \uC720\uD615\uC740 java.rmi.Remote\uB97C \uAD6C\uD604\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2}, \uC720\uD615\: {3} + +webserviceap.operation.name.not.unique=\uC791\uC5C5 \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uC791\uC5C5 \uC774\uB984\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=\uC694\uCCAD \uB798\uD37C Bean \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD558\uBA70 \uC0DD\uC131\uB41C \uB2E4\uB978 \uD074\uB798\uC2A4\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=\uC751\uB2F5 \uB798\uD37C Bean \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD558\uBA70 \uC0DD\uC131\uB41C \uB2E4\uB978 \uD074\uB798\uC2A4\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.method.exception.bean.name.not.unique=\uC608\uC678 \uC0AC\uD56D Bean \uC774\uB984\uC740 \uACE0\uC720\uD574\uC57C \uD558\uBA70 \uC0DD\uC131\uB41C \uB2E4\uB978 \uD074\uB798\uC2A4\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uC608\uC678 \uC0AC\uD56D\: {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=\uBAA8\uB4E0 RPC \uB9AC\uD130\uB7F4 \uB9E4\uAC1C\uBCC0\uC218\uC5D0\uB294 WebParam \uC8FC\uC11D\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2} + +webserviceap.rpc.literal.webparams.must.specify.name=\uBAA8\uB4E0 RPC \uB9AC\uD130\uB7F4 WebParams\uC5D0\uB294 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2} + +webserviceap.rpc.literal.must.not.be.bare=RPC \uB9AC\uD130\uB7F4 SOAPBinding\uC5D0\uB294 parameterStyle WRAPPED\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}. + +webserviceap.header.parameters.must.have.webparam.name=\uD5E4\uB354 \uB9E4\uAC1C\uBCC0\uC218\uC758 \uBAA8\uB4E0 WebParam \uC8FC\uC11D\uC5D0\uB294 \uC774\uB984\uC774 \uC9C0\uC815\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1}, \uB9E4\uAC1C\uBCC0\uC218\: {2} + +webserviceap.failed.to.find.handlerchain.file=HandlerChain \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uD30C\uC77C:\ {1} + +webserviceap.failed.to.parse.handlerchain.file=HandlerChain \uD30C\uC77C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uD30C\uC77C\: {1} + +webserviceap.class.not.found=\uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=SOAPBinding.Style.RPC \uBC14\uC778\uB529 \uC8FC\uC11D\uC740 \uBA54\uC18C\uB4DC\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.mixed.binding.style={0} \uD074\uB798\uC2A4\uC5D0 \uD63C\uD569 \uBC14\uC778\uB529\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. SOAPBinding.Style.RPC\uC640 SOAPBinding.Style.DOCUMENT\uB294 \uD568\uAED8 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.endpointinteface.plus.annotation=@{0} \uC8FC\uC11D\uC740 @javax.jws.WebService.endpointInterface \uC694\uC18C\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.endpointinteface.plus.element=@javax.jws.WebService.{0} \uC694\uC18C\uB294 @javax.jws.WebService.endpointInterface \uC694\uC18C\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +webserviceap.non.in.parameters.must.be.holder={0} \uD074\uB798\uC2A4, {1} \uBA54\uC18C\uB4DC, {2} \uB9E4\uAC1C\uBCC0\uC218\uB294 WebParam.Mode.IN\uC774 \uC544\uB2C8\uBA70 javax.xml.ws.Holder \uC720\uD615\uC774 \uC544\uB2D9\uB2C8\uB2E4. + +webserviceap.invalid.sei.annotation.element=@javax.jws.WebService.{0} \uC694\uC18C\uB294 \uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1} + +webserviceap.invalid.sei.annotation=@{0} \uC8FC\uC11D\uC740 \uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=@javax.jws.WebMethod({0})\uB294 \uC11C\uBE44\uC2A4 \uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1}, \uBA54\uC18C\uB4DC\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=@javax.jws.WebMethod.{0} \uC694\uC18C\uB294 @javax.jws.WebMethod.exclude \uC694\uC18C\uC640 \uD568\uAED8 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {1}, \uBA54\uC18C\uB4DC\: {2} + +webserviceap.doc.bare.no.out=\uBC18\uD658 \uC720\uD615 \uB610\uB294 OUT/INOUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC5C6\uB294 \uBB38\uC11C/\uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uB294 @Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1} +webserviceap.doc.bare.return.and.out=\uBB38\uC11C/\uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uBC18\uD658 \uC720\uD615 \uBC0F OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1} +webserviceap.oneway.and.out=@Oneway \uBA54\uC18C\uB4DC\uC5D0\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.webservice.class.not.public=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uB294 public\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.webservice.class.is.final=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uB294 final\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.webservice.class.is.abstract=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uB294 abstract\uAC00 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uB0B4\uBD80 \uD074\uB798\uC2A4\uB294 static\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.webservice.method.is.abstract=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uC5D0\uB294 abstract \uBA54\uC18C\uB4DC\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {1} + +webserviceap.webservice.method.is.static.or.final=@javax.jws.WebMethod\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uBA54\uC18C\uB4DC\uB294 static \uB610\uB294 final\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC: {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=@javax.jws.WebService\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uD074\uB798\uC2A4\uC5D0\uB294 \uACF5\uC6A9 \uAE30\uBCF8 \uC0DD\uC131\uC790\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.oneway.and.not.one.in=@javax.jws.Oneway\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB41C \uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD558\uB098\uC758 \uBE44\uD5E4\uB354 IN \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.doc.bare.no.return.and.no.out=\uBC18\uD658 \uAC12\uC774 \uC5C6\uB294 \uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD558\uB098\uC758 OUT/INOUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.doc.bare.and.no.one.in=\uBB38\uC11C \uB9AC\uD130\uB7F4 BARE \uBA54\uC18C\uB4DC\uC5D0\uB294 \uD558\uB098\uC758 \uBE44\uD5E4\uB354 IN/INOUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0}, \uBA54\uC18C\uB4DC\: {1} + +webserviceap.method.not.implemented=endpointInterface\uC758 \uBA54\uC18C\uB4DC\uB294 \uAD6C\uD604 \uD074\uB798\uC2A4\uC5D0\uC11C \uAD6C\uD604\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uC778\uD130\uD398\uC774\uC2A4 \uD074\uB798\uC2A4\:{0}, \uAD6C\uD604 \uD074\uB798\uC2A4\:{1}, \uBA54\uC18C\uB4DC\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=@javax.jws.Webservice\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC73C\uBA70 \uD328\uD0A4\uC9C0\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC740 \uD074\uB798\uC2A4\uC5D0\uB294 @javax.jws.Webservice.targetNamespace \uC694\uC18C\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.webservice.and.webserviceprovider=\uD074\uB798\uC2A4\uB294 @javax.jws.WebService\uC640 @javax.xml.ws.WebServiceProvider\uB85C \uC8FC\uC11D \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= {1}\uC5D0 {0} \uC8FC\uC11D\uC774 \uC798\uBABB \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. ParameterStyle\uC740 RPC \uC2A4\uD0C0\uC77C \uC6F9 \uC11C\uBE44\uC2A4\uB85C\uB9CC WRAPPED\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties new file mode 100644 index 00000000000..259f9601257 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_pt_BR.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=erro: arquivo n\u00E3o encontrado: {0} +webserviceap.error=erro: {0} +webserviceap.warning=advert\u00EAncia: {0} +webserviceap.info=informa\u00E7\u00F5es: {0} +webserviceap.compilationFailed=falha na compila\u00E7\u00E3o, os erros foram reportados +webserviceap.succeeded: Bem-Sucedido + +webserviceap.method.not.annotated=O m\u00E9todo {0} na classe {1} n\u00E3o \u00E9 anotada. +webserviceap.rpc.encoded.not.supported=A classe {0} tem SOAPBinding rpc/codificado. SOAPBindings Rpc/codificado n\u00E3o suportados no JAXWS 2.0. +webservice.encoded.not.supported=A classe {0} tem anota\u00E7\u00E3o SOAPBinding. {1}/SOAPBinding codificado n\u00E3o suportada +webserviceap.model.already.exists=o modelo j\u00E1 existe +webserviceap.endpointinterface.on.interface=Interface do ponto final de servi\u00E7o\: {0} n\u00E3o pode ter uma anota\u00E7\u00E3o\: {1} WebService.endpointInterface +webserviceap.java.typeNotFound=O tipo: {0} n\u00E3o foi encontrado no mapeamento +webserviceap.endpointinterfaces.do.not.match=A interface {0} do ponto final n\u00E3o corresponde \u00E0 interface {1}. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=N\u00E3o foi poss\u00EDvel obter o TypeElement para:\ {0} no arredondamento do processamento da anota\u00E7\u00E3o:\ {1} + +webserviceap.no.webservice.endpoint.found=N\u00E3o foi poss\u00EDvel encontrar um ponto final de web service + +webserviceap.endpointinterface.has.no.webservice.annotation=A interface {0} do ponto final deve ter uma anota\u00E7\u00E3o WebService + +webserviceap.oneway.operation.cannot.have.return.type=O m\u00E9todo {1} da classe {0} \u00E9 @Oneway anotado, mas tem um tipo de retorno. + +webserviceap.oneway.operation.cannot.have.holders=O m\u00E9todo {1} da classe {0} \u00E9 @Oneway anotado, mas cont\u00E9m os par\u00E2metros INOUT ou OUT (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=O m\u00E9todo {1} da classe {0} \u00E9 @Oneway anotado, mas declara a exce\u00E7\u00E3o {2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=Voc\u00EA n\u00E3o pode especificar as anota\u00E7\u00F5es HanlderChain e SOAPMessageHandlers + +webserviceap.invalid.handlerchain.file.nohandler-config=O arquivo {0} handlerchain \u00E9 inv\u00E1lido, ele n\u00E3o cont\u00E9m um elemento de configura\u00E7\u00E3o de handler + +webserviceap.could.not.find.handlerchain=N\u00E3o foi poss\u00EDvel localizar o handlerchain {0} no arquivo {1} de handler + +webserviceap.handlerclass.notspecified=Um handler no arquivo HandlerChain file\: {0} n\u00E3o especifica uma classe de handler + +webserviceap.init_param.format.error=um elemento deve ter exatamente 1 e 1 + +webserviceap.document.literal.bare.method.return.not.unique=Os m\u00E9todos bare de documento/literal devem ter uma combina\u00E7\u00E3o de tipo de retorno do nome do resultado. Classe {0} m\u00E9todo\: {1}, nome do resultado\: {2} tipo de retorno\\: {3} + +webserviceap.document.literal.bare.method.not.unique=Os m\u00E9todos bare de documento\\literal devem ter nomes de par\u00E2metro exclusivos. Classe\\: {0} m\u00E9todo\\: {1} nome do par\u00E2metro\\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=Os m\u00E9todos bare de documento\\literal devem ter um valor de retorno ou um par\u00E2metro out. Classe\\: {0} M\u00E9todo\\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=Os m\u00E9todos bare de documento\\literal n\u00E3o devem ter mais de 1 sem cabe\u00E7alho no par\u00E2metro. Classe\\: {0} m\u00E9todo\\: {1} n\u00FAmero de par\u00E2metros sem cabe\u00E7alho\\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=Os m\u00E9todos bare de documento\\literal devem ter pelo menos um valor de: um retorno, um par\u00E2metro in ou um par\u00E2metro out. Classe\\: {0} M\u00E9todo\\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=os par\u00E2metros javax.xml.ws.Holder n\u00E3o devem ser anotados com a propriedade WebParam.Mode.IN. Classe\: {0} m\u00E9todo\: {1} par\u00E2metro\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=os par\u00E2metros javax.xml.ws.Holder nas opera\u00E7\u00F5es-base do documento devem ser WebParam.Mode.INOUT; Classe\\: {0} m\u00E9todo\\: {1} par\u00E2metro\\: {2} + +webserviceap.endpointinterface.class.not.found=N\u00E3o foi poss\u00EDvel encontrar a classe {0} endpointInterface + +webserviceap.sei.cannot.contain.constant.values=Uma interface de ponto final de servi\u00E7o n\u00E3o pode conter uma declara\u00E7\u00E3o de constante\: Interface\: {0} campo\: {1}. + +webserviceap.method.return.type.cannot.implement.remote=Os tipos de retorno do m\u00E9todo n\u00E3o podem implementar java.rmi.Remote. Classe\\: {0} m\u00E9todo\\: {1} tipo de retorno\\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=Os tipos de par\u00E2metro do m\u00E9todo n\u00E3o podem implementar java.rmi.Remote. Classe\: {0} m\u00E9todo\: {1} par\u00E2metro\: {2} tipo\: {3} + +webserviceap.operation.name.not.unique=Os nomes da opera\u00E7\u00E3o devem ser exclusivos. Classe\: {0} m\u00E9todo\: {1} nome da opera\u00E7\u00E3o\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=Os nomes do bean do wrapper da solicita\u00E7\u00E3o devem ser exclusivos e n\u00E3o devem estar em conflito com outras classes geradas. Classe\\: {0} m\u00E9todo {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=Os nomes do bean do wrapper de resposta devem ser exclusivos e n\u00E3o devem estar em conflito com outras classes geradas. Classe\\: {0} m\u00E9todo {1} + +webserviceap.method.exception.bean.name.not.unique=Os nomes do bean de exce\u00E7\u00E3o devem ser exclusivos e n\u00E3o devem estar em conflito com outras classes geradas. Classe\: {0} exce\u00E7\u00E3o {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=Todos os par\u00E2metros de literal de RPC devem ter uma anota\u00E7\u00E3o WebParam. Classe\\: {0} m\u00E9todo\\: {1} par\u00E2metro {2} + +webserviceap.rpc.literal.webparams.must.specify.name=Todos os WebParams de literal de RPC devem especificar um nome. Classe\\: {0} m\u00E9todo {1} par\u00E2metro {2} + +webserviceap.rpc.literal.must.not.be.bare=SOAPBindings de literal de RPC devem ter parameterStyle WRAPPED. Classe\\: {0}. + +webserviceap.header.parameters.must.have.webparam.name=Todas as anota\u00E7\u00F5es de WebParam nos par\u00E2metros do cabe\u00E7alho devem especificar um nome. Classe\\: {0} m\u00E9todo {1} par\u00E2metro {2} + +webserviceap.failed.to.find.handlerchain.file=N\u00E3o \u00E9 poss\u00EDvel localizar o arquivo HandlerChain. classe\\: {0}, arquivo:\\ {1} + +webserviceap.failed.to.parse.handlerchain.file=Falha ao fazer parse do arquivo HandlerChain. Classe\: {0}, arquivo\: {1} + +webserviceap.class.not.found=Classe N\u00E3o Encontrada: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=As anota\u00E7\u00F5es de bind de SOAPBinding.Style.RPC n\u00E3o s\u00E3o permitidas nos m\u00E9todos. Classe\: {0} M\u00E9todo\: {1} + +webserviceap.mixed.binding.style=A Classe\\: {0} cont\u00E9m binds mistos. SOAPBinding.Style.RPC e SOAPBinding.Style.DOCUMENT n\u00E3o podem ser mistos. + +webserviceap.endpointinteface.plus.annotation=A anota\u00E7\u00E3o @{0} n\u00E3o pode ser usada com o elemento @javax.jws.WebService.endpointInterface. + +webserviceap.endpointinteface.plus.element=O elemento @javax.jws.WebService.{0} n\u00E3o pode ser usado com o elemento @javax.jws.WebService.endpointInterface. + +webserviceap.non.in.parameters.must.be.holder=Classe:\ {0}, m\u00E9todo: {1}, par\u00E2metro: {2} n\u00E3o \u00E9 WebParam.Mode.IN e n\u00E3o \u00E9 do tipo javax.xml.ws.Holder. + +webserviceap.invalid.sei.annotation.element=O elemento @javax.jws.WebService.{0} n\u00E3o pode ser especificado em uma interface do ponto final de servi\u00E7o. Classe\: {1} + +webserviceap.invalid.sei.annotation=A anota\u00E7\u00E3o @{0} n\u00E3o pode ser usada em uma interface do ponto final de servi\u00E7o. Classe\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=O @javax.jws.WebMethod({0}) n\u00E3o pode ser usado em uma interface do ponto final de servi\u00E7o. Classe\: {1} m\u00E9todo\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=O elemento @javax.jws.WebMethod.{0} n\u00E3o pode ser especificado com o elemento @javax.jws.WebMethod.exclude. Classe\\: {1} m\u00E9todo\\: {2} + +webserviceap.doc.bare.no.out=Os m\u00E9todos bare de documento/literal sem tipo de retorno ou par\u00E2metros OUT/INOUT devem ser anotados como @Oneway. Classe\\: {0}, m\u00E9todo: {1} +webserviceap.doc.bare.return.and.out=Os m\u00E9todos bare de documento/literal n\u00E3o podem ter um tipo de retorno e par\u00E2metros out. Classe\\: {0}, m\u00E9todo: {1} +webserviceap.oneway.and.out=Os m\u00E9todos @Oneway n\u00E3o podem ter par\u00E2metros out. Classe\\: {0} m\u00E9todo {1} + +webserviceap.webservice.class.not.public=As classes anotadas com @javax.jws.WebService deve ser p\u00FAblicas. Classe\: {0} + +webserviceap.webservice.class.is.final=As classes anotadas com @javax.jws.WebService n\u00E3o devem ser finais. Classe\: {0} + +webserviceap.webservice.class.is.abstract=As classe anotadas com @javax.jws.WebService n\u00E3o devem ser abstratas. Classe\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=As classes internas anotadas com @javax.jws.WebService devem ser est\u00E1ticas. Classe\: {0} + +webserviceap.webservice.method.is.abstract=As classes anotadas com @javax.jws.WebService n\u00E3o devem ter m\u00E9todos abstratos. Classe\: {0} M\u00E9todos: {1} + +webserviceap.webservice.method.is.static.or.final=O m\u00E9todo anotado com @javax.jws.WebMethod n\u00E3o deve ser est\u00E1tico ou final. Classe\: {0} M\u00E9todo: {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=As classes anotadas com @javax.jws.WebService devem ter um construtor default p\u00FAblico. Classe\: {0} + +webserviceap.oneway.and.not.one.in=Os m\u00E9todos bare de documento/literal anotados com @javax.jws.Oneway devem ter um par\u00E2metro IN sem cabe\u00E7alho. Classe\\: {0} M\u00E9todo\\: {1} + +webserviceap.doc.bare.no.return.and.no.out=Os m\u00E9todos bare de documento/literal que n\u00E3o t\u00EAm um valor de retorno devem ter um par\u00E2metro OUT/INOUT. Classe\\: {0} M\u00E9todo\\: {1} + +webserviceap.doc.bare.and.no.one.in=Os m\u00E9todos bare de documento/literal anotados com @javax.jws.Oneway devem ter um par\u00E2metro IN/INOU sem cabe\u00E7alho. Classe\\: {0} M\u00E9todo\\: {1} + +webserviceap.method.not.implemented=Os m\u00E9todos na endpointInterface devem ser implementadas na classe de implementa\u00E7\u00E3o. Classe da Interface\:{0} Classe de Implementa\u00E7\u00E3o\:{1} M\u00E9todo\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=As classes anotadas de @javax.jws.Webservice que n\u00E3o pertencem a um pacote devem ter o elemento @javax.jws.Webservice.targetNamespace. Classe\: {0} + +webserviceap.webservice.and.webserviceprovider=As classes n\u00E3o podem ser anotadas com @javax.jws.WebService e @javax.xml.ws.WebServiceProvider. Classe\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= Uso incorreto da Anota\u00E7\u00E3o {0} em {1}, o ParameterStyle s\u00F3 pode ser WRAPPED com o Web service de Estilo de RPC. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties new file mode 100644 index 00000000000..40558dc6e36 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_CN.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=\u9519\u8BEF: \u672A\u627E\u5230\u6587\u4EF6: {0} +webserviceap.error=\u9519\u8BEF: {0} +webserviceap.warning=\u8B66\u544A: {0} +webserviceap.info=\u4FE1\u606F: {0} +webserviceap.compilationFailed=\u7F16\u8BD1\u5931\u8D25, \u9519\u8BEF\u5E94\u8BE5\u5DF2\u4E88\u4EE5\u62A5\u544A +webserviceap.succeeded: \u6210\u529F + +webserviceap.method.not.annotated=\u7C7B{1}\u4E0A\u7684\u65B9\u6CD5{0}\u4E0D\u5E26\u6CE8\u91CA\u3002 +webserviceap.rpc.encoded.not.supported=\u7C7B{0}\u5177\u6709 rpc/\u7F16\u7801\u7684 SOAPBinding\u3002JAXWS 2.0 \u4E2D\u4E0D\u652F\u6301 Rpc/\u7F16\u7801\u7684 SOAPBinding\u3002 +webservice.encoded.not.supported={0}\u7C7B\u5177\u6709\u65E0\u6548\u7684 SOAPBinding \u6CE8\u91CA\u3002\u4E0D\u652F\u6301{1}/\u7F16\u7801\u7684 SOAPBinding +webserviceap.model.already.exists=\u6A21\u578B\u5DF2\u5B58\u5728 +webserviceap.endpointinterface.on.interface=\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\: {0}\u4E0D\u80FD\u5177\u6709 WebService.endpointInterface \u6CE8\u91CA\: {1} +webserviceap.java.typeNotFound=\u5728\u6620\u5C04\u4E2D\u672A\u627E\u5230\u7C7B\u578B{0} +webserviceap.endpointinterfaces.do.not.match=\u7AEF\u70B9\u63A5\u53E3{0}\u4E0E\u63A5\u53E3{1}\u4E0D\u5339\u914D\u3002 + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=\u5728\u7B2C {1} \u8F6E\u6CE8\u91CA\u5904\u7406\u4E2D\u65E0\u6CD5\u83B7\u53D6{0}\u7684 TypeElement + +webserviceap.no.webservice.endpoint.found=\u627E\u4E0D\u5230 Web \u670D\u52A1\u7AEF\u70B9 + +webserviceap.endpointinterface.has.no.webservice.annotation=\u7AEF\u70B9\u63A5\u53E3{0}\u5FC5\u987B\u5177\u6709 Web \u670D\u52A1\u6CE8\u91CA + +webserviceap.oneway.operation.cannot.have.return.type=\u7C7B{0}\u7684\u65B9\u6CD5{1}\u5E26\u6709 @Oneway \u6CE8\u91CA, \u4F46\u5177\u6709\u8FD4\u56DE\u7C7B\u578B\u3002 + +webserviceap.oneway.operation.cannot.have.holders=\u7C7B{0}\u7684\u65B9\u6CD5{1}\u5E26\u6709 @Oneway \u6CE8\u91CA, \u4F46\u5305\u542B INOUT \u6216 OUT \u53C2\u6570 (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=\u7C7B{0}\u7684\u65B9\u6CD5{1}\u5E26\u6709 @Oneway \u6CE8\u91CA, \u4F46\u58F0\u660E\u4E86\u5F02\u5E38\u9519\u8BEF{2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A HanlderChain \u548C SOAPMessageHandlers \u6CE8\u91CA + +webserviceap.invalid.handlerchain.file.nohandler-config=\u5904\u7406\u7A0B\u5E8F\u94FE\u6587\u4EF6{0}\u65E0\u6548, \u8BE5\u6587\u4EF6\u4E0D\u5305\u542B handler-config \u5143\u7D20 + +webserviceap.could.not.find.handlerchain=\u5728\u5904\u7406\u7A0B\u5E8F\u6587\u4EF6{1}\u4E2D\u627E\u4E0D\u5230\u5904\u7406\u7A0B\u5E8F\u94FE{0} + +webserviceap.handlerclass.notspecified=HandlerChain \u6587\u4EF6\: {0}\u4E2D\u7684\u5904\u7406\u7A0B\u5E8F\u672A\u6307\u5B9A handler-class + +webserviceap.init_param.format.error= \u5143\u7D20\u53EA\u80FD\u6709 1 \u4E2A \u548C 1 \u4E2A + +webserviceap.document.literal.bare.method.return.not.unique=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u7ED3\u679C\u540D\u79F0/\u8FD4\u56DE\u7C7B\u578B\u7EC4\u5408\u3002\u7C7B{0}\u65B9\u6CD5\: {1}, \u7ED3\u679C\u540D\u79F0\: {2}, \u8FD4\u56DE\u7C7B\u578B\: {3} + +webserviceap.document.literal.bare.method.not.unique=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u53C2\u6570\u540D\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\u540D\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u4E00\u4E2A\u8FD4\u56DE\u503C\u6216\u4E00\u4E2A\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=document-literal-bare \u65B9\u6CD5\u7684\u975E\u6807\u5934\u8F93\u5165\u53C2\u6570\u4E0D\u80FD\u8D85\u8FC7 1 \u4E2A\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u975E\u6807\u5934\u53C2\u6570\u6570\u76EE\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u81F3\u5C11\u5177\u6709\u4EE5\u4E0B\u9879\u4E4B\u4E00: \u4E00\u4E2A\u8FD4\u56DE\u503C, \u4E00\u4E2A\u8F93\u5165\u53C2\u6570\u6216\u4E00\u4E2A\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder \u53C2\u6570\u4E0D\u80FD\u5E26\u6709 WebParam.Mode.IN \u5C5E\u6027\u6CE8\u91CA\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=document-bare \u64CD\u4F5C\u4E2D\u7684 javax.xml.ws.Holder \u53C2\u6570\u5FC5\u987B\u4E3A WebParam.Mode.INOUT; \u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\: {2} + +webserviceap.endpointinterface.class.not.found=\u627E\u4E0D\u5230 endpointInterface \u7C7B{0} + +webserviceap.sei.cannot.contain.constant.values=\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0D\u80FD\u5305\u542B\u5E38\u91CF\u58F0\u660E\: \u63A5\u53E3\: {0}, \u5B57\u6BB5\: {1}\u3002 + +webserviceap.method.return.type.cannot.implement.remote=\u65B9\u6CD5\u8FD4\u56DE\u7C7B\u578B\u4E0D\u80FD\u5B9E\u73B0 java.rmi.Remote\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u8FD4\u56DE\u7C7B\u578B\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=\u65B9\u6CD5\u53C2\u6570\u7C7B\u578B\u4E0D\u80FD\u5B9E\u73B0 java.rmi.Remote\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570\: {2}, \u7C7B\u578B\: {3} + +webserviceap.operation.name.not.unique=\u64CD\u4F5C\u540D\u5FC5\u987B\u552F\u4E00\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u64CD\u4F5C\u540D\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=\u8BF7\u6C42\u5305\u88C5 bean \u540D\u79F0\u5FC5\u987B\u552F\u4E00\u5E76\u4E14\u4E0D\u80FD\u4E0E\u5176\u4ED6\u751F\u6210\u7684\u7C7B\u51B2\u7A81\u3002\u7C7B\: {0}, \u65B9\u6CD5{1} + +webserviceap.method.response.wrapper.bean.name.not.unique=\u54CD\u5E94\u5305\u88C5 bean \u540D\u79F0\u5FC5\u987B\u552F\u4E00\u5E76\u4E14\u4E0D\u80FD\u4E0E\u5176\u4ED6\u751F\u6210\u7684\u7C7B\u51B2\u7A81\u3002\u7C7B\: {0}, \u65B9\u6CD5{1} + +webserviceap.method.exception.bean.name.not.unique=\u5F02\u5E38\u9519\u8BEF bean \u540D\u79F0\u5FC5\u987B\u552F\u4E00\u5E76\u4E14\u4E0D\u80FD\u4E0E\u5176\u4ED6\u751F\u6210\u7684\u7C7B\u51B2\u7A81\u3002\u7C7B\: {0}, \u5F02\u5E38\u9519\u8BEF{1} + +webserviceap.rpc.literal.parameters.must.have.webparam=\u6240\u6709 RPC \u6587\u5B57\u53C2\u6570\u5FC5\u987B\u5177\u6709 WebParam \u6CE8\u91CA\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1}, \u53C2\u6570{2} + +webserviceap.rpc.literal.webparams.must.specify.name=\u6240\u6709 RPC \u6587\u5B57 WebParam \u5FC5\u987B\u6307\u5B9A\u540D\u79F0\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}, \u53C2\u6570{2} + +webserviceap.rpc.literal.must.not.be.bare=RPC \u6587\u5B57 SOAPBinding \u5FC5\u987B\u5177\u6709 parameterStyle WRAPPED\u3002\u7C7B\: {0}\u3002 + +webserviceap.header.parameters.must.have.webparam.name=\u6807\u5934\u53C2\u6570\u4E0A\u7684\u6240\u6709 WebParam \u6CE8\u91CA\u5FC5\u987B\u6307\u5B9A\u540D\u79F0\u3002\u7C7B\: {0}, \u65B9\u6CD5{1}, \u53C2\u6570{2} + +webserviceap.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230 HandlerChain \u6587\u4EF6\u3002\u7C7B\: {0}, \u6587\u4EF6:\ {1} + +webserviceap.failed.to.parse.handlerchain.file=\u65E0\u6CD5\u89E3\u6790 HandlerChain \u6587\u4EF6\u3002\u7C7B\: {0}, \u6587\u4EF6:\ {1} + +webserviceap.class.not.found=\u672A\u627E\u5230\u7C7B: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=\u65B9\u6CD5\u4E0A\u4E0D\u5141\u8BB8\u6709 SOAPBinding.Style.RPC \u7ED1\u5B9A\u6CE8\u91CA\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1} + +webserviceap.mixed.binding.style=\u7C7B\: {0}\u5305\u542B\u6DF7\u5408\u7ED1\u5B9A\u3002SOAPBinding.Style.RPC \u548C SOAPBinding.Style.DOCUMENT \u4E0D\u80FD\u6DF7\u5408\u3002 + +webserviceap.endpointinteface.plus.annotation=@{0} \u6CE8\u91CA\u4E0D\u80FD\u4E0E @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E00\u8D77\u4F7F\u7528\u3002 + +webserviceap.endpointinteface.plus.element=@javax.jws.WebService.{0} \u5143\u7D20\u4E0D\u80FD\u4E0E @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E00\u8D77\u4F7F\u7528\u3002 + +webserviceap.non.in.parameters.must.be.holder=\u7C7B:\ {0}, \u65B9\u6CD5: {1}, \u53C2\u6570: {2}\u4E0D\u662F WebParam.Mode.IN \u5E76\u4E14\u4E0D\u662F javax.xml.ws.Holder \u7C7B\u578B\u3002 + +webserviceap.invalid.sei.annotation.element=\u4E0D\u80FD\u5728\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0A\u6307\u5B9A @javax.jws.WebService.{0} \u5143\u7D20\u3002\u7C7B\: {1} + +webserviceap.invalid.sei.annotation=\u4E0D\u80FD\u5728\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0A\u4F7F\u7528 @{0} \u6CE8\u91CA\u3002\u7C7B\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=\u4E0D\u80FD\u5728\u670D\u52A1\u7AEF\u70B9\u63A5\u53E3\u4E0A\u4F7F\u7528 @javax.jws.WebMethod({0})\u3002\u7C7B\: {1}, \u65B9\u6CD5\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=\u4E0D\u80FD\u4F7F\u7528 @javax.jws.WebMethod.exclude \u5143\u7D20\u6307\u5B9A @javax.jws.WebMethod.{0} \u5143\u7D20\u3002\u7C7B\: {1}, \u65B9\u6CD5\: {2} + +webserviceap.doc.bare.no.out=\u6CA1\u6709\u8FD4\u56DE\u7C7B\u578B\u6216 OUT/INOUT \u53C2\u6570\u7684 document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u6CE8\u91CA\u4E3A @Oneway\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1} +webserviceap.doc.bare.return.and.out=document-literal-bare \u65B9\u6CD5\u4E0D\u80FD\u5177\u6709\u8FD4\u56DE\u7C7B\u578B\u548C\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1} +webserviceap.oneway.and.out=@Oneway \u65B9\u6CD5\u4E0D\u80FD\u5177\u6709\u8F93\u51FA\u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5{1} + +webserviceap.webservice.class.not.public=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u5FC5\u987B\u662F\u516C\u5171\u7C7B\u3002\u7C7B\: {0} + +webserviceap.webservice.class.is.final=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u4E0D\u80FD\u662F\u6700\u7EC8\u7C7B\u3002\u7C7B\: {0} + +webserviceap.webservice.class.is.abstract=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u4E0D\u80FD\u662F\u62BD\u8C61\u7C7B\u3002\u7C7B\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u5185\u90E8\u7C7B\u5FC5\u987B\u662F\u9759\u6001\u7C7B\u3002\u7C7B\: {0} + +webserviceap.webservice.method.is.abstract=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u4E0D\u80FD\u5177\u6709\u62BD\u8C61\u65B9\u6CD5\u3002\u7C7B\: {0}, \u65B9\u6CD5: {1} + +webserviceap.webservice.method.is.static.or.final=\u5E26\u6709 @javax.jws.WebMethod \u6CE8\u91CA\u7684\u65B9\u6CD5\u4E0D\u80FD\u662F\u9759\u6001\u65B9\u6CD5\u6216\u6700\u7EC8\u65B9\u6CD5\u3002\u7C7B\: {0}, \u65B9\u6CD5: {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=\u5E26\u6709 @javax.jws.WebService \u6CE8\u91CA\u7684\u7C7B\u5FC5\u987B\u5177\u6709\u516C\u5171\u9ED8\u8BA4\u6784\u9020\u5668\u3002\u7C7B\: {0} + +webserviceap.oneway.and.not.one.in=\u5E26\u6709 @javax.jws.Oneway \u6CE8\u91CA\u7684 document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u975E\u6807\u5934 IN \u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1} + +webserviceap.doc.bare.no.return.and.no.out=\u6CA1\u6709\u8FD4\u56DE\u503C\u7684 document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u5355\u4E2A OUT/INOUT \u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1} + +webserviceap.doc.bare.and.no.one.in=document-literal-bare \u65B9\u6CD5\u5FC5\u987B\u5177\u6709\u975E\u6807\u5934 IN/INOUT \u53C2\u6570\u3002\u7C7B\: {0}, \u65B9\u6CD5\: {1} + +webserviceap.method.not.implemented=\u5FC5\u987B\u5728\u5B9E\u73B0\u7C7B\u4E2D\u5B9E\u73B0 endpointInterface \u4E2D\u7684\u65B9\u6CD5\u3002\u5185\u90E8\u7C7B\:{0}, \u5B9E\u73B0\u7C7B\:{1}, \u65B9\u6CD5\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=\u4E0D\u5C5E\u4E8E\u7A0B\u5E8F\u5305\u7684\u5E26\u6709 @javax.jws.Webservice \u6CE8\u91CA\u7684\u7C7B\u5FC5\u987B\u5177\u6709 @javax.jws.Webservice.targetNamespace \u5143\u7D20\u3002\u7C7B\: {0} + +webserviceap.webservice.and.webserviceprovider=\u7C7B\u4E0D\u540C\u65F6\u5E26\u6709 @javax.jws.WebService \u548C @javax.xml.ws.WebServiceProvider \u6CE8\u91CA\u3002\u7C7B\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= {1}\u4E0A\u6CE8\u91CA{0}\u7684\u7528\u6CD5\u4E0D\u6B63\u786E, ParameterStyle \u53EA\u80FD\u662F\u5E26\u6709 RPC \u6837\u5F0F Web \u670D\u52A1\u7684 WRAPPED\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties new file mode 100644 index 00000000000..83d0ccd7725 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/webserviceap_zh_TW.properties @@ -0,0 +1,160 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#webserviceap.nestedModelError=modeler error: {0} +webserviceap.fileNotFound=\u932F\u8AA4: \u627E\u4E0D\u5230\u6A94\u6848: {0} +webserviceap.error=\u932F\u8AA4: {0} +webserviceap.warning=\u8B66\u544A: {0} +webserviceap.info=\u8CC7\u8A0A: {0} +webserviceap.compilationFailed=\u7DE8\u8B6F\u5931\u6557, \u5FC5\u9808\u5831\u544A\u932F\u8AA4 +webserviceap.succeeded: \u6210\u529F + +webserviceap.method.not.annotated=\u672A\u5728\u985E\u5225 {1} \u7684\u65B9\u6CD5 {0} \u52A0\u8A3B. +webserviceap.rpc.encoded.not.supported=\u985E\u5225 {0} \u542B\u6709 rpc/encoded \u7684 SOAPBinding. JAXWS 2.0 \u4E0D\u652F\u63F4 rpc/encoded \u7684 SOAPBinding. +webservice.encoded.not.supported={0} \u985E\u5225\u542B\u6709\u7121\u6548\u7684 SOAPBinding \u8A3B\u89E3. \u4E0D\u652F\u63F4 {1}/encoded \u7684 SOAPBinding. +webserviceap.model.already.exists=\u6A21\u578B\u5DF2\u7D93\u5B58\u5728 +webserviceap.endpointinterface.on.interface=\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\: {0} \u4E0D\u53EF\u6709 WebService.endpointInterface \u8A3B\u89E3\: {1} +webserviceap.java.typeNotFound=\u5728\u5C0D\u61C9\u4E2D\u627E\u4E0D\u5230\u985E\u578B {0} +webserviceap.endpointinterfaces.do.not.match=\u7AEF\u9EDE\u4ECB\u9762 {0} \u8207\u4ECB\u9762 {1} \u4E0D\u7B26. + +# {0} - class name, {1} - number e.g.: Could not get TypeDeclaration for: foo.Bar in apt round: 2 +webserviceap.could.not.find.typedecl=\u7121\u6CD5\u5728\u7B2C:\ {1} \u56DE\u5408\u7684\u8A3B\u89E3\u8655\u7406\u53D6\u5F97:\ {0} \u7684 TypeElement + +webserviceap.no.webservice.endpoint.found=\u627E\u4E0D\u5230 Web \u670D\u52D9\u7AEF\u9EDE + +webserviceap.endpointinterface.has.no.webservice.annotation=\u7AEF\u9EDE\u4ECB\u9762 {0} \u5FC5\u9808\u8981\u6709\u4E00\u500B\u300CWeb \u670D\u52D9\u300D\u8A3B\u89E3 + +webserviceap.oneway.operation.cannot.have.return.type=\u985E\u5225 {0} \u7684\u65B9\u6CD5 {1} \u52A0\u8A3B @Oneway, \u4F46\u662F\u6709\u50B3\u56DE\u985E\u578B. + +webserviceap.oneway.operation.cannot.have.holders=\u985E\u5225 {0} \u7684\u65B9\u6CD5 {1} \u52A0\u8A3B @Oneway, \u4F46\u662F\u5305\u542B INOUT \u6216 OUT \u53C3\u6578 (javax.xml.ws.Holder) + +webserviceap.oneway.operation.cannot.declare.exceptions=\u985E\u5225 {0} \u7684\u65B9\u6CD5 {1} \u52A0\u8A3B @Oneway, \u4F46\u662F\u5BA3\u544A\u4F8B\u5916 {2} + +webserviceap.cannot.combine.handlerchain.soapmessagehandlers=\u60A8\u4E0D\u80FD\u540C\u6642\u6307\u5B9A HanlderChain \u548C SOAPMessageHandlers \u8A3B\u89E3 + +webserviceap.invalid.handlerchain.file.nohandler-config=\u8655\u7406\u7A0B\u5F0F\u93C8\u6A94\u6848 {0} \u7121\u6548, \u5B83\u672A\u5305\u542B handler-config \u5143\u7D20 + +webserviceap.could.not.find.handlerchain=\u5728\u8655\u7406\u7A0B\u5F0F\u6A94\u6848 {1} \u4E2D\u627E\u4E0D\u5230\u8655\u7406\u7A0B\u5F0F\u93C8 {0} + +webserviceap.handlerclass.notspecified=HandlerChain \u6A94\u6848 {0} \u4E2D\u7684\u8655\u7406\u7A0B\u5F0F\u672A\u6307\u5B9A\u8655\u7406\u7A0B\u5F0F\u985E\u5225 + +webserviceap.init_param.format.error= \u5143\u7D20\u53EA\u80FD\u6709 1 \u500B \u548C 1 \u500B + +webserviceap.document.literal.bare.method.return.not.unique=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u7D50\u679C\u540D\u7A31\u50B3\u56DE\u985E\u578B\u7D44\u5408. \u985E\u5225 {0} \u65B9\u6CD5\: {1}, \u7D50\u679C\u540D\u7A31\: {2} \u50B3\u56DE\u985E\u578B\: {3} + +webserviceap.document.literal.bare.method.not.unique=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u552F\u4E00\u7684\u53C3\u6578\u540D\u7A31. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\u540D\u7A31\: {2} + +webserviceap.document.literal.bare.cannot.have.more.than.one.out=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u4E00\u500B\u50B3\u56DE\u503C\u6216\u4E00\u500B out \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} + +webserviceap.document.literal.bare.must.have.only.one.in.parameter=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5728\u53C3\u6578\u4E2D\u4E0D\u80FD\u6709 1 \u500B\u4EE5\u4E0A\u7684\u975E\u6A19\u982D. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u975E\u6A19\u982D\u53C3\u6578\u6578\u76EE\: {2} + +webserviceap.document.literal.bare.must.have.one.in.or.out=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u81F3\u5C11\u5FC5\u9808\u8981\u6709\u50B3\u56DE\u3001 in \u53C3\u6578\u6216 out \u53C3\u6578\u5176\u4E2D\u4E4B\u4E00. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} + +webserviceap.holder.parameters.must.not.be.in.only=javax.xml.ws.Holder \u53C3\u6578\u4E0D\u53EF\u4F7F\u7528 WebParam.Mode.IN \u7279\u6027\u52A0\u8A3B. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\: {2} + +webserviceap.document.bare.holder.parameters.must.not.be.inout=\u6587\u4EF6 bare \u4F5C\u696D\u4E2D\u7684 javax.xml.ws.Holder \u53C3\u6578\u5FC5\u9808\u662F WebParam.Mode.INOUT; \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\: {2} + +webserviceap.endpointinterface.class.not.found=\u627E\u4E0D\u5230 endpointInterface \u985E\u5225 {0} + +webserviceap.sei.cannot.contain.constant.values=\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u4E0D\u53EF\u5305\u542B\u5E38\u6578\u5BA3\u544A\: \u4ECB\u9762\: {0} \u6B04\u4F4D\: {1}. + +webserviceap.method.return.type.cannot.implement.remote=\u65B9\u6CD5\u50B3\u56DE\u985E\u578B\u4E0D\u53EF\u5BE6\u884C java.rmi.Remote. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u50B3\u56DE\u985E\u578B\: {2} + +webserviceap.method.parameter.types.cannot.implement.remote=\u65B9\u6CD5\u53C3\u6578\u985E\u578B\u4E0D\u53EF\u5BE6\u884C java.rmi.Remote. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578\: {2} \u985E\u578B\: {3} + +webserviceap.operation.name.not.unique=\u4F5C\u696D\u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u4F5C\u696D\u540D\u7A31\: {2} + +webserviceap.method.request.wrapper.bean.name.not.unique=\u8981\u6C42\u5305\u88DD\u51FD\u5F0F bean \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684, \u4E14\u4E0D\u53EF\u8207\u5176\u4ED6\u7522\u751F\u7684\u985E\u5225\u885D\u7A81. \u985E\u5225\: {0} \u65B9\u6CD5 {1} + +webserviceap.method.response.wrapper.bean.name.not.unique=\u56DE\u61C9\u5305\u88DD\u51FD\u5F0F bean \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684, \u4E14\u4E0D\u53EF\u8207\u5176\u4ED6\u7522\u751F\u7684\u985E\u5225\u885D\u7A81. \u985E\u5225\: {0} \u65B9\u6CD5 {1} + +webserviceap.method.exception.bean.name.not.unique=\u4F8B\u5916 bean \u540D\u7A31\u5FC5\u9808\u662F\u552F\u4E00\u7684, \u4E14\u4E0D\u53EF\u8207\u5176\u4ED6\u7522\u751F\u7684\u985E\u5225\u885D\u7A81. \u985E\u5225\: {0} \u4F8B\u5916 {1} + +webserviceap.rpc.literal.parameters.must.have.webparam=\u6240\u6709\u7684 RPC \u5E38\u503C\u53C3\u6578\u5747\u5FC5\u9808\u8981\u6709\u4E00\u500B WebParam \u8A3B\u89E3. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} \u53C3\u6578 {2} + +webserviceap.rpc.literal.webparams.must.specify.name=\u6240\u6709\u7684 RPC \u5E38\u503C WebParam \u5747\u5FC5\u9808\u6307\u5B9A\u4E00\u500B\u540D\u7A31. \u985E\u5225\: {0} \u65B9\u6CD5 {1} \u53C3\u6578 {2} + +webserviceap.rpc.literal.must.not.be.bare=RPC \u5E38\u503C SOAPBinding \u4E2D\u5FC5\u9808\u6709 parameterStyle WRAPPED. \u985E\u5225\\: {0}. + +webserviceap.header.parameters.must.have.webparam.name=\u6240\u6709\u7684\u6A19\u982D\u53C3\u6578 WebParam \u8A3B\u89E3\u5747\u5FC5\u9808\u6307\u5B9A\u4E00\u500B\u540D\u7A31. \u985E\u5225\: {0} \u65B9\u6CD5 {1} \u53C3\u6578 {2} + +webserviceap.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230 HandlerChain \u6A94\u6848. \u985E\u5225\: {0}, \u6A94\u6848:\ {1} + +webserviceap.failed.to.parse.handlerchain.file=\u7121\u6CD5\u5256\u6790 HandlerChain \u6A94\u6848. \u985E\u5225\: {0}, \u6A94\u6848\: {1} + +webserviceap.class.not.found=\u627E\u4E0D\u5230\u985E\u5225: {0} + +webserviceap.rpc.soapbinding.not.allowed.on.method=\u65B9\u6CD5\u4E0D\u53EF\u6709 SOAPBinding.Style.RPC \u9023\u7D50\u8A3B\u89E3. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} + +webserviceap.mixed.binding.style=\u985E\u5225 {0} \u5305\u542B\u6DF7\u5408\u9023\u7D50. \u4E0D\u53EF\u6DF7\u5408\u4F7F\u7528 SOAPBinding.Style.RPC \u548C SOAPBinding.Style.DOCUMENT. + +webserviceap.endpointinteface.plus.annotation=\u4E0D\u53EF\u5728 @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E2D\u4F7F\u7528 @{0} \u8A3B\u89E3. + +webserviceap.endpointinteface.plus.element=\u4E0D\u53EF\u5728 @javax.jws.WebService.endpointInterface \u5143\u7D20\u4E2D\u4F7F\u7528 @javax.jws.WebService.{0} \u5143\u7D20. + +webserviceap.non.in.parameters.must.be.holder=\u985E\u5225:\ {0}, \u65B9\u6CD5: {1}, \u53C3\u6578: {2} \u4E0D\u662F WebParam.Mode.IN, \u4E14\u4E0D\u662F javax.xml.ws.Holder \u985E\u578B. + +webserviceap.invalid.sei.annotation.element=\u4E0D\u53EF\u5728\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u6307\u5B9A @javax.jws.WebService.{0} \u5143\u7D20. \u985E\u5225\: {1} + +webserviceap.invalid.sei.annotation=\u4E0D\u53EF\u5728\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u4F7F\u7528 @{0} \u8A3B\u89E3. \u985E\u5225\: {1} + +webserviceap.invalid.sei.annotation.element.exclude=\u4E0D\u53EF\u5728\u670D\u52D9\u7AEF\u9EDE\u4ECB\u9762\u4F7F\u7528 @javax.jws.WebMethod({0}). \u985E\u5225\: {1} \u65B9\u6CD5\: {2} + +webserviceap.invalid.webmethod.element.with.exclude=\u4E0D\u53EF\u540C\u6642\u6307\u5B9A @javax.jws.WebMethod.{0} \u5143\u7D20\u8207 @javax.jws.WebMethod.exclude \u5143\u7D20. \u985E\u5225\: {1} \u65B9\u6CD5\: {2} + +webserviceap.doc.bare.no.out=\u5FC5\u9808\u5C07\u4E0D\u542B\u50B3\u56DE\u985E\u578B\u6216 OUT/INOUT \u53C3\u6578\u7684 Document/literal bare \u65B9\u6CD5\u52A0\u8A3B\u70BA @Oneway. \u985E\u5225\: {0}, \u65B9\u6CD5: {1} +webserviceap.doc.bare.return.and.out=Document/literal bare \u65B9\u6CD5\u4E0D\u53EF\u6709\u50B3\u56DE\u985E\u578B\u548C out \u53C3\u6578. \u985E\u5225\: {0}, \u65B9\u6CD5: {1} +webserviceap.oneway.and.out=@Oneway \u65B9\u6CD5\u4E0D\u53EF\u6709 out \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5 {1} + +webserviceap.webservice.class.not.public=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u5FC5\u9808\u662F\u516C\u7528\u985E\u5225. \u985E\u5225\: {0} + +webserviceap.webservice.class.is.final=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u4E0D\u53EF\u4EE5\u662F\u6700\u7D42\u985E\u5225. \u985E\u5225\: {0} + +webserviceap.webservice.class.is.abstract=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u4E0D\u53EF\u4EE5\u662F\u6458\u8981\u985E\u5225. \u985E\u5225\: {0} + +webserviceap.webservice.class.is.innerclass.not.static=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u5167\u90E8\u985E\u5225\u5FC5\u9808\u662F\u975C\u614B\u985E\u5225. \u985E\u5225\: {0} + +webserviceap.webservice.method.is.abstract=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u4E0D\u53EF\u6709\u6458\u8981\u65B9\u6CD5. \u985E\u5225\: {0} \u65B9\u6CD5: {1} + +webserviceap.webservice.method.is.static.or.final=\u4F7F\u7528 @javax.jws.WebMethod \u52A0\u8A3B\u7684\u65B9\u6CD5\u4E0D\u53EF\u662F\u975C\u614B\u6216\u6700\u7D42\u65B9\u6CD5. \u985E\u5225\: {0} \u65B9\u6CD5: {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=\u4F7F\u7528 @javax.jws.WebService \u52A0\u8A3B\u7684\u985E\u5225\u5FC5\u9808\u8981\u6709\u4E00\u500B\u516C\u7528\u7684\u9810\u8A2D\u5EFA\u69CB\u5B50. \u985E\u5225\: {0} + +webserviceap.oneway.and.not.one.in=\u4F7F\u7528 @javax.jws.Oneway \u52A0\u8A3B\u7684\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u4E00\u500B\u975E\u6A19\u982D IN \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} + +webserviceap.doc.bare.no.return.and.no.out=\u6C92\u6709\u50B3\u56DE\u503C\u7684\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u55AE\u4E00 OUT/INOUT \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} + +webserviceap.doc.bare.and.no.one.in=\u6587\u4EF6\u5E38\u503C bare \u65B9\u6CD5\u5FC5\u9808\u8981\u6709\u4E00\u500B\u975E\u6A19\u982D IN/INOUT \u53C3\u6578. \u985E\u5225\: {0} \u65B9\u6CD5\: {1} + +webserviceap.method.not.implemented=\u5FC5\u9808\u5728\u5BE6\u884C\u985E\u5225\u4E2D\u5BE6\u884C endpointInterface \u4E2D\u7684\u65B9\u6CD5. \u4ECB\u9762\u985E\u5225\:{0} \u5BE6\u884C\u985E\u5225\:{1} \u65B9\u6CD5\: {2} + +webserviceap.no.package.class.must.have.targetnamespace=\u4F7F\u7528 @javax.jws.Webservice \u52A0\u8A3B\u4E14\u4E0D\u5C6C\u65BC\u5957\u88DD\u7A0B\u5F0F\u7684\u985E\u5225, \u5FC5\u9808\u8981\u6709 @javax.jws.Webservice.targetNamespace \u5143\u7D20. \u985E\u5225\\: {0} + +webserviceap.webservice.and.webserviceprovider=\u4E0D\u53EF\u540C\u6642\u4F7F\u7528 @javax.jws.WebService \u8207 @javax.xml.ws.WebServiceProvider \u52A0\u8A3B\u7684\u985E\u5225. \u985E\u5225\\: {0} + +webserviceap.invalid.soapbinding.parameterstyle= {1} \u7684\u8A3B\u89E3 {0} \u7528\u6CD5\u4E0D\u6B63\u78BA, ParameterStyle \u53EA\u80FD\u662F\u4F7F\u7528 RPC \u6A23\u5F0F Web \u670D\u52D9\u7684 WRAPPED. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties index 260fcb358c3..c6f72cd8c0e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,8 @@ wsimport.help=\nUsage: {0} [options] \n\n\ \ result in applications that are not portable or\n\ \ may not interoperate with other implementations\n\ \ -help display help\n\ -\ -httpproxy:: specify a HTTP proxy server (port defaults to 8080)\n\ +\ -httpproxy: set a HTTP proxy. Format is [user[:password]@]proxyHost:proxyPort\n\ +\ (port defaults to 8080)\n\ \ -keep keep generated files\n\ \ -p specifies the target package\n\ \ -quiet suppress wsimport output\n\ @@ -133,7 +134,7 @@ wsgen.fullversion=wsgen full version \"{0}\" wrapperTask.needEndorsed=\ You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. \ -Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), \ +Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \ or set xendorsed="true" on <{2}>. # {0}, {2} - version (e.g. 2.1), {1} - absolute class location @@ -142,7 +143,7 @@ You are loading JAX-WS {0} API from {1} but this tool requires JAX-WS {2} API. invoker.needEndorsed=\ You are running on JDK6 which comes with JAX-WS {0} API, but this tool requires JAX-WS {1} API. \ -Use the endorsed standards override mechanism (http://java.sun.com/javase/6/docs/technotes/guides/standards/), \ +Use the endorsed standards override mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \ or use -Xendorsed option. @@ -205,6 +206,9 @@ wsimport.ILLEGAL_TARGET_VERSION = \ wsimport.ILLEGAL_AUTH_INFO = \ "{0}" is not a valid authorization information format. The format is http[s]://user:password@host:port//. +wsimport.ILLEGAL_PROXY = \ + "{0}" is not a valid proxy format. The format is [user[:password]@]proxyHost:proxyPort + wsimport.readingAuthFile = \ Trying to read authorization file : "{0}"... diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties new file mode 100644 index 00000000000..295d947a635 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_de.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=Verwendung: {0} [options] \n\nMit "wsimport -help" k\u00f6nnen Sie eine detaillierte Beschreibung von Optionen aufrufen. + +wsimport.help=\nVerwendung: {0} [options] \n\n\\wobei [options] Folgendes umfassen:\n\\ -b Gibt jaxws/jaxb-Binding-Dateien oder zus\u00e4tzliche Schemas an\n\\ (Jeder muss seinen eigenen Switch -b enthalten)\n\\ -B \u00dcbergibt diese Option an den JAXB-Schemacompiler\n\\ -catalog Gibt Katalogdatei zur L\u00f6sung externer Entity-Referenzen an\n\\ Unterst\u00fctzt das TR9401-, XCatalog- und OASIS XML-Katalogformat.\n\\ -d Gibt an, wo die generierten Ausgabedateien gespeichert werden sollen\n\\ -encoding Gibt die Zeichencodierung an, die von Quelldateien verwendet wird\n\\ -extension L\u00e4sst Herstellererweiterungen zu - Funktionalit\u00e4t durch Spezifikation\n\\ nicht angegeben. Die Verwendung von Erweiterungen kann\n\\ zu nicht portierbaren Anwendungen\n\\ oder Anwendungen f\u00fchren, die nicht mit anderen Implementierungen zusammenarbeiten\n\\ -help Zeigt einen Hilfetext an\n\\ -httpproxy:: Gibt einen HTTP-Proxyserver an (Standardport ist 8080)\n\\ -keep Beh\u00e4lt generierte Dateien bei\n\\ -p Gibt das Zielpackage an\n\\ -quiet Unterdr\u00fcckt die wsimport-Ausgabe\n\\ -s Gibt an, wo die generierten Quelldateien gespeichert werden sollen\n\\ -target Generiert Code gem\u00e4\u00df der angegebenen JAXWS-Spezifikationsversion\n\\ Standardversion ist 2.2, akzeptierte Werte sind 2.0, 2.1 und 2.2\n\\ Beispiel: 2.0 generiert konformen Code f\u00fcr JAXWS 2.0-Spezifikation\n\\ -verbose Ausgabemeldungen zur Funktion, die der Compiler ausf\u00fchrt\n\\ -version Druckt Versionsinformationen\n\\ -wsdllocation @WebServiceClient.wsdlLocation-Wert\n\\ -clientjar Erstellt die .jar-Datei der generierten Artefakte zusammen mit den\n\\ WSDL -Metadaten, die f\u00fcr den Aufruf des Webservice erforderlich sind.\n\\ -generateJWS Generierte verk\u00fcrzte JWS-Implementierungsdatei\n\\ -implDestDir Gibt an, wo die JWS-Implementierungsdatei generiert werden soll\n\\ -implServiceName Lokaler Teil des Servicenamens f\u00fcr die generierte JWS-Implementierung\n\\ -implPortName Lokaler Teil des Portnamens f\u00fcr die generierte JWS-Implementierung + +wsimport.usage.extensions=\n\\Erweiterungen:\n\\ -XadditionalHeaders Ordnet Header, die nicht an Anforderungs- oder Antwortnachricht gebunden sind, \n\\ Java-Methodenparametern zu\n\\ -Xauthfile Datei mit Autorisierungsinformationen im Format \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug Druckt Debuginformationen\n\\ -Xno-addressing-databinding Aktiviert das Binding von W3C EndpointReferenceType mit Java\n\\ -Xnocompile Kompiliert generierte Java-Dateien nicht\n\\ -XdisableAuthenticator Deaktiviert Authentikator, der von JAX-WS RI verwendet wird,\n\\ -Xauthfile-Option wird ignoriert, wenn festgelegt\n\\ -XdisableSSLHostnameVerification deaktiviert die Pr\u00fcfung des SSL-Hostnamens beim Abruf von\n\\ wsdls + + +wsimport.usage.examples=\n\\Beispiele:\n\\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\\ wsimport -d generated http://example.org/stock?wsdl\n + +wsgen.usage=Verwendung: {0} [options] \n\nMit "wsgen -help" k\u00f6nnen Sie eine detaillierte Beschreibung von Optionen aufrufen. + +wsgen.help=\nVerwendung: {0} [options] \n\n\\wobei [options] Folgendes umfassen:\n\\ -classpath Gibt an, wo die Eingabeklassendateien gespeichert sind\n\\ -cp wie -classpath \n\\ -d Gibt an, wo die generierten Ausgabedateien gespeichert werden sollen\n\\ -encoding Gibt die von Quelldateien verwendete Zeichencodierung an\n\\ -extension L\u00e4sst Herstellererweiterungen zu - Funktionalit\u00e4t nicht\n\\ von der Spezifikation angegeben. Die Verwendung von Erweiterungen kann\n\\ zu Anwendungen f\u00fchren, die nicht portierbar sind, oder zu\n\\ Anwendungen, die nicht mit anderen Implementierungen zusammenarbeiten\n\\ -help Zeigt einen Hilfetext an\n\\ -keep Beh\u00e4lt generierte Dateien bei\n\\ -r Ressourcenzielverzeichnis, gibt an, wo\n\\ Ressourcendateien gespeichert werden, wie WSDL-Dateien\n\\ -s Gibt an, wo die generierten Quelldateien gespeichert werden\n\\ -verbose Ausgabemeldungen zur gerade ausgef\u00fchrten Funktion des Compilers\n\\ -version Druckt Versionsinformationen\n\\ -wsdl[:protocol] Generiert eine WSDL-Datei. Das Protokoll ist optional.\n\\ G\u00fcltige Protokolle sind {1},\n\\ Das Standardprotokoll ist soap1.1.\n\\ Die Nicht-Standardprotokolle {2}\n\\ k\u00f6nnen nur in Verbindung mit der \n\\ Option "-extension" verwendet werden.\n\\ -inlineSchemas Inline-Schemas in der generierten wsdl. M\u00fcssen in\n\\ Verbindung mit der Option "-wsdl" verwendet werden.\n\\ -servicename Gibt den Servicenamen an, der in der generierten WSDL verwendet werden soll\n\\ Wird in Verbindung mit der Option "-wsdl" verwendet.\n\\ -portname Gibt den Portnamen zur Verwendung in der generierten WSDL an\n\\ Wird in Verbindung mit der Option "-wsdl" verwendet. + + +wsgen.usage.examples=\n\\Beispiele:\n\\ wsgen -cp . example.Stock\n\\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=Sie arbeiten mit JDK6, das mit JAX-WS {0}-API geliefert wird, dieses Tool erfordert jedoch JAX-WS {1}-API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), oder setzen Sie xendorsed="true" in <{2}>. + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=Sie laden JAX-WS {0}-API aus {1}, dieses Tool erfordert jedoch JAX-WS {2}-API. + +invoker.needEndorsed=Sie arbeiten mit JDK6, das mit JAX-WS {0}-API geliefert wird, dieses Tool erfordert jedoch JAX-WS {1}-API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), oder verwenden Sie die Option "-Xendorsed". + + +# +# Generic Messages +# +wscompile.invalidOption=unbekannter Parameter {0} +wsimport.noSuchJaxbOption=keine derartige JAXB-Option: {0} + +wscompile.error=Fehler: {0} +wscompile.warning=Warnung: {0} +wscompile.info=Informationen: {0} +wscompile.duplicateOption=doppelte Option: {0} +wscompile.noSuchDirectory=Verzeichnis nicht gefunden: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=Option "{0}" erfordert ein Argument. +wscompile.compilationFailed=Kompilierung nicht erfolgreich, Fehler sollten gemeldet worden sein +wscompile.unsupportedEncoding=nicht unterst\u00fctzte Codierung: {0} + +wsimport.missingFile=WSDL_URI fehlt + +wsgen.invalid.protocol=\"{0}\" ist kein unterst\u00fctztes Protokoll. Unterst\u00fctzte Protokolle umfassen: {1}. +wsgen.invalid.transport=\"{0}\" ist kein unterst\u00fctzter Transport. Unterst\u00fctzte Transporte umfassen: {1}. +wsgen.class.not.found=Klasse nicht gefunden: "{0}" +wsgen.could.not.create.file=Datei konnte nicht erstellt werden: "{0}" +wsgen.missingFile=SEI fehlt +wsgen.soap12.without.extension=Das optionale Protokoll \"Xsoap1.2\" muss in Verbindung mit der Option \"-extension\" verwendet werden. +wsgen.protocol.without.extension=Das optionale Protokoll \"{0}\" muss in Verbindung mit der Option \"-extension\" verwendet werden. +wsgen.wsdl.arg.no.genwsdl=Die Option \"{0}\" kann nur in Verbindung mit der Option "-wsdl" verwendet werden. +wsgen.servicename.missing.namespace=Im Servicenamen \\"{0}\\" fehlt ein Namespace. +wsgen.servicename.missing.localname=Im Servicenamen \\"{0}\\" fehlt ein lokaler Name. +wsgen.portname.missing.namespace=Im Portnamen \\"{0}\\" fehlt ein Namespace. +wsgen.portname.missing.localname=Im Portnamen \\"{0}\\" fehlt ein lokaler Name. +wsgen.class.must.be.implementation.class=Die Klasse \\"{0}\\" ist keine End Point-Implementierungsklasse. +wsimport.NotAFileNorURL = "{0}" ist weder ein Dateiname noch eine URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen kann WSDL f\u00fcr Nicht-SOAP-Binding nicht generieren: {0} in Klasse {1} + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen kann WSDL f\u00fcr SOAP 1.2-Binding nicht generieren: {0} in Klasse {1} +Please geben Sie die Switches \\"-extension\\" und \\"-wsdl:protocol XSoap1.2\\" an. Beispiel:\n\n +wsgen -wsdl:protocol XSoap1.2 -extension {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" muss in Verbindung mit der Option \"-wsdl\" verwendet werden + +wsgen.no.webservices.class=wsgen hat keine Klasse mit @WebService-Annotation gefunden. Geben Sie @WebService-Annotation in {0} an. + +wsimport.no.wsdl=Schemadokument {0} konnte nicht gelesen werden, da 1) das Dokument nicht gefunden werden konnte; 2) das Dokument nicht gelesen werden konnte; 3) das Root-Element des Dokuments nicht ist. + +wsimport.FailedToParse = Parsen von "{0}" nicht m\u00f6glich: {1} + +wsimport.ParsingWSDL=WSDL wird geparst ...\n\n +wsimport.GeneratingCode=\nCode wird generiert ...\n +wsimport.CompilingCode=\nCode wird kompiliert ...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" ist keine g\u00fcltige Zielversion. "2.0" und "2.1" werden unterst\u00fctzt. + +wsimport.ILLEGAL_AUTH_INFO = "{0}" ist kein g\u00fcltiges Format f\u00fcr Autorisierungsinformationen. Das Format ist http[s]://user:password@host:port//. + +wsimport.readingAuthFile = Es wird versucht, die Autorisierungsdatei zu lesen: "{0}" ... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = Autorisierungsdatei "{0}" nicht gefunden. Wenn f\u00fcr den WSDL-Zugriff die Basisauthentifizierung erforderlich ist, geben Sie eine Autorisierungsdatei mit Lesezugriff in {1} an oder verwenden -Xauthfile, um die Autorisierungsdatei anzugeben. Geben Sie auf jeder Zeile Autorisierungsinformationen mit folgendem Format an: http[s]://user:password@host:port// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" erfordert Autorisierung. Geben Sie eine Autorisierungsdatei mit Lesezugriff in {2} an, oder verwenden Sie -Xauthfile, um die Autorisierungsdatei anzugeben. Geben Sie auf jeder Zeile Autorisierungsinformationen mit folgendem Format an: http[s]://user:password@host:port// + +wsimport.AUTH_INFO_LINENO = "Zeile {0} von {1} + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = Server hat HTTP-Statuscode zur\u00fcckgegeben: "{0}", Vorgang wird mit "{1}" wiederholt + +wsimport.maxRedirectAttempt = Eine WSDL kann nicht abgerufen werden. die H\u00f6chstanzahl von Umleitungen (5) ist erreicht + +wsimport.wsdllocation.clientjar = wsdlLocation kann bei Verwendung der Option "clientJar" nicht angegeben werden +# {0} - path to a zip file +wsimport.archivingArtifacts=\nDie generierten Artefakte werden in {0} archiviert.\n +wsimport.archiveArtifact={0} wird dem Archiv {1} hinzugef\u00fcgt +wsimport.fetchingMetadata=\nDie WSDL und die zugeh\u00f6rigen Metadaten werden heruntergeladen\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\nMetadatendokument wird aus {0} in {1} heruntergeladen diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties new file mode 100644 index 00000000000..878ed185e02 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_es.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=Sintaxis: {0} [options] \n\nUtilice "wsimport -help" para obtener una descripci\u00f3n detallada de las opciones. + +wsimport.help=\nSintaxis: {0} [options] \n\n\\donde [options] incluye:\n\\ -b especifica archivos de enlace jaxws/jaxb o esquemas adicionales\n\\ (Cada debe tener su propio -b)\n\\ -B Transfiere esta opci\u00f3n al compilador de esquemas JAXB\n\\ -catalog especifica un archivo de cat\u00e1logo para resolver las referencias a entidad externa\n\\ soporta TR9401, XCatalog y el formato de cat\u00e1logo OASIS XML.\n\\ -d especifica d\u00f3nde se colocan los archivos de salida generados\n\\ -encoding especifica la codificaci\u00f3n de caracteres que utilizan los archivos de origen\n\\ -extension permite extensiones de proveedor - funcionalidad no especificada\n\\ en la especificaci\u00f3n. El uso de extensiones puede\n\\ dar lugar a aplicaciones que no son portables o\n\\ que no funcionan con otras implantaciones\n\\ -help muestra la ayuda\n\\ -httpproxy:: especifica un servidor proxy HTTP (el puerto por defecto es 8080)\n\\ -keep mantiene los archivos generados\n\\ -p especifica el paquete de destino\n\\ -quiet suprime la salida de wsimport\n\\ -s especifica d\u00f3nde se colocan los archivos de origen generados\n\\ -target genera c\u00f3digo de acuerdo con la versi\u00f3n de la especificaci\u00f3n JAXWS indicada\n\\ El valor por defecto es 2.2; los valores aceptados son 2.0, 2.1 y 2.2\n\\ por ejemplo, 2.0 generar\u00e1 c\u00f3digo compatible con la especificaci\u00f3n JAX-WS 2.0\n\\ -verbose env\u00eda mensajes acerca de lo que est\u00e1 haciendo el compilador\n\\ -version imprime la informaci\u00f3n de versi\u00f3n\n\\ -wsdllocation valor de @WebServiceClient.wsdlLocation\n\\ -clientjar crea el archivo jar de los artefactos generados junto con los\n\\ metadatos WSDL necesarios para llamar al servicio web.\n\\ -generateJWS genera un archivo de implantaci\u00f3n JWS con stub\n\\ -implDestDir especifica d\u00f3nde se genera el archivo de implantaci\u00f3n JWS\n\\ -implServiceName parte local del nombre de servicio de la implantaci\u00f3n de JWS generada\n\\ -implPortName parte local del nombre de puerto de la implantaci\u00f3n de JWS generada + +wsimport.usage.extensions=\n\\Extensiones:\n\\ -XadditionalHeaders asigna cabeceras no enlazadas a la solicitud o el mensaje de respuesta a los \n\\ par\u00e1metros del m\u00e9todo Java\n\\ -Xauthfile archivo que lleva la informaci\u00f3n de autorizaci\u00f3n en el formato \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug imprime la informaci\u00f3n de depuraci\u00f3n\n\\ -Xno-addressing-databinding permite el enlace de W3C EndpointReferenceType a Java\n\\ -Xnocompile no compila los archivos Java generados\n\\ -XdisableAuthenticator desactiva el autenticador utilizado por la implantaci\u00f3n de referencia de JAX-WS,\n\\ la opci\u00f3n -Xauthfile se ignora si est\u00e1 definida\n\\ -XdisableSSLHostnameVerification desactiva la verificaci\u00f3n del nombre de host SSL al recuperar\n\\ wsdls + + +wsimport.usage.examples=\n\\Ejemplos:\n\\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\\ wsimport -d genera http://example.org/stock?wsdl\n + +wsgen.usage=Sintaxis: {0} [options] \n\nUtilice "wsgen -help" para obtener una descripci\u00f3n detallada de las opciones. + +wsgen.help=\nSintaxis: {0} [options] \n\n\\donde [options] incluye:\n\\ -classpath especifica d\u00f3nde se encuentran los archivos de clase de entrada\n\\ -cp igual que -classpath \n\\ -d especifica d\u00f3nde se colocan los archivos de salida generados\n\\ -encoding especifica la codificaci\u00f3n de caracteres que utilizan los archivos de origen\n\\ -extension permite extensiones de proveedor - funcionalidad no especificada\n\\ en la especificaci\u00f3n. El uso de extensiones\n\\ puede dar lugar a aplicaciones que no son portables o\n\\ que no funcionan con otras implantaciones\n\\ -help muestra la ayuda\n\\ -keep mantiene archivos generados\n\\ -r directorio de destino de recursos; especifica d\u00f3nde se\n\\ colocan archivos de recursos como los WSDL\n\\ -s especifica d\u00f3nde se colocan los archivos de origen generados\n\\ -verbose env\u00eda mensajes acerca de lo que est\u00e1 haciendo el compilador\n\\ -version imprime la informaci\u00f3n de versi\u00f3n\n\\ -wsdl[:protocol] genera un archivo WSDL. El protocolo es opcional.\n\\ Los protocolos v\u00e1lidos son {1},\n\\ el protocolo por defecto es soap1.1.\n\\ Los protocolos no est\u00e1ndar {2}\n\\ s\u00f3lo se pueden utilizar junto con la opci\u00f3n\n\\ -extension.\n\\ -inlineSchemas esquemas en l\u00ednea en el WSDL generado. Se deben\n\\ utilizar junto con la opci\u00f3n -wsdl.\n\\ -servicename especifica el nombre de servicio que se va a utilizar en el WSDL generado\n\\ Se utiliza junto con la opci\u00f3n -wsdl.\n\\ -portname especifica el nombre de puerto que se va a utilizar en el WSDL generado\n\\ Se utiliza junto con la opci\u00f3n -wsdl. + + +wsgen.usage.examples=\n\\Ejemplos:\n\\ wsgen -cp . example.Stock\n\\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=Est\u00e1 utilizando JDK6, que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1}. Utilice el mecanismo de sustituci\u00f3n de los est\u00e1ndares aprobados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), o defina xendorsed="true" en <{2}>. + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=Est\u00e1 cargando la API JAX-WS {0} desde {1}, pero esta herramienta necesita la API JAX-WS {2}. + +invoker.needEndorsed=Est\u00e1 utilizando JDK6, que incluye la API JAX-WS {0}, pero esta herramienta necesita la API JAX-WS {1}. Utilice el mecanismo de sustituci\u00f3n de los est\u00e1ndares aprobados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), o utilice la opci\u00f3n -Xendorsed. + + +# +# Generic Messages +# +wscompile.invalidOption=par\u00e1metro {0} no reconocido +wsimport.noSuchJaxbOption=no existe esa opci\u00f3n JAXB: {0} + +wscompile.error=error: {0} +wscompile.warning=advertencia: {0} +wscompile.info=informaci\u00f3n: {0} +wscompile.duplicateOption=opci\u00f3n duplicada: {0} +wscompile.noSuchDirectory=no se ha encontrado el directorio: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=la opci\u00f3n \"{0}\" necesita un argumento +wscompile.compilationFailed=fallo de compilaci\u00f3n; se ha debido informar de los errores +wscompile.unsupportedEncoding=codificaci\u00f3n no soportada: {0} + +wsimport.missingFile=Falta WSDL_URI + +wsgen.invalid.protocol=\"{0}\" no es un protocolo soportado. Los protocolos soportados son: {1}. +wsgen.invalid.transport=\"{0}\" no es un transporte soportado. El transporte soportado es: {1}. +wsgen.class.not.found=No se ha encontrado la clase: \"{0}\" +wsgen.could.not.create.file="No se ha podido crear el archivo: "\\{0}\" +wsgen.missingFile=Falta la interfaz de punto final de servicio +wsgen.soap12.without.extension=El protocolo opcional \\"Xsoap1.2\\" se debe utilizar junto con la opci\u00f3n \\"-extension\\". +wsgen.protocol.without.extension=El protocolo opcional \"{0}\" se debe utilizar junto con la opci\u00f3n \"-extension\". +wsgen.wsdl.arg.no.genwsdl=La opci\u00f3n \\"{0}\\" s\u00f3lo se puede utilizar junto con la opci\u00f3n "-wsdl". +wsgen.servicename.missing.namespace=Al nombre del servicio \\"{0}\\" le falta un espacio de nombres. +wsgen.servicename.missing.localname=Al nombre del servicio \\"{0}\\" le falta un nombre local. +wsgen.portname.missing.namespace=Al nombre del puerto \"{0}\" le falta un espacio de nombres. +wsgen.portname.missing.localname=Al nombre del puerto \"{0}\" le falta un nombre local. +wsgen.class.must.be.implementation.class=La clase \"{0}\" no es una clase de implantaci\u00f3n de punto final. +wsimport.NotAFileNorURL = "{0}" no es un nombre de archivo ni una URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen no puede generar WSDL para enlaces no SOAP: {0} en la clase {1} + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen no puede generar WSDL para enlaces SOAP 1.2: {0} en la clase {1}.\n +Please especifique los conmutadores \\"-extension\\" y \\"-wsdl:protocol XSoap1.2\\". Por ejemplo:\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\\"-inlineSchemas\\" se debe utilizar junto con la opci\u00f3n \\"-wsdl\\" + +wsgen.no.webservices.class=wsgen no ha encontrado ninguna clase con la anotaci\u00f3n @WebService. Especifique la anotaci\u00f3n @WebService en {0}. + +wsimport.no.wsdl=Fallo al leer el documento WSDL: {0}, porque 1) no se ha encontrado el documento, /2) el documento no se ha podido leer; 3) el elemento ra\u00edz del documento no es . + +wsimport.FailedToParse = Fallo al analizar "{0}": {1} + +wsimport.ParsingWSDL=analizando WSDL...\n\n +wsimport.GeneratingCode=\nGenerando c\u00f3digo...\n +wsimport.CompilingCode=\nCompilando c\u00f3digo...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" no es una versi\u00f3n de destino v\u00e1lida. "2.0" y "2.1" est\u00e1n soportadas. + +wsimport.ILLEGAL_AUTH_INFO = "{0}" no es un formato de informaci\u00f3n de autorizaci\u00f3n v\u00e1lido. El formato es http[s]://usuario:contrase\u00f1a@host:puerto//. + +wsimport.readingAuthFile = Intentando leer el archivo de autorizaci\u00f3n: "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = No se ha encontrado el archivo de autorizaci\u00f3n "{0}". Si el acceso WSDL necesita autenticaci\u00f3n b\u00e1sica, proporcione un archivo de autorizaci\u00f3n con acceso de lectura en {1} o utilice -Xauthfile para proporcionar el archivo de autorizaci\u00f3n y, en cada l\u00ednea, proporcione la informaci\u00f3n de autorizaci\u00f3n utilizando este formato: http[s]://usuario:contrase\u00f1a@host:puerto// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" necesita autorizaci\u00f3n. Proporcione un archivo de autorizaci\u00f3n con acceso de lectura en {2} o utilice -Xauthfile para proporcionar el archivo de autorizaci\u00f3n y, en cada l\u00ednea, proporcione la informaci\u00f3n de autorizaci\u00f3n utilizando este formato: http[s]://usuario:contrase\u00f1a@host:puerto// + +wsimport.AUTH_INFO_LINENO = "l\u00ednea {0} de {1} + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = El servidor ha devuelto el c\u00f3digo de estado HTTP: "{0}"; reintentando con "{1}" + +wsimport.maxRedirectAttempt = No se puede obtener un WSDL. Se ha alcanzado el n\u00famero m\u00e1ximo de redireccionamientos (5). + +wsimport.wsdllocation.clientjar = wsdlLocation no se puede especificar al utilizar la opci\u00f3n clientJar +# {0} - path to a zip file +wsimport.archivingArtifacts=\nArchivando los artefactos generados en {0}.\n +wsimport.archiveArtifact=Agregando {0} al archivo {1} +wsimport.fetchingMetadata=\nDescargando el WSDL y los metadatos asociados\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\nDescargando el documento de metadatos desde {0} en {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties new file mode 100644 index 00000000000..79168a80f36 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_fr.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=Syntaxe : {0} [options] \n\nUtilisez "wsimport -help" pour obtenir une description d\u00e9taill\u00e9e des options. + +wsimport.help=\nSyntaxe : {0} [options] \n\n\\o\u00f9 [options] incluent :\n\ -b indiquez les fichiers de binding jaxws/jaxb ou des sch\u00e9mas suppl\u00e9mentaires\n\ (Chaque \u00e9l\u00e9ment doit avoir sa propre option -b)\n\ -B Transmettez cette option au compilateur de sch\u00e9mas JAXB\n\ -catalog indiquez le fichier de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d''entit\u00e9 externes\n\ prend en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\ -d indiquez o\u00f9 placer les fichiers de sortie g\u00e9n\u00e9r\u00e9s\n\ -encoding indiquez l''encodage de caract\u00e8res utilis\u00e9s pour les fichiers source\n\ -extension autorisez les extensions fournisseur - fonctionnalit\u00e9 non indiqu\u00e9e\n\ par la sp\u00e9cification. L''utilisation d''extensions peut\n\ aboutir \u00e0 des applications non portables ou\n\ ne pouvant peut-\u00eatre pas interagir avec d''autres impl\u00e9mentations\n\ -help affichez l''aide\n\ -httpproxy:: indiquez un serveur proxy HTTP (ports 8080 par d\u00e9faut)\n\ -keep conservez les fichiers g\u00e9n\u00e9r\u00e9s\n\ -p indiquez le package cible\n\ -quiet supprimez la sortie wsimport\n\ -s indiquez o\u00f9 placer les fichiers source g\u00e9n\u00e9r\u00e9s\n\ -target g\u00e9n\u00e9rez le code conform\u00e9ment \u00e0 la version de sp\u00e9cification JAXWS indiqu\u00e9e\n\ la valeur par d\u00e9faut est 2.2, les valeurs accept\u00e9es sont 2.0, 2.1 et 2.2\n\ ex. : 2.0 g\u00e9n\u00e8rera un code conforme \u00e0 la sp\u00e9cification JAXWS 2.0\n\ -verbose messages de sortie concernant les actions du compilateur\n\ -version imprimez les informations de version\n\ -wsdllocation valeur @WebServiceClient.wsdlLocation\n\ -clientjar Cr\u00e9e le fichier JAR des artefacts g\u00e9n\u00e9r\u00e9s ainsi que les\n\ m\u00e9tadonn\u00e9es WSDL requises pour l''appel du service Web.\n\ -generateJWS g\u00e9n\u00e9rez le fichier d''impl\u00e9mentation JWS stub\n\ -implDestDir indiquez o\u00f9 g\u00e9n\u00e9rer le fichier d''impl\u00e9mentation JWS\n\ -implServiceName partie locale du nom de service pour l''impl\u00e9mentation JWS g\u00e9n\u00e9r\u00e9e\n\ -implPortName partie locale du nom de port pour l''impl\u00e9mentation JWS g\u00e9n\u00e9r\u00e9e + +wsimport.usage.extensions=\n\\Extensions :\n\ -XadditionalHeaders mappez les en-t\u00eates non li\u00e9s au message de demande ou de r\u00e9ponse \u00e0 des \n\ param\u00e8tres de m\u00e9thode Java\n\ -Xauthfile fichier permettant de transporter les informations d'autorisation au format \n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug imprimez les informations de d\u00e9bogage\n\ -Xno-addressing-databinding activez le binding de W3C EndpointReferenceType \u00e0 Java\n\ -Xnocompile ne compilez pas les fichiers Java g\u00e9n\u00e9r\u00e9s\n\ -XdisableAuthenticator d\u00e9sactivez l'authentificateur utilis\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JAX-WS,\n\ l'option -Xauthfile ne sera pas prise en compte si elle est d\u00e9finie\n\ -XdisableSSLHostnameVerification d\u00e9sactivez la v\u00e9rification du nom d'h\u00f4te SSL lors de l'extraction\n\ wsdls + + +wsimport.usage.examples=\n\\Exemples :\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d a g\u00e9n\u00e9r\u00e9 http://example.org/stock?wsdl\n + +wsgen.usage=Syntaxe : {0} [options] \n\nUtilisez "wsgen -help" pour obtenir une description d\u00e9taill\u00e9e des options. + +wsgen.help=\nSyntaxe : {0} [options] \n\n\\o\u00f9 [options] incluent :\n\ -classpath indiquez o\u00f9 trouver les fichiers de classe d''entr\u00e9e\n\ -cp identique \u00e0 -classpath \n\ -d indiquez o\u00f9 placer les fichiers de sortie g\u00e9n\u00e9r\u00e9s\n\ -encoding indiquez l''encodage de caract\u00e8res utilis\u00e9 par les fichiers source\n\ -extension autorisez les extensions fournisseur - fonctionnalit\u00e9 non indiqu\u00e9e\n\ par la sp\u00e9cification. L''utilisation des extensions peut\n\ aboutir \u00e0 des applications non portables ou\n\ ne pouvant peut-\u00eatre pas interagir avec d''autres impl\u00e9mentations\n\ -help affichez l''aide\n\ -keep conservez les fichiers g\u00e9n\u00e9r\u00e9s\n\ -r r\u00e9pertoire de destination des ressources, indiquez o\u00f9\n\ placer les fichiers de ressource tels que les WSDL\n\ -s indiquez o\u00f9 placer les fichiers source g\u00e9n\u00e9r\u00e9s\n\ -verbose messages de sortie concernant les actions du compilateur\n\ -version imprimez les informations de version\n\ -wsdl[:protocol] g\u00e9n\u00e9rez un fichier WSDL. Le protocole est facultatif.\n\ Les protocoles valides sont {1},\n\ le protocole par d\u00e9faut est soap1.1.\n\ Les protocoles non standard {2}\n\ peuvent \u00eatre utilis\u00e9s uniquement avec\n\ l''option -extension.\n\ -inlineSchemas incorporez les sch\u00e9mas dans le WSDL g\u00e9n\u00e9r\u00e9. \n\ Utilis\u00e9 avec l''option -wsdl.\n\ -servicename indiquez le nom de service \u00e0 utiliser dans le WSDL g\u00e9n\u00e9r\u00e9\n\ Utilis\u00e9 avec l''option -wsdl.\n\ -portname indiquez le nom de port \u00e0 utiliser dans le WSDL g\u00e9n\u00e9r\u00e9\n\ Utilis\u00e9 avec l''option -wsdl. + + +wsgen.usage.examples=\n\\Exemples :\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=Vous ex\u00e9cutez JDK6, qui comporte l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1}. Utilisez le m\u00e9canisme Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou d\u00e9finissez xendorsed="True" sur <{2}>. + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=Vous \u00eates en train de charger l''API JAX-WS {0} \u00e0 partir de {1}, mais cet outil exige l''API JAX-WS {2}. + +invoker.needEndorsed=Vous ex\u00e9cutez JDK6, qui comporte l''API JAX-WS {0}, mais cet outil exige l''API JAX-WS {1}. Utilisez le m\u00e9canisme Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou utilisez l''option -Xendorsed. + + +# +# Generic Messages +# +wscompile.invalidOption=param\u00e8tre {0} non reconnu +wsimport.noSuchJaxbOption=aucune option JAXB de ce type : {0} + +wscompile.error=erreur : {0} +wscompile.warning=avertissement : {0} +wscompile.info=informations : {0} +wscompile.duplicateOption=option en double : {0} +wscompile.noSuchDirectory=r\u00e9pertoire introuvable : {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=l''option \"{0}\" exige un argument +wscompile.compilationFailed=\u00e9chec de la compilation, les erreurs auraient d\u00fb \u00eatre signal\u00e9es +wscompile.unsupportedEncoding=encodage non pris en charge : {0} + +wsimport.missingFile=WSDL_URI manquant + +wsgen.invalid.protocol=\"{0}\" n''est pas un protocole pris en charge. Les protocoles pris en charge incluent : {1}. +wsgen.invalid.transport=\"{0}\" n''est pas un transport pris en charge. Les transports pris en charge incluent : {1}. +wsgen.class.not.found=Classe introuvable : \"{0}\" +wsgen.could.not.create.file="Impossible de cr\u00e9er le fichier : "\\{0}\" +wsgen.missingFile=interface d'adresse de service manquante +wsgen.soap12.without.extension=Le protocole facultatif \"Xsoap1.2\" doit \u00eatre utilis\u00e9 avec l'option \"-extension\". +wsgen.protocol.without.extension=Le protocole facultatif \"{0}\" doit \u00eatre utilis\u00e9 avec l''option \"-extension\". +wsgen.wsdl.arg.no.genwsdl=L''option \"{0}\" peut \u00eatre associ\u00e9e uniquement \u00e0 l''option "-wsdl". +wsgen.servicename.missing.namespace=Un espace de noms est manquant dans le nom de service \"{0}\". +wsgen.servicename.missing.localname=Un nom local est manquant dans le nom de service \"{0}\". +wsgen.portname.missing.namespace=Un espace de noms est manquant dans le nom de port \"{0}\". +wsgen.portname.missing.localname=Un nom local est manquant dans le nom de port \"{0}\". +wsgen.class.must.be.implementation.class=La classe \"{0}\" n''est pas une classe d''impl\u00e9mentation d''adresse. +wsimport.NotAFileNorURL = "{0}" n''est pas un nom de fichier ni une URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen ne peut pas g\u00e9n\u00e9rer le WSDL pour le binding non-SOAP {0} sur la classe {1} + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen ne peut pas g\u00e9n\u00e9rer le WSDL pour le binding SOAP 1.2 {0} sur la classe {1}.\n +Please indiquez les commutateurs \"-extension\" et \"-wsdl:protocol XSoap1.2\". Par exemple :\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" doit \u00eatre utilis\u00e9 avec l'option \"-wsdl\" + +wsgen.no.webservices.class=wsgen n''a trouv\u00e9 aucune classe avec l''annotation @WebService. Indiquez une annotation @WebService sur {0}. + +wsimport.no.wsdl=Echec de la lecture du document WSDL {0} pour les raisons suivantes : 1) Le document est introuvable ; 2) Le document n''a pas pu \u00eatre lu ; 3) L''\u00e9l\u00e9ment racine du document n''est pas . + +wsimport.FailedToParse = Echec de l''analyse de "{0}" : {1} + +wsimport.ParsingWSDL=analyse du WSDL...\n\n +wsimport.GeneratingCode=\nG\u00e9n\u00e9ration du code...\n +wsimport.CompilingCode=\nCompilation du code...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" n''est pas une version cible valide. Les versions "2.0" et "2.1" sont prises en charge. + +wsimport.ILLEGAL_AUTH_INFO = "{0}" n''est pas un format d''informations d''autorisation valide. Le format est http[s]://user:password@host:port//. + +wsimport.readingAuthFile = Tentative de lecture d''un fichier d''autorisation : "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = Fichier d''autorisation "{0}" introuvable. Si l''acc\u00e8s WSDL n\u00e9cessite une authentification de base, fournissez un fichier d''autorisation avec un acc\u00e8s en lecture \u00e0 {1} ou utilisez -Xauthfile pour donner le fichier d''autorisation et fournir sur chaque ligne les informations d''autorisation \u00e0 l''aide du format suivant : http[s]://user:password@host:port// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" n\u00e9cessite une autorisation, fournissez un fichier d''autorisation avec un acc\u00e8s en lecture \u00e0 {2} ou utilisez -Xauthfile pour donner le fichier d''autorisation et fournir sur chaque ligne les informations d''autorisation \u00e0 l''aide du format suivant : http[s]://user:password@host:port// + +wsimport.AUTH_INFO_LINENO = "ligne {0} sur {1} + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = Le serveur a renvoy\u00e9 le code de statut HTTP : "{0}", nouvelle tentative avec "{1}" + +wsimport.maxRedirectAttempt = Impossible d'obtenir un WSDL, nombre maximal de r\u00e9acheminements (5) atteint + +wsimport.wsdllocation.clientjar = wsdlLocation ne peut pas \u00eatre indiqu\u00e9 lors de l'utilisation de l'option clientJar +# {0} - path to a zip file +wsimport.archivingArtifacts=\nArchivage des artefacts g\u00e9n\u00e9r\u00e9s dans {0}.\n +wsimport.archiveArtifact=Ajout de {0} \u00e0 l''archive {1} +wsimport.fetchingMetadata=\nT\u00e9l\u00e9chargement du WSDL et des m\u00e9tadonn\u00e9es associ\u00e9es\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\nT\u00e9l\u00e9chargement du document de m\u00e9tadonn\u00e9es de {0} vers {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties new file mode 100644 index 00000000000..da2372f9208 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_it.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=Uso: {0} [options] \n\nUsare "wsimport -help" per una descrizione dettagliata delle opzioni. + +wsimport.help=\nUso: {0} [options] \n\n\\dove [options] include:\n\ -b specifica i file di associazione jaxws/jaxb o gli schemi aggiuntivi\n\ (Ogni deve avere un proprio -b)\n\ -B passa questa opzione al compilatore dello schema JAXB\n\ -catalog specifica il file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\ -d specifica la posizione dei file di output generati\n\ -encoding specifica la codifica dei caratteri usata dai file di origine\n\ -extension consente le estensioni del fornitore - funzionalit\u00e0 non specificata\n\ dalla specifica. L''uso delle estensioni pu\u00f2\n\ produrre applicazioni non portatili o\n\ rendere impossibile l''interoperabilit\u00e0 con altre implementazioni\n\ -help visualizza la Guida\n\ -httpproxy:: specifica un server proxy HTTP (il valore predefinito della porta \u00e8 8080)\n\ -keep conserva i file generati\n\ -p specifica il package di destinazione\n\ -quiet elimina l''output wsimport\n\ -s specifica la posizione dei file di origine generati\n\ -target genera il codice come per la versione della specifica JAXWS fornita\n\ Il valore predefinito \u00e8 2.2. I valori accettati sono 2.0, 2.1 e 2.2\n\ ad esempio, 2.0 genera il codice conforme per la specifica JAXWS 2.0\n\ -verbose messaggi di output relativi alle azioni del compilatore\n\ -version stampa le informazioni sulla versione\n\ -wsdllocation valore @WebServiceClient.wsdlLocation\n\ -clientjar crea il file jar degli artifact generati insieme ai\n\ metadati WSDL richiesti per il richiamo del servizio Web.\n\ -generateJWS genera il file di implementazione JWS stub\n\ -implDestDir specifica la posizione in cui generare il file di implementazione JWS\n\ -implServiceName parte locale del nome di servizio per l''implementazione JWS generata\n\ -implPortName parte locale del nome di porta per l''implementazione JWS generata + +wsimport.usage.extensions=\n\\Estensioni:\n\ -XadditionalHeaders mappa le intestazioni non associate a un messaggio di richiesta o di risposta ai \n\ parametri del metodo Java\n\ -Xauthfile file per trasportare le informazioni di autorizzazione nel formato \n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug stampa le informazioni di debug\n\ -Xno-addressing-databinding abilita l'associazione di EndpointReferenceType W3C a Java\n\ -Xnocompile non compila i file Java generati\n\ -XdisableAuthenticator disabilita l'autenticatore usato da JAX-WS RI,\n\ l'opzione -Xauthfile viene ignorata, se impostata\n\ -XdisableSSLHostnameVerification disabilita la verifica del nome host SSL durante il recupero tramite DETCH dei\n\ wsdl + + +wsimport.usage.examples=\n\\Esempi:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n + +wsgen.usage=Uso: {0} [options] \n\nUsare "wsgen -help" per una descrizione dettagliata delle opzioni. + +wsgen.help=\nUso: {0} [options] \n\n\\dove [options] include:\n\ -classpath specifica dove trovare i file della classe di input\n\ -cp come per -classpath \n\ -d specifica la posizione dei file di output generati\n\ -encoding specifica la codifica dei caratteri usata dai file di origine\n\ -extension consente le estensioni del fornitore - funzionalit\u00e0 non specificata\n\ dalla specifica. L''uso delle estensioni pu\u00f2\n\ produrre applicazioni non portatili o\n\ rendere impossibile l''interoperabilit\u00e0 con altre implementazioni\n\ -help visualizza la Guida\n\ -keep conserva i file generati\n\ -r directory di destinazione delle risorse, specifica la\n\ posizione dei file delle risorse, ad esempio WSDL\n\ -s specifica la posizione dei file di origine generati\n\ -verbose messaggi di output relativi alle azioni del compilatore\n\ -version stampa le informazioni sulla versione\n\ -wsdl[:protocol] genera un file WSDL. Il protocollo \u00e8 opzionale.\n\ I protocolli validi sono {1},\n\ il valore predefinito \u00e8 soap1.1.\n\ I protocolli non standard {2}\n\ possono essere usati solo insieme\n\ all''opzione -extension.\n\ -inlineSchemas schemi in linea nel WSDL generato. Devono essere\n\ usati insieme all''opzione -wsdl.\n\ -servicename specifica il nome del servizio da usare nel WSDL generato\n\ Deve essere usato insieme all''opzione -wsdl.\n\ -portname specifica il nome della porta da usare nel WSDL generato\n\ Deve essere usato insieme all''opzione -wsdl. + + +wsgen.usage.examples=\n\\Esempi:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=\u00c8 in corso l''esecuzione su JDK6, fornito con l''API JAX-WS {0} ma questo strumento richiede l''API JAX-WS {1}. Usare il meccanismo Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) o impostare xendorsed="true" su <{2}>. + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=\u00c8 in corso il caricamento dell''API JAX-WS {0} da {1} ma questo strumento richiede l''API JAX-WS {2}. + +invoker.needEndorsed=\u00c8 in corso l''esecuzione su JDK6, fornito con l''API JAX-WS {0} ma questo strumento richiede l''API JAX-WS {1}. Usare il meccanismo Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) o usare l''opzione -Xendorsed. + + +# +# Generic Messages +# +wscompile.invalidOption=parametro non riconosciuto {0} +wsimport.noSuchJaxbOption=nessuna opzione JAXB: {0} + +wscompile.error=errore: {0} +wscompile.warning=avvertenza: {0} +wscompile.info=informazioni: {0} +wscompile.duplicateOption=opzione duplicata: {0} +wscompile.noSuchDirectory=directory non trovata: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=l''opzione \"{0}\" richiede un argomento +wscompile.compilationFailed=compilazione non riuscita. Gli errori dovrebbero essere stati segnalati. +wscompile.unsupportedEncoding=codifica non supportata: {0} + +wsimport.missingFile=WSDL_URI mancante + +wsgen.invalid.protocol=\"{0}\" non \u00e8 un protocollo supportato. I protocolli supportati includono: {1}. +wsgen.invalid.transport=\"{0}\" non \u00e8 un trasporto supportato. Il trasporto supportato include: {1}. +wsgen.class.not.found=Classe non trovata: \"{0}\" +wsgen.could.not.create.file="Impossibile creare il file: \"{0}\" +wsgen.missingFile=SEI mancante +wsgen.soap12.without.extension=Il protocollo opzionale \"Xsoap1.2\" deve essere usato insieme all'opzione \"-extension\". +wsgen.protocol.without.extension=Il protocollo opzionale \"{0}\" deve essere usato insieme all''opzione \"-extension\". +wsgen.wsdl.arg.no.genwsdl=L''opzione \"{0}\" pu\u00f2 essere usata solo insieme all''opzione \"-wsdl". +wsgen.servicename.missing.namespace=Spazio di nomi mancante nel nome di servizio \"{0}\". +wsgen.servicename.missing.localname=Nome locale mancante nel nome di servizio \"{0}\". +wsgen.portname.missing.namespace=Spazio di nomi mancante nel nome di porta \"{0}\". +wsgen.portname.missing.localname=Nome locale mancante nel nome di porta \"{0}\". +wsgen.class.must.be.implementation.class=La classe \"{0}\" non \u00e8 una classe di implementazione dell''endpoint. +wsimport.NotAFileNorURL = "{0}" non \u00e8 un nome file n\u00e9 un URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen non pu\u00f2 generare WSDL per un''associazione non SOAP: {0} sulla classe {1} + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen non pu\u00f2 generare WSDL per un''associazione SOAP 1.2: {0} sulla classe {1}.\n +Please specificare i parametri \"-extension\" e \"-wsdl:protocol XSoap1.2\". Ad esempio:\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" deve essere usato insieme all''opzione \"-wsdl\" + +wsgen.no.webservices.class=wsgen non ha trovato alcuna classe con l''annotazione @WebService. Specificare l''annotazione @WebService su {0}. + +wsimport.no.wsdl=Lettura del documento WSDL: {0} non riuscita perch\u00e9 1) non \u00e8 stato possibile trovare il documento; 2) non \u00e8 stato possibile leggere il documento; 3) l''elemento radice del documento non \u00e8 . + +wsimport.FailedToParse = Analisi di "{0}" non riuscita: {1} + +wsimport.ParsingWSDL=analisi di WSDL in corso...\n\n +wsimport.GeneratingCode=\nGenerazione del codice in corso...\n +wsimport.CompilingCode=\nCompilazione del codice in corso...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" non \u00e8 una versione di destinazione valida. Sono supportate le versioni "2.0" e "2.1". + +wsimport.ILLEGAL_AUTH_INFO = "{0}" non \u00e8 un formato di informazioni di autorizzazione valido. Il formato \u00e8 http[s]://user:password@host:port//. + +wsimport.readingAuthFile = Tentativo di lettura del file di autorizzazione: "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = File di autorizzazione "{0}" non trovato. Se l''accesso WSDL richiede l''autenticazione Basic, fornire il file di autorizzazione con accesso in lettura a {1} oppure usare -Xauthfile per fornire il file di autorizzazione e su ogni riga fornire le informazioni di autorizzazione usando il formato: http[s]://user:password@host:porta// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" richiede autorizzazione. Fornire il file di autorizzazione con accesso in lettura a {2} oppure usare -Xauthfile per fornire il file di autorizzazione e su ogni riga fornire le informazioni di autorizzazione usando il formato: http[s]://user:password@host:porta// + +wsimport.AUTH_INFO_LINENO = "riga {0} di {1} + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = Il server ha restituito il codice di stato HTTP: "{0}". Nuovo tentativo con "{1}" + +wsimport.maxRedirectAttempt = Impossibile ottenere un WSDL. Numero massimo di reindirizzamenti (5) raggiunto + +wsimport.wsdllocation.clientjar = Impossibile specificare wsdlLocation quando viene usata l'opzione clientJar +# {0} - path to a zip file +wsimport.archivingArtifacts=\nArchiviazione degli artifact generati in {0}.\n +wsimport.archiveArtifact=Aggiunta di {0} all''archivio {1} +wsimport.fetchingMetadata=\nScaricamento di WSDL e dei metadati associati\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\nScaricamento del documento dei metadati da {0} a {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties new file mode 100644 index 00000000000..009b193085f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ja.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=\u4f7f\u7528\u65b9\u6cd5: {0} [options] \n\n\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306b\u306f"wsimport -help"\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 + +wsimport.help=\n\u4f7f\u7528\u65b9\u6cd5: {0} [options] \n\n\\[options]\u306b\u306f\u6b21\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059:\n\ -b jaxws/jaxb\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u307e\u305f\u306f\u8ffd\u52a0\u30b9\u30ad\u30fc\u30de\u3092\u6307\u5b9a\u3059\u308b\n\ (\u5404\u306b\u306f\u305d\u308c\u305e\u308c-b\u304c\u5fc5\u8981)\n\ -B \u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092JAXB\u30b9\u30ad\u30fc\u30de\u30fb\u30b3\u30f3\u30d1\u30a4\u30e9\u306b\u6e21\u3059\n\ -catalog \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306e\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3059\u308b\n\ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML\u30ab\u30bf\u30ed\u30b0\u5f62\u5f0f\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3059\u3002\n\ -d \u751f\u6210\u6e08\u306e\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -encoding \u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3067\u4f7f\u7528\u3055\u308c\u308b\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3059\u308b\n\ -extension \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3059\u308b - \u6a5f\u80fd\u306f\u4ed5\u69d8\u3067\n\ \u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u62e1\u5f35\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\n\ \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30dd\u30fc\u30bf\u30d6\u30eb\u3067\u306a\u304f\u306a\u308b\u304b\u3001\n\ \u4ed6\u306e\u5b9f\u88c5\u3068\u306e\u76f8\u4e92\u904b\u7528\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\n\ -help \u30d8\u30eb\u30d7\u3092\u8868\u793a\u3059\u308b\n\ -httpproxy:: HTTP\u30d7\u30ed\u30ad\u30b7\u30fb\u30b5\u30fc\u30d0\u30fc\u3092\u6307\u5b9a\u3059\u308b(\u30dd\u30fc\u30c8\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306f8080)\n\ -keep \u751f\u6210\u6e08\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u6301\u3059\u308b\n\ -p \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3059\u308b\n\ -quiet wsimport\u51fa\u529b\u3092\u8868\u793a\u3057\u306a\u3044\n\ -s \u751f\u6210\u6e08\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -target \u6307\u5b9a\u306eJAXWS\u4ed5\u69d8\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5f93\u3063\u3066\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3059\u308b\n\ \u30c7\u30d5\u30a9\u30eb\u30c8\u306f2.2\u3067\u3042\u308a\u3001\u4f7f\u7528\u53ef\u80fd\u306a\u5024\u306f2.0\u30012.1\u304a\u3088\u30732.2\u3067\u3059\n\ \u305f\u3068\u3048\u30702.0\u3067\u306f\u3001JAXWS 2.0\u4ed5\u69d8\u306e\u6e96\u62e0\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\n\ -verbose \u30b3\u30f3\u30d1\u30a4\u30e9\u306e\u51e6\u7406\u5185\u5bb9\u306b\u95a2\u3059\u308b\u51fa\u529b\u30e1\u30c3\u30bb\u30fc\u30b8\n\ -version \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u5370\u5237\u3059\u308b\n\ -wsdllocation @WebServiceClient.wsdlLocation\u306e\u5024\n\ -clientjar \u751f\u6210\u6e08\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306eJAR\u30d5\u30a1\u30a4\u30eb\u3068\u3001\n\ Web\u30b5\u30fc\u30d3\u30b9\u306e\u547c\u51fa\u3057\u306b\u5fc5\u8981\u306aWSDL\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\n\ -generateJWS \u30b9\u30bf\u30d6\u5316\u3055\u308c\u305fJWS\u5b9f\u88c5\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\n\ -implDestDir JWS\u5b9f\u88c5\u30d5\u30a1\u30a4\u30eb\u306e\u751f\u6210\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -implServiceName \u751f\u6210\u6e08\u306eJWS\u5b9f\u88c5\u306e\u30b5\u30fc\u30d3\u30b9\u540d\u306e\u30ed\u30fc\u30ab\u30eb\u90e8\u5206\n\ -implPortName \u751f\u6210\u6e08\u306eJWS\u5b9f\u88c5\u306e\u30dd\u30fc\u30c8\u540d\u306e\u30ed\u30fc\u30ab\u30eb\u90e8\u5206 + +wsimport.usage.extensions=\n\\\u62e1\u5f35\u6a5f\u80fd:\n\ -XadditionalHeaders \u30ea\u30af\u30a8\u30b9\u30c8\u307e\u305f\u306f\u30ec\u30b9\u30dd\u30f3\u30b9\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u306b\u30d0\u30a4\u30f3\u30c9\u3055\u308c\u3066\u3044\u306a\u3044\u30d8\u30c3\u30c0\u30fc\u3092\n\ Java\u30e1\u30bd\u30c3\u30c9\u30fb\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u30de\u30c3\u30d7\n\ -Xauthfile \u6b21\u306e\u5f62\u5f0f\u306e\u8a8d\u8a3c\u60c5\u5831\u3092\u6301\u3064\u30d5\u30a1\u30a4\u30eb\n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug \u30c7\u30d0\u30c3\u30b0\u60c5\u5831\u3092\u5370\u5237\u3059\u308b\n\ -Xno-addressing-databinding W3C EndpointReferenceType\u306eJava\u3078\u306e\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u3092\u6709\u52b9\u5316\u3059\u308b\n\ -Xnocompile \u751f\u6210\u6e08\u306eJava\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u306a\u3044\n\ -XdisableAuthenticator JAX-WS RI\u3067\u4f7f\u7528\u3055\u308c\u308b\u8a8d\u8a3c\u3092\u7121\u52b9\u5316\u3059\u308b\n\ \u8a2d\u5b9a\u3057\u305f\u5834\u5408\u3001-Xauthfile\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u7121\u8996\u3055\u308c\u307e\u3059\n\ -XdisableSSLHostnameVerification WSDL\u306e\u30d5\u30a7\u30c3\u30c1\u4e2d\u306eSSL\u30db\u30b9\u30c8\u540d\u691c\u8a3c\u3092\n\ \u7121\u52b9\u5316\u3059\u308b + + +wsimport.usage.examples=\n\\\u4f8b:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n + +wsgen.usage=\u4f7f\u7528\u65b9\u6cd5: {0} [options] \n\n\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u8a73\u7d30\u306a\u8aac\u660e\u306b\u306f"wsgen -help"\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002 + +wsgen.help=\n\u4f7f\u7528\u65b9\u6cd5: {0} [options] \n\n\\[options]\u306b\u306f\u6b21\u306e\u3082\u306e\u304c\u3042\u308a\u307e\u3059:\n\ -classpath \u5165\u529b\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u691c\u7d22\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -cp -classpath \u3068\u540c\u3058\n\ -d \u751f\u6210\u6e08\u306e\u51fa\u529b\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -encoding \u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3067\u4f7f\u7528\u3055\u308c\u308b\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3059\u308b\n\ -extension \u30d9\u30f3\u30c0\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u8a31\u53ef\u3059\u308b - \u6a5f\u80fd\u306f\u4ed5\u69d8\u3067\n\ \u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u62e1\u5f35\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\n\ \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30dd\u30fc\u30bf\u30d6\u30eb\u3067\u306a\u304f\u306a\u308b\u304b\u3001\n\ \u4ed6\u306e\u5b9f\u88c5\u3068\u306e\u76f8\u4e92\u904b\u7528\u304c\u3067\u304d\u306a\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\n\ -help \u30d8\u30eb\u30d7\u3092\u8868\u793a\u3059\u308b\n\ -keep \u751f\u6210\u6e08\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u6301\u3059\u308b\n\ -r \u30ea\u30bd\u30fc\u30b9\u5b9b\u5148\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3002WSDL\u306a\u3069\u306e\u30ea\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\n\ \u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -s \u751f\u6210\u6e08\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u683c\u7d0d\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n\ -verbose \u30b3\u30f3\u30d1\u30a4\u30e9\u306e\u51e6\u7406\u5185\u5bb9\u306b\u95a2\u3059\u308b\u51fa\u529b\u30e1\u30c3\u30bb\u30fc\u30b8\n\ -version \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u5370\u5237\u3059\u308b\n\ -wsdl[:protocol] WSDL\u30d5\u30a1\u30a4\u30eb\u3092\u751f\u6210\u3059\u308b\u3002\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\n\ \u6709\u52b9\u306a\u30d7\u30ed\u30c8\u30b3\u30eb\u306f{1}\u3067\u3042\u308a\u3001\n\ \u30c7\u30d5\u30a9\u30eb\u30c8\u306fsoap1.1\u3067\u3059\u3002\n\ \u975e\u6a19\u6e96\u30d7\u30ed\u30c8\u30b3\u30eb{2}\n\ \u306f-extension\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u305f\u5834\u5408\u306e\u307f\n\ \u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\n\ -inlineSchemas \u751f\u6210\u6e08\u306eWSDL\u306e\u30a4\u30f3\u30e9\u30a4\u30f3\u30fb\u30b9\u30ad\u30fc\u30de\u3002-wsdl\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\n\ \u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\ -servicename \u751f\u6210\u6e08\u306eWSDL\u3067\u4f7f\u7528\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u540d\u3092\u6307\u5b9a\u3059\u308b\n\ -wsdl\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002\n\ -portname \u751f\u6210\u6e08\u306eWSDL\u3067\u4f7f\u7528\u3059\u308b\u30dd\u30fc\u30c8\u540d\u3092\u6307\u5b9a\u3059\u308b\n\ -wsdl\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002 + + +wsgen.usage.examples=\n\\\u4f8b:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=JAX-WS {0} API\u306b\u4ed8\u5c5e\u3057\u305fJDK6\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {1} API\u304c\u5fc5\u8981\u3067\u3059\u3002Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001<{2}>\u3067xendorsed="true"\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi={1}\u304b\u3089JAX-WS {0} API\u3092\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {2} API\u304c\u5fc5\u8981\u3067\u3059\u3002 + +invoker.needEndorsed=JAX-WS {0} API\u306b\u4ed8\u5c5e\u3057\u305fJDK6\u3067\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30c4\u30fc\u30eb\u306b\u306fJAX-WS {1} API\u304c\u5fc5\u8981\u3067\u3059\u3002Endorsed Standards Override Mechanism (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001-Xendorsed\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002 + + +# +# Generic Messages +# +wscompile.invalidOption=\u30d1\u30e9\u30e1\u30fc\u30bf{0}\u3092\u8a8d\u8b58\u3067\u304d\u307e\u305b\u3093 +wsimport.noSuchJaxbOption=\u305d\u306e\u3088\u3046\u306aJAXB\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3042\u308a\u307e\u305b\u3093: {0} + +wscompile.error=\u30a8\u30e9\u30fc: {0} +wscompile.warning=\u8b66\u544a: {0} +wscompile.info=\u60c5\u5831: {0} +wscompile.duplicateOption=\u91cd\u8907\u30aa\u30d7\u30b7\u30e7\u30f3: {0} +wscompile.noSuchDirectory=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u3042\u308a\u307e\u305b\u3093: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=\u30aa\u30d7\u30b7\u30e7\u30f3\"{0}\"\u306b\u306f\u5f15\u6570\u304c\u5fc5\u8981\u3067\u3059 +wscompile.compilationFailed=\u30b3\u30f3\u30d1\u30a4\u30eb\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002\u30a8\u30e9\u30fc\u306f\u5831\u544a\u3055\u308c\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059 +wscompile.unsupportedEncoding=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0: {0} + +wsimport.missingFile=WSDL_URI\u304c\u3042\u308a\u307e\u305b\u3093 + +wsgen.invalid.protocol=\"{0}\"\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30c8\u30b3\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30d7\u30ed\u30c8\u30b3\u30eb\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059: {1}\u3002 +wsgen.invalid.transport=\"{0}\"\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30c8\u30e9\u30f3\u30b9\u30dd\u30fc\u30c8\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059: {1}\u3002 +wsgen.class.not.found=\u30af\u30e9\u30b9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093: \"{0}\" +wsgen.could.not.create.file="\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f: "\\{0}\" +wsgen.missingFile=SEI\u304c\u3042\u308a\u307e\u305b\u3093 +wsgen.soap12.without.extension=\u30aa\u30d7\u30b7\u30e7\u30f3\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb\"Xsoap1.2\"\u306f\u3001\"-extension\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 +wsgen.protocol.without.extension=\u30aa\u30d7\u30b7\u30e7\u30f3\u30fb\u30d7\u30ed\u30c8\u30b3\u30eb\"{0}\"\u306f\u3001\"-extension\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002 +wsgen.wsdl.arg.no.genwsdl=\"{0}\"\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u3001"-wsdl"\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u307f\u3068\u7d44\u307f\u5408\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 +wsgen.servicename.missing.namespace=\u30b5\u30fc\u30d3\u30b9\u540d\"{0}\"\u306b\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002 +wsgen.servicename.missing.localname=\u30b5\u30fc\u30d3\u30b9\u540d\"{0}\"\u306b\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u3042\u308a\u307e\u305b\u3093\u3002 +wsgen.portname.missing.namespace=\u30dd\u30fc\u30c8\u540d\"{0}\"\u306b\u30cd\u30fc\u30e0\u30b9\u30da\u30fc\u30b9\u304c\u3042\u308a\u307e\u305b\u3093\u3002 +wsgen.portname.missing.localname=\u30dd\u30fc\u30c8\u540d\"{0}\"\u306b\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u3042\u308a\u307e\u305b\u3093\u3002 +wsgen.class.must.be.implementation.class=\u30af\u30e9\u30b9\"{0}\"\u306f\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u5b9f\u88c5\u30af\u30e9\u30b9\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002 +wsimport.NotAFileNorURL = "{0}"\u306f\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u3082URL\u3067\u3082\u3042\u308a\u307e\u305b\u3093 + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen\u3067\u306f\u3001\u30af\u30e9\u30b9{1}\u306e\u975eSOAP\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0: {0}\u306b\u3064\u3044\u3066WSDL\u3092\u751f\u6210\u3067\u304d\u307e\u305b\u3093 + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen\u3067\u306f\u3001\u30af\u30e9\u30b9: {1}\u306eSOAP 1.2\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0: {0}\u306b\u3064\u3044\u3066WSDL\u3092\u751f\u6210\u3067\u304d\u307e\u305b\u3093\u3002\n +Please \"-extension\"\u304a\u3088\u3073\"-wsdl:protocol XSoap1.2\"\u30b9\u30a4\u30c3\u30c1\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u4f8b:\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\"\u306f\u3001\"-wsdl\"\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u7d44\u307f\u5408\u305b\u3066\u4f7f\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059 + +wsgen.no.webservices.class=wsgen\u3067\u306f\u3001@WebService\u6ce8\u91c8\u304c\u4ed8\u3051\u3089\u308c\u305f\u30af\u30e9\u30b9\u304c\u691c\u51fa\u3055\u308c\u307e\u305b\u3093\u3067\u3057\u305f\u3002{0}\u3067@WebService\u6ce8\u91c8\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002 + +wsimport.no.wsdl=1)\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u30012)\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8aad\u307f\u53d6\u308c\u306a\u304b\u3063\u305f\u30013)\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u30eb\u30fc\u30c8\u8981\u7d20\u304c\u3067\u306f\u306a\u304b\u3063\u305f\u305f\u3081\u3001WSDL\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8{0}\u306e\u8aad\u53d6\u308a\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 + +wsimport.FailedToParse = "{0}"\u306e\u89e3\u6790\u306b\u5931\u6557\u3057\u307e\u3057\u305f: {1} + +wsimport.ParsingWSDL=WSDL\u3092\u89e3\u6790\u3057\u3066\u3044\u307e\u3059...\n\n +wsimport.GeneratingCode=\n\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059...\n +wsimport.CompilingCode=\n\u30b3\u30fc\u30c9\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u307e\u3059...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}"\u306f\u6709\u52b9\u306a\u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002"2.0"\u304a\u3088\u3073"2.1"\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 + +wsimport.ILLEGAL_AUTH_INFO = "{0}"\u306f\u6709\u52b9\u306a\u8a8d\u8a3c\u60c5\u5831\u5f62\u5f0f\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5f62\u5f0f\u306fhttp[s]://user:password@host:port//\u3067\u3059\u3002 + +wsimport.readingAuthFile = \u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u53d6\u308d\u3046\u3068\u3057\u3066\u3044\u307e\u3059: "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = \u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb"{0}"\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002WSDL\u30a2\u30af\u30bb\u30b9\u306b\u57fa\u672c\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3042\u308b\u5834\u5408\u3001{1}\u306b\u3042\u308b\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u53d6\u308a\u30a2\u30af\u30bb\u30b9\u306b\u3088\u308a\u6307\u5b9a\u3059\u308b\u304b\u3001-Xauthfile\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3001\u5404\u884c\u3067\u6b21\u306e\u5f62\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044: http[s]://user:password@host:port// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}\u3002"{1}"\u306b\u306f\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059\u3002{2}\u306b\u3042\u308b\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u53d6\u308a\u30a2\u30af\u30bb\u30b9\u306b\u3088\u308a\u6307\u5b9a\u3059\u308b\u304b\u3001-Xauthfile\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3001\u5404\u884c\u3067\u6b21\u306e\u5f62\u5f0f\u3092\u4f7f\u7528\u3057\u3066\u8a8d\u8a3c\u60c5\u5831\u3092\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044: http[s]://user:password@host:port// + +wsimport.AUTH_INFO_LINENO = "\u884c{0}/{1} + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = \u30b5\u30fc\u30d0\u30fc\u304cHTTP\u30b9\u30c6\u30fc\u30bf\u30b9\u30fb\u30b3\u30fc\u30c9: "{0}"\u3092\u8fd4\u3057\u307e\u3057\u305f\u3002"{1}"\u3067\u518d\u8a66\u884c\u3057\u3066\u3044\u307e\u3059 + +wsimport.maxRedirectAttempt = WSDL\u3092\u53d6\u5f97\u3067\u304d\u307e\u305b\u3093\u3002\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u306e\u6700\u5927\u56de\u6570(5)\u306b\u9054\u3057\u307e\u3057\u305f + +wsimport.wsdllocation.clientjar = clientJar\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u4f7f\u7528\u6642\u306fwsdlLocation\u3092\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093 +# {0} - path to a zip file +wsimport.archivingArtifacts=\n\u751f\u6210\u6e08\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u3092{0}\u306b\u30a2\u30fc\u30ab\u30a4\u30d6\u3057\u3066\u3044\u307e\u3059\u3002\n +wsimport.archiveArtifact={0}\u3092\u30a2\u30fc\u30ab\u30a4\u30d6{1}\u306b\u8ffd\u52a0\u3057\u3066\u3044\u307e\u3059 +wsimport.fetchingMetadata=\nWSDL\u304a\u3088\u3073\u95a2\u9023\u4ed8\u3051\u3089\u308c\u305f\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\n\u30e1\u30bf\u30c7\u30fc\u30bf\u30fb\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092{0}\u304b\u3089{1}\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3044\u307e\u3059 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties new file mode 100644 index 00000000000..23e9b1e236a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_ko.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=\uc0ac\uc6a9\ubc95: {0} [options] \n\n\uc635\uc158\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \uc124\uba85\uc744 \ubcf4\ub824\uba74 "wsimport -help"\ub97c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624. + +wsimport.help=\n\uc0ac\uc6a9\ubc95: {0} [options] \n\n\\\uc5ec\uae30\uc11c [options]\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n\ -b JAXWS/JAXB \ubc14\uc778\ub529 \ud30c\uc77c \ub610\ub294 \ucd94\uac00 \uc2a4\ud0a4\ub9c8\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \uac01 \uc5d0\ub294 \uace0\uc720\ud55c -b\uac00 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n\ -B JAXB \uc2a4\ud0a4\ub9c8 \ucef4\ud30c\uc77c\ub7ec\uc5d0 \uc774 \uc635\uc158\uc744 \uc804\ub2ec\ud569\ub2c8\ub2e4.\n\ -catalog \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\ -d \uc0dd\uc131\ub41c \ucd9c\ub825 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -encoding \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \uc0ac\uc6a9\ub418\ub294 \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -extension \uc0ac\uc591\uc73c\ub85c \uc9c0\uc815\ub418\uc9c0 \uc54a\uc740 \uae30\ub2a5\uc778 \uacf5\uae09\uc5c5\uccb4\n\ \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4. \ud655\uc7a5\uc744 \uc0ac\uc6a9\ud558\uba74\n\ \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc744 \uc774\ub3d9\ud558\uc9c0 \ubabb\ud558\uac70\ub098\n\ \ub2e4\ub978 \uad6c\ud604\uacfc\uc758 \uc0c1\ud638 \uc791\ub3d9\uc774 \ubd88\uac00\ub2a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\ -help \ub3c4\uc6c0\ub9d0\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ -httpproxy:: HTTP \ud504\ub85d\uc2dc \uc11c\ubc84\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4. \uae30\ubcf8\uc801\uc73c\ub85c \ud3ec\ud2b8\ub294 8080\uc73c\ub85c \uc124\uc815\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.\n\ -keep \uc0dd\uc131\ub41c \ud30c\uc77c\uc744 \ubcf4\uad00\ud569\ub2c8\ub2e4.\n\ -p \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -quiet wsimport \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ -s \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -target \uc81c\uacf5\ub41c JAXWS \uc0ac\uc591 \ubc84\uc804\uc5d0 \ub530\ub77c \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \uae30\ubcf8\uac12\uc740 2.2\ub85c \uc124\uc815\ub418\uc5b4 \uc788\uc73c\uba70 \ud5c8\uc6a9\ub418\ub294 \uac12\uc740 2.0, 2.1 \ubc0f 2.2\uc785\ub2c8\ub2e4.\n\ \uc608\ub97c \ub4e4\uc5b4, 2.0\uc744 \uc9c0\uc815\ud558\uba74 JAXWS 2.0 \uc0ac\uc591\uc5d0 \ub300\ud574 \ud638\ud658\ub418\ub294 \ucf54\ub4dc\uac00 \uc0dd\uc131\ub429\ub2c8\ub2e4.\n\ -verbose \ucef4\ud30c\uc77c\ub7ec\uac00 \uc218\ud589 \uc911\uc778 \uc791\uc5c5\uc5d0 \ub300\ud55c \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.\n\ -version \ubc84\uc804 \uc815\ubcf4\ub97c \uc778\uc1c4\ud569\ub2c8\ub2e4.\n\ -wsdllocation @WebServiceClient.wsdlLocation \uac12\uc785\ub2c8\ub2e4.\n\ -clientjar \uc6f9 \uc11c\ube44\uc2a4 \ud638\ucd9c\uc5d0 \ud544\uc694\ud55c WSDL \uba54\ud0c0 \ub370\uc774\ud130\uc640 \ud568\uaed8\n\ \uc0dd\uc131\ub41c \uc544\ud2f0\ud329\ud2b8\uc758 jar \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ -generateJWS Stub\ub41c JWS \uad6c\ud604 \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ -implDestDir JWS \uad6c\ud604 \ud30c\uc77c\uc744 \uc0dd\uc131\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -implServiceName \uc0dd\uc131\ub41c JWS \uad6c\ud604\uc5d0 \ub300\ud55c \uc11c\ube44\uc2a4 \uc774\ub984\uc758 \ub85c\uceec \ubd80\ubd84\uc785\ub2c8\ub2e4.\n\ -implPortName \uc0dd\uc131\ub41c JWS \uad6c\ud604\uc5d0 \ub300\ud55c \ud3ec\ud2b8 \uc774\ub984\uc758 \ub85c\uceec \ubd80\ubd84\uc785\ub2c8\ub2e4. + +wsimport.usage.extensions=\n\\\ud655\uc7a5:\n\ -XadditionalHeaders \uc694\uccad \ub610\ub294 \uc751\ub2f5 \uba54\uc2dc\uc9c0\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \ud5e4\ub354\ub97c \n\ Java \uba54\uc18c\ub4dc \ub9e4\uac1c\ubcc0\uc218\uc5d0 \ub9e4\ud551\ud569\ub2c8\ub2e4.\n\ -Xauthfile http://username:password@example.org/stock?wsdl \n\ \ud615\uc2dd\uc73c\ub85c \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4\ub97c \uc804\ub2ec\ud560 \ud30c\uc77c\uc785\ub2c8\ub2e4.\n\ -Xdebug \ub514\ubc84\uadf8 \uc815\ubcf4\ub97c \uc778\uc1c4\ud569\ub2c8\ub2e4.\n\ -Xno-addressing-databinding W3C EndpointReferenceType\uacfc Java \uac04\uc758 \ubc14\uc778\ub529\uc744 \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\ -Xnocompile \uc0dd\uc131\ub41c Java \ud30c\uc77c\uc744 \ucef4\ud30c\uc77c\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ -XdisableAuthenticator JAX-WS RI\uc5d0 \uc0ac\uc6a9\ub418\ub294 \uc778\uc99d\uc790\ub97c \uc0ac\uc6a9 \uc548\ud568\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\ \uc124\uc815\ub41c \uacbd\uc6b0 -Xauthfile \uc635\uc158\uc774 \ubb34\uc2dc\ub429\ub2c8\ub2e4.\n\ -XdisableSSLHostnameVerification WSDL\uc744 \uc778\ucd9c\ud558\ub294 \ub3d9\uc548 SSL \ud638\uc2a4\ud2b8 \uc774\ub984 \ud655\uc778\uc744\n\ \uc0ac\uc6a9 \uc548\ud568\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. + + +wsimport.usage.examples=\n\\\uc608:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n + +wsgen.usage=\uc0ac\uc6a9\ubc95: {0} [options] \n\n\uc635\uc158\uc5d0 \ub300\ud55c \uc790\uc138\ud55c \uc124\uba85\uc744 \ubcf4\ub824\uba74 "wsgen -help"\ub97c \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624. + +wsgen.help=\n\uc0ac\uc6a9\ubc95: {0} [options] \n\n\\\uc5ec\uae30\uc11c [options]\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n\ -classpath \uc785\ub825 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -cp -classpath \uc640 \ub3d9\uc77c\ud569\ub2c8\ub2e4.\n\ -d \uc0dd\uc131\ub41c \ucd9c\ub825 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -encoding \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \uc0ac\uc6a9\ub418\ub294 \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -extension \uc0ac\uc591\uc73c\ub85c \uc9c0\uc815\ub418\uc9c0 \uc54a\uc740 \uae30\ub2a5\uc778 \uacf5\uae09\uc5c5\uccb4\n\ \ud655\uc7a5\uc744 \ud5c8\uc6a9\ud569\ub2c8\ub2e4. \ud655\uc7a5\uc744 \uc0ac\uc6a9\ud558\uba74\n\ \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8\uc744 \uc774\ub3d9\ud558\uc9c0 \ubabb\ud558\uac70\ub098\n\ \ub2e4\ub978 \uad6c\ud604\uacfc\uc758 \uc0c1\ud638 \uc791\ub3d9\uc774 \ubd88\uac00\ub2a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\ -help \ub3c4\uc6c0\ub9d0\uc744 \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ -keep \uc0dd\uc131\ub41c \ud30c\uc77c\uc744 \ubcf4\uad00\ud569\ub2c8\ub2e4.\n\ -r \ub9ac\uc18c\uc2a4 \ub300\uc0c1 \ub514\ub809\ud1a0\ub9ac\ub85c, \ub9ac\uc18c\uc2a4 \ud30c\uc77c(\uc608: WSDL)\uc744\n\ \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -s \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc744 \ubc30\uce58\ud560 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -verbose \ucef4\ud30c\uc77c\ub7ec\uac00 \uc218\ud589 \uc911\uc778 \uc791\uc5c5\uc5d0 \ub300\ud55c \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.\n\ -version \ubc84\uc804 \uc815\ubcf4\ub97c \uc778\uc1c4\ud569\ub2c8\ub2e4.\n\ -wsdl[:protocol] WSDL \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. protocol\uc740 \uc120\ud0dd \uc0ac\ud56d\uc785\ub2c8\ub2e4.\n\ \uc801\ud569\ud55c \ud504\ub85c\ud1a0\ucf5c\uc740 {1}\uc774\uba70\n\ \uae30\ubcf8\uac12\uc740 soap1.1\uc785\ub2c8\ub2e4.\n\ \ube44\ud45c\uc900 \ud504\ub85c\ud1a0\ucf5c {2}\uc740(\ub294)\n\ -extension \uc635\uc158\uacfc \ud568\uaed8\ub9cc\n\ \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\ -inlineSchemas \uc0dd\uc131\ub41c WSDL\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uc778\ub77c\uc778\ud569\ub2c8\ub2e4.\n\ -wsdl \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4.\n\ -servicename \uc0dd\uc131\ub41c WSDL\uc5d0 \uc0ac\uc6a9\ud560 \uc11c\ube44\uc2a4 \uc774\ub984\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -wsdl \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.\n\ -portname \uc0dd\uc131\ub41c WSDL\uc5d0 \uc0ac\uc6a9\ud560 \ud3ec\ud2b8 \uc774\ub984\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ -wsdl \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ub429\ub2c8\ub2e4. + + +wsgen.usage.examples=\n\\\uc608:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=JAX-WS {0} API\uc640 \ud568\uaed8 \uc81c\uacf5\ub418\ub294 JDK6\uc5d0\uc11c \uc2e4\ud589\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {1} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc778\uc99d\ub41c \ud45c\uc900 \ubb34\ud6a8\ud654 \ubc29\uc2dd(http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\uc744 \uc0ac\uc6a9\ud558\uac70\ub098 <{2}>\uc5d0 \ub300\ud574 xendorsed="true"\ub97c \uc124\uc815\ud558\uc2ed\uc2dc\uc624. + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi={1}\uc5d0\uc11c JAX-WS {0} API\ub97c \ub85c\ub4dc\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {2} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. + +invoker.needEndorsed=JAX-WS {0} API\uc640 \ud568\uaed8 \uc81c\uacf5\ub418\ub294 JDK6\uc5d0\uc11c \uc2e4\ud589\ud558\uace0 \uc788\uc9c0\ub9cc \uc774 \ud234\uc744 \uc0ac\uc6a9\ud558\ub824\uba74 JAX-WS {1} API\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc778\uc99d\ub41c \ud45c\uc900 \ubb34\ud6a8\ud654 \ubc29\uc2dd(http://docs.oracle.com/javase/6/docs/technotes/guides/standards/)\uc744 \uc0ac\uc6a9\ud558\uac70\ub098 -Xendorsed \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc2ed\uc2dc\uc624. + + +# +# Generic Messages +# +wscompile.invalidOption={0}\uc740(\ub294) \uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ub9e4\uac1c\ubcc0\uc218\uc785\ub2c8\ub2e4. +wsimport.noSuchJaxbOption=\ud574\ub2f9 JAXB \uc635\uc158 \uc5c6\uc74c: {0} + +wscompile.error=\uc624\ub958: {0} +wscompile.warning=\uacbd\uace0: {0} +wscompile.info=\uc815\ubcf4: {0} +wscompile.duplicateOption=\uc911\ubcf5 \uc635\uc158: {0} +wscompile.noSuchDirectory=\ub514\ub809\ud1a0\ub9ac\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc74c: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=\"{0}\" \uc635\uc158\uc5d0 \uc778\uc218\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. +wscompile.compilationFailed=\ucef4\ud30c\uc77c\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. \uc624\ub958\ub97c \ubcf4\uace0\ud574\uc57c \ud569\ub2c8\ub2e4. +wscompile.unsupportedEncoding=\uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529: {0} + +wsimport.missingFile=WSDL_URI\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. + +wsgen.invalid.protocol=\"{0}\"\uc740(\ub294) \uc9c0\uc6d0\ub418\ub294 \ud504\ub85c\ud1a0\ucf5c\uc774 \uc544\ub2d9\ub2c8\ub2e4. \uc9c0\uc6d0\ub418\ub294 \ud504\ub85c\ud1a0\ucf5c: {1}. +wsgen.invalid.transport=\"{0}\"\uc740(\ub294) \uc9c0\uc6d0\ub418\ub294 \uc804\uc1a1\uc774 \uc544\ub2d9\ub2c8\ub2e4. \uc9c0\uc6d0\ub418\ub294 \uc804\uc1a1: {1}. +wsgen.class.not.found=\ud074\ub798\uc2a4\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc74c: \"{0}\" +wsgen.could.not.create.file=\ud30c\uc77c\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc74c: \"{0}\" +wsgen.missingFile=SEI\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. +wsgen.soap12.without.extension=\uc120\ud0dd\uc801 \ud504\ub85c\ud1a0\ucf5c \"Xsoap1.2\"\ub294 \"-extension\" \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. +wsgen.protocol.without.extension=\uc120\ud0dd\uc801 \ud504\ub85c\ud1a0\ucf5c \"{0}\"\uc740(\ub294) \"-extension\" \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. +wsgen.wsdl.arg.no.genwsdl=\"{0}\" \uc635\uc158\uc740 "-wsdl" \uc635\uc158\uacfc \ud568\uaed8\ub9cc \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. +wsgen.servicename.missing.namespace=\uc11c\ube44\uc2a4 \uc774\ub984 \"{0}\"\uc5d0 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. +wsgen.servicename.missing.localname=\uc11c\ube44\uc2a4 \uc774\ub984 \"{0}\"\uc5d0 \ub85c\uceec \uc774\ub984\uc774 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. +wsgen.portname.missing.namespace=\ud3ec\ud2b8 \uc774\ub984 \"{0}\"\uc5d0 \ub124\uc784\uc2a4\ud398\uc774\uc2a4\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. +wsgen.portname.missing.localname=\ud3ec\ud2b8 \uc774\ub984 \"{0}\"\uc5d0 \ub85c\uceec \uc774\ub984\uc774 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. +wsgen.class.must.be.implementation.class=\"{0}\" \ud074\ub798\uc2a4\ub294 \ub05d\uc810 \uad6c\ud604 \ud074\ub798\uc2a4\uac00 \uc544\ub2d9\ub2c8\ub2e4. +wsimport.NotAFileNorURL = "{0}"\uc740(\ub294) \ud30c\uc77c \uc774\ub984 \ub610\ub294 URL\uc774 \uc544\ub2d9\ub2c8\ub2e4. + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen\uc740 {1} \ud074\ub798\uc2a4\uc758 \ube44SOAP \ubc14\uc778\ub529 {0}\uc5d0 \ub300\ud574 WSDL\uc744 \uc0dd\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen\uc740 {1} \ud074\ub798\uc2a4\uc758 SOAP 1.2 \ubc14\uc778\ub529 {0}\uc5d0 \ub300\ud574 WSDL\uc744 \uc0dd\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n +Please \"-extension\" \ubc0f \"-wsdl:protocol XSoap1.2\" \uc2a4\uc704\uce58\ub97c \uc9c0\uc815\ud558\uc2ed\uc2dc\uc624. \uc608:\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\"\ub294 \"-wsdl\" \uc635\uc158\uacfc \ud568\uaed8 \uc0ac\uc6a9\ud574\uc57c \ud569\ub2c8\ub2e4. + +wsgen.no.webservices.class=wsgen\uc740 @WebService \uc8fc\uc11d\uc774 \uc788\ub294 \ud074\ub798\uc2a4\ub97c \ucc3e\uc9c0 \ubabb\ud588\uc2b5\ub2c8\ub2e4. {0}\uc5d0\uc11c @WebService \uc8fc\uc11d\uc744 \uc9c0\uc815\ud558\uc2ed\uc2dc\uc624. + +wsimport.no.wsdl=WSDL \ubb38\uc11c \uc77d\uae30 \uc2e4\ud328: {0}. \uc6d0\uc778: 1) \ubb38\uc11c\ub97c \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. 2) \ubb38\uc11c\ub97c \uc77d\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. 3) \ubb38\uc11c\uc758 \ub8e8\ud2b8 \uc694\uc18c\uac00 \uac00 \uc544\ub2d9\ub2c8\ub2e4. + +wsimport.FailedToParse = "{0}"\uc758 \uad6c\ubb38 \ubd84\uc11d \uc2e4\ud328: {1} + +wsimport.ParsingWSDL=WSDL\uc758 \uad6c\ubb38\uc744 \ubd84\uc11d\ud558\ub294 \uc911...\n\n +wsimport.GeneratingCode=\n\ucf54\ub4dc\ub97c \uc0dd\uc131\ud558\ub294 \uc911...\n +wsimport.CompilingCode=\n\ucf54\ub4dc\ub97c \ucef4\ud30c\uc77c\ud558\ub294 \uc911...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ub300\uc0c1 \ubc84\uc804\uc774 \uc544\ub2d9\ub2c8\ub2e4. "2.0" \ubc0f "2.1"\uc774 \uc9c0\uc6d0\ub429\ub2c8\ub2e4. + +wsimport.ILLEGAL_AUTH_INFO = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4 \ud615\uc2dd\uc774 \uc544\ub2d9\ub2c8\ub2e4. \ud615\uc2dd\uc740 http[s]://user:password@host:port//\uc785\ub2c8\ub2e4. + +wsimport.readingAuthFile = \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc744 \uc77d\uc73c\ub824\uace0 \uc2dc\ub3c4\ud558\ub294 \uc911: "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c "{0}"\uc744(\ub97c) \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. WSDL \uc561\uc138\uc2a4\uc5d0 \uae30\ubcf8 \uc778\uc99d\uc774 \ud544\uc694\ud560 \uacbd\uc6b0 {1}\uc5d0\uc11c \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc5d0 \uc77d\uae30 \uc561\uc138\uc2a4 \uad8c\ud55c\uc744 \uc81c\uacf5\ud558\uac70\ub098 -Xauthfile\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc744 \uc81c\uacf5\ud558\uace0 \uac01 \ud589\uc5d0\uc11c http[s]://user:password@host:port// \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4\ub97c \uc81c\uacf5\ud558\uc2ed\uc2dc\uc624. + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}"\uc5d0 \uad8c\ud55c \ubd80\uc5ec\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. {2}\uc5d0\uc11c \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc5d0 \uc77d\uae30 \uc561\uc138\uc2a4 \uad8c\ud55c\uc744 \uc81c\uacf5\ud558\uac70\ub098 -Xauthfile\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \ud30c\uc77c\uc744 \uc81c\uacf5\ud558\uace0 \uac01 \ud589\uc5d0\uc11c http[s]://user:password@host:port// \ud615\uc2dd\uc744 \uc0ac\uc6a9\ud558\uc5ec \uad8c\ud55c \ubd80\uc5ec \uc815\ubcf4\ub97c \uc81c\uacf5\ud558\uc2ed\uc2dc\uc624. + +wsimport.AUTH_INFO_LINENO = {1}\uc758 {0}\ud589 + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = \uc11c\ubc84\uac00 HTTP \uc0c1\ud0dc \ucf54\ub4dc "{0}"\uc744(\ub97c) \ubc18\ud658\ud588\uc2b5\ub2c8\ub2e4. "{1}"\uc744(\ub97c) \uc0ac\uc6a9\ud558\uc5ec \uc7ac\uc2dc\ub3c4\ud558\ub294 \uc911 + +wsimport.maxRedirectAttempt = WSDL\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc74c - \ucd5c\ub300 \uc7ac\uc9c0\uc815 \uc218(5)\uc5d0 \ub3c4\ub2ec\ud588\uc2b5\ub2c8\ub2e4. + +wsimport.wsdllocation.clientjar = clientJar \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0 wsdlLocation\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. +# {0} - path to a zip file +wsimport.archivingArtifacts=\n\uc0dd\uc131\ub41c \uc544\ud2f0\ud329\ud2b8\ub97c {0}(\uc73c)\ub85c \uc544\uce74\uc774\ube0c\ud558\ub294 \uc911\uc785\ub2c8\ub2e4.\n +wsimport.archiveArtifact={1} \uc544\uce74\uc774\ube0c\uc5d0 {0}\uc744(\ub97c) \ucd94\uac00\ud558\ub294 \uc911 +wsimport.fetchingMetadata=\nWSDL \ubc0f \uc5f0\uad00\ub41c \uba54\ud0c0 \ub370\uc774\ud130\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\ub294 \uc911\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\n{0}\uc5d0\uc11c {1}(\uc73c)\ub85c \uba54\ud0c0 \ub370\uc774\ud130 \ubb38\uc11c\ub97c \ub2e4\uc6b4\ub85c\ub4dc\ud558\ub294 \uc911 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties new file mode 100644 index 00000000000..0a4c41e5f2c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_pt_BR.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=Uso: {0} [options] \n\nUse "wsimport -help" para obter uma descri\u00e7\u00e3o detalhada das op\u00e7\u00f5es. + +wsimport.help=\nUso: {0} [options] \n\n\\onde [options] inclui:\n\\ -b especifica os arquivos de bind jaxws/jaxb ou esquemas adicionais\n\\ (Cada deve ter seu pr\u00f3prio -b)\n\\ -B Passe esta op\u00e7\u00e3o para o compilador do esquema JAXB\n\\ -catalog especifique o arquivo do cat\u00e1logo para resolver as refer\u00eancias da entidade externa\n\\ suporta o formato do Cat\u00e1logo TR9401, XCatalog e OASIS XML.\n\\ -d especifica onde colocar os arquivos de sa\u00edda gerados\n\\ -encoding especifica a codifica\u00e7\u00e3o de caracteres usada pelos arquivos de origem\n\\ -extension permite extens\u00f5es do fornecedor - funcionalidade n\u00e3o especificada\n\\ pela especifica\u00e7\u00e3o. O uso das extens\u00f5es pode\n\\ resultar em aplica\u00e7\u00f5es que n\u00e3o s\u00e3o port\u00e1veis ou\n\\ n\u00e3o pode interoperar com outras implementa\u00e7\u00f5es\n\\ -help display help\n\\ -httpproxy:: especifica um servidor proxy HTTP (a porta \u00e9 definida como default para 8080)\n\\ -keep mant\u00e9m arquivos gerados\n\\ -p especifica o pacote do alvo\n\\ -quiet suprime a sa\u00edda wsimport\n\\ -s especifica onde colocar os arquivos de origem gerados\n\\ -target gera c\u00f3digos conforme vers\u00e3o de especifica\u00e7\u00e3o JAXWS fornecida\n\\ \u00c9 definido como default para 2.2. Os valores aceitos s\u00e3o 2.0, 2.1 e 2.2\n\\ por exemplo 2.0 ir\u00e1 gerar o c\u00f3digo compat\u00edvel para a especifica\u00e7\u00e3o JAXWS 2.0\n\\ -verbose as mensagens de sa\u00edda sobre o que o compilador est\u00e1 fazendo\n\\ -version imprime as informa\u00e7\u00f5es da vers\u00e3o\n\n\\ -wsdllocation @WebServiceClient.wsdlLocation value\n\\ -clientjar Cria o arquivo jar dos artefatos gerados junto com os\n\\ metadados WSDL necess\u00e1rios para chamar o web service.\n\\ -generateJWS gera arquivo de implementa\u00e7\u00e3o JWS com stub\n\\ -implDestDir especifica onde gerar o arquivo de implementa\u00e7\u00e3o de JWS\n\\ -implServiceName parte do local do nome de servi\u00e7o para implementa\u00e7\u00e3o JWS gerada\n\\ -implPortName parte do local do nome da porta para implementa\u00e7\u00e3o de JWS gerada + +wsimport.usage.extensions=\n\\Extens\u00f5es:\n\\ -XadditionalHeaders mapeia cabe\u00e7alhos n\u00e3o vinculados para mensagem de solicita\u00e7\u00e3o ou resposta para \n\\ par\u00e2metros do m\u00e9todo Java\n\\ -Xauthfile arquivo para transmitir informa\u00e7\u00f5es de autoriza\u00e7\u00e3o no formato \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug imprime informa\u00e7\u00f5es de depura\u00e7\u00e3o\n\\ -Xno-addressing-databinding permite bind de W3C EndpointReferenceType para Java\n\\ -Xnocompile n\u00e3o compilar arquivos Java gerados\n\\ -XdisableAuthenticator desativar Autenticador usado por JAX-WS RI,\n\\ a op\u00e7\u00e3o -Xauthfile ser\u00e1 ignorada, se definida\n\\ -XdisableSSLHostnameVerification desativa a verifica\u00e7\u00e3o de Nome do host de SSL ao extrair\n\\ wsdls + + +wsimport.usage.examples=\n\\Exemplos:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d gerou http://example.org/stock?wsdl\n + +wsgen.usage=Uso: {0} [options] \n\nUse "wsgen -help" para obter uma descri\u00e7\u00e3o detalhada das op\u00e7\u00f5es. + +wsgen.help=\nUso: {0} [options] \n\n\\onde [options] inclui:\n\\ -classpath especifica onde localizar os arquivos de classe de entrada\n\\ -cp igual a -classpath \n\\ -d especifica onde colocar os arquivos de sa\u00edda gerados\n\\ -encoding especifica a codifica\u00e7\u00e3o de caracteres usada pelos arquivos de origem\n\\ -extension permite as extens\u00f5es do fornecedor - funcionalidade n\u00e3o especificada\n\\ pela especifica\u00e7\u00e3o. O uso das extens\u00f5es pode\n\\ resultar em aplica\u00e7\u00f5es que n\u00e3o s\u00e3o port\u00e1veis ou\n\\ n\u00e3o pode interoperar com outras implementa\u00e7\u00f5es\n\\ -help exibe ajuda\n\\ -keep mant\u00e9m arquivos gerados\n\\ -r diret\u00f3rio de destino do recurso, especifica onde\n\\ colocar arquivos de recursos, como WSDLs\n\\ -s especifica onde colocar os arquivos de origem gerados\n\\ -verbose mensagens de sa\u00edda sobre o que o compilador est\u00e1 fazendo\n\\ -version imprime informa\u00e7\u00f5es da vers\u00e3o\n\\ -wsdl[:protocol] gera um arquivo WSDL. O protocolo \u00e9 opcional.\n\\ Os protocolos v\u00e1lidos s\u00e3o {1},\n\\ o default \u00e9 soap1.1.\n\\ Os protocolos n\u00e3o padr\u00e3o {2}\n\\ s\u00f3 podem ser usados junto com a\n\\ op\u00e7\u00e3o -extension.\n\\ -inlineSchemas os esquemas em linha no wsdl gerado. Devem ser\n\\ usados junto com a op\u00e7\u00e3o -wsdl.\n\\ -servicename especifica o nome do Servi\u00e7o a ser usado no WSDL gerado\n\\ Usado junto com a op\u00e7\u00e3o -wsdl.\n\\ -portname especifica o nome da Porta a ser usado no WSDL gerado\n\\ Usado junto com a op\u00e7\u00e3o -wsdl. + + +wsgen.usage.examples=\n\\Exemplos:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=Voc\u00ea est\u00e1 executando no JDK6 que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1}. Use o mecanismo de substitui\u00e7\u00e3o de padr\u00f5es endossados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/) ou defina xendorsed="true" em <{2}>. + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=Voc\u00ea est\u00e1 carregando a API de JAX-WS {0} de {1}, mas esta ferramenta requer a API de JAX-WS {2}. + +invoker.needEndorsed=Voc\u00ea est\u00e1 executando no JDK6 que vem com a API de JAX-WS {0}, mas esta ferramenta exige a API de JAX-WS {1}. Use o mecanismo de substitui\u00e7\u00e3o de padr\u00f5es endossados (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), ou use a op\u00e7\u00e3o -Xendorsed. + + +# +# Generic Messages +# +wscompile.invalidOption=par\u00e2metro {0} n\u00e3o reconhecido +wsimport.noSuchJaxbOption=nenhuma op\u00e7\u00e3o do JAXB: {0} + +wscompile.error=erro: {0} +wscompile.warning=advert\u00eancia: {0} +wscompile.info=informa\u00e7\u00f5es: {0} +wscompile.duplicateOption=op\u00e7\u00e3o: {0} duplicada +wscompile.noSuchDirectory=diret\u00f3rio n\u00e3o encontrado: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=a op\u00e7\u00e3o \"{0}\" requer um argumento +wscompile.compilationFailed=falha na compila\u00e7\u00e3o, os erros foram reportados +wscompile.unsupportedEncoding=codifica\u00e7\u00e3o n\u00e3o suportada: {0} + +wsimport.missingFile=WSDL_URI n\u00e3o encontrado + +wsgen.invalid.protocol=\"{0}\" n\u00e3o \u00e9 um protocolo suportado. Os protocolos suportados s\u00e3o: {1}. +wsgen.invalid.transport=\"{0}\" n\u00e3o \u00e9 um transporte suportado. Os transportes suportados s\u00e3o: {1}. +wsgen.class.not.found=Classe n\u00e3o encontrada: \"{0}\" +wsgen.could.not.create.file=N\u00e3o foi poss\u00edvel criar o arquivo: "\\{0}\" +wsgen.missingFile=SEI N\u00e3o Encontrado +wsgen.soap12.without.extension=O protocolo \"Xsoap1.2\" opcional deve ser usado junto com a op\u00e7\u00e3o \"-extension\". +wsgen.protocol.without.extension=O protocolo \"{0}\" opcional deve ser usado junto com a op\u00e7\u00e3o \"-extension\". +wsgen.wsdl.arg.no.genwsdl=A op\u00e7\u00e3o \"{0}\" s\u00f3 pode ser usada junto com a op\u00e7\u00e3o "-wsdl". +wsgen.servicename.missing.namespace=O nome do servi\u00e7o \"{0}\" n\u00e3o encontrou um namespace. +wsgen.servicename.missing.localname=O nome do servi\u00e7o \"{0}\" n\u00e3o encontrou um localname. +wsgen.portname.missing.namespace=O nome da porta \"{0}\" n\u00e3o encontrou um namespace. +wsgen.portname.missing.localname=O nome da porta \"{0}\" n\u00e3o encontrou um localname. +wsgen.class.must.be.implementation.class=A classe \"{0}\" n\u00e3o \u00e9 uma classe de implementa\u00e7\u00e3o de ponto final. +wsimport.NotAFileNorURL = "{0}" n\u00e3o \u00e9 um nome de arquivo nem um URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen n\u00e3o pode gerar WSDL para bind n\u00e3o-SOAP: {0} na Classe {1} + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen n\u00e3o pode gerar WSDL para bind de SOAP 1.2: {0} na classe: {1}.\n +Please especifique as chaves \"-extension\" e \"-wsdl:protocol XSoap1.2\". Por exemplo:\n\n +wsgen -wsdl:protocol XSoap1.2 -extension {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" deve ser usado junto com a op\u00e7\u00e3o \"-wsdl\" + +wsgen.no.webservices.class=wsgen n\u00e3o encontrou nenhuma classe com a anota\u00e7\u00e3o @WebService. Especifique a anota\u00e7\u00e3o @WebService em {0}. + +wsimport.no.wsdl=Falha ao ler o documento WSDL: {0}, porque 1) n\u00e3o p\u00f4de localizar o documento; /2) o documento n\u00e3o p\u00f4de ser lido; 3) o elemento-raiz do documento n\u00e3o \u00e9 . + +wsimport.FailedToParse = Falha ao fazer parse "{0}": {1} + +wsimport.ParsingWSDL=fazendo parse do WSDL...\n\n +wsimport.GeneratingCode=\nGerando o c\u00f3digo...\n +wsimport.CompilingCode=\nCompilando o c\u00f3digo...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" n\u00e3o \u00e9 uma vers\u00e3o do alvo v\u00e1lida. "2.0" e "2.1" s\u00e3o suportadas. + +wsimport.ILLEGAL_AUTH_INFO = "{0}" n\u00e3o est\u00e1 no formato de informa\u00e7\u00f5es de autoriza\u00e7\u00e3o v\u00e1lido. O formato \u00e9 http[s]://user:password@host:port//. + +wsimport.readingAuthFile = Tentando ler o arquivo de autoriza\u00e7\u00e3o : "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = Arquivo de autoriza\u00e7\u00e3o "{0}" n\u00e3o encontrado. Se o acesso do WSDL precisar da Autentica\u00e7\u00e3o B\u00e1sica, forne\u00e7a o arquivo de autoriza\u00e7\u00e3o com o acesso de leitura em {1} ou use -Xauthfile para fornecer o arquivo de autoriza\u00e7\u00e3o em cada linha para fornecer informa\u00e7\u00f5es de autoriza\u00e7\u00e3o usando este formato : http[s]://user:password@host:port// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" precisa de autoriza\u00e7\u00e3o; forne\u00e7a o arquivo de autoriza\u00e7\u00e3o com o acesso de leitura em {2} ou use -Xauthfile para fornecer o arquivo de autoriza\u00e7\u00e3o em cada linha para fornecer informa\u00e7\u00f5es de autoriza\u00e7\u00e3o usando este formato : http[s]://user:password@host:port// + +wsimport.AUTH_INFO_LINENO = "linha {0} de {1} + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = O servidor retornou o c\u00f3digo de Status HTTP: "{0}", recuperando com "{1}" + +wsimport.maxRedirectAttempt = N\u00e3o \u00e9 poss\u00edvel obter um WSDL - n\u00famero m\u00e1ximo de (5) redirecionamentos atingido. + +wsimport.wsdllocation.clientjar = wsdlLocation n\u00e3o pode ser especificado ao usar a op\u00e7\u00e3o clientJar +# {0} - path to a zip file +wsimport.archivingArtifacts=\nArquivando os artefatos gerados em {0}.\n +wsimport.archiveArtifact=Adicionando {0} ao archive {1} +wsimport.fetchingMetadata=\nFazendo download do WSDL e dos metadados associados\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\nFazendo download do documento de metadados de {0} para {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties new file mode 100644 index 00000000000..591a59d61a6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_CN.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=\u7528\u6cd5: {0} [options] \n\n\u4f7f\u7528 "wsimport -help" \u83b7\u53d6\u8be6\u7ec6\u7684\u9009\u9879\u8bf4\u660e\u3002 + +wsimport.help=\n\u7528\u6cd5: {0} [options] \n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\ -b \u6307\u5b9a jaxws/jaxb \u7ed1\u5b9a\u6587\u4ef6\u6216\u9644\u52a0\u6a21\u5f0f\n\ (\u6bcf\u4e2a \u90fd\u5fc5\u987b\u5177\u6709\u81ea\u5df1\u7684 -b)\n\ -B \u5c06\u6b64\u9009\u9879\u4f20\u9012\u7ed9 JAXB \u6a21\u5f0f\u7f16\u8bd1\u5668\n\ -catalog \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\ -d \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u8f93\u51fa\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -encoding \u6307\u5b9a\u6e90\u6587\u4ef6\u6240\u4f7f\u7528\u7684\u5b57\u7b26\u7f16\u7801\n\ -extension \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u6309\u89c4\u8303\n\ \u6307\u5b9a\u529f\u80fd\u3002\u4f7f\u7528\u6269\u5c55\u53ef\u80fd\u4f1a\n\ \u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u4e0d\u53ef\u79fb\u690d\u6216\n\ \u65e0\u6cd5\u4e0e\u5176\u4ed6\u5b9e\u73b0\u8fdb\u884c\u4e92\u64cd\u4f5c\n\ -help \u663e\u793a\u5e2e\u52a9\n\ -httpproxy:: \u6307\u5b9a HTTP \u4ee3\u7406\u670d\u52a1\u5668 (\u7aef\u53e3\u9ed8\u8ba4\u4e3a 8080)\n\ -keep \u4fdd\u7559\u751f\u6210\u7684\u6587\u4ef6\n\ -p \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\ -quiet \u9690\u85cf wsimport \u8f93\u51fa\n\ -s \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u6e90\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -target \u6309\u7ed9\u5b9a\u7684 JAXWS \u89c4\u8303\u7248\u672c\u751f\u6210\u4ee3\u7801\n\ \u9ed8\u8ba4\u4e3a 2.2, \u63a5\u53d7\u7684\u503c\u4e3a 2.0, 2.1 \u548c 2.2\n\ \u4f8b\u5982, 2.0 \u5c06\u4e3a JAXWS 2.0 \u89c4\u8303\u751f\u6210\u517c\u5bb9\u7684\u4ee3\u7801\n\ -verbose \u6709\u5173\u7f16\u8bd1\u5668\u5728\u6267\u884c\u4ec0\u4e48\u64cd\u4f5c\u7684\u8f93\u51fa\u6d88\u606f\n\ -version \u8f93\u51fa\u7248\u672c\u4fe1\u606f\n\ -wsdllocation @WebServiceClient.wsdlLocation \u503c\n\ -clientjar \u521b\u5efa\u751f\u6210\u7684 Artifact \u7684 jar \u6587\u4ef6\u4ee5\u53ca\n\ \u8c03\u7528 Web \u670d\u52a1\u6240\u9700\u7684 WSDL \u5143\u6570\u636e\u3002\n\ -generateJWS \u751f\u6210\u5b58\u6839 JWS \u5b9e\u73b0\u6587\u4ef6\n\ -implDestDir \u6307\u5b9a\u751f\u6210 JWS \u5b9e\u73b0\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -implServiceName \u751f\u6210\u7684 JWS \u5b9e\u73b0\u7684\u670d\u52a1\u540d\u7684\u672c\u5730\u90e8\u5206\n\ -implPortName \u751f\u6210\u7684 JWS \u5b9e\u73b0\u7684\u7aef\u53e3\u540d\u7684\u672c\u5730\u90e8\u5206 + +wsimport.usage.extensions=\n\\\u6269\u5c55:\n\ -XadditionalHeaders \u6620\u5c04\u6807\u5934\u4e0d\u7ed1\u5b9a\u5230\u8bf7\u6c42\u6216\u54cd\u5e94\u6d88\u606f\u4e0d\u7ed1\u5b9a\u5230\n\ Java \u65b9\u6cd5\u53c2\u6570\n\ -Xauthfile \u7528\u4e8e\u4f20\u9001\u4ee5\u4e0b\u683c\u5f0f\u7684\u6388\u6743\u4fe1\u606f\u7684\u6587\u4ef6: \n\ http://username:password@example.org/stock?wsdl\n\ -Xdebug \u8f93\u51fa\u8c03\u8bd5\u4fe1\u606f\n\ -Xno-addressing-databinding \u5141\u8bb8 W3C EndpointReferenceType \u5230 Java \u7684\u7ed1\u5b9a\n\ -Xnocompile \u4e0d\u7f16\u8bd1\u751f\u6210\u7684 Java \u6587\u4ef6\n\ -XdisableAuthenticator \u7981\u7528\u7531 JAX-WS RI \u4f7f\u7528\u7684\u9a8c\u8bc1\u7a0b\u5e8f,\n\ \u5c06\u5ffd\u7565 -Xauthfile \u9009\u9879 (\u5982\u679c\u8bbe\u7f6e)\n\ -XdisableSSLHostnameVerification \u5728\u63d0\u53d6 wsdl \u65f6\u7981\u7528 SSL \u4e3b\u673a\u540d\n\ \u9a8c\u8bc1 + + +wsimport.usage.examples=\n\\\u793a\u4f8b:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n + +wsgen.usage=\u7528\u6cd5: {0} [options] \n\n\u4f7f\u7528 "wsgen -help" \u83b7\u53d6\u9009\u9879\u7684\u8be6\u7ec6\u8bf4\u660e\u3002 + +wsgen.help=\n\u7528\u6cd5: {0} [options] \n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\ -classpath \u6307\u5b9a\u67e5\u627e\u8f93\u5165\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -cp \u4e0e -classpath \u76f8\u540c\n\ -d \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u8f93\u51fa\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -encoding \u6307\u5b9a\u7531\u6e90\u6587\u4ef6\u4f7f\u7528\u7684\u5b57\u7b26\u7f16\u7801\n\ -extension \u5141\u8bb8\u4f9b\u5e94\u5546\u6269\u5c55 - \u4e0d\u6309\u89c4\u8303\n\ \u6307\u5b9a\u529f\u80fd\u3002\u4f7f\u7528\u6269\u5c55\u53ef\u80fd\u4f1a\n\ \u5bfc\u81f4\u5e94\u7528\u7a0b\u5e8f\u4e0d\u53ef\u79fb\u690d\u6216\n\ \u65e0\u6cd5\u4e0e\u5176\u4ed6\u5b9e\u73b0\u8fdb\u884c\u4e92\u64cd\u4f5c\n\ -help \u663e\u793a\u5e2e\u52a9\n\ -keep \u4fdd\u7559\u751f\u6210\u7684\u6587\u4ef6\n\ -r \u8d44\u6e90\u76ee\u6807\u76ee\u5f55, \u6307\u5b9a\u653e\u7f6e\n\ \u8d44\u6e90\u6587\u4ef6 (\u4f8b\u5982 WSDL) \u7684\u4f4d\u7f6e\n\ -s \u6307\u5b9a\u653e\u7f6e\u751f\u6210\u7684\u6e90\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ -verbose \u6709\u5173\u7f16\u8bd1\u5668\u5728\u6267\u884c\u4ec0\u4e48\u64cd\u4f5c\u7684\u8f93\u51fa\u6d88\u606f\n\ -version \u8f93\u51fa\u7248\u672c\u4fe1\u606f\n\ -wsdl[:protocol] \u751f\u6210 WSDL \u6587\u4ef6\u3002\u534f\u8bae\u662f\u53ef\u9009\u7684\u3002\n\ \u6709\u6548\u534f\u8bae\u662f{1},\n\ \u9ed8\u8ba4\u503c\u4e3a soap1.1\u3002\n\ \u975e\u6807\u51c6\u534f\u8bae{2}\n\ \u53ea\u80fd\u4e0e\n\ -extension \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002\n\ -inlineSchemas \u751f\u6210\u7684 wsdl \u4e2d\u7684\u5185\u5d4c\u6a21\u5f0f\u3002\u5fc5\u987b\n\ \u4e0e -wsdl \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002\n\ -servicename \u6307\u5b9a\u8981\u7528\u5728\u751f\u6210\u7684 WSDL \u4e2d\u7684\u670d\u52a1\u540d\n\ \u4e0e -wsdl \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002\n\ -portname \u6307\u5b9a\u8981\u7528\u5728\u751f\u6210\u7684 WSDL \u4e2d\u7684\u7aef\u53e3\u540d\n\ \u4e0e -wsdl \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002 + + +wsgen.usage.examples=\n\\\u793a\u4f8b:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=\u60a8\u6b63\u5728\u9644\u5e26 JAX-WS {0} API \u7684 JDK6 \u4e0a\u8fd0\u884c, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {1} API\u3002\u8bf7\u4f7f\u7528\u6388\u6743\u6807\u51c6\u8986\u76d6\u673a\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u5728 <{2}> \u4e0a\u8bbe\u7f6e xendorsed="true"\u3002 + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=\u60a8\u6b63\u5728\u4ece{1}\u52a0\u8f7d JAX-WS {0} API, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {2} API\u3002 + +invoker.needEndorsed=\u60a8\u6b63\u5728\u9644\u5e26 JAX-WS {0} API \u7684 JDK6 \u4e0a\u8fd0\u884c, \u4f46\u6b64\u5de5\u5177\u9700\u8981 JAX-WS {1} API\u3002\u8bf7\u4f7f\u7528\u6388\u6743\u6807\u51c6\u8986\u76d6\u673a\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u4f7f\u7528 -Xendorsed \u9009\u9879\u3002 + + +# +# Generic Messages +# +wscompile.invalidOption=\u65e0\u6cd5\u8bc6\u522b\u7684\u53c2\u6570{0} +wsimport.noSuchJaxbOption=\u6ca1\u6709\u8fd9\u79cd JAXB \u9009\u9879: {0} + +wscompile.error=\u9519\u8bef: {0} +wscompile.warning=\u8b66\u544a: {0} +wscompile.info=\u4fe1\u606f: {0} +wscompile.duplicateOption=\u91cd\u590d\u7684\u9009\u9879: {0} +wscompile.noSuchDirectory=\u627e\u4e0d\u5230\u76ee\u5f55: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=\u9009\u9879 \"{0}\" \u9700\u8981\u4e00\u4e2a\u53c2\u6570 +wscompile.compilationFailed=\u7f16\u8bd1\u5931\u8d25, \u9519\u8bef\u5e94\u8be5\u5df2\u4e88\u4ee5\u62a5\u544a +wscompile.unsupportedEncoding=\u4e0d\u652f\u6301\u7684\u7f16\u7801: {0} + +wsimport.missingFile=\u7f3a\u5c11 WSDL_URI + +wsgen.invalid.protocol=\"{0}\" \u4e0d\u662f\u652f\u6301\u7684\u534f\u8bae\u3002\u652f\u6301\u7684\u534f\u8bae\u5305\u62ec: {1}\u3002 +wsgen.invalid.transport=\"{0}\" \u4e0d\u662f\u652f\u6301\u7684\u4f20\u8f93\u3002\u652f\u6301\u7684\u4f20\u8f93\u5305\u62ec: {1}\u3002 +wsgen.class.not.found=\u672a\u627e\u5230\u7c7b: \"{0}\" +wsgen.could.not.create.file="\u65e0\u6cd5\u521b\u5efa\u6587\u4ef6: \"{0}\" +wsgen.missingFile=\u7f3a\u5c11 SEI +wsgen.soap12.without.extension=\u53ef\u9009\u534f\u8bae \"Xsoap1.2\" \u5fc5\u987b\u4e0e \"-extension\" \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002 +wsgen.protocol.without.extension=\u53ef\u9009\u534f\u8bae \"{0}\" \u5fc5\u987b\u4e0e \"-extension\" \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002 +wsgen.wsdl.arg.no.genwsdl=\"{0}\" \u9009\u9879\u53ea\u80fd\u4e0e "-wsdl" \u9009\u9879\u7ed3\u5408\u4f7f\u7528\u3002 +wsgen.servicename.missing.namespace=\u670d\u52a1\u540d \"{0}\" \u7f3a\u5c11\u540d\u79f0\u7a7a\u95f4\u3002 +wsgen.servicename.missing.localname=\u670d\u52a1\u540d \"{0}\" \u7f3a\u5c11\u672c\u5730\u540d\u79f0\u3002 +wsgen.portname.missing.namespace=\u7aef\u53e3\u540d \"{0}\" \u7f3a\u5c11\u540d\u79f0\u7a7a\u95f4\u3002 +wsgen.portname.missing.localname=\u7aef\u53e3\u540d \"{0}\" \u7f3a\u5c11\u672c\u5730\u540d\u79f0\u3002 +wsgen.class.must.be.implementation.class=\u7c7b \"{0}\" \u4e0d\u662f\u7aef\u70b9\u5b9e\u73b0\u7c7b\u3002 +wsimport.NotAFileNorURL = "{0}" \u4e0d\u662f\u6587\u4ef6\u540d\u4e5f\u4e0d\u662f URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen \u65e0\u6cd5\u5728\u7c7b{1}\u4e0a\u4e3a\u975e SOAP \u7ed1\u5b9a{0}\u751f\u6210 WSDL + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen \u65e0\u6cd5\u5728\u7c7b{1}\u4e0a\u4e3a SOAP 1.2 \u7ed1\u5b9a{0}\u751f\u6210 WSDL\u3002\n +Please \u6307\u5b9a \"-extension\" \u548c \"-wsdl:protocol XSoap1.2\" \u5f00\u5173\u3002\u4f8b\u5982:\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" \u5fc5\u987b\u4e0e \"-wsdl\" \u9009\u9879\u7ed3\u5408\u4f7f\u7528 + +wsgen.no.webservices.class=wsgen \u672a\u627e\u5230\u5e26\u6709 @WebService \u6ce8\u91ca\u7684\u4efb\u4f55\u7c7b\u3002\u8bf7\u5728{0}\u4e0a\u6307\u5b9a @WebService \u6ce8\u91ca\u3002 + +wsimport.no.wsdl=\u65e0\u6cd5\u8bfb\u53d6 WSDL \u6587\u6863: {0}, \u539f\u56e0\u4e3a 1) \u627e\u4e0d\u5230\u6587\u6863; 2) \u65e0\u6cd5\u8bfb\u53d6\u6587\u6863; 3) \u6587\u6863\u7684\u6839\u5143\u7d20\u4e0d\u662f \u3002 + +wsimport.FailedToParse = \u65e0\u6cd5\u89e3\u6790 "{0}": {1} + +wsimport.ParsingWSDL=\u6b63\u5728\u89e3\u6790 WSDL...\n\n +wsimport.GeneratingCode=\n\u6b63\u5728\u751f\u6210\u4ee3\u7801...\n +wsimport.CompilingCode=\n\u6b63\u5728\u7f16\u8bd1\u4ee3\u7801...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6807\u7248\u672c\u3002\u652f\u6301 "2.0" \u548c "2.1"\u3002 + +wsimport.ILLEGAL_AUTH_INFO = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u6388\u6743\u4fe1\u606f\u683c\u5f0f\u3002\u683c\u5f0f\u5e94\u4e3a http[s]://user:password@host:port//\u3002 + +wsimport.readingAuthFile = \u6b63\u5728\u5c1d\u8bd5\u8bfb\u53d6\u6388\u6743\u6587\u4ef6: "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = \u672a\u627e\u5230\u6388\u6743\u6587\u4ef6 "{0}"\u3002\u5982\u679c WSDL \u8bbf\u95ee\u9700\u8981\u57fa\u672c\u9a8c\u8bc1, \u8bf7\u5728{1}\u4e2d\u63d0\u4f9b\u5177\u6709\u8bfb\u53d6\u8bbf\u95ee\u6743\u9650\u7684\u6388\u6743\u6587\u4ef6, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6743\u6587\u4ef6\u5e76\u5728\u6bcf\u4e00\u884c\u4e0a\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f\u63d0\u4f9b\u6388\u6743\u4fe1\u606f: http[s]://user:password@host:port// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" \u9700\u8981\u6388\u6743, \u8bf7\u5728{2}\u4e2d\u63d0\u4f9b\u5177\u6709\u8bfb\u53d6\u8bbf\u95ee\u6743\u9650\u7684\u6388\u6743\u6587\u4ef6, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6743\u6587\u4ef6\u5e76\u5728\u6bcf\u4e00\u884c\u4e0a\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f\u63d0\u4f9b\u6388\u6743\u4fe1\u606f: http[s]://user:password@host:port// + +wsimport.AUTH_INFO_LINENO = "{1}\u7684\u7b2c {0} \u884c + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = \u670d\u52a1\u5668\u8fd4\u56de\u4e86 HTTP \u72b6\u6001\u4ee3\u7801: "{0}", \u6b63\u5728\u4f7f\u7528 "{1}" \u91cd\u8bd5 + +wsimport.maxRedirectAttempt = \u65e0\u6cd5\u83b7\u53d6\u5df2\u8fbe\u5230\u7684 WSDL \u6700\u5927\u91cd\u5b9a\u5411\u6b21\u6570 (5) + +wsimport.wsdllocation.clientjar = \u4f7f\u7528 clientJar \u9009\u9879\u65f6\u4e0d\u80fd\u6307\u5b9a wsdlLocation +# {0} - path to a zip file +wsimport.archivingArtifacts=\n\u5c06\u751f\u6210\u7684 Artifact \u5f52\u6863\u5230{0}\u3002\n +wsimport.archiveArtifact=\u5c06{0}\u6dfb\u52a0\u5230\u6863\u6848{1} +wsimport.fetchingMetadata=\n\u4e0b\u8f7d WSDL \u53ca\u5173\u8054\u7684\u5143\u6570\u636e\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\n\u5c06\u5143\u6570\u636e\u6587\u6863\u4ece{0}\u4e0b\u8f7d\u5230{1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties new file mode 100644 index 00000000000..b92715bcba6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wscompile_zh_TW.properties @@ -0,0 +1,131 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wsimport.usage=\u7528\u6cd5: {0} [options] \n\n\u4f7f\u7528 "wsimport -help" \u53ef\u53d6\u5f97\u9078\u9805\u7684\u8a73\u7d30\u63cf\u8ff0. + +wsimport.help=\n\u7528\u6cd5: {0} [options] \n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\\ -b \u6307\u5b9a jaxws/jaxb \u9023\u7d50\u6a94\u6848\u6216\u5176\u4ed6\u7db1\u8981\n\\ (\u6bcf\u500b \u5747\u5fc5\u9808\u8981\u6709\u81ea\u5df1\u7684 -b)\n\\ -B \u5c07\u6b64\u9078\u9805\u50b3\u9001\u5230 JAXB \u7db1\u8981\u7de8\u8b6f\u5668\n\\ -catalog \u6307\u5b9a\u8981\u7528\u4ee5\u89e3\u6790\u5916\u90e8\u500b\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\\ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\\ -d \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u8f38\u51fa\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ -encoding \u6307\u5b9a\u4f86\u6e90\u6a94\u6848\u6240\u4f7f\u7528\u7684\u5b57\u5143\u7de8\u78bc\n\\ -extension \u5141\u8a31\u5ee0\u5546\u64f4\u5145 - \u672a\u7531\u898f\u683c\u6307\u5b9a\n\\ \u529f\u80fd. \u4f7f\u7528\u64f4\u5145\u53ef\u80fd\u5c0e\u81f4\n\\ \u4e0d\u53ef\u651c\u61c9\u7528\u7a0b\u5f0f\u6216\u8005\u53ef\u80fd\u7121\u6cd5\n\\ \u8207\u5176\u4ed6\u5be6\u884c\u4e92\u52d5\u64cd\u4f5c\n\\ -help \u986f\u793a\u8aaa\u660e\n\\ -httpproxy:: \u6307\u5b9a HTTP \u4ee3\u7406\u4e3b\u6a5f\u4f3a\u670d\u5668 (\u9023\u63a5\u57e0\u9810\u8a2d\u70ba 8080)\n\\ -keep \u4fdd\u7559\u7522\u751f\u7684\u6a94\u6848\n\\ -p \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\\ -quiet \u6291\u5236 wsimport \u8f38\u51fa\n\\ -s \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u4f86\u6e90\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ -target \u6839\u64da\u6307\u5b9a\u7684 JAXWS \u898f\u683c\u7248\u672c\u7522\u751f\u7a0b\u5f0f\u78bc\n\\ \u9810\u8a2d\u70ba 2.2, \u63a5\u53d7\u7684\u503c\u5305\u62ec 2.0\u30012.1 \u4ee5\u53ca 2.2\n\\ \u4f8b\u5982, 2.0 \u5c07\u6703\u7522\u751f\u8207 JAXWS 2.0 \u898f\u683c\u76f8\u5bb9\u7684\u7a0b\u5f0f\u78bc\n\\ -verbose \u8f38\u51fa\u7de8\u8b6f\u5668\u57f7\u884c\u76f8\u95dc\u8a0a\u606f\n\\ -version \u5217\u5370\u7248\u672c\u8cc7\u8a0a\n\\ -wsdllocation @WebServiceClient.wsdlLocation \u503c\n\\ -clientjar \u5efa\u7acb\u7522\u751f\u4e4b\u4f7f\u7528\u8005\u81ea\u5efa\u7269\u4ef6\u7684 jar \u6a94\u6848, \u4ee5\u53ca\n\\ \u547c\u53eb Web \u670d\u52d9\u6240\u9700\u7684 WSDL \u63cf\u8ff0\u8cc7\u6599.\n\\ -generateJWS \u7522\u751f stub JWS \u5be6\u884c\u6a94\u6848\n\\ -implDestDir \u6307\u5b9a\u7522\u751f JWS \u5be6\u884c\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ -implServiceName \u7522\u751f\u4e4b JWS \u5be6\u884c\u7684\u670d\u52d9\u540d\u7a31\u672c\u6a5f\u90e8\u5206\n\\ -implPortName \u7522\u751f\u4e4b JWS \u5be6\u884c\u7684\u9023\u63a5\u57e0\u540d\u7a31\u672c\u6a5f\u90e8\u5206 + +wsimport.usage.extensions=\n\\\u64f4\u5145:\n\\ -XadditionalHeaders \u5c07\u672a\u9023\u7d50\u81f3\u8981\u6c42\u6216\u56de\u61c9\u8a0a\u606f\u7684\u6a19\u982d\u5c0d\u61c9\u81f3 \n\\ Java \u65b9\u6cd5\u53c3\u6578\n\\ -Xauthfile \u4fdd\u7559\u6388\u6b0a\u8cc7\u8a0a\u7684\u6a94\u6848, \u5176\u683c\u5f0f\u70ba: \n\\ http://username:password@example.org/stock?wsdl\n\\ -Xdebug \u5217\u5370\u9664\u932f\u8cc7\u8a0a\n\\ -Xno-addressing-databinding \u555f\u7528\u5c07 W3C EndpointReferenceType \u9023\u7d50\u81f3 Java\n\\ -Xnocompile \u4e0d\u7de8\u8b6f\u7522\u751f\u7684 Java \u6a94\u6848\n\\ -XdisableAuthenticator \u505c\u7528 JAX-WS RI \u6240\u4f7f\u7528\u7684\u300c\u8a8d\u8b49\u7a0b\u5f0f\u300d,\n\\ -Xauthfile \u9078\u9805\u5c07\u88ab\u5ffd\u7565, \u5982\u679c\u8a2d\u5b9a\n\\ -XdisableSSLHostnameVerification \u5728\u64f7\u53d6 wsdl \u6642\u505c\u7528 SSL \u4e3b\u6a5f\u540d\u7a31\n\\ \u9a57\u8b49 + + +wsimport.usage.examples=\n\\\u7bc4\u4f8b:\n\ wsimport stock.wsdl -b stock.xml -b stock.xjb\n\ wsimport -d generated http://example.org/stock?wsdl\n + +wsgen.usage=\u7528\u6cd5: {0} [options] \n\n\u4f7f\u7528 "wsgen -help" \u53ef\u53d6\u5f97\u9078\u9805\u7684\u8a73\u7d30\u63cf\u8ff0. + +wsgen.help=\n\u7528\u6cd5: {0} [options] \n\n\\\u5176\u4e2d [options] \u5305\u62ec:\n\ -classpath \u6307\u5b9a\u5c0b\u627e\u8f38\u5165\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\ -cp \u8207 -classpath \u76f8\u540c\n\ -d \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u8f38\u51fa\u6a94\u6848\u7684\u4f4d\u7f6e\n\ -encoding \u6307\u5b9a\u4f86\u6e90\u6a94\u6848\u6240\u4f7f\u7528\u7684\u5b57\u5143\u7de8\u78bc\n\ -extension \u5141\u8a31\u5ee0\u5546\u64f4\u5145 - \u672a\u7531\u898f\u683c\u6307\u5b9a\n\ \u529f\u80fd. \u4f7f\u7528\u64f4\u5145\u53ef\u80fd\u5c0e\u81f4\u4e0d\n\ \u53ef\u651c\u61c9\u7528\u7a0b\u5f0f\u6216\u8005\u53ef\u80fd\u7121\u6cd5\n\ \u8207\u5176\u4ed6\u5be6\u884c\u4e92\u52d5\u64cd\u4f5c\n\ -help \u986f\u793a\u8aaa\u660e\n\ -keep \u4fdd\u7559\u7522\u751f\u7684\u6a94\u6848s\n\ -r \u8cc7\u6e90\u76ee\u7684\u5730\u76ee\u9304, \u6307\u5b9a\u7f6e\u653e\n\ \u8cc7\u6e90\u6a94\u6848 (\u4f8b\u5982 WSDL) \u7684\u4f4d\u7f6e\n\ -s \u6307\u5b9a\u7f6e\u653e\u7522\u751f\u4e4b\u4f86\u6e90\u6a94\u6848\u7684\u4f4d\u7f6e\n\ -verbose \u8f38\u51fa\u7de8\u8b6f\u5668\u57f7\u884c\u76f8\u95dc\u8a0a\u606f\n\ -version \u5217\u5370\u7248\u672c\u8cc7\u8a0a\n\ -wsdl[:protocol] \u7522\u751f WSDL \u6a94\u6848. \u53ef\u9078\u64c7\u662f\u5426\u6307\u5b9a\u5354\u5b9a.\n\ \u6709\u6548\u7684\u5354\u5b9a\u70ba {1},\n\ \u9810\u8a2d\u70ba soap1.1.\n\ \u975e\u6a19\u6e96\u5354\u5b9a {2}\n\ \u53ea\u80fd\u642d\u914d -extension \u9078\u9805\n\ \u4e00\u8d77\u59cb\u7528.\n\ -inlineSchemas \u7522\u751f\u4e4b wsdl \u4e2d\u7684\u5167\u5d4c\u7db1\u8981. \u5fc5\u9808\n\ \u642d\u914d -wsdl \u9078\u9805\u4e00\u8d77\u59cb\u7528.\n\ -servicename \u6307\u5b9a\u7522\u751f\u4e4b WSDL \u4e2d\u6240\u8981\u4f7f\u7528\u7684\u300c\u670d\u52d9\u300d\u540d\u7a31\n\ \u642d\u914d -wsdl \u9078\u9805\u4e00\u8d77\u59cb\u7528.\n\ -portname \u6307\u5b9a\u7522\u751f\u4e4b WSDL \u4e2d\u6240\u8981\u4f7f\u7528\u7684\u300c\u9023\u63a5\u57e0\u300d\u540d\u7a31\n\ \u642d\u914d -wsdl \u9078\u9805\u4e00\u8d77\u59cb\u7528. + + +wsgen.usage.examples=\n\\\u7bc4\u4f8b:\n\ wsgen -cp . example.Stock\n\ wsgen -cp . example.Stock -wsdl -servicename '{http://mynamespace}MyService'\n +wrapperTask.needEndorsed=\u60a8\u76ee\u524d\u57f7\u884c\u96a8\u9644\u65bc JAX-WS {0} API \u7684 JDK6, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {1} API. \u8acb\u4f7f\u7528\u8a8d\u53ef\u7684\u6a19\u6e96\u8986\u5beb\u6a5f\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u5728 <{2}> \u8a2d\u5b9a xendorsed="true". + +# {0}, {2} - version (e.g. 2.1), {1} - absolute class location +wrapperTask.loadingIncorrectApi=\u60a8\u6b63\u5728\u5f9e {1} \u8f09\u5165 JAX-WS {0} API, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {2} API. + +invoker.needEndorsed=\u60a8\u76ee\u524d\u57f7\u884c\u96a8\u9644\u65bc JAX-WS {0} API \u7684 JDK6, \u4f46\u662f\u6b64\u5de5\u5177\u9700\u8981\u4f7f\u7528 JAX-WS {1} API. \u8acb\u4f7f\u7528\u8a8d\u53ef\u7684\u6a19\u6e96\u8986\u5beb\u6a5f\u5236 (http://docs.oracle.com/javase/6/docs/technotes/guides/standards/), \u6216\u8005\u4f7f\u7528 -Xendorsed \u9078\u9805. + + +# +# Generic Messages +# +wscompile.invalidOption=\u7121\u6cd5\u8fa8\u8b58\u7684\u53c3\u6578 {0} +wsimport.noSuchJaxbOption=\u6c92\u6709\u6b64 JAXB \u9078\u9805: {0} + +wscompile.error=\u932f\u8aa4: {0} +wscompile.warning=\u8b66\u544a: {0} +wscompile.info=\u8cc7\u8a0a: {0} +wscompile.duplicateOption=\u91cd\u8907\u7684\u9078\u9805: {0} +wscompile.noSuchDirectory=\u627e\u4e0d\u5230\u76ee\u9304: {0} +# wscompile.missingOptionArgument +wscompile.missingOptionArgument=\u9078\u9805 \"{0}\" \u5fc5\u9808\u8981\u6709\u4e00\u500b\u5f15\u6578 +wscompile.compilationFailed=\u7de8\u8b6f\u5931\u6557, \u5fc5\u9808\u5831\u544a\u932f\u8aa4 +wscompile.unsupportedEncoding=\u4e0d\u652f\u63f4\u7684\u7de8\u78bc: {0} + +wsimport.missingFile=\u907a\u6f0f WSDL_URI + +wsgen.invalid.protocol=\u4e0d\u652f\u63f4 \"{0}\" \u5354\u5b9a. \u652f\u63f4\u7684\u5354\u5b9a\u5305\u62ec: {1}. +wsgen.invalid.transport=\u4e0d\u652f\u63f4 \"{0}\" \u50b3\u8f38. \u652f\u63f4\u7684\u50b3\u8f38\u5305\u62ec: {1}. +wsgen.class.not.found=\u627e\u4e0d\u5230\u985e\u5225: \"{0}\" +wsgen.could.not.create.file="\u7121\u6cd5\u5efa\u7acb\u6a94\u6848: "\\{0}\" +wsgen.missingFile=\u907a\u6f0f SEI +wsgen.soap12.without.extension=\u9078\u64c7\u6027\u5354\u5b9a \"Xsoap1.2\" \u5fc5\u9808\u642d\u914d \"-extension\" \u9078\u9805\u4e00\u8d77\u4f7f\u7528. +wsgen.protocol.without.extension=\u9078\u64c7\u6027\u5354\u5b9a \"{0}\" \u5fc5\u9808\u642d\u914d \"-extension\" \u9078\u9805\u4e00\u8d77\u4f7f\u7528. +wsgen.wsdl.arg.no.genwsdl=\"{0}\" \u9078\u9805\u53ea\u80fd\u642d\u914d "-wsdl" \u9078\u9805\u4e00\u8d77\u4f7f\u7528. +wsgen.servicename.missing.namespace=\u670d\u52d9\u540d\u7a31 \"{0}\" \u907a\u6f0f\u547d\u540d\u7a7a\u9593. +wsgen.servicename.missing.localname=\u670d\u52d9\u540d\u7a31 \"{0}\" \u907a\u6f0f\u672c\u6a5f\u540d\u7a31. +wsgen.portname.missing.namespace=\u9023\u63a5\u57e0\u540d\u7a31 \"{0}\" \u907a\u6f0f\u547d\u540d\u7a7a\u9593. +wsgen.portname.missing.localname=\u9023\u63a5\u57e0\u540d\u7a31 \"{0}\" \u907a\u6f0f\u672c\u6a5f\u540d\u7a31. +wsgen.class.must.be.implementation.class=\u985e\u5225 \"{0}\" \u4e0d\u662f\u4e00\u500b\u7aef\u9ede\u5be6\u884c\u985e\u5225. +wsimport.NotAFileNorURL = "{0}" \u4e0d\u662f\u6a94\u6848\u540d\u7a31\u6216 URL + +wsgen.cannot.gen.wsdl.for.non.soap.binding=wsgen \u7121\u6cd5\u7522\u751f\u985e\u5225 {1} \u4e4b\u975e SOAP \u9023\u7d50 {0} \u7684 WSDL + +wsgen.cannot.gen.wsdl.for.soap12.binding=wsgen \u7121\u6cd5\u7522\u751f\u985e\u5225 {1} \u4e4b SOAP 1.2 \u9023\u7d50 {0} \u7684 WSDL.\n +Please \u6307\u5b9a \"-extension\" \u548c \"-wsdl:protocol XSoap1.2\" \u53c3\u6578. \u4f8b\u5982:\n\n +wsgen -wsdl:protocol XSoap1.2 -extenson {1} +wsgen.inlineSchemas.only.with.wsdl=\"-inlineSchemas\" \u5fc5\u9808\u642d\u914d \"-wsdl\" \u9078\u9805\u4e00\u8d77\u4f7f\u7528 + +wsgen.no.webservices.class=wsgen \u627e\u4e0d\u5230\u4efb\u4f55\u542b @WebService \u8a3b\u89e3\u7684\u985e\u5225. \u8acb\u5728 {0} \u6307\u5b9a @WebService \u8a3b\u89e3. + +wsimport.no.wsdl=\u7121\u6cd5\u8b80\u53d6 WSDL \u6587\u4ef6: {0}, \u56e0\u70ba 1) \u627e\u4e0d\u5230\u6587\u4ef6; /2) \u7121\u6cd5\u8b80\u53d6\u6587\u4ef6; 3) \u6587\u4ef6\u7684\u6839\u5143\u7d20\u4e0d\u662f . + +wsimport.FailedToParse = \u7121\u6cd5\u5256\u6790 "{0}": {1} + +wsimport.ParsingWSDL=\u6b63\u5728\u5256\u6790 WSDL...\n\n +wsimport.GeneratingCode=\n\u6b63\u5728\u7522\u751f\u7a0b\u5f0f\u78bc...\n +wsimport.CompilingCode=\n\u6b63\u5728\u7de8\u8b6f\u7a0b\u5f0f\u78bc...\n +wsimport.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6a19\u7248\u672c. \u652f\u63f4 "2.0" \u548c "2.1". + +wsimport.ILLEGAL_AUTH_INFO = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u6388\u6b0a\u8cc7\u8a0a\u683c\u5f0f. \u683c\u5f0f\u70ba http[s]://user:password@host:port//. + +wsimport.readingAuthFile = \u6b63\u5728\u5617\u8a66\u8b80\u53d6\u6388\u6b0a\u6a94\u6848 : "{0}"... + +# {0} - path to current authorization file, {1} - path to metro authorization file +wsimport.authFileNotFound = \u627e\u4e0d\u5230\u6388\u6b0a\u6a94\u6848 "{0}". \u5982\u679c WSDL \u5b58\u53d6\u9700\u8981\u300c\u57fa\u672c\u8a8d\u8b49\u300d, \u8acb\u5728 {1} \u63d0\u4f9b\u5177\u6709\u8b80\u53d6\u5b58\u53d6\u6b0a\u7684\u6388\u6b0a\u6a94\u6848, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6b0a\u6a94\u6848, \u4e26\u4e14\u5728\u6bcf\u4e00\u884c\u63d0\u4f9b\u6388\u6b0a\u8cc7\u8a0a (\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f) : http[s]://user:password@host:port// + +# {0} - exception message, {1} - systemId (e.g. location of WSDL file) , {2} - path to metro authentication file e.g.: Server returned HTTP response code: 401 for URL: http://localhost:8080/myServer/mywebService?WSDL, "http://localhost:8080/myServer/mywebService?WSDL" needs authorization, please provide authorization file with read access at C:\Documents and Settings\user\.metro\auth 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}" \u9700\u8981\u6388\u6b0a, \u8acb\u5728 {2} \u63d0\u4f9b\u5177\u6709\u8b80\u53d6\u5b58\u53d6\u6b0a\u7684\u6388\u6b0a\u6a94\u6848, \u6216\u8005\u4f7f\u7528 -Xauthfile \u6307\u5b9a\u6388\u6b0a\u6a94\u6848, \u4e26\u4e14\u5728\u6bcf\u4e00\u884c\u63d0\u4f9b\u6388\u6b0a\u8cc7\u8a0a (\u4f7f\u7528\u4ee5\u4e0b\u683c\u5f0f) : http[s]://user:password@host:port// + +wsimport.AUTH_INFO_LINENO = "{1} \u7684\u7b2c {0} \u884c + + +wsimport.ErrorMessage = [ERROR] {0} + +wsimport.WarningMessage = [WARNING] {0} + +wsimport.InfoMessage = [INFO] {0} + +wsimport.DebugMessage = [DEBUG] {0} + +wsimport.httpRedirect = \u4f3a\u670d\u5668\u50b3\u56de HTTP \u72c0\u614b\u4ee3\u78bc: "{0}", \u4f7f\u7528 "{1}" \u91cd\u8a66 + +wsimport.maxRedirectAttempt = \u7121\u6cd5\u53d6\u5f97 WSDL, \u5df2\u9054\u91cd\u5c0e\u6b21\u6578\u4e0a\u9650 (5) + +wsimport.wsdllocation.clientjar = \u4f7f\u7528 clientJar \u9078\u9805\u6642\u7121\u6cd5\u6307\u5b9a wsdlLocation +# {0} - path to a zip file +wsimport.archivingArtifacts=\n\u6b63\u5728\u5c07\u7522\u751f\u7684\u4f7f\u7528\u8005\u81ea\u5efa\u7269\u4ef6\u5b58\u6a94\u81f3 {0}.\n +wsimport.archiveArtifact=\u6b63\u5728\u5c07 {0} \u52a0\u5230\u5b58\u6a94 {1} +wsimport.fetchingMetadata=\n\u6b63\u5728\u4e0b\u8f09 WSDL \u548c\u95dc\u806f\u7684\u63cf\u8ff0\u8cc7\u6599\n +# {0} - URI, {1} - path to a file +wsimport.document.download=\n\u6b63\u5728\u5c07 {0} \u7684\u63cf\u8ff0\u8cc7\u6599\u6587\u4ef6\u4e0b\u8f09\u81f3 {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties index fa514dd27f0..60fe1fd9a45 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ parsing.invalidAttributeValue=invalid value \"{1}\" for attribute \"{0}\" parsing.invalidExtensionElement=invalid extension element: \"{0}\" (in namespace \"{1}\") parsing.invalidWsdlElement=invalid WSDL element: \"{0}\" parsing.requiredExtensibilityElement=unknown required extensibility element \"{0}\" (in namespace \"{1}\") +parsing.unknownExtensibilityElementOrAttribute=unknown extensibility element or attribute \"{0}\" (in namespace \"{1}\") parsing.tooManyElements=too many \"{0}\" elements under \"{1}\" element \"{2}\" parsing.invalidOperationStyle=operation \"{0}\" has an invalid style # {0} - "definitions". Not concatenated with any other string. @@ -167,4 +168,4 @@ 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. +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. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties new file mode 100644 index 00000000000..1dc2fdb5550 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_de.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=Standard-Namespace muss \\"{0}\\" sein +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=Nur eines der Attribute \\"element\\" oder \\"type\\" ist in Teil \\"{0}\\" zul\u00E4ssig +# Not concatenated with any other string. +parsing.elementOrTypeRequired=Warnung: Teil {0} wird ignoriert, entweder das Attribut \"element\" oder das Attribut \"type\" ist in Teil \"{0}\" erforderlich +parsing.invalidElement=ung\u00FCltiges Element: \"{0}\" (in Namespace \"{1}\") +parsing.invalidAttributeValue=Ung\u00FCltiger Wert \"{1}\" f\u00FCr Attribut \"{0}\" +parsing.invalidExtensionElement=ung\u00FCltiges Erweiterungselement: \"{0}\" (in Namespace \"{1}\") +parsing.invalidWsdlElement=Ung\u00FCltiges WSDL-Element: "{0}" +parsing.requiredExtensibilityElement=unbekanntes erforderliches Erweiterungselement \"{0}\" (in Namespace \"{1}\") +parsing.tooManyElements=zu viele \"{0}\"-Elemente unter \"{1}\"-Element \"{2}\" +parsing.invalidOperationStyle=Vorgang \"{0}\" hat einen ung\u00FCltigen Stil +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed=Nur ein "types"-Element ist in "{0}" zul\u00E4ssig +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed=Nur ein "documentation"-Element ist in "{0}" zul\u00E4ssig +parsing.incorrectRootElement=Root-Element \"{2}\" (in Namespace \"{3}\"), Element \"{0}\" (in Namespace \"{1}\") gefunden +parsing.unknownImportedDocumentType=importiertes Dokument hat unbekannten Typ: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=nicht deklariertes Namespace-Pr\u00E4fix: \\"{0}\\" +parsing.invalidURI=ung\u00FCltiger URI: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=Dokument in \"{0}\" konnte nicht geparst werden +# {0} - exception message +parsing.ioException=Parsen nicht erfolgreich: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=Ung\u00FCltige WSDL-Datei. Dokument in \"{0}\" konnte nicht geparst werden +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=Ung\u00FCltige WSDL-Datei. Parsing nicht erfolgreich: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=Ung\u00FCltige WSDL-Datei. Parsing nicht erfolgreich: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=Ung\u00FCltige WSDL-Datei. Parsing nicht erfolgreich: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=erforderliches Attribut \"{1}\" von Element \"{0}\" fehlt +parsing.invalidTag=Element \"{1}\" erwartet, \"{0}\" gefunden +# {4} - element name +parsing.invalidTagNS=Ung\u00FCltige WSDL in {4}: Element \\"{2}\\" (in Namespace \\"{3}\\") erwartet, Element \\"{0}\\" (in Namespace \\"{1}\\") gefunden +parsing.nonWhitespaceTextFound=unerwarteter Text ohne Leerstellen gefunden: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=unerwartetes Nicht-Element gefunden +# +entity.duplicate=doppelte Entity: \\"{0}\\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=doppelte \"{0}\" Entity: \"{1}\" + +entity.notFoundByID=ung\u00FCltige Entity-ID: \\"{0}\\" +entity.notFoundByQName={0} \"{1}\" nicht in WSDL gefunden: {2} +entity.notFound.portType=wsdl:portType \\"{0}\\" wird von wsdl:binding \\"{1}\\" referenziert, wird jedoch in der WSDL nicht gefunden +entity.notFound.binding=wsdl:binding \\"{0}\\" wird von wsdl:port \\"{1}\\" referenziert, wird jedoch in der WSDL nicht gefunden + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=erforderliches Attribut \"{0}\" von Element \"{1}\" fehlt +validation.missingRequiredProperty=erforderliche Eigenschaft \"{0}\" von Element \"{1}\" fehlt +validation.missingRequiredSubEntity=Erforderliche Sub-Entity \"{0}\" von Element \"{1}\" fehlt +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=ung\u00FCltiges Element: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=ung\u00FCltiges Element: \\"{1}\\", enth\u00E4lt benannten simpleType: \\"{0}\\" +validation.duplicatedElement=dupliziertes Element: \"{0}\" +validation.duplicatePartName=Ung\u00FCltige WSDL, doppelte Teile in einer wsdl:message sind nicht zul\u00E4ssig. \nwsdl:message {0} hat einen doppelten Teilnamen: \\"{1}\\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=Ung\u00FCltiges untergeordnetes Element \"{0}\" von Element \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=Ung\u00FCltiges Attribut \"{0}\" von Element \"{1}\" +validation.invalidAttributeValue=Ung\u00FCltiger Wert \"{1}\" f\u00FCr Attribut \"{0}\" +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=exklusive Attribute: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=Ziel-Namespace ist nicht korrekt (erwartet: {1}, gefunden: {0}) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=interner Fehler ("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=nicht eindeutiger Vorgangsname: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="Verwendung von SOAP-Codierung wird nicht unterst\u00FCtzt. \nSOAP-Erweiterungselement in Zeile {0} in {1} enth\u00E4lt use=\\"encoded\\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=leere Aktion in \"{0}\" {1}-Element von \"{2}\"-Vorgang wird ignoriert, stattdessen wird Standardwert verwendet +# Not concatenated with any other string. +warning.inputOutputEmptyAction=leere Aktion in {0}-Element von \"{1}\"-Vorgang wird ignoriert, stattdessen wird Standardwert verwendet + +#wsi compliant WSDL warnings +warning.wsi.r2001=Keine mit WSI-BP konforme WSDL (R2001, R2002). wsdl:import darf nur WSDL-Dokumente importieren. Es wird versucht, \\"{0}\\" zu importieren +warning.wsi.r2002=Keine mit WSI-BP konforme WSDL (R2002). wsdl:import darf nicht f\u00FCr das Importieren eines XML-Schemas verwendet werden, das im WSDL-Dokument eingebettet ist. WSDL-Namespace {0} erwartet, {1} gefunden +warning.wsi.r2003=Keine mit WSI-BP konforme WSDL (R2003). xsd:import darf nur innerhalb von xsd:schema-Elementen verwendet werden. +warning.wsi.r2004=Keine mit WSI-BP konforme WSDL (R2001, R2004). xsd:import darf keine XML-Schemadefinitionen importieren, die inline in dem WSDL-Dokument eingebettet sind. + +#Parser +Parsing.ParseFailed = \tWSDL konnte nicht geparst werden. + +Parsing.NotAWSDL=WSDL-Komponenten konnten nicht abgerufen werden, wahrscheinlich ist {0} keine g\u00FCltige WSDL-Datei. + +AbstractReferenceFinderImpl.UnableToParse = \tParsen von "{0}" nicht m\u00F6glich: {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \tkeine externe Binding-Datei. Das Root-Element muss ''{''http://java.sun.com/xml/ns/jaxws''}''-Bindings sein, ist jedoch ''{''{0}''}''{1} + + +#Internalizer +Internalizer.TwoVersionAttributes = \tSowohl jaxb:version als auch Version sind vorhanden +Internalizer.IncorrectVersion = \tJAXWS-Versionsattribut muss "2.0" sein + +Internalizer.VersionNotPresent = \tJAXWS-Versionsattribut muss vorhanden sein + +internalizer.targetNotAnElement= \tZielknoten ist kein Element +internalizer.targetNotFound= \tKein Ziel f\u00FCr wsdlLocation gefunden: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" ist nicht Bestandteil dieser Kompilierung. Ist dies ein Fehler bei "{1}"? + +internalizer.XPathEvaluationError = XPath-Fehler: {0} +internalizer.XPathEvaluatesToNoTarget = XPath-Auswertung von "{0}" ergibt einen leeren Zielknoten +internalizer.XPathEvaulatesToTooManyTargets = XPath-Auswertung von "{0}" ergibt zu viele ({1})-Zielknoten +internalizer.XPathEvaluatesToNonElement = XPath-Auswertung von "{0}" muss ein Element ergeben. +invalid.customization.namespace=Anpassung \\"{0}\\" wird ignoriert, weil sie keinen Namespace hat. Sie muss zu dem Anpassungs-Namespace geh\u00F6ren. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="Kein WSDL-Dokument: {0}, ergibt \"{1}\", Vorgang wird mit MEX wiederholt ..." +invalid.wsdl=Ung\u00FCltige WSDL {0}, {1} erwartet, {2} in (Zeile{3}) gefunden +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nVorgang wird mit MEX wiederholt ... +file.not.found={0} ist nicht erreichbar +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=wsdl:service konnte in den angegebenen WSDLs nicht gefunden werden: \n\n{0} Mindestens eine WSDL mit mindestens einer Servicedefinition muss bereitgestellt werden. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties new file mode 100644 index 00000000000..0823ea698d9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_es.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=el espacio de nombres por defecto debe ser \"{0}\" +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=S\u00F3lo se permite uno de los atributos \\"element\\" o \\"type\\" en la parte \\"{0}\\". +# Not concatenated with any other string. +parsing.elementOrTypeRequired=Advertencia: la parte {0} se ignora. Se necesita el atributo \"element\" o \"type\" en la parte \"{0}\". +parsing.invalidElement=elemento no v\u00E1lido: \"{0}\" (en el espacio de nombres \"{1}\") +parsing.invalidAttributeValue=valor no v\u00E1lido \"{1}\" para el atributo \"{0}\" +parsing.invalidExtensionElement=elemento de extensi\u00F3n no v\u00E1lido: \"{0}\" (en el espacio de nombres \"{1}\") +parsing.invalidWsdlElement=elemento WSDL no v\u00E1lido: \"{0}\" +parsing.requiredExtensibilityElement=elemento de extensibilidad necesario desconocido\\"{0}\\" (en el espacio de nombres \\"{1}\\") +parsing.tooManyElements=demasiados elementos \"{0}\" en el elemento \"{1}\" \"{2}\" +parsing.invalidOperationStyle=la operaci\u00F3n \"{0}\" tiene un estilo no v\u00E1lido +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed=S\u00F3lo se permite un elemento "types" en "{0}". +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed=S\u00F3lo se permite un elemento "documentation" en "{0}". +parsing.incorrectRootElement=se esperaba el elemento ra\u00EDz \\"{2}\\" (en el espacio de nombres \\"{3}\\"), pero se ha encontrado el elemento \\"{0}\\" (en el espacio de nombres \\"{1}\\") +parsing.unknownImportedDocumentType=el documento importado es de un tipo desconocido: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=Prefijo de espacio de nombres no declarado: \"{0}\". +parsing.invalidURI=URI no v\u00E1lido: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=fallo al analizar el documento en \"{0}\" +# {0} - exception message +parsing.ioException=fallo al analizar: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=Archivo WSDL no v\u00E1lido. Fallo al analizar el documento en \"{0}\". +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=Archivo WSDL no v\u00E1lido. Fallo al realizar el an\u00E1lisis: {0}. +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=Archivo WSDL no v\u00E1lido. Fallo al realizar el an\u00E1lisis: {0}. +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=Archivo WSDL no v\u00E1lido. Fallo al realizar el an\u00E1lisis: {0}. + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=Falta el atributo necesario \"{1}\" del elemento \"{0}\". +parsing.invalidTag=se esperaba el elemento \"{1}\", pero se ha encontrado \"{0}\" +# {4} - element name +parsing.invalidTagNS=WSDL no v\u00E1lido en {4}: se esperaba el elemento \"{2}\" (en el espacio de nombres \"{3}\"), pero se ha encontrado el elemento \"{0}\" (en el espacio de nombres \"{1}\") +parsing.nonWhitespaceTextFound=se ha encontrado un texto sin espacios en blanco inesperado: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=Se ha encontrado un no elemento inesperado. +# +entity.duplicate=entidad duplicada: \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=Entidad \"{0}\" duplicada: \"{1}\". + +entity.notFoundByID=identificador de entidad no v\u00E1lido: \\"{0}\\" +entity.notFoundByQName={0} \\"{1}\\" no encontrado en el WSDL: {2} +entity.notFound.portType=se hace referencia a wsdl:portType \\"{0}\\" en wsdl:binding \\"{1}\\", pero no se ha encontrado en el WSDL +entity.notFound.binding=se hace referencia a wsdl:binding \\"{0}" en wsdl:port \\"{1}\\", pero no se ha encontrado en el WSDL + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=Falta el atributo necesario \"{0}\" del elemento \"{1}\". +validation.missingRequiredProperty=falta la propiedad necesaria \"{0}\" del elemento \"{1}\" +validation.missingRequiredSubEntity=falta la subentidad necesaria \"{0}\" del elemento \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=Elemento no v\u00E1lido: \"{0}\". +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=elemento no v\u00E1lido: \\"{1}\\", tiene un simpleType con nombre: \\"{0}\\" +validation.duplicatedElement=elemento duplicado: \"{0}\" +validation.duplicatePartName=WSDL no v\u00E1lido; no se permiten partes duplicadas en wsdl:message. \nwsdl:message {0} tiene un nombre de parte duplicado: \\"{1}\\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=Subelemento no v\u00E1lido \"{0}\" del elemento \"{1}\". +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=Atributo no v\u00E1lido \"{0}\" del elemento \"{1}\". +validation.invalidAttributeValue=valor no v\u00E1lido \"{1}\" para el atributo \"{0}\" +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=atributos exclusivos: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=el espacio de nombres de destino es incorrecto (se esperaba: {1}, pero se ha encontrado: {0}) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=error interno ("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=nombre de operaci\u00F3n ambiguo: \\"{0}\\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="No se soporta el uso de la codificaci\u00F3n SOAP. \nEl elemento de extensi\u00F3n SOAP de la l\u00EDnea {0} en {1} tiene use=\\"encoded\\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=Ignorando acci\u00F3n vac\u00EDa en el elemento \"{0}\" {1} de la operaci\u00F3n \"{2}\". Se utilizar\u00E1 la acci\u00F3n por defecto. +# Not concatenated with any other string. +warning.inputOutputEmptyAction=Ignorando acci\u00F3n vac\u00EDa en el elemento {0} de la operaci\u00F3n \"{1}\". Se utilizar\u00E1 la acci\u00F3n por defecto. + +#wsi compliant WSDL warnings +warning.wsi.r2001=No es un WSDL compatible con WSI-BP (R2001, R2002). wsdl:import s\u00F3lo debe importar documentos WSDL. Est\u00E1 intentando importar: \\"{0}\\" +warning.wsi.r2002=No es un WSDL compatible con WSI-BP (R2002). wsdl:import no se debe utilizar para importar esquemas XML embebidos en el documento WSDL. Se esperaba el espacio de nombres de WSDL: {0}, pero se ha encontrado: {1} +warning.wsi.r2003=No es un WSDL compatible con WSI-BP (R2003). xsd:import s\u00F3lo se debe utilizar dentro de elementos xsd:schema. +warning.wsi.r2004=No es un WSDL compatible con WSI-BP (R2001, R2004). wsdl:import no debe importar definiciones de esquemas XML embebidas en l\u00EDnea en el documento WSDL. + +#Parser +Parsing.ParseFailed = \tFallo al analizar el WSDL. + +Parsing.NotAWSDL=Fallo al obtener componentes WSDL. Probablemente {0} no es un archivo WSDL v\u00E1lido. + +AbstractReferenceFinderImpl.UnableToParse = \tNo se ha podido analizar "{0}": {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \tNo es un archivo de enlace externo. El elemento ra\u00EDz deben ser enlaces ''{''http://java.sun.com/xml/ns/jaxws''}'', pero es ''{''{0}''}''{1}. + + +#Internalizer +Internalizer.TwoVersionAttributes = \tTanto jaxws:version como version existen +Internalizer.IncorrectVersion = \tEl atributo de la versi\u00F3n de JAX-WS debe ser "2.0" + +Internalizer.VersionNotPresent = \tEl atributo de la versi\u00F3n de JAX-WS debe existir + +internalizer.targetNotAnElement= \tEl nodo de destino no es un elemento +internalizer.targetNotFound= \tNo se ha encontrado ning\u00FAn destino para wsdlLocation: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" no forma parte de esta compilaci\u00F3n. \u00BFEs un error de "{1}"? + +internalizer.XPathEvaluationError = Error de XPath: {0} +internalizer.XPathEvaluatesToNoTarget = La evaluaci\u00F3n de XPath de "{0}" da lugar a un nodo de destino vac\u00EDo +internalizer.XPathEvaulatesToTooManyTargets = La evaluaci\u00F3n de XPath de "{0}" da lugar a demasiados nodos de destino ({1}) +internalizer.XPathEvaluatesToNonElement = La evaluaci\u00F3n de XPath de "{0}" debe dar lugar a un elemento. +invalid.customization.namespace=Ignorando la personalizaci\u00F3n: \"{0}\", porque no tiene ning\u00FAn espacio de nombres. Debe pertenecer al espacio de nombres de personalizaci\u00F3n. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="No es un documento WSDL: {0}, proporciona \"{1}\"; reintentando con MEX..." +invalid.wsdl=WSDL no v\u00E1lido {0}; se esperaba {1}, pero se ha encontrado {2} en (l\u00EDnea{3}) +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nreintentando con MEX... +file.not.found=No se puede acceder a {0} +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=No se ha encontrado wsdl:service en los WSDL(s) proporcionados: \n\n{0} Es necesario proporcionar al menos un WSDL con al menos una definici\u00F3n de servicio. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties new file mode 100644 index 00000000000..31f805c69fd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_fr.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=l''espace de noms par d\u00E9faut doit \u00EAtre \"{0}\" +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=seul l''un des attributs \"element\" ou \"type\" est autoris\u00E9 dans la partie \"{0}\" +# Not concatenated with any other string. +parsing.elementOrTypeRequired=avertissement : la partie {0} n''est pas prise en compte, l''attribut \"element\" ou \"type\" est requis dans la partie \"{0}\" +parsing.invalidElement=\u00E9l\u00E9ment non valide : \"{0}\" (dans l''espace de noms \"{1}\") +parsing.invalidAttributeValue=valeur \"{1}\" non valide pour l''attribut \"{0}\" +parsing.invalidExtensionElement=\u00E9l\u00E9ment d''extension non valide : \"{0}\" (dans l''espace de noms \"{1}\") +parsing.invalidWsdlElement=\u00E9l\u00E9ment WSDL non valide : \"{0}\" +parsing.requiredExtensibilityElement=\u00E9l\u00E9ment d''extensibilit\u00E9 \"{0}\" obligatoire inconnu (dans l''espace de noms \"{1}\") +parsing.tooManyElements=trop d''\u00E9l\u00E9ments \"{0}\" sous l''\u00E9l\u00E9ment \"{1}\" \"{2}\" +parsing.invalidOperationStyle=l''op\u00E9ration \"{0}\" a un style non valide +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed=un seul \u00E9l\u00E9ment "types" autoris\u00E9 dans "{0}" +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed=un seul \u00E9l\u00E9ment "documentation" autoris\u00E9 dans "{0}" +parsing.incorrectRootElement=\u00E9l\u00E9ment racine \"{2}\" attendu (dans l''espace de noms \"{3}\"), \u00E9l\u00E9ment \"{0}\" trouv\u00E9 (dans l''espace de noms \"{1}\") +parsing.unknownImportedDocumentType=le document import\u00E9 est de type inconnu : {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=pr\u00E9fixe d''espace de noms non d\u00E9clar\u00E9 : \"{0}\" +parsing.invalidURI=URI non valide : {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=\u00E9chec de l''analyse du document \u00E0 \"{0}\" +# {0} - exception message +parsing.ioException=\u00E9chec de l''analyse : {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=fichier WSDL non valide. Echec de l''analyse du document \u00E0 \"{0}\" +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=fichier WSDL non valide. Echec de l''analyse : {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=fichier WSDL non valide. Echec de l''analyse : {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=fichier WSDL non valide. Echec de l''analyse : {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=attribut \"{1}\" obligatoire de l''\u00E9l\u00E9ment \"{0}\" manquant +parsing.invalidTag=\u00E9l\u00E9ment \"{1}\" attendu, \"{0}\" trouv\u00E9 +# {4} - element name +parsing.invalidTagNS=WSDL non valide \u00E0 {4} : \u00E9l\u00E9ment \"{2}\" attendu (dans l''espace de noms \"{3}\"), \u00E9l\u00E9ment \"{0}\" trouv\u00E9 (dans l''espace de noms \"{1}\") +parsing.nonWhitespaceTextFound=texte non imprimable inattendu trouv\u00E9 : \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=non-\u00E9l\u00E9ment inattendu trouv\u00E9 +# +entity.duplicate=entit\u00E9 en double : \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=entit\u00E9 \"{0}\" en double : \"{1}\" + +entity.notFoundByID=ID d''entit\u00E9 non valide : \"{0}\" +entity.notFoundByQName={0} \"{1}\" introuvable dans le WSDL : {2} +entity.notFound.portType=wsdl:portType \"{0}\" r\u00E9f\u00E9renc\u00E9 par wsdl:binding \"{1}\", mais il est introuvable dans le WSDL +entity.notFound.binding=wsdl:binding \"{0}" r\u00E9f\u00E9renc\u00E9 par wsdl:port \"{1}\", mais il est introuvable dans le WSDL + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=attribut \"{0}\" obligatoire de l''\u00E9l\u00E9ment \"{1}\" manquant +validation.missingRequiredProperty=la propri\u00E9t\u00E9 obligatoire \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" est absente +validation.missingRequiredSubEntity=la sous-entit\u00E9 obligatoire \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" est absente +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=\u00E9l\u00E9ment non valide : \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=\u00E9l\u00E9ment \"{1}\" non valide, a nomm\u00E9 simpleType: \"{0}\" +validation.duplicatedElement=\u00E9l\u00E9ment \"{0}\" en double +validation.duplicatePartName=WSDL non valide, les parties en double dans l''\u00E9l\u00E9ment wsdl:message ne sont pas autoris\u00E9es. \nL''\u00E9l\u00E9ment wsdl:message {0} comporte un nom de partie en double : \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=le sous-\u00E9l\u00E9ment \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" n''est pas valide +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=l''attribut \"{0}\" de l''\u00E9l\u00E9ment \"{1}\" n''est pas valide +validation.invalidAttributeValue=valeur \"{1}\" non valide pour l''attribut \"{0}\" +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=attributs exclusifs : \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=l''espace de noms cible est incorrect ({1} attendu, {0} trouv\u00E9) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=erreur interne ("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=nom d''op\u00E9ration ambigu : \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="L''utilisation de l''encodage SOAP n''est pas prise en charge. \nL''\u00E9l\u00E9ment d''extension SOAP \u00E0 la ligne {0} dans {1} a use=\"encoded\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=non-prise en compte de l''action vide dans l''\u00E9l\u00E9ment \"{0}\" {1} de l''op\u00E9ration \"{2}\", utilisation de l''\u00E9l\u00E9ment par d\u00E9faut \u00E0 la place +# Not concatenated with any other string. +warning.inputOutputEmptyAction=non-prise en compte de l''action vide dans l''\u00E9l\u00E9ment {0} de l''op\u00E9ration \"{1}\", utilisation de l''\u00E9l\u00E9ment par d\u00E9faut \u00E0 la place + +#wsi compliant WSDL warnings +warning.wsi.r2001=N''est pas un WSDL conforme \u00E0 WSI-BP (R2001, R2002). wsdl:import doit importer uniquement des documents WSDL. Il tente d''importer \"{0}\" +warning.wsi.r2002=N''est pas un WSDL conforme \u00E0 WSI-BP (R2002). wsdl:import ne doit pas \u00EAtre utilis\u00E9 pour importer l''instance XML Schema imbriqu\u00E9e dans le document WSDL. Espace de noms WSDL {0} attendu, {1} trouv\u00E9 +warning.wsi.r2003=N'est pas un WSDL conforme \u00E0 WSI-BP (R2003). xsd:import doit \u00EAtre utilis\u00E9 uniquement dans les \u00E9l\u00E9ments xsd.schema. +warning.wsi.r2004=N'est pas un WSDL conforme \u00E0 WSI-BP (R2001, R2004). xsd:import ne doit pas importer les d\u00E9finitions XML Schema imbriqu\u00E9es incorpor\u00E9es dans le document WSDL. + +#Parser +Parsing.ParseFailed = \tEchec de l'analyse du WSDL. + +Parsing.NotAWSDL=Echec d''obtention des composants WSDL, {0} n''est probablement pas un fichier WSDL valide. + +AbstractReferenceFinderImpl.UnableToParse = \tImpossible d''analyser "{0}" : {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \tn''est pas un fichier de binding externe. L''\u00E9l\u00E9ment racine doit correspondre aux bindings ''{''http://java.sun.com/xml/ns/jaxws''}'', mais il s''agit de ''{''{0}''}''{1} + + +#Internalizer +Internalizer.TwoVersionAttributes = \tjaxws:version et version sont tous deux pr\u00E9sents +Internalizer.IncorrectVersion = \tL'attribut de version JAXWS doit \u00EAtre "2.0" + +Internalizer.VersionNotPresent = \tL'attribut de version JAXWS doit \u00EAtre pr\u00E9sent + +internalizer.targetNotAnElement= \tLe noeud cible n'est pas un \u00E9l\u00E9ment +internalizer.targetNotFound= \tCible introuvable pour wsdlLocation : {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" ne fait pas partie de cette compilation. S''agit-il d''une erreur pour "{1}" ? + +internalizer.XPathEvaluationError = Erreur XPath : {0} +internalizer.XPathEvaluatesToNoTarget = L''\u00E9valuation XPath de "{0}" g\u00E9n\u00E8re un noeud cible vide +internalizer.XPathEvaulatesToTooManyTargets = L''\u00E9valuation XPath de "{0}" g\u00E9n\u00E8re un trop grand nombre de noeuds cible ({1}) +internalizer.XPathEvaluatesToNonElement = L''\u00E9valuation XPath de "{0}" doit g\u00E9n\u00E9rer un \u00E9l\u00E9ment. +invalid.customization.namespace=Non-prise en compte de la personnalisation \"{0}\", car elle ne contient aucun espace de noms. Elle doit appartenir \u00E0 l''espace de noms de personnalisation. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="N''est pas un document WSDL : {0}, il g\u00E9n\u00E8re \"{1}\", nouvelle tentative avec MEX..." +invalid.wsdl=WSDL {0} non valide, {1} attendu, {2} trouv\u00E9 dans (ligne {3}) +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nnouvelle tentative avec MEX... +file.not.found={0} est inaccessible +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=wsdl:service introuvable dans les WSDL fournis : \n\n{0} Au moins un WSDL avec au moins une d\u00E9finition de service doit \u00EAtre fourni. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties new file mode 100644 index 00000000000..a02fba35462 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_it.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=lo spazio di nomi predefinito deve essere \"{0}\" +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=nella parte \"{0}\" \u00E8 consentito solo un attributo \"element\" o \"type\" +# Not concatenated with any other string. +parsing.elementOrTypeRequired=avvertenza: la parte {0} viene ignorata. Nella parte \"{0}\" \u00E8 richiesto l''attributo \"element\" o \"type\" +parsing.invalidElement=elemento: \"{0}\" non valido (nello spazio di nomi \"{1}\") +parsing.invalidAttributeValue=valore \"{1}\" non valido per l''attributo \"{0}\" +parsing.invalidExtensionElement=elemento extension: \"{0}\" non valido (nello spazio di nomi \"{1}\") +parsing.invalidWsdlElement=elemento WSDL: \''{0}\'' non valido +parsing.requiredExtensibilityElement=elemento di estensione richiesto \"{0}\" sconosciuto (nello spazio di nomi \"{1}\") +parsing.tooManyElements=troppi elementi \"{0}\" nell''elemento \"{1}\" \"{2}\" +parsing.invalidOperationStyle=l''operazione \"{0}\" ha uno stile non valido +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed=\u00E8 consentito solo un elemento "types" in "{0}" +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed=\u00E8 consentito solo un elemento "documentation" in "{0}" +parsing.incorrectRootElement=previsto elemento radice \"{2}\" (nello spazio di nomi \"{3}\"), trovato elemento \"{0}\" (nello spazio di nomi \"{1}\") +parsing.unknownImportedDocumentType=il documento importato \u00E8 di tipo sconosciuto: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=prefisso di spazio di nomi non dichiarato: \"{0}\" +parsing.invalidURI=URI non valido: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=analisi del documento in \"{0}\" non riuscita +# {0} - exception message +parsing.ioException=analisi non riuscita: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=file WSDL non valido. Analisi del documento in \"{0}\" non riuscita +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=file WSDL non valido. Analisi non riuscita: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=file WSDL non valido. Analisi non riuscita: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=file WSDL non valido. Analisi non riuscita: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=attributo obbligatorio \"{1}\" dell''elemento \"{0}\" mancante +parsing.invalidTag=elemento previsto \"{1}\", trovato \"{0}\" +# {4} - element name +parsing.invalidTagNS=WSDL non valido in {4}: previsto elemento \"{2}\" (nello spazio di nomi \"{3}\"), trovato elemento \"{0}\" (nello spazio di nomi \"{1}\") +parsing.nonWhitespaceTextFound=trovato del testo senza spazi imprevisto: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=trovato non elemento imprevisto +# +entity.duplicate=entit\u00E0 duplicata: \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=entit\u00E0 \"{0}\" duplicata: \"{1}\" + +entity.notFoundByID=ID entit\u00E0: \''{0}\'' non valido +entity.notFoundByQName={0} \"{1}\" non trovata in WSDL: {2} +entity.notFound.portType=a wsdl:portType \"{0}\" viene fatto riferimento da wsdl:binding \"{1}\" ma non \u00E8 presente in wsdl +entity.notFound.binding=a wsdl:binding \"{0}\" viene fatto riferimento da wsdl:port \"{1}\" ma non \u00E8 presente in wsdl + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=attributo obbligatorio \"{0}\" dell''elemento \"{1}\" mancante +validation.missingRequiredProperty=propriet\u00E0 obbligatoria \"{0}\" dell''elemento \"{1}\" mancante +validation.missingRequiredSubEntity=entit\u00E0 secondaria obbligatoria \"{0}\" dell''elemento \"{1}\" mancante +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=elemento: \''{0}\'' non valido +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=elemento: \"{1}\" non valido, ha un simpleType denominato: \"{0}\" +validation.duplicatedElement=elemento duplicato: \''{0}\'' +validation.duplicatePartName=WSDL non valido. Le parti duplicate in wsdl:message non sono consentite. \nwsdl:message {0} ha un nome parte duplicato: \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=elemento secondario \"{0}\" non valido dell''elemento \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=attributo \"{0}\" non valido dell''elemento \"{1}\" +validation.invalidAttributeValue=valore \"{1}\" non valido per l''attributo \"{0}\" +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=attributi esclusivi: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=lo spazio di nomi di destinazione \u00E8 errato (previsto: {1}, trovato: {0}) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=errore interno (''{0}'') +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=nome dell''operazione ambiguo: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="Uso della codifica SOAP non supportato. \nL''elemento SOAP extension sulla riga {0} in {1} ha use=\"encoded\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=l''azione vuota nell''elemento {1} \"{0}\" dell''operazione \"{2}\" verr\u00E0 ignorata. Viene usato invece il valore predefinito. +# Not concatenated with any other string. +warning.inputOutputEmptyAction=l''azione vuota nell''elemento {0} dell''operazione \"{1}\" verr\u00E0 ignorata. Viene usato invece il valore predefinito. + +#wsi compliant WSDL warnings +warning.wsi.r2001=WSDL non conforme a WSI-BP (R2001, R2002). wsdl:import deve importare solo documenti WSDL. Sta tentando di importare: \"{0}\" +warning.wsi.r2002=WSDL non conforme a WSI-BP (R2002). wsdl:import non deve essere usato per importare lo schema XML incorporato nel documento WSDL. Spazio di nomi WSDL previsto: {0}, trovato: {1} +warning.wsi.r2003=WSDL non conforme a WSI-BP (R2003). wsdl:import deve essere usato solo all'interno di elementi xsd:schema. +warning.wsi.r2004=WSDL non conforme a WSI-BP (R2001, R2004). wsdl:import non deve importare le definizioni di schema XML incorporate in linea nel documento WSDL. + +#Parser +Parsing.ParseFailed = \tAnalisi di WSDL non riuscita. + +Parsing.NotAWSDL=Recupero dei componenti WSDL non riuscito. \u00C8 possibile che {0} non sia un file WSDL valido. + +AbstractReferenceFinderImpl.UnableToParse = \tImpossibile analizzare "{0}" : {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \tnon \u00E8 un file di associazione esterno. L''elemento radice deve essere ''{''http://java.sun.com/xml/ns/jaxws''}''bindings ma \u00E8 ''{''{0}''}''{1} + + +#Internalizer +Internalizer.TwoVersionAttributes = \tSono presenti jaxws:version e version +Internalizer.IncorrectVersion = \tL'attributo JAXWS version deve essere "2.0" + +Internalizer.VersionNotPresent = \tL'attributo JAXWS version deve essere presente + +internalizer.targetNotAnElement= \tIl nodo di destinazione non \u00E8 un elemento +internalizer.targetNotFound= \tNessuna destinazione trovata per wsdlLocation: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" non fa parte di questa compilazione. Si tratta di un errore per "{1}"? + +internalizer.XPathEvaluationError = Errore XPath: {0} +internalizer.XPathEvaluatesToNoTarget = La valutazione XPath di "{0}" restituisce un nodo di destinazione vuoto +internalizer.XPathEvaulatesToTooManyTargets = La valutazione XPath di "{0}" restituisce troppi ({1}) nodi di destinazione +internalizer.XPathEvaluatesToNonElement = La valutazione XPath di "{0}" deve restituire un elemento. +invalid.customization.namespace=La personalizzazione: \"{0}\" verr\u00E0 ignorata poich\u00E9 non ha uno spazio di nomi. Deve appartenere allo spazio di nomi della personalizzazione. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="Non \u00E8 un documento WSDL: {0}. Restituisce \"{1}\". Nuovo tentativo con MEX in corso..." +invalid.wsdl=WSDL non valido {0}: previsto {1}, trovato {2} in (riga {3}) +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nnuovo tentativo con MEX in corso... +file.not.found={0} non raggiungibile +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=Impossibile trovare wsdl:service nei WSDL forniti: \n\n{0} \u00C8 necessario fornire almeno un WSDL con almeno una definizione di servizio. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties new file mode 100644 index 00000000000..ee0bf0d499d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ja.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306F\"{0}\"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=\u30D1\u30FC\u30C8\"{0}\"\u3067\u306F\u3001\"element\"\u307E\u305F\u306F\"type\"\u5C5E\u6027\u306E\u3044\u305A\u308C\u304B1\u3064\u306E\u307F\u304C\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u3059 +# Not concatenated with any other string. +parsing.elementOrTypeRequired=\u8B66\u544A: \u30D1\u30FC\u30C8{0}\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30D1\u30FC\u30C8\"{0}\"\u3067\u306F\u3001\"element\"\u307E\u305F\u306F\"type\"\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059 +parsing.invalidElement=\u7121\u52B9\u306A\u8981\u7D20: \"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185) +parsing.invalidAttributeValue=\u5C5E\u6027\"{0}\"\u306E\u5024\"{1}\"\u306F\u7121\u52B9\u3067\u3059 +parsing.invalidExtensionElement=\u7121\u52B9\u306A\u62E1\u5F35\u8981\u7D20: \"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185) +parsing.invalidWsdlElement=\u7121\u52B9\u306AWSDL\u8981\u7D20: \"{0}\" +parsing.requiredExtensibilityElement=\u5FC5\u9808\u306E\u62E1\u5F35\u6027\u8981\u7D20\"{0}\"\u304C\u4E0D\u660E\u3067\u3059(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185) +parsing.tooManyElements=\"{1}\"\u8981\u7D20\"{2}\"\u306E\u4E0B\u306E\"{0}\"\u8981\u7D20\u304C\u591A\u3059\u304E\u307E\u3059 +parsing.invalidOperationStyle=\u64CD\u4F5C\"{0}\"\u306E\u30B9\u30BF\u30A4\u30EB\u304C\u7121\u52B9\u3067\u3059 +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed="{0}"\u3067\u8A31\u53EF\u3055\u308C\u3066\u3044\u308B"types"\u8981\u7D20\u306F1\u3064\u306E\u307F\u3067\u3059 +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed="{0}"\u3067\u8A31\u53EF\u3055\u308C\u3066\u3044\u308B"documentation"\u8981\u7D20\u306F1\u3064\u306E\u307F\u3067\u3059 +parsing.incorrectRootElement=\u30EB\u30FC\u30C8\u8981\u7D20\"{2}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{3}\"\u5185)\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u8981\u7D20\"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +parsing.unknownImportedDocumentType=\u30A4\u30F3\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30BF\u30A4\u30D7\u304C\u4E0D\u660E\u3067\u3059: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=\u5BA3\u8A00\u3055\u308C\u3066\u3044\u306A\u3044\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u63A5\u982D\u8F9E: \"{0}\" +parsing.invalidURI=\u7121\u52B9\u306AURI: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=\"{0}\"\u3067\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F +# {0} - exception message +parsing.ioException=\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\"{0}\"\u3067\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=\u7121\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u3059\u3002\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=\u8981\u7D20\"{0}\"\u306E\u5FC5\u9808\u5C5E\u6027\"{1}\"\u304C\u3042\u308A\u307E\u305B\u3093 +parsing.invalidTag=\u8981\u7D20\"{1}\"\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +# {4} - element name +parsing.invalidTagNS={4}\u306EWSDL\u304C\u7121\u52B9\u3067\u3059: \u8981\u7D20\"{2}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{3}\"\u5185)\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u8981\u7D20\"{0}\"(\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\"{1}\"\u5185)\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +parsing.nonWhitespaceTextFound=\u4E88\u671F\u3057\u306A\u3044\u7A7A\u767D\u4EE5\u5916\u306E\u30C6\u30AD\u30B9\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=\u4E88\u671F\u3057\u306A\u3044\u975E\u8981\u7D20\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +# +entity.duplicate=\u91CD\u8907\u3057\u305F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=\u91CD\u8907\u3057\u305F\"{0}\"\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3: \"{1}\" + +entity.notFoundByID=\u7121\u52B9\u306A\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3ID: \"{0}\" +entity.notFoundByQName={0} \"{1}\"\u304CWSDL\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {2} +entity.notFound.portType=wsdl:portType \"{0}\"\u306Fwsdl:binding \"{1}\"\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001WSDL\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +entity.notFound.binding=wsdl:binding \"{0}"\u306Fwsdl:port \"{1}\"\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001WSDL\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093 + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=\u8981\u7D20\"{1}\"\u306E\u5FC5\u9808\u5C5E\u6027\"{0}\"\u304C\u3042\u308A\u307E\u305B\u3093 +validation.missingRequiredProperty=\u8981\u7D20\"{1}\"\u306E\u5FC5\u9808\u30D7\u30ED\u30D1\u30C6\u30A3\"{0}\"\u304C\u3042\u308A\u307E\u305B\u3093 +validation.missingRequiredSubEntity=\u8981\u7D20\"{1}\"\u306E\u5FC5\u9808\u30B5\u30D6\u30A8\u30F3\u30C8\u30EA\"{0}\"\u304C\u3042\u308A\u307E\u305B\u3093 +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=\u7121\u52B9\u306A\u8981\u7D20: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=\u8981\u7D20: \"{1}\"\u304C\u7121\u52B9\u3067\u3059\u3002\u540D\u524D\u4ED8\u304DsimpleType: \"{0}\"\u304C\u542B\u307E\u308C\u307E\u3059 +validation.duplicatedElement=\u91CD\u8907\u3057\u305F\u8981\u7D20: \"{0}\" +validation.duplicatePartName=\u7121\u52B9\u306AWSDL\u3067\u3042\u308A\u3001wsdl:message\u306E\u91CD\u8907\u3057\u305F\u30D1\u30FC\u30C8\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\nwsdl:message {0}\u306B\u306F\u91CD\u8907\u3057\u305F\u30D1\u30FC\u30C8\u540D: \"{1}\"\u304C\u3042\u308A\u307E\u3059 +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=\u8981\u7D20\"{1}\"\u306E\u30B5\u30D6\u8981\u7D20\"{0}\"\u306F\u7121\u52B9\u3067\u3059 +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=\u8981\u7D20\"{1}\"\u306E\u5C5E\u6027\"{0}\"\u306F\u7121\u52B9\u3067\u3059 +validation.invalidAttributeValue=\u5C5E\u6027\"{0}\"\u306E\u5024\"{1}\"\u306F\u7121\u52B9\u3067\u3059 +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=\u6392\u4ED6\u5C5E\u6027: \"{0}\"\u3001\"{1}\" +validation.incorrectTargetNamespace=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093({1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=\u5185\u90E8\u30A8\u30E9\u30FC("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=\u3042\u3044\u307E\u3044\u306A\u64CD\u4F5C\u540D: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="SOAP\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u306E\u4F7F\u7528\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\n{1}\u306E\u884C{0}\u306ESOAP\u62E1\u5F35\u8981\u7D20\u306B\u306Fuse=\"encoded\"\u304C\u542B\u307E\u308C\u307E\u3059" +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=\"{2}\"\u64CD\u4F5C\u306E\"{0}\" {1}\u8981\u7D20\u306E\u7A7A\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u304B\u308F\u308A\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 +# Not concatenated with any other string. +warning.inputOutputEmptyAction=\"{1}\"\u64CD\u4F5C\u306E{0}\u8981\u7D20\u306E\u7A7A\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u304B\u308F\u308A\u306B\u30C7\u30D5\u30A9\u30EB\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 + +#wsi compliant WSDL warnings +warning.wsi.r2001=WSI-BP\u6E96\u62E0WSDL (R2001\u3001R2002)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002wsdl:import\u3067\u306FWSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u307F\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\"{0}\"\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u3092\u8A66\u884C\u3057\u3066\u3044\u307E\u3059 +warning.wsi.r2002=WSI-BP\u6E96\u62E0WSDL (R2002)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002wsdl:import\u306F\u3001WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u57CB\u3081\u8FBC\u307E\u308C\u305FXML\u30B9\u30AD\u30FC\u30DE\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306B\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002WSDL\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9: {0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +warning.wsi.r2003=WSI-BP\u6E96\u62E0WSDL (R2003)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002xsd:import\u306F\u3001xsd:schema\u8981\u7D20\u5185\u3067\u306E\u307F\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +warning.wsi.r2004=WSI-BP\u6E96\u62E0WSDL (R2001\u3001R2004)\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002xsd:import\u3067\u306F\u3001WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306B\u30A4\u30F3\u30E9\u30A4\u30F3\u306B\u57CB\u3081\u8FBC\u307E\u308C\u305FXML\u30B9\u30AD\u30FC\u30DE\u5B9A\u7FA9\u306F\u30A4\u30F3\u30DD\u30FC\u30C8\u3067\u304D\u307E\u305B\u3093\u3002 + +#Parser +Parsing.ParseFailed = \tWSDL\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 + +Parsing.NotAWSDL=WSDL\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002{0}\u304C\u6709\u52B9\u306AWSDL\u30D5\u30A1\u30A4\u30EB\u3067\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 + +AbstractReferenceFinderImpl.UnableToParse = \t"{0}"\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093: {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \t\u5916\u90E8\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30EB\u30FC\u30C8\u8981\u7D20\u306F''{''http://java.sun.com/xml/ns/jaxws''}''bindings\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001''{''{0}''}''{1}\u3067\u3059 + + +#Internalizer +Internalizer.TwoVersionAttributes = \tjaxws:version\u304A\u3088\u3073\u30D0\u30FC\u30B8\u30E7\u30F3\u306E\u4E21\u65B9\u304C\u5B58\u5728\u3057\u307E\u3059 +Internalizer.IncorrectVersion = \tJAXWS\u306Eversion\u5C5E\u6027\u306F"2.0"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +Internalizer.VersionNotPresent = \tJAXWS\u306Eversion\u5C5E\u6027\u304C\u5B58\u5728\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +internalizer.targetNotAnElement= \t\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u306F\u8981\u7D20\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +internalizer.targetNotFound= \twsdlLocation: {0}\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 + +Internalizer.IncorrectSchemaReference= \t"{0}"\u306F\u3053\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u306E\u4E00\u90E8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"{1}"\u306E\u8AA4\u308A\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 + +internalizer.XPathEvaluationError = XPath\u30A8\u30E9\u30FC: {0} +internalizer.XPathEvaluatesToNoTarget = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u304C\u7A7A\u3068\u306A\u308A\u307E\u3057\u305F +internalizer.XPathEvaulatesToTooManyTargets = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30CE\u30FC\u30C9\u304C\u591A\u304F\u306A\u308A\u3059\u304E\u307E\u3057\u305F({1}) +internalizer.XPathEvaluatesToNonElement = "{0}"\u306EXPath\u8A55\u4FA1\u3067\u306F\u8981\u7D20\u3068\u306A\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +invalid.customization.namespace=\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304C\u306A\u3044\u305F\u3081\u3001\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA: \"{0}\"\u3092\u7121\u8996\u3057\u307E\u3059\u3002\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u30FB\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306B\u5C5E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="WSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0}\u3002\"{1}\"\u3092\u6307\u5B9A\u3057\u3001MEX\u3067\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059..." +invalid.wsdl=WSDL {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u6B21\u306E\u5834\u6240\u3067{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{2}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F(\u884C{3}) +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nMEX\u3067\u518D\u8A66\u884C\u3057\u3066\u3044\u307E\u3059... +file.not.found={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093 +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=\u6307\u5B9A\u3055\u308C\u305FWSDL\u3067wsdl:service\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F: \n\n{0} \u5C11\u306A\u304F\u3068\u30821\u3064\u306EWSDL\u3092\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u3068\u3068\u3082\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties new file mode 100644 index 00000000000..2dc230e9078 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_ko.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=\uAE30\uBCF8 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uB294 \"{0}\"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=\"element\" \uB610\uB294 \"type\" \uC18D\uC131 \uC911 \uD558\uB098\uB9CC \"{0}\" \uBD80\uBD84\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4. +# Not concatenated with any other string. +parsing.elementOrTypeRequired=\uACBD\uACE0: {0} \uBD80\uBD84\uC774 \uBB34\uC2DC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \"{0}\" \uBD80\uBD84\uC5D0\uB294 \"element\" \uB610\uB294 \"type\" \uC18D\uC131\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +parsing.invalidElement=\uBD80\uC801\uD569\uD55C \uC694\uC18C: \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC758 \"{0}\" +parsing.invalidAttributeValue=\"{0}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12 \"{1}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +parsing.invalidExtensionElement=\uBD80\uC801\uD569\uD55C \uD655\uC7A5 \uC694\uC18C: \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC758 \"{0}\" +parsing.invalidWsdlElement=\uBD80\uC801\uD569\uD55C WSDL \uC694\uC18C: \"{0}\" +parsing.requiredExtensibilityElement=\"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC758 \"{0}\"\uC740(\uB294) \uC54C \uC218 \uC5C6\uB294 \uD544\uC218 \uD655\uC7A5\uC131 \uC694\uC18C\uC785\uB2C8\uB2E4. +parsing.tooManyElements=\"{1}\" \uC694\uC18C\uC5D0 \"{0}\" \uC694\uC18C\uAC00 \uB108\uBB34 \uB9CE\uC2B5\uB2C8\uB2E4. \"{2}\" +parsing.invalidOperationStyle=\"{0}\" \uC791\uC5C5\uC5D0 \uBD80\uC801\uD569\uD55C \uC2A4\uD0C0\uC77C\uC774 \uC788\uC2B5\uB2C8\uB2E4. +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed=\uD558\uB098\uC758 "types" \uC694\uC18C\uB9CC "{0}"\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4. +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed=\uD558\uB098\uC758 "documentation" \uC694\uC18C\uB9CC "{0}"\uC5D0\uC11C \uD5C8\uC6A9\uB429\uB2C8\uB2E4. +parsing.incorrectRootElement=\"{3}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uB8E8\uD2B8 \uC694\uC18C \"{2}\"\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0\uC11C \"{0}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +parsing.unknownImportedDocumentType=\uC784\uD3EC\uD2B8\uB41C \uBB38\uC11C\uC758 \uC720\uD615\uC744 \uC54C \uC218 \uC5C6\uC74C: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=\uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4: \"{0}\" +parsing.invalidURI=\uBD80\uC801\uD569\uD55C URI: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=\"{0}\"\uC5D0 \uC788\uB294 \uBB38\uC11C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +# {0} - exception message +parsing.ioException=\uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \"{0}\"\uC5D0 \uC788\uB294 \uBB38\uC11C\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=WSDL \uD30C\uC77C\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4! \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=\"{0}\" \uC694\uC18C\uC758 \uD544\uC218 \uC18D\uC131 \"{1}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +parsing.invalidTag=\"{1}\" \uC694\uC18C\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \"{0}\"\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# {4} - element name +parsing.invalidTagNS={4}\uC5D0 \uBD80\uC801\uD569\uD55C WSDL\uC774 \uC788\uC74C: \"{3}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \"{2}\" \uC694\uC18C\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \"{1}\" \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0\uC11C \"{0}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +parsing.nonWhitespaceTextFound=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBE44\uACF5\uBC31 \uD14D\uC2A4\uD2B8\uB97C \uCC3E\uC74C: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=\uC608\uC0C1\uCE58 \uC54A\uC740 \uBE44\uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# +entity.duplicate=\uC911\uBCF5 \uC5D4\uD2F0\uD2F0: \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=\uC911\uBCF5 \"{0}\" \uC5D4\uD2F0\uD2F0: \"{1}\" + +entity.notFoundByID=\uBD80\uC801\uD569\uD55C \uC5D4\uD2F0\uD2F0 ID: \"{0}\" +entity.notFoundByQName={0} \"{1}\"\uC744(\uB97C) WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {2} +entity.notFound.portType=wsdl:portType \"{0}\"\uC774(\uAC00) wsdl:binding \"{1}\"\uC5D0\uC11C \uCC38\uC870\uB418\uC9C0\uB9CC WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +entity.notFound.binding=wsdl:binding \"{0}"\uC774(\uAC00) wsdl:port \"{1}\"\uC5D0\uC11C \uCC38\uC870\uB418\uC9C0\uB9CC WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=\"{1}\" \uC694\uC18C\uC758 \uD544\uC218 \uC18D\uC131 \"{0}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +validation.missingRequiredProperty=\"{1}\" \uC694\uC18C\uC758 \uD544\uC218 \uC18D\uC131 \"{0}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +validation.missingRequiredSubEntity=\"{1}\" \uC694\uC18C\uC758 \uD544\uC218 \uD558\uC704 \uC5D4\uD2F0\uD2F0 \"{0}\"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=\uBD80\uC801\uD569\uD55C \uC694\uC18C: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=\uBD80\uC801\uD569\uD55C \uC694\uC18C \"{1}\"\uC5D0 simpleType \"{0}\"\uC774(\uAC00) \uBA85\uBA85\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +validation.duplicatedElement=\uC911\uBCF5 \uC694\uC18C: \"{0}\" +validation.duplicatePartName=WSDL\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. wsdl:message\uC5D0\uB294 \uC911\uBCF5 \uBD80\uBD84\uC774 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \nwsdl:message {0}\uC5D0 \uC911\uBCF5 \uBD80\uBD84 \uC774\uB984\uC774 \uC788\uC74C: \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=\"{1}\" \uC694\uC18C\uC758 \uD558\uC704 \uC694\uC18C \"{0}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=\"{1}\" \uC694\uC18C\uC758 \"{0}\" \uC18D\uC131\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +validation.invalidAttributeValue=\"{0}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uAC12 \"{1}\"\uC774(\uAC00) \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=\uBC30\uD0C0\uC801 \uC18D\uC131: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=\uB300\uC0C1 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. {1}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=\uB0B4\uBD80 \uC624\uB958("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=\uBAA8\uD638\uD55C \uC791\uC5C5 \uC774\uB984: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="SOAP \uC778\uCF54\uB529 \uC0AC\uC6A9\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \n{1}\uC5D0\uC11C {0}\uD589\uC758 SOAP \uD655\uC7A5 \uC694\uC18C\uC5D0 use=\"encoded\"\uAC00 \uC788\uC2B5\uB2C8\uB2E4." +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=\"{2}\" \uC791\uC5C5\uC758 \"{0}\" {1} \uC694\uC18C\uC5D0\uC11C \uBE48 \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uB300\uC2E0 \uAE30\uBCF8\uAC12\uC744 \uC0AC\uC6A9\uD558\uB294 \uC911 +# Not concatenated with any other string. +warning.inputOutputEmptyAction=\"{1}\" \uC791\uC5C5\uC758 {0} \uC694\uC18C\uC5D0\uC11C \uBE48 \uC791\uC5C5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uB300\uC2E0 \uAE30\uBCF8\uAC12\uC744 \uC0AC\uC6A9\uD558\uB294 \uC911 + +#wsi compliant WSDL warnings +warning.wsi.r2001=WSI-BP \uD638\uD658 WSDL(R2001, R2002)\uC774 \uC544\uB2D9\uB2C8\uB2E4. wsdl:import\uB294 WSDL \uBB38\uC11C\uB9CC \uC784\uD3EC\uD2B8\uD574\uC57C \uD569\uB2C8\uB2E4. \"{0}\"\uC744(\uB97C) \uC784\uD3EC\uD2B8\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 +warning.wsi.r2002=WSI-BP \uD638\uD658 WSDL(R2002)\uC774 \uC544\uB2D9\uB2C8\uB2E4. WSDL \uBB38\uC11C\uC5D0 \uD3EC\uD568\uB41C XML \uC2A4\uD0A4\uB9C8\uB97C \uC784\uD3EC\uD2B8\uD558\uB294 \uB370\uB294 wsdl:import\uB97C \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. WSDL \uB124\uC784\uC2A4\uD398\uC774\uC2A4 {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +warning.wsi.r2003=WSI-BP \uD638\uD658 WSDL(R2003)\uC774 \uC544\uB2D9\uB2C8\uB2E4. xsd:import\uB294 xsd:schema \uC694\uC18C\uC5D0\uC11C\uB9CC \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. +warning.wsi.r2004=WSI-BP \uD638\uD658 WSDL(R2001, R2004)\uC774 \uC544\uB2D9\uB2C8\uB2E4. xsd:import\uB294 WSDL \uBB38\uC11C \uB0B4 \uC778\uB77C\uC778\uC73C\uB85C \uD3EC\uD568\uB41C XML \uC2A4\uD0A4\uB9C8 \uC815\uC758\uB97C \uC784\uD3EC\uD2B8\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. + +#Parser +Parsing.ParseFailed = \tWSDL\uC758 \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. + +Parsing.NotAWSDL=WSDL \uAD6C\uC131 \uC694\uC18C \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. {0}\uC774(\uAC00) \uC801\uD569\uD55C WSDL \uD30C\uC77C\uC774 \uC544\uB2CC \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. + +AbstractReferenceFinderImpl.UnableToParse = \t"{0}"\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \t\uC678\uBD80 \uBC14\uC778\uB529 \uD30C\uC77C\uC774 \uC544\uB2D9\uB2C8\uB2E4. \uB8E8\uD2B8 \uC694\uC18C\uB294 ''{''http://java.sun.com/xml/ns/jaxws''}''bindings\uC5EC\uC57C \uD558\uC9C0\uB9CC ''{''{0}''}''{1}\uC785\uB2C8\uB2E4. + + +#Internalizer +Internalizer.TwoVersionAttributes = \tjaxb:version\uACFC version\uC774 \uC788\uC2B5\uB2C8\uB2E4. +Internalizer.IncorrectVersion = \tJAXWS \uBC84\uC804 \uC18D\uC131\uC740 "2.0"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +Internalizer.VersionNotPresent = \tJAXWS \uBC84\uC804 \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +internalizer.targetNotAnElement= \t\uB300\uC0C1 \uB178\uB4DC\uAC00 \uC694\uC18C\uAC00 \uC544\uB2D9\uB2C8\uB2E4. +internalizer.targetNotFound= \tWSDL \uC704\uCE58\uC5D0 \uB300\uD55C \uB300\uC0C1\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}"\uC740(\uB294) \uC774 \uCEF4\uD30C\uC77C\uC5D0 \uC18D\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{1}"\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uACE0 \uD55C \uAC83\uC785\uB2C8\uAE4C? + +internalizer.XPathEvaluationError = XPath \uC624\uB958: {0} +internalizer.XPathEvaluatesToNoTarget = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uBE48 \uB300\uC0C1 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +internalizer.XPathEvaulatesToTooManyTargets = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uB108\uBB34 \uB9CE\uC740 ({1}) \uB300\uC0C1 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +internalizer.XPathEvaluatesToNonElement = "{0}"\uC758 XPath \uD3C9\uAC00\uB85C \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +invalid.customization.namespace=\uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544 \"{0}\" \uC0AC\uC6A9\uC790 \uC815\uC758\uB97C \uBB34\uC2DC\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC0AC\uC6A9\uC790 \uC815\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC18D\uD574\uC57C \uD569\uB2C8\uB2E4. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="WSDL \uBB38\uC11C\uAC00 \uC544\uB2D8: {0}. \"{1}\"\uC744(\uB97C) \uC81C\uACF5\uD569\uB2C8\uB2E4. MEX\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC7AC\uC2DC\uB3C4\uD558\uB294 \uC911..." +invalid.wsdl={0}\uC740(\uB294) \uBD80\uC801\uD569\uD55C WSDL\uC785\uB2C8\uB2E4. {1}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {3}\uD589\uC5D0\uC11C {2}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nMEX\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC7AC\uC2DC\uB3C4\uD558\uB294 \uC911... +file.not.found={0}\uC5D0 \uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=wsdl:service\uB97C \uC81C\uACF5\uB41C WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \n\n{0} \uC11C\uBE44\uC2A4 \uC815\uC758\uAC00 \uD558\uB098 \uC774\uC0C1\uC778 WSDL\uC744 \uD558\uB098 \uC774\uC0C1 \uC81C\uACF5\uD574\uC57C \uD569\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties new file mode 100644 index 00000000000..5770772248e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_pt_BR.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=namespace default deve ser \"{0}\" +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=somente um dos atributos \"element\" ou \"type\" \u00E9 permitido na parte \"{0}\" +# Not concatenated with any other string. +parsing.elementOrTypeRequired=advert\u00EAncia: a parte {0} \u00E9 ignorada, ou o \"element\" ou o atributo \"type\" \u00E9 obrigat\u00F3rio na parte \"{0}\" +parsing.invalidElement=elemento inv\u00E1lido: \"{0}\" (no namespace \"{1}\") +parsing.invalidAttributeValue=valor inv\u00E1lido \"{1}\" para o atributo \"{0}\" +parsing.invalidExtensionElement=elemento de extens\u00E3o inv\u00E1lido: \"{0}\" (no namespace \"{1}\") +parsing.invalidWsdlElement=elemento: \"{0}\" de WSDL inv\u00E1lido +parsing.requiredExtensibilityElement=elemento \\"{0}\\" de extensibilidade obrigat\u00F3rio desconhecido (no namespace \\"{1}\\") +parsing.tooManyElements=muitos elementos \"{0}\" no elemento \"{1}\" \"{2}\" +parsing.invalidOperationStyle=a opera\u00E7\u00E3o \"{0}\" tem um estilo inv\u00E1lido +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed=somente um elemento "tipos" permitido em "{0}" +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed=somente um elemento "documenta\u00E7\u00E3o" permitido em "{0}" +parsing.incorrectRootElement=elemento-raiz \"{2}\" esperado (no namespace \"{3}\"), elemento \"{0}\" encontrado (no namespace \"{1}\") +parsing.unknownImportedDocumentType=documento importado do tipo desconhecido: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=prefixo de namespace n\u00E3o declarado: \"{0}\" +parsing.invalidURI=URI: {0} inv\u00E1lido +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=falha ao fazer parse do documento em \"{0}\" +# {0} - exception message +parsing.ioException=o parse falhou: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=arquivo de WSL inv\u00E1lido! falha ao fazer parse do documento em \"{0}\" +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=arquivo WSDL inv\u00E1lido! falha de parse: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=arquivo WSDL inv\u00E1lido! falha de parse: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=arquivo WSDL inv\u00E1lido! falha de parse: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=o atributo \"{1}\" obrigat\u00F3rio do elemento \"{0}\" n\u00E3o foi encontrado +parsing.invalidTag=esperava o elemento \"{1}\"; encontrou \"{0}\" +# {4} - element name +parsing.invalidTagNS=WSDL inv\u00E1lido em {4}: esperava o elemento \\"{2}\\" (no namespace \\"{3}\\"); encontrou o elemento \\"{0}\\" (no namespace \\"{1}\\") +parsing.nonWhitespaceTextFound=detectou texto sem espa\u00E7o em branco: \"{0}\" inesperado +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=sem elemento encontrado inesperado +# +entity.duplicate=entidade: \"{0}\" duplicada +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=entidade \"{0}\" duplicada: \"{1}\" + +entity.notFoundByID=id da entidade: \"{0}\" inv\u00E1lida +entity.notFoundByQName={0} \\"{1}\\" n\u00E3o encontrada no wsdl: {2} +entity.notFound.portType=wsdl:portType \"{0}\" mencionado por wsdl:binding \"{1}\", mas n\u00E3o foi encontrado no wsdl +entity.notFound.binding=wsdl:binding \"{0}" mencionado por wsdl:port \"{1}\", mas n\u00E3o foi encontrado no wsdl + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=o atributo \"{0}\" obrigat\u00F3rio do elemento \"{1}\" n\u00E3o foi encontrado +validation.missingRequiredProperty=a propriedade \"{0}\" obrigat\u00F3ria do elemento \"{1}\" n\u00E3o foi encontrado +validation.missingRequiredSubEntity=a subentidade obrigat\u00F3ria \"{0}\" do elemento \"{1}\" n\u00E3o foi encontrada +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=elemento inv\u00E1lido: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=elemento: \"{1}\" inv\u00E1lido, tem simpleType: \"{0}\" nomeado +validation.duplicatedElement=elemento: \"{0}\" duplicado +validation.duplicatePartName=WSDL inv\u00E1lido, pe\u00E7as duplicadas em uma wsdl:message n\u00E3o \u00E9 permitida. \nwsdl:message {0} tem um nome de pe\u00E7a: \"{1}\" duplicado +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=subelemento inv\u00E1lido \"{0}\" do elemento \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=atributo inv\u00E1lido \"{0}\" do elemento \"{1}\" +validation.invalidAttributeValue=valor inv\u00E1lido \"{1}\" para o atributo \"{0}\" +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=atributos exclusivos: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=o namespace do alvo est\u00E1 incorreto (esperava: {1}; encontrou: {0}) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=erro interno ("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=nome da opera\u00E7\u00E3o: \"{0}\" amb\u00EDguo +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="O uso da Codifica\u00E7\u00E3o SOAP n\u00E3o \u00E9 suportado. \nO elemento da extens\u00E3o de SOAP na linha {0} em {1} tem o uso=\"encoded\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=ignorando A\u00E7\u00E3o vazia no elemento \"{0}\" {1} da opera\u00E7\u00E3o \"{2}\", usando default +# Not concatenated with any other string. +warning.inputOutputEmptyAction=ignorando A\u00E7\u00E3o vazia no elemento {0} da opera\u00E7\u00E3o \"{1}\"; usando o valor default em seu lugar + +#wsi compliant WSDL warnings +warning.wsi.r2001=N\u00E3o \u00E9 um WSDL compat\u00EDvel com WSI-BP (R2001, R2002). wsdl:import deve importar somente documentos WSDL. Est\u00E1 tentando importar: \\"{0}\\" +warning.wsi.r2002=N\u00E3o \u00E9 um WSDL (R2002) compat\u00EDvel com WSI-BP. wsdl:import n\u00E3o deve ser usado para importar o Esquema XML incorporado no documento WSDL. Esperava o namespace WSDL: {0}, encontrou: {1} +warning.wsi.r2003=N\u00E3o \u00E9 um WSDL compat\u00EDvel com WSI-BP (R2003). xsd:import s\u00F3 deve ser usado nos elementos de xsd:schema. +warning.wsi.r2004=N\u00E3o \u00E9 um WSDL (R2001, R2004) compat\u00EDvel com WSI-BP. xsd:import n\u00E3o deve importar as defini\u00E7\u00F5es do Esquema XML incorporadas em linha no documento WSDL. + +#Parser +Parsing.ParseFailed = \tFalha ao fazer parse do WSDL. + +Parsing.NotAWSDL=Falha ao obter os componentes WSDL, provavelmente {0} n\u00E3o \u00E9 um arquivo WSDL v\u00E1lido. + +AbstractReferenceFinderImpl.UnableToParse = \tN\u00E3o \u00E9 poss\u00EDvel fazer parse de "{0}" : {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \tn\u00E3o \u00E9 um arquivo de bind externo. O elemento-raiz deve ser binds {http://java.sun.com/xml/ns/jaxws}, mas \u00E9 "{{0}}"{1} + + +#Internalizer +Internalizer.TwoVersionAttributes = \tTanto jaxws:version como version est\u00E3o presentes +Internalizer.IncorrectVersion = \to atributo da vers\u00E3o JAXWS deve ser "2.0" + +Internalizer.VersionNotPresent = \to atributo da vers\u00E3o JAXWS deve estar presente + +internalizer.targetNotAnElement= \tO n\u00F3 do alvo n\u00E3o \u00E9 um elemento +internalizer.targetNotFound= \tNenhum alvo encontrado para o wsdlLocation: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" n\u00E3o faz parte desta compila\u00E7\u00E3o. \u00C9 um erro de "{1}"? + +internalizer.XPathEvaluationError = Erro de XPath: {0} +internalizer.XPathEvaluatesToNoTarget = A avalia\u00E7\u00E3o de XPath de "{0}" resulta em um n\u00F3 do alvo vazio +internalizer.XPathEvaulatesToTooManyTargets = A avalia\u00E7\u00E3o do XPath de "{0}" resulta em um n\u00FAmero excessivo de n\u00F3s do alvo ({1}) +internalizer.XPathEvaluatesToNonElement = A avalia\u00E7\u00E3o do XPath de "{0}" precisa resultar em um elemento. +invalid.customization.namespace=Ignorando personaliza\u00E7\u00E3o: \"{0}\", porque n\u00E3o tem namespace. Deve pertencer ao namespace de personaliza\u00E7\u00E3o. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="N\u00E3o \u00E9 um documento WSDL: {0}, ele fornece \"{1}\", recuperando com MEX..." +invalid.wsdl=WSDL {0} inv\u00E1lido, esperava {1} encontrou {2} na (linha {3}) +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\nrecuperando com MEX... +file.not.found={0} \u00E9 inacess\u00EDvel +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=N\u00E3o foi poss\u00EDvel localizar wsdl:service no(s) WSDL fornecido: \n\n{0} Pelo menos um WSDL com pelo menos uma defini\u00E7\u00E3o de servi\u00E7o precisa ser fornecido. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties new file mode 100644 index 00000000000..13e41fe777d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_CN.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=\u9ED8\u8BA4\u540D\u79F0\u7A7A\u95F4\u5FC5\u987B\u4E3A \"{0}\" +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=\u90E8\u5206 \"{0}\" \u4E2D\u53EA\u5141\u8BB8\u6709 \"element\" \u6216 \"type\" \u5C5E\u6027\u4E2D\u7684\u5176\u4E2D\u4E00\u4E2A +# Not concatenated with any other string. +parsing.elementOrTypeRequired=\u8B66\u544A: \u5FFD\u7565\u90E8\u5206{0}, \u90E8\u5206 \"{0}\" \u4E2D\u9700\u8981 \"element\" \u6216 \"type\" \u5C5E\u6027 +parsing.invalidElement=\u5143\u7D20\u65E0\u6548: \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D) +parsing.invalidAttributeValue=\u5C5E\u6027 \"{0}\" \u7684\u503C \"{1}\" \u65E0\u6548 +parsing.invalidExtensionElement=\u6269\u5C55\u5143\u7D20\u65E0\u6548: \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D) +parsing.invalidWsdlElement=WSDL \u5143\u7D20\u65E0\u6548: \"{0}\" +parsing.requiredExtensibilityElement=\u672A\u77E5\u7684\u5FC5\u9700\u53EF\u6269\u5C55\u6027\u5143\u7D20 \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D) +parsing.tooManyElements=\"{1}\" \u5143\u7D20 \"{2}\" \u4E0B\u7684 \"{0}\" \u5143\u7D20\u8FC7\u591A +parsing.invalidOperationStyle=\u64CD\u4F5C \"{0}\" \u7684\u6837\u5F0F\u65E0\u6548 +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed="{0}" \u4E2D\u53EA\u5141\u8BB8\u6709\u4E00\u4E2A "types" \u5143\u7D20 +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed="{0}" \u4E2D\u53EA\u5141\u8BB8\u6709\u4E00\u4E2A "documentation" \u5143\u7D20 +parsing.incorrectRootElement=\u5E94\u4E3A\u6839\u5143\u7D20 \"{2}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{3}\" \u4E2D), \u627E\u5230\u7684\u662F\u5143\u7D20 \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D) +parsing.unknownImportedDocumentType=\u6240\u5BFC\u5165\u6587\u6863\u7684\u7C7B\u578B\u672A\u77E5: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=\u672A\u58F0\u660E\u540D\u79F0\u7A7A\u95F4\u524D\u7F00: \"{0}\" +parsing.invalidURI=URI \u65E0\u6548: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=\u65E0\u6CD5\u89E3\u6790\u4F4D\u4E8E \"{0}\" \u4E2D\u7684\u6587\u6863 +# {0} - exception message +parsing.ioException=\u89E3\u6790\u5931\u8D25: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=WSDL \u6587\u4EF6\u65E0\u6548! \u65E0\u6CD5\u89E3\u6790\u4F4D\u4E8E \"{0}\" \u4E2D\u7684\u6587\u6863 +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=WSDL \u6587\u4EF6\u65E0\u6548! \u89E3\u6790\u5931\u8D25: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=WSDL \u6587\u4EF6\u65E0\u6548! \u89E3\u6790\u5931\u8D25: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=WSDL \u6587\u4EF6\u65E0\u6548! \u89E3\u6790\u5931\u8D25: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=\u7F3A\u5C11\u5143\u7D20 \"{0}\" \u7684\u5FC5\u9700\u5C5E\u6027 \"{1}\" +parsing.invalidTag=\u5E94\u4E3A\u5143\u7D20 \"{1}\", \u627E\u5230\u7684\u662F \"{0}\" +# {4} - element name +parsing.invalidTagNS=\u4F4D\u4E8E{4}\u4E2D\u7684 WSDL \u65E0\u6548: \u5E94\u4E3A\u5143\u7D20 \"{2}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{3}\" \u4E2D), \u627E\u5230\u7684\u662F\u5143\u7D20 \"{0}\" (\u4F4D\u4E8E\u540D\u79F0\u7A7A\u95F4 \"{1}\" \u4E2D) +parsing.nonWhitespaceTextFound=\u627E\u5230\u610F\u5916\u7684\u975E\u7A7A\u683C\u6587\u672C: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=\u627E\u5230\u610F\u5916\u7684\u975E\u5143\u7D20 +# +entity.duplicate=\u5B9E\u4F53\u91CD\u590D: \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=\"{0}\" \u5B9E\u4F53\u91CD\u590D: \"{1}\" + +entity.notFoundByID=\u5B9E\u4F53 ID \u65E0\u6548: \"{0}\" +entity.notFoundByQName=\u5728 wsdl \u4E2D\u672A\u627E\u5230{0} \"{1}\": {2} +entity.notFound.portType=wsdl:portType \"{0}\" \u7531 wsdl:binding \"{1}\" \u5F15\u7528, \u4F46\u5728 wsdl \u4E2D\u672A\u627E\u5230\u5B83 +entity.notFound.binding=wsdl:binding \"{0}" \u7531 wsdl:port \"{1}\" \u5F15\u7528, \u4F46\u5728 wsdl \u4E2D\u672A\u627E\u5230\u5B83 + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=\u7F3A\u5C11\u5143\u7D20 \"{1}\" \u7684\u5FC5\u9700\u5C5E\u6027 \"{0}\" +validation.missingRequiredProperty=\u7F3A\u5C11\u5143\u7D20 \"{1}\" \u7684\u5FC5\u9700\u5C5E\u6027 \"{0}\" +validation.missingRequiredSubEntity=\u7F3A\u5931\u5143\u7D20 \"{1}\" \u7684\u5FC5\u9700\u7684\u5B50\u5B9E\u4F53 \"{0}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=\u5143\u7D20\u65E0\u6548: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=\u5143\u7D20\u65E0\u6548: \"{1}\", \u5177\u6709\u5DF2\u547D\u540D\u7684 simpleType: \"{0}\" +validation.duplicatedElement=\u5143\u7D20\u91CD\u590D: \"{0}\" +validation.duplicatePartName=WSDL \u65E0\u6548, \u4E0D\u5141\u8BB8 wsdl:message \u4E2D\u6709\u91CD\u590D\u90E8\u5206\u3002\nwsdl:message {0}\u5B58\u5728\u91CD\u590D\u7684\u90E8\u5206\u540D\u79F0: \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=\u5143\u7D20 \"{1}\" \u7684\u5B50\u5143\u7D20 \"{0}\" \u65E0\u6548 +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=\u5143\u7D20 \"{1}\" \u7684\u5C5E\u6027 \"{0}\" \u65E0\u6548 +validation.invalidAttributeValue=\u5C5E\u6027 \"{0}\" \u7684\u503C \"{1}\" \u65E0\u6548 +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=\u4E92\u65A5\u5C5E\u6027: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=\u76EE\u6807\u540D\u79F0\u7A7A\u95F4\u4E0D\u6B63\u786E (\u5E94\u4E3A: {1}, \u627E\u5230\u7684\u662F: {0}) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=\u5185\u90E8\u9519\u8BEF ("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=\u4E0D\u660E\u786E\u7684\u64CD\u4F5C\u540D: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="\u4E0D\u652F\u6301\u4F7F\u7528 SOAP \u7F16\u7801\u3002\n{1}\u4E2D\u7684\u7B2C {0} \u884C\u4E0A\u7684 SOAP \u6269\u5C55\u5143\u7D20\u5305\u542B use=\"encoded\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=\u5FFD\u7565 \"{2}\" \u64CD\u4F5C\u7684 \"{0}\" {1}\u5143\u7D20\u4E2D\u7684\u7A7A\u64CD\u4F5C, \u6539\u7528\u9ED8\u8BA4\u503C +# Not concatenated with any other string. +warning.inputOutputEmptyAction=\u5FFD\u7565 \"{1}\" \u64CD\u4F5C\u7684{0}\u5143\u7D20\u4E2D\u7684\u7A7A\u64CD\u4F5C, \u6539\u7528\u9ED8\u8BA4\u503C + +#wsi compliant WSDL warnings +warning.wsi.r2001=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2001, R2002)\u3002wsdl:import \u53EA\u80FD\u5BFC\u5165 WSDL \u6587\u6863\u3002\u5B83\u5C1D\u8BD5\u5BFC\u5165\u7684\u662F: \"{0}\" +warning.wsi.r2002=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2002)\u3002wsdl:import \u4E0D\u80FD\u7528\u4E8E\u5BFC\u5165\u5D4C\u5165\u5728 WSDL \u6587\u6863\u4E2D\u7684 XML \u6A21\u5F0F\u3002\u5E94\u4E3A WSDL \u540D\u79F0\u7A7A\u95F4: {0}, \u627E\u5230\u7684\u662F: {1} +warning.wsi.r2003=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2003)\u3002xsd:import \u53EA\u80FD\u5728 xsd:schema \u5143\u7D20\u4E2D\u4F7F\u7528\u3002 +warning.wsi.r2004=\u4E0D\u662F WSI-BP \u517C\u5BB9\u7684 WSDL (R2001, R2004)\u3002xsd:import \u4E0D\u80FD\u5BFC\u5165\u5185\u5D4C\u5728 WSDL \u6587\u6863\u4E2D\u7684 XML \u6A21\u5F0F\u5B9A\u4E49\u3002 + +#Parser +Parsing.ParseFailed = \t\u65E0\u6CD5\u89E3\u6790 WSDL\u3002 + +Parsing.NotAWSDL=\u65E0\u6CD5\u83B7\u53D6 WSDL \u7EC4\u4EF6, \u53EF\u80FD{0}\u4E0D\u662F\u6709\u6548\u7684 WSDL \u6587\u4EF6\u3002 + +AbstractReferenceFinderImpl.UnableToParse = \t\u65E0\u6CD5\u89E3\u6790 "{0}": {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \t\u4E0D\u662F\u5916\u90E8\u7ED1\u5B9A\u6587\u4EF6\u3002\u6839\u5143\u7D20\u5FC5\u987B\u4E3A ''{''http://java.sun.com/xml/ns/jaxws''}'' \u7ED1\u5B9A, \u4F46\u5B9E\u9645\u4E3A ''{''{0}''}''{1} + + +#Internalizer +Internalizer.TwoVersionAttributes = \tjaxws:version \u548C\u7248\u672C\u540C\u65F6\u5B58\u5728 +Internalizer.IncorrectVersion = \tJAXWS \u7248\u672C\u5C5E\u6027\u5FC5\u987B\u4E3A "2.0" + +Internalizer.VersionNotPresent = \tJAXWS \u7248\u672C\u5C5E\u6027\u5FC5\u987B\u5B58\u5728 + +internalizer.targetNotAnElement= \t\u76EE\u6807\u8282\u70B9\u4E0D\u662F\u5143\u7D20 +internalizer.targetNotFound= \t\u672A\u627E\u5230 wsdlLocation \u7684\u76EE\u6807: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" \u4E0D\u662F\u6B64\u7F16\u8BD1\u7684\u4E00\u90E8\u5206\u3002\u8FD9\u662F\u5426\u5C5E\u4E8E "{1}" \u7684\u9519\u8BEF? + +internalizer.XPathEvaluationError = XPath \u9519\u8BEF: {0} +internalizer.XPathEvaluatesToNoTarget = "{0}" \u7684 XPath \u6C42\u503C\u4EA7\u751F\u7A7A\u76EE\u6807\u8282\u70B9 +internalizer.XPathEvaulatesToTooManyTargets = "{0}" \u7684 XPath \u6C42\u503C\u751F\u6210\u4E86\u8FC7\u591A\u7684 ({1}) \u76EE\u6807\u8282\u70B9 +internalizer.XPathEvaluatesToNonElement = "{0}" \u7684 XPath \u6C42\u503C\u5FC5\u987B\u751F\u6210\u5143\u7D20\u3002 +invalid.customization.namespace=\u7531\u4E8E\u5B9A\u5236\u8BBE\u7F6E \"{0}\" \u6CA1\u6709\u540D\u79F0\u7A7A\u95F4, \u56E0\u6B64\u5C06\u5176\u5FFD\u7565\u3002\u5B83\u5FC5\u987B\u5C5E\u4E8E\u5B9A\u5236\u8BBE\u7F6E\u540D\u79F0\u7A7A\u95F4\u3002 + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="\u4E0D\u662F WSDL \u6587\u6863: {0}, \u5B83\u63D0\u4F9B\u7684\u662F \"{1}\", \u6B63\u5728\u4F7F\u7528 MEX \u91CD\u8BD5..." +invalid.wsdl=WSDL {0}\u65E0\u6548, \u5E94\u4E3A{1}, \u5728\u884C {3} \u627E\u5230\u7684\u662F{2} +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\n\u6B63\u5728\u4F7F\u7528 MEX \u91CD\u8BD5... +file.not.found={0}\u4E0D\u53EF\u8BBF\u95EE +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=\u5728\u63D0\u4F9B\u7684 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:service: \n\n{0}\u9700\u8981\u81F3\u5C11\u63D0\u4F9B\u4E00\u4E2A WSDL, \u8BE5 WSDL \u81F3\u5C11\u5177\u6709\u4E00\u4E2A\u670D\u52A1\u5B9A\u4E49\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties new file mode 100644 index 00000000000..6fb04e16cc8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/resources/wsdl_zh_TW.properties @@ -0,0 +1,157 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +localized.error={0} +parsing.wsdlNotDefaultNamespace=\u9810\u8A2D\u547D\u540D\u7A7A\u9593\u5FC5\u9808\u662F \"{0}\" +# Not concatenated with any other string. +parsing.onlyOneOfElementOrTypeRequired=\u7D44\u4EF6 \"{0}\" \u4E2D\u53EA\u80FD\u4F7F\u7528 \"element\" \u6216 \"type\" \u5176\u4E2D\u4E00\u500B\u5C6C\u6027 +# Not concatenated with any other string. +parsing.elementOrTypeRequired=\u8B66\u544A: \u5DF2\u5FFD\u7565\u7D44\u4EF6 {0}, \u7D44\u4EF6 \"{0}\" \u4E2D\u53EA\u9700\u8981 \"element\" \u6216 \"type\" \u5C6C\u6027 +parsing.invalidElement=\u7121\u6548\u7684\u5143\u7D20: \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D) +parsing.invalidAttributeValue=\u5C6C\u6027 \"{0}\" \u7684\u503C \"{1}\" \u7121\u6548 +parsing.invalidExtensionElement=\u7121\u6548\u7684\u64F4\u5145\u5143\u7D20: \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D) +parsing.invalidWsdlElement=\u7121\u6548\u7684 WSDL \u5143\u7D20: \"{0}\" +parsing.requiredExtensibilityElement=\u4E0D\u660E\u7684\u5FC5\u8981\u64F4\u5145\u6027\u5143\u7D20 \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D) +parsing.tooManyElements=\"{1}\" \u5143\u7D20\u5E95\u4E0B\u6709\u592A\u591A \"{0}\" \u5143\u7D20 \"{2}\" +parsing.invalidOperationStyle=\u4F5C\u696D \"{0}\" \u7684\u6A23\u5F0F\u7121\u6548 +# {0} - "definitions". Not concatenated with any other string. +parsing.onlyOneTypesAllowed="{0}" \u4E2D\u53EA\u80FD\u6709\u4E00\u500B "types" \u5143\u7D20 +# {0} - element local name (e.g. PingType). Wrapped into an Exception. Not concatenated with any other string. +parsing.onlyOneDocumentationAllowed="{0}" \u4E2D\u53EA\u80FD\u6709\u4E00\u500B "documentation" \u5143\u7D20 +parsing.incorrectRootElement=\u9810\u671F\u61C9\u70BA\u6839\u5143\u7D20 \"{2}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{3}\" \u4E2D), \u4F46\u5BE6\u969B\u70BA\u5143\u7D20 \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D) +parsing.unknownImportedDocumentType=\u532F\u5165\u4E4B\u6587\u4EF6\u7684\u985E\u578B\u4E0D\u660E: {0} +# Not concatenated with any other string. +parsing.unknownNamespacePrefix=\u672A\u5BA3\u544A\u7684\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC: \"{0}\" +parsing.invalidURI=\u7121\u6548\u7684 URI: {0} +# {0} - WSDL URL +parsing.ioExceptionWithSystemId=\u7121\u6CD5\u5256\u6790\u4F4D\u65BC \"{0}\" \u7684\u6587\u4EF6 +# {0} - exception message +parsing.ioException=\u5256\u6790\u5931\u6557: {0} +# {0} - WSDL URL, Not concatenated with any other string. +parsing.saxExceptionWithSystemId=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u7121\u6CD5\u5256\u6790\u4F4D\u65BC \"{0}\" \u7684\u6587\u4EF6 +# {0} - exception message, Not concatenated with any other string. +parsing.saxException=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u5256\u6790\u5931\u6557: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.parserConfigException=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u5256\u6790\u5931\u6557: {0} +# {0} - exception message, Not concatenated with any other string. +parsing.factoryConfigException=\u7121\u6548\u7684 WSDL \u6A94\u6848! \u5256\u6790\u5931\u6557: {0} + +# Wrapped into an Exception. Not concatenated with any other string. +parsing.missingRequiredAttribute=\u907A\u6F0F\u5143\u7D20 \"{0}\" \u7684\u5FC5\u8981\u5C6C\u6027 \"{1}\" +parsing.invalidTag=\u9810\u671F\u61C9\u70BA\u5143\u7D20 \"{1}\", \u4F46\u5BE6\u969B\u70BA \"{0}\" +# {4} - element name +parsing.invalidTagNS={4} \u7684 WSDL \u7121\u6548: \u9810\u671F\u61C9\u70BA\u5143\u7D20 \"{2}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{3}\" \u4E2D), \u4F46\u5BE6\u969B\u70BA\u5143\u7D20 \"{0}\" (\u5728\u547D\u540D\u7A7A\u9593 \"{1}\" \u4E2D) +parsing.nonWhitespaceTextFound=\u767C\u73FE\u672A\u9810\u671F\u7684\u975E\u7A7A\u683C\u6587\u5B57: \"{0}\" +# Not concatenated with any other string (written on a separate line). +parsing.elementExpected=\u767C\u73FE\u672A\u9810\u671F\u7684\u975E\u5143\u7D20 +# +entity.duplicate=\u91CD\u8907\u7684\u500B\u9AD4: \"{0}\" +# {0} - type of entity, {1} - entity name e.g.: duplicate "message" entity: "PingRequest", Wrapped into an Exception. Not concatenated with any other string. +entity.duplicateWithType=\u91CD\u8907\u7684 \"{0}\" \u500B\u9AD4: \"{1}\" + +entity.notFoundByID=\u7121\u6548\u7684\u500B\u9AD4 ID: \"{0}\" +entity.notFoundByQName=\u5728 WSDL \u4E2D\u627E\u4E0D\u5230 {0} \"{1}\": {2} +entity.notFound.portType=\u5728 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:binding \"{1}\" \u6240\u53C3\u7167\u7684 wsdl:portType \"{0}\" +entity.notFound.binding=\u5728 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:port \"{1}\" \u6240\u53C3\u7167\u7684 wsdl:binding \"{0}" + +# Wrapped into an Exception. Not concatenated with any other string. +validation.missingRequiredAttribute=\u907A\u6F0F\u5143\u7D20 \"{1}\" \u7684\u5FC5\u8981\u5C6C\u6027 \"{0}\" +validation.missingRequiredProperty=\u907A\u6F0F\u5143\u7D20 \"{1}\" \u7684\u5FC5\u8981\u7279\u6027 \"{0}\" +validation.missingRequiredSubEntity=\u907A\u6F0F\u5143\u7D20 \"{1}\" \u7684\u5FC5\u8981\u5B50\u500B\u9AD4 \"{0}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidElement=\u7121\u6548\u7684\u5143\u7D20: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidComplexTypeInElement=invalid element: \"{1}\", has named complexType: \"{0}\" +validation.invalidSimpleTypeInElement=\u7121\u6548\u7684\u5143\u7D20: \"{1}\", \u542B\u6709\u6307\u5B9A\u7684 simpleType: \"{0}\" +validation.duplicatedElement=\u91CD\u8907\u7684\u5143\u7D20: \"{0}\" +validation.duplicatePartName=\u7121\u6548\u7684 WSDL, wsdl:message \u4E2D\u4E0D\u5141\u8A31\u6709\u91CD\u8907\u7684\u7D44\u4EF6. \nwsdl:message {0} \u542B\u6709\u91CD\u8907\u7684\u7D44\u4EF6\u540D\u7A31: \"{1}\" +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidSubEntity=\u5143\u7D20 \"{1}\" \u7684\u5B50\u5143\u7D20 \"{0}\" \u7121\u6548 +# Wrapped into an Exception. Not concatenated with any other string. +validation.invalidAttribute=\u5143\u7D20 \"{1}\" \u7684\u5C6C\u6027 \"{0}\" \u7121\u6548 +validation.invalidAttributeValue=\u5C6C\u6027 \"{0}\" \u7684\u503C \"{1}\" \u7121\u6548 +# Usage not found. TODO Remove +#validation.invalidRange=invalid range found (min: {0}, max: {1}) +validation.exclusiveAttributes=\u5C08\u7528\u5C6C\u6027: \"{0}\", \"{1}\" +validation.incorrectTargetNamespace=\u76EE\u6A19\u547D\u540D\u7A7A\u9593\u4E0D\u6B63\u78BA (\u9810\u671F\u61C9\u70BA: {1}, \u5BE6\u969B\u70BA: {0}) +# Usage not found. TODO Remove +#validation.unsupportedSchemaFeature=unsupported XML Schema feature: \"{0}\" +validation.shouldNotHappen=\u5167\u90E8\u932F\u8AA4 ("{0}") +# Usage not found. TODO Remove +#validation.invalidToken=invalid token \"{0}\" +# Usage not found. TODO Remove +#validation.notSimpleType=not a simple type: \"{0}\" +validation.ambiguousName=\u4E0D\u660E\u78BA\u7684\u4F5C\u696D\u540D\u7A31: \"{0}\" +# Usage not found. TODO Remove +#validation.invalidPrefix=undeclared namespace prefix: \"{0}\" +# {0} - number, {1} - WSDL location e.g.: Use of SOAP Encoding is not supported. SOAP extension element on line 945 in file:/foo/bar.wsdl has use="encoded" +validation.unsupportedUse.encoded="\u4E0D\u652F\u63F4\u4F7F\u7528\u300CSOAP \u7DE8\u78BC\u300D. \n{1} \u4E2D\u7B2C {0} \u884C\u7684 SOAP \u64F4\u5145\u5143\u7D20\u4F7F\u7528 use=\"encoded\" " +# {0}, {2} - element / attribute name, {1} - element name. Not concatenated with any other string. +warning.faultEmptyAction=\u5FFD\u7565 \"{2}\" \u4F5C\u696D\u4E4B \"{0}\" {1} \u5143\u7D20\u4E2D\u7684\u7A7A\u767D Action, \u6539\u7528\u9810\u8A2D\u503C +# Not concatenated with any other string. +warning.inputOutputEmptyAction=\u5FFD\u7565 \"{1}\" \u4F5C\u696D\u4E4B {0} \u5143\u7D20\u4E2D\u7684\u7A7A\u767D Action, \u6539\u7528\u9810\u8A2D\u503C + +#wsi compliant WSDL warnings +warning.wsi.r2001=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2001, R2002). wsdl:import \u53EA\u80FD\u532F\u5165 WSDL \u6587\u4EF6. \u4F46\u662F, \u5B83\u5617\u8A66\u532F\u5165: \\"{0}\\" +warning.wsi.r2002=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2002). \u53EA\u80FD\u4F7F\u7528 wsdl:import \u532F\u5165 WSDL \u6587\u4EF6\u4E2D\u5167\u5D4C\u7684\u300CXML \u7DB1\u8981\u300D. \u9810\u671F\u61C9\u70BA WSDL \u547D\u540D\u7A7A\u9593: {0}, \u4F46\u5BE6\u969B\u70BA: {1} +warning.wsi.r2003=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2003). \u53EA\u80FD\u5728 xsd:schema \u5143\u7D20\u4E4B\u5167\u4F7F\u7528 xsd:import. +warning.wsi.r2004=\u4E0D\u662F WSI-BP \u76F8\u5BB9\u7684 WSDL (R2001, R2004). xsd:import \u4E0D\u53EF\u532F\u5165 WSDL \u6587\u4EF6\u4E2D\u5167\u5D4C\u7684\u300CXML \u7DB1\u8981\u300D\u5B9A\u7FA9. + +#Parser +Parsing.ParseFailed = \t\u7121\u6CD5\u5256\u6790 WSDL. + +Parsing.NotAWSDL=\u7121\u6CD5\u53D6\u5F97 WSDL \u5143\u4EF6, {0} \u53EF\u80FD\u4E0D\u662F\u6709\u6548\u7684 WSDL \u6A94\u6848. + +AbstractReferenceFinderImpl.UnableToParse = \t\u7121\u6CD5\u5256\u6790 "{0}" : {1} + +# Not concatenated with any other string. +Parser.NotABindingFile = \t\u4E0D\u662F\u5916\u90E8\u9023\u7D50\u6A94\u6848. \u6839\u5143\u7D20\u5FC5\u9808\u662F ''{''http://java.sun.com/xml/ns/jaxws''}''bindings, \u4F46\u5176\u70BA ''{''{0}''}''{1} + + +#Internalizer +Internalizer.TwoVersionAttributes = \tjaxws:version \u548C version \u540C\u6642\u5B58\u5728 +Internalizer.IncorrectVersion = \tJAXWS \u7248\u672C\u5C6C\u6027\u5FC5\u9808\u662F "2.0" + +Internalizer.VersionNotPresent = \tJAXWS \u7248\u672C\u5C6C\u6027\u5FC5\u9808\u5B58\u5728 + +internalizer.targetNotAnElement= \t\u76EE\u6A19\u7BC0\u9EDE\u4E0D\u662F\u4E00\u500B\u5143\u7D20 +internalizer.targetNotFound= \t\u627E\u4E0D\u5230 wsdlLocation \u7684\u76EE\u6A19: {0} + +Internalizer.IncorrectSchemaReference= \t"{0}" \u4E0D\u5C6C\u65BC\u6B64\u7DE8\u8B6F. \u9019\u662F "{1}" \u932F\u8AA4\u55CE? + +internalizer.XPathEvaluationError = XPath \u932F\u8AA4: {0} +internalizer.XPathEvaluatesToNoTarget = "{0}" \u7684 XPath \u8A55\u4F30\u7D50\u679C\u70BA\u7A7A\u767D\u7684\u76EE\u6A19\u7BC0\u9EDE +internalizer.XPathEvaulatesToTooManyTargets = "{0}" \u7684 XPath \u8A55\u4F30\u5C0E\u81F4\u592A\u591A ({1}) \u76EE\u6A19\u7BC0\u9EDE +internalizer.XPathEvaluatesToNonElement = "{0}" \u7684 XPath \u8A55\u4F30\u7D50\u679C\u5FC5\u9808\u662F\u4E00\u500B\u5143\u7D20. +invalid.customization.namespace=\u5FFD\u7565\u81EA\u8A02 \"{0}\", \u56E0\u70BA\u5B83\u6C92\u6709\u547D\u540D\u7A7A\u9593. \u5B83\u5FC5\u9808\u5C6C\u65BC\u81EA\u8A02\u547D\u540D\u7A7A\u9593. + +# {0} - wsdl document location, {1} - namespace and local name of a element e.g.: Not a WSDL document: http://foo.org/bar?wsdl, it gives "{http://www.w3.org/1999/xhtml}html", retrying with MEX... +invalid.wsdl.with.dooc="\u4E0D\u662F WSDL \u6587\u4EF6: {0}, \u800C\u662F \"{1}\", \u4F7F\u7528 MEX \u9032\u884C\u91CD\u8A66..." +invalid.wsdl=\u7121\u6548\u7684 WSDL {0}, \u9810\u671F\u61C9\u70BA {1}, \u4F46\u5BE6\u969B\u70BA {2}, \u4F4D\u7F6E\u5728\u7B2C {3} \u884C +# Concatenated with: Server returned HTTP response code: {code} for URL: {url} e.g.: Server returned HTTP response code: 500 for URL: http://foo/bar/mex retrying with MEX... +try.with.mex= {0} \n\n\u4F7F\u7528 MEX \u9032\u884C\u91CD\u8A66... +file.not.found=\u7121\u6CD5\u9023\u7DDA {0} +parsing.unableToGetMetadata= {0}\n\n{1} +failed.noservice=failed.noservice=\u5728\u63D0\u4F9B\u7684 WSDL \u4E2D\u627E\u4E0D\u5230 wsdl:service: \n\n{0} \u81F3\u5C11\u9700\u8981\u63D0\u4F9B\u4E00\u500B WSDL \u8207\u81F3\u5C11\u4E00\u500B\u670D\u52D9\u5B9A\u7FA9. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java index 2db08695710..b2e83bedd03 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/WSToolsObjectFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,7 +67,7 @@ public abstract class WSToolsObjectFactory { * * @return true if there is no error, otherwise false * - * @see {@link #wsimport(OutputStream, Container, String[])} + * @see #wsimport(OutputStream, Container, String[]) */ public boolean wsimport(OutputStream logStream, String[] args) { return wsimport(logStream, Container.NONE, args); @@ -91,7 +91,7 @@ public abstract class WSToolsObjectFactory { * artifacts like wrapper, exception bean classes etc. * * @return true if there is no error, otherwise false - * @see {@link #wsgen(OutputStream, Container, String[])} + * @see #wsgen(OutputStream, Container, String[]) */ public boolean wsgen(OutputStream logStream, String[] args) { return wsgen(logStream, Container.NONE, args); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java index 08f7053fae5..2fc9b79a983 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/spi/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java index e0619b7b3ef..95f7b7673ae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ClassNameInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java index bc7f69b2821..72dabd40e73 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/ForkEntityResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,6 +49,12 @@ public class ForkEntityResolver implements EntityResolver { InputSource is = lhs.resolveEntity(publicId, systemId); if(is!=null) return is; + + if(publicId == null) { + // WorkAround: Ant's XMLCatalog supports public IDs only, this allows us to treat it as system IDs + publicId = systemId; + } + return rhs.resolveEntity(publicId, systemId); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java index a76c4a09f78..ae2b60b784b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLFetcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,7 +70,7 @@ public class WSDLFetcher { /** * Fetches the wsdls in the DOMForest to the options.destDir * @param forest - * @return + * @return location of fetched root WSDL document * @throws IOException * @throws XMLStreamException * @throws FileNotFoundException @@ -100,26 +100,34 @@ public class WSDLFetcher { } }, docLocator); - //XMLInputFactory readerFactory = XMLInputFactory.newInstance(); - //XMLStreamReader xsr = readerFactory.createXMLStreamReader(new DOMSource(forest.get(rootWsdl))); - - XMLStreamReader xsr = SourceReaderFactory.createSourceReader(new DOMSource(forest.get(doc)), false); - XMLOutputFactory writerfactory = XMLOutputFactory.newInstance(); - String resolvedRootWsdl = docLocator.getLocationFor(null, doc); - File outFile = new File(destDir, resolvedRootWsdl); - OutputStream os = new FileOutputStream(outFile); - if(options.verbose) { - listener.message(WscompileMessages.WSIMPORT_DOCUMENT_DOWNLOAD(doc,outFile)); + XMLStreamReader xsr = null; + XMLStreamWriter xsw = null; + OutputStream os = null; + String resolvedRootWsdl = null; + try { + XMLOutputFactory writerfactory; + xsr = SourceReaderFactory.createSourceReader(new DOMSource(forest.get(doc)), false); + writerfactory = XMLOutputFactory.newInstance(); + resolvedRootWsdl = docLocator.getLocationFor(null, doc); + File outFile = new File(destDir, resolvedRootWsdl); + os = new FileOutputStream(outFile); + if(options.verbose) { + listener.message(WscompileMessages.WSIMPORT_DOCUMENT_DOWNLOAD(doc,outFile)); + } + xsw = writerfactory.createXMLStreamWriter(os); + //DOMForest eats away the whitespace loosing all the indentation, so write it through + // indenting writer for better readability of fetched documents + IndentingXMLStreamWriter indentingWriter = new IndentingXMLStreamWriter(xsw); + wsdlPatcher.bridge(xsr, indentingWriter); + options.addGeneratedFile(outFile); + } finally { + try { + if (xsr != null) {xsr.close();} + if (xsw != null) {xsw.close();} + } finally { + if (os != null) {os.close();} + } } - XMLStreamWriter xsw = writerfactory.createXMLStreamWriter(os); - //DOMForest eats away the whitespace loosing all the indentation, so write it through - // indenting writer for better readability of fetched documents - IndentingXMLStreamWriter indentingWriter = new IndentingXMLStreamWriter(xsw); - wsdlPatcher.bridge(xsr, indentingWriter); - xsr.close(); - xsw.close(); - os.close(); - options.addGeneratedFile(outFile); return resolvedRootWsdl; @@ -136,9 +144,9 @@ public class WSDLFetcher { if(!rootWsdlFileName.endsWith(WSDL_FILE_EXTENSION)) { Document rootWsdlDoc = forest.get(rootWsdl); NodeList serviceNodes = rootWsdlDoc.getElementsByTagNameNS(WSDLConstants.QNAME_SERVICE.getNamespaceURI(),WSDLConstants.QNAME_SERVICE.getLocalPart()); - if(serviceNodes.getLength() == 0) + if (serviceNodes.getLength() == 0) { rootWsdlName = "Service"; - else { + } else { Node serviceNode = serviceNodes.item(0); String serviceName = ((Element)serviceNode).getAttribute( WSDLConstants.ATTR_NAME); rootWsdlName = serviceName; @@ -177,8 +185,8 @@ public class WSDLFetcher { } private DocumentLocationResolver createDocResolver(final String baseWsdl, final DOMForest forest, final Map documentMap) { - return new DocumentLocationResolver() { + @Override public String getLocationFor(String namespaceURI, String systemId) { try { URL reference = new URL(new URL(baseWsdl),systemId); @@ -198,7 +206,7 @@ public class WSDLFetcher { private String sanitize(String fileName) { fileName = fileName.replace('?', '.'); - StringBuffer sb = new StringBuffer(fileName); + StringBuilder sb = new StringBuilder(fileName); for (int i = 0; i < sb.length(); i++) { char c = sb.charAt(i); if (Character.isLetterOrDigit(c) || @@ -216,8 +224,11 @@ public class WSDLFetcher { } private File getWSDLDownloadDir() { - File wsdlDir = new File(options.destDir,WSDL_PATH); - wsdlDir.mkdirs(); + File wsdlDir = new File(options.destDir, WSDL_PATH); + boolean created = wsdlDir.mkdirs(); + if (options.verbose && !created) { + listener.message(WscompileMessages.WSCOMPILE_NO_SUCH_DIRECTORY(wsdlDir)); + } return wsdlDir; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java index e7c3b543b0d..91412978964 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSDLParseException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java index 6b9cbd91064..301c156aba5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/WSToolsObjectFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java index 3c8a2d79da9..2e84def011a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/util/xml/XmlUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties index f1e9f4acbf0..0917dd67ad6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/version.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,7 @@ # questions. # -build-id=b09 - build-version=JAX-WS RI 2.2.7-b09 - major-version=2.2.7 - svn-revision=12895 - svn-url=https://svn.java.net/svn/jax-ws~sources/branches/jaxws22/jaxws-ri +build-id=2.2.9-b13941 +build-version=JAX-WS RI 2.2.9-b13941 +major-version=2.2.9 +svn-revision=unknown diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java index 4654dfad032..f18190f4038 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AbortException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java index 00b10a696a0..992f1cbfaf9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/AuthInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.tools.internal.ws.wscompile; import com.sun.istack.internal.NotNull; import java.net.URL; +import java.util.regex.Pattern; /** * Represents authorization information needed by {@link com.sun.tools.internal.ws.wscompile.DefaultAuthenticator} to @@ -39,10 +40,11 @@ import java.net.URL; public final class AuthInfo { private final String user; private final String password; - private final URL url; + private final Pattern urlPattern; - public AuthInfo(@NotNull URL url, @NotNull String user, @NotNull String password){ - this.url = url; + public AuthInfo(@NotNull URL url, @NotNull String user, @NotNull String password) { + String u = url.toExternalForm().replaceFirst("\\?", "\\\\?"); + this.urlPattern = Pattern.compile(u.replace("*", ".*"), Pattern.CASE_INSENSITIVE); this.user = user; this.password = password; } @@ -59,7 +61,7 @@ public final class AuthInfo { * Returns if the requesting host and port are associated with this {@link AuthInfo} */ public boolean matchingHost(@NotNull URL requestingURL) { - return requestingURL.equals(url); + return urlPattern.matcher(requestingURL.toExternalForm()).matches(); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java index 050192cc9ef..a4c889ae1b1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/BadCommandLineException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,7 +31,7 @@ import com.sun.istack.internal.Nullable; * @author Vivek Pandey */ public class BadCommandLineException extends Exception { - private Options options; + private transient Options options; public BadCommandLineException(String msg) { super(msg); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/DefaultAuthenticator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/DefaultAuthenticator.java deleted file mode 100644 index aa3e6f52af2..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/DefaultAuthenticator.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.tools.internal.ws.wscompile; - -import com.sun.istack.internal.NotNull; -import com.sun.tools.internal.ws.resources.WscompileMessages; -import org.xml.sax.SAXParseException; -import org.xml.sax.helpers.LocatorImpl; - -import java.io.*; -import java.lang.reflect.Field; -import java.net.Authenticator; -import java.net.PasswordAuthentication; -import java.net.URL; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.ArrayList; -import java.util.List; - -/** - * @author Vivek Pandey - */ -public class DefaultAuthenticator extends Authenticator { - - private final List authInfo = new ArrayList(); - private final ErrorReceiver errReceiver; - private final String proxyUser; - private final String proxyPasswd; - - //can user.home value be null? - public static final String defaultAuthfile = System.getProperty("user.home")+ System.getProperty("file.separator")+".metro"+System.getProperty("file.separator")+"auth"; - private File authFile = new File(defaultAuthfile); - private boolean giveError; - - public DefaultAuthenticator(@NotNull ErrorReceiver receiver, @NotNull File authfile) throws BadCommandLineException { - this.errReceiver = receiver; - this.proxyUser = System.getProperty("http.proxyUser"); - this.proxyPasswd = System.getProperty("http.proxyPassword"); - - if(authfile != null){ - this.authFile = authfile; - this.giveError = true; - } - - if(!authFile.exists()){ - try { - error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_FILE_NOT_FOUND(authFile.getCanonicalPath(), defaultAuthfile), null)); - } catch (IOException e) { - error(new SAXParseException(WscompileMessages.WSIMPORT_FAILED_TO_PARSE(authFile,e.getMessage()), null)); - } - return; - } - - if(!authFile.canRead()){ - error(new SAXParseException("Authorization file: "+authFile + " does not have read permission!", null)); - return; - } - parseAuth(); - } - - protected PasswordAuthentication getPasswordAuthentication() { - //If user sets proxy user and passwd and the RequestType is from proxy server then create - // PasswordAuthentication using proxyUser and proxyClass; - if((getRequestorType() == RequestorType.PROXY) && proxyUser != null && proxyPasswd != null){ - return new PasswordAuthentication(proxyUser, proxyPasswd.toCharArray()); - } - for(AuthInfo auth:authInfo){ - if(auth.matchingHost(getRequestingURL())){ - return new PasswordAuthentication(auth.getUser(), auth.getPassword().toCharArray()); - } - } - return null; - } - - static Authenticator getCurrentAuthenticator() { - final Field f = getTheAuthenticator(); - if (f == null) { - return null; - } - - try { - AccessController.doPrivileged(new PrivilegedAction() { - - public Void run() { - f.setAccessible(true); - return null; - } - }); - return (Authenticator) f.get(null); - } catch (Exception ex) { - return null; - } finally { - if (f != null) { - AccessController.doPrivileged(new PrivilegedAction() { - - public Void run() { - f.setAccessible(false); - return null; - } - }); - } - } - } - - private static Field getTheAuthenticator() { - try { - return Authenticator.class.getDeclaredField("theAuthenticator"); - } catch (Exception ex) { - return null; - } - } - - private void parseAuth() { - errReceiver.info(new SAXParseException(WscompileMessages.WSIMPORT_READING_AUTH_FILE(authFile), null)); - - BufferedReader in; - try { - in = new BufferedReader(new InputStreamReader(new FileInputStream(authFile), "UTF-8")); - } catch (UnsupportedEncodingException e) { - error(new SAXParseException(e.getMessage(), null)); - return; - } catch (FileNotFoundException e) { - error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_FILE_NOT_FOUND(authFile, defaultAuthfile), null, e)); - return; - } - String text; - LocatorImpl locator = new LocatorImpl(); - try { - int lineno = 1; - - locator.setSystemId(authFile.getCanonicalPath()); - - while ((text = in.readLine()) != null) { - locator.setLineNumber(lineno++); - try { - URL url = new URL(text); - String authinfo = url.getUserInfo(); - - if (authinfo != null) { - int i = authinfo.indexOf(':'); - - if (i >= 0) { - String user = authinfo.substring(0, i); - String password = authinfo.substring(i + 1); - authInfo.add(new AuthInfo(new URL(text), user, password)); - } else { - error(new SAXParseException(WscompileMessages.WSIMPORT_ILLEGAL_AUTH_INFO(url), locator)); - } - } else { - error(new SAXParseException(WscompileMessages.WSIMPORT_ILLEGAL_AUTH_INFO(url), locator)); - } - - } catch (NumberFormatException e) { - error(new SAXParseException(WscompileMessages.WSIMPORT_ILLEGAL_AUTH_INFO(text), locator)); - } - } - in.close(); - } catch (IOException e) { - error(new SAXParseException(WscompileMessages.WSIMPORT_FAILED_TO_PARSE(authFile,e.getMessage()), locator)); - } - } - - /** - * When user provides authfile explicitly using -Xauthfile we throw error otherwise show the mesage by default with -Xdebug flag - */ - private void error(SAXParseException e){ - if(giveError){ - errReceiver.error(e); - } else{ - errReceiver.debug(e); - } - } -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java index ce6a3ba920b..12b90f17300 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -44,7 +44,7 @@ import org.xml.sax.SAXParseException; *

* However, to make the error handling easy (and make it work * with visitor patterns nicely), - * none of the methods on thi class throws {@link org.xml.sax.SAXException}. + * none of the methods on this class throws {@link org.xml.sax.SAXException}. * Instead, when the compilation needs to be aborted, * it throws {@link AbortException}, which is unchecked. * diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java index a5549ef9d73..35a34c2ccb2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/ErrorReceiverFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java index ad8d58c4882..ce2690d2ea6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,11 @@ public class FilerCodeWriter extends WSCodeWriter { public Writer openSource(JPackage pkg, String fileName) throws IOException { String tmp = fileName.substring(0, fileName.length()-5); - w = filer.createSourceFile(pkg.name() + "." + tmp).openWriter(); + if (pkg.name() != null && ! "".equals(pkg.name())) { + w = filer.createSourceFile(pkg.name() + "." + tmp).openWriter(); + } else { + w = filer.createSourceFile(tmp).openWriter(); + } return w; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java index f8ae000c377..1cab43d77f8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/JavaCompilerHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java index 8f34120c7cc..fbb4cb3fe27 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Options.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ import java.net.URL; import java.net.URLClassLoader; import java.nio.charset.Charset; import java.nio.charset.IllegalCharsetNameException; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; @@ -92,6 +93,12 @@ public class Options { */ public boolean nocompile; + /** + * Disable secure xml processing. + * -XdisableSecureXmlProcessing + */ + public boolean disableSecureXmlProcessing = false; + public enum Target { V2_0, V2_1, V2_2; @@ -180,13 +187,6 @@ public class Options { return compatibilityMode == EXTENSION; } - /** - * Target direcoty when producing files. - */ - public File targetDir = new File("."); - - - public boolean debug = false; /** @@ -213,7 +213,10 @@ public class Options { public void removeGeneratedFiles(){ for(File file : generatedFiles){ if (file.getName().endsWith(".java")) { - file.delete(); + boolean deleted = file.delete(); + if (verbose && !deleted) { + System.out.println(MessageFormat.format("{0} could not be deleted.", file)); + } } } generatedFiles.clear(); @@ -235,7 +238,10 @@ public class Options { synchronized (generatedFiles) { for (File file : generatedFiles) { if (file.getName().endsWith(".java")) { - file.delete(); + boolean deleted = file.delete(); + if (verbose && !deleted) { + System.out.println(MessageFormat.format("{0} could not be deleted.", file)); + } } } generatedFiles.clear(); @@ -348,6 +354,9 @@ public class Options { throw new BadCommandLineException(WscompileMessages.WSCOMPILE_UNSUPPORTED_ENCODING(encoding)); } return 2; + } else if (args[i].equals("-XdisableSecureXmlProcessing")) { + disableSecureXmlProcessing= true; + return 1; } return 0; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java index 91ab727445a..eae6e8d5a1d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/Plugin.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,7 +73,7 @@ public abstract class Plugin { * *

Since options can appear in no particular order, WsImport allows * sub-options of a plugin to show up before the option that activates a - * plugin (one that's returned by {@link #getOptionName().) + * plugin (one that's returned by {@link #getOptionName()}.) * * But nevertheless a {@link Plugin} needs to be activated to participate in * further processing. @@ -120,14 +120,14 @@ public abstract class Plugin { * @param options This object allows access to various options used for code * generation as well as access to the generated code. * - * @param errorHandler Errors should be reported to this handler. + * @param errorReceiver Errors should be reported to this handler. * * @return If the add-on executes successfully, return true. If it detects * some errors but those are reported and recovered gracefully, return * false. * - * @throws SAXException After an error is reported to {@link ErrorHandler}, - * the same exception can be thrown to indicate a fatal irrecoverable error. {@link ErrorHandler} + * @throws SAXException After an error is reported to {@link ErrorReceiver}, + * the same exception can be thrown to indicate a fatal irrecoverable error. {@link ErrorReceiver} * itself may throw it, if it chooses not to recover from the error. */ public abstract boolean run( diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java index 7ed4afedc1a..3cdfccf218d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WSCodeWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java index af8a48940b6..4772c26c1dc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,17 +25,22 @@ package com.sun.tools.internal.ws.wscompile; -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.tools.internal.ws.resources.WscompileMessages; 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 com.sun.xml.internal.ws.util.ServiceFinder; import javax.jws.WebService; import javax.xml.namespace.QName; import java.io.File; -import java.util.*; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; /** * @author Vivek Pandey @@ -90,6 +95,12 @@ public class WsgenOptions extends Options { */ public boolean protocolSet = false; + /** + * -x file1 -x file2 ...
+ * Files to be parsed to get classes' metadata in addition/instead of using annotations and reflection API + */ + public List externalMetadataFiles = new ArrayList(); + private static final String SERVICENAME_OPTION = "-servicename"; private static final String PORTNAME_OPTION = "-portname"; private static final String HTTP = "http"; @@ -163,6 +174,9 @@ public class WsgenOptions extends Options { } else if (args[i].equals("-inlineSchemas")) { inlineSchemas = true; return 1; + } else if ("-x".equals(args[i])) { + externalMetadataFiles.add(requireArgument("-x", args, ++i)); + return 1; } return j; @@ -180,7 +194,6 @@ public class WsgenOptions extends Options { private boolean isImplClass; - private boolean noWebServiceEndpoint; public void validate() throws BadCommandLineException { if(nonclassDestDir == null) @@ -233,9 +246,6 @@ public class WsgenOptions extends Options { if(!isImplClass){ throw new BadCommandLineException(WscompileMessages.WSGEN_CLASS_MUST_BE_IMPLEMENTATION_CLASS(clazz.getName())); } - if(noWebServiceEndpoint){ - throw new BadCommandLineException(WscompileMessages.WSGEN_NO_WEBSERVICES_CLASS(clazz.getName())); - } endpoint = clazz; validateBinding(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java index 4fad71eb17d..f8cdca41a03 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsgenTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.tools.internal.ws.wscompile; +import com.oracle.webservices.internal.api.databinding.WSDLResolver; import com.sun.istack.internal.tools.ParallelWorldClassLoader; import com.sun.tools.internal.ws.ToolVersion; import com.sun.tools.internal.ws.processor.modeler.annotation.WebServiceAp; @@ -43,9 +44,9 @@ import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; 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.model.ExternalMetadataReader; import com.sun.xml.internal.ws.model.AbstractSEIModelImpl; import com.sun.xml.internal.ws.util.ServiceFinder; -import com.sun.xml.internal.ws.wsdl.writer.WSDLResolver; import org.xml.sax.SAXParseException; import javax.tools.DiagnosticCollector; @@ -71,6 +72,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -86,7 +88,7 @@ public class WsgenTool { public WsgenTool(OutputStream out, Container container) { - this.out = (out instanceof PrintStream)?(PrintStream)out:new PrintStream(out); + this.out = (out instanceof PrintStream) ? (PrintStream) out : new PrintStream(out); this.container = container; } @@ -95,7 +97,7 @@ public class WsgenTool { this(out, null); } - public boolean run(String[] args){ + public boolean run(String[] args) { final Listener listener = new Listener(); for (String arg : args) { if (arg.equals("-version")) { @@ -112,22 +114,22 @@ public class WsgenTool { try { options.parseArguments(args); options.validate(); - if(!buildModel(options.endpoint.getName(), listener)){ + if (!buildModel(options.endpoint.getName(), listener)) { return false; } - }catch (Options.WeAreDone done){ - usage((WsgenOptions)done.getOptions()); - }catch (BadCommandLineException e) { - if(e.getMessage()!=null) { + } catch (Options.WeAreDone done) { + usage(done.getOptions()); + } catch (BadCommandLineException e) { + if (e.getMessage() != null) { System.out.println(e.getMessage()); System.out.println(); } - usage((WsgenOptions)e.getOptions()); + usage(e.getOptions()); return false; - }catch(AbortException e){ + } catch (AbortException e) { //error might have been reported - }finally{ - if(!options.keep){ + } finally { + if (!options.keep) { options.removeGeneratedFiles(); } } @@ -136,21 +138,25 @@ public class WsgenTool { private final Container container; - private int round = 0; - /* * 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")); + ParallelWorldClassLoader.toJarUrl(clazz.getResource('/' + clazz.getName().replace('.', '/') + ".class")); return true; - } catch(Exception e) { + } catch (Exception e) { return false; } } - + /** + * + * @param endpoint + * @param listener + * @return + * @throws BadCommandLineException + */ public boolean buildModel(String endpoint, Listener listener) throws BadCommandLineException { final ErrorReceiverFilter errReceiver = new ErrorReceiverFilter(listener); @@ -178,7 +184,7 @@ public class WsgenTool { .append(JavaCompilerHelper.getJarFile(XmlSeeAlso.class)).toString()); } - JavaCompiler compiler = ToolProvider.getSystemJavaCompiler(); + JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();// compiler = JavacTool.create(); DiagnosticCollector diagnostics = new DiagnosticCollector(); StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnostics, null, null); JavaCompiler.CompilationTask task = compiler.getTask( @@ -196,8 +202,15 @@ public class WsgenTool { return false; } if (options.genWsdl) { - DatabindingConfig config = new DatabindingConfig(); - String tmpPath = options.destDir.getAbsolutePath()+ File.pathSeparator+options.classpath; + DatabindingConfig config = new DatabindingConfig(); + + List externalMetadataFileNames = options.externalMetadataFiles; + boolean disableSecureXmlProcessing = options.disableSecureXmlProcessing; + if (externalMetadataFileNames != null && externalMetadataFileNames.size() > 0) { + config.setMetadataReader(new ExternalMetadataReader(getExternalFiles(externalMetadataFileNames), null, null, true, disableSecureXmlProcessing)); + } + + String tmpPath = options.destDir.getAbsolutePath() + File.pathSeparator + options.classpath; ClassLoader classLoader = new URLClassLoader(Options.pathToURLs(tmpPath), this.getClass().getClassLoader()); Class endpointClass; @@ -218,23 +231,26 @@ public class WsgenTool { config.getMappingInfo().setPortName(options.portName);//rtModeler.setPortName(options.portName); // AbstractSEIModelImpl rtModel = rtModeler.buildRuntimeModel(); - DatabindingFactory fac = DatabindingFactory.newInstance(); - config.setEndpointClass(endpointClass); - config.getMappingInfo().setServiceName(options.serviceName); - config.setFeatures(wsfeatures.toArray()); - config.setClassLoader(classLoader); - config.getMappingInfo().setBindingID(bindingID); - com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config); + DatabindingFactory fac = DatabindingFactory.newInstance(); + config.setEndpointClass(endpointClass); + config.getMappingInfo().setServiceName(options.serviceName); + config.setFeatures(wsfeatures.toArray()); + config.setClassLoader(classLoader); + config.getMappingInfo().setBindingID(bindingID); + com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl) fac.createRuntime(config); final File[] wsdlFileName = new File[1]; // used to capture the generated WSDL file. - final Map schemaFiles = new HashMap(); + final Map schemaFiles = new HashMap(); WSDLGenInfo wsdlGenInfo = new WSDLGenInfo(); + wsdlGenInfo.setSecureXmlProcessingDisabled(disableSecureXmlProcessing); + wsdlGenInfo.setWsdlResolver( new WSDLResolver() { private File toFile(String suggestedFilename) { return new File(options.nonclassDestDir, suggestedFilename); } + private Result toResult(File file) { Result result; try { @@ -247,21 +263,27 @@ public class WsgenTool { return result; } + @Override public Result getWSDL(String suggestedFilename) { File f = toFile(suggestedFilename); wsdlFileName[0] = f; return toResult(f); } + public Result getSchemaOutput(String namespace, String suggestedFilename) { if (namespace == null) return null; File f = toFile(suggestedFilename); - schemaFiles.put(namespace,f); + schemaFiles.put(namespace, f); return toResult(f); } + + @Override public Result getAbstractWSDL(Holder filename) { return toResult(toFile(filename.value)); } + + @Override public Result getSchemaOutput(String namespace, Holder filename) { return getSchemaOutput(namespace, filename.value); } @@ -274,20 +296,34 @@ public class WsgenTool { rt.generateWSDL(wsdlGenInfo); - if(options.wsgenReport!=null) - generateWsgenReport(endpointClass,(AbstractSEIModelImpl)rt.getModel(),wsdlFileName[0],schemaFiles); + if (options.wsgenReport != null) + generateWsgenReport(endpointClass, (AbstractSEIModelImpl) rt.getModel(), wsdlFileName[0], schemaFiles); } return true; } + private List getExternalFiles(List exts) { + List files = new ArrayList(); + for (String ext : exts) { + // first try absolute path ... + File file = new File(ext); + if (!file.exists()) { + // then relative path ... + file = new File(options.sourceDir.getAbsolutePath() + File.separator + ext); + } + files.add(file); + } + return files; + } + /** * Generates a small XML file that captures the key activity of wsgen, * so that test harness can pick up artifacts. */ - private void generateWsgenReport(Class endpointClass, AbstractSEIModelImpl rtModel, File wsdlFile, Map schemaFiles) { + private void generateWsgenReport(Class endpointClass, AbstractSEIModelImpl rtModel, File wsdlFile, Map schemaFiles) { try { ReportOutput.Report report = TXW.create(ReportOutput.Report.class, - new StreamSerializer(new BufferedOutputStream(new FileOutputStream(options.wsgenReport)))); + new StreamSerializer(new BufferedOutputStream(new FileOutputStream(options.wsgenReport)))); report.wsdl(wsdlFile.getAbsolutePath()); ReportOutput.writeQName(rtModel.getServiceQName(), report.service()); @@ -296,7 +332,7 @@ public class WsgenTool { report.implClass(endpointClass.getName()); - for (Map.Entry e : schemaFiles.entrySet()) { + for (Map.Entry e : schemaFiles.entrySet()) { ReportOutput.Schema s = report.schema(); s.ns(e.getKey()); s.location(e.getValue().getAbsolutePath()); @@ -317,10 +353,13 @@ public class WsgenTool { interface Report extends TypedXmlWriter { @XmlElement void wsdl(String file); // location of WSDL + @XmlElement QualifiedName portType(); + @XmlElement QualifiedName service(); + @XmlElement QualifiedName port(); @@ -337,6 +376,7 @@ public class WsgenTool { interface QualifiedName extends TypedXmlWriter { @XmlAttribute void uri(String ns); + @XmlAttribute void localName(String localName); } @@ -344,23 +384,28 @@ public class WsgenTool { interface Schema extends TypedXmlWriter { @XmlAttribute void ns(String ns); + @XmlAttribute void location(String filePath); } - private static void writeQName( QName n, QualifiedName w ) { + private static void writeQName(QName n, QualifiedName w) { w.uri(n.getNamespaceURI()); w.localName(n.getLocalPart()); } } - protected void usage(WsgenOptions options) { + protected void usage(Options 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()); + if (options instanceof WsgenOptions) { + System.out.println(WscompileMessages.WSGEN_HELP("WSGEN", + ((WsgenOptions)options).protocols, + ((WsgenOptions)options).nonstdProtocols.keySet())); + System.out.println(WscompileMessages.WSGEN_USAGE_EXAMPLES()); + } } class Listener extends WsimportListener { diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java index 202fbbdafa6..6d94046cced 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java index 8df76d7b09f..bf74e98d7b3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportOptions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,6 +62,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.HashMap; +import java.util.logging.Level; +import java.util.logging.Logger; /** * @author Vivek Pandey @@ -139,7 +141,12 @@ public class WsimportOptions extends Options { /** * Authentication file */ - public File authFile; + public File authFile = null; + + //can user.home value be null? + public static final String defaultAuthfile + = System.getProperty("user.home") + System.getProperty("file.separator") + + ".metro" + System.getProperty("file.separator") + "auth"; /** * Setting disableAuthenticator to true disables the DefaultAuthenticator. @@ -147,6 +154,10 @@ public class WsimportOptions extends Options { */ public boolean disableAuthenticator; + public String proxyAuth = null; + private String proxyHost = null; + private String proxyPort = null; + /** * Additional arguments */ @@ -240,6 +251,16 @@ public class WsimportOptions extends Options { } } } + + if (encoding != null && schemaCompiler.getOptions().encoding == null) { + try { + schemaCompiler.getOptions().parseArgument( + new String[] {"-encoding", encoding}, 0); + } catch (com.sun.tools.internal.xjc.BadCommandLineException ex) { + Logger.getLogger(WsimportOptions.class.getName()).log(Level.SEVERE, null, ex); + } + } + if(destDir == null) destDir = new File("."); if(sourceDir == null) @@ -292,15 +313,15 @@ public class WsimportOptions extends Options { if (value.length() == 0) { throw new BadCommandLineException(WscompileMessages.WSCOMPILE_INVALID_OPTION(args[i])); } - int index = value.indexOf(':'); - if (index == -1) { + parseProxy(value); + if (proxyHost != null || proxyPort != null) { System.setProperty("proxySet", "true"); - System.setProperty("proxyHost", value); - System.setProperty("proxyPort", "8080"); - } else { - System.setProperty("proxySet", "true"); - System.setProperty("proxyHost", value.substring(0, index)); - System.setProperty("proxyPort", value.substring(index + 1)); + } + if (proxyHost != null) { + System.setProperty("proxyHost", proxyHost); + } + if (proxyPort != null) { + System.setProperty("proxyPort", proxyPort); } return 1; } else if (args[i].equals("-Xno-addressing-databinding")) { @@ -576,6 +597,37 @@ public class WsimportOptions extends Options { return extensionOptions.get(argument); } + private void parseProxy(String text) throws BadCommandLineException { + int i = text.lastIndexOf('@'); + int j = text.lastIndexOf(':'); + + if (i > 0) { + proxyAuth = text.substring(0, i); + if (j > i) { + proxyHost = text.substring(i + 1, j); + proxyPort = text.substring(j + 1); + } else { + proxyHost = text.substring(i + 1); + proxyPort = "8080"; + } + } else { + //no auth info + if (j < 0) { + //no port + proxyHost = text; + proxyPort = "8080"; + } else { + proxyHost = text.substring(0, j); + proxyPort = text.substring(j + 1); + } + } + try { + Integer.valueOf(proxyPort); + } catch (NumberFormatException e) { + throw new BadCommandLineException(WscompileMessages.WSIMPORT_ILLEGAL_PROXY(text)); + } + } + /** * Looks for all "META-INF/services/[className]" files and * create one instance for each class name found inside this file. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java index 7fdcca0a72f..512b29395b7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/WsimportTool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ package com.sun.tools.internal.ws.wscompile; import com.sun.codemodel.internal.CodeWriter; import com.sun.codemodel.internal.writer.ProgressCodeWriter; +import com.sun.istack.internal.tools.DefaultAuthenticator; import com.sun.tools.internal.ws.ToolVersion; import com.sun.tools.internal.ws.api.TJavaGeneratorExtension; import com.sun.tools.internal.ws.processor.generator.CustomExceptionGenerator; @@ -55,9 +56,10 @@ import javax.xml.stream.*; import javax.xml.ws.EndpointContext; import java.io.*; import java.util.*; -import java.net.Authenticator; +import java.text.MessageFormat; import java.util.jar.JarEntry; import java.util.jar.JarOutputStream; +import org.xml.sax.Locator; import org.xml.sax.SAXException; /** @@ -134,11 +136,13 @@ public class WsimportTool { this.listener = listener; } + @Override public void info(SAXParseException exception) { if (options.verbose) super.info(exception); } + @Override public void warning(SAXParseException exception) { if (!options.quiet) super.warning(exception); @@ -179,13 +183,10 @@ public class WsimportTool { } } - Authenticator orig = null; try { parseArguments(args, listener, receiver); try { - orig = DefaultAuthenticator.getCurrentAuthenticator(); - Model wsdlModel = buildWsdlModel(listener, receiver); if (wsdlModel == null) return false; @@ -235,7 +236,7 @@ public class WsimportTool { } finally{ deleteGeneratedFiles(); if (!options.disableAuthenticator) { - Authenticator.setDefault(orig); + DefaultAuthenticator.reset(); } } if(receiver.hadError()) { @@ -253,11 +254,12 @@ public class WsimportTool { synchronized (generatedFiles) { for (File file : generatedFiles) { if (!file.getName().endsWith(".java")) { - file.delete(); + boolean deleted = file.delete(); + if (options.verbose && !deleted) { + System.out.println(MessageFormat.format("{0} could not be deleted.", file)); + } trackedRootPackages.add(file.getParentFile()); - } - } } //remove empty package dirs @@ -265,7 +267,10 @@ public class WsimportTool { while(pkg.list() != null && pkg.list().length ==0 && !pkg.equals(options.destDir)) { File parentPkg = pkg.getParentFile(); - pkg.delete(); + boolean deleted = pkg.delete(); + if (options.verbose && !deleted) { + System.out.println(MessageFormat.format("{0} could not be deleted.", pkg)); + } pkg = parentPkg; } } @@ -273,7 +278,6 @@ public class WsimportTool { if(!options.keep) { options.removeGeneratedFiles(); } - } private void addClassesToGeneratedFiles() throws IOException { @@ -286,7 +290,7 @@ public class WsimportTool { File classDir = new File(options.destDir,relativeDir); if(classDir.exists()) { classDir.listFiles(new FilenameFilter() { - + @Override public boolean accept(File dir, String name) { if(name.equals(className+".class") || (name.startsWith(className+"$") && name.endsWith(".class"))) { trackedClassFiles.add(new File(dir,name)); @@ -309,42 +313,50 @@ public class WsimportTool { zipFile = new File(options.destDir, options.clientjar); } - if (zipFile.exists()) { - //TODO - } - FileOutputStream fos = null; - if( !options.quiet ) + FileOutputStream fos; + if (!options.quiet) { listener.message(WscompileMessages.WSIMPORT_ARCHIVING_ARTIFACTS(zipFile)); + } - + BufferedInputStream bis = null; + FileInputStream fi = null; fos = new FileOutputStream(zipFile); JarOutputStream jos = new JarOutputStream(fos); - - String base = options.destDir.getCanonicalPath(); - for(File f: options.getGeneratedFiles()) { - //exclude packaging the java files in the jar - if(f.getName().endsWith(".java")) { - continue; + try { + String base = options.destDir.getCanonicalPath(); + for(File f: options.getGeneratedFiles()) { + //exclude packaging the java files in the jar + if(f.getName().endsWith(".java")) { + continue; + } + if(options.verbose) { + listener.message(WscompileMessages.WSIMPORT_ARCHIVE_ARTIFACT(f, options.clientjar)); + } + String entry = f.getCanonicalPath().substring(base.length()+1); + fi = new FileInputStream(f); + bis = new BufferedInputStream(fi); + JarEntry jarEntry = new JarEntry(entry); + jos.putNextEntry(jarEntry); + int bytesRead; + byte[] buffer = new byte[1024]; + while ((bytesRead = bis.read(buffer)) != -1) { + jos.write(buffer, 0, bytesRead); + } } - if(options.verbose) { - listener.message(WscompileMessages.WSIMPORT_ARCHIVE_ARTIFACT(f, options.clientjar)); + } finally { + try { + if (bis != null) { + bis.close(); + } + } finally { + if (jos != null) { + jos.close(); + } + if (fi != null) { + fi.close(); + } } - String entry = f.getCanonicalPath().substring(base.length()+1); - BufferedInputStream bis = new BufferedInputStream( - new FileInputStream(f)); - JarEntry jarEntry = new JarEntry(entry); - jos.putNextEntry(jarEntry); - int bytesRead; - byte[] buffer = new byte[1024]; - while ((bytesRead = bis.read(buffer)) != -1) { - jos.write(buffer, 0, bytesRead); - } - bis.close(); - } - - jos.close(); - } protected void parseArguments(String[] args, Listener listener, @@ -356,15 +368,56 @@ public class WsimportTool { options.parseBindings(receiver); } - protected Model buildWsdlModel(Listener listener, - Receiver receiver) throws BadCommandLineException, XMLStreamException, IOException { - if( !options.quiet ) - listener.message(WscompileMessages.WSIMPORT_PARSING_WSDL()); - + protected Model buildWsdlModel(Listener listener, final Receiver receiver) + throws BadCommandLineException, XMLStreamException, IOException { //set auth info //if(options.authFile != null) if (!options.disableAuthenticator) { - Authenticator.setDefault(new DefaultAuthenticator(receiver, options.authFile)); + class AuthListener implements DefaultAuthenticator.Receiver { + + private final boolean isFatal; + + AuthListener(boolean isFatal) { + this.isFatal = isFatal; + } + + @Override + public void onParsingError(String text, Locator loc) { + error(new SAXParseException(WscompileMessages.WSIMPORT_ILLEGAL_AUTH_INFO(text), loc)); + } + + @Override + public void onError(Exception e, Locator loc) { + if (e instanceof FileNotFoundException) { + error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_FILE_NOT_FOUND( + loc.getSystemId(), WsimportOptions.defaultAuthfile), null)); + } else { + error(new SAXParseException(WscompileMessages.WSIMPORT_FAILED_TO_PARSE(loc.getSystemId(),e.getMessage()), loc)); + } + } + + private void error(SAXParseException e) { + if (isFatal) { + receiver.error(e); + } else { + receiver.debug(e); + } + } + } + + DefaultAuthenticator da = DefaultAuthenticator.getAuthenticator(); + if (options.proxyAuth != null) { + da.setProxyAuth(options.proxyAuth); + } + if (options.authFile != null) { + da.setAuth(options.authFile, new AuthListener(true)); + } else { + da.setAuth(new File(WsimportOptions.defaultAuthfile), new AuthListener(false)); + } + } + + if (!options.quiet) { + listener.message(WscompileMessages.WSIMPORT_PARSING_WSDL()); } MetadataFinder forest = new MetadataFinder(new WSDLInternalizationLogic(), options, receiver); @@ -498,7 +551,7 @@ public class WsimportTool { listener.message(WscompileMessages.WSIMPORT_COMPILING_CODE()); if(options.verbose){ - StringBuffer argstr = new StringBuffer(); + StringBuilder argstr = new StringBuilder(); for(String arg:args){ argstr.append(arg).append(" "); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java index a0418c3e59c..64d7d7b4146 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/plugin/at_generated/PluginImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java index 6679784b746..d0c05875dc4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Binding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java index 671caf38aa4..e48823e26ca 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java index 65329c4b3ce..10ff46599a5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java index 21e260f064c..83118458a10 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,7 @@ public class BindingOperation extends Entity implements TWSDLExtensible { public String getUniqueKey() { if (_uniqueKey == null) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(_name); sb.append(' '); if (_input != null) { @@ -121,6 +121,7 @@ public class BindingOperation extends Entity implements TWSDLExtensible { return _faults; } + @Override public QName getElementName() { return WSDLConstants.QNAME_OPERATION; } @@ -133,30 +134,37 @@ public class BindingOperation extends Entity implements TWSDLExtensible { _documentation = d; } + @Override public String getNameValue() { return getName(); } + @Override public String getNamespaceURI() { - return parent.getNamespaceURI(); + return (parent == null) ? null : parent.getNamespaceURI(); } + @Override public QName getWSDLElementName() { return getElementName(); } + @Override public void addExtension(TWSDLExtension e) { _helper.addExtension(e); } + @Override public Iterable extensions() { return _helper.extensions(); } + @Override public TWSDLExtensible getParent() { return parent; } + @Override public void withAllSubEntitiesDo(EntityAction action) { if (_input != null) { action.perform(_input); @@ -186,6 +194,7 @@ public class BindingOperation extends Entity implements TWSDLExtensible { visitor.postVisit(this); } + @Override public void validateThis() { if (_name == null) { failValidation("validation.missingRequiredAttribute", "name"); @@ -202,7 +211,7 @@ public class BindingOperation extends Entity implements TWSDLExtensible { if (_output != null) { failValidation("validation.invalidSubEntity", "output"); } - if (_faults != null && _faults.size() != 0) { + if (_faults != null && !_faults.isEmpty()) { failValidation("validation.invalidSubEntity", "fault"); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java index 6353100d493..0667238971d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/BindingOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java index 72808cc2806..8eb3096a128 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Definitions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.tools.internal.ws.wsdl.document; import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible; import com.sun.tools.internal.ws.api.wsdl.TWSDLExtension; import com.sun.tools.internal.ws.wsdl.framework.*; + import org.xml.sax.Locator; import javax.xml.namespace.QName; @@ -213,6 +214,10 @@ public class Definitions extends Entity implements Defining, TWSDLExtensible { public void validateThis() { } + public Map resolveBindings() { + return _document.getMap(Kinds.BINDING); + } + private AbstractDocument _document; private ExtensibilityHelper _helper; private Documentation _documentation; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java index 7643e721a65..e53f0069f15 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Documentation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java index a491a34eef3..be958bcaa92 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Fault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,6 +64,7 @@ public class Fault extends Entity implements TWSDLExtensible { return (Message) document.find(Kinds.MESSAGE, _message); } + @Override public QName getElementName() { return WSDLConstants.QNAME_FAULT; } @@ -76,12 +77,14 @@ public class Fault extends Entity implements TWSDLExtensible { _documentation = d; } + @Override public void withAllQNamesDo(QNameAction action) { if (_message != null) { action.perform(_message); } } + @Override public void withAllEntityReferencesDo(EntityReferenceAction action) { super.withAllEntityReferencesDo(action); if (_message != null) { @@ -94,6 +97,7 @@ public class Fault extends Entity implements TWSDLExtensible { visitor.postVisit(this); } + @Override public void validateThis() { if (_name == null) { failValidation("validation.missingRequiredAttribute", "name"); @@ -109,14 +113,17 @@ public class Fault extends Entity implements TWSDLExtensible { private String _action; private ExtensibilityHelper _helper; + @Override public String getNameValue() { return getName(); } + @Override public String getNamespaceURI() { - return parent.getNamespaceURI(); + return (parent == null) ? null : parent.getNamespaceURI(); } + @Override public QName getWSDLElementName() { return getElementName(); } @@ -124,6 +131,7 @@ public class Fault extends Entity implements TWSDLExtensible { /* (non-Javadoc) * @see TWSDLExtensible#addExtension(ExtensionImpl) */ + @Override public void addExtension(TWSDLExtension e) { _helper.addExtension(e); @@ -132,10 +140,12 @@ public class Fault extends Entity implements TWSDLExtensible { /* (non-Javadoc) * @see TWSDLExtensible#extensions() */ + @Override public Iterable extensions() { return _helper.extensions(); } + @Override public TWSDLExtensible getParent() { return parent; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java index 992189953e9..500305e6510 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Import.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java index 2fb95a98e15..33d5b51252d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Input.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java index c30a0cc888a..4055c262fc6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Kinds.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java index e415a12d6e5..193b80c386e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Message.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java index 28e85f1c244..bb5754652db 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/MessagePart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java index 2287abe0647..cc2fdeb8c69 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Operation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java index 6c3e4fb5c91..9e7c62a2aae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/OperationStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java index ed21e10e070..93db8a4f87e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Output.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java index 0ba257b9157..654a5d8a611 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Port.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java index 1a20797c752..0aeee5d29e0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/PortType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java index b52af397b77..8d98076b5ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Service.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java index dea614eea8c..e2248ceef17 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/Types.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,7 @@ public class Types extends Entity implements TWSDLExtensible { _helper = new ExtensibilityHelper(); } + @Override public QName getElementName() { return WSDLConstants.QNAME_TYPES; } @@ -65,32 +66,39 @@ public class Types extends Entity implements TWSDLExtensible { visitor.postVisit(this); } + @Override public void validateThis() { } /** * wsdl:type does not have any name attribute */ + @Override public String getNameValue() { return null; } + @Override public String getNamespaceURI() { - return parent.getNamespaceURI(); + return (parent == null) ? null : parent.getNamespaceURI(); } + @Override public QName getWSDLElementName() { return getElementName(); } + @Override public void addExtension(TWSDLExtension e) { _helper.addExtension(e); } + @Override public Iterable extensions() { return _helper.extensions(); } + @Override public TWSDLExtensible getParent() { return parent; } @@ -99,6 +107,7 @@ public class Types extends Entity implements TWSDLExtensible { this.parent = parent; } + @Override public void withAllSubEntitiesDo(EntityAction action) { _helper.withAllSubEntitiesDo(action); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java index d2c7aed29e2..47df2305e44 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,25 +35,24 @@ import javax.xml.namespace.QName; public interface WSDLConstants { // namespace URIs - public static String NS_XMLNS = "http://www.w3.org/2000/xmlns/"; - public static String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/"; + static final String NS_XMLNS = "http://www.w3.org/2000/xmlns/"; + static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/"; // QNames - public static QName QNAME_BINDING = new QName(NS_WSDL, "binding"); - public static QName QNAME_DEFINITIONS = new QName(NS_WSDL, "definitions"); - public static QName QNAME_DOCUMENTATION = - new QName(NS_WSDL, "documentation"); - public static QName QNAME_FAULT = new QName(NS_WSDL, "fault"); - public static QName QNAME_IMPORT = new QName(NS_WSDL, "import"); - public static QName QNAME_INPUT = new QName(NS_WSDL, "input"); - public static QName QNAME_MESSAGE = new QName(NS_WSDL, "message"); - public static QName QNAME_OPERATION = new QName(NS_WSDL, "operation"); - public static QName QNAME_OUTPUT = new QName(NS_WSDL, "output"); - public static QName QNAME_PART = new QName(NS_WSDL, "part"); - public static QName QNAME_PORT = new QName(NS_WSDL, "port"); - public static QName QNAME_PORT_TYPE = new QName(NS_WSDL, "portType"); - public static QName QNAME_SERVICE = new QName(NS_WSDL, "service"); - public static QName QNAME_TYPES = new QName(NS_WSDL, "types"); + static final QName QNAME_BINDING = new QName(NS_WSDL, "binding"); + static final QName QNAME_DEFINITIONS = new QName(NS_WSDL, "definitions"); + static final QName QNAME_DOCUMENTATION = new QName(NS_WSDL, "documentation"); + static final QName QNAME_FAULT = new QName(NS_WSDL, "fault"); + static final QName QNAME_IMPORT = new QName(NS_WSDL, "import"); + static final QName QNAME_INPUT = new QName(NS_WSDL, "input"); + static final QName QNAME_MESSAGE = new QName(NS_WSDL, "message"); + static final QName QNAME_OPERATION = new QName(NS_WSDL, "operation"); + static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output"); + static final QName QNAME_PART = new QName(NS_WSDL, "part"); + static final QName QNAME_PORT = new QName(NS_WSDL, "port"); + static final QName QNAME_PORT_TYPE = new QName(NS_WSDL, "portType"); + static final QName QNAME_SERVICE = new QName(NS_WSDL, "service"); + static final QName QNAME_TYPES = new QName(NS_WSDL, "types"); - public static QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_WSDL, "arrayType"); + static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_WSDL, "arrayType"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java index ced493f4b14..31d0f755492 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,6 @@ import com.sun.tools.internal.ws.wscompile.ErrorReceiver; import javax.xml.namespace.QName; import java.util.ArrayList; import java.util.Iterator; -import java.util.Set; /** * A WSDL document. @@ -110,6 +109,7 @@ public class WSDLDocument extends AbstractDocument{ _definitions.accept(visitor); } + @Override public void validate(EntityReferenceValidator validator) { GloballyValidatingAction action = new GloballyValidatingAction(this, validator); @@ -119,14 +119,14 @@ public class WSDLDocument extends AbstractDocument{ } } + @Override protected Entity getRoot() { return _definitions; } private Definitions _definitions; - private class GloballyValidatingAction - implements EntityAction, EntityReferenceAction { + private static class GloballyValidatingAction implements EntityAction, EntityReferenceAction { public GloballyValidatingAction( AbstractDocument document, EntityReferenceValidator validator) { @@ -134,6 +134,7 @@ public class WSDLDocument extends AbstractDocument{ _validator = validator; } + @Override public void perform(Entity entity) { try { entity.validateThis(); @@ -146,9 +147,10 @@ public class WSDLDocument extends AbstractDocument{ } } + @Override public void perform(Kind kind, QName name) { try { - GloballyKnown entity = _document.find(kind, name); + _document.find(kind, name); } catch (NoSuchEntityException e) { // failed to resolve, check with the validator if (_exception == null) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java index 5112e650733..fa7c4ab73ec 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java index 26308e12b8d..3205e6c4013 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/WSDLDocumentVisitorBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java index f185e60b837..a4c195702bd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java index ce66e2ee6b4..e3bc77a1677 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java index 19b9eba8c50..f56385b735e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,14 +35,12 @@ import javax.xml.namespace.QName; public interface HTTPConstants { // namespace URIs - public static String NS_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"; + static final String NS_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"; // QNames - public static QName QNAME_ADDRESS = new QName(NS_WSDL_HTTP, "address"); - public static QName QNAME_BINDING = new QName(NS_WSDL_HTTP, "binding"); - public static QName QNAME_OPERATION = new QName(NS_WSDL_HTTP, "operation"); - public static QName QNAME_URL_ENCODED = - new QName(NS_WSDL_HTTP, "urlEncoded"); - public static QName QNAME_URL_REPLACEMENT = - new QName(NS_WSDL_HTTP, "urlReplacement"); + static final QName QNAME_ADDRESS = new QName(NS_WSDL_HTTP, "address"); + static final QName QNAME_BINDING = new QName(NS_WSDL_HTTP, "binding"); + static final QName QNAME_OPERATION = new QName(NS_WSDL_HTTP, "operation"); + static final QName QNAME_URL_ENCODED = new QName(NS_WSDL_HTTP, "urlEncoded"); + static final QName QNAME_URL_REPLACEMENT = new QName(NS_WSDL_HTTP, "urlReplacement"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java index 9a7c436ea15..e431823ba4f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java index bca69a07f18..1b5850f3f8c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlEncoded.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java index 0b87802e7cb..da8e7173c06 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/http/HTTPUrlReplacement.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java index 907b0396087..88720f29b71 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/CustomName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java index c3c3c87719d..dc5f8fdc40d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Exception.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java index 7bae52a86c0..df43b0f5941 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -291,19 +291,6 @@ public class JAXWSBinding extends ExtensionImpl { this.className = className; } - /** - * @return Returns the exception. - */ - public Exception getException() { - return exception; - } - /** - * @param exception The exception to set. - */ - public void setException(Exception exception) { - this.exception = exception; - } - private String wsdlNamespace; private String wsdlLocation; private String node; @@ -316,7 +303,6 @@ public class JAXWSBinding extends ExtensionImpl { // private Boolean enableAdditionalHeaderMapping; private Boolean enableMimeContentMapping; private Boolean isProvider; - private Exception exception; private Set jaxbBindings; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java index 1ba6219d76d..25e3b7c66c0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/JAXWSBindingsConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,9 +35,9 @@ import javax.xml.namespace.QName; */ public interface JAXWSBindingsConstants { - public static String NS_JAXWS_BINDINGS = "http://java.sun.com/xml/ns/jaxws"; - public static String NS_JAXB_BINDINGS = "http://java.sun.com/xml/ns/jaxb"; - public static String NS_XJC_BINDINGS = "http://java.sun.com/xml/ns/jaxb/xjc"; + static final String NS_JAXWS_BINDINGS = "http://java.sun.com/xml/ns/jaxws"; + static final String NS_JAXB_BINDINGS = "http://java.sun.com/xml/ns/jaxb"; + static final String NS_XJC_BINDINGS = "http://java.sun.com/xml/ns/jaxb/xjc"; /** * jaxws:bindings schema component @@ -62,44 +62,44 @@ public interface JAXWSBindingsConstants { * elements that don't have any jaxws:bindings ancestors (i.e. on * outermost binding declarations). */ - public static QName JAXWS_BINDINGS = new QName(NS_JAXWS_BINDINGS, "bindings"); - public static String WSDL_LOCATION_ATTR = "wsdlLocation"; - public static String NODE_ATTR = "node"; - public static String VERSION_ATTR = "version"; + static final QName JAXWS_BINDINGS = new QName(NS_JAXWS_BINDINGS, "bindings"); + static final String WSDL_LOCATION_ATTR = "wsdlLocation"; + static final String NODE_ATTR = "node"; + static final String VERSION_ATTR = "version"; /* * ? xs:string * */ - public static QName PACKAGE = new QName(NS_JAXWS_BINDINGS, "package"); - public static String NAME_ATTR = "name"; - public static QName JAVADOC = new QName(NS_JAXWS_BINDINGS, "javadoc"); + static final QName PACKAGE = new QName(NS_JAXWS_BINDINGS, "package"); + static final String NAME_ATTR = "name"; + static final QName JAVADOC = new QName(NS_JAXWS_BINDINGS, "javadoc"); /* * xs:boolean ? */ - public static QName ENABLE_WRAPPER_STYLE = new QName(NS_JAXWS_BINDINGS, "enableWrapperStyle"); + static final QName ENABLE_WRAPPER_STYLE = new QName(NS_JAXWS_BINDINGS, "enableWrapperStyle"); /* * xs:boolean * ? */ - public static QName ENABLE_ASYNC_MAPPING = new QName(NS_JAXWS_BINDINGS, "enableAsyncMapping"); + static final QName ENABLE_ASYNC_MAPPING = new QName(NS_JAXWS_BINDINGS, "enableAsyncMapping"); /* * xs:boolean? */ - public static QName ENABLE_ADDITIONAL_SOAPHEADER_MAPPING = new QName(NS_JAXWS_BINDINGS, "enableAdditionalSOAPHeaderMapping"); + static final QName ENABLE_ADDITIONAL_SOAPHEADER_MAPPING = new QName(NS_JAXWS_BINDINGS, "enableAdditionalSOAPHeaderMapping"); /* * xs:boolean? */ - public static QName ENABLE_MIME_CONTENT = new QName(NS_JAXWS_BINDINGS, "enableMIMEContent"); + static final QName ENABLE_MIME_CONTENT = new QName(NS_JAXWS_BINDINGS, "enableMIMEContent"); /* * xs:boolean? */ - public static QName PROVIDER = new QName(NS_JAXWS_BINDINGS, "provider"); + static final QName PROVIDER = new QName(NS_JAXWS_BINDINGS, "provider"); /* * PortType @@ -118,7 +118,7 @@ public interface JAXWSBindingsConstants { * */ - public static QName CLASS = new QName(NS_JAXWS_BINDINGS, "class"); + static final QName CLASS = new QName(NS_JAXWS_BINDINGS, "class"); /* * PortType WSDLOperation @@ -142,10 +142,10 @@ public interface JAXWSBindingsConstants { - public static QName METHOD = new QName(NS_JAXWS_BINDINGS, "method"); - public static QName PARAMETER = new QName(NS_JAXWS_BINDINGS, "parameter"); - public static String PART_ATTR = "part"; - public static String ELEMENT_ATTR = "childElementName"; + static final QName METHOD = new QName(NS_JAXWS_BINDINGS, "method"); + static final QName PARAMETER = new QName(NS_JAXWS_BINDINGS, "parameter"); + static final String PART_ATTR = "part"; + static final String ELEMENT_ATTR = "childElementName"; /* * Binding @@ -181,14 +181,14 @@ public interface JAXWSBindingsConstants { * */ - public static QName EXCEPTION = new QName(NS_JAXWS_BINDINGS, "exception"); + static final QName EXCEPTION = new QName(NS_JAXWS_BINDINGS, "exception"); /* * jaxb:bindgs QName */ - public static QName JAXB_BINDINGS = new QName(NS_JAXB_BINDINGS, "bindings"); - public static String JAXB_BINDING_VERSION = "2.0"; - public static QName XSD_APPINFO = new QName(Constants.NS_XSD, "appinfo"); - public static QName XSD_ANNOTATION = new QName(Constants.NS_XSD, "annotation"); + static final QName JAXB_BINDINGS = new QName(NS_JAXB_BINDINGS, "bindings"); + static final String JAXB_BINDING_VERSION = "2.0"; + static final QName XSD_APPINFO = new QName(Constants.NS_XSD, "appinfo"); + static final QName XSD_ANNOTATION = new QName(Constants.NS_XSD, "annotation"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java index a8fb3357a4b..662c482fba7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/jaxws/Parameter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java index 16d57b0b0c6..2a60bbe0671 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,12 +35,11 @@ import javax.xml.namespace.QName; public interface MIMEConstants { // namespace URIs - public static String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; + static final String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; // QNames - public static QName QNAME_CONTENT = new QName(NS_WSDL_MIME, "content"); - public static QName QNAME_MULTIPART_RELATED = - new QName(NS_WSDL_MIME, "multipartRelated"); - public static QName QNAME_PART = new QName(NS_WSDL_MIME, "part"); - public static QName QNAME_MIME_XML = new QName(NS_WSDL_MIME, "mimeXml"); + static final QName QNAME_CONTENT = new QName(NS_WSDL_MIME, "content"); + static final QName QNAME_MULTIPART_RELATED = new QName(NS_WSDL_MIME, "multipartRelated"); + static final QName QNAME_PART = new QName(NS_WSDL_MIME, "part"); + static final QName QNAME_MIME_XML = new QName(NS_WSDL_MIME, "mimeXml"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java index 85022483f3c..0716dc5063d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEContent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java index 3fc61466e00..618a2c0f255 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEMultipartRelated.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java index 3f6eabf782c..48e8d8c2d49 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java index 937ec8ef857..437cb68e249 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/mime/MIMEXml.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java index 8c3f8b7d778..8aab2ae2391 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,118 +34,103 @@ import javax.xml.namespace.QName; public interface SchemaConstants { // namespace URIs - public static String NS_XMLNS = "http://www.w3.org/2000/xmlns/"; - public static String NS_XSD = "http://www.w3.org/2001/XMLSchema"; - public static String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance"; + static final String NS_XMLNS = "http://www.w3.org/2000/xmlns/"; + static final String NS_XSD = "http://www.w3.org/2001/XMLSchema"; + static final String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance"; // QNames - public static QName QNAME_ALL = new QName(NS_XSD, "all"); - public static QName QNAME_ANNOTATION = new QName(NS_XSD, "annotation"); - public static QName QNAME_ANY = new QName(NS_XSD, "any"); - public static QName QNAME_ANY_ATTRIBUTE = new QName(NS_XSD, "anyAttribute"); - public static QName QNAME_ATTRIBUTE = new QName(NS_XSD, "attribute"); - public static QName QNAME_ATTRIBUTE_GROUP = - new QName(NS_XSD, "attributeGroup"); - public static QName QNAME_CHOICE = new QName(NS_XSD, "choice"); - public static QName QNAME_COMPLEX_CONTENT = - new QName(NS_XSD, "complexContent"); - public static QName QNAME_COMPLEX_TYPE = new QName(NS_XSD, "complexType"); - public static QName QNAME_ELEMENT = new QName(NS_XSD, "element"); - public static QName QNAME_ENUMERATION = new QName(NS_XSD, "enumeration"); - public static QName QNAME_EXTENSION = new QName(NS_XSD, "extension"); - public static QName QNAME_FIELD = new QName(NS_XSD, "field"); - public static QName QNAME_FRACTION_DIGITS = - new QName(NS_XSD, "fractionDigits"); - public static QName QNAME_GROUP = new QName(NS_XSD, "group"); - public static QName QNAME_IMPORT = new QName(NS_XSD, "import"); - public static QName QNAME_INCLUDE = new QName(NS_XSD, "include"); - public static QName QNAME_KEY = new QName(NS_XSD, "key"); - public static QName QNAME_KEYREF = new QName(NS_XSD, "keyref"); - public static QName QNAME_LENGTH = new QName(NS_XSD, "length"); - public static QName QNAME_LIST = new QName(NS_XSD, "list"); - public static QName QNAME_MAX_EXCLUSIVE = new QName(NS_XSD, "maxExclusive"); - public static QName QNAME_MAX_INCLUSIVE = new QName(NS_XSD, "maxInclusive"); - public static QName QNAME_MAX_LENGTH = new QName(NS_XSD, "maxLength"); - public static QName QNAME_MIN_EXCLUSIVE = new QName(NS_XSD, "minExclusive"); - public static QName QNAME_MIN_INCLUSIVE = new QName(NS_XSD, "minInclusive"); - public static QName QNAME_MIN_LENGTH = new QName(NS_XSD, "minLength"); - public static QName QNAME_NOTATION = new QName(NS_XSD, "notation"); - public static QName QNAME_RESTRICTION = new QName(NS_XSD, "restriction"); - public static QName QNAME_PATTERN = new QName(NS_XSD, "pattern"); - public static QName QNAME_PRECISION = new QName(NS_XSD, "precision"); - public static QName QNAME_REDEFINE = new QName(NS_XSD, "redefine"); - public static QName QNAME_SCALE = new QName(NS_XSD, "scale"); - public static QName QNAME_SCHEMA = new QName(NS_XSD, "schema"); - public static QName QNAME_SELECTOR = new QName(NS_XSD, "selector"); - public static QName QNAME_SEQUENCE = new QName(NS_XSD, "sequence"); - public static QName QNAME_SIMPLE_CONTENT = + static final QName QNAME_ALL = new QName(NS_XSD, "all"); + static final QName QNAME_ANNOTATION = new QName(NS_XSD, "annotation"); + static final QName QNAME_ANY = new QName(NS_XSD, "any"); + static final QName QNAME_ANY_ATTRIBUTE = new QName(NS_XSD, "anyAttribute"); + static final QName QNAME_ATTRIBUTE = new QName(NS_XSD, "attribute"); + static final QName QNAME_ATTRIBUTE_GROUP = new QName(NS_XSD, "attributeGroup"); + static final QName QNAME_CHOICE = new QName(NS_XSD, "choice"); + static final QName QNAME_COMPLEX_CONTENT = new QName(NS_XSD, "complexContent"); + static final QName QNAME_COMPLEX_TYPE = new QName(NS_XSD, "complexType"); + static final QName QNAME_ELEMENT = new QName(NS_XSD, "element"); + static final QName QNAME_ENUMERATION = new QName(NS_XSD, "enumeration"); + static final QName QNAME_EXTENSION = new QName(NS_XSD, "extension"); + static final QName QNAME_FIELD = new QName(NS_XSD, "field"); + static final QName QNAME_FRACTION_DIGITS = new QName(NS_XSD, "fractionDigits"); + static final QName QNAME_GROUP = new QName(NS_XSD, "group"); + static final QName QNAME_IMPORT = new QName(NS_XSD, "import"); + static final QName QNAME_INCLUDE = new QName(NS_XSD, "include"); + static final QName QNAME_KEY = new QName(NS_XSD, "key"); + static final QName QNAME_KEYREF = new QName(NS_XSD, "keyref"); + static final QName QNAME_LENGTH = new QName(NS_XSD, "length"); + static final QName QNAME_LIST = new QName(NS_XSD, "list"); + static final QName QNAME_MAX_EXCLUSIVE = new QName(NS_XSD, "maxExclusive"); + static final QName QNAME_MAX_INCLUSIVE = new QName(NS_XSD, "maxInclusive"); + static final QName QNAME_MAX_LENGTH = new QName(NS_XSD, "maxLength"); + static final QName QNAME_MIN_EXCLUSIVE = new QName(NS_XSD, "minExclusive"); + static final QName QNAME_MIN_INCLUSIVE = new QName(NS_XSD, "minInclusive"); + static final QName QNAME_MIN_LENGTH = new QName(NS_XSD, "minLength"); + static final QName QNAME_NOTATION = new QName(NS_XSD, "notation"); + static final QName QNAME_RESTRICTION = new QName(NS_XSD, "restriction"); + static final QName QNAME_PATTERN = new QName(NS_XSD, "pattern"); + static final QName QNAME_PRECISION = new QName(NS_XSD, "precision"); + static final QName QNAME_REDEFINE = new QName(NS_XSD, "redefine"); + static final QName QNAME_SCALE = new QName(NS_XSD, "scale"); + static final QName QNAME_SCHEMA = new QName(NS_XSD, "schema"); + static final QName QNAME_SELECTOR = new QName(NS_XSD, "selector"); + static final QName QNAME_SEQUENCE = new QName(NS_XSD, "sequence"); + static final QName QNAME_SIMPLE_CONTENT = new QName(NS_XSD, "simpleContent"); - public static QName QNAME_SIMPLE_TYPE = new QName(NS_XSD, "simpleType"); - public static QName QNAME_TOTAL_DIGITS = new QName(NS_XSD, "totalDigits"); - public static QName QNAME_UNIQUE = new QName(NS_XSD, "unique"); - public static QName QNAME_UNION = new QName(NS_XSD, "union"); - public static QName QNAME_WHITE_SPACE = new QName(NS_XSD, "whiteSpace"); + static final QName QNAME_SIMPLE_TYPE = new QName(NS_XSD, "simpleType"); + static final QName QNAME_TOTAL_DIGITS = new QName(NS_XSD, "totalDigits"); + static final QName QNAME_UNIQUE = new QName(NS_XSD, "unique"); + static final QName QNAME_UNION = new QName(NS_XSD, "union"); + static final QName QNAME_WHITE_SPACE = new QName(NS_XSD, "whiteSpace"); // QNames for built-in XSD types - public static QName QNAME_TYPE_STRING = new QName(NS_XSD, "string"); - public static QName QNAME_TYPE_NORMALIZED_STRING = - new QName(NS_XSD, "normalizedString"); - public static QName QNAME_TYPE_TOKEN = new QName(NS_XSD, "token"); - public static QName QNAME_TYPE_BYTE = new QName(NS_XSD, "byte"); - public static QName QNAME_TYPE_UNSIGNED_BYTE = - new QName(NS_XSD, "unsignedByte"); - public static QName QNAME_TYPE_BASE64_BINARY = - new QName(NS_XSD, "base64Binary"); - public static QName QNAME_TYPE_HEX_BINARY = new QName(NS_XSD, "hexBinary"); - public static QName QNAME_TYPE_INTEGER = new QName(NS_XSD, "integer"); - public static QName QNAME_TYPE_POSITIVE_INTEGER = - new QName(NS_XSD, "positiveInteger"); - public static QName QNAME_TYPE_NEGATIVE_INTEGER = - new QName(NS_XSD, "negativeInteger"); - public static QName QNAME_TYPE_NON_NEGATIVE_INTEGER = - new QName(NS_XSD, "nonNegativeInteger"); - public static QName QNAME_TYPE_NON_POSITIVE_INTEGER = - new QName(NS_XSD, "nonPositiveInteger"); - public static QName QNAME_TYPE_INT = new QName(NS_XSD, "int"); - public static QName QNAME_TYPE_UNSIGNED_INT = - new QName(NS_XSD, "unsignedInt"); - public static QName QNAME_TYPE_LONG = new QName(NS_XSD, "long"); - public static QName QNAME_TYPE_UNSIGNED_LONG = - new QName(NS_XSD, "unsignedLong"); - public static QName QNAME_TYPE_SHORT = new QName(NS_XSD, "short"); - public static QName QNAME_TYPE_UNSIGNED_SHORT = - new QName(NS_XSD, "unsignedShort"); - public static QName QNAME_TYPE_DECIMAL = new QName(NS_XSD, "decimal"); - public static QName QNAME_TYPE_FLOAT = new QName(NS_XSD, "float"); - public static QName QNAME_TYPE_DOUBLE = new QName(NS_XSD, "double"); - public static QName QNAME_TYPE_BOOLEAN = new QName(NS_XSD, "boolean"); - public static QName QNAME_TYPE_TIME = new QName(NS_XSD, "time"); - public static QName QNAME_TYPE_DATE_TIME = new QName(NS_XSD, "dateTime"); - public static QName QNAME_TYPE_DURATION = new QName(NS_XSD, "duration"); - public static QName QNAME_TYPE_DATE = new QName(NS_XSD, "date"); - public static QName QNAME_TYPE_G_MONTH = new QName(NS_XSD, "gMonth"); - public static QName QNAME_TYPE_G_YEAR = new QName(NS_XSD, "gYear"); - public static QName QNAME_TYPE_G_YEAR_MONTH = - new QName(NS_XSD, "gYearMonth"); - public static QName QNAME_TYPE_G_DAY = new QName(NS_XSD, "gDay"); - public static QName QNAME_TYPE_G_MONTH_DAY = new QName(NS_XSD, "gMonthDay"); - public static QName QNAME_TYPE_NAME = new QName(NS_XSD, "Name"); - public static QName QNAME_TYPE_QNAME = new QName(NS_XSD, "QName"); - public static QName QNAME_TYPE_NCNAME = new QName(NS_XSD, "NCName"); - public static QName QNAME_TYPE_ANY_URI = new QName(NS_XSD, "anyURI"); - public static QName QNAME_TYPE_ID = new QName(NS_XSD, "ID"); - public static QName QNAME_TYPE_IDREF = new QName(NS_XSD, "IDREF"); - public static QName QNAME_TYPE_IDREFS = new QName(NS_XSD, "IDREFS"); - public static QName QNAME_TYPE_ENTITY = new QName(NS_XSD, "ENTITY"); - public static QName QNAME_TYPE_ENTITIES = new QName(NS_XSD, "ENTITIES"); - public static QName QNAME_TYPE_NOTATION = new QName(NS_XSD, "NOTATION"); - public static QName QNAME_TYPE_NMTOKEN = new QName(NS_XSD, "NMTOKEN"); - public static QName QNAME_TYPE_NMTOKENS = new QName(NS_XSD, "NMTOKENS"); + static final QName QNAME_TYPE_STRING = new QName(NS_XSD, "string"); + static final QName QNAME_TYPE_NORMALIZED_STRING = new QName(NS_XSD, "normalizedString"); + static final QName QNAME_TYPE_TOKEN = new QName(NS_XSD, "token"); + static final QName QNAME_TYPE_BYTE = new QName(NS_XSD, "byte"); + static final QName QNAME_TYPE_UNSIGNED_BYTE = new QName(NS_XSD, "unsignedByte"); + static final QName QNAME_TYPE_BASE64_BINARY = new QName(NS_XSD, "base64Binary"); + static final QName QNAME_TYPE_HEX_BINARY = new QName(NS_XSD, "hexBinary"); + static final QName QNAME_TYPE_INTEGER = new QName(NS_XSD, "integer"); + static final QName QNAME_TYPE_POSITIVE_INTEGER = new QName(NS_XSD, "positiveInteger"); + static final QName QNAME_TYPE_NEGATIVE_INTEGER = new QName(NS_XSD, "negativeInteger"); + static final QName QNAME_TYPE_NON_NEGATIVE_INTEGER = new QName(NS_XSD, "nonNegativeInteger"); + static final QName QNAME_TYPE_NON_POSITIVE_INTEGER = new QName(NS_XSD, "nonPositiveInteger"); + static final QName QNAME_TYPE_INT = new QName(NS_XSD, "int"); + static final QName QNAME_TYPE_UNSIGNED_INT = new QName(NS_XSD, "unsignedInt"); + static final QName QNAME_TYPE_LONG = new QName(NS_XSD, "long"); + static final QName QNAME_TYPE_UNSIGNED_LONG = new QName(NS_XSD, "unsignedLong"); + static final QName QNAME_TYPE_SHORT = new QName(NS_XSD, "short"); + static final QName QNAME_TYPE_UNSIGNED_SHORT = new QName(NS_XSD, "unsignedShort"); + static final QName QNAME_TYPE_DECIMAL = new QName(NS_XSD, "decimal"); + static final QName QNAME_TYPE_FLOAT = new QName(NS_XSD, "float"); + static final QName QNAME_TYPE_DOUBLE = new QName(NS_XSD, "double"); + static final QName QNAME_TYPE_BOOLEAN = new QName(NS_XSD, "boolean"); + static final QName QNAME_TYPE_TIME = new QName(NS_XSD, "time"); + static final QName QNAME_TYPE_DATE_TIME = new QName(NS_XSD, "dateTime"); + static final QName QNAME_TYPE_DURATION = new QName(NS_XSD, "duration"); + static final QName QNAME_TYPE_DATE = new QName(NS_XSD, "date"); + static final QName QNAME_TYPE_G_MONTH = new QName(NS_XSD, "gMonth"); + static final QName QNAME_TYPE_G_YEAR = new QName(NS_XSD, "gYear"); + static final QName QNAME_TYPE_G_YEAR_MONTH = new QName(NS_XSD, "gYearMonth"); + static final QName QNAME_TYPE_G_DAY = new QName(NS_XSD, "gDay"); + static final QName QNAME_TYPE_G_MONTH_DAY = new QName(NS_XSD, "gMonthDay"); + static final QName QNAME_TYPE_NAME = new QName(NS_XSD, "Name"); + static final QName QNAME_TYPE_QNAME = new QName(NS_XSD, "QName"); + static final QName QNAME_TYPE_NCNAME = new QName(NS_XSD, "NCName"); + static final QName QNAME_TYPE_ANY_URI = new QName(NS_XSD, "anyURI"); + static final QName QNAME_TYPE_ID = new QName(NS_XSD, "ID"); + static final QName QNAME_TYPE_IDREF = new QName(NS_XSD, "IDREF"); + static final QName QNAME_TYPE_IDREFS = new QName(NS_XSD, "IDREFS"); + static final QName QNAME_TYPE_ENTITY = new QName(NS_XSD, "ENTITY"); + static final QName QNAME_TYPE_ENTITIES = new QName(NS_XSD, "ENTITIES"); + static final QName QNAME_TYPE_NOTATION = new QName(NS_XSD, "NOTATION"); + static final QName QNAME_TYPE_NMTOKEN = new QName(NS_XSD, "NMTOKEN"); + static final QName QNAME_TYPE_NMTOKENS = new QName(NS_XSD, "NMTOKENS"); - public static QName QNAME_TYPE_LANGUAGE = new QName(NS_XSD, "language"); + static final QName QNAME_TYPE_LANGUAGE = new QName(NS_XSD, "language"); // QNames for special types - public static QName QNAME_TYPE_URTYPE = new QName(NS_XSD, "anyType"); - public static QName QNAME_TYPE_SIMPLE_URTYPE = - new QName(NS_XSD, "anySimpleType"); + static final QName QNAME_TYPE_URTYPE = new QName(NS_XSD, "anyType"); + static final QName QNAME_TYPE_SIMPLE_URTYPE = new QName(NS_XSD, "anySimpleType"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java index d9db9187ff1..05c2c31a04f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/schema/SchemaKinds.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java index 64c2ed05287..1880700f3ea 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Binding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java index 3a98b9125b7..1495b8f1835 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAP12Constants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,205 +35,122 @@ import javax.xml.namespace.QName; public interface SOAP12Constants { // namespace URIs - public static String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap12/"; - public static String NS_SOAP_ENCODING = - "http://schemas.xmlsoap.org/soap/encoding/"; + static final String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap12/"; + static final String NS_SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/"; // other URIs - public static String URI_SOAP_TRANSPORT_HTTP = - "http://www.w3.org/2003/05/soap/bindings/HTTP/"; - ; + static final String URI_SOAP_TRANSPORT_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"; // QNames - public static QName QNAME_ADDRESS = new QName(NS_WSDL_SOAP, "address"); - public static QName QNAME_BINDING = new QName(NS_WSDL_SOAP, "binding"); - public static QName QNAME_BODY = new QName(NS_WSDL_SOAP, "body"); - public static QName QNAME_FAULT = new QName(NS_WSDL_SOAP, "fault"); - public static QName QNAME_HEADER = new QName(NS_WSDL_SOAP, "header"); - public static QName QNAME_HEADERFAULT = - new QName(NS_WSDL_SOAP, "headerfault"); - public static QName QNAME_OPERATION = new QName(NS_WSDL_SOAP, "operation"); + static final QName QNAME_ADDRESS = new QName(NS_WSDL_SOAP, "address"); + static final QName QNAME_BINDING = new QName(NS_WSDL_SOAP, "binding"); + static final QName QNAME_BODY = new QName(NS_WSDL_SOAP, "body"); + static final QName QNAME_FAULT = new QName(NS_WSDL_SOAP, "fault"); + static final QName QNAME_HEADER = new QName(NS_WSDL_SOAP, "header"); + static final QName QNAME_HEADERFAULT = new QName(NS_WSDL_SOAP, "headerfault"); + static final QName QNAME_OPERATION = new QName(NS_WSDL_SOAP, "operation"); // SOAP encoding QNames - public static QName QNAME_TYPE_ARRAY = new QName(NS_SOAP_ENCODING, "Array"); - public static QName QNAME_ATTR_GROUP_COMMON_ATTRIBUTES = - new QName(NS_SOAP_ENCODING, "commonAttributes"); - public static QName QNAME_ATTR_ARRAY_TYPE = - new QName(NS_SOAP_ENCODING, "arrayType"); - public static QName QNAME_ATTR_ITEM_TYPE = - new QName(NS_SOAP_ENCODING, "itemType"); - public static QName QNAME_ATTR_ARRAY_SIZE = - new QName(NS_SOAP_ENCODING, "arraySize"); - public static QName QNAME_ATTR_OFFSET = - new QName(NS_SOAP_ENCODING, "offset"); - public static QName QNAME_ATTR_POSITION = - new QName(NS_SOAP_ENCODING, "position"); + static final QName QNAME_TYPE_ARRAY = new QName(NS_SOAP_ENCODING, "Array"); + static final QName QNAME_ATTR_GROUP_COMMON_ATTRIBUTES = new QName(NS_SOAP_ENCODING, "commonAttributes"); + static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_SOAP_ENCODING, "arrayType"); + static final QName QNAME_ATTR_ITEM_TYPE = new QName(NS_SOAP_ENCODING, "itemType"); + static final QName QNAME_ATTR_ARRAY_SIZE = new QName(NS_SOAP_ENCODING, "arraySize"); + static final QName QNAME_ATTR_OFFSET = new QName(NS_SOAP_ENCODING, "offset"); + static final QName QNAME_ATTR_POSITION = new QName(NS_SOAP_ENCODING, "position"); - public static QName QNAME_TYPE_BASE64 = - new QName(NS_SOAP_ENCODING, "base64"); + static final QName QNAME_TYPE_BASE64 = new QName(NS_SOAP_ENCODING, "base64"); - public static QName QNAME_ELEMENT_STRING = - new QName(NS_SOAP_ENCODING, "string"); - public static QName QNAME_ELEMENT_NORMALIZED_STRING = - new QName(NS_SOAP_ENCODING, "normalizedString"); - public static QName QNAME_ELEMENT_TOKEN = - new QName(NS_SOAP_ENCODING, "token"); - public static QName QNAME_ELEMENT_BYTE = - new QName(NS_SOAP_ENCODING, "byte"); - public static QName QNAME_ELEMENT_UNSIGNED_BYTE = - new QName(NS_SOAP_ENCODING, "unsignedByte"); - public static QName QNAME_ELEMENT_BASE64_BINARY = - new QName(NS_SOAP_ENCODING, "base64Binary"); - public static QName QNAME_ELEMENT_HEX_BINARY = - new QName(NS_SOAP_ENCODING, "hexBinary"); - public static QName QNAME_ELEMENT_INTEGER = - new QName(NS_SOAP_ENCODING, "integer"); - public static QName QNAME_ELEMENT_POSITIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "positiveInteger"); - public static QName QNAME_ELEMENT_NEGATIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "negativeInteger"); - public static QName QNAME_ELEMENT_NON_NEGATIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "nonNegativeInteger"); - public static QName QNAME_ELEMENT_NON_POSITIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "nonPositiveInteger"); - public static QName QNAME_ELEMENT_INT = new QName(NS_SOAP_ENCODING, "int"); - public static QName QNAME_ELEMENT_UNSIGNED_INT = - new QName(NS_SOAP_ENCODING, "unsignedInt"); - public static QName QNAME_ELEMENT_LONG = - new QName(NS_SOAP_ENCODING, "long"); - public static QName QNAME_ELEMENT_UNSIGNED_LONG = - new QName(NS_SOAP_ENCODING, "unsignedLong"); - public static QName QNAME_ELEMENT_SHORT = - new QName(NS_SOAP_ENCODING, "short"); - public static QName QNAME_ELEMENT_UNSIGNED_SHORT = - new QName(NS_SOAP_ENCODING, "unsignedShort"); - public static QName QNAME_ELEMENT_DECIMAL = - new QName(NS_SOAP_ENCODING, "decimal"); - public static QName QNAME_ELEMENT_FLOAT = - new QName(NS_SOAP_ENCODING, "float"); - public static QName QNAME_ELEMENT_DOUBLE = - new QName(NS_SOAP_ENCODING, "double"); - public static QName QNAME_ELEMENT_BOOLEAN = - new QName(NS_SOAP_ENCODING, "boolean"); - public static QName QNAME_ELEMENT_TIME = - new QName(NS_SOAP_ENCODING, "time"); - public static QName QNAME_ELEMENT_DATE_TIME = - new QName(NS_SOAP_ENCODING, "dateTime"); - public static QName QNAME_ELEMENT_DURATION = - new QName(NS_SOAP_ENCODING, "duration"); - public static QName QNAME_ELEMENT_DATE = - new QName(NS_SOAP_ENCODING, "date"); - public static QName QNAME_ELEMENT_G_MONTH = - new QName(NS_SOAP_ENCODING, "gMonth"); - public static QName QNAME_ELEMENT_G_YEAR = - new QName(NS_SOAP_ENCODING, "gYear"); - public static QName QNAME_ELEMENT_G_YEAR_MONTH = - new QName(NS_SOAP_ENCODING, "gYearMonth"); - public static QName QNAME_ELEMENT_G_DAY = - new QName(NS_SOAP_ENCODING, "gDay"); - public static QName QNAME_ELEMENT_G_MONTH_DAY = - new QName(NS_SOAP_ENCODING, "gMonthDay"); - public static QName QNAME_ELEMENT_NAME = - new QName(NS_SOAP_ENCODING, "Name"); - public static QName QNAME_ELEMENT_QNAME = - new QName(NS_SOAP_ENCODING, "QName"); - public static QName QNAME_ELEMENT_NCNAME = - new QName(NS_SOAP_ENCODING, "NCName"); - public static QName QNAME_ELEMENT_ANY_URI = - new QName(NS_SOAP_ENCODING, "anyURI"); - public static QName QNAME_ELEMENT_ID = new QName(NS_SOAP_ENCODING, "ID"); - public static QName QNAME_ELEMENT_IDREF = - new QName(NS_SOAP_ENCODING, "IDREF"); - public static QName QNAME_ELEMENT_IDREFS = - new QName(NS_SOAP_ENCODING, "IDREFS"); - public static QName QNAME_ELEMENT_ENTITY = - new QName(NS_SOAP_ENCODING, "ENTITY"); - public static QName QNAME_ELEMENT_ENTITIES = - new QName(NS_SOAP_ENCODING, "ENTITIES"); - public static QName QNAME_ELEMENT_NOTATION = - new QName(NS_SOAP_ENCODING, "NOTATION"); - public static QName QNAME_ELEMENT_NMTOKEN = - new QName(NS_SOAP_ENCODING, "NMTOKEN"); - public static QName QNAME_ELEMENT_NMTOKENS = - new QName(NS_SOAP_ENCODING, "NMTOKENS"); + static final QName QNAME_ELEMENT_STRING = new QName(NS_SOAP_ENCODING, "string"); + static final QName QNAME_ELEMENT_NORMALIZED_STRING = new QName(NS_SOAP_ENCODING, "normalizedString"); + static final QName QNAME_ELEMENT_TOKEN = new QName(NS_SOAP_ENCODING, "token"); + static final QName QNAME_ELEMENT_BYTE = new QName(NS_SOAP_ENCODING, "byte"); + static final QName QNAME_ELEMENT_UNSIGNED_BYTE = new QName(NS_SOAP_ENCODING, "unsignedByte"); + static final QName QNAME_ELEMENT_BASE64_BINARY = new QName(NS_SOAP_ENCODING, "base64Binary"); + static final QName QNAME_ELEMENT_HEX_BINARY = new QName(NS_SOAP_ENCODING, "hexBinary"); + static final QName QNAME_ELEMENT_INTEGER = new QName(NS_SOAP_ENCODING, "integer"); + static final QName QNAME_ELEMENT_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "positiveInteger"); + static final QName QNAME_ELEMENT_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "negativeInteger"); + static final QName QNAME_ELEMENT_NON_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonNegativeInteger"); + static final QName QNAME_ELEMENT_NON_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonPositiveInteger"); + static final QName QNAME_ELEMENT_INT = new QName(NS_SOAP_ENCODING, "int"); + static final QName QNAME_ELEMENT_UNSIGNED_INT = new QName(NS_SOAP_ENCODING, "unsignedInt"); + static final QName QNAME_ELEMENT_LONG = new QName(NS_SOAP_ENCODING, "long"); + static final QName QNAME_ELEMENT_UNSIGNED_LONG = new QName(NS_SOAP_ENCODING, "unsignedLong"); + static final QName QNAME_ELEMENT_SHORT = new QName(NS_SOAP_ENCODING, "short"); + static final QName QNAME_ELEMENT_UNSIGNED_SHORT = new QName(NS_SOAP_ENCODING, "unsignedShort"); + static final QName QNAME_ELEMENT_DECIMAL = new QName(NS_SOAP_ENCODING, "decimal"); + static final QName QNAME_ELEMENT_FLOAT = new QName(NS_SOAP_ENCODING, "float"); + static final QName QNAME_ELEMENT_DOUBLE = new QName(NS_SOAP_ENCODING, "double"); + static final QName QNAME_ELEMENT_BOOLEAN = new QName(NS_SOAP_ENCODING, "boolean"); + static final QName QNAME_ELEMENT_TIME = new QName(NS_SOAP_ENCODING, "time"); + static final QName QNAME_ELEMENT_DATE_TIME = new QName(NS_SOAP_ENCODING, "dateTime"); + static final QName QNAME_ELEMENT_DURATION = new QName(NS_SOAP_ENCODING, "duration"); + static final QName QNAME_ELEMENT_DATE = new QName(NS_SOAP_ENCODING, "date"); + static final QName QNAME_ELEMENT_G_MONTH = new QName(NS_SOAP_ENCODING, "gMonth"); + static final QName QNAME_ELEMENT_G_YEAR = new QName(NS_SOAP_ENCODING, "gYear"); + static final QName QNAME_ELEMENT_G_YEAR_MONTH = new QName(NS_SOAP_ENCODING, "gYearMonth"); + static final QName QNAME_ELEMENT_G_DAY = new QName(NS_SOAP_ENCODING, "gDay"); + static final QName QNAME_ELEMENT_G_MONTH_DAY = new QName(NS_SOAP_ENCODING, "gMonthDay"); + static final QName QNAME_ELEMENT_NAME = new QName(NS_SOAP_ENCODING, "Name"); + static final QName QNAME_ELEMENT_QNAME = new QName(NS_SOAP_ENCODING, "QName"); + static final QName QNAME_ELEMENT_NCNAME = new QName(NS_SOAP_ENCODING, "NCName"); + static final QName QNAME_ELEMENT_ANY_URI = new QName(NS_SOAP_ENCODING, "anyURI"); + static final QName QNAME_ELEMENT_ID = new QName(NS_SOAP_ENCODING, "ID"); + static final QName QNAME_ELEMENT_IDREF = new QName(NS_SOAP_ENCODING, "IDREF"); + static final QName QNAME_ELEMENT_IDREFS = new QName(NS_SOAP_ENCODING, "IDREFS"); + static final QName QNAME_ELEMENT_ENTITY = new QName(NS_SOAP_ENCODING, "ENTITY"); + static final QName QNAME_ELEMENT_ENTITIES = new QName(NS_SOAP_ENCODING, "ENTITIES"); + static final QName QNAME_ELEMENT_NOTATION = new QName(NS_SOAP_ENCODING, "NOTATION"); + static final QName QNAME_ELEMENT_NMTOKEN = new QName(NS_SOAP_ENCODING, "NMTOKEN"); + static final QName QNAME_ELEMENT_NMTOKENS = new QName(NS_SOAP_ENCODING, "NMTOKENS"); - public static QName QNAME_TYPE_STRING = - new QName(NS_SOAP_ENCODING, "string"); - public static QName QNAME_TYPE_NORMALIZED_STRING = - new QName(NS_SOAP_ENCODING, "normalizedString"); - public static QName QNAME_TYPE_TOKEN = new QName(NS_SOAP_ENCODING, "token"); - public static QName QNAME_TYPE_BYTE = new QName(NS_SOAP_ENCODING, "byte"); - public static QName QNAME_TYPE_UNSIGNED_BYTE = - new QName(NS_SOAP_ENCODING, "unsignedByte"); - public static QName QNAME_TYPE_BASE64_BINARY = - new QName(NS_SOAP_ENCODING, "base64Binary"); - public static QName QNAME_TYPE_HEX_BINARY = - new QName(NS_SOAP_ENCODING, "hexBinary"); - public static QName QNAME_TYPE_INTEGER = - new QName(NS_SOAP_ENCODING, "integer"); - public static QName QNAME_TYPE_POSITIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "positiveInteger"); - public static QName QNAME_TYPE_NEGATIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "negativeInteger"); - public static QName QNAME_TYPE_NON_NEGATIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "nonNegativeInteger"); - public static QName QNAME_TYPE_NON_POSITIVE_INTEGER = - new QName(NS_SOAP_ENCODING, "nonPositiveInteger"); - public static QName QNAME_TYPE_INT = new QName(NS_SOAP_ENCODING, "int"); - public static QName QNAME_TYPE_UNSIGNED_INT = - new QName(NS_SOAP_ENCODING, "unsignedInt"); - public static QName QNAME_TYPE_LONG = new QName(NS_SOAP_ENCODING, "long"); - public static QName QNAME_TYPE_UNSIGNED_LONG = - new QName(NS_SOAP_ENCODING, "unsignedLong"); - public static QName QNAME_TYPE_SHORT = new QName(NS_SOAP_ENCODING, "short"); - public static QName QNAME_TYPE_UNSIGNED_SHORT = - new QName(NS_SOAP_ENCODING, "unsignedShort"); - public static QName QNAME_TYPE_DECIMAL = - new QName(NS_SOAP_ENCODING, "decimal"); - public static QName QNAME_TYPE_FLOAT = new QName(NS_SOAP_ENCODING, "float"); - public static QName QNAME_TYPE_DOUBLE = - new QName(NS_SOAP_ENCODING, "double"); - public static QName QNAME_TYPE_BOOLEAN = - new QName(NS_SOAP_ENCODING, "boolean"); - public static QName QNAME_TYPE_TIME = new QName(NS_SOAP_ENCODING, "time"); - public static QName QNAME_TYPE_DATE_TIME = - new QName(NS_SOAP_ENCODING, "dateTime"); - public static QName QNAME_TYPE_DURATION = - new QName(NS_SOAP_ENCODING, "duration"); - public static QName QNAME_TYPE_DATE = new QName(NS_SOAP_ENCODING, "date"); - public static QName QNAME_TYPE_G_MONTH = - new QName(NS_SOAP_ENCODING, "gMonth"); - public static QName QNAME_TYPE_G_YEAR = - new QName(NS_SOAP_ENCODING, "gYear"); - public static QName QNAME_TYPE_G_YEAR_MONTH = - new QName(NS_SOAP_ENCODING, "gYearMonth"); - public static QName QNAME_TYPE_G_DAY = new QName(NS_SOAP_ENCODING, "gDay"); - public static QName QNAME_TYPE_G_MONTH_DAY = - new QName(NS_SOAP_ENCODING, "gMonthDay"); - public static QName QNAME_TYPE_NAME = new QName(NS_SOAP_ENCODING, "Name"); - public static QName QNAME_TYPE_QNAME = new QName(NS_SOAP_ENCODING, "QName"); - public static QName QNAME_TYPE_NCNAME = - new QName(NS_SOAP_ENCODING, "NCName"); - public static QName QNAME_TYPE_ANY_URI = - new QName(NS_SOAP_ENCODING, "anyURI"); - public static QName QNAME_TYPE_ID = new QName(NS_SOAP_ENCODING, "ID"); - public static QName QNAME_TYPE_IDREF = new QName(NS_SOAP_ENCODING, "IDREF"); - public static QName QNAME_TYPE_IDREFS = - new QName(NS_SOAP_ENCODING, "IDREFS"); - public static QName QNAME_TYPE_ENTITY = - new QName(NS_SOAP_ENCODING, "ENTITY"); - public static QName QNAME_TYPE_ENTITIES = - new QName(NS_SOAP_ENCODING, "ENTITIES"); - public static QName QNAME_TYPE_NOTATION = - new QName(NS_SOAP_ENCODING, "NOTATION"); - public static QName QNAME_TYPE_NMTOKEN = - new QName(NS_SOAP_ENCODING, "NMTOKEN"); - public static QName QNAME_TYPE_NMTOKENS = - new QName(NS_SOAP_ENCODING, "NMTOKENS"); - public static QName QNAME_TYPE_LANGUAGE = - new QName(NS_SOAP_ENCODING, "LANGUAGE"); + static final QName QNAME_TYPE_STRING = new QName(NS_SOAP_ENCODING, "string"); + static final QName QNAME_TYPE_NORMALIZED_STRING = new QName(NS_SOAP_ENCODING, "normalizedString"); + static final QName QNAME_TYPE_TOKEN = new QName(NS_SOAP_ENCODING, "token"); + static final QName QNAME_TYPE_BYTE = new QName(NS_SOAP_ENCODING, "byte"); + static final QName QNAME_TYPE_UNSIGNED_BYTE = new QName(NS_SOAP_ENCODING, "unsignedByte"); + static final QName QNAME_TYPE_BASE64_BINARY = new QName(NS_SOAP_ENCODING, "base64Binary"); + static final QName QNAME_TYPE_HEX_BINARY = new QName(NS_SOAP_ENCODING, "hexBinary"); + static final QName QNAME_TYPE_INTEGER = new QName(NS_SOAP_ENCODING, "integer"); + static final QName QNAME_TYPE_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "positiveInteger"); + static final QName QNAME_TYPE_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "negativeInteger"); + static final QName QNAME_TYPE_NON_NEGATIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonNegativeInteger"); + static final QName QNAME_TYPE_NON_POSITIVE_INTEGER = new QName(NS_SOAP_ENCODING, "nonPositiveInteger"); + static final QName QNAME_TYPE_INT = new QName(NS_SOAP_ENCODING, "int"); + static final QName QNAME_TYPE_UNSIGNED_INT = new QName(NS_SOAP_ENCODING, "unsignedInt"); + static final QName QNAME_TYPE_LONG = new QName(NS_SOAP_ENCODING, "long"); + static final QName QNAME_TYPE_UNSIGNED_LONG = new QName(NS_SOAP_ENCODING, "unsignedLong"); + static final QName QNAME_TYPE_SHORT = new QName(NS_SOAP_ENCODING, "short"); + static final QName QNAME_TYPE_UNSIGNED_SHORT = new QName(NS_SOAP_ENCODING, "unsignedShort"); + static final QName QNAME_TYPE_DECIMAL = new QName(NS_SOAP_ENCODING, "decimal"); + static final QName QNAME_TYPE_FLOAT = new QName(NS_SOAP_ENCODING, "float"); + static final QName QNAME_TYPE_DOUBLE = new QName(NS_SOAP_ENCODING, "double"); + static final QName QNAME_TYPE_BOOLEAN = new QName(NS_SOAP_ENCODING, "boolean"); + static final QName QNAME_TYPE_TIME = new QName(NS_SOAP_ENCODING, "time"); + static final QName QNAME_TYPE_DATE_TIME = new QName(NS_SOAP_ENCODING, "dateTime"); + static final QName QNAME_TYPE_DURATION = new QName(NS_SOAP_ENCODING, "duration"); + static final QName QNAME_TYPE_DATE = new QName(NS_SOAP_ENCODING, "date"); + static final QName QNAME_TYPE_G_MONTH = new QName(NS_SOAP_ENCODING, "gMonth"); + static final QName QNAME_TYPE_G_YEAR = new QName(NS_SOAP_ENCODING, "gYear"); + static final QName QNAME_TYPE_G_YEAR_MONTH = new QName(NS_SOAP_ENCODING, "gYearMonth"); + static final QName QNAME_TYPE_G_DAY = new QName(NS_SOAP_ENCODING, "gDay"); + static final QName QNAME_TYPE_G_MONTH_DAY = new QName(NS_SOAP_ENCODING, "gMonthDay"); + static final QName QNAME_TYPE_NAME = new QName(NS_SOAP_ENCODING, "Name"); + static final QName QNAME_TYPE_QNAME = new QName(NS_SOAP_ENCODING, "QName"); + static final QName QNAME_TYPE_NCNAME = new QName(NS_SOAP_ENCODING, "NCName"); + static final QName QNAME_TYPE_ANY_URI = new QName(NS_SOAP_ENCODING, "anyURI"); + static final QName QNAME_TYPE_ID = new QName(NS_SOAP_ENCODING, "ID"); + static final QName QNAME_TYPE_IDREF = new QName(NS_SOAP_ENCODING, "IDREF"); + static final QName QNAME_TYPE_IDREFS = new QName(NS_SOAP_ENCODING, "IDREFS"); + static final QName QNAME_TYPE_ENTITY = new QName(NS_SOAP_ENCODING, "ENTITY"); + static final QName QNAME_TYPE_ENTITIES = new QName(NS_SOAP_ENCODING, "ENTITIES"); + static final QName QNAME_TYPE_NOTATION = new QName(NS_SOAP_ENCODING, "NOTATION"); + static final QName QNAME_TYPE_NMTOKEN = new QName(NS_SOAP_ENCODING, "NMTOKEN"); + static final QName QNAME_TYPE_NMTOKENS = new QName(NS_SOAP_ENCODING, "NMTOKENS"); + static final QName QNAME_TYPE_LANGUAGE = new QName(NS_SOAP_ENCODING, "LANGUAGE"); // SOAP attributes with non-colonized names - public static QName QNAME_ATTR_ID = new QName("", "id"); - public static QName QNAME_ATTR_HREF = new QName("", "ref"); + static final QName QNAME_ATTR_ID = new QName("", "id"); + static final QName QNAME_ATTR_HREF = new QName("", "ref"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java index ba12a620664..659a54977e7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java index ce812437cb9..dd24c3e9fbf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java index 2f3247bb409..3635614a172 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPBody.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java index 541041e8116..72a5190b0b8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java index ac7d098cae6..07b31bc68d9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java index ace0b441230..12249ad7878 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java index 051f1e6d708..155695d69cd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPHeaderFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java index b43cbf29840..b137b7cb928 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java index a5e5db9e64c..744ada9feca 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java index e3444b2d605..e3fe9144139 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/document/soap/SOAPUse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java index 33974da79b0..00407885dcb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/AbstractDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,8 +34,6 @@ import com.sun.tools.internal.ws.resources.WsdlMessages; import javax.xml.namespace.QName; import java.util.*; -import org.xml.sax.helpers.LocatorImpl; - /** * An abstract class for documents containing entities. * @@ -163,10 +161,11 @@ public abstract class AbstractDocument { private final Set includedDocuments; private final List includedEntities; - private class LocallyValidatingAction implements EntityAction { + private static class LocallyValidatingAction implements EntityAction { public LocallyValidatingAction() { } + @Override public void perform(Entity entity) { try { entity.validateThis(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java index a04241398f9..db6c3f946b0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Defining.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java index faf314ee3cf..2e52aa4264b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/DuplicateEntityException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java index 79577f24daf..ae099d85b0a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Elemental.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java index 492527e4bb2..16c64e67319 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Entity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java index b741957d353..a4ed71bae94 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java index e28330d4396..91bbe569e35 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java index a32784d87a9..60119a1c2fe 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/EntityReferenceValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java index 02cc2611a29..dafe43c8c06 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensibilityHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java index c748985a238..f0b2472873c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java index b9ab58c0442..1ef84e70e8f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java index d8c01b2009e..bc09ad4aef0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExtensionVisitorBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java index dc4697b53c0..47415cde532 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ExternalEntityReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java index fc2f207f7a2..be5bbdc838a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GlobalEntity.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java index ec4c07ebb9d..24d3cc371f4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/GloballyKnown.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java index c0e45954b88..6afa8aa82fb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Identifiable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java index 4a4db8eff80..03963be3ff0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/Kind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java index 3f1cf07e6ee..6c4f20ca7f3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/NoSuchEntityException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java index d3ee21bcecf..3cdb984484d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParseException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.tools.internal.ws.wsdl.framework; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * An exception signalling a parsing error. diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java index 70d62a846ab..26343edf3f0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ParserListener.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java index b9dd2ea5ab8..5d1ba91a05b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/QNameAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java index 0373371680e..238908d63d5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/TWSDLParserContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java index c79c09787f4..f5a73c756ba 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/ValidationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java index 1142a1e5393..234a8a388e9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/framework/WSDLLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,17 +43,12 @@ public class WSDLLocation { if (idPos >= max) { LocationContext newContexts[] = new LocationContext[max * 2]; System.arraycopy(contexts, 0, newContexts, 0, max); - max *= 2; contexts = newContexts; } currentContext = contexts[idPos]; if (currentContext == null) { contexts[idPos] = currentContext = new LocationContext(); } - if (idPos > 0) { - currentContext.setParent(contexts[idPos - 1]); - } - } public void pop() { @@ -63,7 +58,7 @@ public class WSDLLocation { } } - public void reset() { + public final void reset() { contexts = new LocationContext[32]; idPos = 0; contexts[idPos] = currentContext = new LocationContext(); @@ -91,11 +86,6 @@ public class WSDLLocation { return location; } - void setParent(LocationContext parent) { - parentLocation = parent; - } - private String location; - private LocationContext parentLocation; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java index e1f0af9d7a2..3ff3fe6f474 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java index b57acd94671..c1f68a0f8e7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/AbstractReferenceFinderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,6 +70,7 @@ public abstract class AbstractReferenceFinderImpl extends XMLFilterImpl { */ protected abstract String findExternalResource( String nsURI, String localName, Attributes atts); + @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { super.startElement(namespaceURI, localName, qName, atts); @@ -79,16 +80,17 @@ public abstract class AbstractReferenceFinderImpl extends XMLFilterImpl { try { // absolutize URL. - String lsi = locator.getSystemId(); - String ref; - if (lsi.startsWith("jar:")) { - int bangIdx = lsi.indexOf('!'); - if (bangIdx > 0) { - ref = new URL(new URL(lsi), relativeRef).toString(); - } else - ref = relativeRef; - } else - ref = new URI(lsi).resolve(new URI(relativeRef)).toString(); + assert locator != null; + String lsi = locator.getSystemId(); + String ref; + if (lsi.startsWith("jar:")) { + int bangIdx = lsi.indexOf('!'); + if (bangIdx > 0) { + ref = new URL(new URL(lsi), relativeRef).toString(); + } else + ref = relativeRef; + } else + ref = new URI(lsi).resolve(new URI(relativeRef)).toString(); // then parse this schema as well, // but don't mark this document as a root. @@ -112,6 +114,7 @@ public abstract class AbstractReferenceFinderImpl extends XMLFilterImpl { private Locator locator; + @Override public void setDocumentLocator(Locator locator) { super.setDocumentLocator(locator); this.locator = locator; diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java index 5c77e0e56aa..f369bfca6d3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Constants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,114 +32,114 @@ package com.sun.tools.internal.ws.wsdl.parser; */ public interface Constants { // WSDL element tags - public static String TAG_BINDING = "binding"; - public static String TAG_DEFINITIONS = "definitions"; - public static String TAG_DOCUMENTATION = "documentation"; - public static String TAG_MESSAGE = "message"; - public static String TAG_PART = "part"; - public static String TAG_PORT_TYPE = "portType"; - public static String TAG_TYPES = "types"; - public static String TAG_OPERATION = "operation"; - public static String TAG_INPUT = "input"; - public static String TAG_OUTPUT = "output"; - public static String TAG_FAULT = "fault"; - public static String TAG_SERVICE = "service"; - public static String TAG_PORT = "port"; - public static String TAG_ = ""; + static final String TAG_BINDING = "binding"; + static final String TAG_DEFINITIONS = "definitions"; + static final String TAG_DOCUMENTATION = "documentation"; + static final String TAG_MESSAGE = "message"; + static final String TAG_PART = "part"; + static final String TAG_PORT_TYPE = "portType"; + static final String TAG_TYPES = "types"; + static final String TAG_OPERATION = "operation"; + static final String TAG_INPUT = "input"; + static final String TAG_OUTPUT = "output"; + static final String TAG_FAULT = "fault"; + static final String TAG_SERVICE = "service"; + static final String TAG_PORT = "port"; + static final String TAG_ = ""; // WSDL attribute names - public static String ATTR_ELEMENT = "element"; - public static String ATTR_NAME = "name"; - public static String ATTR_REQUIRED = "required"; - public static String ATTR_TARGET_NAMESPACE = "targetNamespace"; - public static String ATTR_TYPE = "type"; - public static String ATTR_MESSAGE = "message"; - public static String ATTR_BINDING = "binding"; - public static String ATTR_LOCATION = "location"; - public static String ATTR_TRANSPORT = "transport"; - public static String ATTR_STYLE = "style"; - public static String ATTR_USE = "use"; - public static String ATTR_NAMESPACE = "namespace"; - public static String ATTR_ENCODING_STYLE = "encodingStyle"; - public static String ATTR_PART = "part"; - public static String ATTR_PARTS = "parts"; - public static String ATTR_SOAP_ACTION = "soapAction"; - public static String ATTR_PARAMETER_ORDER = "parameterOrder"; - public static String ATTR_VERB = "verb"; + static final String ATTR_ELEMENT = "element"; + static final String ATTR_NAME = "name"; + static final String ATTR_REQUIRED = "required"; + static final String ATTR_TARGET_NAMESPACE = "targetNamespace"; + static final String ATTR_TYPE = "type"; + static final String ATTR_MESSAGE = "message"; + static final String ATTR_BINDING = "binding"; + static final String ATTR_LOCATION = "location"; + static final String ATTR_TRANSPORT = "transport"; + static final String ATTR_STYLE = "style"; + static final String ATTR_USE = "use"; + static final String ATTR_NAMESPACE = "namespace"; + static final String ATTR_ENCODING_STYLE = "encodingStyle"; + static final String ATTR_PART = "part"; + static final String ATTR_PARTS = "parts"; + static final String ATTR_SOAP_ACTION = "soapAction"; + static final String ATTR_PARAMETER_ORDER = "parameterOrder"; + static final String ATTR_VERB = "verb"; // schema attribute names - public static String ATTR_ID = "id"; - public static String ATTR_VERSION = "version"; - public static String ATTR_ATTRIBUTE_FORM_DEFAULT = "attributeFormDefault"; - public static String ATTR_BLOCK_DEFAULT = "blockDefault"; - public static String ATTR_ELEMENT_FORM_DEFAULT = "elementFormDefault"; - public static String ATTR_FINAL_DEFAULT = "finalDefault"; - public static String ATTR_ABSTRACT = "abstract"; - public static String ATTR_NILLABLE = "nillable"; - public static String ATTR_DEFAULT = "default"; - public static String ATTR_FIXED = "fixed"; - public static String ATTR_FORM = "form"; - public static String ATTR_BLOCK = "block"; - public static String ATTR_FINAL = "final"; - public static String ATTR_REF = "ref"; - public static String ATTR_SUBSTITUTION_GROUP = "substitutionGroup"; - public static String ATTR_MIN_OCCURS = "minOccurs"; - public static String ATTR_MAX_OCCURS = "maxOccurs"; - public static String ATTR_PROCESS_CONTENTS = "processContents"; - public static String ATTR_MIXED = "mixed"; - public static String ATTR_BASE = "base"; - public static String ATTR_VALUE = "value"; - public static String ATTR_XPATH = "xpath"; - public static String ATTR_SCHEMA_LOCATION = "schemaLocation"; - public static String ATTR_REFER = "refer"; - public static String ATTR_ITEM_TYPE = "itemType"; - public static String ATTR_PUBLIC = "public"; - public static String ATTR_SYSTEM = "system"; - public static String ATTR_MEMBER_TYPES = "memberTypes"; - public static String ATTR_ = ""; + static final String ATTR_ID = "id"; + static final String ATTR_VERSION = "version"; + static final String ATTR_ATTRIBUTE_FORM_DEFAULT = "attributeFormDefault"; + static final String ATTR_BLOCK_DEFAULT = "blockDefault"; + static final String ATTR_ELEMENT_FORM_DEFAULT = "elementFormDefault"; + static final String ATTR_FINAL_DEFAULT = "finalDefault"; + static final String ATTR_ABSTRACT = "abstract"; + static final String ATTR_NILLABLE = "nillable"; + static final String ATTR_DEFAULT = "default"; + static final String ATTR_FIXED = "fixed"; + static final String ATTR_FORM = "form"; + static final String ATTR_BLOCK = "block"; + static final String ATTR_FINAL = "final"; + static final String ATTR_REF = "ref"; + static final String ATTR_SUBSTITUTION_GROUP = "substitutionGroup"; + static final String ATTR_MIN_OCCURS = "minOccurs"; + static final String ATTR_MAX_OCCURS = "maxOccurs"; + static final String ATTR_PROCESS_CONTENTS = "processContents"; + static final String ATTR_MIXED = "mixed"; + static final String ATTR_BASE = "base"; + static final String ATTR_VALUE = "value"; + static final String ATTR_XPATH = "xpath"; + static final String ATTR_SCHEMA_LOCATION = "schemaLocation"; + static final String ATTR_REFER = "refer"; + static final String ATTR_ITEM_TYPE = "itemType"; + static final String ATTR_PUBLIC = "public"; + static final String ATTR_SYSTEM = "system"; + static final String ATTR_MEMBER_TYPES = "memberTypes"; + static final String ATTR_ = ""; // WSDL attribute values - public static String ATTRVALUE_RPC = "rpc"; - public static String ATTRVALUE_DOCUMENT = "document"; - public static String ATTRVALUE_LITERAL = "literal"; - public static String ATTRVALUE_ENCODED = "encoded"; + static final String ATTRVALUE_RPC = "rpc"; + static final String ATTRVALUE_DOCUMENT = "document"; + static final String ATTRVALUE_LITERAL = "literal"; + static final String ATTRVALUE_ENCODED = "encoded"; // schema attribute values - public static String ATTRVALUE_QUALIFIED = "qualified"; - public static String ATTRVALUE_UNQUALIFIED = "unqualified"; - public static String ATTRVALUE_ALL = "#all"; - public static String ATTRVALUE_SUBSTITUTION = "substitution"; - public static String ATTRVALUE_EXTENSION = "extension"; - public static String ATTRVALUE_RESTRICTION = "restriction"; - public static String ATTRVALUE_LIST = "list"; - public static String ATTRVALUE_UNION = "union"; - public static String ATTRVALUE_UNBOUNDED = "unbounded"; - public static String ATTRVALUE_PROHIBITED = "prohibited"; - public static String ATTRVALUE_OPTIONAL = "optional"; - public static String ATTRVALUE_REQUIRED = "required"; - public static String ATTRVALUE_LAX = "lax"; - public static String ATTRVALUE_SKIP = "skip"; - public static String ATTRVALUE_STRICT = "strict"; - public static String ATTRVALUE_ANY = "##any"; - public static String ATTRVALUE_LOCAL = "##local"; - public static String ATTRVALUE_OTHER = "##other"; - public static String ATTRVALUE_TARGET_NAMESPACE = "##targetNamespace"; - public static String ATTRVALUE_ = ""; + static final String ATTRVALUE_QUALIFIED = "qualified"; + static final String ATTRVALUE_UNQUALIFIED = "unqualified"; + static final String ATTRVALUE_ALL = "#all"; + static final String ATTRVALUE_SUBSTITUTION = "substitution"; + static final String ATTRVALUE_EXTENSION = "extension"; + static final String ATTRVALUE_RESTRICTION = "restriction"; + static final String ATTRVALUE_LIST = "list"; + static final String ATTRVALUE_UNION = "union"; + static final String ATTRVALUE_UNBOUNDED = "unbounded"; + static final String ATTRVALUE_PROHIBITED = "prohibited"; + static final String ATTRVALUE_OPTIONAL = "optional"; + static final String ATTRVALUE_REQUIRED = "required"; + static final String ATTRVALUE_LAX = "lax"; + static final String ATTRVALUE_SKIP = "skip"; + static final String ATTRVALUE_STRICT = "strict"; + static final String ATTRVALUE_ANY = "##any"; + static final String ATTRVALUE_LOCAL = "##local"; + static final String ATTRVALUE_OTHER = "##other"; + static final String ATTRVALUE_TARGET_NAMESPACE = "##targetNamespace"; + static final String ATTRVALUE_ = ""; // namespace URIs - public static String NS_XML = "http://www.w3.org/XML/1998/namespace"; - public static String NS_XMLNS = "http://www.w3.org/2000/xmlns/"; - public static String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/"; - public static String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"; - public static String NS_WSDL_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/"; - public static String NS_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"; - public static String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; - public static String NS_XSD = "http://www.w3.org/2001/XMLSchema"; - public static String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance"; - public static String NS_ = ""; + static final String NS_XML = "http://www.w3.org/XML/1998/namespace"; + static final String NS_XMLNS = "http://www.w3.org/2000/xmlns/"; + static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/"; + static final String NS_WSDL_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"; + static final String NS_WSDL_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/"; + static final String NS_WSDL_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"; + static final String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; + static final String NS_XSD = "http://www.w3.org/2001/XMLSchema"; + static final String NS_XSI = "http://www.w3.org/2001/XMLSchema-instance"; + static final String NS_ = ""; // other constants - public static String XMLNS = "xmlns"; - public static String TRUE = "true"; - public static String FALSE = "false"; + static final String XMLNS = "xmlns"; + static final String TRUE = "true"; + static final String FALSE = "false"; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java index 9b4fdcc0515..6a9c76f6836 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java index 442c7e36eb2..f62aea6b267 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,15 +26,12 @@ 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.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.wsdl.document.schema.SchemaConstants; 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; @@ -51,9 +48,6 @@ import javax.xml.transform.TransformerException; 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; @@ -119,11 +113,13 @@ public class DOMForest { this.errorReceiver = errReceiver; this.logic = logic; try { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + // secure xml processing can be switched off if input requires it + boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; + DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled); dbf.setNamespaceAware(true); this.documentBuilder = dbf.newDocumentBuilder(); - this.parserFactory = SAXParserFactory.newInstance(); + this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled); this.parserFactory.setNamespaceAware(true); } catch (ParserConfigurationException e) { throw new AssertionError(e); @@ -368,7 +364,10 @@ public class DOMForest { public void dump(OutputStream out) throws IOException { try { // create identity transformer - Transformer it = TransformerFactory.newInstance().newTransformer(); + // secure xml processing can be switched off if input requires it + boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; + TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled); + Transformer it = tf.newTransformer(); for (Map.Entry e : core.entrySet()) { out.write(("---<< " + e.getKey() + '\n').getBytes()); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java index 22c82a6b143..601ce437b53 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java index 2a2376a2a33..2ebd9ad244d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/DOMForestScanner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java index c4571251ace..d9391535c5d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/HTTPExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java index fa633c202c7..9dc1df416c6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/InternalizationLogic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java index 93a5fc4e48e..449f4dcb6a5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Internalizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,12 +36,8 @@ import com.sun.tools.internal.xjc.util.DOMUtils; import com.sun.xml.internal.bind.v2.util.EditDistance; import com.sun.xml.internal.ws.util.DOMUtil; 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 com.sun.xml.internal.ws.util.xml.XmlUtil; +import org.w3c.dom.*; import org.xml.sax.SAXParseException; import javax.xml.namespace.NamespaceContext; @@ -52,10 +48,8 @@ import javax.xml.xpath.XPathFactory; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; -import java.util.Map; import java.util.Set; @@ -65,16 +59,15 @@ import java.util.Set; * @author Vivek Pandey */ public class Internalizer { - private static final XPathFactory xpf = XPathFactory.newInstance(); + + private static final XPathFactory xpf = XmlUtil.newXPathFactory(true); private final XPath xpath = xpf.newXPath(); - private final WsimportOptions options; private final DOMForest forest; private final ErrorReceiver errorReceiver; public Internalizer(DOMForest forest, WsimportOptions options, ErrorReceiver errorReceiver) { this.forest = forest; - this.options = options; this.errorReceiver = errorReceiver; } @@ -82,15 +75,6 @@ public class Internalizer { for (Element jaxwsBinding : forest.outerMostBindings) { internalize(jaxwsBinding, jaxwsBinding); } - /* - Map targetNodes = new HashMap(); - for (Element jaxwsBinding : forest.outerMostBindings) { - buildTargetNodeMap(jaxwsBinding, jaxwsBinding, targetNodes); - } - for (Element jaxwsBinding : forest.outerMostBindings) { - move(jaxwsBinding, targetNodes); - } - */ } /** @@ -100,12 +84,15 @@ public class Internalizer { NamedNodeMap atts = bindings.getAttributes(); for (int i = 0; i < atts.getLength(); i++) { Attr a = (Attr) atts.item(i); - if (a.getNamespaceURI() != null) + if (a.getNamespaceURI() != null) { continue; // all foreign namespace OK. - if (a.getLocalName().equals("node")) + } + if (a.getLocalName().equals("node")) { continue; - if (a.getLocalName().equals("wsdlLocation")) + } + if (a.getLocalName().equals("wsdlLocation")) { continue; + } // TODO: flag error for this undefined attribute } @@ -181,9 +168,9 @@ public class Internalizer { //if target is null or empty it means the xpath evaluation has some problem, // just return - if (targetNodes == null && hasNode && !isToplevelBinding) + if (targetNodes == null && hasNode && !isToplevelBinding) { return; - + } if (hasNode) { if (targetNodes != null) { @@ -191,10 +178,11 @@ public class Internalizer { insertBinding(bindings, targetNodes.item(i)); // look for child and process them recursively Element[] children = getChildElements(bindings); - for (Element child : children) - if("bindings".equals(child.getLocalName())) { + for (Element child : children) { + if ("bindings".equals(child.getLocalName())) { internalize(child, targetNodes.item(i)); } + } } } } @@ -202,8 +190,9 @@ public class Internalizer { // look for child and process them recursively Element[] children = getChildElements(bindings); - for (Element child : children) + for (Element child : children) { internalize(child, target); + } } } @@ -226,105 +215,20 @@ public class Internalizer { } } - - /** - * Determines the target node of the "bindings" element - * by using the inherited target node, then put - * the result into the "result" map. - */ - /* TODO Remove this logic if there are no regressions with new internalization logic - private void buildTargetNodeMap(Element bindings, Node inheritedTarget, Map result) { - // start by the inherited target - Node target = inheritedTarget; - - validate(bindings); // validate this node - - // look for @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)); - } - } else { - //the node does not have - wsdlLocation = forest.getFirstRootDocument(); - } - target = forest.get(wsdlLocation); - - if (target == null) { - reportError(bindings, WsdlMessages.INTERNALIZER_INCORRECT_SCHEMA_REFERENCE(wsdlLocation, EditDistance.findNearest(wsdlLocation, forest.listSystemIDs()))); - return; // abort processing this - } - } - - //if the target node is xs:schema, declare the jaxb version on it as latter on it will be - //required by the inlined schema bindings - - Element element = DOMUtil.getFirstElementChild(target); - 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) { - 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); - } - - //add jaxb:bindings version info. Lets put it to 1.0, may need to change latter - if (!schemaElement.hasAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "version")) { - schemaElement.setAttributeNS(JAXWSBindingsConstants.NS_JAXB_BINDINGS, "jaxb:version", JAXWSBindingsConstants.JAXB_BINDING_VERSION); - } - } - } - } - - - boolean hasNode = true; - 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)) { - hasNode = false; - } 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) - return; - - // update the result map - if (hasNode) - result.put(bindings, target); - - // look for child and process them recursively - Element[] children = getChildElements(bindings); - for (Element child : children) - buildTargetNodeMap(child, target, result); - } - */ private NodeList getWSDLDefintionNode(Node bindings, Node target) { return evaluateXPathMultiNode(bindings, target, "wsdl:definitions", new NamespaceContext() { + @Override public String getNamespaceURI(String prefix) { return "http://schemas.xmlsoap.org/wsdl/"; } + @Override public String getPrefix(String nsURI) { throw new UnsupportedOperationException(); } + @Override public Iterator getPrefixes(String namespaceURI) { throw new UnsupportedOperationException(); } @@ -332,8 +236,9 @@ public class Internalizer { } private boolean isWSDLDefinition(Node target) { - if (target == null) + if (target == null) { return false; + } String localName = target.getLocalName(); String nsURI = target.getNamespaceURI(); return fixNull(localName).equals("definitions") && fixNull(nsURI).equals("http://schemas.xmlsoap.org/wsdl/"); @@ -369,43 +274,17 @@ public class Internalizer { NodeList children = parent.getChildNodes(); for (int i = 0; i < children.getLength(); i++) { Node item = children.item(i); - if (!(item instanceof Element)) continue; - + if (!(item instanceof Element)) { + continue; + } if (JAXWSBindingsConstants.NS_JAXWS_BINDINGS.equals(item.getNamespaceURI()) || - JAXWSBindingsConstants.NS_JAXB_BINDINGS.equals(item.getNamespaceURI())) + JAXWSBindingsConstants.NS_JAXB_BINDINGS.equals(item.getNamespaceURI())) { a.add((Element) item); + } } return a.toArray(new Element[a.size()]); } - private Node evaluateXPathNode(Node bindings, Node target, String expression, NamespaceContext namespaceContext) { - NodeList nlst; - try { - xpath.setNamespaceContext(namespaceContext); - nlst = (NodeList) xpath.evaluate(expression, target, XPathConstants.NODESET); - } catch (XPathExpressionException e) { - reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATION_ERROR(e.getMessage()), e); - return null; // abort processing this - } - - if (nlst.getLength() == 0) { - reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATES_TO_NO_TARGET(expression)); - return null; // abort - } - - 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)) { - reportError((Element) bindings, WsdlMessages.INTERNALIZER_X_PATH_EVALUATES_TO_NON_ELEMENT(expression)); - return null; // abort - } - return rnode; - } - private NodeList evaluateXPathMultiNode(Node bindings, Node target, String expression, NamespaceContext namespaceContext) { NodeList nlst; try { @@ -424,35 +303,6 @@ public class Internalizer { return nlst; } - /** - * Moves JAXWS customizations under their respective target nodes. - */ - private void move(Element bindings, Map targetNodes) { - Node target = targetNodes.get(bindings); - if (target == null) - // this must be the result of an error on the external binding. - // recover from the error by ignoring this node - return; - - Element[] children = DOMUtils.getChildElements(bindings); - - for (Element item : children) { - if ("bindings".equals(item.getLocalName())) { - // process child recursively - move(item, targetNodes); - } else if (isGlobalBinding(item)) { - target = targetNodes.get(item); - moveUnder(item, (Element) target); - } else { - if (!(target instanceof Element)) { - return; // abort - } - // move this node under the target - moveUnder(item, (Element) target); - } - } - } - private boolean isJAXBBindingElement(Element e) { return fixNull(e.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXB_BINDINGS); } @@ -536,8 +386,11 @@ public class Internalizer { Attr a = (Attr) atts.item(i); if (Constants.NS_XMLNS.equals(a.getNamespaceURI())) { String prefix; - if (a.getName().indexOf(':') == -1) prefix = ""; - else prefix = a.getLocalName(); + if (a.getName().indexOf(':') == -1) { + prefix = ""; + } else { + prefix = a.getLocalName(); + } if (inscopes.add(prefix) && p != e) { // if this is the first time we see this namespace bindings, @@ -550,8 +403,9 @@ public class Internalizer { } } - if (p.getParentNode() instanceof Document) + if (p.getParentNode() instanceof Document) { break; + } p = (Element) p.getParentNode(); } @@ -567,15 +421,17 @@ public class Internalizer { public Element refineSchemaTarget(Element target) { // look for existing xs:annotation Element annotation = DOMUtils.getFirstChildElement(target, Constants.NS_XSD, "annotation"); - if (annotation == null) + if (annotation == null) { // none exists. need to make one annotation = insertXMLSchemaElement(target, "annotation"); + } // then look for appinfo Element appinfo = DOMUtils.getFirstChildElement(annotation, Constants.NS_XSD, "appinfo"); - if (appinfo == null) + if (appinfo == null) { // none exists. need to make one appinfo = insertXMLSchemaElement(annotation, "appinfo"); + } return appinfo; } @@ -583,9 +439,10 @@ public class Internalizer { public Element refineWSDLTarget(Element target) { // look for existing xs:annotation Element JAXWSBindings = DOMUtils.getFirstChildElement(target, JAXWSBindingsConstants.NS_JAXWS_BINDINGS, "bindings"); - if (JAXWSBindings == null) + if (JAXWSBindings == null) { // none exists. need to make one JAXWSBindings = insertJAXWSBindingsElement(target, "bindings"); + } return JAXWSBindings; } @@ -600,17 +457,21 @@ public class Internalizer { // the namespace binding. String qname = parent.getTagName(); int idx = qname.indexOf(':'); - if (idx == -1) qname = localName; - else qname = qname.substring(0, idx + 1) + localName; + if (idx == -1) { + qname = localName; + } else { + qname = qname.substring(0, idx + 1) + localName; + } Element child = parent.getOwnerDocument().createElementNS(Constants.NS_XSD, qname); NodeList children = parent.getChildNodes(); - if (children.getLength() == 0) + if (children.getLength() == 0) { parent.appendChild(child); - else + } else { parent.insertBefore(child, children.item(0)); + } return child; } @@ -622,22 +483,24 @@ public class Internalizer { NodeList children = parent.getChildNodes(); - if (children.getLength() == 0) + if (children.getLength() == 0) { parent.appendChild(child); - else + } else { parent.insertBefore(child, children.item(0)); + } return child; } - private static @NotNull - String fixNull(@Nullable String s) { - if (s == null) return ""; - else return s; + static String fixNull(@Nullable String s) { + if (s == null) { + return ""; + } else { + return s; + } } - private void reportError(Element errorSource, String formattedMsg) { reportError(errorSource, formattedMsg, null); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java index 38077863ad2..52546947ad7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/JAXWSBindingExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,10 +40,7 @@ import org.w3c.dom.NodeList; import javax.xml.namespace.NamespaceContext; import javax.xml.namespace.QName; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; +import javax.xml.xpath.*; import java.util.Iterator; import java.util.Map; @@ -56,7 +53,8 @@ import java.util.Map; */ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { - private static final XPathFactory xpf = XPathFactory.newInstance(); + // xml security enabled always, xpath used for parsing "part" attribute + private static final XPathFactory xpf = XmlUtil.newXPathFactory(true); private final XPath xpath = xpf.newXPath(); public JAXWSBindingExtensionHandler(Map extensionHandlerMap) { @@ -66,6 +64,7 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { /* (non-Javadoc) * @see AbstractExtensionHandler#getNamespaceURI() */ + @Override public String getNamespaceURI() { return JAXWSBindingsConstants.NS_JAXWS_BINDINGS; } @@ -80,8 +79,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { context.registerNamespaces(e); JAXWSBinding jaxwsBinding = getJAXWSExtension(parent); - if(jaxwsBinding == null) + if(jaxwsBinding == null) { jaxwsBinding = new JAXWSBinding(context.getLocation(e)); + } String attr = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.WSDL_LOCATION_ATTR); if (attr != null) { jaxwsBinding.setWsdlLocation(attr); @@ -99,29 +99,29 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; - - if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PACKAGE)){ - parsePackage(context, jaxwsBinding, e2); - if((jaxwsBinding.getJaxwsPackage() != null) && (jaxwsBinding.getJaxwsPackage().getJavaDoc() != null)){ - ((Definitions)parent).setDocumentation(new Documentation(jaxwsBinding.getJaxwsPackage().getJavaDoc())); - } - }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)){ - parseWrapperStyle(context, jaxwsBinding, e2); - }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)){ - parseAsynMapping(context, jaxwsBinding, e2); } -// else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){ -// parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2); -// } - else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_MIME_CONTENT)){ + + if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PACKAGE)) { + parsePackage(context, jaxwsBinding, e2); + if ((jaxwsBinding.getJaxwsPackage() != null) && (jaxwsBinding.getJaxwsPackage().getJavaDoc() != null)) { + ((Definitions) parent).setDocumentation(new Documentation(jaxwsBinding.getJaxwsPackage().getJavaDoc())); + } + } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)) { + parseWrapperStyle(context, jaxwsBinding, e2); + } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)) { + parseAsynMapping(context, jaxwsBinding, e2); + } // else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){ + // parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2); + // } + else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_MIME_CONTENT)) { parseMimeContent(context, jaxwsBinding, e2); - }else{ + } else { Util.fail( - "parsing.invalidExtensionElement", - e2.getTagName(), - e2.getNamespaceURI()); + "parsing.invalidExtensionElement", + e2.getTagName(), + e2.getNamespaceURI()); return false; } } @@ -150,27 +150,17 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { */ private void parseProvider(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) { String val = e.getTextContent(); - if(val == null) + if (val == null) { return; - if(val.equals("false") || val.equals("0")){ + } + if (val.equals("false") || val.equals("0")) { ((JAXWSBinding)parent).setProvider(Boolean.FALSE); - }else if(val.equals("true") || val.equals("1")){ + } else if(val.equals("true") || val.equals("1")) { ((JAXWSBinding)parent).setProvider(Boolean.TRUE); } } - /** - * - * @param context - * @param parent - * @param e - */ - private void parseJAXBBindings(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, TWSDLExtensible parent, Element e) { - JAXWSBinding binding = (JAXWSBinding)parent; - binding.addJaxbBindings(e); - } - /** * @param context * @param parent @@ -191,12 +181,13 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { private void parseWrapperStyle(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) { //System.out.println("In handleWrapperStyleExtension: " + e.getNodeName()); String val = e.getTextContent(); - if(val == null) + if (val == null) { return; - if(val.equals("false") || val.equals("0")){ - ((JAXWSBinding)parent).setEnableWrapperStyle(Boolean.FALSE); - }else if(val.equals("true") || val.equals("1")){ - ((JAXWSBinding)parent).setEnableWrapperStyle(Boolean.TRUE); + } + if (val.equals("false") || val.equals("0")) { + ((JAXWSBinding) parent).setEnableWrapperStyle(Boolean.FALSE); + } else if (val.equals("true") || val.equals("1")) { + ((JAXWSBinding) parent).setEnableWrapperStyle(Boolean.TRUE); } } @@ -225,12 +216,13 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { private void parseAsynMapping(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) { //System.out.println("In handleAsynMappingExtension: " + e.getNodeName()); String val = e.getTextContent(); - if(val == null) + if (val == null) { return; - if(val.equals("false") || val.equals("0")){ - ((JAXWSBinding)parent).setEnableAsyncMapping(Boolean.FALSE); - }else if(val.equals("true") || val.equals("1")){ - ((JAXWSBinding)parent).setEnableAsyncMapping(Boolean.TRUE); + } + if (val.equals("false") || val.equals("0")) { + ((JAXWSBinding) parent).setEnableAsyncMapping(Boolean.FALSE); + } else if (val.equals("true") || val.equals("1")) { + ((JAXWSBinding) parent).setEnableAsyncMapping(Boolean.TRUE); } } @@ -242,12 +234,13 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { private void parseMimeContent(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding parent, Element e) { //System.out.println("In handleMimeContentExtension: " + e.getNodeName()); String val = e.getTextContent(); - if(val == null) + if (val == null) { return; - if(val.equals("false") || val.equals("0")){ - ((JAXWSBinding)parent).setEnableMimeContentMapping(Boolean.FALSE); - }else if(val.equals("true") || val.equals("1")){ - ((JAXWSBinding)parent).setEnableMimeContentMapping(Boolean.TRUE); + } + if (val.equals("false") || val.equals("0")) { + ((JAXWSBinding) parent).setEnableMimeContentMapping(Boolean.FALSE); + } else if (val.equals("true") || val.equals("1")) { + ((JAXWSBinding) parent).setEnableMimeContentMapping(Boolean.TRUE); } } @@ -276,10 +269,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { String partName = XmlUtil.getAttributeOrNull(msgPartElm, "name"); String msgName = XmlUtil.getAttributeOrNull((Element)msgElm, "name"); - if((partName == null) || (msgName == null)) + if ((partName == null) || (msgName == null)) { return; - - String val = XmlUtil.getAttributeOrNull(msgPartElm, "element"); + } String element = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.ELEMENT_ATTR); String name = XmlUtil.getAttributeOrNull(e, JAXWSBindingsConstants.NAME_ATTR); @@ -333,28 +325,12 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { } - /** - * @param context - * @param jaxwsBinding - * @param e - */ - private void parseException(com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext context, JAXWSBinding jaxwsBinding, Element e) { - for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ - Element e2 = Util.nextElement(iter); - if (e2 == null) - break; - if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){ - String className = XmlUtil.getAttributeOrNull(e2, JAXWSBindingsConstants.NAME_ATTR); - String javaDoc = getJavaDoc(e2); - jaxwsBinding.setException(new com.sun.tools.internal.ws.wsdl.document.jaxws.Exception(new CustomName(className, javaDoc))); - } - } - } - + @Override public boolean handleDefinitionsExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { return parseGlobalJAXWSBindings(context, parent, e); } + @Override public boolean handlePortTypeExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ context.push(); @@ -363,23 +339,24 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } - if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)){ + if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)) { parseWrapperStyle(context, jaxwsBinding, e2); - }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)){ + } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ASYNC_MAPPING)) { parseAsynMapping(context, jaxwsBinding, e2); - }else if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){ + } else if (XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)) { parseClass(context, jaxwsBinding, e2); - if((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)){ - ((PortType)parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc())); + if ((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null) && (parent instanceof PortType)) { + ((PortType) parent).setDocumentation(new Documentation(jaxwsBinding.getClassName().getJavaDoc())); } - }else{ + } else { Util.fail( - "parsing.invalidExtensionElement", - e2.getTagName(), - e2.getNamespaceURI()); + "parsing.invalidExtensionElement", + e2.getTagName(), + e2.getNamespaceURI()); return false; } } @@ -398,6 +375,7 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { } } + @Override public boolean handleOperationExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ if(parent instanceof Operation){ @@ -423,8 +401,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } // if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){ // parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2); @@ -463,8 +442,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_WRAPPER_STYLE)){ parseWrapperStyle(context, jaxwsBinding, e2); @@ -493,6 +473,7 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { return true; } + @Override public boolean handleBindingExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ context.push(); @@ -501,8 +482,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } // if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.ENABLE_ADDITIONAL_SOAPHEADER_MAPPING)){ // parseAdditionalSOAPHeaderMapping(context, jaxwsBinding, e2); @@ -535,6 +517,7 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { /* (non-Javadoc) * @see ExtensionHandlerBase#handleFaultExtension(TWSDLParserContextImpl, TWSDLExtensible, org.w3c.dom.Element) */ + @Override public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ context.push(); @@ -543,8 +526,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){ parseClass(context, jaxwsBinding, e2); if((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)){ @@ -573,6 +557,7 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { } } + @Override public boolean handleServiceExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ context.push(); @@ -581,8 +566,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.CLASS)){ parseClass(context, jaxwsBinding, e2); if((jaxwsBinding.getClassName() != null) && (jaxwsBinding.getClassName().getJavaDoc() != null)){ @@ -611,6 +597,7 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { } } + @Override public boolean handlePortExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { if(XmlUtil.matchesTagNS(e, JAXWSBindingsConstants.JAXWS_BINDINGS)){ context.push(); @@ -619,8 +606,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.PROVIDER)){ parseProvider(context, jaxwsBinding, e2); @@ -655,8 +643,9 @@ public class JAXWSBindingExtensionHandler extends AbstractExtensionHandler { private String getJavaDoc(Element e){ for(Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();){ Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } if(XmlUtil.matchesTagNS(e2, JAXWSBindingsConstants.JAVADOC)){ return XmlUtil.getTextForNode(e2); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java index 97e61daffc2..784817a1ccd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MIMEExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java index 88f3b75e206..b22a38f6296 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MemberSubmissionAddressingExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,23 +27,35 @@ package com.sun.tools.internal.ws.wsdl.parser; import com.sun.tools.internal.ws.api.wsdl.TWSDLExtensible; import com.sun.tools.internal.ws.api.wsdl.TWSDLParserContext; +import com.sun.tools.internal.ws.resources.ModelerMessages; +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.wsdl.document.Fault; +import com.sun.tools.internal.ws.wsdl.document.Input; +import com.sun.tools.internal.ws.wsdl.document.Output; +import com.sun.xml.internal.ws.addressing.W3CAddressingMetadataConstants; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import org.w3c.dom.Element; +import org.xml.sax.Locator; import javax.xml.namespace.QName; import java.util.Map; +import static com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants.WSA_ACTION_QNAME; + /** * @author Arun Gupta */ public class MemberSubmissionAddressingExtensionHandler extends W3CAddressingExtensionHandler { - public MemberSubmissionAddressingExtensionHandler(Map extensionHandlerMap) { - super(extensionHandlerMap); - } - public MemberSubmissionAddressingExtensionHandler(Map extensionHandlerMap, ErrorReceiver env) { + private ErrorReceiver errReceiver; + private boolean extensionModeOn; + + public MemberSubmissionAddressingExtensionHandler(Map extensionHandlerMap, ErrorReceiver env, boolean extensionModeOn) { super(extensionHandlerMap, env); + this.errReceiver = env; + this.extensionModeOn = extensionModeOn; } @Override @@ -61,4 +73,67 @@ public class MemberSubmissionAddressingExtensionHandler extends W3CAddressingExt return false; } + @Override + public boolean handleInputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { + if (extensionModeOn) { + warn(context.getLocation(e)); + String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME); + if (actionValue == null || actionValue.equals("")) { + return warnEmptyAction(parent, context.getLocation(e)); + } + ((Input) parent).setAction(actionValue); + return true; + } else { + return fail(context.getLocation(e)); + } + } + + private boolean fail(Locator location) { + errReceiver.warning(location, + ModelerMessages.WSDLMODELER_INVALID_IGNORING_MEMBER_SUBMISSION_ADDRESSING( + AddressingVersion.MEMBER.nsUri, W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME)); + return false; + } + + private void warn(Locator location) { + errReceiver.warning(location, + ModelerMessages.WSDLMODELER_WARNING_MEMBER_SUBMISSION_ADDRESSING_USED( + AddressingVersion.MEMBER.nsUri, W3CAddressingMetadataConstants.WSAM_NAMESPACE_NAME)); + } + + @Override + public boolean handleOutputExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { + if (extensionModeOn) { + warn(context.getLocation(e)); + String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME); + if (actionValue == null || actionValue.equals("")) { + return warnEmptyAction(parent, context.getLocation(e)); + } + ((Output) parent).setAction(actionValue); + return true; + } else { + return fail(context.getLocation(e)); + } + } + + @Override + public boolean handleFaultExtension(TWSDLParserContext context, TWSDLExtensible parent, Element e) { + if (extensionModeOn) { + warn(context.getLocation(e)); + String actionValue = XmlUtil.getAttributeNSOrNull(e, WSA_ACTION_QNAME); + if (actionValue == null || actionValue.equals("")) { + errReceiver.warning(context.getLocation(e), WsdlMessages.WARNING_FAULT_EMPTY_ACTION(parent.getNameValue(), parent.getWSDLElementName().getLocalPart(), parent.getParent().getNameValue())); + return false; // keep compiler happy + } + ((Fault) parent).setAction(actionValue); + return true; + } else { + return fail(context.getLocation(e)); + } + } + + private boolean warnEmptyAction(TWSDLExtensible parent, Locator pos) { + errReceiver.warning(pos, WsdlMessages.WARNING_INPUT_OUTPUT_EMPTY_ACTION(parent.getWSDLElementName().getLocalPart(), parent.getParent().getNameValue())); + return false; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java index 579a1bc9eb6..5ee5554cc18 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/MetadataFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import com.sun.istack.internal.Nullable; import com.sun.tools.internal.ws.resources.WscompileMessages; import com.sun.tools.internal.ws.resources.WsdlMessages; 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.WSDLConstants; @@ -69,28 +68,31 @@ public final class MetadataFinder extends DOMForest{ public boolean isMexMetadata; private String rootWSDL; - private Set rootWsdls = new HashSet(); + private final Set rootWsdls = new HashSet(); public MetadataFinder(InternalizationLogic logic, WsimportOptions options, ErrorReceiver errReceiver) { super(logic, new WSEntityResolver(options,errReceiver), options, errReceiver); } + @SuppressWarnings("element-type-mismatch") public void parseWSDL(){ // parse source grammars for (InputSource value : options.getWSDLs()) { String systemID = value.getSystemId(); errorReceiver.pollAbort(); - Document dom ; - Element doc = null; + Document dom; + Element doc; try { - //if there is entity resolver use it - if (options.entityResolver != null) - value = options.entityResolver.resolveEntity(null, systemID); - if (value == null) - value = new InputSource(systemID); + //if there is entity resolver use it + if (options.entityResolver != null) { + value = options.entityResolver.resolveEntity(null, systemID); + } + if (value == null) { + value = new InputSource(systemID); + } dom = parse(value, true); doc = dom.getDocumentElement(); @@ -100,9 +102,9 @@ public final class MetadataFinder extends DOMForest{ //if its not a WSDL document, retry with MEX if (doc.getNamespaceURI() == null || !doc.getNamespaceURI().equals(WSDLConstants.NS_WSDL) || !doc.getLocalName().equals("definitions")) { throw new SAXParseException(WsdlMessages.INVALID_WSDL(systemID, - com.sun.xml.internal.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc)); + com.sun.xml.internal.ws.wsdl.parser.WSDLConstants.QNAME_DEFINITIONS, doc.getNodeName(), locatorTable.getStartLocation(doc).getLineNumber()), locatorTable.getStartLocation(doc)); } - } catch(FileNotFoundException e){ + } catch (FileNotFoundException e) { errorReceiver.error(WsdlMessages.FILE_NOT_FOUND(systemID), e); return; } catch (IOException e) { @@ -119,24 +121,27 @@ public final class MetadataFinder extends DOMForest{ NodeList schemas = doc.getElementsByTagNameNS(SchemaConstants.NS_XSD, "schema"); for (int i = 0; i < schemas.getLength(); i++) { - if(!inlinedSchemaElements.contains(schemas.item(i))) + if (!inlinedSchemaElements.contains(schemas.item(i))) { inlinedSchemaElements.add((Element) schemas.item(i)); + } } } identifyRootWsdls(); } public static class WSEntityResolver implements EntityResolver { - EntityResolver parentResolver; WsimportOptions options; ErrorReceiver errorReceiver; + private URLConnection c = null; + private boolean doReset = false; + public WSEntityResolver(WsimportOptions options, ErrorReceiver errReceiver) { - this.parentResolver = options.entityResolver; this.options = options; this.errorReceiver = errReceiver; } + @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { InputSource inputSource = null; @@ -161,6 +166,14 @@ public final class MetadataFinder extends DOMForest{ ((HttpURLConnection) conn).setInstanceFollowRedirects(false); } + if (conn instanceof JarURLConnection) { + if (conn.getUseCaches()) { + doReset = true; + conn.setDefaultUseCaches(false); + c = conn; + } + } + try { is = conn.getInputStream(); //is = sun.net.www.protocol.http.HttpURLConnection.openConnectionCheckRedirects(conn); @@ -170,7 +183,7 @@ public final class MetadataFinder extends DOMForest{ int code = httpConn.getResponseCode(); if (code == 401) { errorReceiver.error(new SAXParseException(WscompileMessages.WSIMPORT_AUTH_INFO_NEEDED(e.getMessage(), - systemId, DefaultAuthenticator.defaultAuthfile), null, e)); + systemId, WsimportOptions.defaultAuthfile), null, e)); throw new AbortException(); } //FOR other code we will retry with MEX @@ -211,11 +224,19 @@ public final class MetadataFinder extends DOMForest{ return inputSource; } + @Override + protected void finalize() throws Throwable { + //see http://java.net/jira/browse/JAX_WS-1087 + if (doReset) { + c.setDefaultUseCaches(true); + } + } } // overide default SSL HttpClientVerifier to always return true // effectively overiding Hostname client verification when using SSL private static class HttpClientVerifier implements HostnameVerifier { + @Override public boolean verify(String s, SSLSession sslSession) { return true; } @@ -263,7 +284,7 @@ public final class MetadataFinder extends DOMForest{ } //no wsdl with wsdl:service found, throw error if(rootWSDL == null){ - StringBuffer strbuf = new StringBuffer(); + StringBuilder strbuf = new StringBuilder(); for(String str : rootWsdls){ strbuf.append(str); strbuf.append('\n'); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java index f3feff1f0e8..dccf5047b0f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/NamespaceContextImpl.java @@ -3,7 +3,7 @@ * DO NOT REMOVE OR ALTER! */ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java index 4d1b3e8b01e..3c65fba4c0b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy12ExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java index fefb058554b..9e7ced17bda 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Policy15ExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java index 1a2165e615e..0801b25fe27 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAP12ExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java index 9ae1a79dc7b..4c35e6d3d51 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPEntityReferenceValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java index c127da505da..80c4a55f804 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/SOAPExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -232,127 +232,110 @@ public class SOAPExtensionHandler extends AbstractExtensionHandler { // context.fireDoneParsingEntity(getBodyQName(), body); return true; } else if (XmlUtil.matchesTagNS(e, getHeaderQName())) { - context.push(); - context.registerNamespaces(e); - - SOAPHeader header = new SOAPHeader(context.getLocation(e)); - - String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE); - if (use != null) { - if (use.equals(Constants.ATTRVALUE_LITERAL)) { - header.setUse(SOAPUse.LITERAL); - } else if (use.equals(Constants.ATTRVALUE_ENCODED)) { - header.setUse(SOAPUse.ENCODED); - } else { - Util.fail( - "parsing.invalidAttributeValue", - Constants.ATTR_USE, - use); - } - } - - String namespace = - XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE); - if (namespace != null) { - header.setNamespace(namespace); - } - - String encodingStyle = - XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE); - if (encodingStyle != null) { - header.setEncodingStyle(encodingStyle); - } - - String part = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PART); - if (part != null) { - header.setPart(part); - } - - String messageAttr = - XmlUtil.getAttributeOrNull(e, Constants.ATTR_MESSAGE); - if (messageAttr != null) { - header.setMessage(context.translateQualifiedName(context.getLocation(e), messageAttr)); - } - - for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) { - Element e2 = Util.nextElement(iter); - if (e2 == null) - break; - - if (XmlUtil - .matchesTagNS(e2, getHeaderfaultQName())) { - context.push(); - context.registerNamespaces(e); - - SOAPHeaderFault headerfault = new SOAPHeaderFault(context.getLocation(e)); - - String use2 = - XmlUtil.getAttributeOrNull(e2, Constants.ATTR_USE); - if (use2 != null) { - if (use2.equals(Constants.ATTRVALUE_LITERAL)) { - headerfault.setUse(SOAPUse.LITERAL); - } else if (use.equals(Constants.ATTRVALUE_ENCODED)) { - headerfault.setUse(SOAPUse.ENCODED); - } else { - Util.fail( - "parsing.invalidAttributeValue", - Constants.ATTR_USE, - use2); - } - } - - String namespace2 = - XmlUtil.getAttributeOrNull( - e2, - Constants.ATTR_NAMESPACE); - if (namespace2 != null) { - headerfault.setNamespace(namespace2); - } - - String encodingStyle2 = - XmlUtil.getAttributeOrNull( - e2, - Constants.ATTR_ENCODING_STYLE); - if (encodingStyle2 != null) { - headerfault.setEncodingStyle(encodingStyle2); - } - - String part2 = - XmlUtil.getAttributeOrNull(e2, Constants.ATTR_PART); - if (part2 != null) { - headerfault.setPart(part2); - } - - String messageAttr2 = - XmlUtil.getAttributeOrNull(e2, Constants.ATTR_MESSAGE); - if (messageAttr2 != null) { - headerfault.setMessage( - context.translateQualifiedName(context.getLocation(e2), messageAttr2)); - } - - header.add(headerfault); - context.pop(); - } else { - Util.fail( - "parsing.invalidElement", - e2.getTagName(), - e2.getNamespaceURI()); - } - } - - parent.addExtension(header); - context.pop(); - context.fireDoneParsingEntity(getHeaderQName(), header); - return true; + return handleHeaderElement(parent, e, context); } else { - Util.fail( - "parsing.invalidExtensionElement", - e.getTagName(), - e.getNamespaceURI()); + Util.fail("parsing.invalidExtensionElement", e.getTagName(), e.getNamespaceURI()); return false; // keep compiler happy } } + private boolean handleHeaderElement(TWSDLExtensible parent, Element e, TWSDLParserContextImpl context) { + context.push(); + context.registerNamespaces(e); + + SOAPHeader header = new SOAPHeader(context.getLocation(e)); + + String use = XmlUtil.getAttributeOrNull(e, Constants.ATTR_USE); + if (use != null) { + if (use.equals(Constants.ATTRVALUE_LITERAL)) { + header.setUse(SOAPUse.LITERAL); + } else if (use.equals(Constants.ATTRVALUE_ENCODED)) { + header.setUse(SOAPUse.ENCODED); + } else { + Util.fail("parsing.invalidAttributeValue", Constants.ATTR_USE, use); + } + } + + String namespace = XmlUtil.getAttributeOrNull(e, Constants.ATTR_NAMESPACE); + if (namespace != null) { + header.setNamespace(namespace); + } + + String encodingStyle = XmlUtil.getAttributeOrNull(e, Constants.ATTR_ENCODING_STYLE); + if (encodingStyle != null) { + header.setEncodingStyle(encodingStyle); + } + + String part = XmlUtil.getAttributeOrNull(e, Constants.ATTR_PART); + if (part != null) { + header.setPart(part); + } + + String messageAttr = XmlUtil.getAttributeOrNull(e, Constants.ATTR_MESSAGE); + if (messageAttr != null) { + header.setMessage(context.translateQualifiedName(context.getLocation(e), messageAttr)); + } + + for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) { + Element e2 = Util.nextElement(iter); + if (e2 == null) + break; + + if (XmlUtil.matchesTagNS(e2, getHeaderfaultQName())) { + handleHeaderFaultElement(e, context, header, use, e2); + } else { + Util.fail("parsing.invalidElement", e2.getTagName(), e2.getNamespaceURI()); + } + } + + parent.addExtension(header); + context.pop(); + context.fireDoneParsingEntity(getHeaderQName(), header); + return true; + } + + private void handleHeaderFaultElement(Element e, TWSDLParserContextImpl context, SOAPHeader header, String use, Element e2) { + context.push(); + context.registerNamespaces(e); + + SOAPHeaderFault headerfault = new SOAPHeaderFault(context.getLocation(e)); + + String use2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_USE); + if (use2 != null) { + if (use2.equals(Constants.ATTRVALUE_LITERAL)) { + headerfault.setUse(SOAPUse.LITERAL); + } else if (use.equals(Constants.ATTRVALUE_ENCODED)) { + headerfault.setUse(SOAPUse.ENCODED); + } else { + Util.fail("parsing.invalidAttributeValue", Constants.ATTR_USE, use2); + } + } + + String namespace2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_NAMESPACE); + if (namespace2 != null) { + headerfault.setNamespace(namespace2); + } + + String encodingStyle2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_ENCODING_STYLE); + if (encodingStyle2 != null) { + headerfault.setEncodingStyle(encodingStyle2); + } + + String part2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_PART); + if (part2 != null) { + headerfault.setPart(part2); + } + + String messageAttr2 = XmlUtil.getAttributeOrNull(e2, Constants.ATTR_MESSAGE); + if (messageAttr2 != null) { + headerfault.setMessage( + context.translateQualifiedName(context.getLocation(e2), messageAttr2)); + } + + header.add(headerfault); + context.pop(); + } + public boolean handleFaultExtension( TWSDLParserContext context, TWSDLExtensible parent, @@ -398,6 +381,10 @@ public class SOAPExtensionHandler extends AbstractExtensionHandler { context.pop(); // context.fireDoneParsingEntity(getFaultQName(), fault); return true; + } else if (XmlUtil.matchesTagNS(e, getHeaderQName())) { + // although SOAP spec doesn't define meaning of this extension; it is allowed + // to be here, so we have to accept it, not fail (bug 13576977) + return handleHeaderElement(parent, e, (TWSDLParserContextImpl) context); } else { Util.fail( "parsing.invalidExtensionElement", diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java index 429bcec853d..9d182930ded 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java index c7682d4f034..91467a1f94b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/VersionChecker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java index b427d325bc3..6a06c0ff81d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java index 34a70f81499..2beb335c0c2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/W3CAddressingMetadataExtensionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java index 4bbafbdcc64..dcc83d0b698 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLInternalizationLogic.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package com.sun.tools.internal.ws.wsdl.parser; -import com.sun.tools.internal.ws.wscompile.WsimportOptions; import com.sun.tools.internal.ws.wsdl.document.WSDLConstants; import com.sun.tools.internal.ws.wsdl.document.jaxws.JAXWSBindingsConstants; import com.sun.tools.internal.ws.wsdl.document.schema.SchemaConstants; @@ -49,11 +48,12 @@ public class WSDLInternalizationLogic implements InternalizationLogic{ super(parent); } + @Override protected String findExternalResource( String nsURI, String localName, Attributes atts) { if(WSDLConstants.NS_WSDL.equals(nsURI) && "import".equals(localName)){ - if(parent.isExtensionMode()){ - //TODO: add support for importing schema using wsdl:import - } +// if(parent.isExtensionMode()){ +// //TODO: add support for importing schema using wsdl:import +// } return atts.getValue("location"); } @@ -67,14 +67,17 @@ public class WSDLInternalizationLogic implements InternalizationLogic{ return null; } } + @Override public XMLFilterImpl createExternalReferenceFinder(DOMForest parent) { return new ReferenceFinder(parent); } + @Override public boolean checkIfValidTargetNode(DOMForest parent, Element bindings, Element target) { return false; } + @Override public Element refineSchemaTarget(Element target) { // look for existing xs:annotation Element annotation = DOMUtils.getFirstChildElement(target, Constants.NS_XSD, "annotation"); @@ -92,6 +95,7 @@ public class WSDLInternalizationLogic implements InternalizationLogic{ } + @Override public Element refineWSDLTarget(Element target){ // look for existing xs:annotation Element JAXWSBindings = DOMUtils.getFirstChildElement(target, JAXWSBindingsConstants.NS_JAXWS_BINDINGS, "bindings"); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java index 4471c72a609..898938169ec 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WSDLParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,11 +58,9 @@ import com.sun.tools.internal.ws.wsdl.framework.Entity; import com.sun.tools.internal.ws.wsdl.framework.ParserListener; import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; import com.sun.xml.internal.ws.util.ServiceFinder; - import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; import org.xml.sax.Locator; @@ -73,6 +71,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import org.w3c.dom.Node; /** * A parser for WSDL documents. This parser is used only at the tool time. @@ -101,9 +100,10 @@ public class WSDLParser { if (forest == null) { forest = new MetadataFinder(new WSDLInternalizationLogic(), options, errReceiver); forest.parseWSDL(); - if (forest.isMexMetadata) + if (forest.isMexMetadata) { errReceiver.reset(); } + } this.forest = forest; // register handlers for default extensions register(new SOAPExtensionHandler(extensionHandlers)); @@ -111,7 +111,10 @@ public class WSDLParser { register(new MIMEExtensionHandler(extensionHandlers)); register(new JAXWSBindingExtensionHandler(extensionHandlers)); register(new SOAP12ExtensionHandler(extensionHandlers)); - register(new MemberSubmissionAddressingExtensionHandler(extensionHandlers, errReceiver)); + + // MemberSubmission Addressing not supported by WsImport anymore see JAX_WS-1040 for details + //register(new MemberSubmissionAddressingExtensionHandler(extensionHandlers, errReceiver, options.isExtensionMode())); + register(new W3CAddressingExtensionHandler(extensionHandlers, errReceiver)); register(new W3CAddressingMetadataExtensionHandler(extensionHandlers, errReceiver)); register(new Policy12ExtensionHandler()); @@ -144,7 +147,7 @@ public class WSDLParser { 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) + if (!Internalizer.fixNull(binding.getNamespaceURI()).equals(JAXWSBindingsConstants.NS_JAXWS_BINDINGS) || !binding.getLocalName().equals("bindings")){ errReceiver.error(forest.locatorTable.getStartLocation(binding), WsdlMessages.PARSER_NOT_A_BINDING_FILE( binding.getNamespaceURI(), @@ -162,11 +165,6 @@ public class WSDLParser { return buildWSDLDocument(); } - private String fixNull(String s) { - if(s==null) return ""; - else return s; - } - public MetadataFinder getDOMForest() { return forest; } @@ -203,13 +201,6 @@ public class WSDLParser { new Internalizer(forest, options, errReceiver).transform(); - //print the wsdl -// try{ -// forest.dump(System.out); -// }catch(IOException e){ -// e.printStackTrace(); -// } - Definitions definitions = parseDefinitionsNoImport(context, root); if(definitions == null){ Locator locator = forest.locatorTable.getStartLocation(root.getDocumentElement()); @@ -221,20 +212,6 @@ public class WSDLParser { return definitions; } - private void processMexDocs(TWSDLParserContextImpl context){ - for(String location : forest.listSystemIDs()){ - if (!context.getDocument().isImportedDocument(location)){ - Document doc = forest.get(location); - if(doc == null) - continue; - Definitions importedDefinitions = parseDefinitionsNoImport(context, doc); - if(importedDefinitions == null) - continue; - context.getDocument().addImportedEntity(importedDefinitions); - context.getDocument().addImportedDocument(location); - } - } - } private void processImports(TWSDLParserContextImpl context) { for(String location : forest.getExternalReferences()){ if (!context.getDocument().isImportedDocument(location)){ @@ -520,10 +497,7 @@ public class WSDLParser { // possible extensibility element -- must live outside the WSDL namespace checkNotWsdlAttribute(e3); - if (!handleExtension(context, input, e3, e2)) { - // ignore the extensiblity attribute - // TODO throw a WARNING - } + handleExtension(context, input, e3, e2); } // verify that there is at most one child element and it is a documentation element @@ -582,10 +556,7 @@ public class WSDLParser { // possible extensibility element -- must live outside the WSDL namespace checkNotWsdlAttribute(e3); - if (!handleExtension(context, output, e3, e2)) { - // ignore the extensiblity attribute - // TODO throw a WARNING - } + handleExtension(context, output, e3, e2); } // verify that there is at most one child element and it is a documentation element @@ -635,10 +606,7 @@ public class WSDLParser { // possible extensibility element -- must live outside the WSDL namespace checkNotWsdlAttribute(e3); - if (!handleExtension(context, fault, e3, e2)) { - // ignore the extensiblity attribute - // TODO throw a WARNING - } + handleExtension(context, fault, e3, e2); } // verify that there is at most one child element and it is a documentation element @@ -780,7 +748,6 @@ public class WSDLParser { } /* Here we check for the use scenario */ - Iterator itere2 = XmlUtil.getAllChildren(e2); context.push(); context.registerNamespaces(e2); BindingInput input = new BindingInput(forest.locatorTable.getStartLocation(e2)); @@ -984,8 +951,9 @@ public class WSDLParser { errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName())); } gotDocumentation = true; - if(service.getDocumentation() == null) + if (service.getDocumentation() == null) { service.setDocumentation(getDocumentationFor(e2)); + } } else if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_PORT)) { Port port = parsePort(context, definitions, e2); service.add(port); @@ -1022,16 +990,18 @@ public class WSDLParser { for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) { Element e2 = Util.nextElement(iter); - if (e2 == null) + if (e2 == null) { break; + } if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) { if (gotDocumentation) { errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName())); } gotDocumentation = true; - if(port.getDocumentation() == null) + if (port.getDocumentation() == null) { port.setDocumentation(getDocumentationFor(e2)); + } } else { // possible extensibility element -- must live outside the WSDL namespace checkNotWsdlElement(e2); @@ -1049,8 +1019,9 @@ public class WSDLParser { private void validateSchemaImports(Element typesElement){ for (Iterator iter = XmlUtil.getAllChildren(typesElement); iter.hasNext();) { Element e = Util.nextElement(iter); - if (e == null) + if (e == null) { break; + } if (XmlUtil.matchesTagNS(e, SchemaConstants.QNAME_IMPORT)) { errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.WARNING_WSI_R_2003()); }else{ @@ -1072,6 +1043,7 @@ public class WSDLParser { (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI()); if (h == null) { context.fireIgnoringExtension(e, (Entity) entity); + errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI())); return false; } else { return h.doHandleExtension(context, entity, e); @@ -1087,6 +1059,7 @@ public class WSDLParser { (TWSDLExtensionHandler) extensionHandlers.get(n.getNamespaceURI()); if (h == null) { context.fireIgnoringExtension(e, (Entity) entity); + errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(n.getLocalName(), n.getNamespaceURI())); return false; } else { return h.doHandleExtension(context, entity, e); @@ -1095,15 +1068,17 @@ public class WSDLParser { private void checkNotWsdlElement(Element e) { // possible extensibility element -- must live outside the WSDL namespace - if (e.getNamespaceURI() != null && e.getNamespaceURI().equals(Constants.NS_WSDL)) + if (e.getNamespaceURI() != null && e.getNamespaceURI().equals(Constants.NS_WSDL)) { errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_INVALID_WSDL_ELEMENT(e.getTagName())); } + } private void checkNotWsdlAttribute(Attr a) { // possible extensibility element -- must live outside the WSDL namespace - if (a.getNamespaceURI().equals(Constants.NS_WSDL)) + if (Constants.NS_WSDL.equals(a.getNamespaceURI())) { errReceiver.error(forest.locatorTable.getStartLocation(a.getOwnerElement()), WsdlMessages.PARSING_INVALID_WSDL_ELEMENT(a.getLocalName())); } + } private void checkNotWsdlRequired(Element e) { // check the wsdl:required attribute, fail if set to "true" diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java index 52591e670e1..c9253b20336 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/ws/wsdl/parser/WhitespaceStripper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java index 0e11fdf0df4..bf743f7d835 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/ClassLoaderBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,6 @@ import javax.xml.bind.JAXBContext; import com.sun.istack.internal.tools.MaskingClassLoader; import com.sun.istack.internal.tools.ParallelWorldClassLoader; -import com.sun.tools.internal.xjc.SecureLoader; /** * Creates a class loader configured to run XJC 1.0/2.0 safely without @@ -62,7 +61,7 @@ class ClassLoaderBuilder { // JAXB API is loaded from the bootstrap. We need to override one with ours mustang = true; - List mask = new ArrayList(Arrays.asList(maskedPackages)); + List mask = new ArrayList(Arrays.asList(maskedPackages)); mask.add("javax.xml.bind."); cl = new MaskingClassLoader(cl,mask); @@ -80,7 +79,7 @@ class ClassLoaderBuilder { // so that the XJC2 classes in the parent class loader // won't interfere with loading XJC1 classes in a child class loader - if (v.equals("1.0")) { + if ("1.0".equals(v)) { if(!mustang) // if we haven't used Masking ClassLoader, do so now. cl = new MaskingClassLoader(cl,toolPackages); diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java index 72c63896ef8..5056d39d677 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/Driver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ import com.sun.codemodel.internal.JCodeModel; import com.sun.codemodel.internal.writer.ZipCodeWriter; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; +import com.sun.istack.internal.tools.DefaultAuthenticator; import com.sun.tools.internal.xjc.generator.bean.BeanGenerator; import com.sun.tools.internal.xjc.model.Model; import com.sun.tools.internal.xjc.outline.Outline; @@ -222,9 +223,15 @@ public class Driver { opt.setSchemaLanguage(Language.XMLSCHEMA); // disable auto-guessing try { opt.parseArguments(args); - } catch (WeAreDone _) { + } catch (WeAreDone e) { + if (opt.proxyAuth != null) { + DefaultAuthenticator.reset(); + } return -1; } catch(BadCommandLineException e) { + if (opt.proxyAuth != null) { + DefaultAuthenticator.reset(); + } e.initOptions(opt); throw e; } @@ -401,6 +408,10 @@ public class Driver { listener.message(Messages.format(Messages.STACK_OVERFLOW)); return -1; } + } finally { + if (opt.proxyAuth != null) { + DefaultAuthenticator.reset(); + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties index 5a3ed11194c..73dc95b47ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -70,6 +70,7 @@ Options:\n\ \ \ -target (2.0|2.1) : behave like XJC 2.0 or 2.1 and generate code that doesn't use any 2.2 features.\n\ \ \ -encoding : specify character encoding for generated source files\n\ \ \ -enableIntrospection : enable correct generation of Boolean getters/setters to enable Bean Introspection apis \n\ +\ \ -disableXmlSecurity : disables XML security features when parsing XML documents \n\ \ \ -contentForWildcard : generates content property for types with multiple xs:any derived elements \n\ \ \ -xmlschema : treat input as W3C XML Schema (default)\n\ \ \ -relaxng : treat input as RELAX NG (experimental,unsupported)\n\ @@ -170,31 +171,31 @@ Driver.CompilingSchema = \ Driver.FailedToGenerateCode = \ Failed to produce code. -# DO NOT localize the 2.2.5-b10 string - it is a token for an ant +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant Driver.FilePrologComment = \ - This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-b10 \n\ + This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7-b63 \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 2.2.5-b10 + xjc 2.2.7-b63 Driver.FullVersion = \ - xjc full version "2.2.5-b10-b14" + xjc full version "2.2.7-b63-b19" -Driver.BuildID = 2.2.5-b10 +Driver.BuildID = 2.2.7-b63 # for JDK integration - include version in source zip -jaxb.jdk.version=2.2.5-b10 +jaxb.jdk.version=2.2.7-b63 # see java.text.SimpleDateFormat for format syntax -# Format should not be changed, English locale is used to transform this string into a real date. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. Driver.DateFormat = \ yyyy.MM.dd # see java.text.SimpleDateFormat for format syntax -# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +# Format should not be changed, English locale is used to transform this string into a real time. Driver.TimeFormat = \ hh:mm:ss a z diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties new file mode 100644 index 00000000000..f83aa74cd97 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/MessageBundle_de.properties @@ -0,0 +1,152 @@ +# +# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.UnknownLocation) if location of the error is not known. +ConsoleErrorReporter.UnknownLocation = unbekanntes Verzeichnis + +# Concatenated with Driver.ErrorMessage, Driver.WarningMessage, Driver.InfoMessage (Driver.InfoMessage + exception message + ConsoleErrorReporter.LineXOfY). {0} - "?"/number, {1} - file location/"unknown file" e.g.: [xjc] [ERROR] Attempt to create a property having the same name as the reserved word "Class". [xjc] line 6 of example.xsd +ConsoleErrorReporter.LineXOfY = \ \ Zeile {0} von {1} + +# may be a placeholder replacement for the second placeholder of ConsoleErrorReporter.LineXOfY (if the file location is unknown) +ConsoleErrorReporter.UnknownFile = unbekannte Datei + +Driver.Private.Usage = Zus\u00e4tzliche private Testoptionen:\n\\ \\ -debug : Ausf\u00fchrung im Debug-Modus (umfasst -verbose)\n\\ \\ -mode : F\u00fchrt XJC in einem anderen Ausf\u00fchrungsmodus aus\n\\ \\ -private : Zeigt diese Hilfemeldung an\nModus:\n\\ \\ code : Generiert Java-Quellcode (Standard)\n\\ \\ dryrun : Kompiliert das Schema im Speicher, generiert die Java-Quelle jedoch nicht\n\\ \\ zip : Generiert den Java-Quellcode in einer .zip-Datei, wie mit der Option -d angegeben\n\\ \\ sig : Gibt die Signaturen des generierten Codes aus\n\\ \\ forest : Gibt transformierte DOM-Gesamtstruktur aus\n +Driver.Public.Usage = Verwendung: xjc [-options ...] ... [-b ] ...\nWenn dir angegeben wird, werden alle Schemadateien im Verzeichnis kompiliert.\nWenn jar angegeben wird, wird die /META-INF/sun-jaxb.episode-Binding-Datei kompiliert.\nOptionen:\n\\ \\ -nv : F\u00fchrt keine strikte Validierung der Eingabeschemas durch\n\\ \\ -extension : L\u00e4sst Herstellererweiterungen zu - Befolgt die \n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Kompatibilit\u00e4tsregeln und App E.2 der JAXB-Spezifikation nicht strikt\n\\ \\ -b : Gibt externe Bindings-Dateien an (jede muss ihre eigene Option -b haben)\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Wenn ein Verzeichnis angegeben wird, wird **/*.xjb durchsucht\n\\ \\ -d

: Generierte Dateien werden in diesem Verzeichnis gespeichert\n\\ \\ -p : Gibt das Zielpackage an\n\\ \\ -httpproxy : set HTTP/HTTPS proxy. Format ist [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile : Wird wie -httpproxy verwendet, verwendet jedoch das Argument in einer Datei zum Schutz des Kennwortes \n\\ \\ -classpath : Gibt an, wo die Benutzerklassendateien gefunden werden\n\\ \\ -catalog : Gibt Katalogdateien zur Aufl\u00f6sung von externen Entity-Referenzen an\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ Unterst\u00fctzt TR9401, XCatalog und OASIS-XML-Katalogformat.\n\\ \\ -readOnly : Generierte Dateien werden im schreibgesch\u00fctzten Modus gelesen\n\\ \\ -npa : Unterdr\u00fcckt die Generierung von Annotationen auf Packageebene (**/package-info.java)\n\\ \\ -no-header : Unterdr\u00fcckt die Generierung eines Datei-Headers mit Zeitstempel\n\\ \\ -target (2.0|2.1) : Verh\u00e4lt sich wie XJC 2.0 oder 2.1 und generiert Code, der keine 2.2-Features verwendet.\n\\ \\ -encoding : Gibt Zeichencodierung f\u00fcr generierte Quelldateien an\n\\ \\ -enableIntrospection : Aktiviert die ordnungsgem\u00e4\u00dfe Generierung von booleschen Gettern/Settern zur Aktivierung von Bean Introspection-APIs \n\\ \\ -contentForWildcard : Generiert Contenteigenschaft f\u00fcr Typen mit mehreren von xs:any abgeleiteten Elementen \n\\ \\ -xmlschema : Behandelt Eingabe als W3C-XML-Schema (Standard)\n\\ \\ -relaxng : Behandelt Eingabe als RELAX NG (experimentell, nicht unterst\u00fctzt)\n\\ \\ -relaxng-compact : Behandelt Eingabe als RELAX NG-Kompaktsyntax (experimentell, nicht unterst\u00fctzt)\n\\ \\ -dtd : Behandelt Eingabe als XML DTD (experimentell, nicht unterst\u00fctzt)\n\\ \\ -wsdl : Behandelt Eingabe als WSDL und kompiliert enthaltene Schemas (experimentell, nicht unterst\u00fctzt)\n\\ \\ -verbose : Verwendet extra-verbose\n\\ \\ -quiet : Unterdr\u00fcckt die Compilerausgabe\n\\ \\ -help : Zeigt diese Hilfemeldung an\n\\ \\ -version : Zeigt Versionsinformationen an\n\\ \\ -fullversion : Zeigt vollst\u00e4ndige Versionsinformationen an\n +Driver.AddonUsage = \nErweiterungen: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = Versuchen Sie, {0} zu kompilieren? Unterst\u00fctzung f\u00fcr {0} ist zu Testzwecken bestimmt. Eine Aktivierung ist mit der Option {1} m\u00f6glich. + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = In ein nicht vorhandenes Verzeichnis "{0}" kann nicht geschrieben werden + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = Bei der Option -mode fehlt ein Operand + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = Ein Operand fehlt + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = Entweder fehlt bei der Option -host ein Operand, \noder es wurde -port, jedoch nicht -host angegeben + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = Entweder fehlt bei der Option -port ein Operand, \noder es wurde -host, jedoch nicht -port angegeben + +Driver.ILLEGAL_TARGET_VERSION = "{0}" ist keine g\u00fcltige Zielversion. "2.0" und "2.1" werden unterst\u00fctzt. + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = Bei der Option -httpproxyfile fehlt ein Operand + +Driver.NO_SUCH_FILE = Keine derartige Datei: {0} + +Driver.ILLEGAL_PROXY = "{0}" ist kein g\u00fcltiges Proxyformat. Das Format ist [user[:password]@]proxyHost:proxyPort + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = unbekannter Modus {0} + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = unbekannter Parameter {0} + +Driver.UnsupportedEncoding = nicht unterst\u00fctzte Codierung: {0} + +Driver.MissingGrammar = Grammatik nicht angegeben + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = keine externe Binding-Datei. Das Root-Element muss ''{''http://java.sun.com/xml/ns/jaxb''}''-Bindings sein, ist jedoch ''{''{0}''}''{1} + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = Ein Schema wird geparst ... + +Driver.ParseFailed = Ein Schema konnte nicht geparst werden. + +Driver.StackOverflow = Stack-\u00dcberlauf. Entweder kompilieren Sie ein gro\u00dfes Schema, das mehr Ressourcen erfordert, oder XJC enth\u00e4lt einen Bug. Erweitern Sie zuerst die Stack-Gr\u00f6\u00dfe mit der Option -Xss JVM. Wenn das Problem dadurch nicht gel\u00f6st wird, verwenden Sie die Option -debug, um den Stack Trace abzurufen, und wenden Sie sich an Sun. + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = Ein Schema wird kompiliert ... + +Driver.FailedToGenerateCode = Code konnte nicht erzeugt werden. + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7-b63 generiert \nSiehe http://java.sun.com/xml/jaxb \n\u00c4nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. \nGeneriert: {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = xjc vollst\u00e4ndige Version "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : les fichiers g\u00e9n\u00e9r\u00e9s seront plac\u00e9s dans ce r\u00e9pertoire\n\ \ -p : indique le package cible\n\ \ -httpproxy : d\u00e9finissez le proxy HTTP/HTTPS. Le format est [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile : fonctionne comme -httpproxy mais prend l'argument dans un fichier pour prot\u00e9ger le mot de passe \n\ \ -classpath : indiquez o\u00f9 trouver les fichiers de classe utilisateur\n\ \ -catalog : indiquez les fichiers de catalogue pour r\u00e9soudre les r\u00e9f\u00e9rences d'entit\u00e9 externes\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ prenez en charge le format de catalogue TR9401, XCatalog et OASIS XML.\n\ \ -readOnly : les fichiers g\u00e9n\u00e9r\u00e9s seront en mode lecture seule\n\ \ -npa : supprimez la g\u00e9n\u00e9ration des annotations de niveau package (**/package-info.java)\n\ \ -no-header : supprimez la g\u00e9n\u00e9ration d'un en-t\u00eate de fichier avec horodatage\n\ \ -target (2.0|2.1) : comportez-vous comme XJC 2.0 ou 2.1 et g\u00e9n\u00e9rez du code qui n'utilise aucune fonctionnalit\u00e9 2.2.\n\ \ -encoding : indiquez l'encodage de caract\u00e8res pour les fichiers source g\u00e9n\u00e9r\u00e9s\n\ \ -enableIntrospection : activez la g\u00e9n\u00e9ration correcte des m\u00e9thodes get/set bool\u00e9ennes pour activer les API d'introspection de bean \n\ \ -contentForWildcard : g\u00e9n\u00e8re la propri\u00e9t\u00e9 de contenu pour les types avec plusieurs \u00e9l\u00e9ments d\u00e9riv\u00e9s xs:any \n\ \ -xmlschema : traitez l'entr\u00e9e en tant que W3C XML Schema (par d\u00e9faut)\n\ \ -relaxng : traitez l'entr\u00e9e en tant que RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -relaxng-compact : traitez l'entr\u00e9e en tant que syntaxe compacte RELAX NG (exp\u00e9rimental, non pris en charge)\n\ \ -dtd : traitez l'entr\u00e9e en tant que DTD XML (exp\u00e9rimental, non pris en charge)\n\ \ -wsdl : traitez l'entr\u00e9e en tant que WSDL et compilez-y les sch\u00e9mas (exp\u00e9rimental, non pris en charge)\n\ \ -verbose : agissez en mode extra verbose\n\ \ -quiet : supprimez la sortie de compilateur\n\ \ -help : affichez ce message d'aide\n\ \ -version : affichez ces informations de version\n\ \ -fullversion : affichez ces informations de version compl\u00e8te\n +Driver.AddonUsage = \nExtensions : + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = Essayez-vous de compiler {0} ? La prise en charge de {0} est exp\u00e9rimentale. Vous pouvez l''activer \u00e0 l''aide de l''option {1}. + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = ne peut pas \u00e9crire sur un r\u00e9pertoire "{0}" non existant + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = un op\u00e9rande est manquant dans l'option -mode + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = un op\u00e9rande est manquant + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = un op\u00e9rande est manquant dans l'option -host \nou -port a \u00e9t\u00e9 indiqu\u00e9, mais pas -host + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = un op\u00e9rande est manquant dans l'option -port \nou -host a \u00e9t\u00e9 indiqu\u00e9, mais pas -port + +Driver.ILLEGAL_TARGET_VERSION = "{0}" n''est pas une version cible valide. Les versions "2.0" et "2.1" sont prises en charge. + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = un op\u00e9rande est manquant dans l'option -httpproxyfile + +Driver.NO_SUCH_FILE = Aucun fichier de ce type : {0} + +Driver.ILLEGAL_PROXY = "{0}" n''est pas un format de proxy valide. Le format est [user[:password]@]proxyHost:proxyPort + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = mode {0} non reconnu + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = param\u00e8tre {0} non reconnu + +Driver.UnsupportedEncoding = encodage non pris en charge : {0} + +Driver.MissingGrammar = la grammaire n'est pas indiqu\u00e9e + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = n''est pas un fichier de binding externe. L''\u00e9l\u00e9ment racine doit correspondre aux bindings ''{''http://java.sun.com/xml/ns/jaxb''}'', mais il s''agit de ''{''{0}''}''{1} + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = analyse d'un sch\u00e9ma... + +Driver.ParseFailed = Echec de l'analyse d'un sch\u00e9ma. + +Driver.StackOverflow = D\u00e9bordement de pile. Vous compilez un sch\u00e9ma volumineux qui exige davantage de ressources ou XJC pr\u00e9sente un bug. Etendez d'abord la taille de pile \u00e0 l'aide de l'option JVM -Xss. Si le probl\u00e8me persiste, utilisez l'option -debug pour obtenir la trace de pile et contactez Sun. + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = compilation d'un sch\u00e9ma... + +Driver.FailedToGenerateCode = Echec de la production du code. + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = Ce fichier a \u00e9t\u00e9 g\u00e9n\u00e9r\u00e9 par l''impl\u00e9mentation de r\u00e9f\u00e9rence JavaTM Architecture for XML Binding (JAXB), v2.2.7-b63 \nVoir http://java.sun.com/xml/jaxb \nToute modification apport\u00e9e \u00e0 ce fichier sera perdue lors de la recompilation du sch\u00e9ma source. \nG\u00e9n\u00e9r\u00e9 le : {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = version compl\u00e8te xjc "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : i file generati andranno in questa directory\n\ \ -p : specifica il package di destinazione\n\ \ -httpproxy : imposta il proxy HTTP/HTTPS. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile : funziona come -httpproxy ma prende l'argomento da un file per proteggere la password \n\ \ -classpath : specifica dove trovare i file delle classi utente\n\ \ -catalog : specifica i file di catalogo per risolvere i riferimenti a entit\u00e0 esterne\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ supporta il formato di catalogo XML TR9401, XCatalog e OASIS.\n\ \ -readOnly : i file generati saranno in modalit\u00e0 di sola lettura\n\ \ -npa : elimina la generazione delle annotazioni a livello di package (**/package-info.java)\n\ \ -no-header : elimina la generazione di un'intestazione di file con indicatore orario\n\ \ -target (2.0|2.1) : funziona come XJC 2.0 o 2.1 e genera del codice che non usa alcuna funzione 2.2.\n\ \ -encoding : specifica la codifica di caratteri per i file di origine generati\n\ \ -enableIntrospection : abilita la generazione di getter/setter booleani per abilitare le API di introspezione dei bean \n\ \ -contentForWildcard : genera la propriet\u00e0 di contenuto per i tipi con pi\u00f9 elementi derivati xs:any \n\ \ -xmlschema : tratta l'input come schema XML W3C (valore predefinito)\n\ \ -relaxng : tratta l'input come NG RELAX (sperimentale, non supportato)\n\ \ -relaxng-compact : tratta l'input come sintassi compatta NG RELAX (sperimentale, non supportato)\n\ \ -dtd : tratta l'input come DTD XML (sperimentale, non supportato)\n\ \ -wsdl : tratta l'input come WSDL e compila gli schemi al suo interno (sperimentale, non supportato)\n\ \ -verbose : be extra verbose\n\ \ -quiet : elimina l'output del compilatore\n\ \ -help : visualizza questo messaggio della Guida\n\ \ -version : visualizza le informazioni sulla versione\n\ \ -fullversion : visualizza le informazioni sulla versione completa\n +Driver.AddonUsage = \nEstensioni: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = Si sta tentando di compilare {0}? Il supporto per {0} \u00e8 sperimentale. \u00c8 possibile abilitarlo usando l''opzione {1}. + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = impossibile scrivere su una directory non esistente "{0}" + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = operando mancante nell'opzione -mode + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = operando mancante + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = operando mancante nell'opzione -host \noppure \u00e8 stato specificato -port ma non -host + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = operando mancante nell'opzione -port \noppure \u00e8 stato specificato -host ma non -port + +Driver.ILLEGAL_TARGET_VERSION = "{0}" non \u00e8 una versione di destinazione valida. Sono supportate le versioni "2.0" e "2.1". + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = operando mancante nell'opzione -httpproxyfile + +Driver.NO_SUCH_FILE = Nessun file di questo tipo: {0} + +Driver.ILLEGAL_PROXY = "{0}" non \u00e8 un formato proxy valido. Il formato \u00e8 [user[:password]@]proxyHost:proxyPort + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = modalit\u00e0 non riconosciuta {0} + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = parametro non riconosciuto {0} + +Driver.UnsupportedEncoding = codifica non supportata: {0} + +Driver.MissingGrammar = grammatica non specificata + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = non \u00e8 un file di associazione esterno. L''elemento radice deve essere ''{''http://java.sun.com/xml/ns/jaxb''}''bindings ma \u00e8 ''{''{0}''}''{1} + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = analisi di uno schema in corso... + +Driver.ParseFailed = Analisi di uno schema non riuscita. + +Driver.StackOverflow = Overflow dello stack. Si sta compilando uno schema grande che richiede pi\u00f9 risorse oppure XJC contiene un bug. Per prima cosa, estendere la dimensione dello stack usando l'opzione -Xss JVM. Se questo non risolve il problema, usare l'opzione -debug per ottenere lo stack trace e contattare Sun. + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = compilazione di uno schema in corso... + +Driver.FailedToGenerateCode = Produzione del codice non riuscita. + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = Questo file \u00e8 stato generato dall''architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.7-b63 \nVedere http://java.sun.com/xml/jaxb \nQualsiasi modifica a questo file andr\u00e0 persa durante la ricompilazione dello schema di origine. \nGenerato il: {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = versione completa xjc "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u9077\u79fb\u3057\u307e\u3059\n\ \ -p : \u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -httpproxy : HTTP/HTTPS\u30d7\u30ed\u30ad\u30b7\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059\n\ \ -httpproxyfile : -httpproxy\u306e\u3088\u3046\u306b\u6a5f\u80fd\u3057\u307e\u3059\u304c\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4fdd\u8b77\u3059\u308b\u305f\u3081\u306b\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u5f15\u6570\u3092\u53d6\u308a\u307e\u3059\n\ \ -classpath : \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u691c\u7d22\u3059\u308b\u4f4d\u7f6e\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -catalog : \u5916\u90e8\u30a8\u30f3\u30c6\u30a3\u30c6\u30a3\u53c2\u7167\u3092\u89e3\u6c7a\u3059\u308b\u305f\u3081\u306b\u3001\u30ab\u30bf\u30ed\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401\u3001XCatalog\u304a\u3088\u3073OASIS XML Catalog\u5f62\u5f0f\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u307e\u3059\u3002\n\ \ -readOnly : \u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u306f\u8aad\u53d6\u308a\u5c02\u7528\u30e2\u30fc\u30c9\u306b\u306a\u308a\u307e\u3059\n\ \ -npa : \u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ec\u30d9\u30eb\u6ce8\u91c8(**/package-info.java)\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -no-header : \u30bf\u30a4\u30e0\u30b9\u30bf\u30f3\u30d7\u4ed8\u304d\u306e\u30d5\u30a1\u30a4\u30eb\u30fb\u30d8\u30c3\u30c0\u30fc\u306e\u751f\u6210\u3092\u6291\u5236\u3057\u307e\u3059\n\ \ -target (2.0|2.1) : XJC 2.0\u307e\u305f\u306f2.1\u306e\u3088\u3046\u306b\u52d5\u4f5c\u3057\u30012.2\u306e\u6a5f\u80fd\u3092\u4f7f\u7528\u3057\u306a\u3044\u30b3\u30fc\u30c9\u3092\u751f\u6210\u3057\u307e\u3059\u3002\n\ \ -encoding : \u751f\u6210\u3055\u308c\u305f\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u6587\u5b57\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3092\u6307\u5b9a\u3057\u307e\u3059\n\ \ -enableIntrospection : Boolean getters/setters\u3092\u6b63\u3057\u304f\u751f\u6210\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u3066\u3001Bean Introspection apis\u3092\u6709\u52b9\u306b\u3057\u307e\u3059 \n\ \ -contentForWildcard : \u8907\u6570\u306exs:any\u5c0e\u51fa\u8981\u7d20\u3092\u6301\u3064\u30bf\u30a4\u30d7\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u30fb\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u751f\u6210\u3057\u307e\u3059\n\ \ -xmlschema : \u5165\u529b\u3092W3C XML\u30b9\u30ad\u30fc\u30de\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n\ \ -relaxng : \u5165\u529b\u3092RELAX NG\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -relaxng-compact : \u5165\u529b\u3092RELAX NG\u306e\u7c21\u5358\u306a\u69cb\u6587\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -dtd : \u5165\u529b\u3092XML DTD\u3068\u3057\u3066\u51e6\u7406\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -wsdl : \u5165\u529b\u3092WSDL\u3068\u3057\u3066\u51e6\u7406\u3057\u3001\u305d\u306e\u5185\u90e8\u306e\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u307e\u3059(\u8a66\u9a13\u7684\u3001\u30b5\u30dd\u30fc\u30c8\u306a\u3057)\n\ \ -verbose : \u5197\u9577\u306b\u306a\u308a\u307e\u3059\n\ \ -quiet : \u30b3\u30f3\u30d1\u30a4\u30e9\u51fa\u529b\u3092\u975e\u8868\u793a\u306b\u3057\u307e\u3059\n\ \ -help : \u3053\u306e\u30d8\u30eb\u30d7\u30fb\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u307e\u3059\n\ \ -version : \u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n\ \ -fullversion : \u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3092\u8868\u793a\u3057\u307e\u3059\n +Driver.AddonUsage = \n\u62e1\u5f35: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = {0}\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\u304b\u3002{0}\u306e\u30b5\u30dd\u30fc\u30c8\u306f\u8a66\u9a13\u7684\u3067\u3059\u3002{1}\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u6709\u52b9\u306b\u3067\u304d\u307e\u3059\u3002 + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = \u5b58\u5728\u3057\u306a\u3044\u30c7\u30a3\u30ec\u30af\u30c8\u30ea"{0}"\u306b\u66f8\u304d\u8fbc\u3081\u307e\u305b\u3093 + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = -mode\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093 + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = \u30aa\u30da\u30e9\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093 + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = -host\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u306a\u3044\u304b\u3001\n-host\u3067\u306f\u306a\u304f-port\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = -port\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u306a\u3044\u304b\u3001\n-port\u3067\u306f\u306a\u304f-host\u304c\u6307\u5b9a\u3055\u308c\u307e\u3057\u305f + +Driver.ILLEGAL_TARGET_VERSION = "{0}"\u306f\u6709\u52b9\u306a\u30bf\u30fc\u30b2\u30c3\u30c8\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002"2.0"\u304a\u3088\u3073"2.1"\u304c\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002 + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = -httpproxyfile\u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u30aa\u30da\u30e9\u30f3\u30c9\u304c\u3042\u308a\u307e\u305b\u3093 + +Driver.NO_SUCH_FILE = \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u306f\u3042\u308a\u307e\u305b\u3093: {0} + +Driver.ILLEGAL_PROXY = "{0}"\u306f\u6709\u52b9\u306a\u30d7\u30ed\u30ad\u30b7\u306e\u5f62\u5f0f\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u5f62\u5f0f\u306f[user[:password]@]proxyHost:proxyPort\u3067\u3059 + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = \u30e2\u30fc\u30c9{0}\u3092\u8a8d\u8b58\u3067\u304d\u307e\u305b\u3093 + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = \u30d1\u30e9\u30e1\u30fc\u30bf{0}\u3092\u8a8d\u8b58\u3067\u304d\u307e\u305b\u3093 + +Driver.UnsupportedEncoding = \u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0: {0} + +Driver.MissingGrammar = \u69cb\u6587\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093 + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = \u5916\u90e8\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0\u30fb\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30eb\u30fc\u30c8\u8981\u7d20\u306f''{''http://java.sun.com/xml/ns/jaxb''}''bindings\u3067\u3042\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001''{''{0}''}''{1}\u3067\u3059 + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u89e3\u6790\u4e2d... + +Driver.ParseFailed = \u30b9\u30ad\u30fc\u30de\u306e\u89e3\u6790\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 + +Driver.StackOverflow = \u30b9\u30bf\u30c3\u30af\u30fb\u30aa\u30fc\u30d0\u30fc\u30d5\u30ed\u30fc\u3067\u3059\u3002\u3055\u3089\u306b\u30ea\u30bd\u30fc\u30b9\u304c\u5fc5\u8981\u306a\u5927\u304d\u3044\u30b9\u30ad\u30fc\u30de\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u308b\u304b\u3001XJC\u306b\u30d0\u30b0\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305a\u3001-Xss JVM\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30b5\u30a4\u30ba\u3092\u62e1\u5f35\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u3053\u308c\u3067\u554f\u984c\u304c\u89e3\u6c7a\u3057\u306a\u3044\u5834\u5408\u306f\u3001-debug\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u3066\u30b9\u30bf\u30c3\u30af\u30fb\u30c8\u30ec\u30fc\u30b9\u3092\u53d6\u5f97\u3057\u3001\u3054\u8cfc\u5165\u5148\u306b\u9023\u7d61\u3057\u3066\u304f\u3060\u3055\u3044\u3002 + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = \u30b9\u30ad\u30fc\u30de\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u4e2d... + +Driver.FailedToGenerateCode = \u30b3\u30fc\u30c9\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3001JavaTM Architecture for XML Binding(JAXB) Reference Implementation\u3001v2.2.7-b63\u306b\u3088\u3063\u3066\u751f\u6210\u3055\u308c\u307e\u3057\u305f \nhttp://java.sun.com/xml/jaxb\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044 \n\u30bd\u30fc\u30b9\u30fb\u30b9\u30ad\u30fc\u30de\u306e\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4\u306f\u5931\u308f\u308c\u307e\u3059\u3002 \n\u751f\u6210\u65e5: {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = xjc\u30d5\u30eb\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3"2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc774 \ub514\ub809\ud1a0\ub9ac\uc5d0 \uc800\uc7a5\ub429\ub2c8\ub2e4.\n\ \ -p : \ub300\uc0c1 \ud328\ud0a4\uc9c0\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -httpproxy : HTTP/HTTPS \ud504\ub85d\uc2dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4.\n\ \ -httpproxyfile : -httpproxy\uc640 \ub3d9\uc77c\ud558\uac8c \uc791\ub3d9\ud558\uc9c0\ub9cc \ube44\ubc00\ubc88\ud638\ub97c \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ud30c\uc77c\uc5d0 \uc778\uc218\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. \n\ \ -classpath : \uc0ac\uc6a9\uc790 \ud074\ub798\uc2a4 \ud30c\uc77c\uc744 \ucc3e\uc744 \uc704\uce58\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -catalog : \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub97c \ubd84\uc11d\ud560 \uce74\ud0c8\ub85c\uadf8 \ud30c\uc77c\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ TR9401, XCatalog \ubc0f OASIS XML \uce74\ud0c8\ub85c\uadf8 \ud615\uc2dd\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n\ \ -readOnly : \uc0dd\uc131\ub41c \ud30c\uc77c\uc774 \uc77d\uae30 \uc804\uc6a9 \ubaa8\ub4dc\ub85c \uc124\uc815\ub429\ub2c8\ub2e4.\n\ \ -npa : \ud328\ud0a4\uc9c0 \ub808\ubca8 \uc8fc\uc11d(**/package-info.java)\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -no-header : \uc2dc\uac04 \uae30\ub85d\uc744 \ud3ec\ud568\ud558\ub294 \ud30c\uc77c \uba38\ub9ac\uae00\uc774 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub3c4\ub85d \ud569\ub2c8\ub2e4.\n\ \ -target (2.0|2.1) : XJC 2.0 \ub610\ub294 2.1\ucc98\ub7fc \uc791\ub3d9\ud558\uba70 2.2 \uae30\ub2a5\uc744 \uc0ac\uc6a9\ud558\uc9c0 \uc54a\ub294 \ucf54\ub4dc\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\ \ -encoding : \uc0dd\uc131\ub41c \uc18c\uc2a4 \ud30c\uc77c\uc5d0 \ub300\ud55c \ubb38\uc790 \uc778\ucf54\ub529\uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.\n\ \ -enableIntrospection : \ubd80\uc6b8 getter/setter\uac00 \uc62c\ubc14\ub974\uac8c \uc0dd\uc131\ub418\ub3c4\ub85d \ud558\uc5ec Bean \uac80\uc0ac API\ub97c \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4. \n\ \ -contentForWildcard : xs:any \ud30c\uc0dd \uc694\uc18c\uac00 \uc5ec\ub7ec \uac1c\uc778 \uc720\ud615\uc5d0 \ub300\ud574 \ucf58\ud150\uce20 \uc18d\uc131\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \n\ \ -xmlschema : \uc785\ub825\uac12\uc744 W3C XML \uc2a4\ud0a4\ub9c8\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uae30\ubcf8\uac12).\n\ \ -relaxng : \uc785\ub825\uac12\uc744 RELAX NG\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -relaxng-compact : \uc785\ub825\uac12\uc744 RELAX NG \uc555\ucd95 \uad6c\ubb38\uc73c\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -dtd : \uc785\ub825\uac12\uc744 XML DTD\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -wsdl : \uc785\ub825\uac12\uc744 WSDL\ub85c \ucc98\ub9ac\ud558\uace0 \ud3ec\ud568\ub41c \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud569\ub2c8\ub2e4(\uc2e4\ud5d8 \ub2e8\uacc4, \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc74c).\n\ \ -verbose : \ucd94\uac00 \uc138\ubd80 \uc815\ubcf4 \ud45c\uc2dc \ubaa8\ub4dc\uc785\ub2c8\ub2e4.\n\ \ -quiet : \ucef4\ud30c\uc77c\ub7ec \ucd9c\ub825\uc744 \ud45c\uc2dc\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.\n\ \ -help : \uc774 \ub3c4\uc6c0\ub9d0 \uba54\uc2dc\uc9c0\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ \ -version : \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\ \ -fullversion : \uc815\uc2dd \ubc84\uc804 \uc815\ubcf4\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n +Driver.AddonUsage = \n\ud655\uc7a5: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = {0} \ucef4\ud30c\uc77c\uc744 \uc2dc\ub3c4\ud558\uace0 \uc788\uc2b5\ub2c8\uae4c? {0}\uc5d0 \ub300\ud55c \uc9c0\uc6d0\uc740 \uc2e4\ud5d8 \ub2e8\uacc4\uc785\ub2c8\ub2e4. {1} \uc635\uc158\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc73c\ub85c \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = \uc874\uc7ac\ud558\uc9c0 \uc54a\ub294 \ub514\ub809\ud1a0\ub9ac "{0}"\uc5d0 \uc4f8 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = -mode \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = -host \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uac70\ub098 \n-port\uac00 \uc9c0\uc815\ub418\uc5c8\uc9c0\ub9cc -host\uac00 \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = -port \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uac70\ub098 \n-host\uac00 \uc9c0\uc815\ub418\uc5c8\uc9c0\ub9cc -port\uac00 \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. + +Driver.ILLEGAL_TARGET_VERSION = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ub300\uc0c1 \ubc84\uc804\uc774 \uc544\ub2d9\ub2c8\ub2e4. "2.0" \ubc0f "2.1"\uc774 \uc9c0\uc6d0\ub429\ub2c8\ub2e4. + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = -httpproxyfile \uc635\uc158\uc5d0 \ud53c\uc5f0\uc0b0\uc790\uac00 \ub204\ub77d\ub418\uc5c8\uc2b5\ub2c8\ub2e4. + +Driver.NO_SUCH_FILE = \ud574\ub2f9 \ud30c\uc77c \uc5c6\uc74c: {0} + +Driver.ILLEGAL_PROXY = "{0}"\uc740(\ub294) \uc801\ud569\ud55c \ud504\ub85d\uc2dc \ud615\uc2dd\uc774 \uc544\ub2d9\ub2c8\ub2e4. \ud615\uc2dd\uc740 [user[:password]@]proxyHost:proxyPort\uc785\ub2c8\ub2e4. + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = {0}\uc740(\ub294) \uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ubaa8\ub4dc\uc785\ub2c8\ub2e4. + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = {0}\uc740(\ub294) \uc778\uc2dd\ud560 \uc218 \uc5c6\ub294 \ub9e4\uac1c\ubcc0\uc218\uc785\ub2c8\ub2e4. + +Driver.UnsupportedEncoding = \uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529: {0} + +Driver.MissingGrammar = \ubb38\ubc95\uc774 \uc9c0\uc815\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4. + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = \uc678\ubd80 \ubc14\uc778\ub529 \ud30c\uc77c\uc774 \uc544\ub2d9\ub2c8\ub2e4. \ub8e8\ud2b8 \uc694\uc18c\ub294 ''{''http://java.sun.com/xml/ns/jaxb''}''bindings\uc5ec\uc57c \ud558\uc9c0\ub9cc ''{''{0}''}''{1}\uc785\ub2c8\ub2e4. + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = \uc2a4\ud0a4\ub9c8\uc758 \uad6c\ubb38\uc744 \ubd84\uc11d\ud558\ub294 \uc911... + +Driver.ParseFailed = \uc2a4\ud0a4\ub9c8 \uad6c\ubb38 \ubd84\uc11d\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. + +Driver.StackOverflow = \uc2a4\ud0dd \uc624\ubc84\ud50c\ub85c\uc6b0\uc785\ub2c8\ub2e4. \ub354 \ub9ce\uc740 \ub9ac\uc18c\uc2a4\uac00 \ud544\uc694\ud55c \ud070 \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\uace0 \uc788\uac70\ub098 XJC\uc5d0 \ubc84\uadf8\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uba3c\uc800 -Xss JVM \uc635\uc158\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc2a4\ud0dd \ud06c\uae30\ub97c \ub298\ub9ac\uc2ed\uc2dc\uc624. \uc774\ub97c \ud1b5\ud574 \ubb38\uc81c\uac00 \ud574\uacb0\ub418\uc9c0 \uc54a\uc73c\uba74 -debug \uc635\uc158\uc744 \ud1b5\ud574 \uc2a4\ud0dd \ucd94\uc801\uc744 \uc5bb\uc5b4 Sun\uc5d0 \ubb38\uc758\ud558\uc2ed\uc2dc\uc624. + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = \uc2a4\ud0a4\ub9c8\ub97c \ucef4\ud30c\uc77c\ud558\ub294 \uc911... + +Driver.FailedToGenerateCode = \ucf54\ub4dc \uc0dd\uc131\uc744 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = \uc774 \ud30c\uc77c\uc740 JAXB(JavaTM Architecture for XML Binding) \ucc38\uc870 \uad6c\ud604 2.2.7-b63 \ubc84\uc804\uc744 \ud1b5\ud574 \uc0dd\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \nhttp://java.sun.com/xml/jaxb\ub97c \ucc38\uc870\ud558\uc2ed\uc2dc\uc624. \n\uc774 \ud30c\uc77c\uc744 \uc218\uc815\ud558\uba74 \uc18c\uc2a4 \uc2a4\ud0a4\ub9c8\ub97c \uc7ac\ucef4\ud30c\uc77c\ud560 \ub54c \uc218\uc815 \uc0ac\ud56d\uc774 \uc190\uc2e4\ub429\ub2c8\ub2e4. \n\uc0dd\uc131 \ub0a0\uc9dc: {0} \n + +Driver.Version = XJC 2.2.7-b63 + +Driver.FullVersion = XJC \uc815\uc2dd \ubc84\uc804 "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : os arquivos gerados ficar\u00e3o neste diret\u00f3rio\n\\ \\ -p : especifica o pacote do alvo\n\\ \\ -httpproxy : definir proxy HTTP/HTTPS. O formato \u00e9 [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile : Funciona como -httpproxy, mas usa o argumento em um arquivo para proteger a senha \n\\ \\ -classpath : especifica onde localizar os arquivos de classe do usu\u00e1rio\n\\ \\ -catalog : especifica arquivos do cat\u00e1logo para resolver refer\u00eancias da entidade externa\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ suporta TR9401, formato de XCatalog e do Cat\u00e1logo XML do OASIS.\n\\ \\ -readOnly : os arquivos gerados ficar\u00e3o no modo somente leitura\n\\ \\ -npa : suprime a gera\u00e7\u00e3o de anota\u00e7\u00f5es do n\u00edvel do pacote (**/package-info.java)\n\\ \\ -no-header : suprime a gera\u00e7\u00e3o de um cabe\u00e7alho do arquivo com timestamp\n\\ \\ -target (2.0|2.1) : atua como XJC 2.0 ou 2.1 e gera c\u00f3digo que n\u00e3o usa nenhum recurso 2.2.\n\\ \\ -encoding : especifica codifica\u00e7\u00e3o de caracteres para arquivos de origem gerados\n\\ \\ -enableIntrospection : ativa a gera\u00e7\u00e3o correta de getters/setters Boolianos para ativar apis de Introspec\u00e7\u00e3o de Bean \n\\ \\ -contentForWildcard : gera a propriedade do conte\u00fado dos tipos com v\u00e1rios xs:todos elementos derivados \n\\ \\ -xmlschema : trata a sa\u00edda como Esquema XML de W3C (default)\n\\ \\ -relaxng : trata a entrada como RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -relaxng-compact : trata a entrada como sintaxe compacta RELAX NG (experimental, n\u00e3o suportada)\n\\ \\ -dtd : trata a entrada como XML DTD (experimental,n\u00e3o suportada)\n\\ \\ -wsdl : trata a entrada como WSDL e compila esquemas dentro dela (experimental,n\u00e3o suportada)\n\\ \\ -verbose : verbose extra\n\\ \\ -quiet : suprime a sa\u00edda do compilador\n\\ \\ -help : exibe esta mensagem de ajuda\n\\ \\ -version : exibe informa\u00e7\u00f5es da vers\u00e3o\n\\ \\ -fullversion : exibe informa\u00e7\u00f5es da vers\u00e3o completa\n +Driver.AddonUsage = \nExtens\u00f5es: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = Voc\u00ea est\u00e1 tentando compilar {0}? O suporte para {0} \u00e9 experimental. Voc\u00ea pode ativ\u00e1-lo usando a op\u00e7\u00e3o {1}. + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = n\u00e3o pode gravar em um diret\u00f3rio "{0}" n\u00e3o existente + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = a op\u00e7\u00e3o -mode n\u00e3o encontrou um operando + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = est\u00e1 faltando um operando + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = a op\u00e7\u00e3o -host n\u00e3o encontrou um operando \nou -port foi especificado, mas n\u00e3o -host + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = a op\u00e7\u00e3o -port n\u00e3o encontrou um operando \nou -host foi especificado, mas n\u00e3o -port + +Driver.ILLEGAL_TARGET_VERSION = "{0}" n\u00e3o \u00e9 uma vers\u00e3o do alvo v\u00e1lida. "2.0" e "2.1" s\u00e3o suportadas. + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = a op\u00e7\u00e3o -httpproxyfile n\u00e3o encontrou um operando + +Driver.NO_SUCH_FILE = O arquivo {0} n\u00e3o existe + +Driver.ILLEGAL_PROXY = "{0}" n\u00e3o \u00e9 um formato de proxy v\u00e1lido. O formato \u00e9 [user[:password]@]proxyHost:proxyPort + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = modo n\u00e3o reconhecido {0} + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = par\u00e2metro {0} n\u00e3o reconhecido + +Driver.UnsupportedEncoding = codifica\u00e7\u00e3o n\u00e3o suportada: {0} + +Driver.MissingGrammar = gram\u00e1tica n\u00e3o especificada + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = n\u00e3o \u00e9 um arquivo de bind externo. O elemento-raiz deve ser "{http://java.sun.com/xml/ns/jaxb}"bindings, mas \u00e9 "{{0}}"{1} + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = fazendo parse de um esquema... + +Driver.ParseFailed = Falha ao fazer parse de um esquema. + +Driver.StackOverflow = Sobrecarga de pilha. Voc\u00ea est\u00e1 compilando um esquema maior que exige mais recursos ou o XJC tem um erro. Primeiro, aumente o tamanho da pilha usando a op\u00e7\u00e3o -Xss da JVM. Se isso n\u00e3o resolver o problema, use a op\u00e7\u00e3o -debug para obter o rastreamento da pilha e contate a Sun. + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = compilando um esquema... + +Driver.FailedToGenerateCode = Falha ao produzir o c\u00f3digo. + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = Este arquivo foi gerado pela Arquitetura JavaTM para Implementa\u00e7\u00e3o de Refer\u00eancia (JAXB) de Bind XML, v2.2.7-b63 \nConsulte http://java.sun.com/xml/jaxb \nTodas as modifica\u00e7\u00f5es neste arquivo ser\u00e3o perdidas ap\u00f3s a recompila\u00e7\u00e3o do esquema de origem. \nGerado em: {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = vers\u00e3o completa de xjc "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u653e\u5165\u6b64\u76ee\u5f55\u4e2d\n\ \ -p : \u6307\u5b9a\u76ee\u6807\u7a0b\u5e8f\u5305\n\ \ -httpproxy : \u8bbe\u7f6e HTTP/HTTPS \u4ee3\u7406\u3002\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort\n\ \ -httpproxyfile : \u4f5c\u7528\u4e0e -httpproxy \u7c7b\u4f3c, \u4f46\u5728\u6587\u4ef6\u4e2d\u91c7\u7528\u53c2\u6570\u6765\u4fdd\u62a4\u53e3\u4ee4\n\ \ -classpath : \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n\ \ -catalog : \u6307\u5b9a\u7528\u4e8e\u89e3\u6790\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u7684\u76ee\u5f55\u6587\u4ef6\n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \u652f\u6301 TR9401, XCatalog \u548c OASIS XML \u76ee\u5f55\u683c\u5f0f\u3002\n\ \ -readOnly : \u751f\u6210\u7684\u6587\u4ef6\u5c06\u5904\u4e8e\u53ea\u8bfb\u6a21\u5f0f\n\ \ -npa : \u7981\u6b62\u751f\u6210\u7a0b\u5e8f\u5305\u7ea7\u522b\u6ce8\u91ca (**/package-info.java)\n\ \ -no-header : \u7981\u6b62\u751f\u6210\u5e26\u6709\u65f6\u95f4\u6233\u7684\u6587\u4ef6\u5934\n\ \ -target (2.0|2.1) : \u884c\u4e3a\u4e0e XJC 2.0 \u6216 2.1 \u7c7b\u4f3c, \u7528\u4e8e\u751f\u6210\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u4ee3\u7801\u3002\n\ \ -encoding : \u4e3a\u751f\u6210\u7684\u6e90\u6587\u4ef6\u6307\u5b9a\u5b57\u7b26\u7f16\u7801\n\ \ -enableIntrospection : \u7528\u4e8e\u6b63\u786e\u751f\u6210\u5e03\u5c14\u578b getter/setter \u4ee5\u542f\u7528 Bean \u81ea\u6d4b apis \n\ \ -contentForWildcard : \u4e3a\u5177\u6709\u591a\u4e2a xs:any \u6d3e\u751f\u5143\u7d20\u7684\u7c7b\u578b\u751f\u6210\u5185\u5bb9\u5c5e\u6027\n\ \ -xmlschema : \u91c7\u7528 W3C XML \u6a21\u5f0f\u5904\u7406\u8f93\u5165 (\u9ed8\u8ba4\u503c)\n\ \ -relaxng : \u91c7\u7528 RELAX NG \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -relaxng-compact : \u91c7\u7528 RELAX NG \u7b80\u6d01\u8bed\u6cd5\u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -dtd : \u91c7\u7528 XML DTD \u5904\u7406\u8f93\u5165 (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -wsdl : \u91c7\u7528 WSDL \u5904\u7406\u8f93\u5165\u5e76\u7f16\u8bd1\u5176\u4e2d\u7684\u6a21\u5f0f (\u5b9e\u9a8c\u6027\u7684, \u4e0d\u652f\u6301)\n\ \ -verbose : \u7279\u522b\u8be6\u7ec6\n\ \ -quiet : \u9690\u85cf\u7f16\u8bd1\u5668\u8f93\u51fa\n\ \ -help : \u663e\u793a\u6b64\u5e2e\u52a9\u6d88\u606f\n\ \ -version : \u663e\u793a\u7248\u672c\u4fe1\u606f\n\ \ -fullversion : \u663e\u793a\u5b8c\u6574\u7684\u7248\u672c\u4fe1\u606f\n +Driver.AddonUsage = \n\u6269\u5c55: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = \u662f\u5426\u8981\u5c1d\u8bd5\u7f16\u8bd1{0}? \u5bf9{0}\u7684\u652f\u6301\u662f\u5b9e\u9a8c\u6027\u7684\u3002\u53ef\u901a\u8fc7\u4f7f\u7528{1}\u9009\u9879\u542f\u7528\u5b83\u3002 + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = \u62d2\u7edd\u5199\u5165\u4e0d\u5b58\u5728\u7684\u76ee\u5f55 "{0}" + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = -mode \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570 + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = \u7f3a\u5c11\u64cd\u4f5c\u6570 + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = -host \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570\n\u6216\u8005\u6307\u5b9a\u4e86 -port \u4f46\u672a\u6307\u5b9a -host + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = -port \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570\n\u6216\u8005\u6307\u5b9a\u4e86 -host \u4f46\u672a\u6307\u5b9a -port + +Driver.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6807\u7248\u672c\u3002\u652f\u6301 "2.0" \u548c "2.1"\u3002 + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = -httpproxyfile \u9009\u9879\u7f3a\u5c11\u64cd\u4f5c\u6570 + +Driver.NO_SUCH_FILE = \u6ca1\u6709\u8fd9\u79cd\u6587\u4ef6: {0} + +Driver.ILLEGAL_PROXY = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u4ee3\u7406\u683c\u5f0f\u3002\u6709\u6548\u683c\u5f0f\u4e3a [user[:password]@]proxyHost:proxyPort + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = \u65e0\u6cd5\u8bc6\u522b\u7684\u6a21\u5f0f{0} + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = \u65e0\u6cd5\u8bc6\u522b\u7684\u53c2\u6570{0} + +Driver.UnsupportedEncoding = \u4e0d\u652f\u6301\u7684\u7f16\u7801: {0} + +Driver.MissingGrammar = \u672a\u6307\u5b9a\u8bed\u6cd5 + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = \u4e0d\u662f\u5916\u90e8\u7ed1\u5b9a\u6587\u4ef6\u3002\u6839\u5143\u7d20\u5fc5\u987b\u4e3a ''{''http://java.sun.com/xml/ns/jaxb''}'' \u7ed1\u5b9a, \u4f46\u5b9e\u9645\u4e3a ''{''{0}''}''{1} + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = \u6b63\u5728\u89e3\u6790\u6a21\u5f0f... + +Driver.ParseFailed = \u65e0\u6cd5\u89e3\u6790\u6a21\u5f0f\u3002 + +Driver.StackOverflow = \u5806\u6808\u6ea2\u51fa\u3002\u60a8\u6b63\u5728\u7f16\u8bd1\u9700\u8981\u5360\u7528\u8bb8\u591a\u8d44\u6e90\u7684\u5927\u578b\u6a21\u5f0f, \u6216\u8005 XJC \u5b58\u5728 Bug\u3002\u9996\u5148, \u8bf7\u4f7f\u7528 -Xss JVM \u9009\u9879\u6269\u5c55\u5806\u6808\u5927\u5c0f\u3002\u5982\u679c\u8fd9\u672a\u89e3\u51b3\u95ee\u9898, \u8bf7\u4f7f\u7528 -debug \u9009\u9879\u83b7\u53d6\u5806\u6808\u8ddf\u8e2a\u5e76\u4e0e Sun \u8054\u7cfb\u3002 + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = \u6b63\u5728\u7f16\u8bd1\u6a21\u5f0f... + +Driver.FailedToGenerateCode = \u65e0\u6cd5\u751f\u6210\u4ee3\u7801\u3002 + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = \u6b64\u6587\u4ef6\u662f\u7531 JavaTM Architecture for XML Binding (JAXB) \u5f15\u7528\u5b9e\u73b0 v2.2.7-b63 \u751f\u6210\u7684\n\u8bf7\u8bbf\u95ee http://java.sun.com/xml/jaxb \n\u5728\u91cd\u65b0\u7f16\u8bd1\u6e90\u6a21\u5f0f\u65f6, \u5bf9\u6b64\u6587\u4ef6\u7684\u6240\u6709\u4fee\u6539\u90fd\u5c06\u4e22\u5931\u3002\n\u751f\u6210\u65f6\u95f4: {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = xjc \u5b8c\u6574\u7248\u672c "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at : \u7522\u751f\u7684\u6a94\u6848\u5c07\u79fb\u81f3\u6b64\u76ee\u9304\n\\ \\ -p : \u6307\u5b9a\u76ee\u6a19\u5957\u88dd\u7a0b\u5f0f\n\\ \\ -httpproxy : \u8a2d\u5b9a HTTP/HTTPS \u4ee3\u7406\u4e3b\u6a5f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort\n\\ \\ -httpproxyfile : \u4f5c\u7528\u5982\u540c -httpproxy, \u4f46\u63a5\u53d7\u6a94\u6848\u4e2d\u7684\u5f15\u6578\u4ee5\u4fdd\u8b77\u5bc6\u78bc \n\\ \\ -classpath : \u6307\u5b9a\u5c0b\u627e\u4f7f\u7528\u8005\u985e\u5225\u6a94\u6848\u7684\u4f4d\u7f6e\n\\ \\ -catalog : \u6307\u5b9a\u89e3\u6790\u5916\u90e8\u5be6\u9ad4\u53c3\u7167\u7684\u76ee\u9304\u6a94\u6848\n\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \u652f\u63f4 TR9401\u3001XCatalog \u4ee5\u53ca OASIS XML \u76ee\u9304\u683c\u5f0f.\n\\ \\ -readOnly : \u7522\u751f\u7684\u6a94\u6848\u5c07\u662f\u552f\u8b80\u6a21\u5f0f\n\\ \\ -npa : \u6291\u5236\u5957\u88dd\u7a0b\u5f0f\u5c64\u6b21\u8a3b\u89e3 (**/package-info.java) \u7684\u7522\u751f\n\\ \\ -no-header : \u6291\u5236\u6a94\u6848\u6a19\u982d\u548c\u6642\u6233\u7684\u7522\u751f\n\\ \\ -target (2.0|2.1) : \u4f5c\u7528\u5982\u540c XJC 2.0 \u6216 2.1, \u4e26\u4e14\u6703\u7522\u751f\u4e0d\u4f7f\u7528\u4efb\u4f55 2.2 \u529f\u80fd\u7684\u7a0b\u5f0f\u78bc.\n\\ \\ -encoding : \u70ba\u7522\u751f\u7684\u4f86\u6e90\u6a94\u6848\u6307\u5b9a\u5b57\u5143\u7de8\u78bc\n\\ \\ -enableIntrospection : \u6b63\u78ba\u7522\u751f\u5e03\u6797\u503c getter/setter \u4ee5\u555f\u7528 Bean \u81ea\u6211\u6aa2\u67e5 api \n\\ \\ -contentForWildcard : \u70ba\u542b\u6709\u591a\u500b xs:any \u884d\u751f\u4e4b\u5143\u7d20\u7684\u985e\u578b\u7522\u751f\u5167\u5bb9\u7279\u6027 \n\\ \\ -xmlschema : \u5c07\u8f38\u5165\u8996\u70ba W3C XML \u7db1\u8981 (\u9810\u8a2d\u503c)\n\\ \\ -relaxng : \u5c07\u8f38\u5165\u8996\u70ba RELAX NG (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -relaxng-compact : \u5c07\u8f38\u5165\u8996\u70ba RELAX NG \u7cbe\u7c21\u8a9e\u6cd5 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u4e0d\u652f\u63f4)\n\\ \\ -dtd : \u5c07\u8f38\u5165\u8996\u70ba XML DTD (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -wsdl : \u5c07\u8f38\u5165\u8996\u70ba WSDL, \u4e26\u7de8\u8b6f\u5176\u4e2d\u7684\u7db1\u8981 (\u5be6\u9a57\u6027, \u4e0d\u63d0\u4f9b\u652f\u63f4)\n\\ \\ -verbose : \u63d0\u4f9b\u984d\u5916\u7684\u8a73\u7d30\u8cc7\u8a0a\n\\ \\ -quiet : \u6291\u5236\u7de8\u8b6f\u5668\u8f38\u51fa\n\\ \\ -help : \u986f\u793a\u6b64\u8aaa\u660e\u8a0a\u606f\n\\ \\ -version : \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n\\ \\ -fullversion : \u986f\u793a\u5b8c\u6574\u7248\u672c\u8cc7\u8a0a\n +Driver.AddonUsage = \n\u64f4\u5145\u5957\u4ef6: + +# {0} - one of: DTD, RELAX NG, RELAX NG compact syntax, WSDL; {1} - one of (respectively): -dtd, -relaxng, -relaxng-compact, -wsdl +Driver.ExperimentalLanguageWarning = \u60a8\u6b63\u5728\u5617\u8a66\u7de8\u8b6f {0} \u55ce? \u5c0d {0} \u7684\u652f\u63f4\u662f\u5be6\u9a57\u6027\u7684. \u60a8\u53ef\u4f7f\u7528 {1} \u9078\u9805\u4f86\u555f\u7528. + +# Not concatenated with any other String. Variable: Name of a directory (input argument of the XJC utility). +Driver.NonExistentDir = \u62d2\u7d55\u5beb\u5165\u4e0d\u5b58\u5728\u7684\u76ee\u9304 "{0}" + +# Usage not found. TODO Remove +#Driver.MissingRuntimePackageName = \ +# the -use-runtime option is missing a package name + +# Not concatenated with any other string (written on a separate line). +Driver.MissingModeOperand = -mode \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143 + +# Usage not found. TODO Remove +#Driver.MissingCompatibilityOperand = \ +# the -compatibility option is missing an operand + +# Not concatenated with any other string (written on a separate line). +Driver.MissingOperand = \u907a\u6f0f\u904b\u7b97\u5143 + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyHost = \u53ef\u80fd\u662f -host \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143\n\u6216\u6307\u5b9a\u4e86 -port \u800c\u975e -host + +# Not concatenated with any other string (written on a separate line). +Driver.MissingProxyPort = \u53ef\u80fd\u662f -port \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143\n\u6216\u6307\u5b9a\u4e86 -host \u800c\u975e -port + +Driver.ILLEGAL_TARGET_VERSION = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u76ee\u6a19\u7248\u672c. \u652f\u63f4 "2.0" \u548c "2.1". + +# Not concatenated with any other string (written on a separate line). +Driver.MISSING_PROXYFILE = -httpproxyfile \u9078\u9805\u907a\u6f0f\u904b\u7b97\u5143 + +Driver.NO_SUCH_FILE = \u6c92\u6709\u6b64\u6a94\u6848: {0} + +Driver.ILLEGAL_PROXY = "{0}" \u4e0d\u662f\u6709\u6548\u7684\u4ee3\u7406\u4e3b\u6a5f\u683c\u5f0f. \u683c\u5f0f\u70ba [user[:password]@]proxyHost:proxyPort + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedMode = \u7121\u6cd5\u8fa8\u8b58\u7684\u6a21\u5f0f {0} + +# Not concatenated with any other string (written on a separate line). +Driver.UnrecognizedParameter = \u7121\u6cd5\u8fa8\u8b58\u7684\u53c3\u6578 {0} + +Driver.UnsupportedEncoding = \u4e0d\u652f\u63f4\u7684\u7de8\u78bc: {0} + +Driver.MissingGrammar = \u672a\u6307\u5b9a\u6587\u6cd5 + +# {0} - namespace uri, {1} - local name of the attribute/element e.g.: Unexpected end of attribute {http://www.w3.org/XML/1998/namespace}:lang +Driver.NotABindingFile = \u4e0d\u662f\u5916\u90e8\u9023\u7d50\u6a94. \u6839\u5143\u7d20\u5fc5\u9808\u70ba ''{''http://java.sun.com/xml/ns/jaxb''}''bindings, \u4f46\u5176\u70ba ''{''{0}''}''{1} + +# Not concatenated with any other string (written on a separate line). +Driver.ParsingSchema = \u6b63\u5728\u5256\u6790\u7db1\u8981... + +Driver.ParseFailed = \u7121\u6cd5\u5256\u6790\u7db1\u8981. + +Driver.StackOverflow = \u5806\u758a\u6ea2\u4f4d. \u53ef\u80fd\u662f\u60a8\u6b63\u5728\u7de8\u8b6f\u7684\u5927\u578b\u7db1\u8981\u9700\u8981\u66f4\u591a\u8cc7\u6e90, \u6216\u662f XJC \u6709\u932f\u8aa4. \u9996\u5148, \u8acb\u4f7f\u7528 -Xss JVM \u9078\u9805\u64f4\u5145\u5806\u758a\u5927\u5c0f. \u82e5\u9019\u6a23\u7121\u6cd5\u89e3\u6c7a\u554f\u984c, \u8acb\u4f7f\u7528 -debug \u9078\u9805\u4ee5\u53d6\u5f97\u5806\u758a\u8ffd\u8e64, \u4e26\u8207 Sun \u9023\u7d61. + +# Not concatenated with any other string (written on a separate line). +Driver.CompilingSchema = \u6b63\u5728\u7de8\u8b6f\u7db1\u8981... + +Driver.FailedToGenerateCode = \u7121\u6cd5\u7522\u751f\u7a0b\u5f0f\u78bc. + +# DO NOT localize the 2.2.7-b63 string - it is a token for an ant +Driver.FilePrologComment = \u6b64\u6a94\u6848\u662f\u7531 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7-b63 \u6240\u7522\u751f \n\u8acb\u53c3\u95b1 http://java.sun.com/xml/jaxb \n\u4e00\u65e6\u91cd\u65b0\u7de8\u8b6f\u4f86\u6e90\u7db1\u8981, \u5c0d\u6b64\u6a94\u6848\u6240\u505a\u7684\u4efb\u4f55\u4fee\u6539\u90fd\u5c07\u6703\u907a\u5931. \n\u7522\u751f\u6642\u9593: {0} \n + +Driver.Version = xjc 2.2.7-b63 + +Driver.FullVersion = xjc \u5b8c\u6574\u7248\u672c "2.2.7-b63-b19" + +Driver.BuildID = 2.2.7-b63 + +# for JDK integration - include version in source zip +jaxb.jdk.version=2.2.7-b63 + +# see java.text.SimpleDateFormat for format syntax +# DO NOT LOCALIZE, Format should not be changed, English locale is used to transform this string into a real date. +Driver.DateFormat = yyyy.MM.dd + +# see java.text.SimpleDateFormat for format syntax +# Format should not be changed, English locale is used to transform this string into a real time. Letters can be translated but the user should known that java.text.SimpleDateFormat is responsible for formatting (meaning of symbols can be found at http://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html). +Driver.TimeFormat = hh:mm:ss a z + +# as in: "generated on at

+ * + * @param buf the buffer into which the data is read. + * @param off the start offset of the data. + * @param len the maximum number of bytes read. + * @return the total number of bytes read into the buffer, or + * -1 if there is no more data because the end of + * the stream has been reached. + * @exception IOException if an I/O error occurs. + */ + @Override + public int read(byte[] buf, int off, int len) throws IOException { + // empty out single byte read buffer + int off0 = off; + while (index < bufsize && len > 0) { + buf[off++] = buffer[index++]; + len--; + } + if (index >= bufsize) { + bufsize = index = 0; + } + + int bsize = (len / 3) * 3; // round down to multiple of 3 bytes + if (bsize > 0) { + int size = decode(buf, off, bsize); + off += size; + len -= size; + + if (size != bsize) { // hit EOF? + if (off == off0) { + return -1; + } else { + return off - off0; + } + } + } + + // finish up with a partial read if necessary + for (; len > 0; len--) { + int c = read(); + if (c == -1) { + break; + } + buf[off++] = (byte)c; + } + + if (off == off0) { + return -1; + } else { + return off - off0; + } + } + + /** + * Skips over and discards n bytes of data from this stream. + */ + @Override + public long skip(long n) throws IOException { + long skipped = 0; + while (n-- > 0 && read() >= 0) { + skipped++; + } + return skipped; + } + + /** + * Tests if this input stream supports marks. Currently this class + * does not support marks + */ + @Override + public boolean markSupported() { + return false; // Maybe later .. + } + + /** + * Returns the number of bytes that can be read from this input + * stream without blocking. However, this figure is only + * a close approximation in case the original encoded stream + * contains embedded CRLFs; since the CRLFs are discarded, not decoded + */ + @Override + public int available() throws IOException { + // This is only an estimate, since in.available() + // might include CRLFs too .. + return ((in.available() * 3)/4 + (bufsize-index)); + } + + /** + * This character array provides the character to value map + * based on RFC1521. + */ + private final static char pem_array[] = { + 'A','B','C','D','E','F','G','H', // 0 + 'I','J','K','L','M','N','O','P', // 1 + 'Q','R','S','T','U','V','W','X', // 2 + 'Y','Z','a','b','c','d','e','f', // 3 + 'g','h','i','j','k','l','m','n', // 4 + 'o','p','q','r','s','t','u','v', // 5 + 'w','x','y','z','0','1','2','3', // 6 + '4','5','6','7','8','9','+','/' // 7 + }; + + private final static byte pem_convert_array[] = new byte[256]; + + static { + for (int i = 0; i < 255; i++) { + pem_convert_array[i] = -1; + } + for (int i = 0; i < pem_array.length; i++) { + pem_convert_array[pem_array[i]] = (byte)i; + } + } + + /** + * The decoder algorithm. Most of the complexity here is dealing + * with error cases. Returns the number of bytes decoded, which + * may be zero. Decoding is done by filling an int with 4 6-bit + * values by shifting them in from the bottom and then extracting + * 3 8-bit bytes from the int by shifting them out from the bottom. + * + * @param outbuf the buffer into which to put the decoded bytes + * @param pos position in the buffer to start filling + * @param len the number of bytes to fill + * @return the number of bytes filled, always a multiple + * of three, and may be zero + * @exception IOException if the data is incorrectly formatted + */ + private int decode(byte[] outbuf, int pos, int len) throws IOException { + int pos0 = pos; + while (len >= 3) { + /* + * We need 4 valid base64 characters before we start decoding. + * We skip anything that's not a valid base64 character (usually + * just CRLF). + */ + int got = 0; + int val = 0; + while (got < 4) { + int i = getByte(); + if (i == -1 || i == -2) { + boolean atEOF; + if (i == -1) { + if (got == 0) { + return pos - pos0; + } + if (!ignoreErrors) { + throw new DecodingException( + "BASE64Decoder: Error in encoded stream: " + + "needed 4 valid base64 characters " + + "but only got " + got + " before EOF" + + recentChars()); + } + atEOF = true; // don't read any more + } else { // i == -2 + // found a padding character, we're at EOF + // XXX - should do something to make EOF "sticky" + if (got < 2 && !ignoreErrors) { + throw new DecodingException( + "BASE64Decoder: Error in encoded stream: " + + "needed at least 2 valid base64 characters," + + " but only got " + got + + " before padding character (=)" + + recentChars()); + } + + // didn't get any characters before padding character? + if (got == 0) { + return pos - pos0; + } + atEOF = false; // need to keep reading + } + + // pad partial result with zeroes + + // how many bytes will we produce on output? + // (got always < 4, so size always < 3) + int size = got - 1; + if (size == 0) { + size = 1; + } + + // handle the one padding character we've seen + got++; + val <<= 6; + + while (got < 4) { + if (!atEOF) { + // consume the rest of the padding characters, + // filling with zeroes + i = getByte(); + if (i == -1) { + if (!ignoreErrors) { + throw new DecodingException( + "BASE64Decoder: Error in encoded " + + "stream: hit EOF while looking for " + + "padding characters (=)" + + recentChars()); + } + } else if (i != -2) { + if (!ignoreErrors) { + throw new DecodingException( + "BASE64Decoder: Error in encoded " + + "stream: found valid base64 " + + "character after a padding character " + + "(=)" + recentChars()); + } + } + } + val <<= 6; + got++; + } + + // now pull out however many valid bytes we got + val >>= 8; // always skip first one + if (size == 2) { + outbuf[pos + 1] = (byte)(val & 0xff); + } + val >>= 8; + outbuf[pos] = (byte)(val & 0xff); + // len -= size; // not needed, return below + pos += size; + return pos - pos0; + } else { + // got a valid byte + val <<= 6; + got++; + val |= i; + } + } + + // read 4 valid characters, now extract 3 bytes + outbuf[pos + 2] = (byte)(val & 0xff); + val >>= 8; + outbuf[pos + 1] = (byte)(val & 0xff); + val >>= 8; + outbuf[pos] = (byte)(val & 0xff); + len -= 3; + pos += 3; + } + return pos - pos0; + } + + /** + * Read the next valid byte from the input stream. + * Buffer lots of data from underlying stream in input_buffer, + * for efficiency. + * + * @return the next byte, -1 on EOF, or -2 if next byte is '=' + * (padding at end of encoded data) + */ + private int getByte() throws IOException { + int c; + do { + if (input_pos >= input_len) { + try { + input_len = in.read(input_buffer); + } catch (EOFException ex) { + return -1; + } + if (input_len <= 0) { + return -1; + } + input_pos = 0; + } + // get the next byte in the buffer + c = input_buffer[input_pos++] & 0xff; + // is it a padding byte? + if (c == '=') { + return -2; + } + // no, convert it + c = pem_convert_array[c]; + // loop until we get a legitimate byte + } while (c == -1); + return c; + } + + /** + * Return the most recent characters, for use in an error message. + */ + private String recentChars() { + // reach into the input buffer and extract up to 10 + // recent characters, to help in debugging. + StringBuilder errstr = new StringBuilder(); + int nc = input_pos > 10 ? 10 : input_pos; + if (nc > 0) { + errstr.append(", the ").append(nc).append(" most recent characters were: \""); + for (int k = input_pos - nc; k < input_pos; k++) { + char c = (char)(input_buffer[k] & 0xff); + switch (c) { + case '\r': errstr.append("\\r"); break; + case '\n': errstr.append("\\n"); break; + case '\t': errstr.append("\\t"); break; + default: + if (c >= ' ' && c < 0177) { + errstr.append(c); + } else { + errstr.append("\\").append((int)c); + } + } + } + errstr.append("\""); + } + return errstr.toString(); + } + + /** + * Base64 decode a byte array. No line breaks are allowed. + * This method is suitable for short strings, such as those + * in the IMAP AUTHENTICATE protocol, but not to decode the + * entire content of a MIME part. + * + * NOTE: inbuf may only contain valid base64 characters. + * Whitespace is not ignored. + */ + public static byte[] decode(byte[] inbuf) { + int size = (inbuf.length / 4) * 3; + if (size == 0) { + return inbuf; + } + + if (inbuf[inbuf.length - 1] == '=') { + size--; + if (inbuf[inbuf.length - 2] == '=') { + size--; + } + } + byte[] outbuf = new byte[size]; + + int inpos = 0, outpos = 0; + size = inbuf.length; + while (size > 0) { + int val; + int osize = 3; + val = pem_convert_array[inbuf[inpos++] & 0xff]; + val <<= 6; + val |= pem_convert_array[inbuf[inpos++] & 0xff]; + val <<= 6; + if (inbuf[inpos] != '=') { + val |= pem_convert_array[inbuf[inpos++] & 0xff]; + } else { + osize--; + } + val <<= 6; + if (inbuf[inpos] != '=') { + val |= pem_convert_array[inbuf[inpos++] & 0xff]; + } else { + osize--; + } + if (osize > 2) { + outbuf[outpos + 2] = (byte)(val & 0xff); + } + val >>= 8; + if (osize > 1) { + outbuf[outpos + 1] = (byte)(val & 0xff); + } + val >>= 8; + outbuf[outpos] = (byte)(val & 0xff); + outpos += osize; + size -= 4; + } + return outbuf; + } + + /*** begin TEST program *** + public static void main(String argv[]) throws Exception { + FileInputStream infile = new FileInputStream(argv[0]); + BASE64DecoderStream decoder = new BASE64DecoderStream(infile); + int c; + + while ((c = decoder.read()) != -1) + System.out.print((char)c); + System.out.flush(); + } + *** end TEST program ***/ +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java index b3583a96c6f..068787d4352 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Chunk.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java index 011053780dd..23651aa0432 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/ChunkInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,9 @@ final class ChunkInputStream extends InputStream { @Override public int read(byte b[], int off, int sz) throws IOException { - if(!fetch()) return -1; + if (!fetch()) { + return -1; + } sz = Math.min(sz, len-offset); System.arraycopy(buf,offset,b,off,sz); @@ -60,7 +62,9 @@ final class ChunkInputStream extends InputStream { } public int read() throws IOException { - if(!fetch()) return -1; + if (!fetch()) { + return -1; + } return (buf[offset++] & 0xff); } @@ -88,6 +92,7 @@ final class ChunkInputStream extends InputStream { return true; } + @Override public void close() throws IOException { super.close(); current = null; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java index e787260db55..4235c6911ca 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/CleanUpExecutorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java index 4e805a41279..137a70f756b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Data.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java index c74dc48cb26..49f2c0fd6d7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java index 317e61e8721..826431f6e2b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DataHead.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import java.nio.ByteBuffer; * lazily using a pull parser, so the part may not have all the data. {@link #read} * and {@link #readOnce} may trigger the actual parsing the message. In fact, * parsing of an attachment part may be triggered by calling {@link #read} methods - * on some other attachemnt parts. All this happens behind the scenes so the + * on some other attachment parts. All this happens behind the scenes so the * application developer need not worry about these details. * * @author Jitendra Kotamraju @@ -84,13 +84,18 @@ final class DataHead { } else { try { OutputStream os = new FileOutputStream(f); - InputStream in = readOnce(); - byte[] buf = new byte[8192]; - int len; - while((len=in.read(buf)) != -1) { - os.write(buf, 0, len); + try { + InputStream in = readOnce(); + byte[] buf = new byte[8192]; + int len; + while((len=in.read(buf)) != -1) { + os.write(buf, 0, len); + } + } finally { + if (os != null) { + os.close(); + } } - os.close(); } catch(IOException ioe) { throw new MIMEParsingException(ioe); } @@ -141,6 +146,7 @@ final class DataHead { * * @return true if readOnce() is not called before */ + @SuppressWarnings("ThrowableInitCause") private boolean unconsumed() { if (consumedAt != null) { AssertionError error = new AssertionError("readOnce() is already called before. See the nested exception from where it's called."); @@ -195,7 +201,9 @@ final class DataHead { @Override public int read(byte b[], int off, int sz) throws IOException { - if(!fetch()) return -1; + if (!fetch()) { + return -1; + } sz = Math.min(sz, len-offset); System.arraycopy(buf,offset,b,off,sz); @@ -203,6 +211,7 @@ final class DataHead { return sz; } + @Override public int read() throws IOException { if (!fetch()) { return -1; @@ -244,6 +253,7 @@ final class DataHead { return true; } + @Override public void close() throws IOException { super.close(); current = null; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java new file mode 100644 index 00000000000..6b8feff4bab --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/DecodingException.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* FROM mail.jar */ +package com.sun.xml.internal.org.jvnet.mimepull; + +import java.io.IOException; + +/** + * A special IOException that indicates a failure to decode data due + * to an error in the formatting of the data. This allows applications + * to distinguish decoding errors from other I/O errors. + * + * @author Bill Shannon + */ + +public final class DecodingException extends IOException { + + /** + * Constructor + */ + public DecodingException(String s) { + super(s); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java index 8fd9360d6b4..c9be050debd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FactoryFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,8 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.logging.Level; +import java.util.logging.Logger; class FactoryFinder { @@ -58,26 +60,34 @@ class FactoryFinder { private static String findJarServiceProviderName(String factoryId) { String serviceId = "META-INF/services/" + factoryId; - InputStream is = null; + InputStream is; is = cl.getResourceAsStream(serviceId); if (is == null) { return null; } - BufferedReader rd; + String factoryClassName; + BufferedReader rd = null; try { - rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); - } catch (java.io.UnsupportedEncodingException e) { - rd = new BufferedReader(new InputStreamReader(is)); - } - - String factoryClassName = null; - try { - factoryClassName = rd.readLine(); - rd.close(); - } catch (IOException x) { - return null; + try { + rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); + } catch (java.io.UnsupportedEncodingException e) { + rd = new BufferedReader(new InputStreamReader(is)); + } + try { + factoryClassName = rd.readLine(); + } catch (IOException x) { + return null; + } + } finally { + if (rd != null) { + try { + rd.close(); + } catch (IOException ex) { + Logger.getLogger(FactoryFinder.class.getName()).log(Level.INFO, null, ex); + } + } } return factoryClassName; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java index a6fa88da9dd..3e121eb1507 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FileData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,6 +48,7 @@ final class FileData implements Data { this.length = length; } + @Override public byte[] read() { byte[] buf = new byte[length]; file.read(pointer, buf, 0, length); @@ -57,10 +58,12 @@ final class FileData implements Data { /* * This shouldn't be called */ + @Override public long writeTo(DataFile file) { throw new IllegalStateException(); } + @Override public int size() { return length; } @@ -68,6 +71,7 @@ final class FileData implements Data { /* * Always create FileData */ + @Override public Data createNext(DataHead dataHead, ByteBuffer buf) { return new FileData(file, buf); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java index fea0292287d..60123bdf258 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/FinalArrayList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java index afcb0c55471..606c32de296 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/Header.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java index a3d40a603c7..ca8bb98c849 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/InternetHeaders.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -59,7 +59,7 @@ import java.util.List; */ final class InternetHeaders { - private final FinalArrayList headers = new FinalArrayList(); + private final FinalArrayList headers = new FinalArrayList(); /** * Read and parse the given RFC822 message stream till the @@ -78,7 +78,7 @@ final class InternetHeaders { String line; String prevline = null; // the previous header line, as a string // a buffer to accumulate the header in, when we know it's needed - StringBuffer lineBuffer = new StringBuffer(); + StringBuilder lineBuffer = new StringBuilder(); try { //while ((line = lis.readLine()) != null) { @@ -95,9 +95,9 @@ final class InternetHeaders { lineBuffer.append(line); } else { // new header - if (prevline != null) + if (prevline != null) { addHeaderLine(prevline); - else if (lineBuffer.length() > 0) { + } else if (lineBuffer.length() > 0) { // store previous header first addHeaderLine(lineBuffer.toString()); lineBuffer.setLength(0); @@ -124,7 +124,7 @@ final class InternetHeaders { int len = headers.size(); for( int i=0; iDataInputStream.readLine(). Expected use is to read + * lines as String objects from a RFC822 stream. + * + * It is implemented as a FilterInputStream, so one can just wrap + * this class around any input stream and read bytes from this filter. + * + * @author John Mani + */ + +final class LineInputStream extends FilterInputStream { + + private char[] lineBuffer = null; // reusable byte buffer + private static int MAX_INCR = 1024*1024; // 1MB + + public LineInputStream(InputStream in) { + super(in); + } + + /** + * Read a line containing only ASCII characters from the input + * stream. A line is terminated by a CR or NL or CR-NL sequence. + * A common error is a CR-CR-NL sequence, which will also terminate + * a line. + * The line terminator is not returned as part of the returned + * String. Returns null if no data is available.

+ * + * This class is similar to the deprecated + * DataInputStream.readLine() + */ + public String readLine() throws IOException { + //InputStream in = this.in; + char[] buf = lineBuffer; + + if (buf == null) { + buf = lineBuffer = new char[128]; + } + + int c1; + int room = buf.length; + int offset = 0; + + while ((c1 = in.read()) != -1) { + if (c1 == '\n') { + break; + } else if (c1 == '\r') { + // Got CR, is the next char NL ? + boolean twoCRs = false; + if (in.markSupported()) { + in.mark(2); + } + int c2 = in.read(); + if (c2 == '\r') { // discard extraneous CR + twoCRs = true; + c2 = in.read(); + } + if (c2 != '\n') { + /* + * If the stream supports it (which we hope will always + * be the case), reset to after the first CR. Otherwise, + * we wrap a PushbackInputStream around the stream so we + * can unread the characters we don't need. The only + * problem with that is that the caller might stop + * reading from this LineInputStream, throw it away, + * and then start reading from the underlying stream. + * If that happens, the pushed back characters will be + * lost forever. + */ + if (in.markSupported()) { + in.reset(); + } else { + if (!(in instanceof PushbackInputStream)) { + in /*= this.in*/ = new PushbackInputStream(in, 2); + } + if (c2 != -1) { + ((PushbackInputStream)in).unread(c2); + } + if (twoCRs) { + ((PushbackInputStream)in).unread('\r'); + } + } + } + break; // outa here. + } + + // Not CR, NL or CR-NL ... + // .. Insert the byte into our byte buffer + if (--room < 0) { // No room, need to grow. + if (buf.length < MAX_INCR) { + buf = new char[buf.length * 2]; + } else { + buf = new char[buf.length + MAX_INCR]; + } + room = buf.length - offset - 1; + System.arraycopy(lineBuffer, 0, buf, 0, offset); + lineBuffer = buf; + } + buf[offset++] = (char)c1; + } + + if ((c1 == -1) && (offset == 0)) { + return null; + } + + return String.copyValueOf(buf, 0, offset); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java index 2afd7fa4e46..0b6ace265ab 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,7 +26,8 @@ package com.sun.xml.internal.org.jvnet.mimepull; import java.io.File; -import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Configuration for MIME message parsing and storing. @@ -39,6 +40,8 @@ public class MIMEConfig { private static final long DEFAULT_MEMORY_THRESHOLD = 1048576L; private static final String DEFAULT_FILE_PREFIX = "MIME"; + private static final Logger LOGGER = Logger.getLogger(MIMEConfig.class.getName()); + // Parses the entire message eagerly boolean parseEagerly; @@ -48,15 +51,11 @@ public class MIMEConfig { // Maximum in-memory data per attachment long memoryThreshold; - // Do not store to disk - boolean onlyMemory; - // temp Dir to store large files File tempDir; String prefix; String suffix; - private MIMEConfig(boolean parseEagerly, int chunkSize, long inMemoryThreshold, String dir, String prefix, String suffix) { this.parseEagerly = parseEagerly; @@ -122,7 +121,7 @@ public class MIMEConfig { /** * @param dir */ - public void setDir(String dir) { + public final void setDir(String dir) { if (tempDir == null && dir != null && !dir.equals("")) { tempDir = new File(dir); } @@ -138,7 +137,12 @@ public class MIMEConfig { File tempFile = (tempDir == null) ? File.createTempFile(prefix, suffix) : File.createTempFile(prefix, suffix, tempDir); - tempFile.delete(); + boolean deleted = tempFile.delete(); + if (!deleted) { + if (LOGGER.isLoggable(Level.INFO)) { + LOGGER.log(Level.INFO, "File {0} was not deleted", tempFile.getAbsolutePath()); + } + } } catch(Exception ioe) { memoryThreshold = -1L; // whole attachment will be in-memory } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java index 715fe19a64b..af0e06bd787 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEEvent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java index b29f76b7ccf..96e0583d7cf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.nio.ByteBuffer; import java.util.*; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -104,7 +105,7 @@ public class MIMEMessage { * @return attachemnt part */ public MIMEPart getPart(int index) { - LOGGER.fine("index="+index); + LOGGER.log(Level.FINE, "index={0}", index); MIMEPart part = (index < partsList.size()) ? partsList.get(index) : null; if (parsed && part == null) { throw new MIMEParsingException("There is no "+index+" attachment part "); @@ -114,7 +115,7 @@ public class MIMEMessage { part = new MIMEPart(this); partsList.add(index, part); } - LOGGER.fine("Got attachment at index="+index+" attachment="+part); + LOGGER.log(Level.FINE, "Got attachment at index={0} attachment={1}", new Object[]{index, part}); return part; } @@ -128,7 +129,7 @@ public class MIMEMessage { * @return attachemnt part */ public MIMEPart getPart(String contentId) { - LOGGER.fine("Content-ID="+contentId); + LOGGER.log(Level.FINE, "Content-ID={0}", contentId); MIMEPart part = getDecodedCidPart(contentId); if (parsed && part == null) { throw new MIMEParsingException("There is no attachment part with Content-ID = "+contentId); @@ -138,7 +139,7 @@ public class MIMEMessage { part = new MIMEPart(this, contentId); partsMap.put(contentId, part); } - LOGGER.fine("Got attachment for Content-ID="+contentId+" attachment="+part); + LOGGER.log(Level.FINE, "Got attachment for Content-ID={0} attachment={1}", new Object[]{contentId, part}); return part; } @@ -162,7 +163,7 @@ public class MIMEMessage { /** * Parses the whole MIME message eagerly */ - public void parseAll() { + public final void parseAll() { while(makeProgress()) { // Nothing to do } @@ -184,15 +185,15 @@ public class MIMEMessage { switch(event.getEventType()) { case START_MESSAGE : - LOGGER.fine("MIMEEvent="+MIMEEvent.EVENT_TYPE.START_MESSAGE); + LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.START_MESSAGE); break; case START_PART : - LOGGER.fine("MIMEEvent="+MIMEEvent.EVENT_TYPE.START_PART); + LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.START_PART); break; case HEADERS : - LOGGER.fine("MIMEEvent="+MIMEEvent.EVENT_TYPE.HEADERS); + LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.HEADERS); MIMEEvent.Headers headers = (MIMEEvent.Headers)event; InternetHeaders ih = headers.getHeaders(); List cids = ih.getHeader("content-id"); @@ -219,20 +220,20 @@ public class MIMEMessage { break; case CONTENT : - LOGGER.finer("MIMEEvent="+MIMEEvent.EVENT_TYPE.CONTENT); + LOGGER.log(Level.FINER, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.CONTENT); MIMEEvent.Content content = (MIMEEvent.Content)event; ByteBuffer buf = content.getData(); currentPart.addBody(buf); break; case END_PART : - LOGGER.fine("MIMEEvent="+MIMEEvent.EVENT_TYPE.END_PART); + LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.END_PART); currentPart.doneParsing(); ++currentIndex; break; case END_MESSAGE : - LOGGER.fine("MIMEEvent="+MIMEEvent.EVENT_TYPE.END_MESSAGE); + LOGGER.log(Level.FINE, "MIMEEvent={0}", MIMEEvent.EVENT_TYPE.END_MESSAGE); parsed = true; try { in.close(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java index fa5cfb96843..6e4c7e6a3a5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ import java.io.IOException; import java.util.*; import java.util.logging.Logger; import java.nio.ByteBuffer; +import java.util.logging.Level; /** * Pull parser for the MIME messages. Applications can use pull API to continue @@ -53,6 +54,8 @@ class MIMEParser implements Iterable { private static final Logger LOGGER = Logger.getLogger(MIMEParser.class.getName()); + private static final String HEADER_ENCODING = "ISO8859-1"; + // Actually, the grammar doesn't support whitespace characters // after boundary. But the mail implementation checks for it. // We will only check for these many whitespace characters after boundary @@ -106,47 +109,50 @@ class MIMEParser implements Iterable { * * @return iterator for parsing events */ + @Override public Iterator iterator() { return new MIMEEventIterator(); } class MIMEEventIterator implements Iterator { + @Override public boolean hasNext() { return !parsed; } + @Override public MIMEEvent next() { switch(state) { case START_MESSAGE : - LOGGER.finer("MIMEParser state="+STATE.START_MESSAGE); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_MESSAGE);} state = STATE.SKIP_PREAMBLE; return MIMEEvent.START_MESSAGE; case SKIP_PREAMBLE : - LOGGER.finer("MIMEParser state="+STATE.SKIP_PREAMBLE); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.SKIP_PREAMBLE);} skipPreamble(); // fall through case START_PART : - LOGGER.finer("MIMEParser state="+STATE.START_PART); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.START_PART);} state = STATE.HEADERS; return MIMEEvent.START_PART; case HEADERS : - LOGGER.finer("MIMEParser state="+STATE.HEADERS); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.HEADERS);} InternetHeaders ih = readHeaders(); state = STATE.BODY; bol = true; return new MIMEEvent.Headers(ih); case BODY : - LOGGER.finer("MIMEParser state="+STATE.BODY); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.BODY);} ByteBuffer buf = readBody(); bol = false; return new MIMEEvent.Content(buf); case END_PART : - LOGGER.finer("MIMEParser state="+STATE.END_PART); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.END_PART);} if (done) { state = STATE.END_MESSAGE; } else { @@ -155,7 +161,7 @@ class MIMEParser implements Iterable { return MIMEEvent.END_PART; case END_MESSAGE : - LOGGER.finer("MIMEParser state="+STATE.END_MESSAGE); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "MIMEParser state={0}", STATE.END_MESSAGE);} parsed = true; return MIMEEvent.END_MESSAGE; @@ -164,6 +170,7 @@ class MIMEParser implements Iterable { } } + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -316,7 +323,7 @@ class MIMEParser implements Iterable { } adjustBuf(start+1, len-start-1); } - LOGGER.fine("Skipped the preamble. buffer len="+len); + if (LOGGER.isLoggable(Level.FINE)) {LOGGER.log(Level.FINE, "Skipped the preamble. buffer len={0}", len);} } private static byte[] getBytes(String s) { @@ -324,8 +331,9 @@ class MIMEParser implements Iterable { int size = chars.length; byte[] bytes = new byte[size]; - for (int i = 0; i < size;) + for (int i = 0; i < size;) { bytes[i] = (byte) chars[i++]; + } return bytes; } @@ -409,7 +417,7 @@ NEXT: while (off <= last) { * Fills the remaining buf to the full capacity */ private void fillBuf() { - LOGGER.finer("Before fillBuf() buffer len="+len); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "Before fillBuf() buffer len={0}", len);} assert !eof; while(len < buf.length) { int read; @@ -421,7 +429,7 @@ NEXT: while (off <= last) { if (read == -1) { eof = true; try { - LOGGER.fine("Closing the input stream."); + if (LOGGER.isLoggable(Level.FINE)) {LOGGER.fine("Closing the input stream.");} in.close(); } catch(IOException ioe) { throw new MIMEParsingException(ioe); @@ -431,7 +439,7 @@ NEXT: while (off <= last) { len += read; } } - LOGGER.finer("After fillBuf() buffer len="+len); + if (LOGGER.isLoggable(Level.FINER)) {LOGGER.log(Level.FINER, "After fillBuf() buffer len={0}", len);} } private void doubleBuf() { @@ -484,7 +492,7 @@ NEXT: while (off <= last) { return null; } - String hdr = new String(buf, offset, hdrLen); + String hdr = new String(buf, offset, hdrLen, HEADER_ENCODING); offset += hdrLen+lwsp; return hdr; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java index 312d9e5ef66..defd9fe2a37 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEParsingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java index 4c556846bd9..e5e4aedc712 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MIMEPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,22 +29,28 @@ import java.io.File; import java.io.InputStream; import java.nio.ByteBuffer; import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Represents an attachment part in a MIME message. MIME message parsing is done * lazily using a pull parser, so the part may not have all the data. {@link #read} * and {@link #readOnce} may trigger the actual parsing the message. In fact, * parsing of an attachment part may be triggered by calling {@link #read} methods - * on some other attachemnt parts. All this happens behind the scenes so the + * on some other attachment parts. All this happens behind the scenes so the * application developer need not worry about these details. * - * @author Jitendra Kotamraju + * @author Jitendra Kotamraju, Martin Grebac */ public class MIMEPart { + private static final Logger LOGGER = Logger.getLogger(MIMEPart.class.getName()); + private volatile InternetHeaders headers; private volatile String contentId; private String contentType; + private String contentTransferEncoding; + volatile boolean parsed; // part is parsed or not final MIMEMessage msg; private final DataHead dataHead; @@ -69,7 +75,15 @@ public class MIMEPart { * @return data for the part's content */ public InputStream read() { - return dataHead.read(); + InputStream is = null; + try { + is = MimeUtility.decode(dataHead.read(), contentTransferEncoding); + } catch (DecodingException ex) { //ignore + if (LOGGER.isLoggable(Level.WARNING)) { + LOGGER.log(Level.WARNING, null, ex); + } + } + return is; } /** @@ -81,7 +95,6 @@ public class MIMEPart { dataHead.close(); } - /** * Can get the attachment part's content only once. The content * will be lost after the method. Content data is not be stored @@ -95,7 +108,15 @@ public class MIMEPart { * @return data for the part's content */ public InputStream readOnce() { - return dataHead.readOnce(); + InputStream is = null; + try { + is = MimeUtility.decode(dataHead.readOnce(), contentTransferEncoding); + } catch (DecodingException ex) { //ignore + if (LOGGER.isLoggable(Level.WARNING)) { + LOGGER.log(Level.WARNING, null, ex); + } + } + return is; } public void moveTo(File f) { @@ -114,6 +135,18 @@ public class MIMEPart { return contentId; } + /** + * Returns Content-Transfer-Encoding MIME header for this attachment part + * + * @return Content-Transfer-Encoding of the part + */ + public String getContentTransferEncoding() { + if (contentTransferEncoding == null) { + getHeaders(); + } + return contentTransferEncoding; + } + /** * Returns Content-Type MIME header for this attachment part * @@ -171,6 +204,8 @@ public class MIMEPart { this.headers = headers; List ct = getHeader("Content-Type"); this.contentType = (ct == null) ? "application/octet-stream" : ct.get(0); + List cte = getHeader("Content-Transfer-Encoding"); + this.contentTransferEncoding = (cte == null) ? "binary" : cte.get(0); } /** @@ -199,9 +234,17 @@ public class MIMEPart { this.contentId = cid; } + /** + * Callback to set Content-Transfer-Encoding for this part + * @param cte Content-Transfer-Encoding of the part + */ + void setContentTransferEncoding(String cte) { + this.contentTransferEncoding = cte; + } + @Override public String toString() { - return "Part="+contentId; + return "Part="+contentId+":"+contentTransferEncoding; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java index e8901d43987..2aae91060c8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MemoryData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.xml.internal.org.jvnet.mimepull; import java.nio.ByteBuffer; import java.io.File; import java.io.IOException; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -50,14 +51,17 @@ final class MemoryData implements Data { } // size of the chunk given by the parser + @Override public int size() { return len; } + @Override public byte[] read() { return data; } + @Override public long writeTo(DataFile file) { return file.writeTo(data, 0, len); } @@ -68,6 +72,7 @@ final class MemoryData implements Data { * @param buf * @return */ + @Override public Data createNext(DataHead dataHead, ByteBuffer buf) { if (!config.isOnlyMemory() && dataHead.inMemory >= config.memoryThreshold) { try { @@ -79,7 +84,7 @@ final class MemoryData implements Data { : File.createTempFile(prefix, suffix, dir); // delete the temp file when VM exits as a last resort for file clean up tempFile.deleteOnExit(); - LOGGER.fine("Created temp file = "+tempFile); + if (LOGGER.isLoggable(Level.FINE)) {LOGGER.log(Level.FINE, "Created temp file = {0}", tempFile);} dataHead.dataFile = new DataFile(tempFile); } catch(IOException ioe) { throw new MIMEParsingException(ioe); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java new file mode 100644 index 00000000000..8aa7e024f16 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/MimeUtility.java @@ -0,0 +1,171 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.org.jvnet.mimepull; + +import java.io.*; + + +/** + * This is a utility class that provides various MIME related + * functionality.

+ * + * There are a set of methods to encode and decode MIME headers as + * per RFC 2047. Note that, in general, these methods are + * not needed when using methods such as + * setSubject and setRecipients; JavaMail + * will automatically encode and decode data when using these "higher + * level" methods. The methods below are only needed when maniuplating + * raw MIME headers using setHeader and getHeader + * methods. A brief description on handling such headers is given below:

+ * + * RFC 822 mail headers must contain only US-ASCII + * characters. Headers that contain non US-ASCII characters must be + * encoded so that they contain only US-ASCII characters. Basically, + * this process involves using either BASE64 or QP to encode certain + * characters. RFC 2047 describes this in detail.

+ * + * In Java, Strings contain (16 bit) Unicode characters. ASCII is a + * subset of Unicode (and occupies the range 0 - 127). A String + * that contains only ASCII characters is already mail-safe. If the + * String contains non US-ASCII characters, it must be encoded. An + * additional complexity in this step is that since Unicode is not + * yet a widely used charset, one might want to first charset-encode + * the String into another charset and then do the transfer-encoding. + *

+ * Note that to get the actual bytes of a mail-safe String (say, + * for sending over SMTP), one must do + *

+ *
+ *      byte[] bytes = string.getBytes("iso-8859-1");
+ *
+ * 

+ * + * The setHeader and addHeader methods + * on MimeMessage and MimeBodyPart assume that the given header values + * are Unicode strings that contain only US-ASCII characters. Hence + * the callers of those methods must insure that the values they pass + * do not contain non US-ASCII characters. The methods in this class + * help do this.

+ * + * The getHeader family of methods on MimeMessage and + * MimeBodyPart return the raw header value. These might be encoded + * as per RFC 2047, and if so, must be decoded into Unicode Strings. + * The methods in this class help to do this.

+ * + * Several System properties control strict conformance to the MIME + * spec. Note that these are not session properties but must be set + * globally as System properties.

+ * + * The mail.mime.decodetext.strict property controls + * decoding of MIME encoded words. The MIME spec requires that encoded + * words start at the beginning of a whitespace separated word. Some + * mailers incorrectly include encoded words in the middle of a word. + * If the mail.mime.decodetext.strict System property is + * set to "false", an attempt will be made to decode these + * illegal encoded words. The default is true.

+ * + * The mail.mime.encodeeol.strict property controls the + * choice of Content-Transfer-Encoding for MIME parts that are not of + * type "text". Often such parts will contain textual data for which + * an encoding that allows normal end of line conventions is appropriate. + * In rare cases, such a part will appear to contain entirely textual + * data, but will require an encoding that preserves CR and LF characters + * without change. If the mail.mime.encodeeol.strict + * System property is set to "true", such an encoding will + * be used when necessary. The default is false.

+ * + * In addition, the mail.mime.charset System property can + * be used to specify the default MIME charset to use for encoded words + * and text parts that don't otherwise specify a charset. Normally, the + * default MIME charset is derived from the default Java charset, as + * specified in the file.encoding System property. Most + * applications will have no need to explicitly set the default MIME + * charset. In cases where the default MIME charset to be used for + * mail messages is different than the charset used for files stored on + * the system, this property should be set.

+ * + * The current implementation also supports the following System property. + *

+ * The mail.mime.ignoreunknownencoding property controls + * whether unknown values in the Content-Transfer-Encoding + * header, as passed to the decode method, cause an exception. + * If set to "true", unknown values are ignored and 8bit + * encoding is assumed. Otherwise, unknown values cause a MessagingException + * to be thrown. + * + * @author John Mani + * @author Bill Shannon + */ + +/* FROM mail.jar */ +final class MimeUtility { + + // This class cannot be instantiated + private MimeUtility() { } + + private static final boolean ignoreUnknownEncoding = + PropUtil.getBooleanSystemProperty( + "mail.mime.ignoreunknownencoding", false); + + /** + * Decode the given input stream. The Input stream returned is + * the decoded input stream. All the encodings defined in RFC 2045 + * are supported here. They include "base64", "quoted-printable", + * "7bit", "8bit", and "binary". In addition, "uuencode" is also + * supported.

+ * + * In the current implementation, if the + * mail.mime.ignoreunknownencoding system property is set to + * "true", unknown encoding values are ignored and the + * original InputStream is returned. + * + * @param is input stream + * @param encoding the encoding of the stream. + * @return decoded input stream. + * @exception MessagingException if the encoding is unknown + */ + public static InputStream decode(InputStream is, String encoding) + throws DecodingException { + if (encoding.equalsIgnoreCase("base64")) + return new BASE64DecoderStream(is); + else if (encoding.equalsIgnoreCase("quoted-printable")) + return new QPDecoderStream(is); + else if (encoding.equalsIgnoreCase("uuencode") || + encoding.equalsIgnoreCase("x-uuencode") || + encoding.equalsIgnoreCase("x-uue")) + return new UUDecoderStream(is); + else if (encoding.equalsIgnoreCase("binary") || + encoding.equalsIgnoreCase("7bit") || + encoding.equalsIgnoreCase("8bit")) + return is; + else { + if (!ignoreUnknownEncoding) { + throw new DecodingException("Unknown encoding: " + encoding); + } + return is; + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java new file mode 100644 index 00000000000..08cb161d97b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/PropUtil.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* FROM mail.jar */ +package com.sun.xml.internal.org.jvnet.mimepull; + +import java.util.*; + +/** + * Utilities to make it easier to get property values. + * Properties can be strings or type-specific value objects. + * + * @author Bill Shannon + */ +final class PropUtil { + + // No one should instantiate this class. + private PropUtil() { + } + + /** + * Get a boolean valued System property. + */ + public static boolean getBooleanSystemProperty(String name, boolean def) { + try { + return getBoolean(getProp(System.getProperties(), name), def); + } catch (SecurityException sex) { + // fall through... + } + + /* + * If we can't get the entire System Properties object because + * of a SecurityException, just ask for the specific property. + */ + try { + String value = System.getProperty(name); + if (value == null) { + return def; + } + if (def) { + return !value.equalsIgnoreCase("false"); + } else { + return value.equalsIgnoreCase("true"); + } + } catch (SecurityException sex) { + return def; + } + } + + /** + * Get the value of the specified property. + * If the "get" method returns null, use the getProperty method, + * which might cascade to a default Properties object. + */ + private static Object getProp(Properties props, String name) { + Object val = props.get(name); + if (val != null) { + return val; + } else { + return props.getProperty(name); + } + } + + /** + * Interpret the value object as a boolean, + * returning def if unable. + */ + private static boolean getBoolean(Object value, boolean def) { + if (value == null) { + return def; + } + if (value instanceof String) { + /* + * If the default is true, only "false" turns it off. + * If the default is false, only "true" turns it on. + */ + if (def) { + return !((String)value).equalsIgnoreCase("false"); + } else { + return ((String)value).equalsIgnoreCase("true"); + } + } + if (value instanceof Boolean) { + return ((Boolean)value).booleanValue(); + } + return def; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java new file mode 100644 index 00000000000..76eea4753ea --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/QPDecoderStream.java @@ -0,0 +1,207 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* FROM mail.jar */ +package com.sun.xml.internal.org.jvnet.mimepull; + +import java.io.*; + +/** + * This class implements a QP Decoder. It is implemented as + * a FilterInputStream, so one can just wrap this class around + * any input stream and read bytes from this filter. The decoding + * is done as the bytes are read out. + * + * @author John Mani + */ + +final class QPDecoderStream extends FilterInputStream { + private byte[] ba = new byte[2]; + private int spaces = 0; + + /** + * Create a Quoted Printable decoder that decodes the specified + * input stream. + * @param in the input stream + */ + public QPDecoderStream(InputStream in) { + super(new PushbackInputStream(in, 2)); // pushback of size=2 + } + + /** + * Read the next decoded byte from this input stream. The byte + * is returned as an int in the range 0 + * to 255. If no byte is available because the end of + * the stream has been reached, the value -1 is returned. + * This method blocks until input data is available, the end of the + * stream is detected, or an exception is thrown. + * + * @return the next byte of data, or -1 if the end of the + * stream is reached. + * @exception IOException if an I/O error occurs. + */ + @Override + public int read() throws IOException { + if (spaces > 0) { + // We have cached space characters, return one + spaces--; + return ' '; + } + + int c = in.read(); + + if (c == ' ') { + // Got space, keep reading till we get a non-space char + while ((c = in.read()) == ' ') { + spaces++; + } + + if (c == '\r' || c == '\n' || c == -1) { + spaces = 0; + } else { + // The non-space char is NOT CR/LF, the spaces are valid. + ((PushbackInputStream)in).unread(c); + c = ' '; + } + return c; // return either or + } + else if (c == '=') { + // QP Encoded atom. Decode the next two bytes + int a = in.read(); + + if (a == '\n') { + /* Hmm ... not really confirming QP encoding, but lets + * allow this as a LF terminated encoded line .. and + * consider this a soft linebreak and recurse to fetch + * the next char. + */ + return read(); + } else if (a == '\r') { + // Expecting LF. This forms a soft linebreak to be ignored. + int b = in.read(); + if (b != '\n') { + ((PushbackInputStream)in).unread(b); + } + return read(); + } else if (a == -1) { + // Not valid QP encoding, but we be nice and tolerant here ! + return -1; + } else { + ba[0] = (byte)a; + ba[1] = (byte)in.read(); + try { + return ASCIIUtility.parseInt(ba, 0, 2, 16); + } catch (NumberFormatException nex) { + /* + System.err.println( + "Illegal characters in QP encoded stream: " + + ASCIIUtility.toString(ba, 0, 2) + ); + */ + + ((PushbackInputStream)in).unread(ba); + return c; + } + } + } + return c; + } + + /** + * Reads up to len decoded bytes of data from this input stream + * into an array of bytes. This method blocks until some input is + * available. + *

+ * + * @param buf the buffer into which the data is read. + * @param off the start offset of the data. + * @param len the maximum number of bytes read. + * @return the total number of bytes read into the buffer, or + * -1 if there is no more data because the end of + * the stream has been reached. + * @exception IOException if an I/O error occurs. + */ + @Override + public int read(byte[] buf, int off, int len) throws IOException { + int i, c; + for (i = 0; i < len; i++) { + if ((c = read()) == -1) { + if (i == 0) { + i = -1; // return -1 , NOT 0. + } + break; + } + buf[off+i] = (byte)c; + } + return i; + } + + /** + * Skips over and discards n bytes of data from this stream. + */ + @Override + public long skip(long n) throws IOException { + long skipped = 0; + while (n-- > 0 && read() >= 0) { + skipped++; + } + return skipped; + } + + /** + * Tests if this input stream supports marks. Currently this class + * does not support marks + */ + @Override + public boolean markSupported() { + return false; + } + + /** + * Returns the number of bytes that can be read from this input + * stream without blocking. The QP algorithm does not permit + * a priori knowledge of the number of bytes after decoding, so + * this method just invokes the available method + * of the original input stream. + */ + @Override + public int available() throws IOException { + // This is bogus ! We don't really know how much + // bytes are available *after* decoding + return in.available(); + } + + /**** begin TEST program + public static void main(String argv[]) throws Exception { + FileInputStream infile = new FileInputStream(argv[0]); + QPDecoderStream decoder = new QPDecoderStream(infile); + int c; + + while ((c = decoder.read()) != -1) + System.out.print((char)c); + System.out.println(); + } + *** end TEST program ****/ +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java new file mode 100644 index 00000000000..77cc3fa756c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/UUDecoderStream.java @@ -0,0 +1,357 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* FROM mail.jar */ +package com.sun.xml.internal.org.jvnet.mimepull; + +import java.io.*; + +/** + * This class implements a UUDecoder. It is implemented as + * a FilterInputStream, so one can just wrap this class around + * any input stream and read bytes from this filter. The decoding + * is done as the bytes are read out. + * + * @author John Mani + * @author Bill Shannon + */ + +final class UUDecoderStream extends FilterInputStream { + private String name; + private int mode; + + private byte[] buffer = new byte[45]; // max decoded chars in a line = 45 + private int bufsize = 0; // size of the cache + private int index = 0; // index into the cache + private boolean gotPrefix = false; + private boolean gotEnd = false; + private LineInputStream lin; + private boolean ignoreErrors; + private boolean ignoreMissingBeginEnd; + private String readAhead; + + /** + * Create a UUdecoder that decodes the specified input stream. + * The System property mail.mime.uudecode.ignoreerrors + * controls whether errors in the encoded data cause an exception + * or are ignored. The default is false (errors cause exception). + * The System property mail.mime.uudecode.ignoremissingbeginend + * controls whether a missing begin or end line cause an exception + * or are ignored. The default is false (errors cause exception). + * @param in the input stream + */ + public UUDecoderStream(InputStream in) { + super(in); + lin = new LineInputStream(in); + // default to false + ignoreErrors = PropUtil.getBooleanSystemProperty( + "mail.mime.uudecode.ignoreerrors", false); + // default to false + ignoreMissingBeginEnd = PropUtil.getBooleanSystemProperty( + "mail.mime.uudecode.ignoremissingbeginend", false); + } + + /** + * Create a UUdecoder that decodes the specified input stream. + * @param in the input stream + * @param ignoreErrors ignore errors? + * @param ignoreMissingBeginEnd ignore missing begin or end? + */ + public UUDecoderStream(InputStream in, boolean ignoreErrors, + boolean ignoreMissingBeginEnd) { + super(in); + lin = new LineInputStream(in); + this.ignoreErrors = ignoreErrors; + this.ignoreMissingBeginEnd = ignoreMissingBeginEnd; + } + + /** + * Read the next decoded byte from this input stream. The byte + * is returned as an int in the range 0 + * to 255. If no byte is available because the end of + * the stream has been reached, the value -1 is returned. + * This method blocks until input data is available, the end of the + * stream is detected, or an exception is thrown. + * + * @return next byte of data, or -1 if the end of + * stream is reached. + * @exception IOException if an I/O error occurs. + * @see java.io.FilterInputStream#in + */ + @Override + public int read() throws IOException { + if (index >= bufsize) { + readPrefix(); + if (!decode()) { + return -1; + } + index = 0; // reset index into buffer + } + return buffer[index++] & 0xff; // return lower byte + } + + @Override + public int read(byte[] buf, int off, int len) throws IOException { + int i, c; + for (i = 0; i < len; i++) { + if ((c = read()) == -1) { + if (i == 0) {// At end of stream, so we should + i = -1; // return -1, NOT 0. + } + break; + } + buf[off+i] = (byte)c; + } + return i; + } + + @Override + public boolean markSupported() { + return false; + } + + @Override + public int available() throws IOException { + // This is only an estimate, since in.available() + // might include CRLFs too .. + return ((in.available() * 3)/4 + (bufsize-index)); + } + + /** + * Get the "name" field from the prefix. This is meant to + * be the pathname of the decoded file + * + * @return name of decoded file + * @exception IOException if an I/O error occurs. + */ + public String getName() throws IOException { + readPrefix(); + return name; + } + + /** + * Get the "mode" field from the prefix. This is the permission + * mode of the source file. + * + * @return permission mode of source file + * @exception IOException if an I/O error occurs. + */ + public int getMode() throws IOException { + readPrefix(); + return mode; + } + + /** + * UUencoded streams start off with the line: + * "begin " + * Search for this prefix and gobble it up. + */ + private void readPrefix() throws IOException { + if (gotPrefix) { + return; + } + + mode = 0666; // defaults, overridden below + name = "encoder.buf"; // same default used by encoder + String line; + for (;;) { + // read till we get the prefix: "begin MODE FILENAME" + line = lin.readLine(); // NOTE: readLine consumes CRLF pairs too + if (line == null) { + if (!ignoreMissingBeginEnd) { + throw new DecodingException("UUDecoder: Missing begin"); + } + // at EOF, fake it + gotPrefix = true; + gotEnd = true; + break; + } + if (line.regionMatches(false, 0, "begin", 0, 5)) { + try { + mode = Integer.parseInt(line.substring(6,9)); + } catch (NumberFormatException ex) { + if (!ignoreErrors) { + throw new DecodingException( + "UUDecoder: Error in mode: " + ex.toString()); + } + } + if (line.length() > 10) { + name = line.substring(10); + } else { + if (!ignoreErrors) { + throw new DecodingException( + "UUDecoder: Missing name: " + line); + } + } + gotPrefix = true; + break; + } else if (ignoreMissingBeginEnd && line.length() != 0) { + int count = line.charAt(0); + count = (count - ' ') & 0x3f; + int need = ((count * 8)+5)/6; + if (need == 0 || line.length() >= need + 1) { + /* + * Looks like a legitimate encoded line. + * Pretend we saw the "begin" line and + * save this line for later processing in + * decode(). + */ + readAhead = line; + gotPrefix = true; // fake it + break; + } + } + } + } + + private boolean decode() throws IOException { + + if (gotEnd) { + return false; + } + bufsize = 0; + int count = 0; + String line; + for (;;) { + /* + * If we ignored a missing "begin", the first line + * will be saved in readAhead. + */ + if (readAhead != null) { + line = readAhead; + readAhead = null; + } else { + line = lin.readLine(); + } + + /* + * Improperly encoded data sometimes omits the zero length + * line that starts with a space character, we detect the + * following "end" line here. + */ + if (line == null) { + if (!ignoreMissingBeginEnd) { + throw new DecodingException( + "UUDecoder: Missing end at EOF"); + } + gotEnd = true; + return false; + } + if (line.equals("end")) { + gotEnd = true; + return false; + } + if (line.length() == 0) { + continue; + } + count = line.charAt(0); + if (count < ' ') { + if (!ignoreErrors) { + throw new DecodingException( + "UUDecoder: Buffer format error"); + } + continue; + } + + /* + * The first character in a line is the number of original (not + * the encoded atoms) characters in the line. Note that all the + * code below has to handle the character that indicates + * end of encoded stream. + */ + count = (count - ' ') & 0x3f; + + if (count == 0) { + line = lin.readLine(); + if (line == null || !line.equals("end")) { + if (!ignoreMissingBeginEnd) { + throw new DecodingException( + "UUDecoder: Missing End after count 0 line"); + } + } + gotEnd = true; + return false; + } + + int need = ((count * 8)+5)/6; +//System.out.println("count " + count + ", need " + need + ", len " + line.length()); + if (line.length() < need + 1) { + if (!ignoreErrors) { + throw new DecodingException( + "UUDecoder: Short buffer error"); + } + continue; + } + + // got a line we're committed to, break out and decode it + break; + } + + int i = 1; + byte a, b; + /* + * A correct uuencoder always encodes 3 characters at a time, even + * if there aren't 3 characters left. But since some people out + * there have broken uuencoders we handle the case where they + * don't include these "unnecessary" characters. + */ + while (bufsize < count) { + // continue decoding until we get 'count' decoded chars + a = (byte)((line.charAt(i++) - ' ') & 0x3f); + b = (byte)((line.charAt(i++) - ' ') & 0x3f); + buffer[bufsize++] = (byte)(((a << 2) & 0xfc) | ((b >>> 4) & 3)); + + if (bufsize < count) { + a = b; + b = (byte)((line.charAt(i++) - ' ') & 0x3f); + buffer[bufsize++] = + (byte)(((a << 4) & 0xf0) | ((b >>> 2) & 0xf)); + } + + if (bufsize < count) { + a = b; + b = (byte)((line.charAt(i++) - ' ') & 0x3f); + buffer[bufsize++] = (byte)(((a << 6) & 0xc0) | (b & 0x3f)); + } + } + return true; + } + + /*** begin TEST program ***** + public static void main(String argv[]) throws Exception { + FileInputStream infile = new FileInputStream(argv[0]); + UUDecoderStream decoder = new UUDecoderStream(infile); + int c; + + try { + while ((c = decoder.read()) != -1) + System.out.write(c); + System.out.flush(); + } catch (Exception e) { + e.printStackTrace(); + } + } + **** end TEST program ****/ +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java index 52207f387ef..a1851da5c58 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/mimepull/WeakDataFile.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Executor; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -53,16 +54,20 @@ final class WeakDataFile extends WeakReference { static { CleanUpExecutorFactory executorFactory = CleanUpExecutorFactory.newInstance(); if (executorFactory!=null) { - LOGGER.fine("Initializing clean up executor for MIMEPULL: " - + executorFactory.getClass().getName()); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Initializing clean up executor for MIMEPULL: {0}", executorFactory.getClass().getName()); + } Executor executor = executorFactory.getExecutor(); executor.execute(new Runnable() { + @Override public void run() { - WeakDataFile weak = null; + WeakDataFile weak; while (true) { try { weak = (WeakDataFile) refQueue.remove(); - LOGGER.fine("Cleaning file = "+weak.file+" from reference queue."); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Cleaning file = {0} from reference queue.", weak.file); + } weak.close(); } catch (InterruptedException e) { } @@ -107,22 +112,36 @@ final class WeakDataFile extends WeakReference { } void close() { - LOGGER.fine("Deleting file = "+file.getName()); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Deleting file = {0}", file.getName()); + } refList.remove(this); try { raf.close(); - file.delete(); + boolean deleted = file.delete(); + if (!deleted) { + if (LOGGER.isLoggable(Level.INFO)) { + LOGGER.log(Level.INFO, "File {0} was not deleted", file.getAbsolutePath()); + } + } } catch(IOException ioe) { throw new MIMEParsingException(ioe); } } void renameTo(File f) { - LOGGER.fine("Moving file="+file+" to="+f); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Moving file={0} to={1}", new Object[]{file, f}); + } refList.remove(this); try { raf.close(); - file.renameTo(f); + boolean renamed = file.renameTo(f); + if (!renamed) { + if (LOGGER.isLoggable(Level.INFO)) { + LOGGER.log(Level.INFO, "File {0} was not moved to {1}", new Object[] {file.getAbsolutePath(), f.getAbsolutePath()}); + } + } } catch(IOException ioe) { throw new MIMEParsingException(ioe); } @@ -130,9 +149,11 @@ final class WeakDataFile extends WeakReference { } static void drainRefQueueBounded() { - WeakDataFile weak = null; + WeakDataFile weak; while (( weak = (WeakDataFile) refQueue.poll()) != null ) { - LOGGER.fine("Cleaning file = "+weak.file+" from reference queue."); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Cleaning file = {0} from reference queue.", weak.file); + } weak.close(); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java index 689aee70441..fa7512c06e1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/Base64Data.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,11 +36,13 @@ import java.io.InputStream; import java.io.OutputStream; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; +import java.util.logging.Level; +import java.util.logging.Logger; // for testing method //import com.sun.xml.internal.stream.writers.XMLStreamWriterImpl; //import java.io.FileNotFoundException; -//import java.io.StringWriter; +//import java.io.FileWriter; //import javax.activation.FileDataSource; /** @@ -59,8 +61,8 @@ public class Base64Data implements CharSequence, Cloneable { // (note that having both is allowed) private DataHandler dataHandler; - private byte[] data; + /** * Length of the valid data in {@link #data}. */ @@ -84,6 +86,8 @@ public class Base64Data implements CharSequence, Cloneable { public Base64Data() { } + private static final Logger logger = Logger.getLogger(Base64Data.class.getName()); + /** * Clone constructor * @param that needs to be cloned @@ -429,15 +433,30 @@ public class Base64Data implements CharSequence, Cloneable { Base64Encoder.print(data, 0, dataLen, buf, start); } + private static final int CHUNK_SIZE; + static { + int bufSize = 1024; + try { + String bufSizeStr = getProperty("com.sun.xml.internal.org.jvnet.staxex.Base64DataStreamWriteBufferSize"); + if (bufSizeStr != null) { + bufSize = Integer.parseInt(bufSizeStr); + } + } catch (Exception e) { + logger.log(Level.INFO, "Error reading com.sun.xml.internal.org.jvnet.staxex.Base64DataStreamWriteBufferSize property", e); + } + CHUNK_SIZE = bufSize; + } + public void writeTo(XMLStreamWriter output) throws IOException, XMLStreamException { if (data==null) { try { InputStream is = dataHandler.getDataSource().getInputStream(); ByteArrayOutputStream outStream = new ByteArrayOutputStream(); // dev-null stream Base64EncoderStream encWriter = new Base64EncoderStream(output, outStream); - int b = -1; - while ((b = is.read()) != -1) { - encWriter.write(b); + int b; + byte[] buffer = new byte[CHUNK_SIZE]; + while ((b = is.read(buffer)) != -1) { + encWriter.write(buffer, 0, b); } outStream.close(); encWriter.close(); @@ -457,17 +476,33 @@ public class Base64Data implements CharSequence, Cloneable { return new Base64Data(this); } + static String getProperty(final String propName) { + if (System.getSecurityManager() == null) { + return System.getProperty(propName); + } else { + return (String) java.security.AccessController.doPrivileged( + new java.security.PrivilegedAction() { + public java.lang.Object run() { + return System.getProperty(propName); + } + }); + } + } + // public static void main(String[] args) throws FileNotFoundException, IOException, XMLStreamException { // Base64Data data = new Base64Data(); // -// data.set(new DataHandler(new FileDataSource(new File("/home/snajper/Desktop/a.txt")))); +// File f = new File("/Users/snajper/work/builds/weblogic/wls1211_dev.zip"); +// FileDataSource fds = new FileDataSource(f); +// DataHandler dh = new DataHandler(fds); +// data.set(dh); // -// StringWriter sw = new StringWriter(); -// XMLStreamWriterImpl wi = new XMLStreamWriterImpl(sw, null); +// FileWriter fw = new FileWriter(new File("/Users/snajper/Desktop/b.txt")); +// XMLStreamWriterImpl wi = new XMLStreamWriterImpl(fw, null); // // data.writeTo(wi); -// wi.flush();sw.flush(); -// System.out.println("SW: " + sw.toString()); +// wi.flush();fw.flush(); +// //System.out.println("SW: " + sw.toString()); // // } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java index bdb95654e2c..9cc79defee4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/staxex/XMLStreamReaderEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import javax.xml.stream.XMLStreamException; * *

* Some producer of infoset (in particular, such as FastInfoset, - * XOP deecoder), usees a native format that enables efficient + * XOP decoder), uses a native format that enables efficient * treatment of binary data. For ordinary infoset consumer * (that just uses {@link XMLStreamReader}, those binary data * will just look like base64-encoded string, but this interface diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingModeFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingModeFeature.java deleted file mode 100644 index 3bc6491c1db..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingModeFeature.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.org.jvnet.ws.databinding; - -import java.util.HashMap; -import java.util.Map; - -import javax.xml.ws.WebServiceFeature; - -public class DatabindingModeFeature extends WebServiceFeature { - /** - * Constant value identifying the DatabindingFeature - */ - static public final String ID = "http://jax-ws.java.net/features/databinding"; - - static public final String GLASSFISH_JAXB = "glassfish.jaxb"; - - //These constants should be defined in the corresponding plugin package -// static public final String ECLIPSELINK_JAXB = "eclipselink.jaxb"; -// static public final String ECLIPSELINK_SDO = "eclipselink.sdo"; -// static public final String TOPLINK_JAXB = "toplink.jaxb"; -// static public final String TOPLINK_SDO = "toplink.sdo"; - - private String mode; - private Map properties; - - public DatabindingModeFeature(String mode) { - super(); - this.mode = mode; - properties = new HashMap(); - } - - public String getMode() { - return mode; - } - - public String getID() { - return ID; - } - - public Map getProperties() { - return properties; - } - - public static Builder builder() { return new Builder(new DatabindingModeFeature(null)); } - - public final static class Builder { - final private DatabindingModeFeature o; - Builder(final DatabindingModeFeature x) { o = x; } - public DatabindingModeFeature build() { return o; } -// public DatabindingModeFeature build() { return (DatabindingModeFeature) FeatureValidator.validate(o); } - public Builder value(final String x) { o.mode = x; return this; } - } -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/ContentType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/ContentType.java deleted file mode 100644 index 635705aa90c..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/ContentType.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.org.jvnet.ws.message; - -/** - * A Content-Type transport header that will be returned by {@link MessageContext#write(java.io.OutputStream)}. - * It will provide the Content-Type header and also take care of SOAP 1.1 SOAPAction header. - * - * @author Vivek Pandey - */ -public interface ContentType { - - /** - * Gives non-null Content-Type header value. - */ - public String getContentType(); - - /** - * Gives SOAPAction transport header value. It will be non-null only for SOAP 1.1 messages. In other cases - * it MUST be null. The SOAPAction transport header should be written out only when its non-null. - * - * @return It can be null, in that case SOAPAction header should be written. - */ - public String getSOAPActionHeader(); - - /** - * Controls the Accept transport header, if the transport supports it. - * Returning null means the transport need not add any new header. - * - *

- * We realize that this is not an elegant abstraction, but - * this would do for now. If another person comes and asks for - * a similar functionality, we'll define a real abstraction. - */ - public String getAcceptHeader(); -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/DistributedPropertySet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/DistributedPropertySet.java deleted file mode 100644 index c44c7da93ea..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/DistributedPropertySet.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.org.jvnet.ws.message; - -import com.sun.istack.internal.Nullable; - -/** - * {@link PropertySet} that combines properties exposed from multiple - * {@link PropertySet}s into one. - * - *

- * This implementation allows one {@link PropertySet} to assemble - * all properties exposed from other "satellite" {@link PropertySet}s. - * (A satellite may itself be a {@link DistributedPropertySet}, so - * in general this can form a tree.) - * - *

- * This is useful for JAX-WS because the properties we expose to the application - * are contributed by different pieces, and therefore we'd like each of them - * to have a separate {@link PropertySet} implementation that backs up - * the properties. For example, this allows FastInfoset to expose its - * set of properties to {@link RequestContext} by using a strongly-typed fields. - * - *

- * This is also useful for a client-side transport to expose a bunch of properties - * into {@link ResponseContext}. It simply needs to create a {@link PropertySet} - * object with methods for each property it wants to expose, and then add that - * {@link PropertySet} to {@link Packet}. This allows property values to be - * lazily computed (when actually asked by users), thus improving the performance - * of the typical case where property values are not asked. - * - *

- * A similar benefit applies on the server-side, for a transport to expose - * a bunch of properties to {@link WebServiceContext}. - * - *

- * To achieve these benefits, access to {@link DistributedPropertySet} is slower - * compared to {@link PropertySet} (such as get/set), while adding a satellite - * object is relatively fast. - * - * @author Kohsuke Kawaguchi - */ -public interface DistributedPropertySet extends com.sun.xml.internal.org.jvnet.ws.message.PropertySet { - - public @Nullable T getSatellite(Class satelliteClass); - - public void addSatellite(com.sun.xml.internal.org.jvnet.ws.message.PropertySet satellite); - - public void addSatellite(Class keyClass, com.sun.xml.internal.org.jvnet.ws.message.PropertySet satellite); - - public void removeSatellite(com.sun.xml.internal.org.jvnet.ws.message.PropertySet satellite); - - public void copySatelliteInto(com.sun.xml.internal.org.jvnet.ws.message.MessageContext r); -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContext.java deleted file mode 100644 index 067145528d5..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/MessageContext.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.org.jvnet.ws.message; - -import java.io.IOException; -import java.io.OutputStream; -import java.nio.ByteBuffer; -import java.nio.channels.WritableByteChannel; - -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; - -/** - * MessageContext represents a container of a SOAP message and all the properties - * including the transport headers. - * - * MessageContext is a composite {@link PropertySet} that combines properties exposed from multiple - * {@link PropertySet}s into one. - * - *

- * This implementation allows one {@link PropertySet} to assemble - * all properties exposed from other "satellite" {@link PropertySet}s. - * (A satellite may itself be a {@link DistributedPropertySet}, so - * in general this can form a tree.) - * - * @author shih-chang.chen@oracle.com - */ -public interface MessageContext extends DistributedPropertySet { - /** - * Gets the SAAJ SOAPMessage representation of the SOAP message. - * - * @return The SOAPMessage - */ - SOAPMessage getSOAPMessage() throws SOAPException; - - /** - * Adds the {@link PropertySet} - * - * @param satellite the PropertySet - */ - void addSatellite(PropertySet satellite); - - /** - * Removes the {@link PropertySet} - * - * @param satellite the PropertySet - */ - void removeSatellite(PropertySet satellite); - - /** - * Copies all the {@link PropertySet} of this MessageContext into the other MessageContext - * - * @param otherMessageContext the MessageContext - */ - void copySatelliteInto(MessageContext otherMessageContext); - - /** - * Gets the {@link PropertySet} - * - * @param satellite the PropertySet type - */ - T getSatellite(Class satelliteClass); - - /** - * Writes the XML infoset portion of this MessageContext - * (from <soap:Envelope> to </soap:Envelope>). - * - * @param out - * Must not be null. The caller is responsible for closing the stream, - * not the callee. - * - * @return - * The MIME content type of the encoded message (such as "application/xml"). - * This information is often ncessary by transport. - * - * @throws IOException - * if a {@link OutputStream} throws {@link IOException}. - */ - //TODO chen: wait for DISI -// ContentType writeTo( OutputStream out ) throws IOException; - - /** - * The version of {@link #writeTo(OutputStream)} - * that writes to NIO {@link ByteBuffer}. - * - *

- * TODO: for the convenience of implementation, write - * an adapter that wraps {@link WritableByteChannel} to {@link OutputStream}. - */ - //TODO chen: wait for DISI -// ContentType writeTo( WritableByteChannel buffer ); -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/PropertySet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/PropertySet.java deleted file mode 100644 index 179aaec9a86..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/message/PropertySet.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.org.jvnet.ws.message; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.util.Map; - -import javax.xml.ws.handler.MessageContext; - -/** - * A set of "properties" that can be accessed via strongly-typed fields - * as well as reflexibly through the property name. - * - * @author Kohsuke Kawaguchi - */ -public interface PropertySet { - - /** - * Marks a field on {@link PropertySet} as a - * property of {@link MessageContext}. - * - *

- * To make the runtime processing easy, this annotation - * must be on a public field (since the property name - * can be set through {@link Map} anyway, you won't be - * losing abstraction by doing so.) - * - *

- * For similar reason, this annotation can be only placed - * on a reference type, not primitive type. - * - * @author Kohsuke Kawaguchi - */ - @Inherited - @Retention(RetentionPolicy.RUNTIME) - @Target({ElementType.FIELD,ElementType.METHOD}) - public @interface Property { - /** - * Name of the property. - */ - String[] value(); - } - - public boolean containsKey(Object key); - - /** - * Gets the name of the property. - * - * @param key - * This field is typed as {@link Object} to follow the {@link Map#get(Object)} - * convention, but if anything but {@link String} is passed, this method - * just returns null. - */ - public Object get(Object key); - - /** - * Sets a property. - * - *

Implementation Note

- * This method is slow. Code inside JAX-WS should define strongly-typed - * fields in this class and access them directly, instead of using this. - * - * @see Property - */ - public Object put(String key, Object value); - - /** - * Checks if this {@link PropertySet} supports a property of the given name. - */ - public boolean supports(Object key); - - public Object remove(Object key); - - /** - * Creates a {@link Map} view of this {@link PropertySet}. - * - *

- * This map is partially live, in the sense that values you set to it - * will be reflected to {@link PropertySet}. - * - *

- * However, this map may not pick up changes made - * to {@link PropertySet} after the view is created. - * - * @return - * always non-null valid instance. - */ - public Map createMapView(); -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java index afba329b72a..1923c60668e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/AbstractCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -131,7 +131,7 @@ public class AbstractCreator extends AbstractCreatorProcessor { } if (length < CHAR_ARRAY_LENGTH_SMALL_SIZE) { - storeStructure(type | CHAR_ARRAY_LENGTH_SMALL); + storeStructure(type); storeStructure(length); System.arraycopy(ch, start, _contentCharactersBuffer, _contentCharactersBufferPtr, length); _contentCharactersBufferPtr += length; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java index 41102187fae..7f7f57247cb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/sax/SAXBufferProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -88,6 +88,7 @@ public class SAXBufferProcessor extends AbstractProcessor implements XMLReader { protected String[] _namespacePrefixes = new String[16]; protected int _namespacePrefixesIndex; + protected int[] _namespaceAttributesStartingStack = new int[16]; protected int[] _namespaceAttributesStack = new int[16]; protected int _namespaceAttributesStackIndex; @@ -436,6 +437,7 @@ public class SAXBufferProcessor extends AbstractProcessor implements XMLReader { int item = peekStructure(); Set prefixSet = inscope ? new HashSet() : Collections.emptySet(); if ((item & TYPE_MASK) == T_NAMESPACE_ATTRIBUTE) { + cacheNamespacePrefixStartingIndex(); hasNamespaceAttributes = true; item = processNamespaceAttributes(item, inscope, prefixSet); } @@ -570,7 +572,8 @@ public class SAXBufferProcessor extends AbstractProcessor implements XMLReader { private void processEndPrefixMapping() throws SAXException { final int end = _namespaceAttributesStack[--_namespaceAttributesStackIndex]; - final int start = (_namespaceAttributesStackIndex > 0) ? _namespaceAttributesStack[_namespaceAttributesStackIndex] : 0; +// final int start = (_namespaceAttributesStackIndex > 0) ? _namespaceAttributesStack[_namespaceAttributesStackIndex] : 0; + final int start = (_namespaceAttributesStackIndex >= 0) ? _namespaceAttributesStartingStack[_namespaceAttributesStackIndex] : 0; for (int i = end - 1; i >= start; i--) { _contentHandler.endPrefixMapping(_namespacePrefixes[i]); @@ -699,6 +702,15 @@ public class SAXBufferProcessor extends AbstractProcessor implements XMLReader { _namespaceAttributesStack[_namespaceAttributesStackIndex++] = _namespacePrefixesIndex; } + private void cacheNamespacePrefixStartingIndex() { + if (_namespaceAttributesStackIndex == _namespaceAttributesStartingStack.length) { + final int[] namespaceAttributesStart = new int[_namespaceAttributesStackIndex * 3 /2 + 1]; + System.arraycopy(_namespaceAttributesStartingStack, 0, namespaceAttributesStart, 0, _namespaceAttributesStackIndex); + _namespaceAttributesStartingStack = namespaceAttributesStart; + } + _namespaceAttributesStartingStack[_namespaceAttributesStackIndex] = _namespacePrefixesIndex; + } + private void processComment(String s) throws SAXException { processComment(s.toCharArray(), 0, s.length()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java index 177669d60c4..2fa55ae6b55 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/NamespaceContexHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -74,9 +74,6 @@ final public class NamespaceContexHelper implements NamespaceContextEx { // Current position to store the next namespace context private int contextPosition; - // The current namespace context - private int currentContext; - /** * Create a new NamespaceContexHelper. * @@ -88,7 +85,7 @@ final public class NamespaceContexHelper implements NamespaceContextEx { prefixes[1] = "xmlns"; namespaceURIs[1] = "http://www.w3.org/2000/xmlns/"; - currentContext = namespacePosition = 2; + namespacePosition = 2; } @@ -257,7 +254,7 @@ final public class NamespaceContexHelper implements NamespaceContextEx { if (contextPosition == contexts.length) resizeContexts(); - contexts[contextPosition++] = currentContext = namespacePosition; + contexts[contextPosition++] = namespacePosition; } private void resizeContexts() { @@ -274,7 +271,7 @@ final public class NamespaceContexHelper implements NamespaceContextEx { */ public void popContext() { if (contextPosition > 0) { - namespacePosition = currentContext = contexts[--contextPosition]; + namespacePosition = contexts[--contextPosition]; } } @@ -284,6 +281,6 @@ final public class NamespaceContexHelper implements NamespaceContextEx { * Pop all namespace contexts and reset the root context. */ public void resetContexts() { - currentContext = namespacePosition = 2; + namespacePosition = 2; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java index e73e2b9e2cf..0ca0560b771 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamReaderBufferProcessor.java @@ -354,7 +354,7 @@ public class StreamReaderBufferProcessor extends AbstractProcessor implements XM } int eventType = getEventType(); - StringBuffer content = new StringBuffer(); + StringBuilder content = new StringBuilder(); while(eventType != END_ELEMENT ) { if(eventType == CHARACTERS || eventType == CDATA @@ -642,6 +642,7 @@ public class StreamReaderBufferProcessor extends AbstractProcessor implements XM return new CharSequenceImpl(_offset + start, length); } + @Override public String toString() { return new String(_characters, _offset, _length); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java index 52f39087d14..17110d09687 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/stream/buffer/stax/StreamWriterBufferProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,11 +28,13 @@ package com.sun.xml.internal.stream.buffer.stax; import com.sun.xml.internal.stream.buffer.AbstractProcessor; import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; +import java.io.IOException; import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; +import com.sun.xml.internal.org.jvnet.staxex.Base64Data; import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx; import javax.xml.stream.XMLStreamException; @@ -359,7 +361,16 @@ public class StreamWriterBufferProcessor extends AbstractProcessor { } case STATE_TEXT_AS_OBJECT: { final CharSequence c = (CharSequence)readContentObject(); - writer.writeCharacters(c.toString()); + if (c instanceof Base64Data) { + try { + Base64Data bd = (Base64Data)c; + bd.writeTo(writer); + } catch (IOException e) { + throw new XMLStreamException(e); + } + } else { + writer.writeCharacters(c.toString()); + } break; } case STATE_COMMENT_AS_CHAR_ARRAY_SMALL: { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java index de9a0e6413d..1c95e69668b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/Closeable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java index f9ddccd3137..ee181e5ca2b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EPRSDDocumentFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,7 +43,6 @@ import javax.xml.namespace.NamespaceContext; import java.io.IOException; import java.util.List; import java.util.Collection; -import java.util.ArrayList; import java.util.Collections; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java index 8328f51d644..d21e60a25f0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/EndpointReferenceUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -162,8 +162,9 @@ public class EndpointReferenceUtil { e.getLocalName().equals(MemberSubmissionAddressingConstants.MEX_METADATA.getLocalPart())) { NodeList nl = e.getElementsByTagNameNS(WSDLConstants.NS_WSDL, WSDLConstants.QNAME_DEFINITIONS.getLocalPart()); - if(nl != null) + if(nl != null) { wsdlElement = (Element) nl.item(0); + } } } } @@ -172,8 +173,9 @@ public class EndpointReferenceUtil { DOMUtil.serializeNode(wsdlElement, writer); } - if (w3cMetadataWritten) + if (w3cMetadataWritten) { writer.writeEndElement(); + } //TODO revisit this //write extension elements if ((msEpr.elements != null) && (msEpr.elements.size() > 0)) { @@ -200,20 +202,21 @@ public class EndpointReferenceUtil { private static boolean w3cMetadataWritten = false; - private static void writeW3CMetadata(StreamWriterBufferCreator writer) throws XMLStreamException { - if (!w3cMetadataWritten) { - writer.writeStartElement(AddressingVersion.W3C.getPrefix(), AddressingVersion.W3C.eprType.wsdlMetadata.getLocalPart(), AddressingVersion.W3C.nsUri); - w3cMetadataWritten = true; - } - } - +// private static void writeW3CMetadata(StreamWriterBufferCreator writer) throws XMLStreamException { +// if (!w3cMetadataWritten) { +// writer.writeStartElement(AddressingVersion.W3C.getPrefix(), AddressingVersion.W3C.eprType.wsdlMetadata.getLocalPart(), AddressingVersion.W3C.nsUri); +// w3cMetadataWritten = true; +// } +// } +// private static MemberSubmissionEndpointReference toMSEpr(W3CEndpointReference w3cEpr) { DOMResult result = new DOMResult(); w3cEpr.writeTo(result); Node eprNode = result.getNode(); Element e = DOMUtil.getFirstElementChild(eprNode); - if (e == null) + if (e == null) { return null; + } MemberSubmissionEndpointReference msEpr = new MemberSubmissionEndpointReference(); @@ -223,12 +226,11 @@ public class EndpointReferenceUtil { Element child = (Element) nodes.item(i); if (child.getNamespaceURI().equals(AddressingVersion.W3C.nsUri) && child.getLocalName().equals(AddressingVersion.W3C.eprType.address)) { - if (msEpr.addr == null) + if (msEpr.addr == null) { msEpr.addr = new MemberSubmissionEndpointReference.Address(); + } msEpr.addr.uri = XmlUtil.getTextForNode(child); - //now add the attribute extensions - msEpr.addr.attributes = getAttributes(child); } else if (child.getNamespaceURI().equals(AddressingVersion.W3C.nsUri) && child.getLocalName().equals("ReferenceParameters")) { NodeList refParams = child.getChildNodes(); @@ -249,8 +251,9 @@ public class EndpointReferenceUtil { Element wsdlDefinitions = null; for (int j = 0; j < metadata.getLength(); j++) { Node node = metadata.item(j); - if (node.getNodeType() != Node.ELEMENT_NODE) + if (node.getNodeType() != Node.ELEMENT_NODE) { continue; + } Element elm = (Element) node; if ((elm.getNamespaceURI().equals(AddressingVersion.W3C.wsdlNsUri) || @@ -264,13 +267,15 @@ public class EndpointReferenceUtil { String name = XmlUtil.getLocalPart(service); //if there is no service name then its not a valid EPR but lets continue as its optional anyway - if (name == null) + if (name == null) { continue; + } if (prefix != null) { String ns = elm.lookupNamespaceURI(prefix); - if (ns != null) + if (ns != null) { msEpr.serviceName.name = new QName(ns, name, prefix); + } } else { msEpr.serviceName.name = new QName(null, name); } @@ -285,13 +290,15 @@ public class EndpointReferenceUtil { String name = XmlUtil.getLocalPart(portType); //if there is no portType name then its not a valid EPR but lets continue as its optional anyway - if (name == null) + if (name == null) { continue; + } if (prefix != null) { String ns = elm.lookupNamespaceURI(prefix); - if (ns != null) + if (ns != null) { msEpr.portTypeName.name = new QName(ns, name, prefix); + } } else { msEpr.portTypeName.name = new QName(null, name); } @@ -372,18 +379,21 @@ public class EndpointReferenceUtil { NamedNodeMap nm = node.getAttributes(); for (int i = 0; i < nm.getLength(); i++) { - if (attribs == null) + if (attribs == null) { attribs = new HashMap(); + } Node n = nm.item(i); String prefix = fixNull(n.getPrefix()); String ns = fixNull(n.getNamespaceURI()); String localName = n.getLocalName(); - if (prefix.equals("xmlns") || prefix.length() == 0 && localName.equals("xmlns")) + if (prefix.equals("xmlns") || prefix.length() == 0 && localName.equals("xmlns")) { continue; + } //exclude some attributes - if (!localName.equals(AddressingVersion.W3C.eprType.portName)) + if (!localName.equals(AddressingVersion.W3C.eprType.portName)) { attribs.put(new QName(ns, localName, prefix), n.getNodeValue()); + } } return attribs; } @@ -391,8 +401,11 @@ public class EndpointReferenceUtil { private static @NotNull String fixNull(@Nullable String s) { - if (s == null) return ""; - else return s; + if (s == null) { + return ""; + } else { + return s; + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java index 1546a575970..7c2373ad40e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java index 30105743274..9fa0af73967 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/ProblemHeaderQName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java index a54fed6c8c5..324ef3077b6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java index f6fe2cdc49a..6fef6b845aa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CAddressingMetadataConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java index bc474c40b1b..b82ca7ff020 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaClientTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ package com.sun.xml.internal.ws.addressing; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.pipe.TubeCloner; @@ -58,7 +59,7 @@ public class W3CWsaClientTube extends WsaClientTube { // RelatesTo required as per // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) { - String action = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion); // Don't check for AddressingFaults as // Faults for requests with duplicate MessageId will have no wsa:RelatesTo if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java index 46c7ee4466c..75c075656b1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/W3CWsaServerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,12 +37,10 @@ import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException; import static com.sun.xml.internal.ws.addressing.W3CAddressingConstants.ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED; import static com.sun.xml.internal.ws.addressing.W3CAddressingConstants.ONLY_ANONYMOUS_ADDRESS_SUPPORTED; -import com.sun.xml.internal.ws.resources.AddressingMessages; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import javax.xml.ws.soap.AddressingFeature; -import javax.xml.ws.WebServiceException; /** * @author Rama Pulavarthi @@ -135,57 +133,4 @@ public class W3CWsaServerTube extends WsaServerTube{ } } - /* - @Override - protected boolean isAnonymousRequired(@Nullable WSDLBoundOperation wbo) { - return getResponseRequirement(wbo) == AddressingFeature.Responses.ANONYMOUS; - } - - private AddressingFeature.Responses getResponseRequirement(@Nullable WSDLBoundOperation wbo) { - if (af.getResponses() == AddressingFeature.Responses.ALL && wbo != null) { - //wsaw wsdl binding case will have some value set on wbo - WSDLBoundOperation.ANONYMOUS anon = wbo.getAnonymous(); - if (wbo.getAnonymous() == WSDLBoundOperation.ANONYMOUS.required) - return AddressingFeature.Responses.ANONYMOUS; - else if (wbo.getAnonymous() == WSDLBoundOperation.ANONYMOUS.prohibited) - return AddressingFeature.Responses.NON_ANONYMOUS; - else - return AddressingFeature.Responses.ALL; - - } else - return af.getResponses(); - } - - @Override - protected void checkAnonymousSemantics(WSDLBoundOperation wbo, WSEndpointReference replyTo, WSEndpointReference faultTo) { - String replyToValue = null; - String faultToValue = null; - - if (replyTo != null) - replyToValue = replyTo.getAddress(); - - if (faultTo != null) - faultToValue = faultTo.getAddress(); - AddressingFeature.Responses responseRequirement = getResponseRequirement(wbo); - - switch (responseRequirement) { - case NON_ANONYMOUS: - if (replyToValue != null && replyToValue.equals(addressingVersion.anonymousUri)) - throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED); - - if (faultToValue != null && faultToValue.equals(addressingVersion.anonymousUri)) - throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_NON_ANONYMOUS_ADDRESS_SUPPORTED); - break; - case ANONYMOUS: - if (replyToValue != null && !replyToValue.equals(addressingVersion.anonymousUri)) - throw new InvalidAddressingHeaderException(addressingVersion.replyToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED); - - if (faultToValue != null && !faultToValue.equals(addressingVersion.anonymousUri)) - throw new InvalidAddressingHeaderException(addressingVersion.faultToTag, ONLY_ANONYMOUS_ADDRESS_SUPPORTED); - break; - default: - // ALL: no check - } - } - */ } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java index 092b91dac07..f607f57fde3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WSEPRExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java index 233171fa77c..e0882b777a3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaActionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,27 +36,28 @@ import java.util.logging.Logger; * @author Rama Pulavarthi */ public class WsaActionUtil { + + @SuppressWarnings("FinalStaticMethod") public static final String getDefaultFaultAction(JavaMethod method, CheckedException ce) { String tns = method.getOwner().getTargetNamespace(); String delim = getDelimiter(tns); - if (tns.endsWith(delim)) + if (tns.endsWith(delim)) { tns = tns.substring(0, tns.length() - 1); - - //this assumes that fromjava case there won't be a standard fault name. - String name = method.getOperationName() + delim + "Fault" + delim + ce.getExceptionClass(); + } return new StringBuilder(tns).append(delim).append( method.getOwner().getPortTypeName().getLocalPart()).append( delim).append(method.getOperationName()).append(delim).append("Fault").append(delim).append(ce.getExceptionClass().getSimpleName()).toString(); } - private static final String getDelimiter(String tns) { + private static String getDelimiter(String tns) { String delim = "/"; // TODO: is this the correct way to find the separator ? try { URI uri = new URI(tns); - if ((uri.getScheme() != null) && uri.getScheme().equalsIgnoreCase("urn")) + if ((uri.getScheme() != null) && uri.getScheme().equalsIgnoreCase("urn")) { delim = ":"; + } } catch (URISyntaxException e) { LOGGER.warning("TargetNamespace of WebService is not a valid URI"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java index bc36cecfe75..41c158a37dd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaClientTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.xml.internal.ws.addressing; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.addressing.model.ActionNotSupportedException; import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; @@ -73,8 +74,9 @@ public class WsaClientTube extends WsaTube { if (response.getMessage() != null) { response = validateInboundHeaders(response); response.addSatellite(new WsaPropertyBag(addressingVersion,soapVersion,response)); - String msgId = response.getMessage().getHeaders(). - getMessageID(addressingVersion, soapVersion); + String msgId = AddressingUtils. + getMessageID(response.getMessage().getHeaders(), + addressingVersion, soapVersion); response.put(WsaPropertyBag.WSA_MSGID_FROM_REQUEST, msgId); } @@ -90,7 +92,9 @@ public class WsaClientTube extends WsaTube { if (wbo == null) return; - String gotA = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String gotA = AddressingUtils.getAction( + packet.getMessage().getHeaders(), + addressingVersion, soapVersion); if (gotA == null) throw new WebServiceException(AddressingMessages.VALIDATION_CLIENT_NULL_ACTION()); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java index a6adab7f40c..4cb0093b6ac 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaPropertyBag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,11 +25,12 @@ package com.sun.xml.internal.ws.addressing; +import com.oracle.webservices.internal.api.message.BasePropertySet; import com.sun.istack.internal.NotNull; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; @@ -38,6 +39,7 @@ import com.sun.xml.internal.ws.developer.JAXWSProperties; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; + /** * Provides access to the Addressing headers. * @@ -45,7 +47,7 @@ import javax.xml.stream.XMLStreamException; * @author Rama Pulavarthi * @since 2.1.3 */ -public class WsaPropertyBag extends PropertySet { +public class WsaPropertyBag extends BasePropertySet { public static final String WSA_REPLYTO_FROM_REQUEST = "com.sun.xml.internal.ws.addressing.WsaPropertyBag.ReplyToFromRequest"; public static final String WSA_FAULTTO_FROM_REQUEST = "com.sun.xml.internal.ws.addressing.WsaPropertyBag.FaultToFromRequest"; @@ -137,7 +139,7 @@ public class WsaPropertyBag extends PropertySet { if (packet.getMessage() == null) { return null; } - return packet.getMessage().getHeaders().getMessageID(addressingVersion,soapVersion); + return AddressingUtils.getMessageID(packet.getMessage().getHeaders(), addressingVersion,soapVersion); } private WSEndpointReference getEPR(QName tag) throws XMLStreamException { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java index b0dc6583056..92fc5c67152 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaServerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,13 +32,12 @@ import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.WSService; -import com.sun.xml.internal.ws.api.client.WSPortInfo; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.NonAnonymousResponseProcessor; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; -import com.sun.xml.internal.ws.api.message.HeaderList; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.message.Messages; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; @@ -47,19 +46,13 @@ import com.sun.xml.internal.ws.api.pipe.*; import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.client.Stub; import com.sun.xml.internal.ws.developer.JAXWSProperties; -import com.sun.xml.internal.ws.developer.WSBindingProvider; import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; import com.sun.xml.internal.ws.message.FaultDetailHeader; import com.sun.xml.internal.ws.resources.AddressingMessages; -import com.sun.xml.internal.ws.binding.BindingImpl; import javax.xml.soap.SOAPFault; -import javax.xml.ws.AsyncHandler; -import javax.xml.ws.Dispatch; -import javax.xml.ws.Response; import javax.xml.ws.WebServiceException; import java.net.URI; -import java.util.concurrent.ExecutionException; import java.util.logging.Level; import java.util.logging.Logger; @@ -97,6 +90,7 @@ public class WsaServerTube extends WsaTube { endpoint = that.endpoint; } + @Override public WsaServerTube copy(TubeCloner cloner) { return new WsaServerTube(this, cloner); } @@ -104,7 +98,9 @@ public class WsaServerTube extends WsaTube { @Override public @NotNull NextAction processRequest(Packet request) { Message msg = request.getMessage(); - if(msg==null) return doInvoke(next,request); // hmm? + if (msg == null) { + return doInvoke(next,request); + } // hmm? // expose bunch of addressing related properties for advanced applications request.addSatellite(new WsaPropertyBag(addressingVersion,soapVersion,request)); @@ -113,12 +109,12 @@ public class WsaServerTube extends WsaTube { // so that they can be used after responsePacket is received. // These properties are used if a fault is thrown from the subsequent Pipe/Tubes. - HeaderList hl = request.getMessage().getHeaders(); + MessageHeaders hl = request.getMessage().getHeaders(); String msgId; try { - replyTo = hl.getReplyTo(addressingVersion, soapVersion); - faultTo = hl.getFaultTo(addressingVersion, soapVersion); - msgId = hl.getMessageID(addressingVersion, soapVersion); + replyTo = AddressingUtils.getReplyTo(hl, addressingVersion, soapVersion); + faultTo = AddressingUtils.getFaultTo(hl, addressingVersion, soapVersion); + msgId = AddressingUtils.getMessageID(hl, addressingVersion, soapVersion); } catch (InvalidAddressingHeaderException e) { LOGGER.log(Level.WARNING, addressingVersion.getInvalidMapText()+", Problem header:" + e.getProblemHeader()+ ", Reason: "+ e.getSubsubcode(),e); @@ -144,8 +140,12 @@ public class WsaServerTube extends WsaTube { } // defaulting - if (replyTo == null) replyTo = addressingVersion.anonymousEpr; - if (faultTo == null) faultTo = replyTo; + if (replyTo == null) { + replyTo = addressingVersion.anonymousEpr; + } + if (faultTo == null) { + faultTo = replyTo; + } // Save a copy into the packet such that we can save it with that // packet if we're going to deliver the response at a later time @@ -160,9 +160,9 @@ public class WsaServerTube extends WsaTube { Packet p = validateInboundHeaders(request); // if one-way message and WS-A header processing fault has occurred, // then do no further processing - if (p.getMessage() == null) - // request message is invalid, exception is logged by now and response is sent back with null message + if (p.getMessage() == null) { return doReturnWith(p); + } // if we find an error in addressing header, just turn around the direction here if (p.getMessage().isFault()) { @@ -197,19 +197,30 @@ public class WsaServerTube extends WsaTube { @Override public @NotNull NextAction processException(Throwable t) { - Packet response = Fiber.current().getPacket(); - return processResponse(response.createServerResponse( - SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, t), - wsdlPort, response.endpoint.getSEIModel(), binding)); + final Packet response = Fiber.current().getPacket(); + ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class); + if (tc == null) { + tc = new ThrowableContainerPropertySet(t); + response.addSatellite(tc); + } else if (t != tc.getThrowable()) { + // This is a pathological case where an exception happens after a previous exception. + // Make sure you report the latest one. + tc.setThrowable(t); + } + return processResponse(response.endpoint.createServiceResponseForException(tc, response, soapVersion, wsdlPort, + response.endpoint.getSEIModel(), + binding)); } @Override public @NotNull NextAction processResponse(Packet response) { Message msg = response.getMessage(); - if (msg ==null) - return doReturnWith(response); // one way message. Nothing to see here. Move on. + if (msg ==null) { + return doReturnWith(response); + } // one way message. Nothing to see here. Move on. - String to = msg.getHeaders().getTo(addressingVersion, soapVersion); + String to = AddressingUtils.getTo(msg.getHeaders(), + addressingVersion, soapVersion); if (to != null) { replyTo = faultTo = new WSEndpointReference(to, addressingVersion); } @@ -234,17 +245,14 @@ public class WsaServerTube extends WsaTube { get(WsaPropertyBag.WSA_FAULTTO_FROM_REQUEST); } - WSEndpointReference target = msg.isFault()?faultTo:replyTo; - + WSEndpointReference target = msg.isFault() ? faultTo : replyTo; if (target == null && response.proxy instanceof Stub) { target = ((Stub) response.proxy).getWSEndpointReference(); } - - if(target.isAnonymous() || isAnonymousRequired ) - // the response will go back the back channel. most common case + if (target == null || target.isAnonymous() || isAnonymousRequired) { return doReturnWith(response); - - if(target.isNone()) { + } + if (target.isNone()) { // the caller doesn't want to hear about it, so proceed like one-way response.setMessage(null); return doReturnWith(response); @@ -297,18 +305,23 @@ public class WsaServerTube extends WsaTube { //For instance this may be a RM CreateSequence message. WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet); - if (wsdlBoundOperation == null) + if (wsdlBoundOperation == null) { return; + } - String gotA = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String gotA = AddressingUtils.getAction( + packet.getMessage().getHeaders(), + addressingVersion, soapVersion); - if (gotA == null) + if (gotA == null) { throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION()); + } String expected = helper.getInputAction(packet); String soapAction = helper.getSOAPAction(packet); - if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals(""))) + if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals(""))) { expected = soapAction; + } if (expected != null && !gotA.equals(expected)) { throw new ActionNotSupportedException(gotA); @@ -326,6 +339,7 @@ public class WsaServerTube extends WsaTube { checkNonAnonymousAddresses(replyTo,faultTo); } + @SuppressWarnings("ResultOfObjectAllocationIgnored") private void checkNonAnonymousAddresses(WSEndpointReference replyTo, WSEndpointReference faultTo) { if (!replyTo.isAnonymous()) { try { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java index 36571430d59..c74ce1ed33b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,8 +30,8 @@ import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Messages; @@ -43,21 +43,16 @@ import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.pipe.TubeCloner; import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl; import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; -import com.sun.xml.internal.ws.developer.WSBindingProvider; import com.sun.xml.internal.ws.message.FaultDetailHeader; import com.sun.xml.internal.ws.resources.AddressingMessages; -import com.sun.xml.internal.ws.binding.BindingImpl; import javax.xml.namespace.QName; import javax.xml.soap.SOAPFault; import javax.xml.stream.XMLStreamException; import javax.xml.ws.WebServiceException; -import javax.xml.ws.Binding; import javax.xml.ws.soap.AddressingFeature; import javax.xml.ws.soap.SOAPBinding; import java.util.Iterator; -import java.util.Set; -import java.util.Arrays; import java.util.logging.Logger; import java.util.logging.Level; @@ -107,16 +102,15 @@ abstract class WsaTube extends AbstractFilterTubeImpl { } private void addKnownHeadersToBinding(WSBinding binding) { - Set headerQNames = binding.getKnownHeaders(); for (AddressingVersion addrVersion: AddressingVersion.values()) { - headerQNames.add(addrVersion.actionTag); - headerQNames.add(addrVersion.faultDetailTag); - headerQNames.add(addrVersion.faultToTag); - headerQNames.add(addrVersion.fromTag); - headerQNames.add(addrVersion.messageIDTag); - headerQNames.add(addrVersion.relatesToTag); - headerQNames.add(addrVersion.replyToTag); - headerQNames.add(addrVersion.toTag); + binding.addKnownHeader(addrVersion.actionTag); + binding.addKnownHeader(addrVersion.faultDetailTag); + binding.addKnownHeader(addrVersion.faultToTag); + binding.addKnownHeader(addrVersion.fromTag); + binding.addKnownHeader(addrVersion.messageIDTag); + binding.addKnownHeader(addrVersion.relatesToTag); + binding.addKnownHeader(addrVersion.replyToTag); + binding.addKnownHeader(addrVersion.toTag); } } @@ -206,7 +200,9 @@ abstract class WsaTube extends AbstractFilterTubeImpl { if (packet.getMessage().getHeaders() != null) return false; - String action = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String action = AddressingUtils.getAction( + packet.getMessage().getHeaders(), + addressingVersion, soapVersion); if (action == null) return true; @@ -370,7 +366,9 @@ abstract class WsaTube extends AbstractFilterTubeImpl { } protected void validateSOAPAction(Packet packet) { - String gotA = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String gotA = AddressingUtils.getAction( + packet.getMessage().getHeaders(), + addressingVersion, soapVersion); if (gotA == null) throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION()); if(packet.soapAction != null && !packet.soapAction.equals("\"\"") && !packet.soapAction.equals("\""+gotA+"\"")) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java index 72009b92239..0a0c10c312b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; -import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLFault; @@ -39,6 +39,7 @@ import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.model.SEIModel; import com.sun.xml.internal.ws.api.model.JavaMethod; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.model.wsdl.WSDLOperationImpl; import com.sun.xml.internal.ws.model.JavaMethodImpl; import com.sun.xml.internal.ws.model.CheckedExceptionImpl; @@ -53,7 +54,6 @@ import javax.xml.soap.SOAPFactory; import javax.xml.soap.SOAPFault; import javax.xml.soap.SOAPMessage; import javax.xml.ws.WebServiceException; -import java.util.Map; /** * @author Rama Pulavarthi @@ -75,14 +75,15 @@ public abstract class WsaTubeHelper { if(seiModel != null) { action = getFaultActionFromSEIModel(requestPacket,responsePacket); } - if(action != null) + if (action != null) { return action; - else + } else { action = addVer.getDefaultFaultAction(); + } if (wsdlPort != null) { - QName wsdlOp = requestPacket.getWSDLOperation(); + WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping(); if (wsdlOp != null) { - WSDLBoundOperation wbo = wsdlPort.getBinding().get(wsdlOp); + WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation(); return getFaultAction(wbo, responsePacket); } } @@ -91,29 +92,34 @@ public abstract class WsaTubeHelper { String getFaultActionFromSEIModel(Packet requestPacket, Packet responsePacket) { String action = null; - if (seiModel == null || wsdlPort == null) + if (seiModel == null || wsdlPort == null) { return action; + } try { SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage(); - if (sm == null) + if (sm == null) { return action; + } - if (sm.getSOAPBody() == null) + if (sm.getSOAPBody() == null) { return action; + } - if (sm.getSOAPBody().getFault() == null) + if (sm.getSOAPBody().getFault() == null) { return action; + } Detail detail = sm.getSOAPBody().getFault().getDetail(); - if (detail == null) + if (detail == null) { return action; + } String ns = detail.getFirstChild().getNamespaceURI(); String name = detail.getFirstChild().getLocalName(); - QName wsdlOp = requestPacket.getWSDLOperation(); - JavaMethodImpl jm = (JavaMethodImpl) seiModel.getJavaMethodForWsdlOperation(wsdlOp); + WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping(); + JavaMethodImpl jm = (wsdlOp != null) ? (JavaMethodImpl)wsdlOp.getJavaMethod() : null; if (jm != null) { for (CheckedExceptionImpl ce : jm.getCheckedExceptions()) { if (ce.getDetailType().tagName.getLocalPart().equals(name) && @@ -129,28 +135,34 @@ public abstract class WsaTubeHelper { } String getFaultAction(@Nullable WSDLBoundOperation wbo, Packet responsePacket) { - String action = responsePacket.getMessage().getHeaders().getAction(addVer, soapVer); - if (action != null) - return action; + String action = AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), addVer, soapVer); + if (action != null) { + return action; + } action = addVer.getDefaultFaultAction(); - if (wbo == null) + if (wbo == null) { return action; + } try { SOAPMessage sm = responsePacket.getMessage().copy().readAsSOAPMessage(); - if (sm == null) + if (sm == null) { return action; + } - if (sm.getSOAPBody() == null) + if (sm.getSOAPBody() == null) { return action; + } - if (sm.getSOAPBody().getFault() == null) + if (sm.getSOAPBody().getFault() == null) { return action; + } Detail detail = sm.getSOAPBody().getFault().getDetail(); - if (detail == null) + if (detail == null) { return action; + } String ns = detail.getFirstChild().getNamespaceURI(); String name = detail.getFirstChild().getLocalName(); @@ -158,10 +170,10 @@ public abstract class WsaTubeHelper { WSDLOperation o = wbo.getOperation(); WSDLFault fault = o.getFault(new QName(ns, name)); - if (fault == null) + if (fault == null) { return action; + } - WSDLOperationImpl impl = (WSDLOperationImpl)o; action = fault.getAction(); return action; @@ -174,9 +186,9 @@ public abstract class WsaTubeHelper { String action = null; if (wsdlPort != null) { - QName wsdlOp = packet.getWSDLOperation(); + WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping(); if (wsdlOp != null) { - WSDLBoundOperation wbo = wsdlPort.getBinding().get(wsdlOp); + WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation(); WSDLOperation op = wbo.getOperation(); action = op.getInput().getAction(); } @@ -194,18 +206,20 @@ public abstract class WsaTubeHelper { */ public String getEffectiveInputAction(Packet packet) { //non-default SOAPAction beomes wsa:action - if(packet.soapAction != null && !packet.soapAction.equals("")) - return packet.soapAction; - String action = null; + if(packet.soapAction != null && !packet.soapAction.equals("")) { + return packet.soapAction; + } + String action; if (wsdlPort != null) { - QName wsdlOp = packet.getWSDLOperation(); + WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping(); if (wsdlOp != null) { - WSDLBoundOperation wbo = wsdlPort.getBinding().get(wsdlOp); + WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation(); WSDLOperation op = wbo.getOperation(); action = op.getInput().getAction(); - } else + } else { action = packet.soapAction; + } } else { action = packet.soapAction; } @@ -213,12 +227,14 @@ public abstract class WsaTubeHelper { } public boolean isInputActionDefault(Packet packet) { - if (wsdlPort == null) + if (wsdlPort == null) { return false; - QName wsdlOp = packet.getWSDLOperation(); - if(wsdlOp == null) + } + WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping(); + if(wsdlOp == null) { return false; - WSDLBoundOperation wbo = wsdlPort.getBinding().get(wsdlOp); + } + WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation(); WSDLOperation op = wbo.getOperation(); return ((WSDLOperationImpl) op).getInput().isDefaultAction(); @@ -227,17 +243,20 @@ public abstract class WsaTubeHelper { public String getSOAPAction(Packet packet) { String action = ""; - if (packet == null || packet.getMessage() == null) + if (packet == null || packet.getMessage() == null) { return action; + } - if (wsdlPort == null) + if (wsdlPort == null) { return action; + } - QName opName = packet.getWSDLOperation(); - if(opName == null) + WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping(); + if (wsdlOp == null) { return action; + } - WSDLBoundOperation op = wsdlPort.getBinding().get(opName); + WSDLBoundOperation op = wsdlOp.getWSDLBoundOperation(); action = op.getSOAPAction(); return action; } @@ -245,18 +264,17 @@ public abstract class WsaTubeHelper { public String getOutputAction(Packet packet) { //String action = AddressingVersion.UNSET_OUTPUT_ACTION; String action = null; - QName wsdlOp = packet.getWSDLOperation(); + WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping(); if (wsdlOp != null) { - if (seiModel != null) { - JavaMethodImpl jm = (JavaMethodImpl) seiModel.getJavaMethodForWsdlOperation(wsdlOp); + JavaMethod javaMethod = wsdlOp.getJavaMethod(); + if (javaMethod != null) { + JavaMethodImpl jm = (JavaMethodImpl) javaMethod; if (jm != null && jm.getOutputAction() != null && !jm.getOutputAction().equals("")) { return jm.getOutputAction(); } } - if (wsdlPort != null) { - WSDLBoundOperation wbo = wsdlPort.getBinding().get(wsdlOp); - return getOutputAction(wbo); - } + WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation(); + if (wbo != null) return getOutputAction(wbo); } return action; } @@ -265,8 +283,9 @@ public abstract class WsaTubeHelper { String action = AddressingVersion.UNSET_OUTPUT_ACTION; if (wbo != null) { WSDLOutput op = wbo.getOperation().getOutput(); - if (op != null) + if (op != null) { action = op.getAction(); + } } return action; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java index 00a76d9a290..5f0aec094ef 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/WsaTubeHelperImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java index 21d2b0ceaff..75a4155f30c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/ActionNotSupportedException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java index d6ae04750a9..937ab7724fb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/InvalidAddressingHeaderException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java index 8b8bc5c1190..9ee6ec32f71 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/model/MissingAddressingHeaderException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java index 03095c48334..f7096d828b3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingFeatureConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java index 501ce9f0207..1033c5a0c85 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyMapConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java index 060dea7b757..8879306a76c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPolicyValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java index 9a41ffdb6e8..5dcd9b51dd5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/policy/AddressingPrefixMapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java index 6b0305d7216..b0e38d290cb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionAddressingConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,8 @@ public interface MemberSubmissionAddressingConstants { public static final String WSA_NAMESPACE_WSDL_NAME = WSA_NAMESPACE_NAME; public static final String WSA_NAMESPACE_POLICY_NAME = "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"; + public static final QName WSA_ACTION_QNAME = new QName(WSA_NAMESPACE_NAME,"Action"); + public static final String WSA_SERVICENAME_NAME = "ServiceName"; public static final String WSA_PORTTYPE_NAME = "PortType"; public static final String WSA_PORTNAME_NAME = "PortName"; @@ -44,6 +46,9 @@ public interface MemberSubmissionAddressingConstants { public static final String WSA_ADDRESS_NAME = "Address"; public static final QName WSA_ADDRESS_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_ADDRESS_NAME); + public static final String WSA_EPR_NAME = "EndpointReference"; + public static final QName WSA_EPR_QNAME = new QName(WSA_NAMESPACE_NAME, WSA_EPR_NAME); + public static final String WSA_ANONYMOUS_ADDRESS = WSA_NAMESPACE_NAME + "/role/anonymous"; public static final String WSA_NONE_ADDRESS = ""; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java index e5cdff2b8d8..755fa614a4d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaClientTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import com.sun.xml.internal.ws.addressing.WsaClientTube; import com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.pipe.TubeCloner; @@ -72,7 +73,7 @@ public class MemberSubmissionWsaClientTube extends WsaClientTube { // RelatesTo required as per // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) { - String action = packet.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion); // Don't check for AddressingFaults as // Faults for requests with duplicate MessageId will have no wsa:RelatesTo if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java index 203fc587d37..c4c03b65fd3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/MemberSubmissionWsaServerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java index 69cf26d9565..597377c2bae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java index 71591343723..2fed08ba9b3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/ProblemHeaderQName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java index 98b6b461924..32bbca007f8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/addressing/v200408/WsaTubeHelperImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java index 4c8aaac3857..9ef2aea857b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingID.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,10 +35,8 @@ import com.sun.xml.internal.ws.binding.WebServiceFeatureList; import com.sun.xml.internal.ws.encoding.SOAPBindingCodec; import com.sun.xml.internal.ws.encoding.XMLHTTPBindingCodec; import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants; -import com.sun.xml.internal.ws.encoding.soap.streaming.SOAP12NamespaceConstants; import com.sun.xml.internal.ws.util.ServiceFinder; import com.sun.xml.internal.ws.developer.JAXWSProperties; -import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.toFeatureArray; import javax.xml.ws.BindingType; import javax.xml.ws.WebServiceException; @@ -157,6 +155,7 @@ public abstract class BindingID { * @return * Always non-null same value. */ + @Override public abstract String toString(); /** @@ -218,12 +217,14 @@ public abstract class BindingID { /** * Compares the equality based on {@link #toString()}. */ + @Override public boolean equals(Object obj) { if(!(obj instanceof BindingID)) return false; return toString().equals(obj.toString()); } + @Override public int hashCode() { return toString().hashCode(); } @@ -353,6 +354,7 @@ public abstract class BindingID { * Constant that represents REST. */ public static final BindingID XML_HTTP = new Impl(SOAPVersion.SOAP_11, HTTPBinding.HTTP_BINDING,false) { + @Override public Codec createEncoder(WSBinding binding) { return new XMLHTTPBindingCodec(binding.getFeatures()); } @@ -362,6 +364,7 @@ public abstract class BindingID { * Constant that represents REST. */ private static final BindingID REST_HTTP = new Impl(SOAPVersion.SOAP_11, JAXWSProperties.REST_BINDING,true) { + @Override public Codec createEncoder(WSBinding binding) { return new XMLHTTPBindingCodec(binding.getFeatures()); } @@ -378,15 +381,18 @@ public abstract class BindingID { this.canGenerateWSDL = canGenerateWSDL; } + @Override public SOAPVersion getSOAPVersion() { return version; } + @Override public String toString() { return lexical; } @Deprecated + @Override public boolean canGenerateWSDL() { return canGenerateWSDL; } @@ -399,7 +405,6 @@ public abstract class BindingID { /*final*/ Map parameters = new HashMap(); static final String MTOM_PARAM = "mtom"; - Boolean mtomSetting = null; public SOAPHTTPImpl(SOAPVersion version, String lexical, boolean canGenerateWSDL) { super(version, lexical, canGenerateWSDL); @@ -410,10 +415,9 @@ public abstract class BindingID { this(version, lexical, canGenerateWSDL); String mtomStr = mtomEnabled ? "true" : "false"; parameters.put(MTOM_PARAM, mtomStr); - mtomSetting = mtomEnabled; } - public @NotNull Codec createEncoder(WSBinding binding) { + public @NotNull @Override Codec createEncoder(WSBinding binding) { return new SOAPBindingCodec(binding.getFeatures()); } @@ -422,6 +426,7 @@ public abstract class BindingID { return mtom==null?null:Boolean.valueOf(mtom); } + @Override public WebServiceFeatureList createBuiltinFeatureList() { WebServiceFeatureList r=super.createBuiltinFeatureList(); Boolean mtom = isMTOMEnabled(); @@ -430,10 +435,16 @@ public abstract class BindingID { return r; } + @Override public String getParameter(String parameterName, String defaultValue) { if (parameters.get(parameterName) == null) return super.getParameter(parameterName, defaultValue); return parameters.get(parameterName); } + + @Override + public SOAPHTTPImpl clone() throws CloneNotSupportedException { + return (SOAPHTTPImpl) super.clone(); + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java index 9a2cc06d518..802be8dd0a5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/BindingIDFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -63,4 +63,27 @@ public abstract class BindingIDFactory { * {@link BindingID#parse(String)} will throw the exception. */ public abstract @Nullable BindingID parse(@NotNull String lexical) throws WebServiceException; + + /** + * Creates a {@link BindingID} for given transport and SOAPVersion. + * + * @return + * a non-null return value would cause the JAX-WS RI to consider + * the creation to be successful. No furhter {@link BindingIDFactory} + * will be consulted. + * + *

+ * Retruning a null value indicates that this factory doesn't understand + * the transport, in which case the JAX-WS RI will keep asking next + * {@link BindingIDFactory}. + * + * @throws WebServiceException + * if the implementation understood the transport but it is not correct, + * this exception can be thrown to abort the creation with error. + * No further {@link BindingIDFactory} will be consulted, and + * {@link BindingID#create(String, SOAPVersion)} will throw the exception. + */ + public @Nullable BindingID create(@NotNull String transport, @NotNull SOAPVersion soapVersion) throws WebServiceException { + return null; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java index 57718aea2ca..5cb71bb0ac0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Cancelable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java index 14b3fd6fe16..296eea6de24 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/Component.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,7 @@ package com.sun.xml.internal.ws.api; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.server.WSEndpoint; /** * Interface that allows components to hook up with each other. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java index 4b3db2431d3..1185fdbefb0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ public interface ComponentEx extends Component { *

* This method works as a kind of directory service * for SPIs, allowing various components to define private contract - * and talk to each other. However unlike {@link Component.getSPI}, this + * and talk to each other. However unlike {@link Component#getSPI(java.lang.Class)}, this * method can support cases where there is an ordered collection (defined * by {@link Iterable} of implementations. The SPI contract should define * whether lookups are for the first appropriate implementation or whether diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java index 9baa409957e..ab455bfeadb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,9 @@ package com.sun.xml.internal.ws.api; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.WSEndpoint; +import com.sun.xml.internal.ws.client.Stub; import javax.xml.ws.WebServiceFeature; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java index 07569c042d9..faa47f06341 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,7 +32,7 @@ import com.sun.istack.internal.NotNull; /** * Registry for component delegates. It is expected that implementations of * ComponentRegistry will delegate to registered {@link Component}s in its own - * implementation of {@link Component.getSPI}, either before or after it + * implementation of {@link Component#getSPI(java.lang.Class)}, either before or after it * considers its own SPI implementations. * * @since 2.2.6 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java new file mode 100644 index 00000000000..4e0488c500b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ComponentsFeature.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api; + +import java.util.List; + +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.WSEndpoint; +import com.sun.xml.internal.ws.client.Stub; +import javax.xml.ws.WebServiceFeature; + +/** + * Allows registration of multiple {@link Component}s against the {@link ComponentRegistry} implementations + * of the {@link Container}, {@link WSEndpoint}, {@link WSService}, or {@link Stub}. The + * registration is guaranteed to occur early in the initialization of these objects prior to tubeline creation + * (applicable to endpoint and stub only). + *

+ * Because the Container is shared among all Stubs created from a common WSService object, this feature must + * be passed during WSService initialization in order to register a Component against the client-side Container. + *

+ * IllegalArgumentException will be thrown if the feature is used with an inappropriate target, e.g. stub target + * used during WSEndpoint initialization. + * + * @since 2.2.8 + */ +public class ComponentsFeature extends WebServiceFeature implements ServiceSharedFeatureMarker { + private final List componentFeatures; + + /** + * Constructs ComponentFeature with indicated component and target + * @param component component + * @param target target + */ + public ComponentsFeature(List componentFeatures) { + this.enabled = true; + this.componentFeatures = componentFeatures; + } + + @Override + public String getID() { + return ComponentsFeature.class.getName(); + } + + /** + * Retrieves component + * @return component + */ + public List getComponentFeatures() { + return componentFeatures; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java index 5a4d88173f9..90a969266ba 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/DistributedPropertySet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,163 +26,40 @@ package com.sun.xml.internal.ws.api; import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.api.message.Packet; -import com.sun.xml.internal.ws.client.RequestContext; -import com.sun.xml.internal.ws.client.ResponseContext; - -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; -import javax.xml.ws.WebServiceContext; -import java.util.Map.Entry; -import java.util.IdentityHashMap; -import java.util.Map; -import java.util.Set; /** - * {@link PropertySet} that combines properties exposed from multiple - * {@link PropertySet}s into one. - * - *

- * This implementation allows one {@link PropertySet} to assemble - * all properties exposed from other "satellite" {@link PropertySet}s. - * (A satellite may itself be a {@link DistributedPropertySet}, so - * in general this can form a tree.) - * - *

- * This is useful for JAX-WS because the properties we expose to the application - * are contributed by different pieces, and therefore we'd like each of them - * to have a separate {@link PropertySet} implementation that backs up - * the properties. For example, this allows FastInfoset to expose its - * set of properties to {@link RequestContext} by using a strongly-typed fields. - * - *

- * This is also useful for a client-side transport to expose a bunch of properties - * into {@link ResponseContext}. It simply needs to create a {@link PropertySet} - * object with methods for each property it wants to expose, and then add that - * {@link PropertySet} to {@link Packet}. This allows property values to be - * lazily computed (when actually asked by users), thus improving the performance - * of the typical case where property values are not asked. - * - *

- * A similar benefit applies on the server-side, for a transport to expose - * a bunch of properties to {@link WebServiceContext}. - * - *

- * To achieve these benefits, access to {@link DistributedPropertySet} is slower - * compared to {@link PropertySet} (such as get/set), while adding a satellite - * object is relatively fast. + * Placeholder for backwards compatibility. * + * @deprecated Use com.oracle.webservices.internal.api.message.DistributedPropertySet instead. * @author Kohsuke Kawaguchi */ -public abstract class DistributedPropertySet - extends PropertySet - implements com.sun.xml.internal.org.jvnet.ws.message.DistributedPropertySet -{ +public abstract class DistributedPropertySet extends com.oracle.webservices.internal.api.message.BaseDistributedPropertySet { + /** - * All {@link PropertySet}s that are bundled into this {@link PropertySet}. + * @deprecated */ - private final Map satellites = new IdentityHashMap(); - public void addSatellite(@NotNull PropertySet satellite) { - addSatellite(satellite.getClass(), satellite); + super.addSatellite(satellite); } + /** + * @deprecated + */ public void addSatellite(@NotNull Class keyClass, @NotNull PropertySet satellite) { - satellites.put(keyClass, satellite); + super.addSatellite(keyClass, satellite); } + /** + * @deprecated + */ public void copySatelliteInto(@NotNull DistributedPropertySet r) { - r.satellites.putAll(this.satellites); + super.copySatelliteInto(r); } - public @Nullable T getSatellite(Class satelliteClass) { - T satellite = (T) satellites.get(satelliteClass); - if (satellite != null) - return satellite; - - for (PropertySet child : satellites.values()) { - if (satelliteClass.isInstance(child)) { - return satelliteClass.cast(child); - } - - if (DistributedPropertySet.class.isInstance(child)) { - satellite = DistributedPropertySet.class.cast(child).getSatellite(satelliteClass); - if (satellite != null) { - return satellite; - } - } - } - return null; - } - - @Override - public Object get(Object key) { - // check satellites - for (PropertySet child : satellites.values()) { - if(child.supports(key)) - return child.get(key); - } - - // otherwise it must be the master - return super.get(key); - } - - @Override - public Object put(String key, Object value) { - // check satellites - for (PropertySet child : satellites.values()) { - if(child.supports(key)) - return child.put(key,value); - } - - // otherwise it must be the master - return super.put(key,value); - } - - @Override - public boolean supports(Object key) { - // check satellites - for (PropertySet child : satellites.values()) { - if(child.supports(key)) - return true; - } - - return super.supports(key); - } - - @Override - public Object remove(Object key) { - // check satellites - for (PropertySet child : satellites.values()) { - if(child.supports(key)) - return child.remove(key); - } - - return super.remove(key); - } - - @Override - /*package*/ void createEntrySet(Set> core) { - super.createEntrySet(core); - for (PropertySet child : satellites.values()) { - child.createEntrySet(core); - } - } - - public void addSatellite(com.sun.xml.internal.org.jvnet.ws.message.PropertySet satellite) { - addSatellite((PropertySet)satellite); - } - - public void addSatellite(@NotNull Class keyClass, @NotNull com.sun.xml.internal.org.jvnet.ws.message.PropertySet satellite) { - addSatellite(keyClass, (PropertySet)satellite); - } - - public void removeSatellite(com.sun.xml.internal.org.jvnet.ws.message.PropertySet satellite) { - removeSatellite((PropertySet)satellite); - } - - public void copySatelliteInto(com.sun.xml.internal.org.jvnet.ws.message.MessageContext r) { - copySatelliteInto((DistributedPropertySet)r); + /** + * @deprecated + */ + public void removeSatellite(PropertySet satellite) { + super.removeSatellite(satellite); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java index 81251bbfb02..edc112e5fbe 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/EndpointAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package com.sun.xml.internal.ws.api; - import com.sun.istack.internal.Nullable; import javax.xml.ws.WebServiceException; @@ -155,6 +154,7 @@ public final class EndpointAddress { ProxySelector sel = java.security.AccessController.doPrivileged( new java.security.PrivilegedAction() { + @Override public ProxySelector run() { return ProxySelector.getDefault(); } @@ -209,7 +209,6 @@ public final class EndpointAddress { * if the code is written correctly this shall never happen. */ public URLConnection openConnection() throws IOException { - assert url!=null : uri+" doesn't have the corresponding URL"; if (url == null) { throw new WebServiceException("URI="+uri+" doesn't have the corresponding URL"); } @@ -226,6 +225,7 @@ public final class EndpointAddress { return url.openConnection(); } + @Override public String toString() { return stringForm; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java index c1a7ce8eeca..30e82c69792 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureConstructor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java new file mode 100644 index 00000000000..7f5c792bd2c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidator.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api; + +import javax.xml.ws.WebServiceFeature; +import javax.xml.ws.WebServiceException; + +/** + * Validates a list of {@link WebServiceFeature} instances when they are added to + * the client or service binding. + *

+ * {@link WebServiceFeature} classes may specify validator beans using {@link FeatureListValidatorAnnotation}. + *

+ * Current behavior will allow runtime components to add features to the binding after initial validation; however, + * this behavior is discouraged and will not be supported in later releases of the reference + * implementation. + * + * @since 2.2.8 + * @see FeatureListValidatorAnnotation + */ +public interface FeatureListValidator { + /** + * Validates feature list. Implementations should throw {@link WebServiceException} if the + * list of features is invalid. Implementations may add features to the list or make other + * changes; however, only validators belonging to features on the original list will be + * invoked. + * + * @param list feature list + */ + public void validate(WSFeatureList list); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java new file mode 100644 index 00000000000..ef5d9fa0991 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/FeatureListValidatorAnnotation.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +import javax.xml.ws.WebServiceFeature; + +/** + * This annotation should be used on classes that extend {@link WebServiceFeature} in + * order to specify the type of {@link FeatureListValidator} bean that will be invoked when + * instances of the {@link WebServiceFeature} class are included in the list of features + * that are added to a client or service binding. + * + * @since 2.2.8 + */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface FeatureListValidatorAnnotation { + /** + * The FeatureListValidator bean that is associated + * with the FeatureListValidator annotation + */ + Class bean(); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java index 5fd33f41b94..5f3aea625f1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ImpliesWebServiceFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,6 +38,7 @@ package com.sun.xml.internal.ws.api; * user had already specified a different addressing version. * * @since 2.2.6 + * @deprecated use {@link FeatureListValidatorAnnotation} */ public interface ImpliesWebServiceFeature { /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java index 8abd867239f..d0d171be171 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/PropertySet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,256 +25,35 @@ package com.sun.xml.internal.ws.api; -import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.util.ReadOnlyPropertyException; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.AbstractMap; -import java.util.HashMap; -import java.util.HashSet; import java.util.Map; -import java.util.Map.Entry; import java.util.Set; +import java.util.Map.Entry; /** - * A set of "properties" that can be accessed via strongly-typed fields - * as well as reflexibly through the property name. + * Placeholder for backwards compatibility. * - * @author Kohsuke Kawaguchi + * @deprecated Use com.oracle.webservices.internal.api.message.PropertySet instead. + * @author snajper */ -@SuppressWarnings("SuspiciousMethodCalls") -public abstract class PropertySet implements com.sun.xml.internal.org.jvnet.ws.message.PropertySet { - +public abstract class PropertySet extends com.oracle.webservices.internal.api.message.BasePropertySet { /** - * Creates a new instance of TypedMap. - */ - protected PropertySet() {} - - /** - * Represents the list of strongly-typed known propertyies + * Represents the list of strongly-typed known properties * (keyed by property names.) * *

* Just giving it an alias to make the use of this class more fool-proof. + * @deprecated */ - protected static final class PropertyMap extends HashMap {} + protected static class PropertyMap extends com.oracle.webservices.internal.api.message.BasePropertySet.PropertyMap {} /** - * Map representing the Fields and Methods annotated with {@link Property}. - * Model of {@link PropertySet} class. - * - *

- * At the end of the derivation chain this method just needs to be implemented - * as: - * - *

-     * private static final PropertyMap model;
-     * static {
-     *   model = parse(MyDerivedClass.class);
-     * }
-     * protected PropertyMap getPropertyMap() {
-     *   return model;
-     * }
-     * 
- */ - protected abstract PropertyMap getPropertyMap(); - - // maybe we can use this some time - ///** - // * If all the properties defined on this {@link PropertySet} has a certain prefix - // * (such as, say, "javax.xml.ws.http."), then return it. - // * - // *

- // * Returning a non-null name from this method allows methods like - // * {@link #get(Object)} and {@link #put(String, Object)} to work faster. - // * This is especially so with {@link DistributedPropertySet}, so implementations - // * are encouraged to set a common prefix, as much as possible. - // * - // *

- // * Currently, this is used only by {@link DistributedPropertySet}. - // * - // * @return - // * Null if no such common prefix exists. Otherwise string like - // * "javax.xml.ws.http." (the dot at the last is usually preferrable, - // * so that properties like "javax.xml.ws.https.something" won't match. - // */ - //protected abstract String getPropertyPrefix(); - - /** - * This method parses a class for fields and methods with {@link Property}. + * @deprecated */ protected static PropertyMap parse(final Class clazz) { - // make all relevant fields and methods accessible. - // this allows runtime to skip the security check, so they runs faster. - return AccessController.doPrivileged(new PrivilegedAction() { - public PropertyMap run() { - PropertyMap props = new PropertyMap(); - for( Class c=clazz; c!=null; c=c.getSuperclass()) { - for (Field f : c.getDeclaredFields()) { - Property cp = f.getAnnotation(Property.class); - if(cp!=null) { - for(String value : cp.value()) { - props.put(value, new FieldAccessor(f, value)); - } - } - } - for (Method m : c.getDeclaredMethods()) { - Property cp = m.getAnnotation(Property.class); - if(cp!=null) { - String name = m.getName(); - assert name.startsWith("get") || name.startsWith("is"); - - String setName = name.startsWith("is") ? "set"+name.substring(3) : // isFoo -> setFoo - 's'+name.substring(1); // getFoo -> setFoo - Method setter; - try { - setter = clazz.getMethod(setName,m.getReturnType()); - } catch (NoSuchMethodException e) { - setter = null; // no setter - } - for(String value : cp.value()) { - props.put(value, new MethodAccessor(m, setter, value)); - } - } - } - } - - return props; - } - }); - } - - /** - * Represents a typed property defined on a {@link PropertySet}. - */ - protected interface Accessor { - String getName(); - boolean hasValue(PropertySet props); - Object get(PropertySet props); - void set(PropertySet props, Object value); - } - - static final class FieldAccessor implements Accessor { - /** - * Field with the annotation. - */ - private final Field f; - - /** - * One of the values in {@link Property} annotation on {@link #f}. - */ - private final String name; - - protected FieldAccessor(Field f, String name) { - this.f = f; - f.setAccessible(true); - this.name = name; - } - - public String getName() { - return name; - } - - public boolean hasValue(PropertySet props) { - return get(props)!=null; - } - - public Object get(PropertySet props) { - try { - return f.get(props); - } catch (IllegalAccessException e) { - throw new AssertionError(); - } - } - - public void set(PropertySet props, Object value) { - try { - f.set(props,value); - } catch (IllegalAccessException e) { - throw new AssertionError(); - } - } - } - - static final class MethodAccessor implements Accessor { - /** - * Getter method. - */ - private final @NotNull Method getter; - /** - * Setter method. - * Some property is read-only. - */ - private final @Nullable Method setter; - - /** - * One of the values in {@link Property} annotation on {@link #getter}. - */ - private final String name; - - protected MethodAccessor(Method getter, Method setter, String value) { - this.getter = getter; - this.setter = setter; - this.name = value; - getter.setAccessible(true); - if(setter!=null) - setter.setAccessible(true); - } - - public String getName() { - return name; - } - - public boolean hasValue(PropertySet props) { - return get(props)!=null; - } - - public Object get(PropertySet props) { - try { - return getter.invoke(props); - } catch (IllegalAccessException e) { - throw new AssertionError(); - } catch (InvocationTargetException e) { - handle(e); - return 0; // never reach here - } - } - - public void set(PropertySet props, Object value) { - if(setter==null) - throw new ReadOnlyPropertyException(getName()); - try { - setter.invoke(props,value); - } catch (IllegalAccessException e) { - throw new AssertionError(); - } catch (InvocationTargetException e) { - handle(e); - } - } - - /** - * Since we don't expect the getter/setter to throw a checked exception, - * it should be possible to make the exception propagation transparent. - * That's what we are trying to do here. - */ - private Exception handle(InvocationTargetException e) { - Throwable t = e.getTargetException(); - if(t instanceof Error) - throw (Error)t; - if(t instanceof RuntimeException) - throw (RuntimeException)t; - throw new Error(e); - } - } - - - public final boolean containsKey(Object key) { - return get(key)!=null; + com.oracle.webservices.internal.api.message.BasePropertySet.PropertyMap pm = com.oracle.webservices.internal.api.message.BasePropertySet.parse(clazz); + PropertyMap map = new PropertyMap(); + map.putAll(pm); + return map; } /** @@ -316,9 +95,6 @@ public abstract class PropertySet implements com.sun.xml.internal.org.jvnet.ws.m } } - /** - * Checks if this {@link PropertySet} supports a property of the given name. - */ public boolean supports(Object key) { return getPropertyMap().containsKey(key); } @@ -334,39 +110,7 @@ public abstract class PropertySet implements com.sun.xml.internal.org.jvnet.ws.m } } - - /** - * Lazily created view of {@link Property}s that - * forms the core of {@link #createMapView()}. - */ - /*package*/ Set> mapViewCore; - - /** - * Creates a {@link Map} view of this {@link PropertySet}. - * - *

- * This map is partially live, in the sense that values you set to it - * will be reflected to {@link PropertySet}. - * - *

- * However, this map may not pick up changes made - * to {@link PropertySet} after the view is created. - * - * @return - * always non-null valid instance. - */ - public final Map createMapView() { - final Set> core = new HashSet>(); - createEntrySet(core); - - return new AbstractMap() { - public Set> entrySet() { - return core; - } - }; - } - - /*package*/ void createEntrySet(Set> core) { + protected void createEntrySet(Set> core) { for (final Entry e : getPropertyMap().entrySet()) { core.add(new Entry() { public String getKey() { @@ -386,4 +130,6 @@ public abstract class PropertySet implements com.sun.xml.internal.org.jvnet.ws.m }); } } + + protected abstract PropertyMap getPropertyMap(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java index ca47f8b39ca..afa28657587 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ResourceLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java index 3a424680e6c..683e65b99c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/SOAPVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,8 +36,8 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFactory; import javax.xml.ws.soap.SOAPBinding; -import com.sun.xml.internal.org.jvnet.ws.EnvelopeStyle; -import com.sun.xml.internal.org.jvnet.ws.EnvelopeStyleFeature; +import com.oracle.webservices.internal.api.EnvelopeStyle; +import com.oracle.webservices.internal.api.EnvelopeStyleFeature; import java.util.Arrays; import java.util.Collections; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java index 54d86cbb79b..230f90071c6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ServiceSharedFeatureMarker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java index 1303c894964..3bc54d4bb53 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -39,6 +39,7 @@ import javax.xml.ws.handler.Handler; import java.util.List; import java.util.Set; + /** * JAX-WS implementation of {@link Binding}. * @@ -97,7 +98,8 @@ public interface WSBinding extends Binding { */ @NotNull BindingID getBindingId(); - @NotNull List getHandlerChain(); + @NotNull@Override + List getHandlerChain(); /** * Checks if a particular {@link WebServiceFeature} is enabled. @@ -188,10 +190,20 @@ public interface WSBinding extends Binding { @NotNull final QName messageName); /** - * Returns set of header QNames known to be supported by this binding. Tubes should use this - * Set to add QNames for headers they process so that must-understand processing can validate - * headers on inbound messages + * Returns set of header QNames known to be supported by this binding. * @return Set of known QNames */ @NotNull Set getKnownHeaders(); + + /** + * Adds header QName to set known to be supported by this binding + * @param knownHeader Known header QName + * @return true, if new entry was added; false, if known header QName was already known + */ + boolean addKnownHeader(QName knownHeader); + + /** + * @return A MessageContextFactory configured according to the binding's features. + */ + @NotNull com.oracle.webservices.internal.api.message.MessageContextFactory getMessageContextFactory(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java index b8102a5fa4c..6e364d93206 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSDLLocator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java index 1c7a8b4a478..15f5515010a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSFeatureList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java index 8a95ea8bae9..1e9581fac52 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WSService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,13 +82,13 @@ public abstract class WSService extends ServiceDelegate implements ComponentRegi public abstract T getPort(WSEndpointReference epr, Class portInterface, WebServiceFeature... features); /** - * Works like {@link #createDispatch(EndpointReference, Class, Mode, WebServiceFeature[])} + * Works like {@link #createDispatch(javax.xml.ws.EndpointReference, java.lang.Class, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature[])} * but it takes the port name separately, so that EPR without embedded metadata can be used. */ public abstract Dispatch createDispatch(QName portName, WSEndpointReference wsepr, Class aClass, Service.Mode mode, WebServiceFeature... features); /** - * Works like {@link #createDispatch(EndpointReference, JAXBContext, Mode, WebServiceFeature[])} + * Works like {@link #createDispatch(javax.xml.ws.EndpointReference, javax.xml.bind.JAXBContext, javax.xml.ws.Service.Mode, javax.xml.ws.WebServiceFeature[])} * but it takes the port name separately, so that EPR without embedded metadata can be used. */ public abstract Dispatch createDispatch(QName portName, WSEndpointReference wsepr, JAXBContext jaxbContext, Service.Mode mode, WebServiceFeature... features); @@ -113,7 +113,7 @@ public abstract class WSService extends ServiceDelegate implements ComponentRegi return s; } - return null; + return getContainer().getSPI(spiType); } public @NotNull Set getComponents() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java index add5de1ca80..03e65eb7c2c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/WebServiceFeatureFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java new file mode 100644 index 00000000000..39a2f0651e4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingPropertySet.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.addressing; + +import com.sun.xml.internal.ws.api.message.Packet; +import com.oracle.webservices.internal.api.message.BasePropertySet; +import javax.xml.ws.handler.MessageContext; +import java.util.List; +import java.util.Map; + +/** + *

This property set exists so the upper stack can SET addressing info + * on a PER-REQUEST basis (instead of a per proxy/dispatch basis via OneWayFeature).

+ * + *

This class is NOT used for reading addressing header values.

+ */ +public class AddressingPropertySet extends BasePropertySet { + + // NOTE: Setting ACTION on client side is covered by standard BindingProvider. + + public static final String ADDRESSING_FAULT_TO = "com.sun.xml.internal.ws.api.addressing.fault.to"; + private String faultTo; + @Property(ADDRESSING_FAULT_TO) + public String getFaultTo() { return faultTo; } + public void setFaultTo(final String x) { faultTo = x; } + + public static final String ADDRESSING_MESSAGE_ID = "com.sun.xml.internal.ws.api.addressing.message.id"; + private String messageId; + public String getMessageId() { return messageId; } + public void setMessageId(final String x) { messageId = x; } + + public static final String ADDRESSING_RELATES_TO = "com.sun.xml.internal.ws.api.addressing.relates.to"; + @Property(ADDRESSING_RELATES_TO) + private String relatesTo; + public String getRelatesTo() { return relatesTo; } + public void setRelatesTo(final String x) { relatesTo = x; } + + public static final String ADDRESSING_REPLY_TO = "com.sun.xml.internal.ws.api.addressing.reply.to"; + @Property(ADDRESSING_REPLY_TO) + private String replyTo; + public String getReplyTo() { return replyTo; } + public void setReplyTo(final String x) { replyTo = x; } + + //////////////////////////////////////////////////// + // + // PropertySet boilerplate + // + + private static final PropertyMap model; + + static { + model = parse(AddressingPropertySet.class); + } + + @Override + protected PropertyMap getPropertyMap() { + return model; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java index b801110ec37..68cb91cb4c6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/AddressingVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java index 0fbdd4f5c63..3c73af04610 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/EPRHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,18 +25,27 @@ package com.sun.xml.internal.ws.api.addressing; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.Writer; + import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.message.AbstractHeaderImpl; import com.sun.xml.internal.ws.util.xml.XmlUtil; + +import org.w3c.dom.Document; +import org.w3c.dom.Node; import org.xml.sax.ContentHandler; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import javax.xml.namespace.QName; +import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.soap.SOAPHeader; +import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; @@ -102,7 +111,19 @@ final class EPRHeader extends AbstractHeaderImpl { SOAPHeader header = saaj.getSOAPHeader(); if (header == null) header = saaj.getSOAPPart().getEnvelope().addHeader(); - t.transform(epr.asSource(localName), new DOMResult(header)); +// TODO workaround for oracle xdk bug 16555545, when this bug is fixed the line below can be +// uncommented and all lines below, except the catch block, can be removed. +// t.transform(epr.asSource(localName), new DOMResult(header)); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + XMLStreamWriter w = XMLOutputFactory.newFactory().createXMLStreamWriter(baos); + epr.writeTo(localName, w); + w.flush(); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance(); + fac.setNamespaceAware(true); + Node eprNode = fac.newDocumentBuilder().parse(bais).getDocumentElement(); + Node eprNodeToAdd = header.getOwnerDocument().importNode(eprNode, true); + header.appendChild(eprNodeToAdd); } catch (Exception e) { throw new SOAPException(e); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java index 976419a3d1b..92376b2ff5f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/NonAnonymousResponseProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java index 83871f6c072..9a94a9587f3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OneWayFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import java.net.URL; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.FeatureConstructor; -import com.sun.xml.internal.ws.api.message.HeaderList; import javax.xml.ws.WebServiceFeature; @@ -63,6 +62,7 @@ public class OneWayFeature extends WebServiceFeature { */ public static final String ID = "http://java.sun.com/xml/ns/jaxws/addressing/oneway"; + private String messageId; private WSEndpointReference replyTo; private WSEndpointReference sslReplyTo; private WSEndpointReference from; @@ -115,6 +115,23 @@ public class OneWayFeature extends WebServiceFeature { this.relatesToID = relatesTo; } + public OneWayFeature(final AddressingPropertySet a, AddressingVersion v) { + this.enabled = true; + this.messageId = a.getMessageId(); + this.relatesToID = a.getRelatesTo(); + this.replyTo = makeEPR(a.getReplyTo(), v); + this.faultTo = makeEPR(a.getFaultTo(), v); + } + + private WSEndpointReference makeEPR(final String x, final AddressingVersion v) { + if (x == null) { return null; } + return new WSEndpointReference(x, v); + } + + public String getMessageId() { + return messageId; + } + /** * {@inheritDoc} */ diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java index 73a2fac431a..d0ebbc425a9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/OutboundReferenceParameterHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -80,21 +80,26 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { this.localName = localName; } + @Override public @NotNull String getNamespaceURI() { return nsUri; } + @Override public @NotNull String getLocalPart() { return localName; } + @Override public String getAttribute(String nsUri, String localName) { - if(attributes==null) + if(attributes==null) { parseAttributes(); + } for(int i=attributes.size()-1; i>=0; i-- ) { Attribute a = attributes.get(i); - if(a.localName.equals(localName) && a.nsUri.equals(nsUri)) + if (a.localName.equals(localName) && a.nsUri.equals(nsUri)) { return a.value; + } } return null; } @@ -113,105 +118,135 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { attributes = new FinalArrayList(); boolean refParamAttrWritten = false; for (int i = 0; i < reader.getAttributeCount(); i++) { - final String localName = reader.getAttributeLocalName(i); + final String attrLocalName = reader.getAttributeLocalName(i); final String namespaceURI = reader.getAttributeNamespace(i); final String value = reader.getAttributeValue(i); - if(namespaceURI.equals(AddressingVersion.W3C.nsUri)&& localName.equals("IS_REFERENCE_PARAMETER")) + if (namespaceURI.equals(AddressingVersion.W3C.nsUri)&& attrLocalName.equals("IS_REFERENCE_PARAMETER")) { refParamAttrWritten = true; - attributes.add(new Attribute(namespaceURI,localName,value)); + } + attributes.add(new Attribute(namespaceURI,attrLocalName,value)); } // we are adding one more attribute "wsa:IsReferenceParameter", if its not alrady there - if(!refParamAttrWritten) + if (!refParamAttrWritten) { attributes.add(new Attribute(AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE)); + } } catch (XMLStreamException e) { throw new WebServiceException("Unable to read the attributes for {"+nsUri+"}"+localName+" header",e); } } + @Override public XMLStreamReader readHeader() throws XMLStreamException { return new StreamReaderDelegate(infoset.readAsXMLStreamReader()) { int state=0; /* 0:expecting root, 1:in root, 2:past root */ + @Override public int next() throws XMLStreamException { return check(super.next()); } + @Override public int nextTag() throws XMLStreamException { return check(super.nextTag()); } private int check(int type) { - switch(state) { - case 0: - if(type==START_ELEMENT) - state=1; - break; - case 1: - state=2; + switch (state) { + case 0: + if (type == START_ELEMENT) { + state = 1; + } + break; + case 1: + state = 2; + break; + default: + break; } return type; } + @Override public int getAttributeCount() { - if(state==1) return super.getAttributeCount()+1; - else return super.getAttributeCount(); + if (state == 1) { + return super.getAttributeCount()+1; + } else { + return super.getAttributeCount(); + } } + @Override public String getAttributeLocalName(int index) { - if(state==1 && index==super.getAttributeCount()) + if (state == 1 && index == super.getAttributeCount()) { return IS_REFERENCE_PARAMETER; - else + } else { return super.getAttributeLocalName(index); + } } + @Override public String getAttributeNamespace(int index) { - if(state==1 && index==super.getAttributeCount()) + if (state == 1 && index==super.getAttributeCount()) { return AddressingVersion.W3C.nsUri; - else + } + else { return super.getAttributeNamespace(index); + } } + @Override public String getAttributePrefix(int index) { - if(state==1 && index==super.getAttributeCount()) + if(state==1 && index==super.getAttributeCount()) { return "wsa"; - else + } else { return super.getAttributePrefix(index); + } } + @Override public String getAttributeType(int index) { - if(state==1 && index==super.getAttributeCount()) + if(state==1 && index==super.getAttributeCount()) { return "CDATA"; - else + } else { return super.getAttributeType(index); + } } + @Override public String getAttributeValue(int index) { - if(state==1 && index==super.getAttributeCount()) + if(state==1 && index==super.getAttributeCount()) { return TRUE_VALUE; - else + } else { return super.getAttributeValue(index); + } } + @Override public QName getAttributeName(int index) { - if(state==1 && index==super.getAttributeCount()) + if(state==1 && index==super.getAttributeCount()) { return new QName(AddressingVersion.W3C.nsUri, IS_REFERENCE_PARAMETER, "wsa"); - else + } else { return super.getAttributeName(index); + } } + @Override public String getAttributeValue(String namespaceUri, String localName) { - if(state==1 && localName.equals(IS_REFERENCE_PARAMETER) && namespaceUri.equals(AddressingVersion.W3C.nsUri)) + if(state==1 && localName.equals(IS_REFERENCE_PARAMETER) && namespaceUri.equals(AddressingVersion.W3C.nsUri)) { return TRUE_VALUE; - else + } else { return super.getAttributeValue(namespaceUri, localName); + } } }; } + @Override public void writeTo(XMLStreamWriter w) throws XMLStreamException { infoset.writeToXMLStreamWriter(new XMLStreamWriterFilter(w) { private boolean root=true; private boolean onRootEl = true; + @Override public void writeStartElement(String localName) throws XMLStreamException { super.writeStartElement(localName); writeAddedAttribute(); @@ -227,40 +262,42 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { super.writeAttribute("wsa",AddressingVersion.W3C.nsUri,IS_REFERENCE_PARAMETER,TRUE_VALUE); } + @Override public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { super.writeStartElement(namespaceURI, localName); writeAddedAttribute(); } + @Override public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { //TODO: Verify with KK later //check if prefix is declared before writing start element. boolean prefixDeclared = isPrefixDeclared(prefix,namespaceURI); super.writeStartElement(prefix, localName, namespaceURI); - if(!prefixDeclared && !prefix.equals("")) + if (!prefixDeclared && !prefix.equals("")) { super.writeNamespace(prefix,namespaceURI); + } writeAddedAttribute(); } + @Override public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException{ - //TODO: Verify with KK later - if(isPrefixDeclared(prefix, namespaceURI)) { - //Dont write it again , as its already in NamespaceContext - return; - } else + if (!isPrefixDeclared(prefix, namespaceURI)) { super.writeNamespace(prefix,namespaceURI); + } } + @Override public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException { //skip if its on root element and attribute is wsa;IsReferenceParameter, as we write it. if(onRootEl && namespaceURI.equals(AddressingVersion.W3C.nsUri) - && localName.equals(IS_REFERENCE_PARAMETER)) + && localName.equals(IS_REFERENCE_PARAMETER)) { return; - + } writer.writeAttribute(prefix, namespaceURI, localName, value); } + + @Override public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException { - - writer.writeAttribute(namespaceURI, localName, value); } private boolean isPrefixDeclared(String prefix, String namespaceURI ) { @@ -269,14 +306,16 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { },true); } + @Override public void writeTo(SOAPMessage saaj) throws SOAPException { //TODO: SAAJ returns null instead of throwing SOAPException, // when there is no SOAPHeader in the message, // which leads to NPE. try { SOAPHeader header = saaj.getSOAPHeader(); - if (header == null) + if (header == null) { header = saaj.getSOAPPart().getEnvelope().addHeader(); + } Element node = (Element)infoset.writeTo(header); node.setAttributeNS(AddressingVersion.W3C.nsUri,AddressingVersion.W3C.getPrefix()+":"+IS_REFERENCE_PARAMETER,TRUE_VALUE); } catch (XMLStreamBufferException e) { @@ -284,10 +323,12 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { } } + @Override public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException { class Filter extends XMLFilterImpl { Filter(ContentHandler ch) { setContentHandler(ch); } private int depth=0; + @Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { if(depth++==0) { // add one more attribute @@ -309,10 +350,12 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { super.startElement(uri, localName, qName, atts); } + @Override public void endElement(String uri, String localName, String qName) throws SAXException { super.endElement(uri, localName, qName); - if(--depth==0) + if (--depth == 0) { super.endPrefixMapping("wsa"); + } } } @@ -341,8 +384,7 @@ final class OutboundReferenceParameterHeader extends AbstractHeaderImpl { * Convert null to "". */ private static String fixNull(String s) { - if(s==null) return ""; - else return s; + return s == null ? "" : s; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java index 97d8e2366e9..b32238c6334 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/WSEndpointReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,6 +42,7 @@ import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingCons import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.api.model.wsdl.WSDLExtension; import com.sun.xml.internal.ws.resources.AddressingMessages; @@ -289,8 +290,9 @@ public final class WSEndpointReference implements WSDLExtension { //write extensibility elements in the EPR element if (elements != null) { - for (Element e : elements) + for (Element e : elements) { DOMUtil.serializeNode(e, writer); + } } writer.writeEndElement(); @@ -352,8 +354,9 @@ public final class WSEndpointReference implements WSDLExtension { //When the size of ReferenceParametes is zero, the ReferenceParametes element will not be written. if(referenceParameters != null && referenceParameters.size() > 0) { writer.writeStartElement(version.getPrefix(), version.eprType.referenceParameters, version.nsUri); - for (Element e : referenceParameters) + for (Element e : referenceParameters) { DOMUtil.serializeNode(e, writer); + } writer.writeEndElement(); } @@ -386,6 +389,9 @@ public final class WSEndpointReference implements WSDLExtension { } } + private static boolean isEmty(QName qname) { + return qname == null || qname.toString().trim().length()== 0; + } private static void writeW3CMetaData(StreamWriterBufferCreator writer, QName service, @@ -395,15 +401,18 @@ public final class WSEndpointReference implements WSDLExtension { //.NET treate empty metaData element as bad request. - if (service == null && port == null && portType == null && metadata == null && wsdlAddress == null) - return; + if (isEmty(service) && isEmty(port) && isEmty(portType) && metadata == null/* && wsdlAddress == null*/) { + return; + } + writer.writeStartElement(AddressingVersion.W3C.getPrefix(), AddressingVersion.W3C.eprType.wsdlMetadata.getLocalPart(), AddressingVersion.W3C.nsUri); writer.writeNamespace(AddressingVersion.W3C.getWsdlPrefix(), AddressingVersion.W3C.wsdlNsUri); //write wsdliLication as defined in WS-Addressing 1.0 Metadata spec - if(wsdlAddress != null) - writeWsdliLocation(writer, service, wsdlAddress,wsdlTargetNamespace); + if(wsdlAddress != null) { + writeWsdliLocation(writer, service, wsdlAddress, wsdlTargetNamespace); + } //Write Interface info if (portType != null) { @@ -449,10 +458,11 @@ public final class WSEndpointReference implements WSDLExtension { } */ //Add the extra metadata Elements - if (metadata != null) + if (metadata != null) { for (Element e : metadata) { DOMUtil.serializeNode(e, writer); } + } writer.writeEndElement(); } @@ -552,10 +562,11 @@ public final class WSEndpointReference implements WSDLExtension { */ public static @Nullable WSEndpointReference create(@Nullable EndpointReference epr) { - if (epr != null) + if (epr != null) { return new WSEndpointReference(epr); - else + } else { return null; + } } /** @@ -592,21 +603,26 @@ public final class WSEndpointReference implements WSDLExtension { MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer(); XMLFilterImpl filter = new XMLFilterImpl() { private boolean inAddress = false; + @Override public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { - if(localName.equals("Address") && uri.equals(version.nsUri)) + if (localName.equals("Address") && uri.equals(version.nsUri)) { inAddress = true; + } super.startElement(uri,localName,qName,atts); } + @Override public void characters(char ch[], int start, int length) throws SAXException { - if(!inAddress) + if (!inAddress) { super.characters(ch, start, length); + } } - + @Override public void endElement(String uri, String localName, String qName) throws SAXException { - if(inAddress) + if (inAddress) { super.characters(newAddress.toCharArray(),0,newAddress.length()); + } inAddress = false; super.endElement(uri, localName, qName); } @@ -737,14 +753,16 @@ public final class WSEndpointReference implements WSDLExtension { StreamReaderBufferProcessor xsr = infoset.readAsXMLStreamReader(); // parser should be either at the start element or the start document - if(xsr.getEventType()==XMLStreamReader.START_DOCUMENT) + if (xsr.getEventType()==XMLStreamReader.START_DOCUMENT) { xsr.nextTag(); + } assert xsr.getEventType()==XMLStreamReader.START_ELEMENT; String rootLocalName = xsr.getLocalName(); - if(!xsr.getNamespaceURI().equals(version.nsUri)) + if(!xsr.getNamespaceURI().equals(version.nsUri)) { throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION( version.nsUri, xsr.getNamespaceURI())); + } this.rootElement = new QName(xsr.getNamespaceURI(), rootLocalName); @@ -756,8 +774,9 @@ public final class WSEndpointReference implements WSDLExtension { if(version.isReferenceParameter(localName)) { XMLStreamBuffer mark; while((mark = xsr.nextTagAndMark())!=null) { - if(marks==null) + if (marks==null) { marks = new ArrayList
(); + } // TODO: need a different header for member submission version marks.add(version.createReferenceParameterHeader( @@ -766,8 +785,9 @@ public final class WSEndpointReference implements WSDLExtension { } } else if(localName.equals("Address")) { - if(address!=null) // double
. That's an error. + if (address!=null) { throw new InvalidAddressingHeaderException(new QName(version.nsUri,rootLocalName),AddressingVersion.fault_duplicateAddressInEpr); + } address = xsr.getElementText().trim(); } else { XMLStreamReaderUtil.skipElement(xsr); @@ -776,14 +796,15 @@ public final class WSEndpointReference implements WSDLExtension { // hit to by now - if(marks==null) { + if (marks==null) { this.referenceParameters = EMPTY_ARRAY; } else { this.referenceParameters = marks.toArray(new Header[marks.size()]); } - if(address==null) + if (address==null) { throw new InvalidAddressingHeaderException(new QName(version.nsUri,rootLocalName),version.fault_missingAddressInEpr); + } } @@ -797,9 +818,11 @@ public final class WSEndpointReference implements WSDLExtension { */ public XMLStreamReader read(final @NotNull String localName) throws XMLStreamException { return new StreamReaderBufferProcessor(infoset) { - protected void processElement(String prefix, String uri, String _localName) { - if (_depth == 0) + @Override + protected void processElement(String prefix, String uri, String _localName, boolean inScope) { + if (_depth == 0) { _localName = localName; + } super.processElement(prefix, uri, _localName, isInscope(infoset,_depth)); } }; @@ -874,14 +897,17 @@ public final class WSEndpointReference implements WSDLExtension { return ln; } + @Override public void writeStartElement(String localName) throws XMLStreamException { super.writeStartElement(override(localName)); } + @Override public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException { super.writeStartElement(namespaceURI, override(localName)); } + @Override public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException { super.writeStartElement(prefix, override(localName), namespaceURI); } @@ -908,13 +934,26 @@ public final class WSEndpointReference implements WSDLExtension { /** * Copies all the reference parameters in this EPR as headers * to the given {@link HeaderList}. + * @deprecated - use addReferenceParametersToList(MessageHeaders) */ + @SuppressWarnings("ManualArrayToCollectionCopy") public void addReferenceParametersToList(HeaderList outbound) { + // implemented through iteration because of unsupportedoperation exception thrown from addAll method on headerlist + // do not change for (Header header : referenceParameters) { outbound.add(header); } } + /** + * Copies all the reference parameters in this EPR as headers + * to the given {@link MessageHeaders}. + */ + public void addReferenceParametersToList(MessageHeaders outbound) { + for (Header header : referenceParameters) { + outbound.add(header); + } + } /** * Copies all the reference parameters from the given {@link HeaderList} * to this EPR @@ -950,6 +989,7 @@ public final class WSEndpointReference implements WSDLExtension { * Gets the QName of the EndpointReference element. * @return */ + @Override public QName getName() { return rootElement; } @@ -966,6 +1006,7 @@ public final class WSEndpointReference implements WSDLExtension { this.rootLocalName = rootLocalName; } + @Override protected void processElement(String uri, String localName, String qName, boolean inscope) throws SAXException { if(root) { root = false; @@ -1000,14 +1041,16 @@ public final class WSEndpointReference implements WSDLExtension { */ public @Nullable EPRExtension getEPRExtension(final QName extnQName) throws XMLStreamException { - if (rootEprExtensions == null) + if (rootEprExtensions == null) { parseEPRExtensions(); + } return rootEprExtensions.get(extnQName); } public @NotNull Collection getEPRExtensions() throws XMLStreamException { - if (rootEprExtensions == null) + if (rootEprExtensions == null) { parseEPRExtensions(); + } return rootEprExtensions.values(); } @@ -1019,14 +1062,15 @@ public final class WSEndpointReference implements WSDLExtension { StreamReaderBufferProcessor xsr = infoset.readAsXMLStreamReader(); // parser should be either at the start element or the start document - if (xsr.getEventType() == XMLStreamReader.START_DOCUMENT) + if (xsr.getEventType() == XMLStreamReader.START_DOCUMENT) { xsr.nextTag(); + } assert xsr.getEventType() == XMLStreamReader.START_ELEMENT; - String rootLocalName = xsr.getLocalName(); - if (!xsr.getNamespaceURI().equals(version.nsUri)) + if (!xsr.getNamespaceURI().equals(version.nsUri)) { throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION( version.nsUri, xsr.getNamespaceURI())); + } // since often EPR doesn't have extensions, create array lazily XMLStreamBuffer mark; @@ -1101,13 +1145,15 @@ public final class WSEndpointReference implements WSDLExtension { StreamReaderBufferProcessor xsr = infoset.readAsXMLStreamReader(); // parser should be either at the start element or the start document - if (xsr.getEventType() == XMLStreamReader.START_DOCUMENT) - xsr.nextTag(); + if (xsr.getEventType() == XMLStreamReader.START_DOCUMENT) { + xsr.nextTag(); + } assert xsr.getEventType() == XMLStreamReader.START_ELEMENT; String rootElement = xsr.getLocalName(); - if (!xsr.getNamespaceURI().equals(version.nsUri)) - throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION( - version.nsUri, xsr.getNamespaceURI())); + if (!xsr.getNamespaceURI().equals(version.nsUri)) { + throw new WebServiceException(AddressingMessages.WRONG_ADDRESSING_VERSION( + version.nsUri, xsr.getNamespaceURI())); + } String localName; String ns; if (version == AddressingVersion.W3C) { @@ -1115,22 +1161,26 @@ public final class WSEndpointReference implements WSDLExtension { //If the current element is metadata enclosure, look inside if (xsr.getLocalName().equals(version.eprType.wsdlMetadata.getLocalPart())) { String wsdlLoc = xsr.getAttributeValue("http://www.w3.org/ns/wsdl-instance","wsdlLocation"); - if (wsdlLoc != null) + if (wsdlLoc != null) { wsdliLocation = wsdlLoc.trim(); + } XMLStreamBuffer mark; while ((mark = xsr.nextTagAndMark()) != null) { localName = xsr.getLocalName(); ns = xsr.getNamespaceURI(); if (localName.equals(version.eprType.serviceName)) { String portStr = xsr.getAttributeValue(null, version.eprType.portName); - if(serviceName != null) + if (serviceName != null) { throw new RuntimeException("More than one "+ version.eprType.serviceName +" element in EPR Metadata"); + } serviceName = getElementTextAsQName(xsr); - if (serviceName != null && portStr != null) + if (serviceName != null && portStr != null) { portName = new QName(serviceName.getNamespaceURI(), portStr); + } } else if (localName.equals(version.eprType.portTypeName)) { - if(portTypeName != null) + if (portTypeName != null) { throw new RuntimeException("More than one "+ version.eprType.portTypeName +" element in EPR Metadata"); + } portTypeName = getElementTextAsQName(xsr); } else if (ns.equals(WSDLConstants.NS_WSDL) && localName.equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart())) { @@ -1141,8 +1191,9 @@ public final class WSEndpointReference implements WSDLExtension { } } else { //Skip is it is not root element - if (!xsr.getLocalName().equals(rootElement)) + if (!xsr.getLocalName().equals(rootElement)) { XMLStreamReaderUtil.skipElement(xsr); + } } } while (XMLStreamReaderUtil.nextElementContent(xsr) == XMLStreamReader.START_ELEMENT); @@ -1174,14 +1225,16 @@ public final class WSEndpointReference implements WSDLExtension { } else if (localName.equals(version.eprType.serviceName)) { String portStr = xsr.getAttributeValue(null, version.eprType.portName); serviceName = getElementTextAsQName(xsr); - if (serviceName != null && portStr != null) + if (serviceName != null && portStr != null) { portName = new QName(serviceName.getNamespaceURI(), portStr); + } } else if (localName.equals(version.eprType.portTypeName)) { portTypeName = getElementTextAsQName(xsr); } else { //Skip is it is not root element - if (!xsr.getLocalName().equals(rootElement)) + if (!xsr.getLocalName().equals(rootElement)) { XMLStreamReaderUtil.skipElement(xsr); + } } } while (XMLStreamReaderUtil.nextElementContent(xsr) == XMLStreamReader.START_ELEMENT); } @@ -1194,8 +1247,9 @@ public final class WSEndpointReference implements WSDLExtension { if (name != null) { if (prefix != null) { String ns = xsr.getNamespaceURI(prefix); - if (ns != null) + if (ns != null) { return new QName(ns, name, prefix); + } } else { return new QName(null, name); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java index d0ac8afc2f4..9b714f6d273 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/addressing/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java index 0f554a12a83..3b4d911f40c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ClientPipelineHook.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java index 64532b4be60..f40bfc1bbe9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/SelectOptimalEncodingFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,7 +49,7 @@ import com.sun.org.glassfish.gmbal.ManagedData; * is equivalent to this feature being present and disabled. *

* If this feature is enabled by the client and the Service supports the - * Fast Infoset encoding, as specified by the {@link FastInfosetFeature}, + * Fast Infoset encoding, as specified by the {@link com.sun.xml.internal.ws.api.fastinfoset.FastInfosetFeature}, * and Fast Infoset is determined to be the most optimal encoding, then the * Fast Infoset encoding will be automatically selected by the client. *

diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java index c5182d82f08..9e126a5f9f8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java index 4ce2ceced73..0c8e56134ab 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ServiceInterceptorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/InPlaceDOMOutput.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java similarity index 52% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/InPlaceDOMOutput.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java index 6ee467d2c3c..0a82162993d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/output/InPlaceDOMOutput.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/ThrowableInPacketCompletionFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,40 +23,33 @@ * questions. */ -package com.sun.xml.internal.bind.v2.runtime.output; +package com.sun.xml.internal.ws.api.client; -import com.sun.xml.internal.bind.v2.runtime.AssociationMap; -import com.sun.xml.internal.bind.marshaller.SAX2DOMEx; +import javax.xml.ws.WebServiceFeature; +import javax.xml.ws.Dispatch; -import org.w3c.dom.Node; -import org.xml.sax.SAXException; +import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet; /** + * When using {@link Dispatch}<{@link Packet}> and the invocation completes with a Throwable, it is + * useful to be able to inspect the Packet in addition to the Throwable as the Packet contains + * meta-data about the request and/or response. However, the default behavior is that the caller + * only receives the Throwable. * - * @author Kohsuke Kawaguchi + * When an instance of this feature is enabled on the binding, any Throwable generated will be available + * on the Packet on the satellite {@link ThrowableContainerPropertySet}. + * + * @see ThrowableContainerPropertySet */ -public final class InPlaceDOMOutput extends SAXOutput { - private final AssociationMap assoc; +public class ThrowableInPacketCompletionFeature extends WebServiceFeature { - public InPlaceDOMOutput(Node node, AssociationMap assoc) { - super(new SAX2DOMEx(node)); - this.assoc = assoc; - assert assoc!=null; + public ThrowableInPacketCompletionFeature() { + this.enabled = true; } - private SAX2DOMEx getBuilder() { - return (SAX2DOMEx)out; + @Override + public String getID() { + return ThrowableInPacketCompletionFeature.class.getName(); } - public void endStartTag() throws SAXException { - super.endStartTag(); - - Object op = nsContext.getCurrent().getOuterPeer(); - if(op!=null) - assoc.addOuter( getBuilder().getCurrentElement(), op ); - - Object ip = nsContext.getCurrent().getInnerPeer(); - if(ip!=null) - assoc.addInner( getBuilder().getCurrentElement(), ip ); - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java index bcdf50bea69..ce1380cd717 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/client/WSPortInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java index 0139cdf1865..1b7b46bbfb7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/EndpointCreationAttributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java index d9f8dc3aa61..e6a9e4d716b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/ManagedEndpointFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java index 39e0135b153..3d287bc54a8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/Reconfigurable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java index e256c65feac..10b9599a607 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedClientAssertion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java index f3d8f9a96c3..0127849a795 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagedServiceAssertion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java index b56e0d5782c..029e677a40f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/config/management/policy/ManagementAssertion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java index cee39c2bdca..66ac2f8fc24 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/ClientCallBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package com.sun.xml.internal.ws.api.databinding; import java.lang.reflect.Method; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.JavaMethod; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java index 85e217d5566..4aac17eedc8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/Databinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,7 @@ import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.Method; -import javax.xml.ws.WebServiceFeature; +import com.sun.xml.internal.ws.api.message.MessageContextFactory; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.ContentType; import com.sun.xml.internal.ws.wsdl.DispatchException; @@ -61,7 +61,7 @@ import com.sun.xml.internal.ws.wsdl.DispatchException; * * @author shih-chang.chen@oracle.com */ -public interface Databinding extends com.sun.xml.internal.org.jvnet.ws.databinding.Databinding { +public interface Databinding extends com.oracle.webservices.internal.api.databinding.Databinding { /** * Gets the MessageFactory instance associated with this WsRuntime @@ -141,7 +141,15 @@ public interface Databinding extends com.sun.xml.internal.org.jvnet.ws.databindi void generateWSDL(WSDLGenInfo info); + /** + * @deprecated use MessageContextFactory + */ public ContentType encode( Packet packet, OutputStream out ) throws IOException ; + /** + * @deprecated use MessageContextFactory + */ public void decode( InputStream in, String ct, Packet packet ) throws IOException; + + public MessageContextFactory getMessageContextFactory(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java index 374e4ab36d1..39bbcdd8e5b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java index e053475528e..8c738da0c45 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/DatabindingFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,7 @@ import java.util.Map; * * @author shih-chang.chen@oracle.com */ -public abstract class DatabindingFactory extends com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingFactory { +public abstract class DatabindingFactory extends com.oracle.webservices.internal.api.databinding.DatabindingFactory { /** * Creates a new instance of a WsTool. @@ -73,7 +73,7 @@ public abstract class DatabindingFactory extends com.sun.xml.internal.org.jvnet. * the EndpointRuntimeConfig to init this WsRuntime * @return New instance of a WsRuntime */ - abstract public com.sun.xml.internal.org.jvnet.ws.databinding.Databinding createRuntime(DatabindingConfig config); + abstract public com.oracle.webservices.internal.api.databinding.Databinding createRuntime(DatabindingConfig config); /** * Creates a new instance of a XsTool. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java index da97df854fa..9c200593082 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/EndpointCallBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.xml.internal.ws.api.databinding; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.JavaMethod; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java index 009abac0e96..de4e32f835f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/JavaCallInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ import java.lang.reflect.Method; * * @author shih-chang.chen@oracle.com */ -public class JavaCallInfo implements com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo { +public class JavaCallInfo implements com.oracle.webservices.internal.api.databinding.JavaCallInfo { private Method method; private Object[] parameters; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java index b8d6a2af310..005393e8719 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MappingInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,8 +45,9 @@ public class MappingInfo { protected BindingID bindingID; protected QName serviceName; protected QName portName; + protected String defaultSchemaNamespaceSuffix; - public String getTargetNamespace() { + public String getTargetNamespace() { return targetNamespace; } public void setTargetNamespace(String targetNamespace) { @@ -82,4 +83,10 @@ public class MappingInfo { public void setPortName(QName portName) { this.portName = portName; } + public String getDefaultSchemaNamespaceSuffix() { + return defaultSchemaNamespaceSuffix; + } + public void setDefaultSchemaNamespaceSuffix(String defaultSchemaNamespaceSuffix) { + this.defaultSchemaNamespaceSuffix = defaultSchemaNamespaceSuffix; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java index 94aeb22b14e..24236f7744f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/MetadataReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java index 5635d50807d..900e5350b34 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/SoapBodyStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java index d1c1af1950d..91f79225cf9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/databinding/WSDLGenInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ package com.sun.xml.internal.ws.api.databinding; +import com.oracle.webservices.internal.api.databinding.WSDLResolver; 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.wsdl.writer.WSDLResolver; /** * WSDLGenInfo provides the WSDL generation options @@ -38,6 +38,7 @@ public class WSDLGenInfo { WSDLResolver wsdlResolver; Container container; boolean inlineSchemas; + boolean secureXmlProcessingDisabled; WSDLGeneratorExtension[] extensions; public WSDLResolver getWsdlResolver() { @@ -59,9 +60,18 @@ public class WSDLGenInfo { this.inlineSchemas = inlineSchemas; } public WSDLGeneratorExtension[] getExtensions() { + if (extensions == null) return new WSDLGeneratorExtension[0]; return extensions; } public void setExtensions(WSDLGeneratorExtension[] extensions) { this.extensions = extensions; } + + public void setSecureXmlProcessingDisabled(boolean secureXmlProcessingDisabled) { + this.secureXmlProcessingDisabled = secureXmlProcessingDisabled; + } + + public boolean isSecureXmlProcessingDisabled() { + return secureXmlProcessingDisabled; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java index 85a5007eacc..f59dbd55046 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/fastinfoset/FastInfosetFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java index bf87f9fd776..5d7ac28a1af 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/HaInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java index 1fe2625faa6..c45b2e98604 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/ha/StickyFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java index d50a443e246..f7a1468148a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java index cf7acfa44b5..fbf746fd46b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/handler/MessageHandlerContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java new file mode 100644 index 00000000000..31b40dea2d6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AddressingUtils.java @@ -0,0 +1,342 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.message; + +import java.util.Iterator; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLStreamException; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.soap.SOAPBinding; + +import com.sun.istack.internal.NotNull; +import com.sun.xml.internal.ws.addressing.WsaTubeHelper; +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.addressing.AddressingPropertySet; +import com.sun.xml.internal.ws.api.addressing.AddressingVersion; +import com.sun.xml.internal.ws.api.addressing.OneWayFeature; +import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.message.RelatesToHeader; +import com.sun.xml.internal.ws.message.StringHeader; +import com.sun.xml.internal.ws.resources.AddressingMessages; +import com.sun.xml.internal.ws.resources.ClientMessages; + +public class AddressingUtils { + //TODO is MessageHeaders to be implicitly assumed? Or moved to utility class and taken out from interface? + public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action) { + fillRequestAddressingHeaders(headers, packet, av, sv, oneway, action, false); + } + public static void fillRequestAddressingHeaders(MessageHeaders headers, Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) { + fillCommonAddressingHeaders(headers, packet, av, sv, action, mustUnderstand); + + // wsa:ReplyTo + // null or "true" is equivalent to request/response MEP + if (!oneway) { + WSEndpointReference epr = av.anonymousEpr; + if (headers.get(av.replyToTag, false) == null) { + headers.add(epr.createHeader(av.replyToTag)); + } + + // wsa:FaultTo + if (headers.get(av.faultToTag, false) == null) { + headers.add(epr.createHeader(av.faultToTag)); + } + + // wsa:MessageID + if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) { + if (headers.get(av.messageIDTag, false) == null) { + Header h = new StringHeader(av.messageIDTag, Message.generateMessageID()); + headers.add(h); + } + } + } + } +// private void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, OneWayFeature oneWayFeature, boolean oneway, String action); + public static void fillRequestAddressingHeaders(MessageHeaders headers, WSDLPort wsdlPort, WSBinding binding, Packet packet) { + if (binding == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_BINDING()); + } + + if (binding.isFeatureEnabled(SuppressAutomaticWSARequestHeadersFeature.class)) { + return; + } + + //See if WSA headers are already set by the user. + MessageHeaders hl = packet.getMessage().getHeaders(); + String action = AddressingUtils.getAction(hl, binding.getAddressingVersion(), binding.getSOAPVersion()); + if (action != null) { + //assume that all the WSA headers are set by the user + return; + } + AddressingVersion addressingVersion = binding.getAddressingVersion(); + //seiModel is passed as null as it is not needed. + WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, null, binding); + + // wsa:Action + String effectiveInputAction = wsaHelper.getEffectiveInputAction(packet); + if (effectiveInputAction == null || effectiveInputAction.equals("") && binding.getSOAPVersion() == SOAPVersion.SOAP_11) { + throw new WebServiceException(ClientMessages.INVALID_SOAP_ACTION()); + } + boolean oneway = !packet.expectReply; + if (wsdlPort != null) { + // if WSDL has prohibited, then throw an error + // as anonymous ReplyTo MUST NOT be added in that case. BindingProvider need to + // disable AddressingFeature and MemberSubmissionAddressingFeature and hand-craft + // the SOAP message with non-anonymous ReplyTo/FaultTo. + if (!oneway && packet.getMessage() != null && packet.getWSDLOperation() != null) { + WSDLBoundOperation wbo = wsdlPort.getBinding().get(packet.getWSDLOperation()); + if (wbo != null && wbo.getAnonymous() == WSDLBoundOperation.ANONYMOUS.prohibited) { + throw new WebServiceException(AddressingMessages.WSAW_ANONYMOUS_PROHIBITED()); + } + } + } + + OneWayFeature oneWayFeature = binding.getFeature(OneWayFeature.class); + final AddressingPropertySet addressingPropertySet = packet.getSatellite(AddressingPropertySet.class); + oneWayFeature = addressingPropertySet == null ? oneWayFeature : new OneWayFeature(addressingPropertySet, addressingVersion); + + if (oneWayFeature == null || !oneWayFeature.isEnabled()) { + // standard oneway + fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneway, effectiveInputAction, AddressingVersion.isRequired(binding)); + } else { + // custom oneway + fillRequestAddressingHeaders(headers, packet, addressingVersion, binding.getSOAPVersion(), oneWayFeature, oneway, effectiveInputAction); + } + } + + public static String getAction(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) { + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + String action = null; + Header h = getFirstHeader(headers, av.actionTag, true, sv); + if (h != null) { + action = h.getStringContent(); + } + + return action; + } + + public static WSEndpointReference getFaultTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) { + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + Header h = getFirstHeader(headers, av.faultToTag, true, sv); + WSEndpointReference faultTo = null; + if (h != null) { + try { + faultTo = h.readAsEPR(av); + } catch (XMLStreamException e) { + throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e); + } + } + + return faultTo; + } + + public static String getMessageID(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) { + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + Header h = getFirstHeader(headers, av.messageIDTag, true, sv); + String messageId = null; + if (h != null) { + messageId = h.getStringContent(); + } + + return messageId; + } + public static String getRelatesTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) { + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + Header h = getFirstHeader(headers, av.relatesToTag, true, sv); + String relatesTo = null; + if (h != null) { + relatesTo = h.getStringContent(); + } + + return relatesTo; + } + public static WSEndpointReference getReplyTo(@NotNull MessageHeaders headers, @NotNull AddressingVersion av, @NotNull SOAPVersion sv) { + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + Header h = getFirstHeader(headers, av.replyToTag, true, sv); + WSEndpointReference replyTo; + if (h != null) { + try { + replyTo = h.readAsEPR(av); + } catch (XMLStreamException e) { + throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e); + } + } else { + replyTo = av.anonymousEpr; + } + + return replyTo; + } + public static String getTo(MessageHeaders headers, AddressingVersion av, SOAPVersion sv) { + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + Header h = getFirstHeader(headers, av.toTag, true, sv); + String to; + if (h != null) { + to = h.getStringContent(); + } else { + to = av.anonymousUri; + } + + return to; + } + + public static Header getFirstHeader(MessageHeaders headers, QName name, boolean markUnderstood, SOAPVersion sv) { + if (sv == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION()); + } + + Iterator

iter = headers.getHeaders(name.getNamespaceURI(), name.getLocalPart(), markUnderstood); + while (iter.hasNext()) { + Header h = iter.next(); + if (h.getRole(sv).equals(sv.implicitRole)) { + return h; + } + } + + return null; + } + + private static void fillRequestAddressingHeaders(@NotNull MessageHeaders headers, @NotNull Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull OneWayFeature oneWayFeature, boolean oneway, @NotNull String action) { + if (!oneway&&!oneWayFeature.isUseAsyncWithSyncInvoke() && Boolean.TRUE.equals(packet.isSynchronousMEP)) { + fillRequestAddressingHeaders(headers, packet, av, sv, oneway, action); + } else { + fillCommonAddressingHeaders(headers, packet, av, sv, action, false); + + boolean isMessageIdAdded = false; + + // wsa:ReplyTo + // add if it doesn't already exist and OneWayFeature requests a specific ReplyTo + if (headers.get(av.replyToTag, false) == null) { + WSEndpointReference replyToEpr = oneWayFeature.getReplyTo(); + if (replyToEpr != null) { + headers.add(replyToEpr.createHeader(av.replyToTag)); + // add wsa:MessageID only for non-null ReplyTo + if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) { + // if header doesn't exist, method getID creates a new random id + String newID = oneWayFeature.getMessageId() == null ? Message.generateMessageID() : oneWayFeature.getMessageId(); + headers.add(new StringHeader(av.messageIDTag, newID)); + isMessageIdAdded = true; + } + } + } + + // If the user sets a messageId, use it. + final String messageId = oneWayFeature.getMessageId(); + if (!isMessageIdAdded && messageId != null) { + headers.add(new StringHeader(av.messageIDTag, messageId)); + } + + // wsa:FaultTo + // add if it doesn't already exist and OneWayFeature requests a specific FaultTo + if (headers.get(av.faultToTag, false) == null) { + WSEndpointReference faultToEpr = oneWayFeature.getFaultTo(); + if (faultToEpr != null) { + headers.add(faultToEpr.createHeader(av.faultToTag)); + // add wsa:MessageID only for non-null FaultTo + if (headers.get(av.messageIDTag, false) == null) { + headers.add(new StringHeader(av.messageIDTag, Message.generateMessageID())); + } + } + } + + // wsa:From + if (oneWayFeature.getFrom() != null) { + headers.addOrReplace(oneWayFeature.getFrom().createHeader(av.fromTag)); + } + + // wsa:RelatesTo + if (oneWayFeature.getRelatesToID() != null) { + headers.addOrReplace(new RelatesToHeader(av.relatesToTag, oneWayFeature.getRelatesToID())); + } + } + } + + /** + * Creates wsa:To, wsa:Action and wsa:MessageID header on the client + * + * @param packet request packet + * @param av WS-Addressing version + * @param sv SOAP version + * @param action Action Message Addressing Property value + * @throws IllegalArgumentException if any of the parameters is null. + */ + private static void fillCommonAddressingHeaders(MessageHeaders headers, Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull String action, boolean mustUnderstand) { + if (packet == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_PACKET()); + } + + if (av == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); + } + + if (sv == null) { + throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION()); + } + + if (action == null && !sv.httpBindingId.equals(SOAPBinding.SOAP12HTTP_BINDING)) { + throw new IllegalArgumentException(AddressingMessages.NULL_ACTION()); + } + + // wsa:To + if (headers.get(av.toTag, false) == null) { + StringHeader h = new StringHeader(av.toTag, packet.endpointAddress.toString()); + headers.add(h); + } + + // wsa:Action + if (action != null) { + packet.soapAction = action; + if (headers.get(av.actionTag, false) == null) { + //As per WS-I BP 1.2/2.0, if one of the WSA headers is MU, then all WSA headers should be treated as MU., + // so just set MU on action header + StringHeader h = new StringHeader(av.actionTag, action, sv, mustUnderstand); + headers.add(h); + } + } + } + + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java index 5e2e2f8ea8f..70b3bda35de 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,19 @@ public interface Attachment { /** * Content ID of the attachment. Uniquely identifies an attachment. * + * http://www.ietf.org/rfc/rfc2392.txt (which is referred by the ws-i attachment profile + * http://www.ws-i.org/Profiles/AttachmentsProfile-1.0.html) + * + * content-id = url-addr-spec + * url-addr-spec = addr-spec ; URL encoding of RFC 822 addr-spec + * cid-url = "cid" ":" content-id + * + * A "cid" URL is converted to the corresponding Content-ID message header [MIME] by + * removing the "cid:" prefix, converting the % encoded character to their equivalent + * US-ASCII characters, and enclosing the remaining parts with an angle bracket pair, + * "<" and ">". For example, "cid:foo4%25foo1@bar.net" corresponds to + * Content-ID: + * * @return * The content ID like "foo-bar-zot@abc.com", without * surrounding '<' and '>' used as the transfer syntax. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java index c7a2491b9bd..b009975a987 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentEx.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java index 8b90d7e786d..4f9cea395a5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/AttachmentSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java index 919384d3906..52dc3d3a2c2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/ExceptionHasMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,7 +33,7 @@ import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException; * with a specific protocol wire format. For example, the SOAP's * VersionMismatchFault needs to be written with a correct fault code. * In that case, decoder could throw {@link VersionMismatchException}, - * and the correspoinding fault {@link Message} from {@link ExceptionHasMessage::getFaultMessage} + * and the corresponding fault {@link Message} from {@link ExceptionHasMessage#getFaultMessage()} * is sent on the wire. * * @author Jitendra Kotamraju diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java index 140c49596a4..6cbc2f9153e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/FilterMessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -73,7 +73,7 @@ public class FilterMessageImpl extends Message { return delegate.hasHeaders(); } - public @NotNull HeaderList getHeaders() { + public @NotNull MessageHeaders getHeaders() { return delegate.getHeaders(); } @@ -168,4 +168,8 @@ public class FilterMessageImpl extends Message { public @NotNull String getID(AddressingVersion av, SOAPVersion sv) { return delegate.getID(av, sv); } + + public SOAPVersion getSOAPVersion() { + return delegate.getSOAPVersion(); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java index e63817e60d0..a1811febabd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Header.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java index d16cae9f1f3..9f32f765a19 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/HeaderList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,33 +25,30 @@ package com.sun.xml.internal.ws.api.message; +import java.util.ArrayList; +import java.util.BitSet; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Set; + +import javax.xml.namespace.QName; +import javax.xml.ws.WebServiceException; + import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.addressing.WsaTubeHelper; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; -import com.sun.xml.internal.ws.api.addressing.OneWayFeature; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.pipe.Codec; import com.sun.xml.internal.ws.api.pipe.Pipe; -import com.sun.xml.internal.ws.message.RelatesToHeader; -import com.sun.xml.internal.ws.message.StringHeader; +import com.sun.xml.internal.ws.binding.SOAPBindingImpl; import com.sun.xml.internal.ws.protocol.soap.ClientMUTube; import com.sun.xml.internal.ws.protocol.soap.ServerMUTube; -import com.sun.xml.internal.ws.resources.AddressingMessages; -import com.sun.xml.internal.ws.resources.ClientMessages; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLStreamException; -import javax.xml.ws.WebServiceException; -import javax.xml.ws.soap.SOAPBinding; -import java.util.ArrayList; -import java.util.BitSet; -import java.util.Iterator; -import java.util.NoSuchElementException; +import java.util.Arrays; /** * A list of {@link Header}s on a {@link Message}. @@ -113,7 +110,7 @@ import java.util.NoSuchElementException; * * @see Message#getHeaders() */ -public class HeaderList extends ArrayList
{ +public class HeaderList extends ArrayList
implements MessageHeaders { private static final long serialVersionUID = -6358045781349627237L; /** @@ -132,12 +129,25 @@ public class HeaderList extends ArrayList
{ */ private BitSet moreUnderstoodBits = null; + private SOAPVersion soapVersion; + /** + * This method is deprecated - instead use this one: + * public HeaderList(SOAPVersion) * Creates an empty {@link HeaderList}. */ + @Deprecated public HeaderList() { } + /** + * Creates an empty {@link HeaderList} with the given soap version + * @param soapVersion + */ + public HeaderList(SOAPVersion soapVersion) { + this.soapVersion = soapVersion; + } + /** * Copy constructor. */ @@ -149,6 +159,24 @@ public class HeaderList extends ArrayList
{ } } + public HeaderList(MessageHeaders that) { + super(that.asList()); + if (that instanceof HeaderList) { + HeaderList hThat = (HeaderList) that; + this.understoodBits = hThat.understoodBits; + if (hThat.moreUnderstoodBits != null) { + this.moreUnderstoodBits = (BitSet) hThat.moreUnderstoodBits.clone(); + } + } else { + Set understood = that.getUnderstoodHeaders(); + if (understood != null) { + for (QName qname : understood) { + understood(qname); + } + } + } + } + /** * The total number of headers. */ @@ -157,13 +185,18 @@ public class HeaderList extends ArrayList
{ return super.size(); } + @Override + public boolean hasHeaders() { + return !isEmpty(); + } + /** * Adds all the headers. + * @deprecated throws UnsupportedOperationException from some HeaderList implementations - better iterate over items one by one */ + @Deprecated public void addAll(Header... headers) { - for (Header header : headers) { - add(header); - } + addAll(Arrays.asList(headers)); } /** @@ -233,6 +266,7 @@ public class HeaderList extends ArrayList
{ * if the given header is not {@link #contains(Object) contained} * in this header. */ + @Override public void understood(@NotNull Header header) { int sz = size(); for (int i = 0; i < sz; i++) { @@ -252,9 +286,8 @@ public class HeaderList extends ArrayList
{ * be marked as "understood". * @return null if not found. */ - public - @Nullable - Header get(@NotNull String nsUri, @NotNull String localName, boolean markAsUnderstood) { + @Override + public @Nullable Header get(@NotNull String nsUri, @NotNull String localName, boolean markAsUnderstood) { int len = size(); for (int i = 0; i < len; i++) { Header h = get(i); @@ -285,9 +318,8 @@ public class HeaderList extends ArrayList
{ * @return null * if not found. */ - public - @Nullable - Header get(@NotNull QName name, boolean markAsUnderstood) { + @Override + public @Nullable Header get(@NotNull QName name, boolean markAsUnderstood) { return get(name.getNamespaceURI(), name.getLocalPart(), markAsUnderstood); } @@ -321,12 +353,14 @@ public class HeaderList extends ArrayList
{ */ public @NotNull + @Override Iterator
getHeaders(@NotNull final String nsUri, @NotNull final String localName, final boolean markAsUnderstood) { return new Iterator
() { int idx = 0; Header next; + @Override public boolean hasNext() { if (next == null) { fetch(); @@ -334,6 +368,7 @@ public class HeaderList extends ArrayList
{ return next != null; } + @Override public Header next() { if (next == null) { fetch(); @@ -362,6 +397,7 @@ public class HeaderList extends ArrayList
{ } } + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -373,6 +409,7 @@ public class HeaderList extends ArrayList
{ */ public @NotNull + @Override Iterator
getHeaders(@NotNull QName headerName, final boolean markAsUnderstood) { return getHeaders(headerName.getNamespaceURI(), headerName.getLocalPart(), markAsUnderstood); } @@ -400,12 +437,14 @@ public class HeaderList extends ArrayList
{ */ public @NotNull + @Override Iterator
getHeaders(@NotNull final String nsUri, final boolean markAsUnderstood) { return new Iterator
() { int idx = 0; Header next; + @Override public boolean hasNext() { if (next == null) { fetch(); @@ -413,6 +452,7 @@ public class HeaderList extends ArrayList
{ return next != null; } + @Override public Header next() { if (next == null) { fetch(); @@ -441,39 +481,13 @@ public class HeaderList extends ArrayList
{ } } + @Override public void remove() { throw new UnsupportedOperationException(); } }; } - /** - * Gets the first {@link Header} of the specified name targeted at the - * current implicit role. - * - * @param name name of the header - * @param markUnderstood - * If this parameter is true, the returned headers will - * be marked as "understood" when they are returned - * from {@link Iterator#next()}. - * @return null if header not found - */ - private Header getFirstHeader(QName name, boolean markUnderstood, SOAPVersion sv) { - if (sv == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION()); - } - - Iterator
iter = getHeaders(name.getNamespaceURI(), name.getLocalPart(), markUnderstood); - while (iter.hasNext()) { - Header h = iter.next(); - if (h.getRole(sv).equals(sv.implicitRole)) { - return h; - } - } - - return null; - } - /** * Returns the value of WS-Addressing To header. The version * identifies the WS-Addressing version and the header returned is targeted at @@ -486,19 +500,7 @@ public class HeaderList extends ArrayList
{ * @return Value of WS-Addressing To header, anonymous URI if no header is present */ public String getTo(AddressingVersion av, SOAPVersion sv) { - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - Header h = getFirstHeader(av.toTag, true, sv); - String to; - if (h != null) { - to = h.getStringContent(); - } else { - to = av.anonymousUri; - } - - return to; + return AddressingUtils.getTo(this, av, sv); } /** @@ -513,17 +515,7 @@ public class HeaderList extends ArrayList
{ * @return Value of WS-Addressing Action header, null if no header is present */ public String getAction(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - String action = null; - Header h = getFirstHeader(av.actionTag, true, sv); - if (h != null) { - action = h.getStringContent(); - } - - return action; + return AddressingUtils.getAction(this, av, sv); } /** @@ -538,23 +530,7 @@ public class HeaderList extends ArrayList
{ * @return Value of WS-Addressing ReplyTo header, null if no header is present */ public WSEndpointReference getReplyTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - Header h = getFirstHeader(av.replyToTag, true, sv); - WSEndpointReference replyTo; - if (h != null) { - try { - replyTo = h.readAsEPR(av); - } catch (XMLStreamException e) { - throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e); - } - } else { - replyTo = av.anonymousEpr; - } - - return replyTo; + return AddressingUtils.getReplyTo(this, av, sv); } /** @@ -569,21 +545,7 @@ public class HeaderList extends ArrayList
{ * @return Value of WS-Addressing FaultTo header, null if no header is present */ public WSEndpointReference getFaultTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - Header h = getFirstHeader(av.faultToTag, true, sv); - WSEndpointReference faultTo = null; - if (h != null) { - try { - faultTo = h.readAsEPR(av); - } catch (XMLStreamException e) { - throw new WebServiceException(AddressingMessages.FAULT_TO_CANNOT_PARSE(), e); - } - } - - return faultTo; + return AddressingUtils.getFaultTo(this, av, sv); } /** @@ -598,17 +560,7 @@ public class HeaderList extends ArrayList
{ * @return Value of WS-Addressing MessageID header, null if no header is present */ public String getMessageID(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - Header h = getFirstHeader(av.messageIDTag, true, sv); - String messageId = null; - if (h != null) { - messageId = h.getStringContent(); - } - - return messageId; + return AddressingUtils.getMessageID(this, av, sv); } /** @@ -623,17 +575,7 @@ public class HeaderList extends ArrayList
{ * @return Value of WS-Addressing RelatesTo header, null if no header is present */ public String getRelatesTo(@NotNull AddressingVersion av, @NotNull SOAPVersion sv) { - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - Header h = getFirstHeader(av.relatesToTag, true, sv); - String relatesTo = null; - if (h != null) { - relatesTo = h.getStringContent(); - } - - return relatesTo; + return AddressingUtils.getRelatesTo(this, av, sv); } /** @@ -654,33 +596,11 @@ public class HeaderList extends ArrayList
{ * @param mustUnderstand to indicate if the addressing headers are set with mustUnderstand attribute */ public void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action, boolean mustUnderstand) { - fillCommonAddressingHeaders(packet, av, sv, action, mustUnderstand); - - // wsa:ReplyTo - // null or "true" is equivalent to request/response MEP - if (!oneway) { - WSEndpointReference epr = av.anonymousEpr; - if (get(av.replyToTag, false) == null) { - add(epr.createHeader(av.replyToTag)); - } - - // wsa:FaultTo - if (get(av.faultToTag, false) == null) { - add(epr.createHeader(av.faultToTag)); - } - - // wsa:MessageID - if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) { - if (get(av.messageIDTag, false) == null) { - Header h = new StringHeader(av.messageIDTag, Message.generateMessageID()); - add(h); - } - } - } + AddressingUtils.fillRequestAddressingHeaders(this, packet, av, sv, oneway, action, mustUnderstand); } public void fillRequestAddressingHeaders(Packet packet, AddressingVersion av, SOAPVersion sv, boolean oneway, String action) { - fillRequestAddressingHeaders(packet, av, sv, oneway, action, false); + AddressingUtils.fillRequestAddressingHeaders(this, packet, av, sv, oneway, action); } /** @@ -703,141 +623,7 @@ public class HeaderList extends ArrayList
{ * @param packet request packet */ public void fillRequestAddressingHeaders(WSDLPort wsdlPort, @NotNull WSBinding binding, Packet packet) { - if (binding == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_BINDING()); - } - - if (binding.isFeatureEnabled(SuppressAutomaticWSARequestHeadersFeature.class)) - return; - - //See if WSA headers are already set by the user. - HeaderList hl = packet.getMessage().getHeaders(); - String action = hl.getAction(binding.getAddressingVersion(), binding.getSOAPVersion()); - if (action != null) { - //assume that all the WSA headers are set by the user - return; - } - AddressingVersion addressingVersion = binding.getAddressingVersion(); - //seiModel is passed as null as it is not needed. - WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, null, binding); - - // wsa:Action - String effectiveInputAction = wsaHelper.getEffectiveInputAction(packet); - if (effectiveInputAction == null || effectiveInputAction.equals("") && binding.getSOAPVersion() == SOAPVersion.SOAP_11) { - throw new WebServiceException(ClientMessages.INVALID_SOAP_ACTION()); - } - boolean oneway = !packet.expectReply; - if (wsdlPort != null) { - // if WSDL has prohibited, then throw an error - // as anonymous ReplyTo MUST NOT be added in that case. BindingProvider need to - // disable AddressingFeature and MemberSubmissionAddressingFeature and hand-craft - // the SOAP message with non-anonymous ReplyTo/FaultTo. - if (!oneway && packet.getMessage() != null && packet.getWSDLOperation() != null) { - WSDLBoundOperation wbo = wsdlPort.getBinding().get(packet.getWSDLOperation()); - if (wbo != null && wbo.getAnonymous() == WSDLBoundOperation.ANONYMOUS.prohibited) { - throw new WebServiceException(AddressingMessages.WSAW_ANONYMOUS_PROHIBITED()); - } - } - } - if (!binding.isFeatureEnabled(OneWayFeature.class)) { - // standard oneway - fillRequestAddressingHeaders(packet, addressingVersion, binding.getSOAPVersion(), oneway, effectiveInputAction, addressingVersion.isRequired(binding)); - } else { - // custom oneway - fillRequestAddressingHeaders(packet, addressingVersion, binding.getSOAPVersion(), binding.getFeature(OneWayFeature.class), oneway, effectiveInputAction); - } - } - - private void fillRequestAddressingHeaders(@NotNull Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull OneWayFeature of, boolean oneway, @NotNull String action) { - if (!oneway&&!of.isUseAsyncWithSyncInvoke() && Boolean.TRUE.equals(packet.isSynchronousMEP)) - fillRequestAddressingHeaders(packet, av, sv, oneway, action); - else { - fillCommonAddressingHeaders(packet, av, sv, action, false); - - // wsa:ReplyTo - // wsa:ReplyTo (add it if it doesn't already exist and OnewayFeature - // requests a specific ReplyTo) - if (get(av.replyToTag, false) == null) { - WSEndpointReference replyToEpr = of.getReplyTo(); - if (replyToEpr != null) { - add(replyToEpr.createHeader(av.replyToTag)); - // add wsa:MessageID only for non-null ReplyTo - if (packet.getMessage().getHeaders().get(av.messageIDTag, false) == null) { - // if header doesn't exist, method getID creates a new random id - String newID = Message.generateMessageID(); - add(new StringHeader(av.messageIDTag, newID)); - } - } - } - - // wsa:FaultTo - // wsa:FaultTo (add it if it doesn't already exist and OnewayFeature - // requests a specific FaultTo) - if (get(av.faultToTag, false) == null) { - WSEndpointReference faultToEpr = of.getFaultTo(); - if (faultToEpr != null) { - add(faultToEpr.createHeader(av.faultToTag)); - // add wsa:MessageID only for non-null FaultTo - if (get(av.messageIDTag, false) == null) { - add(new StringHeader(av.messageIDTag, Message.generateMessageID())); - } - } - } - - // wsa:From - if (of.getFrom() != null) { - addOrReplace(of.getFrom().createHeader(av.fromTag)); - } - - // wsa:RelatesTo - if (of.getRelatesToID() != null) { - addOrReplace(new RelatesToHeader(av.relatesToTag, of.getRelatesToID())); - } - } - } - - /** - * Creates wsa:To, wsa:Action and wsa:MessageID header on the client - * - * @param packet request packet - * @param av WS-Addressing version - * @param sv SOAP version - * @param action Action Message Addressing Property value - * @throws IllegalArgumentException if any of the parameters is null. - */ - private void fillCommonAddressingHeaders(Packet packet, @NotNull AddressingVersion av, @NotNull SOAPVersion sv, @NotNull String action, boolean mustUnderstand) { - if (packet == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_PACKET()); - } - - if (av == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_ADDRESSING_VERSION()); - } - - if (sv == null) { - throw new IllegalArgumentException(AddressingMessages.NULL_SOAP_VERSION()); - } - - if (action == null && !sv.httpBindingId.equals(SOAPBinding.SOAP12HTTP_BINDING)) { - throw new IllegalArgumentException(AddressingMessages.NULL_ACTION()); - } - - // wsa:To - if (get(av.toTag, false) == null) { - StringHeader h = new StringHeader(av.toTag, packet.endpointAddress.toString()); - add(h); - } - - // wsa:Action - if (action != null) { - packet.soapAction = action; - if (get(av.actionTag, false) == null) { - //As per WS-I BP 1.2/2.0, if one of the WSA headers is MU, then all WSA headers should be treated as MU., - // so just set MU on action header - StringHeader h = new StringHeader(av.actionTag, action, sv, mustUnderstand); - add(h); - } - } + AddressingUtils.fillRequestAddressingHeaders(this, wsdlPort, binding, packet); } /** @@ -865,6 +651,7 @@ public class HeaderList extends ArrayList
{ */ public @Nullable + @Override Header remove(@NotNull String nsUri, @NotNull String localName) { int len = size(); for (int i = 0; i < len; i++) { @@ -887,6 +674,7 @@ public class HeaderList extends ArrayList
{ * @return * always true. Don't use the return value. */ + @Override public boolean addOrReplace(Header header) { for (int i=0; i < size(); i++) { Header hdr = get(i); @@ -902,6 +690,23 @@ public class HeaderList extends ArrayList
{ return add(header); } + @Override + public void replace(Header old, Header header) { + for (int i=0; i < size(); i++) { + Header hdr = get(i); + if (hdr.getNamespaceURI().equals(header.getNamespaceURI()) && + hdr.getLocalPart().equals(header.getLocalPart())) { + // Put the new header in the old position. Call super versions + // internally to avoid UnsupportedOperationException + removeInternal(i); + addInternal(i, header); + return; + } + } + + throw new IllegalArgumentException(); + } + protected void addInternal(int index, Header header) { super.add(index, header); } @@ -919,6 +724,7 @@ public class HeaderList extends ArrayList
{ */ public @Nullable + @Override Header remove(@NotNull QName name) { return remove(name.getNamespaceURI(), name.getLocalPart()); } @@ -1010,16 +816,41 @@ public class HeaderList extends ArrayList
{ @Override public boolean remove(Object o) { if (o != null) { - for (int index = 0; index < this.size(); index++) + for (int index = 0; index < this.size(); index++) { if (o.equals(this.get(index))) { remove(index); return true; } + } } return false; } + public Header remove(Header h) { + if (remove((Object) h)) { + return h; + } else { + return null; + } + } + + /** + * Creates a copy. + * + * This handles null {@link HeaderList} correctly. + * + * @param original + * Can be null, in which case null will be returned. + */ + public static HeaderList copy(MessageHeaders original) { + if (original == null) { + return null; + } else { + return new HeaderList(original); + } + } + /** * Creates a copy. * @@ -1029,16 +860,117 @@ public class HeaderList extends ArrayList
{ * Can be null, in which case null will be returned. */ public static HeaderList copy(HeaderList original) { - if (original == null) { - return null; - } else { - return new HeaderList(original); - } + return copy((MessageHeaders) original); } public void readResponseAddressingHeaders(WSDLPort wsdlPort, WSBinding binding) { // read Action - String wsaAction = getAction(binding.getAddressingVersion(), binding.getSOAPVersion()); +// String wsaAction = getAction(binding.getAddressingVersion(), binding.getSOAPVersion()); // TODO: validate client-inbound Action } + + @Override + public void understood(QName name) { + get(name, true); + } + + @Override + public void understood(String nsUri, String localName) { + get(nsUri, localName, true); + } + + @Override + public Set getUnderstoodHeaders() { + Set understoodHdrs = new HashSet(); + for (int i = 0; i < size(); i++) { + if (isUnderstood(i)) { + Header header = get(i); + understoodHdrs.add(new QName(header.getNamespaceURI(), header.getLocalPart())); + } + } + return understoodHdrs; +// throw new UnsupportedOperationException("getUnderstoodHeaders() is not implemented by HeaderList"); + } + + @Override + public boolean isUnderstood(Header header) { + return isUnderstood(header.getNamespaceURI(), header.getLocalPart()); + } + + @Override + public boolean isUnderstood(String nsUri, String localName) { + for (int i = 0; i < size(); i++) { + Header h = get(i); + if (h.getLocalPart().equals(localName) && h.getNamespaceURI().equals(nsUri)) { + return isUnderstood(i); + } + } + return false; + } + + @Override + public boolean isUnderstood(QName name) { + return isUnderstood(name.getNamespaceURI(), name.getLocalPart()); + } + + @Override + public Set getNotUnderstoodHeaders(Set roles, Set knownHeaders, WSBinding binding) { + Set notUnderstoodHeaders = null; + if (roles == null) { + roles = new HashSet(); + } + SOAPVersion effectiveSoapVersion = getEffectiveSOAPVersion(binding); + roles.add(effectiveSoapVersion.implicitRole); + for (int i = 0; i < size(); i++) { + if (!isUnderstood(i)) { + Header header = get(i); + if (!header.isIgnorable(effectiveSoapVersion, roles)) { + QName qName = new QName(header.getNamespaceURI(), header.getLocalPart()); + if (binding == null) { + //if binding is null, no further checks needed...we already + //know this header is not understood from the isUnderstood + //check above + if (notUnderstoodHeaders == null) { + notUnderstoodHeaders = new HashSet(); + } + notUnderstoodHeaders.add(qName); + } else { + // if the binding is not null, see if the binding can understand it + if (binding instanceof SOAPBindingImpl && !((SOAPBindingImpl) binding).understandsHeader(qName)) { + if (!knownHeaders.contains(qName)) { + //logger.info("Element not understood=" + qName); + if (notUnderstoodHeaders == null) { + notUnderstoodHeaders = new HashSet(); + } + notUnderstoodHeaders.add(qName); + } + } + } + } + } + } + return notUnderstoodHeaders; + } + + private SOAPVersion getEffectiveSOAPVersion(WSBinding binding) { + SOAPVersion mySOAPVersion = (soapVersion != null) ? soapVersion : binding.getSOAPVersion(); + if (mySOAPVersion == null) { + mySOAPVersion = SOAPVersion.SOAP_11; + } + return mySOAPVersion; + } + + public void setSoapVersion(SOAPVersion soapVersion) { + this.soapVersion = soapVersion; + } + + @Override + public Iterator
getHeaders() { + return iterator(); + } + + @Override + public List
asList() { + return this; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java index 3e1fa307418..63ee6686d38 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Headers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java index 0d644df2c5e..cd473a7aec6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Message.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; @@ -56,6 +57,7 @@ import org.xml.sax.SAXParseException; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import javax.xml.namespace.QName; +import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.stream.XMLStreamException; @@ -67,6 +69,8 @@ import javax.xml.ws.WebServiceException; import java.io.InputStream; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +import java.util.List; +import java.util.Map; import java.util.UUID; /** @@ -206,14 +210,14 @@ public abstract class Message { *

Implementation Note

*

* {@link Message} implementation is allowed to defer - * the construction of {@link HeaderList} object. So + * the construction of {@link MessageHeaders} object. So * if you only want to check for the existence of any header * element, use {@link #hasHeaders()}. * * @return * always return the same non-null object. */ - public abstract @NotNull HeaderList getHeaders(); + public abstract @NotNull MessageHeaders getHeaders(); /** * Gets the attachments of this message @@ -238,6 +242,15 @@ public abstract class Message { private WSDLBoundOperation operation = null; + private WSDLOperationMapping wsdlOperationMapping = null; + + private MessageMetadata messageMetadata = null; + + public void setMessageMedadata(MessageMetadata metadata) { + messageMetadata = metadata; + } + + /** * Returns the operation of which this message is an instance of. * @@ -267,6 +280,10 @@ public abstract class Message { */ @Deprecated public final @Nullable WSDLBoundOperation getOperation(@NotNull WSDLBoundPortType boundPortType) { + if (operation == null && messageMetadata != null) { + if (wsdlOperationMapping == null) wsdlOperationMapping = messageMetadata.getWSDLOperationMapping(); + if (wsdlOperationMapping != null) operation = wsdlOperationMapping.getWSDLBoundOperation(); + } if(operation==null) operation = boundPortType.getOperation(getPayloadNamespaceURI(),getPayloadLocalPart()); return operation; @@ -312,6 +329,13 @@ public abstract class Message { */ @Deprecated public final @Nullable JavaMethod getMethod(@NotNull SEIModel seiModel) { + if (wsdlOperationMapping == null && messageMetadata != null) { + wsdlOperationMapping = messageMetadata.getWSDLOperationMapping(); + } + if (wsdlOperationMapping != null) { + return wsdlOperationMapping.getJavaMethod(); + } + //fall back to the original logic which could be incorrect ... String localPart = getPayloadLocalPart(); String nsUri; if (localPart == null) { @@ -509,6 +533,28 @@ public abstract class Message { return readAsSOAPMessage(); } + public static Map> getTransportHeaders(Packet packet) { + return getTransportHeaders(packet, packet.getState().isInbound()); + } + + public static Map> getTransportHeaders(Packet packet, boolean inbound) { + Map> headers = null; + String key = inbound ? Packet.INBOUND_TRANSPORT_HEADERS : Packet.OUTBOUND_TRANSPORT_HEADERS; + if (packet.supports(key)) { + headers = (Map>)packet.get(key); + } + return headers; + } + + public static void addSOAPMimeHeaders(MimeHeaders mh, Map> headers) { + for(Map.Entry> e : headers.entrySet()) { + if (!e.getKey().equalsIgnoreCase("Content-Type")) { + for(String value : e.getValue()) { + mh.addHeader(e.getKey(), value); + } + } + } + } /** * Reads the payload as a JAXB object by using the given unmarshaller. * @@ -720,7 +766,7 @@ public abstract class Message { public @NotNull String getID(AddressingVersion av, SOAPVersion sv) { String uuid = null; if (av != null) { - uuid = getHeaders().getMessageID(av, sv); + uuid = AddressingUtils.getMessageID(getHeaders(), av, sv); } if (uuid == null) { uuid = generateMessageID(); @@ -736,4 +782,8 @@ public abstract class Message { public static String generateMessageID() { return "uuid:" + UUID.randomUUID().toString(); } + + public SOAPVersion getSOAPVersion() { + return null; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java index efc4436cd14..fbd261e0824 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,27 +27,35 @@ package com.sun.xml.internal.ws.api.message; import java.io.IOException; import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import javax.xml.soap.MimeHeader; +import javax.xml.soap.MimeHeaders; import javax.xml.soap.SOAPMessage; import javax.xml.transform.Source; import javax.xml.ws.WebServiceFeature; +import javax.xml.ws.soap.MTOMFeature; -import com.sun.xml.internal.org.jvnet.ws.EnvelopeStyle; -import com.sun.xml.internal.org.jvnet.ws.EnvelopeStyleFeature; -import com.sun.xml.internal.org.jvnet.ws.message.MessageContext; - +import com.oracle.webservices.internal.api.EnvelopeStyle; +import com.oracle.webservices.internal.api.EnvelopeStyleFeature; +import com.oracle.webservices.internal.api.message.MessageContext; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSFeatureList; import com.sun.xml.internal.ws.api.pipe.Codec; import com.sun.xml.internal.ws.api.pipe.Codecs; +import static com.sun.xml.internal.ws.transport.http.HttpAdapter.fixQuotesAroundSoapAction; /** - * The MessageContextFactory implements com.sun.xml.internal.org.jvnet.ws.message.MessageContextFactory as + * The MessageContextFactory implements com.oracle.webservices.internal.api.message.MessageContextFactory as * a factory of Packet and public facade of Codec(s). * * @author shih-chang.chen@oracle.com */ -public class MessageContextFactory extends com.sun.xml.internal.org.jvnet.ws.message.MessageContextFactory { +public class MessageContextFactory extends com.oracle.webservices.internal.api.message.MessageContextFactory { private WSFeatureList features; private Codec soapCodec; @@ -76,46 +84,105 @@ public class MessageContextFactory extends com.sun.xml.internal.org.jvnet.ws.mes } } - protected com.sun.xml.internal.org.jvnet.ws.message.MessageContextFactory newFactory(WebServiceFeature... f) { + protected com.oracle.webservices.internal.api.message.MessageContextFactory newFactory(WebServiceFeature... f) { return new com.sun.xml.internal.ws.api.message.MessageContextFactory(f); } - public MessageContext createContext(SOAPMessage soap) { + + public com.oracle.webservices.internal.api.message.MessageContext createContext() { + return packet(null); + } + + public com.oracle.webservices.internal.api.message.MessageContext createContext(SOAPMessage soap) { + throwIfIllegalMessageArgument(soap); return packet(Messages.create(soap)); } - public MessageContext createContext(Source m, EnvelopeStyle.Style envelopeStyle) { + public MessageContext createContext(Source m, com.oracle.webservices.internal.api.EnvelopeStyle.Style envelopeStyle) { + throwIfIllegalMessageArgument(m); return packet(Messages.create(m, SOAPVersion.from(envelopeStyle))); } - public MessageContext createContext(Source m) { + public com.oracle.webservices.internal.api.message.MessageContext createContext(Source m) { + throwIfIllegalMessageArgument(m); return packet(Messages.create(m, SOAPVersion.from(singleSoapStyle))); } - public MessageContext createContext(InputStream in, String contentType) throws IOException { + public com.oracle.webservices.internal.api.message.MessageContext createContext(InputStream in, String contentType) throws IOException { + throwIfIllegalMessageArgument(in); //TODO when do we use xmlCodec? Packet p = packet(null); soapCodec.decode(in, contentType, p); return p; } + /** + * @deprecated http://java.net/jira/browse/JAX_WS-1077 + */ + @Deprecated + public com.oracle.webservices.internal.api.message.MessageContext createContext(InputStream in, MimeHeaders headers) throws IOException { + String contentType = getHeader(headers, "Content-Type"); + Packet packet = (Packet) createContext(in, contentType); + packet.acceptableMimeTypes = getHeader(headers, "Accept"); + packet.soapAction = fixQuotesAroundSoapAction(getHeader(headers, "SOAPAction")); +// packet.put(Packet.INBOUND_TRANSPORT_HEADERS, toMap(headers)); + return packet; + } + + static String getHeader(MimeHeaders headers, String name) { + String[] values = headers.getHeader(name); + return (values != null && values.length > 0) ? values[0] : null; + } + + static Map> toMap(MimeHeaders headers) { + HashMap> map = new HashMap>(); + for (Iterator i = headers.getAllHeaders(); i.hasNext();) { + MimeHeader mh = i.next(); + List values = map.get(mh.getName()); + if (values == null) { + values = new ArrayList(); + map.put(mh.getName(), values); + } + values.add(mh.getValue()); + } + return map; + } + + public MessageContext createContext(Message m) { + throwIfIllegalMessageArgument(m); + return packet(m); + } + private Packet packet(Message m) { final Packet p = new Packet(); //TODO when do we use xmlCodec? p.codec = soapCodec; if (m != null) p.setMessage(m); + MTOMFeature mf = features.get(MTOMFeature.class); + if (mf != null) { + p.setMtomFeature(mf); + } return p; } + private void throwIfIllegalMessageArgument(Object message) + throws IllegalArgumentException + { + if (message == null) { + throw new IllegalArgumentException("null messages are not allowed. Consider using MessageContextFactory.createContext()"); + } + } - - public MessageContext doCreate() { + @Deprecated + public com.oracle.webservices.internal.api.message.MessageContext doCreate() { return packet(null); } - public MessageContext doCreate(SOAPMessage m) { + @Deprecated + public com.oracle.webservices.internal.api.message.MessageContext doCreate(SOAPMessage m) { return createContext(m); } - public MessageContext doCreate(Source x, SOAPVersion soapVersion) { + @Deprecated + public com.oracle.webservices.internal.api.message.MessageContext doCreate(Source x, SOAPVersion soapVersion) { return packet(Messages.create(x, soapVersion)); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java new file mode 100644 index 00000000000..0921061bc7e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageHeaders.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.message; + +import java.util.List; +import java.util.Iterator; +import java.util.Set; + +import javax.xml.namespace.QName; + +import com.sun.xml.internal.ws.api.WSBinding; + +/** + * Interface representing all the headers of a {@link Message} + */ +public interface MessageHeaders { + public void understood(Header header); + public void understood(QName name); + public void understood(String nsUri, String localName); + public Header get(String nsUri, String localName, boolean markAsUnderstood); + public Header get(QName name, boolean markAsUnderstood); + public Iterator

getHeaders(String nsUri, String localName, final boolean markAsUnderstood); + /** + * Get all headers in specified namespace + * @param nsUri + * @param markAsUnderstood + * @return + */ + public Iterator
getHeaders(String nsUri, final boolean markAsUnderstood); + public Iterator
getHeaders(QName headerName, final boolean markAsUnderstood); + public Iterator
getHeaders(); + public boolean hasHeaders(); + public boolean add(Header header); + public Header remove(QName name); + public Header remove(String nsUri, String localName); + //DONT public Header remove(Header header); + public void replace(Header old, Header header); + + /** + * Replaces an existing {@link Header} or adds a new {@link Header}. + * + *

+ * Order doesn't matter in headers, so this method + * does not make any guarantee as to where the new header + * is inserted. + * + * @return + * always true. Don't use the return value. + */ + public boolean addOrReplace(Header header); + + /** + * Return a Set of QNames of headers that have been explicitly marked as understood. + * If none have been marked, this method could return null + */ + public Set getUnderstoodHeaders(); + + /** + * Returns a Set of QNames of headers that satisfy ALL the following conditions: + * (a) Have mustUnderstand = true + * (b) have NOT been explicitly marked as understood + * (c) If roles argument is non-null, the header has isIgnorable = false + * for the roles argument and SOAP version + * (d) If non-null binding is passed in, are NOT understood by the binding + * (e) If (d) is met, the header is NOT in the knownHeaders list passed in + * + * @param roles + * @param knownHeaders + * @param binding + * @return + */ + public Set getNotUnderstoodHeaders(Set roles, Set knownHeaders, WSBinding binding); + + /** + * True if the header has been explicitly marked understood, false otherwise + * @param header + * @return + */ + public boolean isUnderstood(Header header); + + /** + * True if the header has been explicitly marked understood, false otherwise + * @param header + * @return + */ + public boolean isUnderstood(QName header); + + /** + * True if the header has been explicitly marked understood, false otherwise + * @param header + * @return + */ + public boolean isUnderstood(String nsUri, String header); + + /** + * Returns Header instances in a List. + * @return List containing Header instances + */ + public List

asList(); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/ri/XmlIsSetWriter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java similarity index 75% rename from jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/ri/XmlIsSetWriter.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java index 72b54accba7..230c576789f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/ri/XmlIsSetWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageMetadata.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,16 +23,15 @@ * questions. */ -package com.sun.tools.internal.xjc.generator.annotation.ri; +package com.sun.xml.internal.ws.api.message; -import com.sun.codemodel.internal.JAnnotationWriter; -import com.sun.xml.internal.bind.annotation.XmlIsSet; - -public interface XmlIsSetWriter - extends JAnnotationWriter -{ - - - XmlIsSetWriter value(String value); +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; +/** + * In order for the Message to get properties from the Packet ... + * + * @author shih-chang.chen@oracle.com + */ +public interface MessageMetadata { + public WSDLOperationMapping getWSDLOperationMapping(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java new file mode 100644 index 00000000000..708c09710b2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWrapper.java @@ -0,0 +1,245 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.message; + +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.namespace.QName; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPMessage; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; +import javax.xml.transform.Source; + +import org.xml.sax.ContentHandler; +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXException; + +import com.sun.istack.internal.NotNull; +import com.sun.xml.internal.bind.api.Bridge; +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.addressing.AddressingVersion; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.message.saaj.SAAJMessage; +import com.sun.xml.internal.ws.message.stream.StreamMessage; +import com.sun.xml.internal.ws.spi.db.XMLBridge; + +/** + * A MessageWrapper wraps the Message for the access through Packet. + * + * @author shih-chang.chen@oracle.com + */ +class MessageWrapper extends StreamMessage { + + Packet packet; + Message delegate; + StreamMessage streamDelegate; + + @Override + public void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException { + streamDelegate.writePayloadTo(contentHandler, errorHandler, fragment); + } + + @Override + public String getBodyPrologue() { + return streamDelegate.getBodyPrologue(); + } + + @Override + public String getBodyEpilogue() { + return streamDelegate.getBodyEpilogue(); + } + + MessageWrapper(Packet p, Message m) { + super(m.getSOAPVersion()); + packet = p; + delegate = m; + streamDelegate = (m instanceof StreamMessage) ? (StreamMessage) m : null; + setMessageMedadata(p); + } + + @Override + public int hashCode() { + return delegate.hashCode(); + } + + @Override + public boolean equals(Object obj) { + return delegate.equals(obj); + } + + @Override + public boolean hasHeaders() { + return delegate.hasHeaders(); + } + + @Override + public AttachmentSet getAttachments() { + return delegate.getAttachments(); + } + + @Override + public String toString() { + return delegate.toString(); + } + + @Override + public boolean isOneWay(WSDLPort port) { + return delegate.isOneWay(port); + } + + @Override + public String getPayloadLocalPart() { + return delegate.getPayloadLocalPart(); + } + + @Override + public String getPayloadNamespaceURI() { + return delegate.getPayloadNamespaceURI(); + } + + @Override + public boolean hasPayload() { + return delegate.hasPayload(); + } + + @Override + public boolean isFault() { + return delegate.isFault(); + } + + @Override + public QName getFirstDetailEntryName() { + return delegate.getFirstDetailEntryName(); + } + + @Override + public Source readEnvelopeAsSource() { + //TODO if (delegate instanceof SAAJMessage) + return delegate.readEnvelopeAsSource(); + } + + @Override + public Source readPayloadAsSource() { + //TODO if (delegate instanceof SAAJMessage) + return delegate.readPayloadAsSource(); + } + + @Override + public SOAPMessage readAsSOAPMessage() throws SOAPException { + if (!(delegate instanceof SAAJMessage)) { + delegate = toSAAJ(packet, null); + } + return delegate.readAsSOAPMessage(); + } + + @Override + public SOAPMessage readAsSOAPMessage(Packet p, boolean inbound) throws SOAPException { + if (!(delegate instanceof SAAJMessage)) { + delegate = toSAAJ(p, inbound); + } + return delegate.readAsSOAPMessage(); + } + + @Override + public Object readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException { + return delegate.readPayloadAsJAXB(unmarshaller); + } + + @Override + public T readPayloadAsJAXB(Bridge bridge) throws JAXBException { + return delegate.readPayloadAsJAXB(bridge); + } + + @Override + public T readPayloadAsJAXB(XMLBridge bridge) throws JAXBException { + return delegate.readPayloadAsJAXB(bridge); + } + + @Override + public XMLStreamReader readPayload() { + try { + return delegate.readPayload(); + } catch (XMLStreamException e) { + e.printStackTrace(); + } + return null; + } + + @Override + public void consume() { + delegate.consume(); + } + + @Override + public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException { + delegate.writePayloadTo(sw); + } + + @Override + public void writeTo(XMLStreamWriter sw) throws XMLStreamException { + delegate.writeTo(sw); + } + + @Override + public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) + throws SAXException { + delegate.writeTo(contentHandler, errorHandler); + } + + @Override + public Message copy() { + return delegate.copy(); + } + + @Override + public String getID(WSBinding binding) { + return delegate.getID(binding); + } + + @Override + public String getID(AddressingVersion av, SOAPVersion sv) { + return delegate.getID(av, sv); + } + + @Override + public SOAPVersion getSOAPVersion() { + return delegate.getSOAPVersion(); + } + + @Override + public @NotNull MessageHeaders getHeaders() { + return delegate.getHeaders(); + } + + @Override + public void setMessageMedadata(MessageMetadata metadata) { + super.setMessageMedadata(metadata); + delegate.setMessageMedadata(metadata); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java new file mode 100644 index 00000000000..9c9af9b6e4e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/MessageWritable.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.message; + +import java.io.IOException; +import java.io.OutputStream; + +import javax.xml.ws.soap.MTOMFeature; + +import com.oracle.webservices.internal.api.message.ContentType; + +/** + * A Message implementation may implement this interface as an alternative way to write the + * message into the OutputStream. + * + * @author shih-chang.chen@oracle.com + */ +public interface MessageWritable { + + /** + * Gets the Content-type of this message. + * + * @return The MIME content type of this message + */ + ContentType getContentType(); + + /** + * Writes the XML infoset portion of this MessageContext + * (from <soap:Envelope> to </soap:Envelope>). + * + * @param out + * Must not be null. The caller is responsible for closing the stream, + * not the callee. + * + * @return + * The MIME content type of this message (such as "application/xml"). + * This information is often ncessary by transport. + * + * @throws IOException + * if a {@link OutputStream} throws {@link IOException}. + */ + ContentType writeTo( OutputStream out ) throws IOException; + + /** + * Passes configuration information to this message to ensure the proper + * wire format is created. (from <soap:Envelope> to </soap:Envelope>). + * + * @param mtomFeature + * The standard WebServicesFeature for specifying + * the MTOM enablement and possibly threshold for the endpoint. + * This value may be null. + */ + void setMTOMConfiguration(final MTOMFeature mtomFeature); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java index 6a307fca843..5deade6dc89 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Messages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,6 @@ import com.sun.xml.internal.ws.message.EmptyMessageImpl; import com.sun.xml.internal.ws.message.ProblemActionHeader; import com.sun.xml.internal.ws.message.stream.PayloadStreamReaderMessage; import com.sun.xml.internal.ws.message.jaxb.JAXBMessage; -import com.sun.xml.internal.ws.message.saaj.SAAJMessage; import com.sun.xml.internal.ws.message.source.PayloadSourceMessage; import com.sun.xml.internal.ws.message.source.ProtocolSourceMessage; import com.sun.xml.internal.ws.spi.db.BindingContextFactory; @@ -222,7 +221,7 @@ public abstract class Messages { for( Node n=header.getFirstChild(); n!=null; n=n.getNextSibling() ) { if(n.getNodeType()==Node.ELEMENT_NODE) { if(headers==null) - headers = new HeaderList(); + headers = new HeaderList(ver); headers.add(Headers.create((Element)n)); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java index a1bf82602f4..02960dabe5b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Packet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,18 +25,23 @@ package com.sun.xml.internal.ws.api.message; +import com.oracle.webservices.internal.api.message.ContentType; +import com.oracle.webservices.internal.api.message.PropertySet; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.bind.marshaller.SAX2DOMEx; import com.sun.xml.internal.ws.addressing.WsaPropertyBag; +import com.sun.xml.internal.ws.addressing.WsaServerTube; import com.sun.xml.internal.ws.addressing.WsaTubeHelper; -import com.sun.xml.internal.ws.addressing.model.InvalidAddressingHeaderException; -import com.sun.xml.internal.ws.api.*; +import com.sun.xml.internal.ws.api.Component; +import com.sun.xml.internal.ws.api.EndpointAddress; +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; -import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.model.wsdl.WSDLOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.pipe.Codec; @@ -48,17 +53,16 @@ import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate; import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory; import com.sun.xml.internal.ws.client.*; import com.sun.xml.internal.ws.developer.JAXWSProperties; +import com.sun.xml.internal.ws.encoding.MtomCodec; import com.sun.xml.internal.ws.message.RelatesToHeader; import com.sun.xml.internal.ws.message.StringHeader; -import com.sun.xml.internal.ws.transport.http.WSHTTPConnection; -import com.sun.xml.internal.ws.message.saaj.SAAJMessage; -import com.sun.xml.internal.ws.server.WSEndpointImpl; import com.sun.xml.internal.ws.util.DOMUtil; import com.sun.xml.internal.ws.util.xml.XmlUtil; import com.sun.xml.internal.ws.wsdl.DispatchException; import com.sun.xml.internal.ws.wsdl.OperationDispatcher; +import com.sun.xml.internal.ws.resources.AddressingMessages; + -import com.sun.xml.internal.org.jvnet.ws.message.ContentType; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xml.sax.SAXException; @@ -67,6 +71,7 @@ import javax.xml.namespace.QName; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; import javax.xml.stream.XMLStreamWriter; +import javax.xml.stream.XMLStreamException; import javax.xml.ws.BindingProvider; import javax.xml.ws.Dispatch; import javax.xml.ws.WebServiceContext; @@ -74,12 +79,13 @@ import javax.xml.ws.WebServiceException; import javax.xml.ws.handler.LogicalMessageContext; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; +import javax.xml.ws.soap.MTOMFeature; + import java.util.*; import java.util.logging.Logger; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; -import java.nio.ByteBuffer; import java.nio.channels.WritableByteChannel; /** @@ -142,7 +148,7 @@ import java.nio.channels.WritableByteChannel; *
  • this class needs to be cloneable since Message is copiable. *
  • The three live views aren't implemented correctly. It will be * more work to do so, although I'm sure it's possible. - *
  • {@link Property} annotation is to make it easy + *
  • {@link PropertySet.Property} annotation is to make it easy * for {@link MessageContext} to export properties on this object, * but it probably needs some clean up. * @@ -150,9 +156,10 @@ import java.nio.channels.WritableByteChannel; * @author Kohsuke Kawaguchi */ public final class Packet - extends DistributedPropertySet - implements com.sun.xml.internal.org.jvnet.ws.message.MessageContext -{ + // Packet must continue to extend/implement deprecated interfaces until downstream + // usage is updated. + extends com.oracle.webservices.internal.api.message.BaseDistributedPropertySet + implements com.oracle.webservices.internal.api.message.MessageContext, MessageMetadata { /** * Creates a {@link Packet} that wraps a given {@link Message}. @@ -167,6 +174,7 @@ public final class Packet public Packet(Message request) { this(); this.message = request; + if (message != null) message.setMessageMedadata(this); } /** @@ -180,24 +188,8 @@ public final class Packet * Used by {@link #createResponse(Message)} and {@link #copy(boolean)}. */ private Packet(Packet that) { - that.copySatelliteInto((DistributedPropertySet) this); - this.handlerConfig = that.handlerConfig; + relatePackets(that, true); this.invocationProperties = that.invocationProperties; - this.handlerScopePropertyNames = that.handlerScopePropertyNames; - this.contentNegotiation = that.contentNegotiation; - this.wasTransportSecure = that.wasTransportSecure; - this.transportBackChannel = that.transportBackChannel; - this.endpointAddress = that.endpointAddress; - this.isAdapterDeliversNonAnonymousResponse = that.isAdapterDeliversNonAnonymousResponse; - this.wsdlOperation = that.wsdlOperation; - this.acceptableMimeTypes = that.acceptableMimeTypes; - this.endpoint = that.endpoint; - this.proxy = that.proxy; - this.webServiceContextDelegate = that.webServiceContextDelegate; - this.soapAction = that.soapAction; - this.expectReply = that.expectReply; - this.component = that.component; - // copy other properties that need to be copied. is there any? } /** @@ -215,7 +207,7 @@ public final class Packet if (copyMessage && this.message != null) { copy.message = this.message.copy(); } - + if (copy.message != null) copy.message.setMessageMedadata(copy); return copy; } @@ -227,14 +219,23 @@ public final class Packet * @return may null. See the class javadoc for when it's null. */ public Message getMessage() { - return message; + if (message != null && !(message instanceof MessageWrapper)) { + message = new MessageWrapper(this, message); + } + return message; + } + + public Message getInternalMessage() { + return (message instanceof MessageWrapper)? ((MessageWrapper)message).delegate : message; } public WSBinding getBinding() { - if (endpoint != null) - return endpoint.getBinding(); - if (proxy != null) - return (WSBinding) proxy.getBinding(); + if (endpoint != null) { + return endpoint.getBinding(); + } + if (proxy != null) { + return (WSBinding) proxy.getBinding(); + } return null; } /** @@ -244,8 +245,11 @@ public final class Packet */ public void setMessage(Message message) { this.message = message; + if (message != null) this.message.setMessageMedadata(this); } + private WSDLOperationMapping wsdlOperationMapping = null; + private QName wsdlOperation; /** @@ -257,29 +261,34 @@ public final class Packet * @return null if there is no WSDL model or * runtime cannot uniquely identify the wsdl operation from the information in the packet. */ - @com.sun.xml.internal.ws.api.PropertySet.Property(MessageContext.WSDL_OPERATION) + @Property(MessageContext.WSDL_OPERATION) public final @Nullable QName getWSDLOperation() { - if (wsdlOperation != null) - return wsdlOperation; + if (wsdlOperation != null) return wsdlOperation; + if ( wsdlOperationMapping == null) wsdlOperationMapping = getWSDLOperationMapping(); + if ( wsdlOperationMapping != null ) wsdlOperation = wsdlOperationMapping.getOperationName(); + return wsdlOperation; + } + public WSDLOperationMapping getWSDLOperationMapping() { + if (wsdlOperationMapping != null) return wsdlOperationMapping; OperationDispatcher opDispatcher = null; if (endpoint != null) { - opDispatcher = ((WSEndpointImpl) endpoint).getOperationDispatcher(); + opDispatcher = endpoint.getOperationDispatcher(); } else if (proxy != null) { opDispatcher = ((Stub) proxy).getOperationDispatcher(); } //OpDispatcher is null when there is no WSDLModel if (opDispatcher != null) { try { - wsdlOperation = opDispatcher.getWSDLOperationQName(this); + wsdlOperationMapping = opDispatcher.getWSDLOperationMapping(this); } catch (DispatchException e) { //Ignore, this might be a protocol message which may not have a wsdl operation //LOGGER.info("Cannot resolve wsdl operation that this Packet is targeted for."); } } - return wsdlOperation; + return wsdlOperationMapping; } /** @@ -333,7 +342,7 @@ public final class Packet * at the time of invocation. * This property is used by MUPipe and HandlerPipe implementations. */ - @com.sun.xml.internal.ws.api.PropertySet.Property(BindingProviderProperties.JAXWS_HANDLER_CONFIG) + @Property(BindingProviderProperties.JAXWS_HANDLER_CONFIG) public HandlerConfiguration handlerConfig; /** @@ -342,16 +351,28 @@ public final class Packet * * TODO: who's using this property? */ - @com.sun.xml.internal.ws.api.PropertySet.Property(BindingProviderProperties.JAXWS_CLIENT_HANDLE_PROPERTY) + @Property(BindingProviderProperties.JAXWS_CLIENT_HANDLE_PROPERTY) public BindingProvider proxy; /** - * Determines if the governing {@link Adapter} or {@link Fiber.CompletionCallback} will handle delivering - * response messages targeted at non-anonymous endpoint addresses. Prior to the introduction of this - * flag the {@link WsaServerTube} would deliver non-anonymous responses. + * Determines if the governing {@link Adapter} or {@link com.sun.xml.internal.ws.api.pipe.Fiber.CompletionCallback} + * will handle delivering response messages targeted at non-anonymous endpoint + * addresses. Prior to the introduction of this flag + * the {@link WsaServerTube} would deliver non-anonymous responses. */ public boolean isAdapterDeliversNonAnonymousResponse; + /** + * During invocation of a client Stub or Dispatch a Packet is + * created then the Stub's RequestContext is copied into the + * Packet. On certain internal cases the Packet is created + * *before* the invocation. In those cases we want the contents + * of the Packet to take precedence when ever any key/value pairs + * collide : if the Packet contains a value for a key use it, + * otherwise copy as usual from Stub. + */ + public boolean packetTakesPriorityOverRequestContext = false; + /** * The endpoint address to which this message is sent to. * @@ -371,19 +392,21 @@ public final class Packet * {@link #endpointAddress}. This is for JAX-WS client applications * that access this property via {@link BindingProvider#ENDPOINT_ADDRESS_PROPERTY}. */ - @com.sun.xml.internal.ws.api.PropertySet.Property(BindingProvider.ENDPOINT_ADDRESS_PROPERTY) + @Property(BindingProvider.ENDPOINT_ADDRESS_PROPERTY) public String getEndPointAddressString() { - if (endpointAddress == null) + if (endpointAddress == null) { return null; - else + } else { return endpointAddress.toString(); + } } public void setEndPointAddressString(String s) { - if (s == null) + if (s == null) { this.endpointAddress = null; - else + } else { this.endpointAddress = EndpointAddress.create(s); + } } /** @@ -394,15 +417,15 @@ public final class Packet */ public ContentNegotiation contentNegotiation; - @com.sun.xml.internal.ws.api.PropertySet.Property(ContentNegotiation.PROPERTY) + @Property(ContentNegotiation.PROPERTY) public String getContentNegotiationString() { return (contentNegotiation != null) ? contentNegotiation.toString() : null; } public void setContentNegotiationString(String s) { - if (s == null) + if (s == null) { contentNegotiation = null; - else { + } else { try { contentNegotiation = ContentNegotiation.valueOf(s); } catch (IllegalArgumentException e) { @@ -419,16 +442,17 @@ public final class Packet * This is not cached as one may reset the Message. *

    */ - @com.sun.xml.internal.ws.api.PropertySet.Property(MessageContext.REFERENCE_PARAMETERS) + @Property(MessageContext.REFERENCE_PARAMETERS) public @NotNull List getReferenceParameters() { + Message msg = getMessage(); List refParams = new ArrayList(); - if (message == null) { + if (msg == null) { return refParams; } - HeaderList hl = message.getHeaders(); - for (Header h : hl) { + MessageHeaders hl = msg.getHeaders(); + for (Header h : hl.asList()) { String attr = h.getAttribute(AddressingVersion.W3C.nsUri, "IsReferenceParameter"); if (attr != null && (attr.equals("true") || attr.equals("1"))) { Document d = DOMUtil.createDom(); @@ -455,14 +479,16 @@ public final class Packet } /** - * @deprecated * This method is for exposing header list through {@link PropertySet#get(Object)}, * for user applications, and should never be invoked directly from within the JAX-WS RI. */ - @com.sun.xml.internal.ws.api.PropertySet.Property(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY) - /*package*/ HeaderList getHeaderList() { - if (message == null) return null; - return message.getHeaders(); + @Property(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY) + /*package*/ MessageHeaders getHeaderList() { + Message msg = getMessage(); + if (msg == null) { + return null; + } + return msg.getHeaders(); } /** @@ -534,7 +560,7 @@ public final class Packet *

    * This property is set if and only if this is on the server side. */ - @com.sun.xml.internal.ws.api.PropertySet.Property(JAXWSProperties.WSENDPOINT) + @Property(JAXWSProperties.WSENDPOINT) public WSEndpoint endpoint; /** @@ -561,7 +587,7 @@ public final class Packet * header is present (See {@BP R2744} and {@BP R2745}.) For SOAP 1.2, * this is moved to the parameter of the "application/soap+xml". */ - @com.sun.xml.internal.ws.api.PropertySet.Property(BindingProvider.SOAPACTION_URI_PROPERTY) + @Property(BindingProvider.SOAPACTION_URI_PROPERTY) public String soapAction; /** @@ -622,7 +648,7 @@ public final class Packet * In all other situations, this property is null. * */ - @com.sun.xml.internal.ws.api.PropertySet.Property(BindingProviderProperties.ONE_WAY_OPERATION) + @Property(BindingProviderProperties.ONE_WAY_OPERATION) public Boolean expectReply; @@ -655,6 +681,20 @@ public final class Packet */ public Boolean nonNullAsyncHandlerGiven; + /** + * USE-CASE: + * WS-AT is enabled, but there is no WSDL available. + * If Packet.isRequestReplyMEP() is Boolean.TRUE then WS-AT should + * add the TX context. + * + * This value is exposed to users via facades at higher abstraction layers. + * The user should NEVER use Packet directly. + * This value should ONLY be set by users. + */ + private Boolean isRequestReplyMEP; + public Boolean isRequestReplyMEP() { return isRequestReplyMEP; } + public void setRequestReplyMEP(final Boolean x) { isRequestReplyMEP = x; } + /** * Lazily created set of handler-scope property names. * @@ -701,8 +741,9 @@ public final class Packet public final Set getHandlerScopePropertyNames(boolean readOnly) { Set o = this.handlerScopePropertyNames; if (o == null) { - if (readOnly) + if (readOnly) { return Collections.emptySet(); + } o = new HashSet(); this.handlerScopePropertyNames = o; } @@ -755,11 +796,25 @@ public final class Packet */ public Packet createClientResponse(Message msg) { Packet response = new Packet(this); - response.soapAction = null; // de-initializing response.setMessage(msg); + finishCreateRelateClientResponse(response); return response; } + /** + * For use cases that start with an existing Packet. + */ + public Packet relateClientResponse(final Packet response) { + response.relatePackets(this, true); + finishCreateRelateClientResponse(response); + return response; + } + + private void finishCreateRelateClientResponse(final Packet response) { + response.soapAction = null; // de-initializing + response.setState(State.ClientResponse); + } + /** * Creates a server-side response {@link Packet} from a request * packet ({@code this}). If WS-Addressing is enabled, a default Action @@ -778,55 +833,93 @@ public final class Packet */ public Packet createServerResponse(@Nullable Message responseMessage, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) { Packet r = createClientResponse(responseMessage); + return relateServerResponse(r, wsdlPort, seiModel, binding); + } - AddressingVersion av = binding.getAddressingVersion(); - // populate WS-A headers only if WS-A is enabled - if (av == null) - return r; - //populate WS-A headers only if the request has addressing headers - String inputAction = this.getMessage().getHeaders().getAction(av, binding.getSOAPVersion()); - if (inputAction == null) { - return r; + /** + * Copy all properties from ({@code this}) packet into a input {@link Packet} + * @param response packet + */ + public void copyPropertiesTo(@Nullable Packet response){ + relatePackets(response, false); + } + + + /** + * A common method to make members related between input packet and this packet + * + * @param packet + * @param isCopy 'true' means copying all properties from input packet; + * 'false' means copying all properties from this packet to input packet. + */ + private void relatePackets(@Nullable Packet packet, boolean isCopy) + { + Packet request; + Packet response; + + if (!isCopy) { //is relate + request = this; + response = packet; + + // processing specific properties + response.soapAction = null; + response.invocationProperties.putAll(request.invocationProperties); + if (this.getState().equals(State.ServerRequest)) { + response.setState(State.ServerResponse); + } + } else { //is copy constructor + request = packet; + response = this; + + // processing specific properties + response.soapAction = request.soapAction; + response.setState(request.getState()); } - // if one-way, then dont populate any WS-A headers - if (responseMessage == null || (wsdlPort != null && message.isOneWay(wsdlPort))) - return r; - // otherwise populate WS-Addressing headers - populateAddressingHeaders(binding, r, wsdlPort, seiModel); - return r; + request.copySatelliteInto(response); + response.isAdapterDeliversNonAnonymousResponse = request.isAdapterDeliversNonAnonymousResponse; + response.handlerConfig = request.handlerConfig; + response.handlerScopePropertyNames = request.handlerScopePropertyNames; + response.contentNegotiation = request.contentNegotiation; + response.wasTransportSecure = request.wasTransportSecure; + response.transportBackChannel = request.transportBackChannel; + response.endpointAddress = request.endpointAddress; + response.wsdlOperation = request.wsdlOperation; + response.wsdlOperationMapping = request.wsdlOperationMapping; + response.acceptableMimeTypes = request.acceptableMimeTypes; + response.endpoint = request.endpoint; + response.proxy = request.proxy; + response.webServiceContextDelegate = request.webServiceContextDelegate; + response.expectReply = request.expectReply; + response.component = request.component; + response.mtomAcceptable = request.mtomAcceptable; + response.mtomRequest = request.mtomRequest; + // copy other properties that need to be copied. is there any? } public Packet relateServerResponse(@Nullable Packet r, @Nullable WSDLPort wsdlPort, @Nullable SEIModel seiModel, @NotNull WSBinding binding) { - copySatelliteInto((DistributedPropertySet) r); - r.soapAction = null; - r.handlerConfig = this.handlerConfig; - r.invocationProperties.putAll(this.invocationProperties); - r.handlerScopePropertyNames = this.handlerScopePropertyNames; - r.contentNegotiation = this.contentNegotiation; - r.wasTransportSecure = this.wasTransportSecure; - r.endpointAddress = this.endpointAddress; - r.wsdlOperation = this.wsdlOperation; - - r.acceptableMimeTypes = this.acceptableMimeTypes; - r.endpoint = this.endpoint; - r.proxy = this.proxy; - r.webServiceContextDelegate = this.webServiceContextDelegate; - r.expectReply = this.expectReply; - + relatePackets(r, false); + r.setState(State.ServerResponse); AddressingVersion av = binding.getAddressingVersion(); // populate WS-A headers only if WS-A is enabled - if (av == null) + if (av == null) { return r; + } + + if (getMessage() == null) { + return r; + } + //populate WS-A headers only if the request has addressing headers - String inputAction = this.getMessage().getHeaders().getAction(av, binding.getSOAPVersion()); + String inputAction = AddressingUtils.getAction(getMessage().getHeaders(), av, binding.getSOAPVersion()); if (inputAction == null) { return r; } // if one-way, then dont populate any WS-A headers - if (r.getMessage() == null || (wsdlPort != null && message.isOneWay(wsdlPort))) + if (r.getMessage() == null || (wsdlPort != null && getMessage().isOneWay(wsdlPort))) { return r; + } // otherwise populate WS-Addressing headers populateAddressingHeaders(binding, r, wsdlPort, seiModel); @@ -851,12 +944,13 @@ public final class Packet */ public Packet createServerResponse(@Nullable Message responseMessage, @NotNull AddressingVersion addressingVersion, @NotNull SOAPVersion soapVersion, @NotNull String action) { Packet responsePacket = createClientResponse(responseMessage); - + responsePacket.setState(State.ServerResponse); // populate WS-A headers only if WS-A is enabled - if (addressingVersion == null) + if (addressingVersion == null) { return responsePacket; + } //populate WS-A headers only if the request has addressing headers - String inputAction = this.getMessage().getHeaders().getAction(addressingVersion, soapVersion); + String inputAction = AddressingUtils.getAction(this.getMessage().getHeaders(), addressingVersion, soapVersion); if (inputAction == null) { return responsePacket; } @@ -888,21 +982,33 @@ public final class Packet if (responsePacket.getMessage() == null) return; - HeaderList hl = responsePacket.getMessage().getHeaders(); + MessageHeaders hl = responsePacket.getMessage().getHeaders(); WsaPropertyBag wpb = getSatellite(WsaPropertyBag.class); - + Message msg = getMessage(); // wsa:To WSEndpointReference replyTo = null; - if (wpb != null) - replyTo = wpb.getReplyToFromRequest(); - if (replyTo == null) - replyTo = message.getHeaders().getReplyTo(av, sv); + Header replyToFromRequestMsg = AddressingUtils.getFirstHeader(msg.getHeaders(), av.replyToTag, true, sv); + Header replyToFromResponseMsg = hl.get(av.toTag, false); + boolean replaceToTag = true; + try{ + if (replyToFromRequestMsg != null){ + replyTo = replyToFromRequestMsg.readAsEPR(av); + } + if (replyToFromResponseMsg != null && replyTo == null) { + replaceToTag = false; + } + } catch (XMLStreamException e) { + throw new WebServiceException(AddressingMessages.REPLY_TO_CANNOT_PARSE(), e); + } + if (replyTo == null) { + replyTo = AddressingUtils.getReplyTo(msg.getHeaders(), av, sv); + } // wsa:Action, add if the message doesn't already contain it, // generally true for SEI case where there is SEIModel or WSDLModel // false for Provider with no wsdl, Expects User to set the coresponding header on the Message. - if (responsePacket.getMessage().getHeaders().getAction(av, sv) == null) { + if (AddressingUtils.getAction(responsePacket.getMessage().getHeaders(), av, sv) == null) { //wsa:Action header is not set in the message, so use the wsa:Action passed as the parameter. hl.add(new StringHeader(av.actionTag, action, sv, mustUnderstand)); } @@ -916,31 +1022,37 @@ public final class Packet // wsa:RelatesTo String mid = null; - if (wpb != null) - mid = wpb.getMessageID(); - if (mid == null) - mid = message.getHeaders().getMessageID(av, sv); - if (mid != null) - hl.add(new RelatesToHeader(av.relatesToTag, mid)); + if (wpb != null) { + mid = wpb.getMessageID(); + } + if (mid == null) { + mid = AddressingUtils.getMessageID(msg.getHeaders(), av, sv); + } + if (mid != null) { + hl.addOrReplace(new RelatesToHeader(av.relatesToTag, mid)); + } // populate reference parameters WSEndpointReference refpEPR = null; if (responsePacket.getMessage().isFault()) { // choose FaultTo - if (wpb != null) - refpEPR = wpb.getFaultToFromRequest(); - if (refpEPR == null) - refpEPR = message.getHeaders().getFaultTo(av, sv); + if (wpb != null) { + refpEPR = wpb.getFaultToFromRequest(); + } + if (refpEPR == null) { + refpEPR = AddressingUtils.getFaultTo(msg.getHeaders(), av, sv); + } // if FaultTo is null, then use ReplyTo - if (refpEPR == null) + if (refpEPR == null) { refpEPR = replyTo; + } } else { // choose ReplyTo refpEPR = replyTo; } - if (refpEPR != null) { - hl.add(new StringHeader(av.toTag, refpEPR.getAddress())); + if (replaceToTag && refpEPR != null) { + hl.addOrReplace(new StringHeader(av.toTag, refpEPR.getAddress())); refpEPR.addReferenceParametersToList(hl); } } @@ -948,17 +1060,19 @@ public final class Packet private void populateAddressingHeaders(WSBinding binding, Packet responsePacket, WSDLPort wsdlPort, SEIModel seiModel) { AddressingVersion addressingVersion = binding.getAddressingVersion(); - if (addressingVersion == null) return; + if (addressingVersion == null) { + return; + } WsaTubeHelper wsaHelper = addressingVersion.getWsaHelper(wsdlPort, seiModel, binding); - String action = responsePacket.message.isFault() ? + String action = responsePacket.getMessage().isFault() ? wsaHelper.getFaultAction(this, responsePacket) : wsaHelper.getOutputAction(this); if (action == null) { LOGGER.info("WSA headers are not added as value for wsa:Action cannot be resolved for this message"); return; } - populateAddressingHeaders(responsePacket, addressingVersion, binding.getSOAPVersion(), action, addressingVersion.isRequired(binding)); + populateAddressingHeaders(responsePacket, addressingVersion, binding.getSOAPVersion(), action, AddressingVersion.isRequired(binding)); } public String toShortString() { @@ -966,15 +1080,17 @@ public final class Packet } // For use only in a debugger + @Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append(super.toString()); String content; try { - if (message != null) { + Message msg = getMessage(); + if (msg != null) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLStreamWriter xmlWriter = XMLStreamWriterFactory.create(baos, "UTF-8"); - message.copy().writeTo(xmlWriter); + msg.copy().writeTo(xmlWriter); xmlWriter.flush(); xmlWriter.close(); baos.flush(); @@ -1000,19 +1116,121 @@ public final class Packet model = parse(Packet.class); } + @Override protected PropertyMap getPropertyMap() { return model; } - private static final Logger LOGGER = Logger.getLogger(Packet.class.getName()); + public Map asMapIncludingInvocationProperties() { + final Map asMap = asMap(); + return new AbstractMap() { + @Override + public Object get(Object key) { + Object o = asMap.get(key); + if (o != null) + return o; - public SOAPMessage getSOAPMessage() throws SOAPException { - return (message != null) ? message.readAsSOAPMessage() : null; + return invocationProperties.get(key); + } + + @Override + public int size() { + return asMap.size() + invocationProperties.size(); + } + + @Override + public boolean containsKey(Object key) { + if (asMap.containsKey(key)) + return true; + return invocationProperties.containsKey(key); + } + + @Override + public Set> entrySet() { + final Set> asMapEntries = asMap.entrySet(); + final Set> ipEntries = invocationProperties.entrySet(); + + return new AbstractSet>() { + @Override + public Iterator> iterator() { + final Iterator> asMapIt = asMapEntries.iterator(); + final Iterator> ipIt = ipEntries.iterator(); + + return new Iterator>() { + @Override + public boolean hasNext() { + return asMapIt.hasNext() || ipIt.hasNext(); + } + + @Override + public java.util.Map.Entry next() { + if (asMapIt.hasNext()) + return asMapIt.next(); + return ipIt.next(); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + + @Override + public int size() { + return asMap.size() + invocationProperties.size(); + } + }; + } + + @Override + public Object put(String key, Object value) { + if (supports(key)) + return asMap.put(key, value); + + return invocationProperties.put(key, value); + } + + @Override + public void clear() { + asMap.clear(); + invocationProperties.clear(); + } + + @Override + public Object remove(Object key) { + if (supports(key)) + return asMap.remove(key); + + return invocationProperties.remove(key); + } + }; } + private static final Logger LOGGER = Logger.getLogger(Packet.class.getName()); + + @Override + public SOAPMessage getSOAPMessage() throws SOAPException { + return getAsSOAPMessage(); + } + + //TODO replace the message to a SAAJMEssage issue - JRFSAAJMessage or SAAJMessage? + @Override + public SOAPMessage getAsSOAPMessage() throws SOAPException { + Message msg = this.getMessage(); + if (msg == null) + return null; + if (msg instanceof MessageWritable) + ((MessageWritable) msg).setMTOMConfiguration(mtomFeature); + return msg.readAsSOAPMessage(this, this.getState().isInbound()); + } + + public Codec codec = null; - Codec getCodec() { - if (codec != null) return codec; + public Codec getCodec() { + if (codec != null) { + return codec; + } if (endpoint != null) { codec = endpoint.createCodec(); } @@ -1023,12 +1241,232 @@ public final class Packet return codec; } - - public ContentType writeTo( OutputStream out ) throws IOException { + @Override + public com.oracle.webservices.internal.api.message.ContentType writeTo( OutputStream out ) throws IOException { + Message msg = getInternalMessage(); + if (msg instanceof MessageWritable) { + ((MessageWritable) msg).setMTOMConfiguration(mtomFeature); + return ((MessageWritable)msg).writeTo(out); + } return getCodec().encode(this, out); } - public ContentType writeTo( WritableByteChannel buffer ) { + public com.oracle.webservices.internal.api.message.ContentType writeTo( WritableByteChannel buffer ) { return getCodec().encode(this, buffer); } + + private ContentType contentType; + + /** + * If the request's Content-Type is multipart/related; type=application/xop+xml, then this set to to true + * + * Used on server-side, for encoding the repsonse. + */ + private Boolean mtomRequest; + + /** + * Based on request's Accept header this is set. + * Currently only set if MTOMFeature is enabled. + * + * Should be used on server-side, for encoding the response. + */ + private Boolean mtomAcceptable; + + private MTOMFeature mtomFeature; + + public Boolean getMtomRequest() { + return mtomRequest; + } + + public void setMtomRequest(Boolean mtomRequest) { + this.mtomRequest = mtomRequest; + } + + public Boolean getMtomAcceptable() { + return mtomAcceptable; + } + + Boolean checkMtomAcceptable; + public void checkMtomAcceptable() { + if (checkMtomAcceptable == null) { + if (acceptableMimeTypes == null || isFastInfosetDisabled) { + checkMtomAcceptable = false; + } else { + checkMtomAcceptable = (acceptableMimeTypes.indexOf(MtomCodec.XOP_XML_MIME_TYPE) != -1); +// StringTokenizer st = new StringTokenizer(acceptableMimeTypes, ","); +// while (st.hasMoreTokens()) { +// final String token = st.nextToken().trim(); +// if (token.toLowerCase().contains(MtomCodec.XOP_XML_MIME_TYPE)) { +// mtomAcceptable = true; +// } +// } +// if (mtomAcceptable == null) mtomAcceptable = false; + } + } + mtomAcceptable = checkMtomAcceptable; + } + + private Boolean fastInfosetAcceptable; + + public Boolean getFastInfosetAcceptable(String fiMimeType) { + if (fastInfosetAcceptable == null) { + if (acceptableMimeTypes == null || isFastInfosetDisabled) { + fastInfosetAcceptable = false; + } else { + fastInfosetAcceptable = (acceptableMimeTypes.indexOf(fiMimeType) != -1); + } +// if (accept == null || isFastInfosetDisabled) return false; +// +// StringTokenizer st = new StringTokenizer(accept, ","); +// while (st.hasMoreTokens()) { +// final String token = st.nextToken().trim(); +// if (token.equalsIgnoreCase(fiMimeType)) { +// return true; +// } +// } +// return false; + } + return fastInfosetAcceptable; + } + + + public void setMtomFeature(MTOMFeature mtomFeature) { + this.mtomFeature = mtomFeature; + } + + public MTOMFeature getMtomFeature() { + //If we have a binding, use that in preference to an explicitly + //set MTOMFeature + WSBinding binding = getBinding(); + if (binding != null) { + return binding.getFeature(MTOMFeature.class); + } + return mtomFeature; + } + + @Override + public com.oracle.webservices.internal.api.message.ContentType getContentType() { + if (contentType == null) { + contentType = getInternalContentType(); + } + if (contentType == null) { + contentType = getCodec().getStaticContentType(this); + } + if (contentType == null) { + //TODO write to buffer + } + return contentType; + } + + public ContentType getInternalContentType() { + Message msg = getInternalMessage(); + if (msg instanceof MessageWritable) { + return ((MessageWritable)msg).getContentType(); + } + return contentType; + } + + public void setContentType(ContentType contentType) { + this.contentType = contentType; + } + + public enum Status { + Request, Response, Unknown; + public boolean isRequest() { return Request.equals(this); } + public boolean isResponse() { return Response.equals(this); } + } + + public enum State { + ServerRequest(true), ClientRequest(false), ServerResponse(false), ClientResponse(true); + private boolean inbound; + State(boolean inbound) { + this.inbound = inbound; + } + public boolean isInbound() { + return inbound; + } + } + +// private Status status = Status.Unknown; + + //Default state is ServerRequest - some custom adapters may not set the value of state + //upon server request - all other code paths should set it + private State state = State.ServerRequest; + +// public Status getStatus() { return status; } + + public State getState() { return state; } + public void setState(State state) { this.state = state; } + + public boolean shouldUseMtom() { + if (getState().isInbound()) { + return isMtomContentType(); + } else { + return shouldUseMtomOutbound(); + } + } + + private boolean shouldUseMtomOutbound() { + //Use the getter to make sure all the logic is executed correctly + MTOMFeature myMtomFeature = getMtomFeature(); + if(myMtomFeature != null && myMtomFeature.isEnabled()) { + //On client, always use XOP encoding if MTOM is enabled + //On Server, mtomAcceptable and mtomRequest will be set - use XOP encoding + //if either request is XOP encoded (mtomRequest) or + //client accepts XOP encoding (mtomAcceptable) + if (getMtomAcceptable() == null && getMtomRequest() == null) { + return true; + } else { + if (getMtomAcceptable() != null && getMtomAcceptable() && getState().equals(State.ServerResponse)) { + return true; + } + if (getMtomRequest() != null && getMtomRequest() && getState().equals(State.ServerResponse)) { + return true; + } + } + } + return false; + } + + private boolean isMtomContentType() { + return (getInternalContentType() != null) && + (getInternalContentType().getContentType().contains("application/xop+xml")); + } + + /** + * @deprecated + */ + public void addSatellite(@NotNull com.sun.xml.internal.ws.api.PropertySet satellite) { + super.addSatellite(satellite); + } + + /** + * @deprecated + */ + public void addSatellite(@NotNull Class keyClass, @NotNull com.sun.xml.internal.ws.api.PropertySet satellite) { + super.addSatellite(keyClass, satellite); + } + + /** + * @deprecated + */ + public void copySatelliteInto(@NotNull com.sun.xml.internal.ws.api.DistributedPropertySet r) { + super.copySatelliteInto(r); + } + + /** + * @deprecated + */ + public void removeSatellite(com.sun.xml.internal.ws.api.PropertySet satellite) { + super.removeSatellite(satellite); + } + + /** + * This is propogated from SOAPBindingCodec and will affect isMtomAcceptable and isFastInfosetAcceptable + */ + private boolean isFastInfosetDisabled; + + public void setFastInfosetDisabled(boolean b) { + isFastInfosetDisabled = b; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java index 974cf85502f..ea8d0dd55c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/SuppressAutomaticWSARequestHeadersFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java index 75d9408eea2..83e8788e1cc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,6 +24,6 @@ */ /** - * {@link Message} and related abstractions that represent a SOAP message. + * {@link com.sun.xml.internal.ws.api.message.Message} and related abstractions that represent a SOAP message. */ package com.sun.xml.internal.ws.api.message; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java index 884a2b1e6e6..252038275e2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import javax.xml.soap.SAAJMetaFactory; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFactory; import javax.xml.soap.SOAPMessage; +import javax.xml.stream.XMLStreamException; import org.xml.sax.SAXException; @@ -41,6 +42,7 @@ import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.Attachment; import com.sun.xml.internal.ws.api.message.AttachmentEx; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.message.saaj.SAAJMessage; import com.sun.xml.internal.ws.util.ServiceFinder; import com.sun.xml.internal.ws.util.xml.XmlUtil; @@ -76,14 +78,14 @@ public class SAAJFactory { * specified implementation of MessageFactory. * @see SAAJMetaFactory */ - public static MessageFactory getMessageFactory(String saajFactoryString) throws SOAPException { + public static MessageFactory getMessageFactory(String protocol) throws SOAPException { for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) { - MessageFactory mf = s.createMessageFactory(saajFactoryString); + MessageFactory mf = s.createMessageFactory(protocol); if (mf != null) return mf; } - return instance.createMessageFactory(saajFactoryString); + return instance.createMessageFactory(protocol); } /** @@ -104,14 +106,14 @@ public class SAAJFactory { * specified SOAPFactory * @see SAAJMetaFactory */ - public static SOAPFactory getSOAPFactory(String saajFactoryString) throws SOAPException { + public static SOAPFactory getSOAPFactory(String protocol) throws SOAPException { for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) { - SOAPFactory sf = s.createSOAPFactory(saajFactoryString); + SOAPFactory sf = s.createSOAPFactory(protocol); if (sf != null) return sf; } - return instance.createSOAPFactory(saajFactoryString); + return instance.createSOAPFactory(protocol); } /** @@ -146,6 +148,50 @@ public class SAAJFactory { return instance.readAsSOAPMessage(soapVersion, message); } + /** + * Reads Message as SOAPMessage. After this call message is consumed. + * @param soapVersion SOAP version + * @param message Message + * @param packet The packet that owns the Message + * @return Created SOAPMessage + * @throws SOAPException if SAAJ processing fails + */ + public static SOAPMessage read(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException { + for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) { + SOAPMessage msg = s.readAsSOAPMessage(soapVersion, message, packet); + if (msg != null) + return msg; + } + + return instance.readAsSOAPMessage(soapVersion, message, packet); + } + + /** + * Reads the message within the Packet to a SAAJMessage. After this call message is consumed. + * @param packet Packet + * @return Created SAAJPMessage + * @throws SOAPException if SAAJ processing fails + */ + public static SAAJMessage read(Packet packet) throws SOAPException { + for (SAAJFactory s : ServiceFinder.find(SAAJFactory.class)) { + SAAJMessage msg = s.readAsSAAJ(packet); + if (msg != null) return msg; + } + return instance.readAsSAAJ(packet); + } + + /** + * Reads the message within the Packet to a SAAJMessage. After this call message is consumed. + * @param packet Packet + * @return Created SAAJPMessage + * @throws SOAPException if SAAJ processing fails + */ + public SAAJMessage readAsSAAJ(Packet packet) throws SOAPException { + SOAPVersion v = packet.getMessage().getSOAPVersion(); + SOAPMessage msg = readAsSOAPMessage(v, packet.getMessage()); + return new SAAJMessage(msg); + } + /** * Creates a new MessageFactory object that is an instance * of the specified implementation. May be a dynamic message factory, @@ -169,8 +215,8 @@ public class SAAJFactory { * specified implementation of MessageFactory. * @see SAAJMetaFactory */ - public MessageFactory createMessageFactory(String saajFactoryString) throws SOAPException { - return MessageFactory.newInstance(saajFactoryString); + public MessageFactory createMessageFactory(String protocol) throws SOAPException { + return MessageFactory.newInstance(protocol); } /** @@ -191,8 +237,8 @@ public class SAAJFactory { * specified SOAPFactory * @see SAAJMetaFactory */ - public SOAPFactory createSOAPFactory(String saajFactoryString) throws SOAPException { - return SOAPFactory.newInstance(saajFactoryString); + public SOAPFactory createSOAPFactory(String protocol) throws SOAPException { + return SOAPFactory.newInstance(protocol); } /** @@ -211,16 +257,36 @@ public class SAAJFactory { * @return Created SOAPMessage * @throws SOAPException if SAAJ processing fails */ - public SOAPMessage readAsSOAPMessage(SOAPVersion soapVersion, Message message) throws SOAPException { + public SOAPMessage readAsSOAPMessage(final SOAPVersion soapVersion, final Message message) throws SOAPException { SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); + SaajStaxWriter writer = new SaajStaxWriter(msg); + try { + message.writeTo(writer); + } catch (XMLStreamException e) { + throw (e.getCause() instanceof SOAPException) ? (SOAPException) e.getCause() : new SOAPException(e); + } + msg = writer.getSOAPMessage(); + addAttachmentsToSOAPMessage(msg, message); + if (msg.saveRequired()) + msg.saveChanges(); + return msg; + } + public SOAPMessage readAsSOAPMessageSax2Dom(final SOAPVersion soapVersion, final Message message) throws SOAPException { + SOAPMessage msg = soapVersion.getMessageFactory().createMessage(); SAX2DOMEx s2d = new SAX2DOMEx(msg.getSOAPPart()); try { message.writeTo(s2d, XmlUtil.DRACONIAN_ERROR_HANDLER); } catch (SAXException e) { throw new SOAPException(e); } + addAttachmentsToSOAPMessage(msg, message); + if (msg.saveRequired()) + msg.saveChanges(); + return msg; + } + static protected void addAttachmentsToSOAPMessage(SOAPMessage msg, Message message) { for(Attachment att : message.getAttachments()) { AttachmentPart part = msg.createAttachmentPart(); part.setDataHandler(att.asDataHandler()); @@ -249,9 +315,19 @@ public class SAAJFactory { } msg.addAttachmentPart(part); } + } - if (msg.saveRequired()) - msg.saveChanges(); - return msg; + /** + * Reads Message as SOAPMessage. After this call message is consumed. + * The implementation in this class simply calls readAsSOAPMessage(SOAPVersion, Message), + * and ignores the other parameters + * Subclasses can override and choose to base SOAPMessage creation on Packet properties if needed + * @param soapVersion SOAP version + * @param message Message + * @return Created SOAPMessage + * @throws SOAPException if SAAJ processing fails + */ + public SOAPMessage readAsSOAPMessage(SOAPVersion soapVersion, Message message, Packet packet) throws SOAPException { + return readAsSOAPMessage(soapVersion, message); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java new file mode 100644 index 00000000000..220dd8ea343 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SAAJMessageHeaders.java @@ -0,0 +1,498 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.message.saaj; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.xml.namespace.QName; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPHeader; +import javax.xml.soap.SOAPHeaderElement; +import javax.xml.soap.SOAPMessage; + +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.message.Header; +import com.sun.xml.internal.ws.api.message.MessageHeaders; +import com.sun.xml.internal.ws.binding.SOAPBindingImpl; +import com.sun.xml.internal.ws.message.saaj.SAAJHeader; + +public class SAAJMessageHeaders implements MessageHeaders { + SOAPMessage sm; + Map nonSAAJHeaders; + Map notUnderstoodCount; + SOAPVersion soapVersion; + private Set understoodHeaders; + + public SAAJMessageHeaders(SOAPMessage sm, SOAPVersion version) { + this.sm = sm; + this.soapVersion = version; + initHeaderUnderstanding(); + } + + /** Set the initial understood/not understood state of the headers in this + * object + */ + private void initHeaderUnderstanding() { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return; + } + + Iterator allHeaders = soapHeader.examineAllHeaderElements(); + while(allHeaders.hasNext()) { + SOAPHeaderElement nextHdrElem = (SOAPHeaderElement) allHeaders.next(); + if (nextHdrElem == null) { + continue; + } + if (nextHdrElem.getMustUnderstand()) { + notUnderstood(nextHdrElem.getElementQName()); + } + //only headers explicitly marked as understood should be + //in the understoodHeaders set, so don't add anything to + //that set at the beginning + } + + } + + @Override + public void understood(Header header) { + understood(header.getNamespaceURI(), header.getLocalPart()); + } + + @Override + public void understood(String nsUri, String localName) { + understood(new QName(nsUri, localName)); + } + + @Override + public void understood(QName qName) { + if (notUnderstoodCount == null) { + notUnderstoodCount = new HashMap(); + } + + Integer count = notUnderstoodCount.get(qName); + if (count != null && count.intValue() > 0) { + //found the header in notUnderstood headers - decrement count + count = count.intValue() - 1; + if (count <= 0) { + //if the value is zero or negative, remove that header name + //since all headers by that name are understood now + notUnderstoodCount.remove(qName); + } else { + notUnderstoodCount.put(qName, count); + } + } + + if (understoodHeaders == null) { + understoodHeaders = new HashSet(); + } + //also add it to the understood headers list (optimization for getUnderstoodHeaders) + understoodHeaders.add(qName); + + } + + @Override + public boolean isUnderstood(Header header) { + return isUnderstood(header.getNamespaceURI(), header.getLocalPart()); + } + @Override + public boolean isUnderstood(String nsUri, String localName) { + return isUnderstood(new QName(nsUri, localName)); + } + + @Override + public boolean isUnderstood(QName name) { + if (understoodHeaders == null) { + return false; + } + return understoodHeaders.contains(name); + } + + public boolean isUnderstood(int index) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Header get(String nsUri, String localName, boolean markAsUnderstood) { + SOAPHeaderElement h = find(nsUri, localName); + if (h != null) { + if (markAsUnderstood) { + understood(nsUri, localName); + } + return new SAAJHeader(h); + } + return null; + } + + @Override + public Header get(QName name, boolean markAsUnderstood) { + return get(name.getNamespaceURI(), name.getLocalPart(), markAsUnderstood); + } + + @Override + public Iterator

    getHeaders(QName headerName, + boolean markAsUnderstood) { + return getHeaders(headerName.getNamespaceURI(), headerName.getLocalPart(), markAsUnderstood); + } + + @Override + public Iterator
    getHeaders(final String nsUri, final String localName, + final boolean markAsUnderstood) { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return null; + } + Iterator allHeaders = soapHeader.examineAllHeaderElements(); + if (markAsUnderstood) { + //mark all the matchingheaders as understood up front + //make an iterator while we're doing that + List
    headers = new ArrayList
    (); + while (allHeaders.hasNext()) { + SOAPHeaderElement nextHdr = (SOAPHeaderElement) allHeaders.next(); + if (nextHdr != null && + nextHdr.getNamespaceURI().equals(nsUri)) { + if (localName == null || + nextHdr.getLocalName().equals(localName)) { + understood(nextHdr.getNamespaceURI(), nextHdr.getLocalName()); + headers.add(new SAAJHeader(nextHdr)); + } + } + } + return headers.iterator(); + } + //if we got here markAsUnderstood is false - return a lazy iterator rather + //than traverse the entire list of headers now + return new HeaderReadIterator(allHeaders, nsUri, localName); + } + + @Override + public Iterator
    getHeaders(String nsUri, boolean markAsUnderstood) { + return getHeaders(nsUri, null, markAsUnderstood); + } + @Override + public boolean add(Header header) { + try { + header.writeTo(sm); + } catch (SOAPException e) { + //TODO log exception + return false; + } + + //the newly added header is not understood by default + notUnderstood(new QName(header.getNamespaceURI(), header.getLocalPart())); + + //track non saaj headers so that they can be retrieved later + if (isNonSAAJHeader(header)) { + //TODO assumes only one header with that name? + addNonSAAJHeader(find(header.getNamespaceURI(), header.getLocalPart()), + header); + } + + return true; + } + + @Override + public Header remove(QName name) { + return remove(name.getNamespaceURI(), name.getLocalPart()); + } + + @Override + public Header remove(String nsUri, String localName) { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return null; + } + SOAPHeaderElement headerElem = find(nsUri, localName); + if (headerElem == null) { + return null; + } + headerElem = (SOAPHeaderElement) soapHeader.removeChild(headerElem); + + //it might have been a nonSAAJHeader - remove from that map + removeNonSAAJHeader(headerElem); + + //remove it from understoodHeaders and notUnderstoodHeaders if present + QName hdrName = (nsUri == null) ? new QName(localName) : new QName(nsUri, localName); + if (understoodHeaders != null) { + understoodHeaders.remove(hdrName); + } + removeNotUnderstood(hdrName); + + return new SAAJHeader(headerElem); + } + + private void removeNotUnderstood(QName hdrName) { + if (notUnderstoodCount == null) { + return; + } + Integer notUnderstood = notUnderstoodCount.get(hdrName); + if (notUnderstood != null) { + int intNotUnderstood = notUnderstood; + intNotUnderstood--; + if (intNotUnderstood <= 0) { + notUnderstoodCount.remove(hdrName); + } + } + + } + + private SOAPHeaderElement find(QName qName) { + return find(qName.getNamespaceURI(), qName.getLocalPart()); + } + + private SOAPHeaderElement find(String nsUri, String localName) { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return null; + } + Iterator allHeaders = soapHeader.examineAllHeaderElements(); + while(allHeaders.hasNext()) { + SOAPHeaderElement nextHdrElem = (SOAPHeaderElement) allHeaders.next(); + if (nextHdrElem.getNamespaceURI().equals(nsUri) && + nextHdrElem.getLocalName().equals(localName)) { + return nextHdrElem; + } + } + return null; + } + + private void notUnderstood(QName qName) { + if (notUnderstoodCount == null) { + notUnderstoodCount = new HashMap(); + } + Integer count = notUnderstoodCount.get(qName); + if (count == null) { + notUnderstoodCount.put(qName, 1); + } else { + notUnderstoodCount.put(qName, count + 1); + } + + //if for some strange reason it was previously understood and now is not, + //remove it from understoodHeaders if it exists there + if (understoodHeaders != null) { + understoodHeaders.remove(qName); + } + } + + /** + * Utility method to get the SOAPHeader from a SOAPMessage, adding one if + * one is not present in the original message. + */ + private SOAPHeader ensureSOAPHeader() { + SOAPHeader header; + try { + header = sm.getSOAPPart().getEnvelope().getHeader(); + if (header != null) { + return header; + } else { + return sm.getSOAPPart().getEnvelope().addHeader(); + } + } catch (Exception e) { + return null; + } + } + + private boolean isNonSAAJHeader(Header header) { + return !(header instanceof SAAJHeader); + } + + private void addNonSAAJHeader(SOAPHeaderElement headerElem, Header header) { + if (nonSAAJHeaders == null) { + nonSAAJHeaders = new HashMap(); + } + nonSAAJHeaders.put(headerElem, header); + } + + private void removeNonSAAJHeader(SOAPHeaderElement headerElem) { + if (nonSAAJHeaders != null) { + nonSAAJHeaders.remove(headerElem); + } + } + + @Override + public boolean addOrReplace(Header header) { + remove(header.getNamespaceURI(), header.getLocalPart()); + return add(header); + } + + @Override + public void replace(Header old, Header header) { + if (remove(old.getNamespaceURI(), old.getLocalPart()) == null) + throw new IllegalArgumentException(); + add(header); + } + + @Override + public Set getUnderstoodHeaders() { + return understoodHeaders; + } + + @Override + public Set getNotUnderstoodHeaders(Set roles, + Set knownHeaders, WSBinding binding) { + Set notUnderstoodHeaderNames = new HashSet(); + if (notUnderstoodCount == null) { + return notUnderstoodHeaderNames; + } + for (QName headerName : notUnderstoodCount.keySet()) { + int count = notUnderstoodCount.get(headerName); + if (count <= 0) { + continue; + } + SOAPHeaderElement hdrElem = find(headerName); + if (!hdrElem.getMustUnderstand()) { + continue; + } + SAAJHeader hdr = new SAAJHeader(hdrElem); + //mustUnderstand attribute is true - but there may be + //additional criteria + boolean understood = false; + if (roles != null) { + understood = !roles.contains(hdr.getRole(soapVersion)); + } + if (understood) { + continue; + } + //if it must be understood see if it is understood by the binding + //or is in knownheaders + if (binding != null && binding instanceof SOAPBindingImpl) { + understood = ((SOAPBindingImpl) binding).understandsHeader(headerName); + if (!understood) { + if (knownHeaders != null && knownHeaders.contains(headerName)) { + understood = true; + } + } + } + if (!understood) { + notUnderstoodHeaderNames.add(headerName); + } + } + return notUnderstoodHeaderNames; + } + + @Override + public Iterator
    getHeaders() { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return null; + } + Iterator allHeaders = soapHeader.examineAllHeaderElements(); + return new HeaderReadIterator(allHeaders, null, null); + } + + private static class HeaderReadIterator implements Iterator
    { + SOAPHeaderElement current; + Iterator soapHeaders; + String myNsUri; + String myLocalName; + + public HeaderReadIterator(Iterator allHeaders, String nsUri, + String localName) { + this.soapHeaders = allHeaders; + this.myNsUri = nsUri; + this.myLocalName = localName; + } + + @Override + public boolean hasNext() { + if (current == null) { + advance(); + } + return (current != null); + } + + @Override + public Header next() { + if (!hasNext()) { + return null; + } + if (current == null) { + return null; + } + + SAAJHeader ret = new SAAJHeader(current); + current = null; + return ret; + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + private void advance() { + while (soapHeaders.hasNext()) { + SOAPHeaderElement nextHdr = (SOAPHeaderElement) soapHeaders.next(); + if (nextHdr != null && + (myNsUri == null || nextHdr.getNamespaceURI().equals(myNsUri)) && + (myLocalName == null || nextHdr.getLocalName().equals(myLocalName))) { + current = nextHdr; + //found it + return; + } + } + //if we got here we didn't find a match + current = null; + } + + } + + @Override + public boolean hasHeaders() { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return false; + } + + Iterator allHeaders = soapHeader.examineAllHeaderElements(); + return allHeaders.hasNext(); + } + + @Override + public List
    asList() { + SOAPHeader soapHeader = ensureSOAPHeader(); + if (soapHeader == null) { + return Collections.emptyList(); + } + + Iterator allHeaders = soapHeader.examineAllHeaderElements(); + List
    headers = new ArrayList
    (); + while (allHeaders.hasNext()) { + SOAPHeaderElement nextHdr = (SOAPHeaderElement) allHeaders.next(); + headers.add(new SAAJHeader(nextHdr)); + } + return headers; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java new file mode 100644 index 00000000000..6414593fee7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/saaj/SaajStaxWriter.java @@ -0,0 +1,327 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.message.saaj; + +import java.util.Arrays; +import java.util.Iterator; + +import javax.xml.namespace.NamespaceContext; +import javax.xml.namespace.QName; +import javax.xml.soap.SOAPElement; +import javax.xml.soap.SOAPException; +import javax.xml.soap.SOAPMessage; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamWriter; + +import org.w3c.dom.Comment; +import org.w3c.dom.Node; + +/** + * SaajStaxWriter builds a SAAJ SOAPMessage by using XMLStreamWriter interface. + * + * @author shih-chang.chen@oracle.com + */ +public class SaajStaxWriter implements XMLStreamWriter { + + protected SOAPMessage soap; + protected String envURI; + protected SOAPElement currentElement; + + static final protected String Envelope = "Envelope"; + static final protected String Header = "Header"; + static final protected String Body = "Body"; + static final protected String xmlns = "xmlns"; + + public SaajStaxWriter(final SOAPMessage msg) throws SOAPException { + soap = msg; + currentElement = soap.getSOAPPart().getEnvelope(); + envURI = currentElement.getNamespaceURI(); + } + + public SOAPMessage getSOAPMessage() { + return soap; + } + + @Override + public void writeStartElement(final String localName) throws XMLStreamException { + try { + currentElement = currentElement.addChildElement(localName); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + @Override + public void writeStartElement(final String ns, final String ln) throws XMLStreamException { + writeStartElement(null, ln, ns); + } + + @Override + public void writeStartElement(final String prefix, final String ln, final String ns) throws XMLStreamException { + try { + if (envURI.equals(ns)) { + if (Envelope.equals(ln)) { + currentElement = soap.getSOAPPart().getEnvelope(); + fixPrefix(prefix); + return; + } else if (Header.equals(ln)) { + currentElement = soap.getSOAPHeader(); + fixPrefix(prefix); + return; + } else if (Body.equals(ln)) { + currentElement = soap.getSOAPBody(); + fixPrefix(prefix); + return; + } + } + currentElement = (prefix == null) ? + currentElement.addChildElement(new QName(ns, ln)) : + currentElement.addChildElement(ln, prefix, ns); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + private void fixPrefix(final String prfx) throws XMLStreamException { + String oldPrfx = currentElement.getPrefix(); + if (prfx != null && !prfx.equals(oldPrfx)) { + currentElement.setPrefix(prfx); + } + } + + @Override + public void writeEmptyElement(final String uri, final String ln) throws XMLStreamException { + writeStartElement(null, ln, uri); + } + + @Override + public void writeEmptyElement(final String prefix, final String ln, final String uri) throws XMLStreamException { + writeStartElement(prefix, ln, uri); + } + + @Override + public void writeEmptyElement(final String ln) throws XMLStreamException { + writeStartElement(null, ln, null); + } + + @Override + public void writeEndElement() throws XMLStreamException { + if (currentElement != null) currentElement = currentElement.getParentElement(); + } + + @Override + public void writeEndDocument() throws XMLStreamException { + } + + @Override + public void close() throws XMLStreamException { + } + + @Override + public void flush() throws XMLStreamException { + } + + @Override + public void writeAttribute(final String ln, final String val) throws XMLStreamException { + writeAttribute(null, null, ln, val); + } + + @Override + public void writeAttribute(final String prefix, final String ns, final String ln, final String value) throws XMLStreamException { + try { + if (ns == null) { + if (prefix == null && xmlns.equals(ln)) { + currentElement.addNamespaceDeclaration("", value); + } else { + currentElement.setAttributeNS("", ln, value); + } + } else { + QName name = (prefix == null) ? new QName(ns, ln) : new QName(ns, ln, prefix); + currentElement.addAttribute(name, value); + } + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + @Override + public void writeAttribute(final String ns, final String ln, final String val) throws XMLStreamException { + writeAttribute(null, ns, ln, val); + } + + @Override + public void writeNamespace(String prefix, final String uri) throws XMLStreamException { + + // make prefix default if null or "xmlns" (according to javadoc) + if (prefix == null || "xmlns".equals(prefix)) { + prefix = ""; + } + + try { + currentElement.addNamespaceDeclaration(prefix, uri); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + @Override + public void writeDefaultNamespace(final String uri) throws XMLStreamException { + writeNamespace("", uri); + } + + @Override + public void writeComment(final String data) throws XMLStreamException { + Comment c = soap.getSOAPPart().createComment(data); + currentElement.appendChild(c); + } + + @Override + public void writeProcessingInstruction(final String target) throws XMLStreamException { + Node n = soap.getSOAPPart().createProcessingInstruction(target, ""); + currentElement.appendChild(n); + } + + @Override + public void writeProcessingInstruction(final String target, final String data) throws XMLStreamException { + Node n = soap.getSOAPPart().createProcessingInstruction(target, data); + currentElement.appendChild(n); + } + + @Override + public void writeCData(final String data) throws XMLStreamException { + Node n = soap.getSOAPPart().createCDATASection(data); + currentElement.appendChild(n); + } + + @Override + public void writeDTD(final String dtd) throws XMLStreamException { + //TODO ... Don't do anything here + } + + @Override + public void writeEntityRef(final String name) throws XMLStreamException { + Node n = soap.getSOAPPart().createEntityReference(name); + currentElement.appendChild(n); + } + + @Override + public void writeStartDocument() throws XMLStreamException { + } + + @Override + public void writeStartDocument(final String version) throws XMLStreamException { + if (version != null) soap.getSOAPPart().setXmlVersion(version); + } + + @Override + public void writeStartDocument(final String encoding, final String version) throws XMLStreamException { + if (version != null) soap.getSOAPPart().setXmlVersion(version); + if (encoding != null) { + try { + soap.setProperty(SOAPMessage.CHARACTER_SET_ENCODING, encoding); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + } + + @Override + public void writeCharacters(final String text) throws XMLStreamException { + try { + currentElement.addTextNode(text); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + @Override + public void writeCharacters(final char[] text, final int start, final int len) throws XMLStreamException { + char[] chr = (start == 0 && len == text.length) ? text : Arrays.copyOfRange(text, start, start + len); + try { + currentElement.addTextNode(new String(chr)); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + @Override + public String getPrefix(final String uri) throws XMLStreamException { + return currentElement.lookupPrefix(uri); + } + + @Override + public void setPrefix(final String prefix, final String uri) throws XMLStreamException { + try { + this.currentElement.addNamespaceDeclaration(prefix, uri); + } catch (SOAPException e) { + throw new XMLStreamException(e); + } + } + + @Override + public void setDefaultNamespace(final String uri) throws XMLStreamException { + setPrefix("", uri); + } + + @Override + public void setNamespaceContext(final NamespaceContext context)throws XMLStreamException { + throw new UnsupportedOperationException(); + } + + @Override + public Object getProperty(final String name) throws IllegalArgumentException { + //TODO the following line is to make eclipselink happy ... they are aware of this problem - + if (javax.xml.stream.XMLOutputFactory.IS_REPAIRING_NAMESPACES.equals(name)) return Boolean.FALSE; + return null; + } + + @Override + public NamespaceContext getNamespaceContext() { + return new NamespaceContext() { + public String getNamespaceURI(final String prefix) { + return currentElement.getNamespaceURI(prefix); + } + public String getPrefix(final String namespaceURI) { + return currentElement.lookupPrefix(namespaceURI); + } + public Iterator getPrefixes(final String namespaceURI) { + return new Iterator() { + String prefix = getPrefix(namespaceURI); + public boolean hasNext() { + return (prefix != null); + } + public Object next() { + if (!hasNext()) throw new java.util.NoSuchElementException(); + String next = prefix; + prefix = null; + return next; + } + public void remove() {} + }; + } + }; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java index 31248243a02..1f9180d8722 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/InputStreamMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java index bc29d6969fd..4a33070a341 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/StreamBasedMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java index 28e3f71678c..cd89dc5f7e2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/stream/XMLStreamReaderMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java index 6200433e8af..2dd917e9512 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/CheckedException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java index dbe9b59bb57..d37d45b7219 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ExceptionType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java index 28c1f92df3e..033841faf7a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/JavaMethod.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import com.sun.xml.internal.ws.api.model.soap.SOAPBinding; import javax.xml.namespace.QName; import java.lang.reflect.Method; +import javax.jws.WebService; /** * Abstracts the annotated {@link Method} of a SEI. @@ -48,18 +49,18 @@ public interface JavaMethod { * On the server side, it uses this for invocation of the web service * *

    - * {@link @WebService}(endpointInterface="I") + * {@literal @}{@link WebService}(endpointInterface="I") * class A { } * * In this case, it retuns A's method * *

    - * {@link @WebService}(endpointInterface="I") + * {@literal @}{@link WebService}(endpointInterface="I") * class A implements I { } * In this case, it returns A's method * *

    - * {@link @WebService} + * {@literal @}{@link WebService} * class A { } * In this case, it returns A's method * @@ -73,17 +74,17 @@ public interface JavaMethod { * Returns the SEI method if there is one. * *

    - * {@link @WebService}(endpointInterface="I") + * {@literal @}{@link WebService}(endpointInterface="I") * class A { } * In this case, it retuns I's method * *

    - * {@link @WebService}(endpointInterface="I") + * {@literal @}{@link WebService}(endpointInterface="I") * class A implements I { } * In this case, it returns I's method * *

    - * {@link @WebService} + * {@literal @}{@link WebService} * class A { } * In this case, it returns A's method * diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java index 495b26e9d5e..5d519188cb4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/MEP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java index b8f4ec21d15..438f45ca8b7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/Parameter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java index c8af99e195d..f0fdcbfdc51 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/ParameterBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java index f2924e58e00..5ea19d53d84 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/SEIModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -143,7 +143,7 @@ public interface SEIModel { @NotNull String getWSDLLocation(); /** - * wsdl:service qualified name for the port associated with the {@link SEIModel) + * wsdl:service qualified name for the port associated with the {@link SEIModel} * * @return wsdl:service@name value - always non-null */ @@ -155,14 +155,14 @@ public interface SEIModel { @NotNull WSDLPort getPort(); /** - * Value of the wsdl:port name associated with the {@link SEIModel) + * Value of the wsdl:port name associated with the {@link SEIModel} * * @return wsdl:service/wsdl:port@name value, always non-null */ @NotNull QName getPortName(); /** - * Value of wsdl:portType bound to the port associated with the {@link SEIModel) + * Value of wsdl:portType bound to the port associated with the {@link SEIModel} * * @return */ @@ -174,7 +174,7 @@ public interface SEIModel { @NotNull QName getBoundPortTypeName(); /** - * Namespace of the wsd;:port associated with the {@link SEIModel) + * Namespace of the wsd;:port associated with the {@link SEIModel} */ @NotNull String getTargetNamespace(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java new file mode 100644 index 00000000000..e518d22db6c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/WSDLOperationMapping.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.model; + +import javax.xml.namespace.QName; + +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; + +/** + * WSDLOperationMapping represents the mapping between a WSDL operation and a + * JavaMethod. This is intended to be the output of resolving a Packet to the + * targeting WSDL operation. + * + * @author shih-chang.chen@oracle.com + */ +public interface WSDLOperationMapping { + + WSDLBoundOperation getWSDLBoundOperation(); + + JavaMethod getJavaMethod(); + + /** + * WSDL1.1 allows operation overloading on the operation name; the operation name should + * NOT be used as identifier of the operation. + */ + QName getOperationName(); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java index bafd39f27fb..4412d79a2ae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/soap/SOAPBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java index e98f12beb68..a8f22d2676b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java index 450613e70eb..d2f975a02be 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java index ddc87d0e425..a2b400e53e5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLBoundPortType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -120,7 +120,7 @@ public interface WSDLBoundPortType extends WSDLFeaturedObject, WSDLExtensible { * * @param operation wsdl:operation@name value. Must be non-null. * @param part wsdl:part@name such as value of soap:header@part. Must be non-null. - * @param mode {@link Mode#IN} or {@link Mode@OUT}. Must be non-null. + * @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null. * @return null if the binding could not be resolved for the part. */ ParameterBinding getBinding(QName operation, String part, Mode mode); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java index 33d48740a60..bafd976df22 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLDescriptorKind.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java index 143516d3b33..cae65be9785 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtensible.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java index c0699effb11..99456eadb6a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java index dc1344003c1..36a6ffdb8bf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -67,8 +67,7 @@ public interface WSDLFault extends WSDLObject, WSDLExtensible { /** * Gives the Action Message Addressing Property value for - * {@link this} message. - * {@link this} message. + * {@link WSDLFault} message. *

    * This method provides the correct value irrespective of * whether the Action is explicitly specified in the WSDL or diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java index e940ea0135d..e87967d37dd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLFeaturedObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java index 3be392212ee..f65036e0202 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLInput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,7 +54,7 @@ public interface WSDLInput extends WSDLObject, WSDLExtensible { /** * Gives the Action Message Addressing Property value for - * {@link this} message. + * {@link WSDLInput} message. *

    * This method provides the correct value irrespective of * whether the Action is explicitly specified in the WSDL or diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java index 7220ae51c1f..46ffb9a18cf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java index abfaa0814ff..cc63395d001 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java index 2f990de9e99..1fa40432c8e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLObject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java index 876d8f10e25..1a08f017c98 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java index 6f955d4ad45..8743f73e018 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLOutput.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -53,7 +53,7 @@ public interface WSDLOutput extends WSDLObject, WSDLExtensible { /** * Gives the Action Message Addressing Property value for - * {@link this} message. + * {@link WSDLOutput} message. *

    * This method provides the correct value irrespective of * whether the Action is explicitly specified in the WSDL or diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java index fe667edb644..9f56156be21 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPart.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java index bede44357ee..46a956828e9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPartDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java index 18e1449e7a3..4b01852f62f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPort.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java index 57e2180b1bf..5fcc5ec1ddf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLPortType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java index 1b6659d33af..52cb76aad6a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/model/wsdl/WSDLService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java index 5d5553fb609..ec8307d02a8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java index 5b8cd463c5c..3856f92c5e8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientPipeAssemblerContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java index d5100df4687..2586f4675e5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ClientTubeAssemblerContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,7 +78,7 @@ public class ClientTubeAssemblerContext { /** * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption. * @deprecated - * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSBindingProvider, WSBinding, Container, Codec, SEIModel)} + * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)} */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding) { this(address, wsdlModel, rootOwner, binding, Container.NONE); @@ -87,7 +87,7 @@ public class ClientTubeAssemblerContext { /** * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption. * @deprecated - * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSBindingProvider, WSBinding, Container, Codec, SEIModel)}. + * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)} */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding, @@ -99,7 +99,7 @@ public class ClientTubeAssemblerContext { /** * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption. * @deprecated - * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSBindingProvider, WSBinding, Container, Codec,SEIModel)}. + * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)} */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding, @@ -110,7 +110,7 @@ public class ClientTubeAssemblerContext { /** * This constructor should be used only by JAX-WS Runtime and is not meant for external consumption. * @deprecated - * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSBindingProvider, WSBinding, Container, Codec, SEIModel)}. + * Use {@link #ClientTubeAssemblerContext(EndpointAddress, WSDLPort, WSService, WSBindingProvider, WSBinding, Container, Codec, SEIModel, Class)} */ public ClientTubeAssemblerContext(@NotNull EndpointAddress address, @Nullable WSDLPort wsdlModel, @NotNull WSService rootOwner, @NotNull WSBinding binding, diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java index f4de2374624..f9abc4fa718 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,15 +56,17 @@ import java.nio.channels.WritableByteChannel; * {@link Codec} does not produce transport-specific information, such as HTTP headers. * *

    - * {@link Codec} is a non-reentrant object, meaning no two threads - * can concurrently invoke the decode method. This allows the implementation - * to easily reuse parser objects (as instance variables), which are costly otherwise. - * + * {@link Codec} implementations should be thread-safe; a codec instance could be used + * concurrently in multiple threads. If a codec have to generate or use a per-request + * state, the codec implementation must store the state in the Packet instead of using an + * instance variable of the codec implementation. * *

    * {@link BindingID} determines the {@link Codec}. See {@link BindingID#createEncoder(WSBinding)}. * * @author Kohsuke Kawaguchi + * @author shih-chang.chen@oracle.com + * * @see EndpointAwareCodec */ public interface Codec { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java index 682c29911c2..e06694c4781 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Codecs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java index 2dfa4cbd87e..eccbae63fa2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ContentType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,10 +29,10 @@ package com.sun.xml.internal.ws.api.pipe; * A Content-Type transport header that will be returned by {@link Codec#encode(com.sun.xml.internal.ws.api.message.Packet, java.io.OutputStream)}. * It will provide the Content-Type header and also take care of SOAP 1.1 SOAPAction header. * - * @see {@link com.sun.xml.internal.org.jvnet.ws.message.ContentType} + * @see com.oracle.webservices.internal.api.message.ContentType * TODO: rename to ContentMetadata? * * @author Vivek Pandey */ -public interface ContentType extends com.sun.xml.internal.org.jvnet.ws.message.ContentType { +public interface ContentType extends com.oracle.webservices.internal.api.message.ContentType { } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java index 67e5d63bde2..724b86c49e7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Engine.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,8 @@ import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ContainerResolver; /** * Collection of {@link Fiber}s. @@ -42,29 +44,47 @@ import com.sun.xml.internal.ws.api.message.Packet; public class Engine { private volatile Executor threadPool; public final String id; + private final Container container; + + String getId() { return id; } + Container getContainer() { return container; } + Executor getExecutor() { return threadPool; } public Engine(String id, Executor threadPool) { - this(id); - this.threadPool = threadPool; + this(id, ContainerResolver.getDefault().getContainer(), threadPool); + } + + public Engine(String id, Container container, Executor threadPool) { + this(id, container); + this.threadPool = threadPool != null ? wrap(threadPool) : null; } public Engine(String id) { + this(id, ContainerResolver.getDefault().getContainer()); + } + + public Engine(String id, Container container) { this.id = id; + this.container = container; } public void setExecutor(Executor threadPool) { - this.threadPool = threadPool; + this.threadPool = threadPool != null ? wrap(threadPool) : null; } void addRunnable(Fiber fiber) { if(threadPool==null) { synchronized(this) { - threadPool = Executors.newCachedThreadPool(new DaemonThreadFactory()); + threadPool = wrap(Executors.newCachedThreadPool(new DaemonThreadFactory())); } } threadPool.execute(fiber); } + private Executor wrap(Executor ex) { + return ContainerResolver.getDefault().wrapExecutor(container, ex); + } + /** * Creates a new fiber in a suspended state. * @@ -80,27 +100,21 @@ public class Engine { private static class DaemonThreadFactory implements ThreadFactory { static final AtomicInteger poolNumber = new AtomicInteger(1); - final ThreadGroup group; final AtomicInteger threadNumber = new AtomicInteger(1); final String namePrefix; DaemonThreadFactory() { - SecurityManager s = System.getSecurityManager(); - group = (s != null)? s.getThreadGroup() : - Thread.currentThread().getThreadGroup(); - namePrefix = "jaxws-engine-" + - poolNumber.getAndIncrement() + - "-thread-"; + namePrefix = "jaxws-engine-" + poolNumber.getAndIncrement() + "-thread-"; } public Thread newThread(Runnable r) { - Thread t = new Thread(group, r, - namePrefix + threadNumber.getAndIncrement(), - 0); - if (!t.isDaemon()) + Thread t = new Thread(null, r, namePrefix + threadNumber.getAndIncrement(), 0); + if (!t.isDaemon()) { t.setDaemon(true); - if (t.getPriority() != Thread.NORM_PRIORITY) + } + if (t.getPriority() != Thread.NORM_PRIORITY) { t.setPriority(Thread.NORM_PRIORITY); + } return t; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java index dba18d5308b..3d7010c7929 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Fiber.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,20 +32,27 @@ import com.sun.xml.internal.ws.api.Component; import com.sun.xml.internal.ws.api.ComponentRegistry; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl; +import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl; import com.sun.xml.internal.ws.api.server.Adapter; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ContainerResolver; import java.util.ArrayList; -import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; +import javax.xml.ws.Holder; +import javax.xml.ws.WebServiceException; + /** * User-level thread. Represents the execution of one request/response processing. *

    @@ -108,6 +115,7 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * Callback interface for notification of suspend and resume. * * @since 2.2.6 + * @deprecated Use {@link NextAction#suspend(Runnable)} */ public interface Listener { /** @@ -123,12 +131,13 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { public void fiberResumed(Fiber fiber); } - private List _listeners = new ArrayList(); + private final List _listeners = new ArrayList(); /** * Adds suspend/resume callback listener * @param listener Listener * @since 2.2.6 + * @deprecated */ public void addListener(Listener listener) { synchronized(_listeners) { @@ -142,6 +151,7 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * Removes suspend/resume callback listener * @param listener Listener * @since 2.2.6 + * @deprecated */ public void removeListener(Listener listener) { synchronized(_listeners) { @@ -149,7 +159,7 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { } } - private List getCurrentListeners() { + List getCurrentListeners() { synchronized(_listeners) { return new ArrayList(_listeners); } @@ -209,11 +219,6 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { private volatile boolean isInsideSuspendCallbacks = false; - /** - * Is this fiber completed? - */ - private volatile boolean completed; - /** * Is this {@link Fiber} currently running in the synchronous mode? */ @@ -228,20 +233,6 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { */ private List interceptors; - /** - * Not null when {@link #interceptors} is not null. - */ - private InterceptorHandler interceptorHandler; - - /** - * This flag is set to true when a new interceptor is added. - *

    - * When that happens, we need to first exit the current interceptors - * and then reenter them, so that the newly added interceptors start - * taking effect. This flag is used to control that flow. - */ - private boolean needsToReenter; - /** * Fiber's context {@link ClassLoader}. */ @@ -253,11 +244,24 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { @Nullable CompletionCallback completionCallback; + private boolean isDeliverThrowableInPacket = false; + + public void setDeliverThrowableInPacket(boolean isDeliverThrowableInPacket) { + this.isDeliverThrowableInPacket = isDeliverThrowableInPacket; + } + /** * The thread on which this Fiber is currently executing, if applicable. */ private Thread currentThread; + /** + * Replace uses of synchronized(this) with this lock so that we can control + * unlocking for resume use cases + */ + private final ReentrantLock lock = new ReentrantLock(); + private final Condition condition = lock.newCondition(); + private volatile boolean isCanceled; /** @@ -277,7 +281,7 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { private boolean startedSync; /** - * Callback to be invoked when a {@link Fiber} finishs execution. + * Callback to be invoked when a {@link Fiber} finishes execution. */ public interface CompletionCallback { /** @@ -298,11 +302,9 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { Fiber(Engine engine) { this.owner = engine; + id = iotaGen.incrementAndGet(); if (isTraceEnabled()) { - id = iotaGen.incrementAndGet(); - LOGGER.fine(getName() + " created"); - } else { - id = -1; + LOGGER.log(Level.FINE, "{0} created", getName()); } // if this is run from another fiber, then we naturally inherit its context classloader, @@ -333,8 +335,8 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { if (packet != null) { for (SOAPVersion sv: SOAPVersion.values()) { for (AddressingVersion av: AddressingVersion.values()) { - action = packet.getMessage() != null ? packet.getMessage().getHeaders().getAction(av, sv) : null; - msgId = packet.getMessage() != null ? packet.getMessage().getHeaders().getMessageID(av, sv) : null; + action = packet.getMessage() != null ? AddressingUtils.getAction(packet.getMessage().getHeaders(), av, sv) : null; + msgId = packet.getMessage() != null ? AddressingUtils.getMessageID(packet.getMessage().getHeaders(), av, sv) : null; if (action != null || msgId != null) { break; } @@ -358,7 +360,7 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { tubeDesc = peekCont() + ".processResponse()"; } - LOGGER.fine(getName() + " " + desc + " with " + actionAndMsgDesc + " and 'current' tube " + tubeDesc + " from thread " + Thread.currentThread().getName() + " with Packet: " + (packet != null ? packet.toShortString() : null)); + LOGGER.log(Level.FINE, "{0} {1} with {2} and ''current'' tube {3} from thread {4} with Packet: {5}", new Object[]{getName(), desc, actionAndMsgDesc, tubeDesc, Thread.currentThread().getName(), packet != null ? packet.toShortString() : null}); } } @@ -445,9 +447,9 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * until message order is confirmed prior to returning to asynchronous processing. * @since 2.2.6 */ - public synchronized void resume(@NotNull Packet resumePacket, - boolean forceSync) { - resume(resumePacket, forceSync, null); + public void resume(@NotNull Packet resumePacket, + boolean forceSync) { + resume(resumePacket, forceSync, null); } /** @@ -458,51 +460,53 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { public void resume(@NotNull Packet resumePacket, boolean forceSync, CompletionCallback callback) { - - synchronized(this) { + lock.lock(); + try { if (callback != null) { setCompletionCallback(callback); } if(isTraceEnabled()) - LOGGER.fine(getName()+" resuming. Will have suspendedCount=" + (suspendedCount-1)); - packet = resumePacket; - if( --suspendedCount == 0 ) { - if (!isInsideSuspendCallbacks) { + LOGGER.log(Level.FINE, "{0} resuming. Will have suspendedCount={1}", new Object[]{getName(), suspendedCount-1}); + packet = resumePacket; + if( --suspendedCount == 0 ) { + if (!isInsideSuspendCallbacks) { List listeners = getCurrentListeners(); for (Listener listener: listeners) { try { listener.fiberResumed(this); } catch (Throwable e) { if (isTraceEnabled()) - LOGGER.fine("Listener " + listener + " threw exception: " + e.getMessage()); + LOGGER.log(Level.FINE, "Listener {0} threw exception: {1}", new Object[]{listener, e.getMessage()}); } } if(synchronous) { - notifyAll(); + condition.signalAll(); } else if (forceSync || startedSync) { run(); } else { dumpFiberContext("resuming (async)"); owner.addRunnable(this); } - } - } else { - if (isTraceEnabled()) { - LOGGER.fine(getName() + " taking no action on resume because suspendedCount != 0: " + suspendedCount); + } + } else { + if (isTraceEnabled()) { + LOGGER.log(Level.FINE, "{0} taking no action on resume because suspendedCount != 0: {1}", new Object[]{getName(), suspendedCount}); } } - } + } finally { + lock.unlock(); + } } /** * Wakes up a suspended fiber and begins response processing. * @since 2.2.6 */ - public synchronized void resumeAndReturn(@NotNull Packet resumePacket, - boolean forceSync) { + public void resumeAndReturn(@NotNull Packet resumePacket, + boolean forceSync) { if(isTraceEnabled()) - LOGGER.fine(getName()+" resumed with Return Packet"); + LOGGER.log(Level.FINE, "{0} resumed with Return Packet", getName()); next = null; resume(resumePacket, forceSync); } @@ -523,8 +527,30 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * * @param throwable exception that is used in the resumed processing */ - public synchronized void resume(@NotNull Throwable throwable) { - resume(throwable, false); + public void resume(@NotNull Throwable throwable) { + resume(throwable, packet, false); + } + + /** + * Wakes up a suspended fiber with an exception. + *

    + *

    + * The execution of the suspended fiber will be resumed in the response + * processing direction, by calling the {@link Tube#processException(Throwable)} method + * on the next/first {@link Tube} in the {@link Fiber}'s processing stack with + * the specified exception as the parameter. + *

    + *

    + * This method is implemented in a race-free way. Another thread can invoke + * this method even before this fiber goes into the suspension mode. So the caller + * need not worry about synchronizing {@link NextAction#suspend()} and this method. + * + * @param throwable exception that is used in the resumed processing + * @param packet Packet that will be visible on the Fiber after the resume + * @since 2.2.8 + */ + public void resume(@NotNull Throwable throwable, @NotNull Packet packet) { + resume(throwable, packet, false); } /** @@ -539,10 +565,29 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * @param forceSync if processing begins synchronously * @since 2.2.6 */ - public synchronized void resume(@NotNull Throwable error, - boolean forceSync) { + public void resume(@NotNull Throwable error, + boolean forceSync) { + resume(error, packet, forceSync); + } + + /** + * Wakes up a suspend fiber with an exception. + * + * If forceSync is true, then the suspended fiber will resume with + * synchronous processing on the current thread. This will continue + * until some Tube indicates that it is safe to switch to asynchronous + * processing. + * + * @param error exception that is used in the resumed processing + * @param packet Packet that will be visible on the Fiber after the resume + * @param forceSync if processing begins synchronously + * @since 2.2.8 + */ + public void resume(@NotNull Throwable error, + @NotNull Packet packet, + boolean forceSync) { if(isTraceEnabled()) - LOGGER.fine(getName()+" resumed with Return Throwable"); + LOGGER.log(Level.FINE, "{0} resumed with Return Throwable", getName()); next = null; throwable = error; resume(packet, forceSync); @@ -550,17 +595,19 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { /** * Marks this Fiber as cancelled. A cancelled Fiber will never invoke its completion callback - * @param mayInterrupt if cancel should use {@link Thread.interrupt()} - * @see java.util.Future.cancel + * @param mayInterrupt if cancel should use {@link Thread#interrupt()} + * @see java.util.concurrent.Future#cancel(boolean) * @since 2.2.6 */ + @Override public void cancel(boolean mayInterrupt) { isCanceled = true; if (mayInterrupt) { - synchronized(this) { - if (currentThread != null) - currentThread.interrupt(); - } + // synchronized(this) is used as Thread running Fiber will be holding lock + synchronized(this) { + if (currentThread != null) + currentThread.interrupt(); + } } } @@ -569,49 +616,85 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { *

    * The call returns immediately, and when the fiber is resumed * the execution picks up from the last scheduled continuation. + * @param onExitRunnable runnable to be invoked after fiber is marked for suspension + * @return if control loop must exit */ - private boolean suspend() { - - synchronized(this) { - if(isTraceEnabled()) { - LOGGER.fine(getName()+" suspending. Will have suspendedCount=" + (suspendedCount+1)); - if (suspendedCount > 0) { - LOGGER.fine("WARNING - " + getName()+" suspended more than resumed. Will require more than one resume to actually resume this fiber."); - } + private boolean suspend(Holder isRequireUnlock, Runnable onExitRunnable) { + if(isTraceEnabled()) { + LOGGER.log(Level.FINE, "{0} suspending. Will have suspendedCount={1}", new Object[]{getName(), suspendedCount+1}); + if (suspendedCount > 0) { + LOGGER.log(Level.FINE, "WARNING - {0} suspended more than resumed. Will require more than one resume to actually resume this fiber.", getName()); } + } - List listeners = getCurrentListeners(); - if (++suspendedCount == 1) { - isInsideSuspendCallbacks = true; - try { - for (Listener listener: listeners) { - try { - listener.fiberSuspended(this); - } catch (Throwable e) { - if(isTraceEnabled()) - LOGGER.fine("Listener " + listener + " threw exception: " + e.getMessage()); - } - } - } finally { - isInsideSuspendCallbacks = false; - } - } - - if (suspendedCount <= 0) { - // suspend callback caused fiber to resume + List listeners = getCurrentListeners(); + if (++suspendedCount == 1) { + isInsideSuspendCallbacks = true; + try { for (Listener listener: listeners) { try { - listener.fiberResumed(this); + listener.fiberSuspended(this); } catch (Throwable e) { if(isTraceEnabled()) - LOGGER.fine("Listener " + listener + " threw exception: " + e.getMessage()); + LOGGER.log(Level.FINE, "Listener {0} threw exception: {1}", new Object[]{listener, e.getMessage()}); } } + } finally { + isInsideSuspendCallbacks = false; + } + } - return false; + if (suspendedCount <= 0) { + // suspend callback caused fiber to resume + for (Listener listener: listeners) { + try { + listener.fiberResumed(this); + } catch (Throwable e) { + if(isTraceEnabled()) + LOGGER.log(Level.FINE, "Listener {0} threw exception: {1}", new Object[]{listener, e.getMessage()}); + } } - return true; + } else if (onExitRunnable != null) { + // synchronous use cases cannot disconnect from the current thread + if (!synchronous) { + /* INTENTIONALLY UNLOCKING EARLY */ + synchronized(this) { + // currentThread is protected by the monitor for this fiber so + // that it is accessible to cancel() even when the lock is held + currentThread = null; + } + lock.unlock(); + assert(!lock.isHeldByCurrentThread()); + isRequireUnlock.value = Boolean.FALSE; + + try { + onExitRunnable.run(); + } catch(Throwable t) { + throw new OnExitRunnableException(t); + } + + return true; + + } else { + // for synchronous we will stay with current thread, so do not disconnect + if (isTraceEnabled()) + LOGGER.fine("onExitRunnable used with synchronous Fiber execution -- not exiting current thread"); + onExitRunnable.run(); + } + } + + return false; + } + + private static final class OnExitRunnableException extends RuntimeException { + private static final long serialVersionUID = 1L; + + Throwable target; + + public OnExitRunnableException(Throwable target) { + super((Throwable)null); // see pattern for InvocationTargetException + this.target = target; } } @@ -634,13 +717,15 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { *

  • Y.processRequest() * */ - public void addInterceptor(@NotNull FiberContextSwitchInterceptor interceptor) { + public synchronized void addInterceptor(@NotNull FiberContextSwitchInterceptor interceptor) { if (interceptors == null) { interceptors = new ArrayList(); - interceptorHandler = new InterceptorHandler(); + } else { + List l = new ArrayList(); + l.addAll(interceptors); + interceptors = l; } interceptors.add(interceptor); - needsToReenter = true; } /** @@ -666,10 +751,17 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * @return true if the specified interceptor was removed. False if * the specified interceptor was not registered with this fiber to begin with. */ - public boolean removeInterceptor(@NotNull FiberContextSwitchInterceptor interceptor) { - if (interceptors != null && interceptors.remove(interceptor)) { - needsToReenter = true; - return true; + public synchronized boolean removeInterceptor(@NotNull FiberContextSwitchInterceptor interceptor) { + if (interceptors != null) { + boolean result = interceptors.remove(interceptor); + if (interceptors.isEmpty()) + interceptors = null; + else { + List l = new ArrayList(); + l.addAll(interceptors); + interceptors = l; + } + return result; } return false; } @@ -697,19 +789,27 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * of {@link Fiber}. */ @Deprecated + @Override public void run() { - assert !synchronous; - doRun(); - if (startedSync && suspendedCount == 0 && - (next != null || contsSize > 0)) { - // We bailed out of running this fiber we started as sync, and now - // want to finish running it async - startedSync = false; - // Start back up as an async fiber - dumpFiberContext("restarting (async) after startSync"); - owner.addRunnable(this); - } else { - completionCheck(); + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); + try { + assert !synchronous; + // doRun returns true to indicate an early exit from fiber processing + if (!doRun()) { + if (startedSync && suspendedCount == 0 && + (next != null || contsSize > 0)) { + // We bailed out of running this fiber we started as sync, and now + // want to finish running it async + startedSync = false; + // Start back up as an async fiber + dumpFiberContext("restarting (async) after startSync"); + owner.addRunnable(this); + } else { + completionCheck(); + } + } + } finally { + ContainerResolver.getDefault().exitContainer(old); } } @@ -739,85 +839,102 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * @return The response packet to the request. * @see #start(Tube, Packet, CompletionCallback) */ - public synchronized + public @NotNull Packet runSync(@NotNull Tube tubeline, @NotNull Packet request) { - // save the current continuation, so that we return runSync() without executing them. - final Tube[] oldCont = conts; - final int oldContSize = contsSize; - final boolean oldSynchronous = synchronous; - final Tube oldNext = next; - - if (oldContSize > 0) { - conts = new Tube[16]; - contsSize = 0; - } - + lock.lock(); try { - synchronous = true; - this.packet = request; - next = tubeline; - doRun(); - if (throwable != null) { - if (throwable instanceof RuntimeException) { - throw (RuntimeException) throwable; - } - if (throwable instanceof Error) { - throw (Error) throwable; - } - // our system is supposed to only accept Error or RuntimeException - throw new AssertionError(throwable); + // save the current continuation, so that we return runSync() without executing them. + final Tube[] oldCont = conts; + final int oldContSize = contsSize; + final boolean oldSynchronous = synchronous; + final Tube oldNext = next; + + if (oldContSize > 0) { + conts = new Tube[16]; + contsSize = 0; + } + + try { + synchronous = true; + this.packet = request; + next = tubeline; + doRun(); + if (throwable != null) { + if (isDeliverThrowableInPacket) { + packet.addSatellite(new ThrowableContainerPropertySet(throwable)); + } else { + if (throwable instanceof RuntimeException) { + throw (RuntimeException) throwable; + } + if (throwable instanceof Error) { + throw (Error) throwable; + } + // our system is supposed to only accept Error or RuntimeException + throw new AssertionError(throwable); + } + } + return this.packet; + } finally { + conts = oldCont; + contsSize = oldContSize; + synchronous = oldSynchronous; + next = oldNext; + if(interrupted) { + Thread.currentThread().interrupt(); + interrupted = false; + } + if(!started && !startedSync) + completionCheck(); } - return this.packet; } finally { - conts = oldCont; - contsSize = oldContSize; - synchronous = oldSynchronous; - next = oldNext; - if(interrupted) { - Thread.currentThread().interrupt(); - interrupted = false; - } - if(!started && !startedSync) - completionCheck(); + lock.unlock(); } } - private synchronized void completionCheck() { - // Don't trigger completion and callbacks if fiber is suspended - if(!isCanceled && contsSize==0 && suspendedCount == 0) { - if(isTraceEnabled()) - LOGGER.fine(getName()+" completed"); - completed = true; - clearListeners(); - notifyAll(); - if (completionCallback != null) { - if (throwable != null) - completionCallback.onCompletion(throwable); - else - completionCallback.onCompletion(packet); + private void completionCheck() { + lock.lock(); + try { + // Don't trigger completion and callbacks if fiber is suspended + if(!isCanceled && contsSize==0 && suspendedCount == 0) { + if(isTraceEnabled()) + LOGGER.log(Level.FINE, "{0} completed", getName()); + clearListeners(); + condition.signalAll(); + if (completionCallback != null) { + if (throwable != null) { + if (isDeliverThrowableInPacket) { + packet.addSatellite(new ThrowableContainerPropertySet(throwable)); + completionCallback.onCompletion(packet); + } else + completionCallback.onCompletion(throwable); + } else + completionCallback.onCompletion(packet); + } } + } finally { + lock.unlock(); } } - ///** - // * Blocks until the fiber completes. - // */ - //public synchronized void join() throws InterruptedException { - // while(!completed) - // wait(); - //} - /** * Invokes all registered {@link InterceptorHandler}s and then call into * {@link Fiber#__doRun()}. */ private class InterceptorHandler implements FiberContextSwitchInterceptor.Work { + private final Holder isUnlockRequired; + private final List ints; + /** * Index in {@link Fiber#interceptors} to invoke next. */ private int idx; + public InterceptorHandler(Holder isUnlockRequired, List ints) { + this.isUnlockRequired = isUnlockRequired; + this.ints = ints; + } + /** * Initiate the interception, and eventually invokes {@link Fiber#__doRun()}. */ @@ -826,86 +943,136 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { return execute(next); } + @Override public Tube execute(Tube next) { - if (idx == interceptors.size()) { + if (idx == ints.size()) { Fiber.this.next = next; - __doRun(); + if (__doRun(isUnlockRequired, ints)) + return PLACEHOLDER; } else { - FiberContextSwitchInterceptor interceptor = interceptors.get(idx++); + FiberContextSwitchInterceptor interceptor = ints.get(idx++); return interceptor.execute(Fiber.this, next, this); } return Fiber.this.next; } } + private static final PlaceholderTube PLACEHOLDER = new PlaceholderTube(); + + private static class PlaceholderTube extends AbstractTubeImpl { + + @Override + public NextAction processRequest(Packet request) { + throw new UnsupportedOperationException(); + } + + @Override + public NextAction processResponse(Packet response) { + throw new UnsupportedOperationException(); + } + + @Override + public NextAction processException(Throwable t) { + return doThrow(t); + } + + @Override + public void preDestroy() { + } + + @Override + public PlaceholderTube copy(TubeCloner cloner) { + throw new UnsupportedOperationException(); + } + } + /** * Executes the fiber as much as possible. * */ - @SuppressWarnings({"LoopStatementThatDoesntLoop"}) // IntelliJ reports this bogus error - private void doRun() { - + private boolean doRun() { dumpFiberContext("running"); if (serializeExecution) { serializedExecutionLock.lock(); try { - _doRun(next); + return _doRun(next); } finally { serializedExecutionLock.unlock(); } } else { - _doRun(next); + return _doRun(next); } } - private String currentThreadMonitor = "CurrentThreadMonitor"; - - private void _doRun(Tube next) { - Thread thread; - synchronized(currentThreadMonitor) { - if (currentThread != null && !synchronous) { - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.fine("Attempt to run Fiber ['" + this + "'] in more than one thread. Current Thread: " + currentThread + " Attempted Thread: " + Thread.currentThread()); - } - while (currentThread != null) { - try { - currentThreadMonitor.wait(); - } catch (Exception e) { - // ignore - } - } - } - currentThread = Thread.currentThread(); - thread = currentThread; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.fine("Thread entering _doRun(): " + thread); - } - } - - ClassLoader old = thread.getContextClassLoader(); - thread.setContextClassLoader(contextClassLoader); + private boolean _doRun(Tube next) { + // isRequireUnlock will contain Boolean.FALSE when lock has already been released in suspend + Holder isRequireUnlock = new Holder(Boolean.TRUE); + lock.lock(); try { - do { - needsToReenter = false; + List ints; + ClassLoader old; + synchronized(this) { + ints = interceptors; - // if interceptors are set, go through the interceptors. - if(interceptorHandler ==null) { - this.next = next; - __doRun(); + // currentThread is protected by the monitor for this fiber so + // that it is accessible to cancel() even when the lock is held + currentThread = Thread.currentThread(); + if (isTraceEnabled()) { + LOGGER.log(Level.FINE, "Thread entering _doRun(): {0}", currentThread); } - else - next = interceptorHandler.invoke(next); - } while (needsToReenter); + old = currentThread.getContextClassLoader(); + currentThread.setContextClassLoader(contextClassLoader); + } + + try { + boolean needsToReenter = false; + do { + // if interceptors are set, go through the interceptors. + if (ints == null) { + this.next = next; + if (__doRun(isRequireUnlock, ints)) { + return true; + } + } else { + next = new InterceptorHandler(isRequireUnlock, ints).invoke(next); + if (next == PLACEHOLDER) { + return true; + } + } + + synchronized(this) { + needsToReenter = (ints != interceptors); + if (needsToReenter) + ints = interceptors; + } + } while (needsToReenter); + } catch(OnExitRunnableException o) { + // catching this exception indicates onExitRunnable in suspend() threw. + // we must still avoid double unlock + Throwable t = o.target; + if (t instanceof WebServiceException) + throw (WebServiceException) t; + throw new WebServiceException(t); + } finally { + // don't reference currentThread here because fiber processing + // may already be running on a different thread (Note: isAlreadyExited + // tracks this state + Thread thread = Thread.currentThread(); + thread.setContextClassLoader(old); + if (isTraceEnabled()) { + LOGGER.log(Level.FINE, "Thread leaving _doRun(): {0}", thread); + } + } + + return false; } finally { - thread.setContextClassLoader(old); - synchronized(currentThreadMonitor) { - currentThread = null; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.fine("Thread leaving _doRun(): " + thread); - } - currentThreadMonitor.notify(); + if (isRequireUnlock.value) { + synchronized(this) { + currentThread = null; + } + lock.unlock(); } } } @@ -915,7 +1082,9 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { * * @see #doRun() */ - private void __doRun() { + private boolean __doRun(Holder isRequireUnlock, List originalInterceptors) { + assert(lock.isHeldByCurrentThread()); + final Fiber old = CURRENT_FIBER.get(); CURRENT_FIBER.set(this); @@ -924,8 +1093,14 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { try { boolean abortResponse = false; - boolean justSuspended = false; - while(!isCanceled && !isBlocking(justSuspended) && !needsToReenter) { + while(isReady(originalInterceptors)) { + if (isCanceled) { + next = null; + throwable = null; + contsSize = 0; + break; + } + try { NextAction na; Tube last; @@ -933,33 +1108,33 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { if(contsSize==0 || abortResponse) { contsSize = 0; // abortResponse case // nothing else to execute. we are done. - return; + return false; } last = popCont(); if (traceEnabled) - LOGGER.finer(getName() + ' ' + last + ".processException(" + throwable + ')'); + LOGGER.log(Level.FINER, "{0} {1}.processException({2})", new Object[]{getName(), last, throwable}); na = last.processException(throwable); } else { if(next!=null) { if(traceEnabled) - LOGGER.finer(getName()+' '+next+".processRequest("+(packet != null ? "Packet@"+Integer.toHexString(packet.hashCode()) : "null")+')'); + LOGGER.log(Level.FINER, "{0} {1}.processRequest({2})", new Object[]{getName(), next, packet != null ? "Packet@"+Integer.toHexString(packet.hashCode()) : "null"}); na = next.processRequest(packet); last = next; } else { if(contsSize==0 || abortResponse) { // nothing else to execute. we are done. contsSize = 0; - return; + return false; } last = popCont(); if(traceEnabled) - LOGGER.finer(getName()+' '+last+".processResponse("+(packet != null ? "Packet@"+Integer.toHexString(packet.hashCode()) : "null")+')'); + LOGGER.log(Level.FINER, "{0} {1}.processResponse({2})", new Object[]{getName(), last, packet != null ? "Packet@"+Integer.toHexString(packet.hashCode()) : "null"}); na = last.processResponse(packet); } } if (traceEnabled) - LOGGER.finer(getName() + ' ' + last + " returned with " + na); + LOGGER.log(Level.FINER, "{0} {1} returned with {2}", new Object[]{getName(), last, na}); // If resume is called before suspend, then make sure // resume(Packet) is not lost @@ -981,14 +1156,14 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { if (na.kind == NextAction.INVOKE_ASYNC && startedSync) { // Break out here - return; + return false; } break; case NextAction.THROW_ABORT_RESPONSE: case NextAction.ABORT_RESPONSE: abortResponse = true; - if (LOGGER.isLoggable(Level.FINE)) { - LOGGER.fine("Fiber " + this + " is aborting a response due to exception: " + na.throwable); + if (isTraceEnabled()) { + LOGGER.log(Level.FINE, "Fiber {0} is aborting a response due to exception: {1}", new Object[]{this, na.throwable}); } case NextAction.RETURN: case NextAction.THROW: @@ -1001,7 +1176,8 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { pushCont(last); } next = na.next; - justSuspended = suspend(); + if(suspend(isRequireUnlock, na.onExitRunnable)) + return true; // explicitly exiting control loop break; default: throw new AssertionError(); @@ -1019,18 +1195,14 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { dumpFiberContext("After tube execution"); } - if (isCanceled) { - next = null; - throwable = null; - contsSize = 0; - } - // there's nothing we can execute right away. // we'll be back when this fiber is resumed. } finally { CURRENT_FIBER.set(old); } + + return false; } private void pushCont(Tube tube) { @@ -1068,26 +1240,34 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { } /** - * Returns true if the fiber needs to block its execution. + * Returns true if the fiber is ready to execute. */ - private boolean isBlocking(boolean justSuspended) { + private boolean isReady(List originalInterceptors) { if (synchronous) { while (suspendedCount == 1) try { if (isTraceEnabled()) { - LOGGER.fine(getName() + " is blocking thread " + Thread.currentThread().getName()); + LOGGER.log(Level.FINE, "{0} is blocking thread {1}", new Object[]{getName(), Thread.currentThread().getName()}); } - wait(); // the synchronized block is the whole runSync method. + condition.await(); // the synchronized block is the whole runSync method. } catch (InterruptedException e) { // remember that we are interrupted, but don't respond to it // right away. This behavior is in line with what happens // when you are actually running the whole thing synchronously. interrupted = true; } - return false; + + synchronized(this) { + return interceptors == originalInterceptors; + } + } + else { + if (suspendedCount>0) + return false; + synchronized(this) { + return interceptors == originalInterceptors; + } } - else - return justSuspended || suspendedCount==1; } private String getName() { @@ -1215,16 +1395,19 @@ public final class Fiber implements Runnable, Cancelable, ComponentRegistry { private final Set components = new CopyOnWriteArraySet(); - public S getSPI(Class spiType) { - for(Component c : components) { - S spi = c.getSPI(spiType); - if (spi != null) - return spi; - } - return null; + @Override + public S getSPI(Class spiType) { + for (Component c : components) { + S spi = c.getSPI(spiType); + if (spi != null) { + return spi; + } } + return null; + } - public Set getComponents() { - return components; - } + @Override + public Set getComponents() { + return components; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java index 64ab8023ecc..fdbea65ab0c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java index 716a0a3b317..90c40263223 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/FiberContextSwitchInterceptorFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java index 07990625925..d7f17b36c33 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/NextAction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package com.sun.xml.internal.ws.api.pipe; import com.sun.xml.internal.ws.api.message.Packet; +import java.util.concurrent.Executor; /** * Indicates what shall happen after {@link Tube#processRequest(Packet)} or @@ -44,6 +45,7 @@ public final class NextAction { * Really either {@link RuntimeException} or {@link Error}. */ Throwable throwable; + Runnable onExitRunnable; // public enum Kind { INVOKE, INVOKE_AND_FORGET, RETURN, SUSPEND } @@ -95,6 +97,20 @@ public final class NextAction { set(RETURN, null, response, null); } + /** + * Indicates that the next action is to flip the processing direction + * and starts exception processing, but with the indicated context. + * + * @param t + * Either {@link RuntimeException} or {@link Error}, but defined to + * take {@link Throwable} because {@link Tube#processException(Throwable)} + * takes {@link Throwable}. + */ + public void throwException( Packet response, Throwable t ) { + // Use of RETURN is correct -- Fiber processing does not set packet for type of THROW + set(RETURN, null, response, t); + } + /** * Indicates that the next action is to flip the processing direction * and starts exception processing. @@ -145,18 +161,52 @@ public final class NextAction { /** * Indicates that the fiber should be suspended. * Once {@link Fiber#resume(Packet) resumed}, return the response processing. + * @deprecated Use variants that pass {@link Runnable} */ public void suspend() { - set(SUSPEND, null, null, null); + suspend(null, null); + } + + /** + * Indicates that the fiber should be suspended. Once the current {@link Thread} + * exits the fiber's control loop, the onExitRunnable will be invoked. This {@link Runnable} + * may call {@link Fiber#resume(Packet)}; however it is still guaranteed that the current + * Thread will return control, therefore, further processing will be handled on a {@link Thread} + * from the {@link Executor}. For synchronous cases, the Thread invoking this fiber cannot return + * until fiber processing is complete; therefore, the guarantee is only that the onExitRunnable + * will be invoked prior to completing the suspension. + * @since 2.2.7 + */ + public void suspend(Runnable onExitRunnable) { + suspend(null, onExitRunnable); } /** * Indicates that the fiber should be suspended. * Once {@link Fiber#resume(Packet) resumed}, resume with the * {@link Tube#processRequest(Packet)} on the given next tube. + * @deprecated Use variants that pass {@link Runnable} */ public void suspend(Tube next) { + suspend(next, null); + } + + /** + * Indicates that the fiber should be suspended. Once the current {@link Thread} + * exits the fiber's control loop, the onExitRunnable will be invoked. This {@link Runnable} + * may call {@link Fiber#resume(Packet)}; however it is still guaranteed that the current + * fiber will return control, therefore, further processing will be handled on a {@link Thread} + * from the {@link Executor}. For synchronous cases, the Thread invoking this fiber cannot return + * until fiber processing is complete; therefore, the guarantee is only that the onExitRunnable + * will be invoked prior to completing the suspension. + *

    + * Once {@link Fiber#resume(Packet) resumed}, resume with the + * {@link Tube#processRequest(Packet)} on the given next tube. + * @since 2.2.7 + */ + public void suspend(Tube next, Runnable onExitRunnable) { set(SUSPEND, next, null, null); + this.onExitRunnable = onExitRunnable; } /** Returns the next tube diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java index f1341a1283c..e4c90ab54a4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Pipe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -341,7 +341,6 @@ public interface Pipe { * * @return * always non-null {@link Pipe}. - * @param cloner */ Pipe copy(PipeCloner cloner); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java index f4045d68013..5c0912d2fde 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeCloner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java index 9ea1bab5567..779368a290c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipeClonerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java index df6eed22166..1635bde5974 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssembler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java index b8141250891..d3dc58e029b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/PipelineAssemblerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java index 80940b439dc..d40bc49d02e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SOAPBindingCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java index de0a057c91d..ffeb28649c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerPipeAssemblerContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java index e9c6fd93613..a014604bed4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ServerTubeAssemblerContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -225,7 +225,7 @@ public class ServerTubeAssemblerContext { * encode/decode entire MIME messages in SOAP binding) * * @return codec to be used for web service requests - * @see {@link Codecs} + * @see Codecs */ public @NotNull Codec getCodec() { return codec; @@ -247,7 +247,7 @@ public class ServerTubeAssemblerContext { * serving requests concurrently. * * @param codec codec to be used for web service requests - * @see {@link Codecs} + * @see Codecs */ public void setCodec(@NotNull Codec codec) { this.codec = codec; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java index d9a72c0ad25..aa3bdbe0d23 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/StreamSOAPCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java index a807dd4170c..b8684f51a4a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Stubs.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -321,7 +321,7 @@ public abstract class Stubs { /** * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe. - * The returned dispatch is always {@link Service.Mode#MESSAGE}. + * The returned dispatch is always {@link Mode#MESSAGE}. * * @param portName * see {@link Service#createDispatch(QName, Class, Service.Mode)}. @@ -344,7 +344,7 @@ public abstract class Stubs { /** * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe. - * The returned dispatch is always {@link Service.Mode#MESSAGE}. + * The returned dispatch is always {@link Mode#MESSAGE}. * * @param portInfo * see common parameters @@ -381,7 +381,7 @@ public abstract class Stubs { /** * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe. - * The returned dispatch is always {@link Service.Mode#MESSAGE}. + * The returned dispatch is always {@link Mode#MESSAGE}. * * @param portInfo * see common parameters diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java index beee63089c2..96d5a66f559 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/SyncStartForAsyncFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java new file mode 100644 index 00000000000..b627152f806 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/ThrowableContainerPropertySet.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.pipe; + +import javax.xml.ws.Dispatch; + +import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.Packet; +import com.oracle.webservices.internal.api.message.BasePropertySet; +import com.oracle.webservices.internal.api.message.PropertySet; + +/** + * When using {@link Dispatch}<{@link Packet}> and the invocation completes with a Throwable, it is + * useful to be able to inspect the Packet in addition to the Throwable as the Packet contains + * meta-data about the request and/or response. However, the default behavior is that the caller + * only receives the Throwable. + * + * This {@link PropertySet} is part of the implementation that allows a completing Fiber to return + * the Throwable to the caller as part of the Packet. + * + */ +public class ThrowableContainerPropertySet extends BasePropertySet { + + public ThrowableContainerPropertySet(final Throwable throwable) { + this.throwable = throwable; + } + + //////////////////////////////////////////////////// + // + // The original throwable + // + public static final String FIBER_COMPLETION_THROWABLE = "com.sun.xml.internal.ws.api.pipe.fiber-completion-throwable"; + private Throwable throwable; + @Property(FIBER_COMPLETION_THROWABLE) + public Throwable getThrowable() { + return throwable; + } + public void setThrowable(final Throwable throwable) { + this.throwable = throwable; + } + + //////////////////////////////////////////////////// + // + // The FAULT message created in WsaServerTube or WSEndpointImpl + // + public static final String FAULT_MESSAGE = "com.sun.xml.internal.ws.api.pipe.fiber-completion-fault-message"; + private Message faultMessage; + @Property(FAULT_MESSAGE) + public Message getFaultMessage() { + return faultMessage; + } + public void setFaultMessage(final Message faultMessage) { + this.faultMessage = faultMessage; + } + + //////////////////////////////////////////////////// + // + // The response Packet seen in WsaServerTube.processException or WSEndpointImpl + // + public static final String RESPONSE_PACKET = "com.sun.xml.internal.ws.api.pipe.fiber-completion-response-packet"; + private Packet responsePacket; + @Property(RESPONSE_PACKET) + public Packet getResponsePacket() { + return responsePacket; + } + public void setResponsePacket(final Packet responsePacket) { + this.responsePacket = responsePacket; + } + + //////////////////////////////////////////////////// + // + // If the fault representation of the exception has already been created + // + public static final String IS_FAULT_CREATED = "com.sun.xml.internal.ws.api.pipe.fiber-completion-is-fault-created"; + private boolean isFaultCreated = false; + @Property(IS_FAULT_CREATED) + public boolean isFaultCreated() { + return isFaultCreated; + } + public void setFaultCreated(final boolean isFaultCreated) { + this.isFaultCreated = isFaultCreated; + } + + // + // boilerplate + // + + @Override + protected PropertyMap getPropertyMap() { + return model; + } + + private static final PropertyMap model; + static { + model = parse(ThrowableContainerPropertySet.class); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java index 893da9b5bd6..ecdb060c04c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportPipeFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java index 1c8ccd5d8e2..3dd57f6d863 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TransportTubeFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,10 +29,10 @@ import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter; -import com.sun.xml.internal.ws.api.server.Container; import com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe; import com.sun.xml.internal.ws.util.ServiceFinder; import com.sun.xml.internal.ws.util.pipe.StandaloneTubeAssembler; +import java.util.logging.Level; import javax.xml.ws.WebServiceException; import java.util.logging.Logger; @@ -68,7 +68,7 @@ import java.util.logging.Logger; *

    * {@link TransportTubeFactory} look-up follows the standard service * discovery mechanism, so you need - * {@code META-INF/services/com.sun.xml.internal.ws.api.pipe.TransportTubeFactory}. + * {@code META-INF/services/com.sun.xml.internal.ws.api.pipe.BasicTransportTubeFactory}. * * @author Jitendra Kotamraju * @see StandaloneTubeAssembler @@ -116,8 +116,10 @@ public abstract class TransportTubeFactory { public static Tube create(@Nullable ClassLoader classLoader, @NotNull ClientTubeAssemblerContext context) { for (TransportTubeFactory factory : ServiceFinder.find(TransportTubeFactory.class,classLoader, context.getContainer())) { Tube tube = factory.doCreate(context); - if(tube !=null) { - TransportTubeFactory.logger.fine(factory.getClass()+" successfully created "+tube); + if (tube !=null) { + if (logger.isLoggable(Level.FINE)) { + TransportTubeFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), tube}); + } return tube; } } @@ -130,7 +132,9 @@ public abstract class TransportTubeFactory { for (TransportPipeFactory factory : ServiceFinder.find(TransportPipeFactory.class,classLoader)) { Pipe pipe = factory.doCreate(ctxt); if (pipe!=null) { - logger.fine(factory.getClass()+" successfully created "+pipe); + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), pipe}); + } return PipeAdapter.adapt(pipe); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java index a47c1786720..93bac31c51c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/Tube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -391,7 +391,6 @@ public interface Tube { * * @return * always non-null {@link Tube}. - * @param cloner */ Tube copy(TubeCloner cloner); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java index 065ffc828da..159b1c4b91c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubeCloner.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,7 +45,7 @@ public abstract class TubeCloner { * Invoked by a client of a tube to clone the whole pipeline. * *

    - * {@link Tube}s implementing the {@link Tube#copy(TubeClonerImpl)} method + * {@link Tube}s implementing the {@link Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)} method * shall use {@link #copy(Tube)} method. * * @param p @@ -66,7 +66,7 @@ public abstract class TubeCloner { } /** - * Invoked by a {@link Tube#copy(TubeClonerImpl)} implementation + * Invoked by a {@link Tube#copy(com.sun.xml.internal.ws.api.pipe.TubeCloner)} implementation * to copy a reference to another pipe. * *

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java index 5078829b057..c19f5b41465 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssembler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java index 02a38806fd7..601f1206b2c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/TubelineAssemblerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,8 +30,9 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter; import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.assembler.MetroTubelineAssembler; import com.sun.xml.internal.ws.util.ServiceFinder; -import com.sun.xml.internal.ws.util.pipe.StandaloneTubeAssembler; +import java.util.logging.Level; import java.util.logging.Logger; @@ -85,15 +86,16 @@ public abstract class TubelineAssemblerFactory { TubelineAssemblerFactory taf = container.getSPI(TubelineAssemblerFactory.class); if(taf!=null) { TubelineAssembler a = taf.doCreate(bindingId); - if(a!=null) + if (a != null) { return a; + } } } for (TubelineAssemblerFactory factory : ServiceFinder.find(TubelineAssemblerFactory.class, classLoader)) { TubelineAssembler assembler = factory.doCreate(bindingId); if (assembler != null) { - TubelineAssemblerFactory.logger.fine(factory.getClass() + " successfully created " + assembler); + TubelineAssemblerFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), assembler}); return assembler; } } @@ -102,13 +104,13 @@ public abstract class TubelineAssemblerFactory { for (PipelineAssemblerFactory factory : ServiceFinder.find(PipelineAssemblerFactory.class,classLoader)) { PipelineAssembler assembler = factory.doCreate(bindingId); if(assembler!=null) { - logger.fine(factory.getClass()+" successfully created "+assembler); + logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), assembler}); return new TubelineAssemblerAdapter(assembler); } } // default binding IDs that are known - return new StandaloneTubeAssembler(); + return new MetroTubelineAssembler(bindingId, MetroTubelineAssembler.JAXWS_TUBES_CONFIG_NAMES); } private static class TubelineAssemblerAdapter implements TubelineAssembler { @@ -118,6 +120,7 @@ public abstract class TubelineAssemblerFactory { this.assembler = assembler; } + @Override public @NotNull Tube createClient(@NotNull ClientTubeAssemblerContext context) { ClientPipeAssemblerContext ctxt = new ClientPipeAssemblerContext( context.getAddress(), context.getWsdlModel(), context.getService(), @@ -125,7 +128,11 @@ public abstract class TubelineAssemblerFactory { return PipeAdapter.adapt(assembler.createClient(ctxt)); } + @Override public @NotNull Tube createServer(@NotNull ServerTubeAssemblerContext context) { + if (!(context instanceof ServerPipeAssemblerContext)) { + throw new IllegalArgumentException("{0} is not instance of ServerPipeAssemblerContext"); + } return PipeAdapter.adapt(assembler.createServer((ServerPipeAssemblerContext) context)); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java index 0c3179839ad..55931028ee5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterPipeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java index fac6329222b..af6a8a7c119 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractFilterTubeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java index 817e9fcbd54..4afb4e4445e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractPipeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java index 0f1f82594ca..7f569a5a597 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/AbstractTubeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -75,18 +75,38 @@ public abstract class AbstractTubeImpl implements Tube, Pipe { return na; } + protected final NextAction doThrow(Packet response, Throwable t) { + NextAction na = new NextAction(); + na.throwException(response, t); + return na; + } + + @Deprecated protected final NextAction doSuspend() { NextAction na = new NextAction(); na.suspend(); return na; } + protected final NextAction doSuspend(Runnable onExitRunnable) { + NextAction na = new NextAction(); + na.suspend(onExitRunnable); + return na; + } + + @Deprecated protected final NextAction doSuspend(Tube next) { NextAction na = new NextAction(); na.suspend(next); return na; } + protected final NextAction doSuspend(Tube next, Runnable onExitRunnable) { + NextAction na = new NextAction(); + na.suspend(next, onExitRunnable); + return na; + } + protected final NextAction doThrow(Throwable t) { NextAction na = new NextAction(); na.throwException(t); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java index 28b11cef028..4f79c80bc7f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/PipeAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java index 08a94c2a9e3..238a9d81643 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/helper/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ /** - * Default partial implementations of {@link Pipe}. + * Default partial implementations of {@link com.sun.xml.internal.ws.api.pipe.Pipe}. * *

    * This is intended to be useful for projects building on diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java index 52d6d9718c9..0813caec7a6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/pipe/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java index 4570981ca37..68f5eaa42fc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/AlternativeSelector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java index 8c43455fda0..09cbf39f455 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java index 044e07044dc..28c58c344b9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelTranslator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java index 353ac3679b2..1b5f91822e7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ModelUnmarshaller.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.xml.internal.ws.api.policy; +import com.sun.xml.internal.ws.policy.sourcemodel.PolicyModelGenerator; import com.sun.xml.internal.ws.policy.sourcemodel.PolicySourceModel; import com.sun.xml.internal.ws.policy.sourcemodel.XmlPolicyModelUnmarshaller; import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.NamespaceVersion; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java index 0f72c0e9f69..1fe3c1040a1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java index 0153d8bd090..3d0d6606ae2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/PolicyResolverFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java index 66902da51d3..d07d66bfc0e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/SourceModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java index affd92cd24b..d581e3124f7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/ValidationProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java index 303f097609d..06f258efa40 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/policy/subject/BindingSubject.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java index 680affee0a3..e670ac452e6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractInstanceResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,26 +26,18 @@ package com.sun.xml.internal.ws.api.server; import com.sun.istack.internal.Nullable; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.api.server.InstanceResolver; import com.sun.xml.internal.ws.api.server.ResourceInjector; import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.resources.ServerMessages; import com.sun.xml.internal.ws.server.ServerRtException; -import com.sun.xml.internal.ws.util.localization.Localizable; -import javax.annotation.Resource; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.WebServiceException; import java.lang.annotation.Annotation; -import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.lang.reflect.Modifier; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; /** * Partial implementation of {@link InstanceResolver} with @@ -56,91 +48,6 @@ import java.util.List; */ public abstract class AbstractInstanceResolver extends InstanceResolver { - /** - * Encapsulates which field/method the injection is done, - * and performs the injection. - */ - public static interface InjectionPlan { - void inject(T instance,R resource); - /** - * Gets the number of injections to be performed. - */ - int count(); - } - - /** - * Injects to a field. - */ - protected static class FieldInjectionPlan implements InjectionPlan { - private final Field field; - - public FieldInjectionPlan(Field field) { - this.field = field; - } - - public void inject(final T instance, final R resource) { - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - try { - if (!field.isAccessible()) { - field.setAccessible(true); - } - field.set(instance,resource); - return null; - } catch (IllegalAccessException e) { - throw new ServerRtException("server.rt.err",e); - } - } - }); - } - - public int count() { - return 1; - } - } - - /** - * Injects to a method. - */ - protected static class MethodInjectionPlan implements InjectionPlan { - private final Method method; - - public MethodInjectionPlan(Method method) { - this.method = method; - } - - public void inject(T instance, R resource) { - invokeMethod(method, instance, resource); - } - - public int count() { - return 1; - } - } - - /** - * Combines multiple {@link InjectionPlan}s into one. - */ - private static class Compositor implements InjectionPlan { - private final InjectionPlan[] children; - - public Compositor(Collection> children) { - this.children = children.toArray(new InjectionPlan[children.size()]); - } - - public void inject(T instance, R res) { - for (InjectionPlan plan : children) - plan.inject(instance,res); - } - - public int count() { - int r = 0; - for (InjectionPlan plan : children) - r += plan.count(); - return r; - } - } - protected static ResourceInjector getResourceInjector(WSEndpoint endpoint) { ResourceInjector ri = endpoint.getContainer().getSPI(ResourceInjector.class); if(ri==null) @@ -189,76 +96,4 @@ public abstract class AbstractInstanceResolver extends InstanceResolver { } return r; } - - /** - * Creates an {@link InjectionPlan} that injects the given resource type to the given class. - * - * @param isStatic - * Only look for static field/method - * - */ - public static - InjectionPlan buildInjectionPlan(Class clazz, Class resourceType, boolean isStatic) { - List> plan = new ArrayList>(); - - Class cl = clazz; - while(cl != Object.class) { - for(Field field: cl.getDeclaredFields()) { - Resource resource = field.getAnnotation(Resource.class); - if (resource != null) { - if(isInjectionPoint(resource, field.getType(), - ServerMessages.localizableWRONG_FIELD_TYPE(field.getName()),resourceType)) { - - if(isStatic && !Modifier.isStatic(field.getModifiers())) - throw new WebServiceException(ServerMessages.STATIC_RESOURCE_INJECTION_ONLY(resourceType,field)); - - plan.add(new FieldInjectionPlan(field)); - } - } - } - cl = cl.getSuperclass(); - } - - cl = clazz; - while(cl != Object.class) { - for(Method method : cl.getDeclaredMethods()) { - Resource resource = method.getAnnotation(Resource.class); - if (resource != null) { - Class[] paramTypes = method.getParameterTypes(); - if (paramTypes.length != 1) - throw new ServerRtException(ServerMessages.WRONG_NO_PARAMETERS(method)); - if(isInjectionPoint(resource,paramTypes[0], - ServerMessages.localizableWRONG_PARAMETER_TYPE(method.getName()),resourceType)) { - - if(isStatic && !Modifier.isStatic(method.getModifiers())) - throw new WebServiceException(ServerMessages.STATIC_RESOURCE_INJECTION_ONLY(resourceType,method)); - - plan.add(new MethodInjectionPlan(method)); - } - } - } - cl = cl.getSuperclass(); - } - - return new Compositor(plan); - } - - /** - * Returns true if the combination of {@link Resource} and the field/method type - * are consistent for {@link WebServiceContext} injection. - */ - private static boolean isInjectionPoint(Resource resource, Class fieldType, Localizable errorMessage, Class resourceType ) { - Class t = resource.type(); - if (t.equals(Object.class)) { - return fieldType.equals(resourceType); - } else if (t.equals(resourceType)) { - if (fieldType.isAssignableFrom(resourceType)) { - return true; - } else { - // type compatibility error - throw new ServerRtException(errorMessage); - } - } - return false; - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java index bb868c8ce8f..6dbdb425f33 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AbstractServerAsyncTransport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,17 +25,17 @@ package com.sun.xml.internal.ws.api.server; +import com.oracle.webservices.internal.api.message.PropertySet; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.Codec; -import com.sun.xml.internal.ws.api.pipe.Fiber; import com.sun.xml.internal.ws.util.Pool; import java.io.IOException; + /** * Partial server side async transport implementation. It manages pooling of * {@link Codec} and other details. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java index 766d99e313c..4e73e9518be 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Adapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java index b9c1e4c1c44..18d7243e096 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java index a2ca37c5deb..34c30fbab09 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/AsyncProviderCallback.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java index 53fb01ae9e0..e6d9483cb2b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/BoundEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java index 2838be40163..b0ddc4ac317 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Container.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java index 10f7aa5f867..926badd5733 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ContainerResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,9 +30,7 @@ import com.sun.istack.internal.NotNull; /** * This class determines an instance of {@link Container} for the runtime. * It applies for both server and client runtimes(for e.g in Servlet could - * be accessing a Web Service). Always call {@link #setInstance} when the - * application's environment is initailized and a Container instance should - * be associated with an application. + * be accessing a Web Service). * * A client that is invoking a web service may be running in a * container(for e.g servlet). T @@ -46,13 +44,9 @@ import com.sun.istack.internal.NotNull; */ public abstract class ContainerResolver { - private static final ContainerResolver NONE = new ContainerResolver() { - public Container getContainer() { - return Container.NONE; - } - }; + private static final ThreadLocalContainerResolver DEFAULT = new ThreadLocalContainerResolver(); - private static volatile ContainerResolver theResolver = NONE; + private static volatile ContainerResolver theResolver = DEFAULT; /** * Sets the custom container resolver which can be used to get client's @@ -62,7 +56,7 @@ public abstract class ContainerResolver { */ public static void setInstance(ContainerResolver resolver) { if(resolver==null) - resolver = NONE; + resolver = DEFAULT; theResolver = resolver; } @@ -80,8 +74,8 @@ public abstract class ContainerResolver { * * @return default container resolver */ - public static ContainerResolver getDefault() { - return NONE; + public static ThreadLocalContainerResolver getDefault() { + return DEFAULT; } /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java index a605c3eea23..44b15f335ff 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/DocumentAddressResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java index 37888e698ab..7e49bb73ae3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointAwareCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,7 +37,7 @@ import com.sun.xml.internal.ws.api.pipe.Codec; */ public interface EndpointAwareCodec extends Codec { /** - * Called by the {@linK WSEndpoint} implementation + * Called by the {@link WSEndpoint} implementation * when the codec is associated with an endpoint. */ void setEndpoint(@NotNull WSEndpoint endpoint); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java index 3d8cf54c82b..ebd05370324 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointComponent.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java index 32204a30ebc..374f525302d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java index c8e88508048..2755f406135 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/EndpointReferenceExtensionContributor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java index fb11a27ee63..e8846c28e49 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/HttpEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java index 5fc2b26f263..625f59f47b0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java index 063f9bbb38b..5950e150b40 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/InstanceResolverAnnotation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java index 4cd956f1439..c6cf0beacd4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Invoker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java index 6d0880912e6..86291c359b0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/LazyMOMProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,12 @@ package com.sun.xml.internal.ws.api.server; +import com.sun.xml.internal.ws.server.WSEndpointImpl; import java.util.HashSet; import java.util.Set; +import com.sun.org.glassfish.external.amx.AMXGlassfish; +import com.sun.org.glassfish.external.amx.MBeanListener; +import com.sun.org.glassfish.gmbal.ManagedObjectManager; /** * The lazy provider is intended to defer Gmbal API calls until there is a JMX connection. The provider is scope @@ -41,7 +45,7 @@ import java.util.Set; * Glassfish: * {@link WebServicesContainer} is one of two classes for which a {@link ManagedObjectManager} instance (see Gmbal API) * is created when a webservice application is deployed into the Glassfish. For the purpose of postponing Gmbal API calls - * the {@code WebServiceContainer} extends {@link MBeanListener.CallbackImpl} so it can register itself as a listener of + * the {@code WebServicesContainer} extends {@link MBeanListener.CallbackImpl} so it can register itself as a listener of * {@link AMXGlassfish} and receive a notification about a connection of a JMX client to the Glassfish server (see * {@code WebServicesContainer#postConstruct} for registration details). The moment the JMX client is connected a notification * is sent to the listeners of {@code AMXGlassfish}. When this event is received by {@code WebServiceContainer} (see the @@ -53,7 +57,7 @@ import java.util.Set; * libraries (outside of Glassfish) so no notification from the Glassfish server can be expected in this case. This leads * to a situation when Metro/JAX-WS has to be aware of context in which it is used and acts appropriately. There are 3 * scopes an application using Metro/JAX-WS can be in: {@code STANDALONE}, {@code GLASSFISH_NO_JMX}, {@code GLASSFISH_JMX} - * ({@link LazyMOMProvider.Scope}). The default scope is {@code STANDALONE} and all Gmbal API calls are invoked as they + * ({@link LazyMOMProvider#scope}). The default scope is {@code STANDALONE} and all Gmbal API calls are invoked as they * are requested. The other two scopes are applied only when an application is deployed into a Glassfish server. The * {@code GLASSFISH_NO_JMX} is set at the moment the application is deployed (see below) and its purpose is to defer Gmbal * API calls for as long as possible. For some classes e.g. {@code ManagedObjectManager} proxy classes were introduced to @@ -181,7 +185,8 @@ public enum LazyMOMProvider { /** * Returns {@code true} if this provider is in the default scope. * - * @return + * @return {@code true} if this provider is in the default scope, + * {@code false} otherwise */ private boolean isProviderInDefaultScope() { return this.scope == Scope.STANDALONE; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java index 8c88bdd9826..a676a667d37 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/Module.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java index 7a3e0fe1397..f0e16d14f19 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/PortAddressResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java new file mode 100644 index 00000000000..c5fee67a56c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ProviderInvokerTubeFactory.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.server; + + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.server.provider.AsyncProviderInvokerTube; +import com.sun.xml.internal.ws.server.provider.ProviderArgumentsBuilder; +import com.sun.xml.internal.ws.server.provider.ProviderInvokerTube; +import com.sun.xml.internal.ws.server.provider.SyncProviderInvokerTube; +import com.sun.xml.internal.ws.util.ServiceFinder; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * Factory for Provider invoker tubes that know how to handle specific + * types of Providers (i.e., javax.xml.ws.Provider). + * + */ + +public abstract class ProviderInvokerTubeFactory { + /** + * + */ + protected abstract ProviderInvokerTube doCreate(@NotNull final Class implType, + @NotNull final Invoker invoker, + @NotNull final ProviderArgumentsBuilder argsBuilder, + final boolean isAsync); + + private static final ProviderInvokerTubeFactory DEFAULT = new DefaultProviderInvokerTubeFactory(); + + private static class DefaultProviderInvokerTubeFactory extends ProviderInvokerTubeFactory { + @Override + public ProviderInvokerTube doCreate(@NotNull final Class implType, + @NotNull final Invoker invoker, + @NotNull final ProviderArgumentsBuilder argsBuilder, + final boolean isAsync) + { + return createDefault(implType, invoker, argsBuilder, isAsync); + } + } + + /** + * @param classLoader + * @param container + * @param implType + * @param invoker + * @param argsBuilder + * @param isAsync + * + * @return + */ + public static ProviderInvokerTube create(@Nullable final ClassLoader classLoader, + @NotNull final Container container, + @NotNull final Class implType, + @NotNull final Invoker invoker, + @NotNull final ProviderArgumentsBuilder argsBuilder, + final boolean isAsync) + { + for (ProviderInvokerTubeFactory factory : ServiceFinder.find(ProviderInvokerTubeFactory.class, + classLoader, container)) + { + ProviderInvokerTube tube = factory.doCreate(implType, invoker, argsBuilder, isAsync); + if (tube != null) { + if (logger.isLoggable(Level.FINE)) { + ProviderInvokerTubeFactory.logger.log(Level.FINE, "{0} successfully created {1}", new Object[]{factory.getClass(), tube}); + } + return tube; + } + } + return DEFAULT.createDefault(implType, invoker, argsBuilder, isAsync); + } + + protected ProviderInvokerTube createDefault(@NotNull final Class implType, + @NotNull final Invoker invoker, + @NotNull final ProviderArgumentsBuilder argsBuilder, + final boolean isAsync) + { + return + isAsync + ? new AsyncProviderInvokerTube(invoker, argsBuilder) + : new SyncProviderInvokerTube (invoker, argsBuilder); + } + + private static final Logger logger = Logger.getLogger(ProviderInvokerTubeFactory.class.getName()); +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java index 49bca4f0c82..6c89ee06d05 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ResourceInjector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java index 015c7fa50e6..cd8f2d1049f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocument.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java index af165742dcc..56c1fa3db01 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java index 5c6250f4a57..50c497ad468 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/SDDocumentSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java index 2dda358b4f2..fbb7ff33b20 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServerPipelineHook.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java index 7c1f23e140e..a2c047b33ce 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ServiceDefinition.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java new file mode 100644 index 00000000000..cfd8d317042 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/ThreadLocalContainerResolver.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.api.server; + +import java.util.concurrent.Executor; + +/** + * ContainerResolver based on {@link ThreadLocal}. + *

    + * The ThreadLocalContainerResolver is the default implementation available + * from the ContainerResolver using {@link ContainerResolver#getDefault()}. Code + * sections that run with a Container must use the following pattern: + *

    + *   public void m() {
    + *     Container old = ContainerResolver.getDefault().enterContainer(myContainer);
    + *     try {
    + *       // ... method body
    + *     } finally {
    + *       ContainerResolver.getDefault().exitContainer(old);
    + *     }
    + *   }
    + * 
    + * @since 2.2.7 + */ +public class ThreadLocalContainerResolver extends ContainerResolver { + private ThreadLocal containers = new ThreadLocal() { + @Override + protected Container initialValue() { + return Container.NONE; + } + }; + + public Container getContainer() { + return containers.get(); + } + + /** + * Enters container + * @param container Container to set + * @return Previous container; must be remembered and passed to exitContainer + */ + public Container enterContainer(Container container) { + Container old = containers.get(); + containers.set(container); + return old; + } + + /** + * Exits container + * @param old Container returned from enterContainer + */ + public void exitContainer(Container old) { + containers.set(old); + } + + /** + * Used by {@link com.sun.xml.internal.ws.api.pipe.Engine} to wrap asynchronous {@link com.sun.xml.internal.ws.api.pipe.Fiber} executions + * @param container Container + * @param ex Executor to wrap + * @return an Executor that will set the container during executions of Runnables + */ + public Executor wrapExecutor(final Container container, final Executor ex) { + if (ex == null) + return null; + + return new Executor() { + @Override + public void execute(final Runnable command) { + ex.execute(new Runnable() { + @Override + public void run() { + Container old = enterContainer(container); + try { + command.run(); + } finally { + exitContainer(old); + } + } + }); + } + }; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java index 549ad7f2d36..f6428745d96 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/TransportBackChannel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java index 4320e8d633f..fc7590d71a2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,9 +30,11 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.Component; import com.sun.xml.internal.ws.api.ComponentRegistry; +import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.config.management.EndpointCreationAttributes; import com.sun.xml.internal.ws.api.config.management.ManagedEndpointFactory; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.SEIModel; @@ -41,18 +43,24 @@ import com.sun.xml.internal.ws.api.pipe.Codec; import com.sun.xml.internal.ws.api.pipe.Engine; import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor; import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.policy.PolicyMap; +import com.sun.xml.internal.ws.server.EndpointAwareTube; import com.sun.xml.internal.ws.server.EndpointFactory; import com.sun.xml.internal.ws.util.ServiceFinder; import com.sun.xml.internal.ws.util.xml.XmlUtil; +import com.sun.xml.internal.ws.wsdl.OperationDispatcher; import com.sun.org.glassfish.gmbal.ManagedObjectManager; import org.xml.sax.EntityResolver; +import org.w3c.dom.Element; import javax.xml.namespace.QName; import javax.xml.ws.Binding; +import javax.xml.ws.EndpointReference; import javax.xml.ws.WebServiceContext; import javax.xml.ws.WebServiceException; + import java.net.URL; import java.util.Collection; import java.util.Collections; @@ -217,8 +225,8 @@ public abstract class WSEndpoint implements ComponentRegistry { * one-way message processing happens correctly. {@link Packet#webServiceContextDelegate} * should have the correct value, so that some {@link WebServiceContext} methods correctly. * - * @see {@link Packet#transportBackChannel} - * @see {@link Packet#webServiceContextDelegate} + * @see Packet#transportBackChannel + * @see Packet#webServiceContextDelegate * * @param request web service request * @param callback callback to get response packet @@ -230,7 +238,7 @@ public abstract class WSEndpoint implements ComponentRegistry { /** * Schedule invocation of web service asynchronously. * - * @see {@link #schedule(Packet, CompletionCallback)} + * @see #schedule(Packet, CompletionCallback) * * @param request web service request * @param callback callback to get response packet(exception if there is one) @@ -560,9 +568,17 @@ public abstract class WSEndpoint implements ComponentRegistry { final ManagedEndpointFactory managementFactory = managementFactories.next(); final EndpointCreationAttributes attributes = new EndpointCreationAttributes( processHandlerAnnotation, invoker, resolver, isTransportSynchronous); - return managementFactory.createEndpoint(endpoint, attributes); + + WSEndpoint managedEndpoint = managementFactory.createEndpoint(endpoint, attributes); + + if (endpoint.getAssemblerContext().getTerminalTube() instanceof EndpointAwareTube) { + ((EndpointAwareTube)endpoint.getAssemblerContext().getTerminalTube()).setEndpoint(managedEndpoint); + } + + return managedEndpoint; } + return endpoint; } @@ -614,22 +630,85 @@ public abstract class WSEndpoint implements ComponentRegistry { * Gives the wsdl:service default name computed from the endpoint implementaiton class */ public static @NotNull QName getDefaultServiceName(Class endpointClass){ - return getDefaultServiceName(endpointClass, true); + return getDefaultServiceName(endpointClass, true, null); + } + public static @NotNull QName getDefaultServiceName(Class endpointClass, MetadataReader metadataReader){ + return getDefaultServiceName(endpointClass, true, metadataReader); } public static @NotNull QName getDefaultServiceName(Class endpointClass, boolean isStandard){ - return EndpointFactory.getDefaultServiceName(endpointClass, isStandard); + return getDefaultServiceName(endpointClass, isStandard, null); + } + public static @NotNull QName getDefaultServiceName(Class endpointClass, boolean isStandard, MetadataReader metadataReader){ + return EndpointFactory.getDefaultServiceName(endpointClass, isStandard, metadataReader); } /** * Gives the wsdl:service/wsdl:port default name computed from the endpoint implementaiton class */ - public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass){ - return getDefaultPortName(serviceName, endpointClass, true); + public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass) { + return getDefaultPortName(serviceName, endpointClass, null); + } + public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, MetadataReader metadataReader) { + return getDefaultPortName(serviceName, endpointClass, true, metadataReader); } - public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, boolean isStandard){ - return EndpointFactory.getDefaultPortName(serviceName, endpointClass, isStandard); + public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, boolean isStandard) { + return getDefaultPortName(serviceName, endpointClass, isStandard, null); + } + public static @NotNull QName getDefaultPortName(@NotNull QName serviceName, Class endpointClass, boolean isStandard, MetadataReader metadataReader){ + return EndpointFactory.getDefaultPortName(serviceName, endpointClass, isStandard, metadataReader); } + /** + * Return EndpointReference instance, based on passed parameters and spec version represented by clazz + * @param + * @param clazz represents spec version + * @param address endpoint address + * @param wsdlAddress wsdl address + * @param referenceParameters any reference parameters to be added to the instance + * @return EndpointReference instance based on passed parameters and values obtained from current instance + */ + public abstract T getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters); + + /** + * + * @param + * @param clazz + * @param address + * @param wsdlAddress + * @param metadata + * @param referenceParameters + * @return EndpointReference instance based on passed parameters and values obtained from current instance + */ + public abstract T getEndpointReference(Class clazz, + String address, String wsdlAddress, List metadata, + List referenceParameters); + + /** + * Used for managed endpoints infrastructure to compare equality of proxies vs proxied endpoints. + * @param endpoint + * @return true if the proxied endpoint instance held by this instance equals to 'endpoint', otherwise return false. + */ + public boolean equalsProxiedInstance(WSEndpoint endpoint) { + if (endpoint == null) return false; + return this.equals(endpoint); + } + + /** + * Nullable when there is no associated WSDL Model + * @return + */ + public abstract @Nullable OperationDispatcher getOperationDispatcher(); + + + /** + * This is used by WsaServerTube and WSEndpointImpl to create a Packet with SOAPFault message from a Java exception. + */ + public abstract Packet createServiceResponseForException(final ThrowableContainerPropertySet tc, + final Packet responsePacket, + final SOAPVersion soapVersion, + final WSDLPort wsdlPort, + final SEIModel seiModel, + final WSBinding binding); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java index 350efa78424..529fc903767 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WSWebServiceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java index ee04725824e..bbb6bf96f99 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebModule.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java index 5b66de0b794..bf31470feb4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/WebServiceContextDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java index 1c61aa6a839..0c45d23f887 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/server/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,6 @@ /** * APIs for hosting JAX-WS services. * - * If you are new to the code, start with {@link WSEndpoint}. + * If you are new to the code, start with {@link com.sun.xml.internal.ws.api.server.WSEndpoint}. */ package com.sun.xml.internal.ws.api.server; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java index 3b9786d17a9..c8ffbdbbca1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamReaderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,22 +28,19 @@ package com.sun.xml.internal.ws.api.streaming; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.streaming.XMLReaderException; +import com.sun.xml.internal.ws.util.xml.XmlUtil; import org.xml.sax.InputSource; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.io.StringReader; -import java.io.UnsupportedEncodingException; +import java.io.*; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; -import java.util.logging.Logger; import java.security.AccessController; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Factory for {@link XMLStreamReader}. @@ -54,6 +51,7 @@ import java.security.AccessController; * * @author Kohsuke Kawaguchi */ +@SuppressWarnings("StaticNonFinalUsedInInitialization") public abstract class XMLStreamReaderFactory { private static final Logger LOGGER = Logger.getLogger(XMLStreamReaderFactory.class.getName()); @@ -69,20 +67,23 @@ public abstract class XMLStreamReaderFactory { // this system property can be used to disable the pooling altogether, // in case someone hits an issue with pooling in the production system. - if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) + if(!getProperty(XMLStreamReaderFactory.class.getName()+".noPool")) { f = Zephyr.newInstance(xif); + } if(f==null) { // is this Woodstox? - if(xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) + if (xif.getClass().getName().equals("com.ctc.wstx.stax.WstxInputFactory")) { f = new Woodstox(xif); + } } - if(f==null) + if (f==null) { f = new Default(); + } theInstance = f; - LOGGER.fine("XMLStreamReaderFactory instance is = "+theInstance); + LOGGER.log(Level.FINE, "XMLStreamReaderFactory instance is = {0}", theInstance); } private static XMLInputFactory getXMLInputFactory() { @@ -95,7 +96,7 @@ public abstract class XMLStreamReaderFactory { } } if (xif == null) { - xif = XMLInputFactory.newInstance(); + xif = XmlUtil.newXMLInputFactory(true); } xif.setProperty(XMLInputFactory.IS_NAMESPACE_AWARE, true); xif.setProperty(XMLInputFactory.SUPPORT_DTD, false); @@ -109,7 +110,9 @@ public abstract class XMLStreamReaderFactory { * the JAX-WS RI uses. */ public static void set(XMLStreamReaderFactory f) { - if(f==null) throw new IllegalArgumentException(); + if(f==null) { + throw new IllegalArgumentException(); + } theInstance = f; } @@ -213,7 +216,7 @@ public abstract class XMLStreamReaderFactory { /** * {@link XMLStreamReaderFactory} implementation for SJSXP/JAXP RI. */ - public static final class Zephyr extends XMLStreamReaderFactory { + private static final class Zephyr extends XMLStreamReaderFactory { private final XMLInputFactory xif; private final ThreadLocal pool = new ThreadLocal(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java index 77387190f61..66d29c95f8b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/streaming/XMLStreamWriterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java index 6446e20281d..309fcf9e7dc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetaDataResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java index 14745681e8c..72d1137ed26 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/MetadataResolverFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java index fc4b04b33f1..d53d53b2fcb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/PolicyWSDLParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java index 16dfdd15bf5..b96c21ad5dd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/ServiceDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java index fe19dba8f2e..f8cbabc06a0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java index d75080355a3..e67bbc0b51e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/WSDLParserExtensionContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java index 8516ae23c02..075bb595f27 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/XMLEntityResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java index 97a7ac90a9e..e3ca201b138 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/parser/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java index 2710a1a1271..ec14b0408e8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGenExtnContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java index ce1349a7d70..2558d9ff488 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/api/wsdl/writer/WSDLGeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java new file mode 100644 index 00000000000..9439a7440d2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultClientTubelineAssemblyContext.java @@ -0,0 +1,161 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.EndpointAddress; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.WSService; +import com.sun.xml.internal.ws.api.client.WSPortInfo; +import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.Codec; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.policy.PolicyMap; + +/** + * The context is a wrapper around the existing JAX-WS {@link ClientTubeAssemblerContext} with additional features + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +class DefaultClientTubelineAssemblyContext extends TubelineAssemblyContextImpl implements ClientTubelineAssemblyContext { + + private final @NotNull ClientTubeAssemblerContext wrappedContext; + private final PolicyMap policyMap; + private final WSPortInfo portInfo; // TODO: is this really needed? + private final WSDLPort wsdlPort; + // TODO: replace the PipeConfiguration + + public DefaultClientTubelineAssemblyContext(@NotNull ClientTubeAssemblerContext context) { + this.wrappedContext = context; + this.wsdlPort = context.getWsdlModel(); + this.portInfo = context.getPortInfo(); + this.policyMap = context.getPortInfo().getPolicyMap(); + } + + public PolicyMap getPolicyMap() { + return policyMap; + } + + public boolean isPolicyAvailable() { + return policyMap != null && !policyMap.isEmpty(); + } + + /** + * The created pipeline will be used to serve this port. + * Null if the service isn't associated with any port definition in WSDL, + * and otherwise non-null. + * + * Replaces {@link com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext#getWsdlModel()} + */ + public WSDLPort getWsdlPort() { + return wsdlPort; + } + + public WSPortInfo getPortInfo() { + return portInfo; + } + + /** + * The endpoint address. Always non-null. This parameter is taken separately + * from {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort} (even though there's {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort#getAddress()}) + * because sometimes WSDL is not available. + */ + public @NotNull EndpointAddress getAddress() { + return wrappedContext.getAddress(); + } + + /** + * The pipeline is created for this {@link com.sun.xml.internal.ws.api.WSService}. + * Always non-null. (To be precise, the newly created pipeline + * is owned by a proxy or a dispatch created from this {@link com.sun.xml.internal.ws.api.WSService}.) + */ + public @NotNull WSService getService() { + return wrappedContext.getService(); + } + + /** + * The binding of the new pipeline to be created. + */ + public @NotNull WSBinding getBinding() { + return wrappedContext.getBinding(); + } + + /** + * The created pipeline will use seiModel to get java concepts for the endpoint + * + * @return Null if the service doesn't have SEI model e.g. Dispatch, + * and otherwise non-null. + */ + public @Nullable SEIModel getSEIModel() { + return wrappedContext.getSEIModel(); + } + + /** + * Returns the Container in which the client is running + * + * @return Container in which client is running + */ + public Container getContainer() { + return wrappedContext.getContainer(); + } + + /** + * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec + * based on the binding. + * + * @return codec to be used for web service requests + */ + public @NotNull Codec getCodec() { + return wrappedContext.getCodec(); + } + + /** + * Interception point to change {@link Codec} during {@link com.sun.xml.internal.ws.api.pipe.Tube}line assembly. The + * new codec will be used by jax-ws client runtime for encoding/decoding web service + * request/response messages. The new codec should be used by the transport tubes. + * + *

    + * the codec should correctly implement {@link Codec#copy} since it is used while + * serving requests concurrently. + * + * @param codec codec to be used for web service requests + */ + public void setCodec(@NotNull Codec codec) { + wrappedContext.setCodec(codec); + } + + public ClientTubeAssemblerContext getWrappedContext() { + return wrappedContext; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java new file mode 100644 index 00000000000..600037e686e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/DefaultServerTubelineAssemblyContext.java @@ -0,0 +1,161 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.api.pipe.Codec; +import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.server.WSEndpoint; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.policy.PolicyMap; + +/** + * The context is a wrapper around the existing JAX-WS {@link ServerTubeAssemblerContext} with additional features + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +class DefaultServerTubelineAssemblyContext extends TubelineAssemblyContextImpl implements ServerTubelineAssemblyContext { + + private final @NotNull ServerTubeAssemblerContext wrappedContext; + private final PolicyMap policyMap; + // TODO: add next tube getter/package-private setter + // TODO: replace the PipeConfiguration + + public DefaultServerTubelineAssemblyContext(@NotNull ServerTubeAssemblerContext context) { + this.wrappedContext = context; + this.policyMap = context.getEndpoint().getPolicyMap(); + } + + public PolicyMap getPolicyMap() { + return policyMap; + } + + public boolean isPolicyAvailable() { + return policyMap != null && !policyMap.isEmpty(); + } + + /** + * The created pipeline will use seiModel to get java concepts for the endpoint + * + * @return Null if the service doesn't have SEI model e.g. Provider endpoints, + * and otherwise non-null. + */ + public @Nullable SEIModel getSEIModel() { + return wrappedContext.getSEIModel(); + } + + /** + * The created pipeline will be used to serve this port. + * + * @return Null if the service isn't associated with any port definition in WSDL, + * and otherwise non-null. + */ + public @Nullable WSDLPort getWsdlPort() { + return wrappedContext.getWsdlModel(); + } + + /** + * + * The created pipeline is used to serve this {@link com.sun.xml.internal.ws.api.server.WSEndpoint}. + * Specifically, its {@link com.sun.xml.internal.ws.api.WSBinding} should be of interest to many + * {@link com.sun.xml.internal.ws.api.pipe.Pipe}s. + * @return Always non-null. + */ + public @NotNull WSEndpoint getEndpoint() { + return wrappedContext.getEndpoint(); + } + + /** + * The last {@link com.sun.xml.internal.ws.api.pipe.Pipe} in the pipeline. The assembler is expected to put + * additional {@link com.sun.xml.internal.ws.api.pipe.Pipe}s in front of it. + * + *

    + * (Just to give you the idea how this is used, normally the terminal pipe + * is the one that invokes the user application or {@link javax.xml.ws.Provider}.) + * + * @return always non-null terminal pipe + */ + public @NotNull Tube getTerminalTube() { + return wrappedContext.getTerminalTube(); + } + + /** + * If this server pipeline is known to be used for serving synchronous transport, + * then this method returns true. This can be potentially use as an optimization + * hint, since often synchronous versions are cheaper to execute than asycnhronous + * versions. + */ + public boolean isSynchronous() { + return wrappedContext.isSynchronous(); + } + + /** + * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec + * based on the binding. The codec is a full codec that is responsible for + * encoding/decoding entire protocol message(for e.g: it is responsible to + * encode/decode entire MIME messages in SOAP binding) + * + * @return codec to be used for web service requests + * @see {@link com.sun.xml.internal.ws.api.pipe.Codecs} + */ + public @NotNull Codec getCodec() { + return wrappedContext.getCodec(); + } + + /** + * Interception point to change {@link Codec} during {@link Tube}line assembly. The + * new codec will be used by jax-ws server runtime for encoding/decoding web service + * request/response messages. {@link WSEndpoint#createCodec()} will return a copy + * of this new codec and will be used in the server runtime. + * + *

    + * The codec is a full codec that is responsible for + * encoding/decoding entire protocol message(for e.g: it is responsible to + * encode/decode entire MIME messages in SOAP binding) + * + *

    + * the codec should correctly implement {@link Codec#copy} since it is used while + * serving requests concurrently. + * + * @param codec codec to be used for web service requests + * @see {@link com.sun.xml.internal.ws.api.pipe.Codecs} + */ + public void setCodec(@NotNull Codec codec) { + wrappedContext.setCodec(codec); + } + + public ServerTubeAssemblerContext getWrappedContext() { + return wrappedContext; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java new file mode 100644 index 00000000000..e945affa2fb --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigLoader.java @@ -0,0 +1,333 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.api.ResourceLoader; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.resources.TubelineassemblyMessages; +import com.sun.xml.internal.ws.runtime.config.MetroConfig; +import com.sun.xml.internal.ws.runtime.config.TubeFactoryList; +import com.sun.xml.internal.ws.runtime.config.TubelineDefinition; +import com.sun.xml.internal.ws.runtime.config.TubelineMapping; +import com.sun.xml.internal.ws.util.xml.XmlUtil; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.Unmarshaller; +import javax.xml.stream.XMLInputFactory; +import javax.xml.ws.WebServiceException; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.util.logging.Level; + +/** + * This class is responsible for locating and loading Metro configuration files + * (both application jaxws-tubes.xml and default jaxws-tubes-default.xml). + *

    + * Once the configuration is loaded the class is able to resolve which tubeline + * configuration belongs to each endpoint or endpoint client. This information is + * then used in {@link TubelineAssemblyController} to construct the list of + * {@link TubeCreator} objects that are used in the actual tubeline construction. + * + * @author Marek Potociar + */ +// TODO Move the logic of this class directly into MetroConfig class. +class MetroConfigLoader { + + private static final Logger LOGGER = Logger.getLogger(MetroConfigLoader.class); + + private MetroConfigName defaultTubesConfigNames; + + private static interface TubeFactoryListResolver { + + TubeFactoryList getFactories(TubelineDefinition td); + } + + private static final TubeFactoryListResolver ENDPOINT_SIDE_RESOLVER = new TubeFactoryListResolver() { + + public TubeFactoryList getFactories(TubelineDefinition td) { + return (td != null) ? td.getEndpointSide() : null; + } + }; + private static final TubeFactoryListResolver CLIENT_SIDE_RESOLVER = new TubeFactoryListResolver() { + + public TubeFactoryList getFactories(TubelineDefinition td) { + return (td != null) ? td.getClientSide() : null; + } + }; + // + private MetroConfig defaultConfig; + private URL defaultConfigUrl; + private MetroConfig appConfig; + private URL appConfigUrl; + + MetroConfigLoader(Container container, MetroConfigName defaultTubesConfigNames) { + this.defaultTubesConfigNames = defaultTubesConfigNames; + ResourceLoader spiResourceLoader = null; + if (container != null) { + spiResourceLoader = container.getSPI(ResourceLoader.class); + } + // if spi resource can't load resource, default (MetroConfigUrlLoader) is used; + // it searches the classpath, so it would be most probably used + // when using jaxws- or metro-defaults from jaxws libraries + init(container, spiResourceLoader, new MetroConfigUrlLoader(container)); + } + + private void init(Container container, ResourceLoader... loaders) { + + String appFileName = null; + String defaultFileName = null; + if (container != null) { + MetroConfigName mcn = container.getSPI(MetroConfigName.class); + if (mcn != null) { + appFileName = mcn.getAppFileName(); + defaultFileName = mcn.getDefaultFileName(); + } + } + if (appFileName == null) { + appFileName = defaultTubesConfigNames.getAppFileName(); + } + + if (defaultFileName == null) { + defaultFileName = defaultTubesConfigNames.getDefaultFileName(); + } + this.defaultConfigUrl = locateResource(defaultFileName, loaders); + if (defaultConfigUrl == null) { + throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(defaultFileName))); + } + + LOGGER.config(TubelineassemblyMessages.MASM_0002_DEFAULT_CFG_FILE_LOCATED(defaultFileName, defaultConfigUrl)); + this.defaultConfig = MetroConfigLoader.loadMetroConfig(defaultConfigUrl); + if (defaultConfig == null) { + throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(defaultFileName))); + } + if (defaultConfig.getTubelines() == null) { + throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(defaultFileName))); + } + if (defaultConfig.getTubelines().getDefault() == null) { + throw LOGGER.logSevereException(new IllegalStateException(TubelineassemblyMessages.MASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(defaultFileName))); + } + + this.appConfigUrl = locateResource(appFileName, loaders); + if (appConfigUrl != null) { + LOGGER.config(TubelineassemblyMessages.MASM_0006_APP_CFG_FILE_LOCATED(appConfigUrl)); + this.appConfig = MetroConfigLoader.loadMetroConfig(appConfigUrl); + } else { + LOGGER.config(TubelineassemblyMessages.MASM_0007_APP_CFG_FILE_NOT_FOUND()); + this.appConfig = null; + } + } + + TubeFactoryList getEndpointSideTubeFactories(URI endpointReference) { + return getTubeFactories(endpointReference, ENDPOINT_SIDE_RESOLVER); + } + + TubeFactoryList getClientSideTubeFactories(URI endpointReference) { + return getTubeFactories(endpointReference, CLIENT_SIDE_RESOLVER); + } + + private TubeFactoryList getTubeFactories(URI endpointReference, TubeFactoryListResolver resolver) { + if (appConfig != null && appConfig.getTubelines() != null) { + for (TubelineMapping mapping : appConfig.getTubelines().getTubelineMappings()) { + if (mapping.getEndpointRef().equals(endpointReference.toString())) { + TubeFactoryList list = resolver.getFactories(getTubeline(appConfig, resolveReference(mapping.getTubelineRef()))); + if (list != null) { + return list; + } else { + break; + } + } + } + + if (appConfig.getTubelines().getDefault() != null) { + TubeFactoryList list = resolver.getFactories(getTubeline(appConfig, resolveReference(appConfig.getTubelines().getDefault()))); + if (list != null) { + return list; + } + } + } + + for (TubelineMapping mapping : defaultConfig.getTubelines().getTubelineMappings()) { + if (mapping.getEndpointRef().equals(endpointReference.toString())) { + TubeFactoryList list = resolver.getFactories(getTubeline(defaultConfig, resolveReference(mapping.getTubelineRef()))); + if (list != null) { + return list; + } else { + break; + } + } + } + + return resolver.getFactories(getTubeline(defaultConfig, resolveReference(defaultConfig.getTubelines().getDefault()))); + } + + TubelineDefinition getTubeline(MetroConfig config, URI tubelineDefinitionUri) { + if (config != null && config.getTubelines() != null) { + for (TubelineDefinition td : config.getTubelines().getTubelineDefinitions()) { + if (td.getName().equals(tubelineDefinitionUri.getFragment())) { + return td; + } + } + } + + return null; + } + + private static URI resolveReference(String reference) { + try { + return new URI(reference); + } catch (URISyntaxException ex) { + throw LOGGER.logSevereException(new WebServiceException(TubelineassemblyMessages.MASM_0008_INVALID_URI_REFERENCE(reference), ex)); + } + } + + + private static URL locateResource(String resource, ResourceLoader loader) { + if (loader == null) return null; + + try { + return loader.getResource(resource); + } catch (MalformedURLException ex) { + LOGGER.severe(TubelineassemblyMessages.MASM_0009_CANNOT_FORM_VALID_URL(resource), ex); + } + return null; + } + + private static URL locateResource(String resource, ResourceLoader[] loaders) { + + for (ResourceLoader loader : loaders) { + URL url = locateResource(resource, loader); + if (url != null) { + return url; + } + } + return null; + } + + private static MetroConfig loadMetroConfig(@NotNull URL resourceUrl) { + MetroConfig result = null; + try { + JAXBContext jaxbContext = JAXBContext.newInstance(MetroConfig.class.getPackage().getName()); + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + XMLInputFactory factory = XmlUtil.newXMLInputFactory(true); + final JAXBElement configElement = unmarshaller.unmarshal(factory.createXMLStreamReader(resourceUrl.openStream()), MetroConfig.class); + result = configElement.getValue(); + } catch (Exception e) { + LOGGER.warning(TubelineassemblyMessages.MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(resourceUrl.toString()), e); + } + return result; + } + + private static class MetroConfigUrlLoader extends ResourceLoader { + + Container container; // TODO remove the field together with the code path using it (see below) + ResourceLoader parentLoader; + + MetroConfigUrlLoader(ResourceLoader parentLoader) { + this.parentLoader = parentLoader; + } + + MetroConfigUrlLoader(Container container) { + this((container != null) ? container.getSPI(ResourceLoader.class) : null); + this.container = container; + } + + @Override + public URL getResource(String resource) throws MalformedURLException { + LOGGER.entering(resource); + URL resourceUrl = null; + try { + if (parentLoader != null) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine(TubelineassemblyMessages.MASM_0011_LOADING_RESOURCE(resource, parentLoader)); + } + + resourceUrl = parentLoader.getResource(resource); + } + + if (resourceUrl == null) { + resourceUrl = loadViaClassLoaders("com/sun/xml/internal/ws/assembler/" + resource); + } + + if (resourceUrl == null && container != null) { + // TODO: we should remove this code path, the config file should be loaded using ResourceLoader only + resourceUrl = loadFromServletContext(resource); + } + + return resourceUrl; + } finally { + LOGGER.exiting(resourceUrl); + } + } + + private static URL loadViaClassLoaders(final String resource) { + URL resourceUrl = tryLoadFromClassLoader(resource, Thread.currentThread().getContextClassLoader()); + if (resourceUrl == null) { + resourceUrl = tryLoadFromClassLoader(resource, MetroConfigLoader.class.getClassLoader()); + if (resourceUrl == null) { + return ClassLoader.getSystemResource(resource); + } + } + + return resourceUrl; + } + + private static URL tryLoadFromClassLoader(final String resource, final ClassLoader loader) { + return (loader != null) ? loader.getResource(resource) : null; + } + + private URL loadFromServletContext(String resource) throws RuntimeException { + Object context = null; + try { + final Class contextClass = Class.forName("javax.servlet.ServletContext"); + context = container.getSPI(contextClass); + if (context != null) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine(TubelineassemblyMessages.MASM_0012_LOADING_VIA_SERVLET_CONTEXT(resource, context)); + } + try { + final Method method = context.getClass().getMethod("getResource", String.class); + final Object result = method.invoke(context, "/WEB-INF/" + resource); + return URL.class.cast(result); + } catch (Exception e) { + throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD("getResource()")), e); + } + } + } catch (ClassNotFoundException e) { + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.fine(TubelineassemblyMessages.MASM_0014_UNABLE_TO_LOAD_CLASS("javax.servlet.ServletContext")); + } + } + return null; + } + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/ri/OverrideAnnotationOfWriter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java similarity index 74% rename from jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/ri/OverrideAnnotationOfWriter.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java index 3171c18f13f..3766fd090c0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/tools/internal/xjc/generator/annotation/ri/OverrideAnnotationOfWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigName.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,16 +23,17 @@ * questions. */ -package com.sun.tools.internal.xjc.generator.annotation.ri; +package com.sun.xml.internal.ws.assembler; -import com.sun.codemodel.internal.JAnnotationWriter; -import com.sun.xml.internal.bind.annotation.OverrideAnnotationOf; +/** + * This interface is used to get the file name used for the metro configuration file. + * This allows multiple configurations of metro in a single VM. + * + * @author Bob Naugle + */ +public interface MetroConfigName { + public String getDefaultFileName(); -public interface OverrideAnnotationOfWriter - extends JAnnotationWriter -{ - - - OverrideAnnotationOfWriter value(String value); + public String getAppFileName(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java new file mode 100644 index 00000000000..91c6a22ae48 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroConfigNameImpl.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler; + +/** +* TODO: Write some description here ... +* +* @author Miroslav Kos (miroslav.kos at oracle.com) +*/ +public class MetroConfigNameImpl implements MetroConfigName { + + private final String defaultFileName; + private final String appFileName; + + public MetroConfigNameImpl(String defaultFileName, String appFileName) { + this.defaultFileName = defaultFileName; + this.appFileName = appFileName; + } + + @Override + public String getDefaultFileName() { + return defaultFileName; + } + + @Override + public String getAppFileName() { + return appFileName; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java new file mode 100644 index 00000000000..e87380061b7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/MetroTubelineAssembler.java @@ -0,0 +1,325 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.api.BindingID; +import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.pipe.TubelineAssembler; +import com.sun.xml.internal.ws.assembler.dev.TubelineAssemblyDecorator; +import com.sun.xml.internal.ws.dump.LoggingDumpTube; +import com.sun.xml.internal.ws.resources.TubelineassemblyMessages; +import com.sun.xml.internal.ws.util.ServiceFinder; + +import java.util.Collection; +import java.util.logging.Level; + +/** +* TODO: Write some description here ... +* +* @author Miroslav Kos (miroslav.kos at oracle.com) +*/ +public class MetroTubelineAssembler implements TubelineAssembler { + + private static final String COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE = "com.sun.metro.soap.dump"; + public static final MetroConfigNameImpl JAXWS_TUBES_CONFIG_NAMES = new MetroConfigNameImpl("jaxws-tubes-default.xml", "jaxws-tubes.xml"); + + private static enum Side { + + Client("client"), + Endpoint("endpoint"); + private final String name; + + private Side(String name) { + this.name = name; + } + + @Override + public String toString() { + return name; + } + } + + private static class MessageDumpingInfo { + + final boolean dumpBefore; + final boolean dumpAfter; + final Level logLevel; + + MessageDumpingInfo(boolean dumpBefore, boolean dumpAfter, Level logLevel) { + this.dumpBefore = dumpBefore; + this.dumpAfter = dumpAfter; + this.logLevel = logLevel; + } + } + + private static final Logger LOGGER = Logger.getLogger(MetroTubelineAssembler.class); + private final BindingID bindingId; + private final TubelineAssemblyController tubelineAssemblyController; + + public MetroTubelineAssembler(final BindingID bindingId, MetroConfigName metroConfigName) { + this.bindingId = bindingId; + this.tubelineAssemblyController = new TubelineAssemblyController(metroConfigName); + } + + TubelineAssemblyController getTubelineAssemblyController() { + return tubelineAssemblyController; + } + + @NotNull + public Tube createClient(@NotNull ClientTubeAssemblerContext jaxwsContext) { + if (LOGGER.isLoggable(Level.FINER)) { + LOGGER.finer("Assembling client-side tubeline for WS endpoint: " + jaxwsContext.getAddress().getURI().toString()); + } + + DefaultClientTubelineAssemblyContext context = createClientContext(jaxwsContext); + + Collection tubeCreators = tubelineAssemblyController.getTubeCreators(context); + + for (TubeCreator tubeCreator : tubeCreators) { + tubeCreator.updateContext(context); + } + + TubelineAssemblyDecorator decorator = TubelineAssemblyDecorator.composite( + ServiceFinder.find(TubelineAssemblyDecorator.class, context.getContainer())); + + boolean first = true; + for (TubeCreator tubeCreator : tubeCreators) { + final MessageDumpingInfo msgDumpInfo = setupMessageDumping(tubeCreator.getMessageDumpPropertyBase(), Side.Client); + + final Tube oldTubelineHead = context.getTubelineHead(); + LoggingDumpTube afterDumpTube = null; + if (msgDumpInfo.dumpAfter) { + afterDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.After, context.getTubelineHead()); + context.setTubelineHead(afterDumpTube); + } + + if (!context.setTubelineHead(decorator.decorateClient(tubeCreator.createTube(context), context))) { // no new tube has been created + if (afterDumpTube != null) { + context.setTubelineHead(oldTubelineHead); // removing possible "after" message dumping tube + } + } else { + final String loggedTubeName = context.getTubelineHead().getClass().getName(); + if (afterDumpTube != null) { + afterDumpTube.setLoggedTubeName(loggedTubeName); + } + + if (msgDumpInfo.dumpBefore) { + final LoggingDumpTube beforeDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.Before, context.getTubelineHead()); + beforeDumpTube.setLoggedTubeName(loggedTubeName); + context.setTubelineHead(beforeDumpTube); + } + } + + if (first) { + context.setTubelineHead(decorator.decorateClientTail(context.getTubelineHead(), context)); + first = false; + } + } + + return decorator.decorateClientHead(context.getTubelineHead(), context); + } + + @NotNull + public Tube createServer(@NotNull ServerTubeAssemblerContext jaxwsContext) { + if (LOGGER.isLoggable(Level.FINER)) { + LOGGER.finer("Assembling endpoint tubeline for WS endpoint: " + jaxwsContext.getEndpoint().getServiceName() + "::" + jaxwsContext.getEndpoint().getPortName()); + } + + DefaultServerTubelineAssemblyContext context = createServerContext(jaxwsContext); + + // FIXME endpoint URI for provider case + Collection tubeCreators = tubelineAssemblyController.getTubeCreators(context); + for (TubeCreator tubeCreator : tubeCreators) { + tubeCreator.updateContext(context); + } + + TubelineAssemblyDecorator decorator = TubelineAssemblyDecorator.composite( + ServiceFinder.find(TubelineAssemblyDecorator.class, context.getEndpoint().getContainer())); + + boolean first = true; + for (TubeCreator tubeCreator : tubeCreators) { + final MessageDumpingInfo msgDumpInfo = setupMessageDumping(tubeCreator.getMessageDumpPropertyBase(), Side.Endpoint); + + final Tube oldTubelineHead = context.getTubelineHead(); + LoggingDumpTube afterDumpTube = null; + if (msgDumpInfo.dumpAfter) { + afterDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.After, context.getTubelineHead()); + context.setTubelineHead(afterDumpTube); + } + + if (!context.setTubelineHead(decorator.decorateServer(tubeCreator.createTube(context), context))) { // no new tube has been created + if (afterDumpTube != null) { + context.setTubelineHead(oldTubelineHead); // removing possible "after" message dumping tube + } + } else { + final String loggedTubeName = context.getTubelineHead().getClass().getName(); + if (afterDumpTube != null) { + afterDumpTube.setLoggedTubeName(loggedTubeName); + } + + if (msgDumpInfo.dumpBefore) { + final LoggingDumpTube beforeDumpTube = new LoggingDumpTube(msgDumpInfo.logLevel, LoggingDumpTube.Position.Before, context.getTubelineHead()); + beforeDumpTube.setLoggedTubeName(loggedTubeName); + context.setTubelineHead(beforeDumpTube); + } + } + + if (first) { + context.setTubelineHead(decorator.decorateServerTail(context.getTubelineHead(), context)); + first = false; + } + } + + return decorator.decorateServerHead(context.getTubelineHead(), context); + } + + private MessageDumpingInfo setupMessageDumping(String msgDumpSystemPropertyBase, Side side) { + boolean dumpBefore = false; + boolean dumpAfter = false; + Level logLevel = Level.INFO; + + // checking common properties + Boolean value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE); + if (value != null) { + dumpBefore = value.booleanValue(); + dumpAfter = value.booleanValue(); + } + + value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + ".before"); + dumpBefore = (value != null) ? value.booleanValue() : dumpBefore; + + value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + ".after"); + dumpAfter = (value != null) ? value.booleanValue() : dumpAfter; + + Level levelValue = getLevelValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + ".level"); + if (levelValue != null) { + logLevel = levelValue; + } + + // narrowing to proper communication side on common properties + value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString()); + if (value != null) { + dumpBefore = value.booleanValue(); + dumpAfter = value.booleanValue(); + } + + value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString() + ".before"); + dumpBefore = (value != null) ? value.booleanValue() : dumpBefore; + + value = getBooleanValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString() + ".after"); + dumpAfter = (value != null) ? value.booleanValue() : dumpAfter; + + levelValue = getLevelValue(COMMON_MESSAGE_DUMP_SYSTEM_PROPERTY_BASE + "." + side.toString() + ".level"); + if (levelValue != null) { + logLevel = levelValue; + } + + + // checking general tube-specific properties + value = getBooleanValue(msgDumpSystemPropertyBase); + if (value != null) { + dumpBefore = value.booleanValue(); + dumpAfter = value.booleanValue(); + } + + value = getBooleanValue(msgDumpSystemPropertyBase + ".before"); + dumpBefore = (value != null) ? value.booleanValue() : dumpBefore; + + value = getBooleanValue(msgDumpSystemPropertyBase + ".after"); + dumpAfter = (value != null) ? value.booleanValue() : dumpAfter; + + levelValue = getLevelValue(msgDumpSystemPropertyBase + ".level"); + if (levelValue != null) { + logLevel = levelValue; + } + + // narrowing to proper communication side on tube-specific properties + msgDumpSystemPropertyBase += "." + side.toString(); + + value = getBooleanValue(msgDumpSystemPropertyBase); + if (value != null) { + dumpBefore = value.booleanValue(); + dumpAfter = value.booleanValue(); + } + + value = getBooleanValue(msgDumpSystemPropertyBase + ".before"); + dumpBefore = (value != null) ? value.booleanValue() : dumpBefore; + + value = getBooleanValue(msgDumpSystemPropertyBase + ".after"); + dumpAfter = (value != null) ? value.booleanValue() : dumpAfter; + + levelValue = getLevelValue(msgDumpSystemPropertyBase + ".level"); + if (levelValue != null) { + logLevel = levelValue; + } + + return new MessageDumpingInfo(dumpBefore, dumpAfter, logLevel); + } + + private Boolean getBooleanValue(String propertyName) { + Boolean retVal = null; + + String stringValue = System.getProperty(propertyName); + if (stringValue != null) { + retVal = Boolean.valueOf(stringValue); + LOGGER.fine(TubelineassemblyMessages.MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(propertyName, retVal)); + } + + return retVal; + } + + private Level getLevelValue(String propertyName) { + Level retVal = null; + + String stringValue = System.getProperty(propertyName); + if (stringValue != null) { + // if value is not null => property is set, we will try to override the default logging level + LOGGER.fine(TubelineassemblyMessages.MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(propertyName, stringValue)); + try { + retVal = Level.parse(stringValue); + } catch (IllegalArgumentException ex) { + LOGGER.warning(TubelineassemblyMessages.MASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(propertyName, stringValue), ex); + } + } + + return retVal; + } + + // Extension point to change Tubeline Assembly behaviour: override if necessary ... + protected DefaultServerTubelineAssemblyContext createServerContext(ServerTubeAssemblerContext jaxwsContext) { + return new DefaultServerTubelineAssemblyContext(jaxwsContext); + } + + // Extension point to change Tubeline Assembly behaviour: override if necessary ... + protected DefaultClientTubelineAssemblyContext createClientContext(ClientTubeAssemblerContext jaxwsContext) { + return new DefaultClientTubelineAssemblyContext(jaxwsContext); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java new file mode 100644 index 00000000000..ea40e34c8fd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubeCreator.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; +import com.sun.xml.internal.ws.assembler.dev.TubelineAssemblyContextUpdater; +import com.sun.xml.internal.ws.resources.TubelineassemblyMessages; +import com.sun.xml.internal.ws.runtime.config.TubeFactoryConfig; + +/** + * Utility class that encapsulates logic of loading TubeFactory + * instances and creating Tube instances. + * + * @author m_potociar + */ +final class TubeCreator { + private static final Logger LOGGER = Logger.getLogger(TubeCreator.class); + private final TubeFactory factory; + private final String msgDumpPropertyBase; + + TubeCreator(TubeFactoryConfig config, ClassLoader tubeFactoryClassLoader) { + try { + Class factoryClass = Class.forName(config.getClassName(), true, tubeFactoryClassLoader); + if (TubeFactory.class.isAssignableFrom(factoryClass)) { + @SuppressWarnings("unchecked") + // We can suppress "unchecked" warning here as we are checking for the correct type in the if statement above + Class typedClass = (Class) factoryClass; + this.factory = typedClass.newInstance(); + this.msgDumpPropertyBase = this.factory.getClass().getName() + ".dump"; + } else { + throw new RuntimeException(TubelineassemblyMessages.MASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(factoryClass.getName(), TubeFactory.class.getName())); + } + } catch (InstantiationException ex) { + throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(config.getClassName()), ex), true); + } catch (IllegalAccessException ex) { + throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(config.getClassName()), ex), true); + } catch (ClassNotFoundException ex) { + throw LOGGER.logSevereException(new RuntimeException(TubelineassemblyMessages.MASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(config.getClassName()), ex), true); + } + } + + Tube createTube(DefaultClientTubelineAssemblyContext context) { + // TODO implement passing init parameters (if any) to the factory + return factory.createTube(context); + } + + Tube createTube(DefaultServerTubelineAssemblyContext context) { + // TODO implement passing init parameters (if any) to the factory + return factory.createTube(context); + } + + void updateContext(ClientTubelineAssemblyContext context) { + if (factory instanceof TubelineAssemblyContextUpdater) { + ((TubelineAssemblyContextUpdater) factory).prepareContext(context); + } + } + + void updateContext(DefaultServerTubelineAssemblyContext context) { + if (factory instanceof TubelineAssemblyContextUpdater) { + ((TubelineAssemblyContextUpdater) factory).prepareContext(context); + } + } + + String getMessageDumpPropertyBase() { + return msgDumpPropertyBase; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java new file mode 100644 index 00000000000..f4b38e40530 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyContextImpl.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.api.pipe.Pipe; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.pipe.helper.PipeAdapter; +import com.sun.xml.internal.ws.assembler.dev.TubelineAssemblyContext; +import java.text.MessageFormat; + +import java.util.LinkedList; +import java.util.List; +import java.util.logging.Level; + +/** + * A base tubeline assembly context class providing common methods for both + * client and server assembly context classes. + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +class TubelineAssemblyContextImpl implements TubelineAssemblyContext { + private static final Logger LOGGER = Logger.getLogger(TubelineAssemblyContextImpl.class); + + private Tube head; + private Pipe adaptedHead; + private List tubes = new LinkedList(); + + @Override + public Tube getTubelineHead() { + return head; + } + + @Override + public Pipe getAdaptedTubelineHead() { + if (adaptedHead == null) { + adaptedHead = PipeAdapter.adapt(head); + } + return adaptedHead; + } + + boolean setTubelineHead(Tube newHead) { + if (newHead == head || newHead == adaptedHead) { + return false; + } + + head = newHead; + tubes.add(head); + adaptedHead = null; + + if (LOGGER.isLoggable(Level.FINER)) { + LOGGER.finer(MessageFormat.format("Added '{0}' tube instance to the tubeline.", (newHead == null) ? null : newHead.getClass().getName())); + } + + return true; + } + + @Override + public T getImplementation(Class type) { + for (Tube tube : tubes) { + if (type.isInstance(tube)) { + return type.cast(tube); + } + } + return null; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java new file mode 100644 index 00000000000..61f00502406 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/TubelineAssemblyController.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.resources.TubelineassemblyMessages; +import com.sun.xml.internal.ws.runtime.config.TubeFactoryConfig; +import com.sun.xml.internal.ws.runtime.config.TubeFactoryList; + +import javax.xml.namespace.QName; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Collection; +import java.util.LinkedList; + +/** + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +final class TubelineAssemblyController { + + private final MetroConfigName metroConfigName; + + TubelineAssemblyController(MetroConfigName metroConfigName) { + this.metroConfigName = metroConfigName; + } + + /** + * Provides a ordered collection of WSIT/Metro client-side tube creators that are be used to + * construct a client-side Metro tubeline + * + * The order of the tube creators in the collection is last-to-first from the + * client side request message processing perspective. + * + * + * WARNING: This method is part of Metro internal API and may be changed, removed or + * replaced by a different method without a prior notice. The method SHOULD NOT be used + * outside of Metro codebase. + * + * + * @param endpointUri URI of the endpoint for which the collection of tube factories should be returned + * + * @return collection of WSIT/Metro client-side tube creators + */ + Collection getTubeCreators(ClientTubelineAssemblyContext context) { + URI endpointUri; + if (context.getPortInfo() != null) { + endpointUri = createEndpointComponentUri(context.getPortInfo().getServiceName(), context.getPortInfo().getPortName()); + } else { + endpointUri = null; + } + + MetroConfigLoader configLoader = new MetroConfigLoader(context.getContainer(), metroConfigName); + return initializeTubeCreators(configLoader.getClientSideTubeFactories(endpointUri)); + } + + /** + * Provides a ordered collection of WSIT/Metro server-side tube creators that are be used to + * construct a server-side Metro tubeline for a given endpoint + * + * The order of the tube creators in the collection is last-to-first from the + * server side request message processing perspective. + * + * + * WARNING: This method is part of Metro internal API and may be changed, removed or + * replaced by a different method without a prior notice. The method SHOULD NOT be used + * outside of Metro codebase. + * + * + * @param endpointUri URI of the endpoint for which the collection of tube factories should be returned + * + * @return collection of WSIT/Metro server-side tube creators + */ + Collection getTubeCreators(DefaultServerTubelineAssemblyContext context) { + URI endpointUri; + if (context.getEndpoint() != null) { + endpointUri = createEndpointComponentUri(context.getEndpoint().getServiceName(), context.getEndpoint().getPortName()); + } else { + endpointUri = null; + } + + MetroConfigLoader configLoader = new MetroConfigLoader(context.getEndpoint().getContainer(), metroConfigName); + return initializeTubeCreators(configLoader.getEndpointSideTubeFactories(endpointUri)); + } + + private Collection initializeTubeCreators(TubeFactoryList tfl) { + final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); + + LinkedList tubeCreators = new LinkedList(); + for (TubeFactoryConfig tubeFactoryConfig : tfl.getTubeFactoryConfigs()) { + tubeCreators.addFirst(new TubeCreator(tubeFactoryConfig, contextClassLoader)); + } + return tubeCreators; + } + + /* + * Example WSDL component URI: http://org.sample#wsdl11.port(PingService/HttpPingPort) + */ + private URI createEndpointComponentUri(@NotNull QName serviceName, @NotNull QName portName) { + StringBuilder sb = new StringBuilder(serviceName.getNamespaceURI()).append("#wsdl11.port(").append(serviceName.getLocalPart()).append('/').append(portName.getLocalPart()).append(')'); + try { + return new URI(sb.toString()); + } catch (URISyntaxException ex) { + Logger.getLogger(TubelineAssemblyController.class).warning( + TubelineassemblyMessages.MASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(sb.toString()), + ex); + return null; + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java new file mode 100644 index 00000000000..a74f7950591 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ClientTubelineAssemblyContext.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.dev; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.EndpointAddress; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.WSService; +import com.sun.xml.internal.ws.api.client.WSPortInfo; +import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.Codec; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.policy.PolicyMap; + +/** + * @author Marek Potociar (marek.potociar at sun.com) + */ +public interface ClientTubelineAssemblyContext extends TubelineAssemblyContext { + + /** + * The endpoint address. Always non-null. This parameter is taken separately + * from {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort} (even though there's {@link com.sun.xml.internal.ws.api.model.wsdl.WSDLPort#getAddress()}) + * because sometimes WSDL is not available. + */ + @NotNull + EndpointAddress getAddress(); + + /** + * The binding of the new pipeline to be created. + */ + @NotNull + WSBinding getBinding(); + + /** + * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec + * based on the binding. + * + * @return codec to be used for web service requests + */ + @NotNull + Codec getCodec(); + + /** + * Returns the Container in which the client is running + * + * @return Container in which client is running + */ + Container getContainer(); + + PolicyMap getPolicyMap(); + + WSPortInfo getPortInfo(); + + /** + * The created pipeline will use seiModel to get java concepts for the endpoint + * + * @return Null if the service doesn't have SEI model e.g. Dispatch, + * and otherwise non-null. + */ + @Nullable + SEIModel getSEIModel(); + + /** + * The pipeline is created for this {@link com.sun.xml.internal.ws.api.WSService}. + * Always non-null. (To be precise, the newly created pipeline + * is owned by a proxy or a dispatch created from this {@link com.sun.xml.internal.ws.api.WSService}.) + */ + @NotNull + WSService getService(); + + ClientTubeAssemblerContext getWrappedContext(); + + /** + * The created pipeline will be used to serve this port. + * Null if the service isn't associated with any port definition in WSDL, + * and otherwise non-null. + *

    + * Replaces {@link com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext#getWsdlModel()} + */ + WSDLPort getWsdlPort(); + + boolean isPolicyAvailable(); + + /** + * Interception point to change {@link Codec} during {@link com.sun.xml.internal.ws.api.pipe.Tube}line assembly. The + * new codec will be used by jax-ws client runtime for encoding/decoding web service + * request/response messages. The new codec should be used by the transport tubes. + *

    + *

    + * the codec should correctly implement {@link Codec#copy} since it is used while + * serving requests concurrently. + * + * @param codec codec to be used for web service requests + */ + void setCodec(@NotNull + Codec codec); + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java new file mode 100644 index 00000000000..e707b53ceb0 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/ServerTubelineAssemblyContext.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.dev; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.api.pipe.Codec; +import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.server.WSEndpoint; +import com.sun.xml.internal.ws.policy.PolicyMap; + +/** + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public interface ServerTubelineAssemblyContext extends TubelineAssemblyContext { + + /** + * Gets the {@link Codec} that is set by {@link #setCodec} or the default codec + * based on the binding. The codec is a full codec that is responsible for + * encoding/decoding entire protocol message(for e.g: it is responsible to + * encode/decode entire MIME messages in SOAP binding) + * + * @return codec to be used for web service requests + * @see com.sun.xml.internal.ws.api.pipe.Codecs + */ + @NotNull + Codec getCodec(); + + /** + * + * The created pipeline is used to serve this {@link com.sun.xml.internal.ws.api.server.WSEndpoint}. + * Specifically, its {@link com.sun.xml.internal.ws.api.WSBinding} should be of interest to many + * {@link com.sun.xml.internal.ws.api.pipe.Pipe}s. + * @return Always non-null. + */ + @NotNull + WSEndpoint getEndpoint(); + + PolicyMap getPolicyMap(); + + /** + * The created pipeline will use seiModel to get java concepts for the endpoint + * + * @return Null if the service doesn't have SEI model e.g. Provider endpoints, + * and otherwise non-null. + */ + @Nullable + SEIModel getSEIModel(); + + /** + * The last {@link com.sun.xml.internal.ws.api.pipe.Pipe} in the pipeline. The assembler is expected to put + * additional {@link com.sun.xml.internal.ws.api.pipe.Pipe}s in front of it. + * + *

    + * (Just to give you the idea how this is used, normally the terminal pipe + * is the one that invokes the user application or {@link javax.xml.ws.Provider}.) + * + * @return always non-null terminal pipe + */ + @NotNull + Tube getTerminalTube(); + + ServerTubeAssemblerContext getWrappedContext(); + + /** + * The created pipeline will be used to serve this port. + * + * @return Null if the service isn't associated with any port definition in WSDL, + * and otherwise non-null. + */ + @Nullable + WSDLPort getWsdlPort(); + + boolean isPolicyAvailable(); + + /** + * If this server pipeline is known to be used for serving synchronous transport, + * then this method returns true. This can be potentially use as an optimization + * hint, since often synchronous versions are cheaper to execute than asycnhronous + * versions. + */ + boolean isSynchronous(); + + /** + * Interception point to change {@link Codec} during {@link Tube}line assembly. The + * new codec will be used by jax-ws server runtime for encoding/decoding web service + * request/response messages. {@link WSEndpoint#createCodec()} will return a copy + * of this new codec and will be used in the server runtime. + * + *

    + * The codec is a full codec that is responsible for + * encoding/decoding entire protocol message(for e.g: it is responsible to + * encode/decode entire MIME messages in SOAP binding) + * + *

    + * the codec should correctly implement {@link Codec#copy} since it is used while + * serving requests concurrently. + * + * @param codec codec to be used for web service requests + * @see com.sun.xml.internal.ws.api.pipe.Codecs + */ + void setCodec(@NotNull + Codec codec); + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizable.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java similarity index 56% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizable.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java index 813f3868427..5049ad0a4c5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubeFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,41 +23,30 @@ * questions. */ -package com.sun.xml.internal.ws.util.localization; +package com.sun.xml.internal.ws.assembler.dev; + +import com.sun.xml.internal.ws.api.pipe.Tube; + +import javax.xml.ws.WebServiceException; /** - * Localizable message. - * - * @author WS Development Team + * @author Marek Potociar (marek.potociar at sun.com) */ -public interface Localizable { +public interface TubeFactory { /** - * Gets the key in the resource bundle. + * Adds RM tube to the client-side tubeline, depending on whether RM is enabled or not. * - * @return - * if this method returns {@link #NOT_LOCALIZABLE}, - * that means the message is not localizable, and - * the first item of {@link #getArguments()} array - * holds a String. + * @param context wsit client tubeline assembler context + * @return new tail of the client-side tubeline */ - public String getKey(); + Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException; /** - * Returns the arguments for message formatting. + * Adds RM tube to the service-side tubeline, depending on whether RM is enabled or not. * - * @return - * can be an array of length 0 but never be null. + * @param context wsit service tubeline assembler context + * @return new head of the service-side tubeline */ - public Object[] getArguments(); - public String getResourceBundleName(); + Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException; - - /** - * Special constant that represents a message that - * is not localizable. - * - *

    - * Use of "new" is to create an unique instance. - */ - public static final String NOT_LOCALIZABLE = new String("\u0000"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/LocalizableMessageFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java similarity index 71% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/LocalizableMessageFactory.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java index 66ef4a643e6..447e6fb09f2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/LocalizableMessageFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,21 +23,20 @@ * questions. */ -package com.sun.xml.internal.ws.util.localization; +package com.sun.xml.internal.ws.assembler.dev; + +import com.sun.xml.internal.ws.api.pipe.Pipe; +import com.sun.xml.internal.ws.api.pipe.Tube; /** - * @author WS Development Team + * + * @author Marek Potociar (marek.potociar at sun.com) */ -public class LocalizableMessageFactory { +public interface TubelineAssemblyContext { - private final String _bundlename; + Pipe getAdaptedTubelineHead(); - public LocalizableMessageFactory(String bundlename) { - _bundlename = bundlename; - } - - public Localizable getMessage(String key, Object... args) { - return new LocalizableMessage(_bundlename, key, args); - } + T getImplementation(Class type); + Tube getTubelineHead(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java new file mode 100644 index 00000000000..8c628a1532f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyContextUpdater.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.dev; + +import javax.xml.ws.WebServiceException; + +/** + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public interface TubelineAssemblyContextUpdater { + /** + * TODO javadoc + * + * @param context + * @throws javax.xml.ws.WebServiceException + */ + void prepareContext(ClientTubelineAssemblyContext context) throws WebServiceException; + + /** + * TODO javadoc + * + * @param context + * @throws javax.xml.ws.WebServiceException + */ + void prepareContext(ServerTubelineAssemblyContext context) throws WebServiceException; +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java new file mode 100644 index 00000000000..41a5384adae --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/dev/TubelineAssemblyDecorator.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.dev; + +import java.util.ArrayList; +import java.util.Collection; + +import com.sun.xml.internal.ws.api.pipe.Tube; + +/** + * Decorate Tubes during tubeline assembly + * + * @since 2.2.7 + */ +public class TubelineAssemblyDecorator { + /** + * Composite decorator + * @param decorators decorators + * @return composite that delegates to a list of decorators + */ + public static TubelineAssemblyDecorator composite(Iterable decorators) { + return new CompositeTubelineAssemblyDecorator(decorators); + } + + /** + * Decorate client tube + * @param tube tube + * @param context client context + * @return updated tube for tubeline or return tube parameter to no-op + */ + public Tube decorateClient(Tube tube, ClientTubelineAssemblyContext context) { + return tube; + } + + /** + * Decorate client head tube. The decorateClient method will have been called first. + * @param tube tube + * @param context client context + * @return updated tube for tubeline or return tube parameter to no-op + */ + public Tube decorateClientHead( + Tube tube, ClientTubelineAssemblyContext context) { + return tube; + } + + /** + * Decorate client tail tube. The decorateClient method will have been called first. + * @param tube tube + * @param context client context + * @return updated tube for tubeline or return tube parameter to no-op + */ + public Tube decorateClientTail( + Tube tube, + ClientTubelineAssemblyContext context) { + return tube; + } + + /** + * Decorate server tube + * @param tube tube + * @param context server context + * @return updated tube for tubeline or return tube parameter to no-op + */ + public Tube decorateServer(Tube tube, ServerTubelineAssemblyContext context) { + return tube; + } + + /** + * Decorate server tail tube. The decorateServer method will have been called first. + * @param tube tube + * @param context server context + * @return updated tube for tubeline or return tube parameter to no-op + */ + public Tube decorateServerTail( + Tube tube, ServerTubelineAssemblyContext context) { + return tube; + } + + /** + * Decorate server head tube. The decorateServer method will have been called first + * @param tube tube + * @param context server context + * @return updated tube for tubeline or return tube parameter to no-op + */ + public Tube decorateServerHead( + Tube tube, + ServerTubelineAssemblyContext context) { + return tube; + } + + private static class CompositeTubelineAssemblyDecorator extends TubelineAssemblyDecorator { + private Collection decorators = new ArrayList(); + + public CompositeTubelineAssemblyDecorator(Iterable decorators) { + for (TubelineAssemblyDecorator decorator : decorators) { + this.decorators.add(decorator); + } + } + + @Override + public Tube decorateClient(Tube tube, ClientTubelineAssemblyContext context) { + for (TubelineAssemblyDecorator decorator : decorators) { + tube = decorator.decorateClient(tube, context); + } + return tube; + } + + @Override + public Tube decorateClientHead( + Tube tube, ClientTubelineAssemblyContext context) { + for (TubelineAssemblyDecorator decorator : decorators) { + tube = decorator.decorateClientHead(tube, context); + } + return tube; + } + + @Override + public Tube decorateClientTail( + Tube tube, + ClientTubelineAssemblyContext context) { + for (TubelineAssemblyDecorator decorator : decorators) { + tube = decorator.decorateClientTail(tube, context); + } + return tube; + } + + public Tube decorateServer(Tube tube, ServerTubelineAssemblyContext context) { + for (TubelineAssemblyDecorator decorator : decorators) { + tube = decorator.decorateServer(tube, context); + } + return tube; + } + + @Override + public Tube decorateServerTail( + Tube tube, ServerTubelineAssemblyContext context) { + for (TubelineAssemblyDecorator decorator : decorators) { + tube = decorator.decorateServerTail(tube, context); + } + return tube; + } + + @Override + public Tube decorateServerHead( + Tube tube, + ServerTubelineAssemblyContext context) { + for (TubelineAssemblyDecorator decorator : decorators) { + tube = decorator.decorateServerHead(tube, context); + } + return tube; + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml new file mode 100644 index 00000000000..c1717a30db9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws-tubes-default.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java new file mode 100644 index 00000000000..1b3bc8fce44 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/AddressingTubeFactory.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class AddressingTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createWsaTube(context.getTubelineHead()); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createWsaTube(context.getTubelineHead()); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java new file mode 100644 index 00000000000..e7b8c3e9a5a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/BasicTransportTubeFactory.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class BasicTransportTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createTransportTube(); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getTubelineHead(); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java new file mode 100644 index 00000000000..d1728994706 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/HandlerTubeFactory.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class HandlerTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createHandlerTube(context.getTubelineHead()); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createHandlerTube(context.getTubelineHead()); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java new file mode 100644 index 00000000000..41a98edb24c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MonitoringTubeFactory.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class MonitoringTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getTubelineHead(); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createMonitoringTube(context.getTubelineHead()); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java new file mode 100644 index 00000000000..b14a98e02b0 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/MustUnderstandTubeFactory.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class MustUnderstandTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createClientMUTube(context.getTubelineHead()); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createServerMUTube(context.getTubelineHead()); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java new file mode 100644 index 00000000000..3097cd22631 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/TerminalTubeFactory.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class TerminalTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getTubelineHead(); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().getTerminalTube(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java new file mode 100644 index 00000000000..abee3968024 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/assembler/jaxws/ValidationTubeFactory.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.assembler.jaxws; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +/** + * TubeFactory implementation creating one of the standard JAX-WS RI tubes + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +public final class ValidationTubeFactory implements TubeFactory { + + @Override + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createValidationTube(context.getTubelineHead()); + } + + @Override + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + return context.getWrappedContext().createValidationTube(context.getTubelineHead()); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java index c7e17db9c2b..7e2c908216d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/BindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.xml.internal.ws.binding; +import com.oracle.webservices.internal.api.message.MessageContextFactory; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.BindingID; @@ -43,10 +44,12 @@ import javax.xml.ws.soap.AddressingFeature; import javax.xml.ws.handler.Handler; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.Map; + /** * Instances are created by the service, which then * sets the handler chain on the binding impl. @@ -67,10 +70,13 @@ public abstract class BindingImpl implements WSBinding { protected static final WebServiceFeature[] EMPTY_FEATURES = new WebServiceFeature[0]; //This is reset when ever Binding.setHandlerChain() or SOAPBinding.setRoles() is called. - protected HandlerConfiguration handlerConfig; + private HandlerConfiguration handlerConfig; + private final Set addedHeaders = new HashSet(); + private final Set knownHeaders = new HashSet(); + private final Set unmodKnownHeaders = Collections.unmodifiableSet(knownHeaders); private final BindingID bindingId; // Features that are set(enabled/disabled) on the binding - protected final WebServiceFeatureList features = new WebServiceFeatureList(); + protected final WebServiceFeatureList features; // Features that are set(enabled/disabled) on the binding or an operation protected final Map operationFeatures = new HashMap(); // Features that are set(enabled/disabled) on the binding, an operation or an input message @@ -82,10 +88,15 @@ public abstract class BindingImpl implements WSBinding { protected javax.xml.ws.Service.Mode serviceMode = javax.xml.ws.Service.Mode.PAYLOAD; + protected MessageContextFactory messageContextFactory; + protected BindingImpl(BindingID bindingId, WebServiceFeature ... features) { this.bindingId = bindingId; handlerConfig = new HandlerConfiguration(Collections.emptySet(), Collections.emptyList()); - setFeatures(features); + if (handlerConfig.getHandlerKnownHeaders() != null) + knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders()); + this.features = new WebServiceFeatureList(features); + this.features.validate(); } public @@ -98,13 +109,25 @@ public abstract class BindingImpl implements WSBinding { return handlerConfig; } + protected void setHandlerConfig(HandlerConfiguration handlerConfig) { + this.handlerConfig = handlerConfig; + knownHeaders.clear(); + knownHeaders.addAll(addedHeaders); + if (handlerConfig != null && handlerConfig.getHandlerKnownHeaders() != null) + knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders()); + } public void setMode(@NotNull Service.Mode mode) { this.serviceMode = mode; } public Set getKnownHeaders() { - return handlerConfig.getHandlerKnownHeaders(); + return unmodKnownHeaders; + } + + public boolean addKnownHeader(QName headerQName) { + addedHeaders.add(headerQName); + return knownHeaders.add(headerQName); } public @@ -186,7 +209,7 @@ public abstract class BindingImpl implements WSBinding { @NotNull public WebServiceFeatureList getFeatures() { //TODO scchen convert BindingID to WebServiceFeature[] - if(!isFeatureEnabled(com.sun.xml.internal.org.jvnet.ws.EnvelopeStyleFeature.class)) { + if(!isFeatureEnabled(com.oracle.webservices.internal.api.EnvelopeStyleFeature.class)) { WebServiceFeature[] f = { getSOAPVersion().toFeature() }; features.mergeFeatures(f, false); } @@ -219,14 +242,6 @@ public abstract class BindingImpl implements WSBinding { return FeatureListUtil.mergeList(operationFeatureList, messageFeatureList, features); } - public void setFeatures(WebServiceFeature... newFeatures) { - if (newFeatures != null) { - for (WebServiceFeature f : newFeatures) { - features.add(f); - } - } - } - public void setOperationFeatures(@NotNull final QName operationName, WebServiceFeature... newFeatures) { if (newFeatures != null) { WebServiceFeatureList featureList = operationFeatures.get(operationName); @@ -280,11 +295,13 @@ public abstract class BindingImpl implements WSBinding { } } - public void addFeature(@NotNull WebServiceFeature newFeature) { - features.add(newFeature); + public synchronized @NotNull com.oracle.webservices.internal.api.message.MessageContextFactory getMessageContextFactory () { + if (messageContextFactory == null) { + messageContextFactory = MessageContextFactory.createFactory(getFeatures().toArray()); + } + return messageContextFactory; } - /** * Experimental: Identify messages based on the name of the message and the * operation that uses this message. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java index 80d1ded122c..94ae1c7518c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/FeatureListUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java index deb666e7e62..359cf77d398 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/HTTPBindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -65,6 +65,6 @@ public class HTTPBindingImpl extends BindingImpl implements HTTPBinding { throw new WebServiceException(ClientMessages.NON_LOGICAL_HANDLER_SET(handler.getClass())); } } - handlerConfig = new HandlerConfiguration(Collections.emptySet(), chain); + setHandlerConfig(new HandlerConfiguration(Collections.emptySet(), chain)); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java index caa40fd74ea..292ed73c135 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/SOAPBindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package com.sun.xml.internal.ws.binding; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.SOAPVersion; -import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.client.HandlerConfiguration; import com.sun.xml.internal.ws.encoding.soap.streaming.SOAP12NamespaceConstants; import com.sun.xml.internal.ws.resources.ClientMessages; @@ -44,7 +43,6 @@ import javax.xml.ws.soap.MTOMFeature; import javax.xml.ws.soap.SOAPBinding; import java.util.*; - /** * @author WS Development Team */ @@ -118,7 +116,7 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { * Protocol Handlers and sets the HandlerConfiguration. */ public void setHandlerChain(List chain) { - handlerConfig = new HandlerConfiguration(handlerConfig.getRoles(), chain); + setHandlerConfig(new HandlerConfiguration(getHandlerConfig().getRoles(), chain)); } protected void addRequiredRoles(Set roles) { @@ -126,7 +124,7 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { } public Set getRoles() { - return handlerConfig.getRoles(); + return getHandlerConfig().getRoles(); } /** @@ -142,7 +140,7 @@ public final class SOAPBindingImpl extends BindingImpl implements SOAPBinding { throw new WebServiceException(ClientMessages.INVALID_SOAP_ROLE_NONE()); } addRequiredRoles(roles); - handlerConfig = new HandlerConfiguration(roles, getHandlerConfig()); + setHandlerConfig(new HandlerConfiguration(roles, getHandlerConfig())); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java index bf3293a9e3f..adcf63f865f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/binding/WebServiceFeatureList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,8 @@ package com.sun.xml.internal.ws.binding; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.BindingID; +import com.sun.xml.internal.ws.api.FeatureListValidator; +import com.sun.xml.internal.ws.api.FeatureListValidatorAnnotation; import com.sun.xml.internal.ws.api.ImpliesWebServiceFeature; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; @@ -50,7 +52,7 @@ import javax.xml.ws.soap.MTOM; import javax.xml.ws.soap.MTOMFeature; import javax.xml.ws.spi.WebServiceFeatureAnnotation; -import com.sun.xml.internal.org.jvnet.ws.EnvelopeStyleFeature; +import com.oracle.webservices.internal.api.EnvelopeStyleFeature; import java.lang.annotation.Annotation; import java.lang.reflect.InvocationTargetException; @@ -76,6 +78,7 @@ public final class WebServiceFeatureList extends AbstractMap, WebServiceFeature> wsfeatures = new HashMap, WebServiceFeature>(); + private boolean isValidating = false; public WebServiceFeatureList() { } @@ -89,7 +92,34 @@ public final class WebServiceFeatureList extends AbstractMap beanClass = fva.bean(); + try { + FeatureListValidator validator = beanClass.newInstance(); + validator.validate(this); + } catch (InstantiationException e) { + throw new WebServiceException(e); + } catch (IllegalAccessException e) { + throw new WebServiceException(e); } } } @@ -98,6 +128,7 @@ public final class WebServiceFeatureList extends AbstractMap annotationFieldValueClass = annotationFieldValue.getClass(); + if (! annotationFieldValueClass.isEnum()) { + return false; + } + final Class[] builderMethodParameterTypes = builderMethod.getParameterTypes(); + if (builderMethodParameterTypes.length != 1) { + throw new WebServiceException("expected only 1 parameter"); + } + final String builderParameterTypeName = builderMethodParameterTypes[0].getName(); + if (! builderParameterTypeName.startsWith("com.oracle.webservices.internal.test.features_annotations_enums.apinew") && + ! builderParameterTypeName.startsWith("com.oracle.webservices.internal.api")) { + return false; + } + return false; + } + public Iterator iterator() { if (parent != null) return new MergedFeatures(parent.getFeatures()); @@ -302,12 +357,21 @@ public final class WebServiceFeatureList extends AbstractMap T getSPI(Class spiType) { + T t = super.getSPI(spiType); + if (t != null) + return t; if (spiType == ResourceLoader.class) { return spiType.cast(loader); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java index 5d476b2c347..aef96b390d0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientSchemaValidationTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java index 39d7c629a1b..07272ff4485 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ClientTransportException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.client; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java index fd9402e476f..07cc3b67f22 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ContentNegotiation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,7 +66,9 @@ public enum ContentNegotiation { try { String value = System.getProperty(PROPERTY); - if (value == null) return none; + if (value == null) { + return none; + } return valueOf(value); } catch (Exception e) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java index 10b8f8cbd21..c861ca18ed3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,7 +54,7 @@ public class HandlerConfiguration { private final List logicalHandlers; private final List soapHandlers; private final List messageHandlers; - private Set handlerKnownHeaders; + private final Set handlerKnownHeaders; /** * @param roles This contains the roles assumed by the Binding implementation. @@ -66,7 +66,7 @@ public class HandlerConfiguration { logicalHandlers = new ArrayList(); soapHandlers = new ArrayList(); messageHandlers = new ArrayList(); - handlerKnownHeaders = new HashSet(); + Set modHandlerKnownHeaders = new HashSet(); for (Handler handler : handlerChain) { if (handler instanceof LogicalHandler) { @@ -75,19 +75,21 @@ public class HandlerConfiguration { soapHandlers.add((SOAPHandler) handler); Set headers = ((SOAPHandler) handler).getHeaders(); if (headers != null) { - handlerKnownHeaders.addAll(headers); + modHandlerKnownHeaders.addAll(headers); } } else if (handler instanceof MessageHandler) { messageHandlers.add((MessageHandler) handler); Set headers = ((MessageHandler) handler).getHeaders(); if (headers != null) { - handlerKnownHeaders.addAll(headers); + modHandlerKnownHeaders.addAll(headers); } }else { throw new HandlerException("handler.not.valid.type", handler.getClass()); } } + + handlerKnownHeaders = Collections.unmodifiableSet(modHandlerKnownHeaders); } /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java index b8d6d930881..fbefb94ddf4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/HandlerConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,12 +81,15 @@ abstract class HandlerConfigurator { this.resolver = resolver; } + @Override void configureHandlers(@NotNull WSPortInfo port, @NotNull BindingImpl binding) { - if(resolver!=null) + if (resolver!=null) { binding.setHandlerChain(resolver.getHandlerChain(port)); + } } + @Override HandlerResolver getResolver() { return resolver; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java index 3b0dca8d490..f1580ba6f6c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/MonitorRootClient.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java index 3ced28e61f5..f5a33971f25 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/PortInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java index 4b77a5b179b..1ad271d1a14 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/RequestContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,17 +25,13 @@ package com.sun.xml.internal.ws.client; +import com.oracle.webservices.internal.api.message.BaseDistributedPropertySet; import com.sun.istack.internal.NotNull; -import com.sun.xml.internal.ws.api.DistributedPropertySet; import com.sun.xml.internal.ws.api.EndpointAddress; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.transport.Headers; import javax.xml.ws.BindingProvider; -import javax.xml.ws.handler.MessageContext; - -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -44,6 +40,10 @@ import java.util.Map.Entry; import java.util.Set; import java.util.logging.Logger; + +import static javax.xml.ws.BindingProvider.*; +import static javax.xml.ws.handler.MessageContext.HTTP_REQUEST_HEADERS; + /** * Request context implementation. * @@ -60,53 +60,31 @@ import java.util.logging.Logger; * then use that computed value during a method invocation again and again. * *

    - * For this goal, we use {@link PropertySet} and implement some properties + * For this goal, we use {@link com.sun.xml.internal.ws.api.PropertySet} and implement some properties * as virtual properties backed by methods. This allows us to do the computation * in the setter, and store it in a field. * *

    * These fields are used by {@link Stub#process} to populate a {@link Packet}. * - * - * *

    How it works?

    *

    - * We make an assumption that a request context is mostly used to just - * get and put values, not really for things like enumerating or size. + * For better performance, we wan't use strongly typed field as much as possible + * to avoid reflection and unnecessary collection iterations; * + * Using {@link com.oracle.webservices.internal.api.message.BasePropertySet.MapView} implementation allows client to use {@link Map} interface + * in a way that all the strongly typed properties are reflected to the fields + * right away. Any additional (extending) properties can be added by client as well; + * those would be processed using iterating the {@link MapView} and their processing, + * of course, would be slower. *

    - * So we start by maintaining state as a combination of {@link #others} - * bag and strongly-typed fields. As long as the application uses - * just {@link Map#put}, {@link Map#get}, and {@link Map#putAll}, we can - * do things in this way. In this mode a {@link Map} we return works as - * a view into {@link RequestContext}, and by itself it maintains no state. - * - *

    - * If {@link RequestContext} is in this mode, its state can be copied - * efficiently into {@link Packet}. - * - *

    - * Once the application uses any other {@link Map} method, we move to - * the "fallback" mode, where the data is actually stored in a {@link HashMap}, - * this is necessary for implementing the map interface contract correctly. - * - *

    - * To be safe, once we fallback, we'll never come back to the efficient state. - * - * - * - *

    Caution

    - *

    - * Once we are in the fallback mode, none of the strongly typed field will - * be used, and they may contain stale values. So the only method - * the code outside this class can safely use is {@link #copy()}, - * {@link #fill(Packet)}, and constructors. Do not access the strongly - * typed fields nor {@link #others} directly. + * The previous implementation with fallback mode has been removed to simplify + * the code and remove the bugs. * * @author Kohsuke Kawaguchi */ @SuppressWarnings({"SuspiciousMethodCalls"}) -public final class RequestContext extends DistributedPropertySet { +public final class RequestContext extends BaseDistributedPropertySet { private static final Logger LOGGER = Logger.getLogger(RequestContext.class.getName()); /** @@ -120,9 +98,11 @@ public final class RequestContext extends DistributedPropertySet { ContentNegotiation.obtainFromSystemProperty(); /** - * Stores properties that don't fit the strongly-typed fields. + * @deprecated */ - private final Map others; + public void addSatellite(@NotNull com.sun.xml.internal.ws.api.PropertySet satellite) { + super.addSatellite(satellite); + } /** * The endpoint address to which this message is sent to. @@ -139,16 +119,17 @@ public final class RequestContext extends DistributedPropertySet { * @deprecated * always access {@link #endpointAddress}. */ - @Property(BindingProvider.ENDPOINT_ADDRESS_PROPERTY) + @Property(ENDPOINT_ADDRESS_PROPERTY) public String getEndPointAddressString() { return endpointAddress != null ? endpointAddress.toString() : null; } public void setEndPointAddressString(String s) { - if(s==null) + if (s == null) { throw new IllegalArgumentException(); - else + } else { this.endpointAddress = EndpointAddress.create(s); + } } public void setEndpointAddress(@NotNull EndpointAddress epa) { @@ -171,9 +152,9 @@ public final class RequestContext extends DistributedPropertySet { } public void setContentNegotiationString(String s) { - if(s==null) + if (s == null) { contentNegotiation = ContentNegotiation.none; - else { + } else { try { contentNegotiation = ContentNegotiation.valueOf(s); } catch (IllegalArgumentException e) { @@ -182,6 +163,7 @@ public final class RequestContext extends DistributedPropertySet { } } } + /** * The value of the SOAPAction header associated with the message. * @@ -209,14 +191,12 @@ public final class RequestContext extends DistributedPropertySet { private String soapAction; - @Property(BindingProvider.SOAPACTION_URI_PROPERTY) - public String getSoapAction(){ + @Property(SOAPACTION_URI_PROPERTY) + public String getSoapAction() { return soapAction; } - public void setSoapAction(String sAction){ - if(sAction == null) { - throw new IllegalArgumentException("SOAPAction value cannot be null"); - } + + public void setSoapAction(String sAction) { soapAction = sAction; } @@ -228,35 +208,34 @@ public final class RequestContext extends DistributedPropertySet { * if it can be sent if it can be obtained by other means such as WSDL binding */ private Boolean soapActionUse; - @Property(BindingProvider.SOAPACTION_USE_PROPERTY) - public Boolean getSoapActionUse(){ + + @Property(SOAPACTION_USE_PROPERTY) + public Boolean getSoapActionUse() { return soapActionUse; } - public void setSoapActionUse(Boolean sActionUse){ + + public void setSoapActionUse(Boolean sActionUse) { soapActionUse = sActionUse; } - /** - * {@link Map} exposed to the user application. - */ - private final MapView mapView = new MapView(); - /** * Creates an empty {@link RequestContext}. */ - /*package*/ RequestContext() { - others = new HashMap(); + RequestContext() { } /** * Copy constructor. */ private RequestContext(RequestContext that) { - others = new HashMap(that.others); - mapView.fallbackMap = that.mapView.fallbackMap != null ? - new HashMap(that.mapView.fallback()) : null; + for (Map.Entry entry : that.asMapLocal().entrySet()) { + if (!propMap.containsKey(entry.getKey())) { + asMap().put(entry.getKey(), entry.getValue()); + } + } endpointAddress = that.endpointAddress; soapAction = that.soapAction; + soapActionUse = that.soapActionUse; contentNegotiation = that.contentNegotiation; that.copySatelliteInto(this); } @@ -264,105 +243,124 @@ public final class RequestContext extends DistributedPropertySet { /** * The efficient get method that reads from {@link RequestContext}. */ + @Override public Object get(Object key) { - if(super.supports(key)) + if(supports(key)) { return super.get(key); - else - return others.get(key); + } else { + // use mapView to get extending property + return asMap().get(key); + } } /** * The efficient put method that updates {@link RequestContext}. */ + @Override public Object put(String key, Object value) { - if(super.supports(key)) - return super.put(key,value); - else - return others.put(key,value); - } - /** - * Gets the {@link Map} view of this request context. - * - * @return - * Always same object. Returned map is live. - */ - public Map getMapView() { - return mapView; + if(supports(key)) { + return super.put(key,value); + } else { + // use mapView to put extending property (if the map allows that) + return asMap().put(key, value); + } } /** * Fill a {@link Packet} with values of this {@link RequestContext}. + * + * @param packet to be filled with context values + * @param isAddressingEnabled flag if addressing enabled (to provide warning if necessary) */ + @SuppressWarnings("unchecked") public void fill(Packet packet, boolean isAddressingEnabled) { - if(mapView.fallbackMap==null) { - if (endpointAddress != null) - packet.endpointAddress = endpointAddress; - packet.contentNegotiation = contentNegotiation; - //JAX-WS-596: Check the semantics of SOAPACTION_USE_PROPERTY before using the SOAPACTION_URI_PROPERTY for - // SoapAction as specified in the javadoc of BindingProvider. The spec seems to be little contradicting with - // javadoc and says that the use property effects the sending of SOAPAction property. - // Since the user has the capability to set the value as "" if needed, implement the javadoc behavior. + // handling as many properties as possible (all in propMap.keySet()) + // to avoid slow Packet.put() + if (endpointAddress != null) { + packet.endpointAddress = endpointAddress; + } + packet.contentNegotiation = contentNegotiation; + fillSOAPAction(packet, isAddressingEnabled); + mergeRequestHeaders(packet); - if ((soapActionUse != null && soapActionUse) || (soapActionUse == null && isAddressingEnabled)) { - if (soapAction != null) { - packet.soapAction = soapAction; + Set handlerScopeNames = new HashSet(); + + copySatelliteInto(packet); + + // extending properties ... + for (String key : asMapLocal().keySet()) { + + //if it is not standard property it defaults to Scope.HANDLER + if (!supportsLocal(key)) { + handlerScopeNames.add(key); + } + + // to avoid slow Packet.put(), handle as small number of props as possible + // => only properties not from RequestContext object + if (!propMap.containsKey(key)) { + Object value = asMapLocal().get(key); + if (packet.supports(key)) { + // very slow operation - try to avoid it! + packet.put(key, value); + } else { + packet.invocationProperties.put(key, value); } } + } - if((!isAddressingEnabled && (soapActionUse == null || !soapActionUse)) && soapAction != null) { - LOGGER.warning("BindingProvider.SOAPACTION_URI_PROPERTY is set in the RequestContext but is ineffective," + - " Either set BindingProvider.SOAPACTION_USE_PROPERTY to true or enable AddressingFeature"); - } + if (!handlerScopeNames.isEmpty()) { + packet.getHandlerScopePropertyNames(false).addAll(handlerScopeNames); + } + } - copySatelliteInto((DistributedPropertySet)packet); - - if(!others.isEmpty()) { - //for bug 12883765 - //retrieve headers which is set in soap message - Headers headerFromPacketProperty = (Headers)packet.invocationProperties.get(MessageContext.HTTP_REQUEST_HEADERS); - //retrieve headers from request context - Map> headerFromOthers =(Map>) others.get(MessageContext.HTTP_REQUEST_HEADERS); - if((headerFromPacketProperty != null) && (headerFromOthers != null) ) { - //update the headers set in soap message with those in request context - for(String key: headerFromOthers.keySet()) { - if(key!=null && key.trim().length()!=0) { - List valueFromPacketProperty = headerFromPacketProperty.get(key); - //if the two headers contain the same key, combine the value - if(valueFromPacketProperty!=null) { - valueFromPacketProperty.addAll(headerFromOthers.get(key)); - }else{ - //add the headers in request context to those set in soap message - headerFromPacketProperty.put(key, headerFromOthers.get(key)); - } - } - } - // update headers in request context with those set in soap message since 'others' may contain other properties.. - others.put(MessageContext.HTTP_REQUEST_HEADERS, headerFromPacketProperty); - } - packet.invocationProperties.putAll(others); - //if it is not standard property it deafults to Scope.HANDLER - packet.getHandlerScopePropertyNames(false).addAll(others.keySet()); - } - } else { - Set handlerScopePropertyNames = new HashSet(); - // fallback mode, simply copy map in a slow way - for (Entry entry : mapView.fallbackMap.entrySet()) { + @SuppressWarnings("unchecked") + private void mergeRequestHeaders(Packet packet) { + //for bug 12883765 + //retrieve headers which is set in soap message + Headers packetHeaders = (Headers) packet.invocationProperties.get(HTTP_REQUEST_HEADERS); + //retrieve headers from request context + Map> myHeaders = (Map>) asMap().get(HTTP_REQUEST_HEADERS); + if ((packetHeaders != null) && (myHeaders != null)) { + //update the headers set in soap message with those in request context + for (Entry> entry : myHeaders.entrySet()) { String key = entry.getKey(); - if(packet.supports(key)) - packet.put(key,entry.getValue()); - else - packet.invocationProperties.put(key,entry.getValue()); - - //if it is not standard property it deafults to Scope.HANDLER - if(!super.supports(key)) { - handlerScopePropertyNames.add(key); + if (key != null && key.trim().length() != 0) { + List listFromPacket = packetHeaders.get(key); + //if the two headers contain the same key, combine the value + if (listFromPacket != null) { + listFromPacket.addAll(entry.getValue()); + } else { + //add the headers in request context to those set in soap message + packetHeaders.put(key, myHeaders.get(key)); + } } } + // update headers in request context with those set in soap message since it may contain other properties.. + asMap().put(HTTP_REQUEST_HEADERS, packetHeaders); + } + } - if(!handlerScopePropertyNames.isEmpty()) - packet.getHandlerScopePropertyNames(false).addAll(handlerScopePropertyNames); + private void fillSOAPAction(Packet packet, boolean isAddressingEnabled) { + final boolean p = packet.packetTakesPriorityOverRequestContext; + final String localSoapAction = p ? packet.soapAction : soapAction; + final Boolean localSoapActionUse = p ? (Boolean) packet.invocationProperties.get(BindingProvider.SOAPACTION_USE_PROPERTY) + : soapActionUse; + + //JAX-WS-596: Check the semantics of SOAPACTION_USE_PROPERTY before using the SOAPACTION_URI_PROPERTY for + // SoapAction as specified in the javadoc of BindingProvider. The spec seems to be little contradicting with + // javadoc and says that the use property effects the sending of SOAPAction property. + // Since the user has the capability to set the value as "" if needed, implement the javadoc behavior. + if ((localSoapActionUse != null && localSoapActionUse) || (localSoapActionUse == null && isAddressingEnabled)) { + if (localSoapAction != null) { + packet.soapAction = localSoapAction; + } + } + + if ((!isAddressingEnabled && (localSoapActionUse == null || !localSoapActionUse)) && localSoapAction != null) { + LOGGER.warning("BindingProvider.SOAPACTION_URI_PROPERTY is set in the RequestContext but is ineffective," + + " Either set BindingProvider.SOAPACTION_USE_PROPERTY to true or enable AddressingFeature"); } } @@ -370,84 +368,15 @@ public final class RequestContext extends DistributedPropertySet { return new RequestContext(this); } - private final class MapView implements Map { - private Map fallbackMap; - - private Map fallback() { - if(fallbackMap==null) { - // has to fall back. fill in fallbackMap - fallbackMap = new HashMap(others); - // then put all known properties - fallbackMap.putAll(createMapView()); - } - return fallbackMap; - } - - public int size() { - return fallback().size(); - } - - public boolean isEmpty() { - return fallback().isEmpty(); - } - - public boolean containsKey(Object key) { - return fallback().containsKey(key); - } - - public boolean containsValue(Object value) { - return fallback().containsValue(value); - } - - public Object get(Object key) { - if (fallbackMap ==null) { - return RequestContext.this.get(key); - } else { - return fallback().get(key); - } - } - - public Object put(String key, Object value) { - if(fallbackMap ==null) - return RequestContext.this.put(key,value); - else - return fallback().put(key, value); - } - - public Object remove(Object key) { - if (fallbackMap ==null) { - return RequestContext.this.remove(key); - } else { - return fallback().remove(key); - } - } - - public void putAll(Map t) { - for (Entry e : t.entrySet()) { - put(e.getKey(),e.getValue()); - } - } - - public void clear() { - fallback().clear(); - } - - public Set keySet() { - return fallback().keySet(); - } - - public Collection values() { - return fallback().values(); - } - - public Set> entrySet() { - return fallback().entrySet(); - } - } - + @Override protected PropertyMap getPropertyMap() { return propMap; } private static final PropertyMap propMap = parse(RequestContext.class); + + @Override + protected boolean mapAllowsAdditionalProperties() { + return true; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java index f5f1098565b..efd932007ba 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java index 548b4167468..16f481f8bc8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/ResponseContextReceiver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java index 3aca36be7a7..5592d5ad07c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SCAnnotations.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,6 @@ import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import java.io.IOException; import java.lang.reflect.Method; -import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; @@ -48,16 +47,16 @@ import java.util.ArrayList; final class SCAnnotations { SCAnnotations(final Class sc) { AccessController.doPrivileged(new PrivilegedAction() { + @Override public Void run() { WebServiceClient wsc =sc.getAnnotation(WebServiceClient.class); - if(wsc==null) + if(wsc==null) { throw new WebServiceException("Service Interface Annotations required, exiting..."); + } - String name = wsc.name(); String tns = wsc.targetNamespace(); - serviceQName = new QName(tns, name); try { - wsdlLocation = JAXWSUtils.getFileOrURL(wsc.wsdlLocation()); + JAXWSUtils.getFileOrURL(wsc.wsdlLocation()); } catch (IOException e) { // TODO: report a reasonable error message throw new WebServiceException(e); @@ -81,8 +80,6 @@ final class SCAnnotations { }); } - QName serviceQName; final ArrayList portQNames = new ArrayList(); final ArrayList classes = new ArrayList(); - URL wsdlLocation; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java index 1a75ebb097d..90ca08e50a2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SEIPortInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,9 +33,6 @@ import com.sun.xml.internal.ws.binding.SOAPBindingImpl; import com.sun.xml.internal.ws.binding.WebServiceFeatureList; import com.sun.xml.internal.ws.model.SOAPSEIModel; -import javax.xml.ws.WebServiceFeature; - - /** * {@link PortInfo} that has {@link SEIModel}. * diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java index 9f9a570776a..51a63ab5fe1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/SenderException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.client; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java index bcdbc8f428a..31bb91fba4b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/Stub.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,30 +30,41 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; import com.sun.xml.internal.ws.addressing.WSEPRExtension; import com.sun.xml.internal.ws.api.BindingID; -import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties; -import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties; -import com.sun.xml.internal.ws.model.wsdl.WSDLProperties; -import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl; import com.sun.xml.internal.ws.api.Component; import com.sun.xml.internal.ws.api.ComponentFeature; import com.sun.xml.internal.ws.api.ComponentFeature.Target; import com.sun.xml.internal.ws.api.ComponentRegistry; +import com.sun.xml.internal.ws.api.ComponentsFeature; import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.WSService; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; import com.sun.xml.internal.ws.api.client.WSPortInfo; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.HeaderList; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.SEIModel; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; -import com.sun.xml.internal.ws.api.pipe.*; +import com.sun.xml.internal.ws.api.pipe.ClientTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.Engine; +import com.sun.xml.internal.ws.api.pipe.Fiber; +import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptorFactory; +import com.sun.xml.internal.ws.api.pipe.SyncStartForAsyncFeature; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.pipe.TubelineAssembler; +import com.sun.xml.internal.ws.api.pipe.TubelineAssemblerFactory; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ContainerResolver; import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.developer.JAXWSProperties; import com.sun.xml.internal.ws.developer.WSBindingProvider; +import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties; import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; +import com.sun.xml.internal.ws.model.wsdl.WSDLPortProperties; +import com.sun.xml.internal.ws.model.wsdl.WSDLProperties; import com.sun.xml.internal.ws.resources.ClientMessages; import com.sun.xml.internal.ws.util.Pool; import com.sun.xml.internal.ws.util.Pool.TubePool; @@ -66,6 +77,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.ws.BindingProvider; import javax.xml.ws.EndpointReference; import javax.xml.ws.RespectBindingFeature; +import javax.xml.ws.Response; import javax.xml.ws.WebServiceException; import javax.xml.ws.http.HTTPBinding; import javax.xml.ws.wsaddressing.W3CEndpointReference; @@ -76,7 +88,9 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.Executor; -import org.xml.sax.InputSource; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.management.ObjectName; /** * Base class for stubs, which accept method invocations from @@ -232,49 +246,64 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver } private Stub(WSServiceDelegate owner, @Nullable Tube master, @Nullable WSPortInfo portInfo, QName portname, BindingImpl binding, @Nullable WSDLPort wsdlPort, EndpointAddress defaultEndPointAddress, @Nullable WSEndpointReference epr) { - this.owner = owner; - this.portInfo = portInfo; - this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null); - this.portname = portname; - if (portname == null) { - if (portInfo != null) - this.portname = portInfo.getPortName(); - else if (wsdlPort != null) - this.portname = wsdlPort.getName(); + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); + try { + this.owner = owner; + this.portInfo = portInfo; + this.wsdlPort = wsdlPort != null ? wsdlPort : (portInfo != null ? portInfo.getPort() : null); + this.portname = portname; + if (portname == null) { + if (portInfo != null) { + this.portname = portInfo.getPortName(); + } else if (wsdlPort != null) { + this.portname = wsdlPort.getName(); + } + } + this.binding = binding; + + ComponentFeature cf = binding.getFeature(ComponentFeature.class); + if (cf != null && Target.STUB.equals(cf.getTarget())) { + components.add(cf.getComponent()); + } + ComponentsFeature csf = binding.getFeature(ComponentsFeature.class); + if (csf != null) { + for (ComponentFeature cfi : csf.getComponentFeatures()) { + if (Target.STUB.equals(cfi.getTarget())) + components.add(cfi.getComponent()); + } + } + + // if there is an EPR, EPR's address should be used for invocation instead of default address + if (epr != null) { + this.requestContext.setEndPointAddressString(epr.getAddress()); + } else { + this.requestContext.setEndpointAddress(defaultEndPointAddress); + } + this.engine = new Engine(getStringId(), owner.getContainer(), owner.getExecutor()); + this.endpointReference = epr; + wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort); + + this.cleanRequestContext = this.requestContext.copy(); + + // ManagedObjectManager MUST be created before the pipeline + // is constructed. + + managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this); + + if (master != null) { + this.tubes = new TubePool(master); + } else { + this.tubes = new TubePool(createPipeline(portInfo, binding)); + } + + addrVersion = binding.getAddressingVersion(); + + // This needs to happen after createPipeline. + // TBD: Check if it needs to happen outside the Stub constructor. + managedObjectManager.resumeJMXRegistration(); + } finally { + ContainerResolver.getDefault().exitContainer(old); } - this.binding = binding; - - ComponentFeature cf = binding.getFeature(ComponentFeature.class); - if (cf != null && Target.STUB.equals(cf.getTarget())) { - components.add(cf.getComponent()); - } - - // if there is an EPR, EPR's address should be used for invocation instead of default address - if (epr != null) - this.requestContext.setEndPointAddressString(epr.getAddress()); - else - this.requestContext.setEndpointAddress(defaultEndPointAddress); - this.engine = new Engine(toString(), owner.getExecutor()); - this.endpointReference = epr; - wsdlProperties = (wsdlPort == null) ? new WSDLDirectProperties(owner.getServiceName(), portname) : new WSDLPortProperties(wsdlPort); - - this.cleanRequestContext = this.requestContext.copy(); - - // ManagedObjectManager MUST be created before the pipeline - // is constructed. - - managedObjectManager = new MonitorRootClient(this).createManagedObjectManager(this); - - if (master != null) - this.tubes = new TubePool(master); - else - this.tubes = new TubePool(createPipeline(portInfo, binding)); - - addrVersion = binding.getAddressingVersion(); - - // This needs to happen after createPipeline. - // TBD: Check if it needs to happen outside the Stub constructor. - managedObjectManager.resumeJMXRegistration(); } /** @@ -293,9 +322,10 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver BindingID bindingId = portInfo.getBindingId(); TubelineAssembler assembler = TubelineAssemblerFactory.create( - Thread.currentThread().getContextClassLoader(), bindingId); - if (assembler == null) - throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n + Thread.currentThread().getContextClassLoader(), bindingId, owner.getContainer()); + if (assembler == null) { + throw new WebServiceException("Unable to process bindingID=" + bindingId); // TODO: i18n + } return assembler.createClient( new ClientTubeAssemblerContext( portInfo.getEndpointAddress(), @@ -328,6 +358,7 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver } } + @Override public WSPortInfo getPortInfo() { return portInfo; } @@ -339,8 +370,9 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver public @Nullable OperationDispatcher getOperationDispatcher() { - if (operationDispatcher == null && wsdlPort != null) + if (operationDispatcher == null && wsdlPort != null) { operationDispatcher = new OperationDispatcher(wsdlPort, binding, null); + } return operationDispatcher; } @@ -403,10 +435,13 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver packet.component = this; configureRequestPacket(packet, requestContext); Pool pool = tubes; - if (pool == null) + if (pool == null) { throw new WebServiceException("close method has already been invoked"); // TODO: i18n + } Fiber fiber = engine.createFiber(); + configureFiber(fiber); + // then send it away! Tube tube = pool.take(); @@ -433,16 +468,20 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver // to make it multi-thread safe we need to first get a stable snapshot Header[] hl = userOutboundHeaders; - if (hl != null) - packet.getMessage().getHeaders().addAll(hl); + if (hl != null) { + MessageHeaders mh = packet.getMessage().getHeaders(); + for (Header h : hl) { + mh.add(h); + } + } requestContext.fill(packet, (binding.getAddressingVersion() != null)); packet.addSatellite(wsdlProperties); if (addrVersion != null) { // populate request WS-Addressing headers - HeaderList headerList = packet.getMessage().getHeaders(); - headerList.fillRequestAddressingHeaders(wsdlPort, binding, packet); + MessageHeaders headerList = packet.getMessage().getHeaders(); + AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet); // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled, @@ -478,30 +517,36 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver configureRequestPacket(request, requestContext); final Pool pool = tubes; - if (pool == null) + if (pool == null) { throw new WebServiceException("close method has already been invoked"); // TODO: i18n + } final Fiber fiber = engine.createFiber(); + configureFiber(fiber); receiver.setCancelable(fiber); // check race condition on cancel - if (receiver.isCancelled()) - return; + if (receiver.isCancelled()) { + return; + } FiberContextSwitchInterceptorFactory fcsif = owner.getSPI(FiberContextSwitchInterceptorFactory.class); - if(fcsif != null) + if (fcsif != null) { fiber.addInterceptor(fcsif.create()); + } // then send it away! final Tube tube = pool.take(); Fiber.CompletionCallback fiberCallback = new Fiber.CompletionCallback() { + @Override public void onCompletion(@NotNull Packet response) { pool.recycle(tube); completionCallback.onCompletion(response); } + @Override public void onCompletion(@NotNull Throwable error) { // let's not reuse tubes as they might be in a wrong state, so not // calling pool.recycle() @@ -516,51 +561,79 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver !requestContext.containsKey(PREVENT_SYNC_START_FOR_ASYNC_INVOKE)); } + protected void configureFiber(Fiber fiber) { + // no-op in the base class, but can be used by derived classes to configure the Fiber prior + // to invocation + } + + private static final Logger monitoringLogger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".monitoring"); + + @Override public void close() { - if (tubes != null) { + TubePool tp = (TubePool) tubes; + if (tp != null) { // multi-thread safety of 'close' needs to be considered more carefully. // some calls might be pending while this method is invoked. Should we // block until they are complete, or should we abort them (but how?) - Tube p = tubes.take(); - tubes = null; + Tube p = tp.takeMaster(); p.preDestroy(); + tubes = null; } - if (managedObjectManagerClosed) { - return; - } else { - com.sun.xml.internal.ws.server.MonitorBase.closeMOM(managedObjectManager); + if (!managedObjectManagerClosed) { + try { + final ObjectName name = managedObjectManager.getObjectName(managedObjectManager.getRoot()); + // The name is null when the MOM is a NOOP. + if (name != null) { + monitoringLogger.log(Level.INFO, "Closing Metro monitoring root: {0}", name); + } + managedObjectManager.close(); + } catch (java.io.IOException e) { + monitoringLogger.log(Level.WARNING, "Ignoring error when closing Managed Object Manager", e); + } managedObjectManagerClosed = true; } - } + @Override public final WSBinding getBinding() { return binding; } + @Override public final Map getRequestContext() { - return requestContext.getMapView(); + return requestContext.asMap(); } public void resetRequestContext() { requestContext = cleanRequestContext.copy(); } + @Override public final ResponseContext getResponseContext() { return responseContext; } + @Override public void setResponseContext(ResponseContext rc) { this.responseContext = rc; } - public String toString() { + private String getStringId() { return RuntimeVersion.VERSION + ": Stub for " + getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); } + @Override + public String toString() { + return getStringId(); + } + + @Override public final WSEndpointReference getWSEndpointReference() { - if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) - throw new java.lang.UnsupportedOperationException(ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference(Class class)", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding")); + if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) { + throw new java.lang.UnsupportedOperationException( + ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference(Class class)", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding") + ); + } if (endpointReference != null) { return endpointReference; @@ -596,18 +669,23 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver } + @Override public final W3CEndpointReference getEndpointReference() { - if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) - throw new java.lang.UnsupportedOperationException(ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference()", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding")); + if (binding.getBindingID().equals(HTTPBinding.HTTP_BINDING)) { + throw new java.lang.UnsupportedOperationException( + ClientMessages.UNSUPPORTED_OPERATION("BindingProvider.getEndpointReference()", "XML/HTTP Binding", "SOAP11 or SOAP12 Binding")); + } return getEndpointReference(W3CEndpointReference.class); } + @Override public final T getEndpointReference(Class clazz) { return getWSEndpointReference().toSpec(clazz); } public @NotNull + @Override ManagedObjectManager getManagedObjectManager() { return managedObjectManager; } @@ -617,25 +695,29 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver // WSBindingProvider methods // // + @Override public final void setOutboundHeaders(List
    headers) { if (headers == null) { this.userOutboundHeaders = null; } else { for (Header h : headers) { - if (h == null) + if (h == null) { throw new IllegalArgumentException(); + } } userOutboundHeaders = headers.toArray(new Header[headers.size()]); } } + @Override public final void setOutboundHeaders(Header... headers) { if (headers == null) { this.userOutboundHeaders = null; } else { for (Header h : headers) { - if (h == null) + if (h == null) { throw new IllegalArgumentException(); + } } Header[] hl = new Header[headers.length]; System.arraycopy(headers, 0, hl, 0, headers.length); @@ -643,24 +725,29 @@ public abstract class Stub implements WSBindingProvider, ResponseContextReceiver } } + @Override public final List
    getInboundHeaders() { - return Collections.unmodifiableList((HeaderList) - responseContext.get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY)); + return Collections.unmodifiableList(((MessageHeaders) + responseContext.get(JAXWSProperties.INBOUND_HEADER_LIST_PROPERTY)).asList()); } + @Override public final void setAddress(String address) { requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address); } + @Override public S getSPI(Class spiType) { for (Component c : components) { S s = c.getSPI(spiType); - if (s != null) + if (s != null) { return s; + } } return owner.getSPI(spiType); } + @Override public Set getComponents() { return components; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java index 6841b0fd648..a4567fbe643 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/WSServiceDelegate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,18 +30,19 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.Closeable; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.ComponentFeature; +import com.sun.xml.internal.ws.api.ComponentsFeature; import com.sun.xml.internal.ws.api.ComponentFeature.Target; import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.WSService; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; import com.sun.xml.internal.ws.api.client.ServiceInterceptor; import com.sun.xml.internal.ws.api.client.ServiceInterceptorFactory; -import com.sun.xml.internal.ws.api.databinding.DatabindingFactory; import com.sun.xml.internal.ws.api.databinding.DatabindingConfig; +import com.sun.xml.internal.ws.api.databinding.DatabindingFactory; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; import com.sun.xml.internal.ws.api.model.SEIModel; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; -import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; -import com.sun.xml.internal.ws.api.pipe.*; +import com.sun.xml.internal.ws.api.pipe.Stubs; import com.sun.xml.internal.ws.api.server.Container; import com.sun.xml.internal.ws.api.server.ContainerResolver; import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; @@ -50,9 +51,10 @@ import com.sun.xml.internal.ws.binding.WebServiceFeatureList; import com.sun.xml.internal.ws.client.HandlerConfigurator.AnnotationConfigurator; import com.sun.xml.internal.ws.client.HandlerConfigurator.HandlerResolverImpl; import com.sun.xml.internal.ws.client.sei.SEIStub; + import com.sun.xml.internal.ws.developer.MemberSubmissionAddressingFeature; -import com.sun.xml.internal.ws.developer.WSBindingProvider; import com.sun.xml.internal.ws.developer.UsesJAXBContextFeature; +import com.sun.xml.internal.ws.developer.WSBindingProvider; import com.sun.xml.internal.ws.model.RuntimeModeler; import com.sun.xml.internal.ws.model.SOAPSEIModel; import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; @@ -64,9 +66,7 @@ import com.sun.xml.internal.ws.resources.ProviderApiMessages; import com.sun.xml.internal.ws.util.JAXWSUtils; import com.sun.xml.internal.ws.util.ServiceConfigurationError; import com.sun.xml.internal.ws.util.ServiceFinder; -import static com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver; import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; - import org.xml.sax.EntityResolver; import org.xml.sax.SAXException; @@ -77,7 +77,13 @@ import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; -import javax.xml.ws.*; +import javax.xml.ws.BindingProvider; +import javax.xml.ws.Dispatch; +import javax.xml.ws.EndpointReference; +import javax.xml.ws.Service; +import javax.xml.ws.WebServiceClient; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; import javax.xml.ws.handler.HandlerResolver; import javax.xml.ws.soap.AddressingFeature; import java.io.IOException; @@ -87,10 +93,17 @@ import java.net.MalformedURLException; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.*; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; import java.util.concurrent.Executor; import java.util.concurrent.ThreadFactory; +import static com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver; + /** * Service objects provide the client view of a Web service. * @@ -177,6 +190,10 @@ public class WSServiceDelegate extends WSService { public WSServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass, WebServiceFeature... features) { + this(wsdlDocumentLocation, serviceName, serviceClass, new WebServiceFeatureList(features)); + } + + protected WSServiceDelegate(URL wsdlDocumentLocation, QName serviceName, Class serviceClass, WebServiceFeatureList features) { this( wsdlDocumentLocation==null ? null : new StreamSource(wsdlDocumentLocation.toExternalForm()), serviceName,serviceClass, features); @@ -187,6 +204,14 @@ public class WSServiceDelegate extends WSService { * Either {@link Service}.class or other generated service-derived classes. */ public WSServiceDelegate(@Nullable Source wsdl, @NotNull QName serviceName, @NotNull final Class serviceClass, WebServiceFeature... features) { + this(wsdl, serviceName, serviceClass, new WebServiceFeatureList(features)); + } + + /** + * @param serviceClass + * Either {@link Service}.class or other generated service-derived classes. + */ + protected WSServiceDelegate(@Nullable Source wsdl, @NotNull QName serviceName, @NotNull final Class serviceClass, WebServiceFeatureList features) { this(wsdl, null, serviceName, serviceClass, features); } @@ -195,15 +220,26 @@ public class WSServiceDelegate extends WSService { * Either {@link Service}.class or other generated service-derived classes. */ public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class serviceClass, WebServiceFeature... features) { - //we cant create a Service without serviceName - if (serviceName == null) - throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME_NULL(serviceName)); + this(wsdl, service, serviceName, serviceClass, new WebServiceFeatureList(features)); + } - this.features = new WebServiceFeatureList(features); + /** + * @param serviceClass + * Either {@link Service}.class or other generated service-derived classes. + */ + public WSServiceDelegate(@Nullable Source wsdl, @Nullable WSDLServiceImpl service, @NotNull QName serviceName, @NotNull final Class serviceClass, WebServiceFeatureList features) { + //we cant create a Service without serviceName + if (serviceName == null) { + throw new WebServiceException(ClientMessages.INVALID_SERVICE_NAME_NULL(null)); + } + + this.features = features; InitParams initParams = INIT_PARAMS.get(); INIT_PARAMS.set(null); // mark it as consumed - if(initParams==null) initParams = EMPTY_PARAMS; + if(initParams==null) { + initParams = EMPTY_PARAMS; + } this.serviceName = serviceName; this.serviceClass = serviceClass; @@ -221,10 +257,26 @@ public class WSServiceDelegate extends WSService { break; case CONTAINER: this.container.getComponents().add(cf.getComponent()); + break; default: throw new IllegalArgumentException(); } } + ComponentsFeature csf = this.features.get(ComponentsFeature.class); + if (csf != null) { + for (ComponentFeature cfi : csf.getComponentFeatures()) { + switch(cfi.getTarget()) { + case SERVICE: + getComponents().add(cfi.getComponent()); + break; + case CONTAINER: + this.container.getComponents().add(cfi.getComponent()); + break; + default: + throw new IllegalArgumentException(); + } + } + } // load interceptor ServiceInterceptor interceptor = ServiceInterceptorFactory.load(this, Thread.currentThread().getContextClassLoader()); @@ -354,10 +406,11 @@ public class WSServiceDelegate extends WSService { public T getPort(WSEndpointReference wsepr, Class portInterface, WebServiceFeature... features) { //get the portType from SEI, so that it can be used if EPR does n't have endpointName - QName portTypeName = RuntimeModeler.getPortTypeName(portInterface); + WebServiceFeatureList featureList = new WebServiceFeatureList(features); + QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(featureList, portInterface.getClassLoader())); //if port name is not specified in EPR, it will use portTypeName to get it from the WSDL model. QName portName = getPortNameFromEPR(wsepr, portTypeName); - return getPort(wsepr,portName,portInterface,new WebServiceFeatureList(features)); + return getPort(wsepr,portName,portInterface, featureList); } protected T getPort(WSEndpointReference wsepr, QName portName, Class portInterface, @@ -366,29 +419,38 @@ public class WSServiceDelegate extends WSService { if (cf != null && !Target.STUB.equals(cf.getTarget())) { throw new IllegalArgumentException(); } + ComponentsFeature csf = features.get(ComponentsFeature.class); + if (csf != null) { + for (ComponentFeature cfi : csf.getComponentFeatures()) { + if (!Target.STUB.equals(cfi.getTarget())) + throw new IllegalArgumentException(); + } + } features.addAll(this.features); SEIPortInfo spi = addSEI(portName, portInterface, features); return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi); } + @Override public T getPort(Class portInterface, WebServiceFeature... features) { //get the portType from SEI - QName portTypeName = RuntimeModeler.getPortTypeName(portInterface); - WSDLServiceImpl wsdlService = this.wsdlService; - if(wsdlService == null) { + QName portTypeName = RuntimeModeler.getPortTypeName(portInterface, getMetadadaReader(new WebServiceFeatureList(features), portInterface.getClassLoader())); + WSDLServiceImpl tmpWsdlService = this.wsdlService; + if (tmpWsdlService == null) { // assigning it to local variable and not setting it back to this.wsdlService intentionally // as we don't want to include the service instance with information gathered from sei - wsdlService = getWSDLModelfromSEI(portInterface); + tmpWsdlService = getWSDLModelfromSEI(portInterface); //still null? throw error need wsdl metadata to create a proxy - if(wsdlService == null) { + if(tmpWsdlService == null) { throw new WebServiceException(ProviderApiMessages.NO_WSDL_NO_PORT(portInterface.getName())); } } //get the first port corresponding to the SEI - WSDLPortImpl port = wsdlService.getMatchingPort(portTypeName); - if (port == null) - throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); + WSDLPortImpl port = tmpWsdlService.getMatchingPort(portTypeName); + if (port == null) { + throw new WebServiceException(ClientMessages.UNDEFINED_PORT_TYPE(portTypeName)); + } QName portName = port.getName(); return getPort(portName, portInterface,features); } @@ -424,6 +486,13 @@ public class WSServiceDelegate extends WSService { if (cf != null && !Target.STUB.equals(cf.getTarget())) { throw new IllegalArgumentException(); } + ComponentsFeature csf = features.get(ComponentsFeature.class); + if (csf != null) { + for (ComponentFeature cfi : csf.getComponentFeatures()) { + if (!Target.STUB.equals(cfi.getTarget())) + throw new IllegalArgumentException(); + } + } features.addAll(this.features); BindingImpl binding = port.createBinding(features, null, null); @@ -507,6 +576,13 @@ public class WSServiceDelegate extends WSService { if (cf != null && !Target.STUB.equals(cf.getTarget())) { throw new IllegalArgumentException(); } + ComponentsFeature csf = features.get(ComponentsFeature.class); + if (csf != null) { + for (ComponentFeature cfi : csf.getComponentFeatures()) { + if (!Target.STUB.equals(cfi.getTarget())) + throw new IllegalArgumentException(); + } + } features.addAll(this.features); BindingImpl binding = port.createBinding(features, null, null); @@ -664,6 +740,7 @@ public class WSServiceDelegate extends WSService { return ports.keySet().iterator(); } + @Override public URL getWSDLDocumentLocation() { if(wsdlService==null) return null; try { @@ -676,8 +753,9 @@ public class WSServiceDelegate extends WSService { private T createEndpointIFBaseProxy(@Nullable WSEndpointReference epr,QName portName, Class portInterface, WebServiceFeatureList webServiceFeatures, SEIPortInfo eif) { //fail if service doesnt have WSDL - if (wsdlService == null) + if (wsdlService == null) { throw new WebServiceException(ClientMessages.INVALID_SERVICE_NO_WSDL(serviceName)); + } if (wsdlService.get(portName)==null) { throw new WebServiceException( @@ -706,7 +784,6 @@ public class WSServiceDelegate extends WSService { } protected InvocationHandler getStubHandler(BindingImpl binding, SEIPortInfo eif, @Nullable WSEndpointReference epr) { - SEIPortInfo spi = (SEIPortInfo) eif; return new SEIStub(eif, binding, eif.model, epr); } @@ -715,8 +792,9 @@ public class WSServiceDelegate extends WSService { */ private StringBuilder buildWsdlPortNames() { Set wsdlPortNames = new HashSet(); - for (WSDLPortImpl port : wsdlService.getPorts()) + for (WSDLPortImpl port : wsdlService.getPorts()) { wsdlPortNames.add(port.getName()); + } return buildNameList(wsdlPortNames); } @@ -764,11 +842,24 @@ public class WSServiceDelegate extends WSService { config.setClassLoader(portInterface.getClassLoader()); config.getMappingInfo().setPortName(portName); + // if ExternalMetadataFeature present, ExternalMetadataReader will be created ... + config.setMetadataReader(getMetadadaReader(features, portInterface.getClassLoader())); + com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config); return rt.getModel(); } + private MetadataReader getMetadadaReader(WebServiceFeatureList features, ClassLoader classLoader) { + if (features == null) return null; + com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature ef = + features.get(com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature.class); + // TODO-Miran: would it be necessary to disable secure xml processing? + if (ef != null) + return ef.getMetadataReader(classLoader, false); + return null; + } + private SEIPortInfo createSEIPortInfo(QName portName, Class portInterface, WebServiceFeatureList features) { WSDLPortImpl wsdlPort = getPortModel(wsdlService, portName); SEIModel model = buildRuntimeModel(serviceName, portName, portInterface, wsdlPort, features); @@ -784,7 +875,8 @@ public class WSServiceDelegate extends WSService { return wsdlService; } - class DaemonThreadFactory implements ThreadFactory { + static class DaemonThreadFactory implements ThreadFactory { + @Override public Thread newThread(Runnable r) { Thread daemonThread = new Thread(r); daemonThread.setDaemon(Boolean.TRUE); @@ -800,26 +892,53 @@ public class WSServiceDelegate extends WSService { return new DelegatingLoader(loader1, loader2); } - private static final class DelegatingLoader - extends ClassLoader - { - private final ClassLoader loader; + private static final class DelegatingLoader extends ClassLoader { + private final ClassLoader loader; - DelegatingLoader(ClassLoader loader1, ClassLoader loader2) - { - super(loader2); - this.loader = loader1; - } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((loader == null) ? 0 : loader.hashCode()); + result = prime * result + + ((getParent() == null) ? 0 : getParent().hashCode()); + return result; + } - protected Class findClass(String name) - throws ClassNotFoundException - { - return loader.loadClass(name); - } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + DelegatingLoader other = (DelegatingLoader) obj; + if (loader == null) { + if (other.loader != null) + return false; + } else if (!loader.equals(other.loader)) + return false; + if (getParent() == null) { + if (other.getParent() != null) + return false; + } else if (!getParent().equals(other.getParent())) + return false; + return true; + } - protected URL findResource(String name) - { - return loader.getResource(name); - } + DelegatingLoader(ClassLoader loader1, ClassLoader loader2) { + super(loader2); + this.loader = loader1; + } + + protected Class findClass(String name) throws ClassNotFoundException { + return loader.loadClass(name); + } + + protected URL findResource(String name) { + return loader.getResource(name); + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java index cc79547b3b8..09fae5054df 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DataSourceDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,7 +70,7 @@ public class DataSourceDispatch extends DispatchImpl { } DataSource toReturnValue(Packet response) { - Message message = response.getMessage(); + Message message = response.getInternalMessage(); return (message instanceof MessageDataSource) ? ((MessageDataSource)message).getDataSource() : XMLMessage.getDataSource(message, binding.getFeatures()); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java index 3ec8f247e07..72e130a37f7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/DispatchImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,13 +33,15 @@ import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; import com.sun.xml.internal.ws.api.client.WSPortInfo; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Attachment; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.Fiber; import com.sun.xml.internal.ws.api.pipe.Tube; -import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ContainerResolver; import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.client.*; import com.sun.xml.internal.ws.encoding.soap.DeserializationException; @@ -63,8 +65,6 @@ import javax.xml.ws.handler.MessageContext; import javax.xml.ws.http.HTTPBinding; import javax.xml.ws.soap.SOAPBinding; import javax.xml.ws.soap.SOAPFaultException; -import javax.xml.ws.WebServiceClient; -import javax.xml.ws.WebEndpoint; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; @@ -74,11 +74,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Callable; -import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; -import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; @@ -152,9 +148,8 @@ public abstract class DispatchImpl extends Stub implements Dispatch { } /** * - * @param port dispatch instance is associated with this wsdl port qName + * @param portportInfo dispatch instance is associated with this wsdl port qName * @param mode Service.mode associated with this Dispatch instance - Service.mode.MESSAGE or Service.mode.PAYLOAD - * @param owner Service that created the Dispatch * @param pipe Master pipe for the pipeline * @param binding Binding of this Dispatch instance, current one of SOAP/HTTP or XML/HTTP * @param allowFaultResponseMsg A packet containing a SOAP fault message is allowed as the response to a request on this dispatch instance. @@ -180,14 +175,19 @@ public abstract class DispatchImpl extends Stub implements Dispatch { abstract T toReturnValue(Packet response); public final Response invokeAsync(T param) { - if (LOGGER.isLoggable(Level.FINE)) { - dumpParam(param, "invokeAsync(T)"); + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); + try { + if (LOGGER.isLoggable(Level.FINE)) { + dumpParam(param, "invokeAsync(T)"); + } + AsyncInvoker invoker = new DispatchAsyncInvoker(param); + AsyncResponseImpl ft = new AsyncResponseImpl(invoker,null); + invoker.setReceiver(ft); + ft.run(); + return ft; + } finally { + ContainerResolver.getDefault().exitContainer(old); } - AsyncInvoker invoker = new DispatchAsyncInvoker(param); - AsyncResponseImpl ft = new AsyncResponseImpl(invoker,null); - invoker.setReceiver(ft); - ft.run(); - return ft; } private void dumpParam(T param, String method) { @@ -201,10 +201,10 @@ public abstract class DispatchImpl extends Stub implements Dispatch { SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion(); action = av != null && message.getMessage() != null ? - message.getMessage().getHeaders().getAction(av, sv) : null; + AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null; msgId = av != null && message.getMessage() != null ? - message.getMessage().getHeaders().getMessageID(av, sv) : null; + AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null; LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage()); if (message.getMessage() == null) { @@ -214,16 +214,21 @@ public abstract class DispatchImpl extends Stub implements Dispatch { } } public final Future invokeAsync(T param, AsyncHandler asyncHandler) { - if (LOGGER.isLoggable(Level.FINE)) { - dumpParam(param, "invokeAsync(T, AsyncHandler)"); - } - AsyncInvoker invoker = new DispatchAsyncInvoker(param); - AsyncResponseImpl ft = new AsyncResponseImpl(invoker,asyncHandler); - invoker.setReceiver(ft); - invoker.setNonNullAsyncHandlerGiven(asyncHandler != null); + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); + try { + if (LOGGER.isLoggable(Level.FINE)) { + dumpParam(param, "invokeAsync(T, AsyncHandler)"); + } + AsyncInvoker invoker = new DispatchAsyncInvoker(param); + AsyncResponseImpl ft = new AsyncResponseImpl(invoker,asyncHandler); + invoker.setReceiver(ft); + invoker.setNonNullAsyncHandlerGiven(asyncHandler != null); - ft.run(); - return ft; + ft.run(); + return ft; + } finally { + ContainerResolver.getDefault().exitContainer(old); + } } /** @@ -239,6 +244,7 @@ public abstract class DispatchImpl extends Stub implements Dispatch { checkNullAllowed(in, rc, binding, mode); Packet message = createPacket(in); + message.setState(Packet.State.ClientRequest); resolveEndpointAddress(message, rc); setProperties(message,true); response = process(message,rc,receiver); @@ -274,32 +280,43 @@ public abstract class DispatchImpl extends Stub implements Dispatch { } public final T invoke(T in) { - if (LOGGER.isLoggable(Level.FINE)) { - dumpParam(in, "invoke(T)"); - } + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); + try { + if (LOGGER.isLoggable(Level.FINE)) { + dumpParam(in, "invoke(T)"); + } - return doInvoke(in,requestContext,this); + return doInvoke(in,requestContext,this); + } finally { + ContainerResolver.getDefault().exitContainer(old); + } } public final void invokeOneWay(T in) { - if (LOGGER.isLoggable(Level.FINE)) { - dumpParam(in, "invokeOneWay(T)"); - } - + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); try { - checkNullAllowed(in, requestContext, binding, mode); + if (LOGGER.isLoggable(Level.FINE)) { + dumpParam(in, "invokeOneWay(T)"); + } - Packet request = createPacket(in); - setProperties(request,false); - Packet response = process(request,requestContext,this); - } catch(WebServiceException e){ - //it could be a WebServiceException or a ProtocolException - throw e; - } catch(Throwable e){ - // it could be a RuntimeException resulting due to some internal bug or - // its some other exception resulting from user error, wrap it in - // WebServiceException - throw new WebServiceException(e); + try { + checkNullAllowed(in, requestContext, binding, mode); + + Packet request = createPacket(in); + request.setState(Packet.State.ClientRequest); + setProperties(request,false); + process(request,requestContext,this); + } catch(WebServiceException e){ + //it could be a WebServiceException or a ProtocolException + throw e; + } catch(Throwable e){ + // it could be a RuntimeException resulting due to some internal bug or + // its some other exception resulting from user error, wrap it in + // WebServiceException + throw new WebServiceException(e); + } + } finally { + ContainerResolver.getDefault().exitContainer(old); } } @@ -358,36 +375,54 @@ public abstract class DispatchImpl extends Stub implements Dispatch { return portname; } - void resolveEndpointAddress(@NotNull Packet message, @NotNull RequestContext requestContext) { + void resolveEndpointAddress(@NotNull final Packet message, @NotNull final RequestContext requestContext) { + final boolean p = message.packetTakesPriorityOverRequestContext; + //resolve endpoint look for query parameters, pathInfo - String endpoint = (String) requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); + String endpoint; + if (p && message.endpointAddress != null) { + endpoint = message.endpointAddress.toString(); + } else { + endpoint = (String) requestContext.get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY); + } + // This is existing before packetTakesPriorityOverRequestContext so leaving in place. if (endpoint == null) endpoint = message.endpointAddress.toString(); String pathInfo = null; String queryString = null; - if (requestContext.get(MessageContext.PATH_INFO) != null) + if (p && message.invocationProperties.get(MessageContext.PATH_INFO) != null) { + pathInfo = (String) message.invocationProperties.get(MessageContext.PATH_INFO); + } else if (requestContext.get(MessageContext.PATH_INFO) != null) { pathInfo = (String) requestContext.get(MessageContext.PATH_INFO); + } - if (requestContext.get(MessageContext.QUERY_STRING) != null) + if (p && message.invocationProperties.get(MessageContext.QUERY_STRING) != null) { + queryString = (String) message.invocationProperties.get(MessageContext.QUERY_STRING); + } else if (requestContext.get(MessageContext.QUERY_STRING) != null) { queryString = (String) requestContext.get(MessageContext.QUERY_STRING); + } - - String resolvedEndpoint = null; if (pathInfo != null || queryString != null) { pathInfo = checkPath(pathInfo); queryString = checkQuery(queryString); if (endpoint != null) { try { final URI endpointURI = new URI(endpoint); - resolvedEndpoint = resolveURI(endpointURI, pathInfo, queryString); + endpoint = resolveURI(endpointURI, pathInfo, queryString); } catch (URISyntaxException e) { throw new WebServiceException(DispatchMessages.INVALID_URI(endpoint)); } } - requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, resolvedEndpoint); - //message.endpointAddress = EndpointAddress.create(resolvedEndpoint); } + // These two lines used to be inside the above if. It is outside so: + // - in cases where there is no setting of address on a Packet before invocation or no pathInfo/queryString + // this will just put back what it found in the requestContext - basically a noop. + // - but when info is in the Packet this will update so it will get used later. + // Remember - we are operating on a copied RequestContext at this point - not the sticky one in the Stub. + requestContext.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endpoint); + // This is not necessary because a later step will copy the resolvedEndpoint put above into message. + //message.endpointAddress = EndpointAddress.create(endpoint); } protected @NotNull String resolveURI(@NotNull URI endpointURI, @Nullable String pathInfo, @Nullable String queryString) { @@ -521,6 +556,7 @@ public abstract class DispatchImpl extends Stub implements Dispatch { public void do_run () { checkNullAllowed(param, rc, binding, mode); final Packet message = createPacket(param); + message.setState(Packet.State.ClientRequest); message.nonNullAsyncHandlerGiven = this.nonNullAsyncHandlerGiven; resolveEndpointAddress(message, rc); setProperties(message,true); @@ -532,10 +568,10 @@ public abstract class DispatchImpl extends Stub implements Dispatch { SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion(); action = av != null && message.getMessage() != null ? - message.getMessage().getHeaders().getAction(av, sv) : null; + AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null; msgId = av != null&& message.getMessage() != null ? - message.getMessage().getHeaders().getMessageID(av, sv) : null; + AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null; LOGGER.fine("In DispatchAsyncInvoker.do_run for async message with action: " + action + " and msg ID: " + msgId); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java index 2e355d88cd7..8821a41a47c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/JAXBDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java index adfe2613661..f226b938788 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/MessageDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java index b33b168bca3..e2e17e1f9c8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/PacketDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,10 @@ package com.sun.xml.internal.ws.client.dispatch; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; +import com.sun.xml.internal.ws.api.client.ThrowableInPacketCompletionFeature; import com.sun.xml.internal.ws.api.client.WSPortInfo; import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.pipe.Fiber; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.client.WSServiceDelegate; @@ -43,10 +45,12 @@ import javax.xml.ws.Service.Mode; * @since 2.2.6 */ public class PacketDispatch extends DispatchImpl { + private final boolean isDeliverThrowableInPacket; @Deprecated public PacketDispatch(QName port, WSServiceDelegate owner, Tube pipe, BindingImpl binding, @Nullable WSEndpointReference epr) { super(port, Mode.MESSAGE, owner, pipe, binding, epr); + isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding); } @@ -56,10 +60,21 @@ public class PacketDispatch extends DispatchImpl { public PacketDispatch(WSPortInfo portInfo, Tube pipe, BindingImpl binding, WSEndpointReference epr, boolean allowFaultResponseMsg) { super(portInfo, Mode.MESSAGE, pipe, binding, epr, allowFaultResponseMsg); + isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding); } public PacketDispatch(WSPortInfo portInfo, BindingImpl binding, WSEndpointReference epr) { super(portInfo, Mode.MESSAGE, binding, epr, true); + isDeliverThrowableInPacket = calculateIsDeliverThrowableInPacket(binding); + } + + private boolean calculateIsDeliverThrowableInPacket(BindingImpl binding) { + return binding.isFeatureEnabled(ThrowableInPacketCompletionFeature.class); + } + + @Override + protected void configureFiber(Fiber fiber) { + fiber.setDeliverThrowableInPacket(isDeliverThrowableInPacket); } @Override diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java index 86fa632d87b..a532cb6e844 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/RESTSourceDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java index 1b0a933b634..3dc0842fc65 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPMessageDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java index 39644be0feb..14886439fae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/dispatch/SOAPSourceDispatch.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java index a563eae2c96..2df6fd5bc8c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java index af4ebb0511a..24119c4a588 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/AsyncMethodHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,30 +27,21 @@ package com.sun.xml.internal.ws.client.sei; //import com.sun.tools.internal.ws.wsdl.document.soap.SOAPBinding; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.api.databinding.ClientCallBridge; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.Fiber; -import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor; import com.sun.xml.internal.ws.client.AsyncInvoker; import com.sun.xml.internal.ws.client.AsyncResponseImpl; import com.sun.xml.internal.ws.client.RequestContext; import com.sun.xml.internal.ws.client.ResponseContext; -import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; -import com.sun.xml.internal.ws.model.JavaMethodImpl; -import com.sun.xml.internal.ws.model.ParameterImpl; -import com.sun.xml.internal.ws.model.WrapperParameter; -import com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo; -import javax.jws.soap.SOAPBinding.Style; import javax.xml.ws.AsyncHandler; import javax.xml.ws.Response; import javax.xml.ws.WebServiceException; import java.lang.reflect.Method; -import java.util.List; /** * Common part between {@link CallbackMethodHandler} and {@link PollingMethodHandler}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java index 42accf31561..7e8a5b22b46 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/BodyBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -140,11 +140,20 @@ abstract class BodyBuilder { */ protected final ValueGetter[] getters; + /** + * How does each wrapped parameter binds to XML? + */ + protected XMLBridge[] parameterBridges; + + /** + * List of Parameters packed in the body. + * Only used for error diagnostics. + */ + protected List children; + protected Wrapped(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) { super(wp.getXMLBridge(), soapVersion); - - List children = wp.getWrapperChildren(); - + children = wp.getWrapperChildren(); indices = new int[children.size()]; getters = new ValueGetter[children.size()]; for( int i=0; i=0; i-- ) { + Object arg = getters[i].get(methodArgs[indices[i]]); + if(arg==null) { + throw new WebServiceException("Method Parameter: "+ + children.get(i).getName()+" cannot be null. This is BP 1.1 R2211 violation."); + } + cs.values[i] = arg; + } + + return cs; + } } /** @@ -174,6 +204,7 @@ abstract class BodyBuilder { * Needed to get wrapper instantiation method. */ private BindingContext bindingContext; + private boolean dynamicWrapper; /** * Creates a {@link BodyBuilder} from a {@link WrapperParameter}. @@ -181,21 +212,24 @@ abstract class BodyBuilder { DocLit(WrapperParameter wp, SOAPVersion soapVersion, ValueGetterFactory getter) { super(wp, soapVersion, getter); bindingContext = wp.getOwner().getBindingContext(); - wrapper = (Class)wp.getXMLBridge().getTypeInfo().type; - - List children = wp.getWrapperChildren(); - + dynamicWrapper = WrapperComposite.class.equals(wrapper); + parameterBridges = new XMLBridge[children.size()]; accessors = new PropertyAccessor[children.size()]; for( int i=0; i children; /** * Creates a {@link BodyBuilder} from a {@link WrapperParameter}. @@ -261,32 +286,13 @@ abstract class BodyBuilder { // we'll use CompositeStructure to pack requests assert wp.getTypeInfo().type==WrapperComposite.class; - this.children = wp.getWrapperChildren(); - parameterBridges = new XMLBridge[children.size()]; for( int i=0; i=0; i-- ) { - Object arg = getters[i].get(methodArgs[indices[i]]); - if(arg==null) { - throw new WebServiceException("Method Parameter: "+ - children.get(i).getName()+" cannot be null. This is BP 1.1 R2211 violation."); - } - cs.values[i] = arg; - } - - return cs; + Object build(Object[] methodArgs) { + return buildWrapperComposite(methodArgs); } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java index 017dadc4e1b..552254094ab 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/CallbackMethodHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java index f674d0e9d8b..c8d58cde1ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MessageFiller.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java index 6f5151cc0a4..60023329221 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/MethodHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java index 023664de246..8d295ee1d3e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/PollingMethodHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java index 6389bce9f61..a233f741301 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ResponseBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl; import com.sun.xml.internal.ws.model.ParameterImpl; import com.sun.xml.internal.ws.model.WrapperParameter; import com.sun.xml.internal.ws.resources.ServerMessages; +import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge; import com.sun.xml.internal.ws.spi.db.XMLBridge; import com.sun.xml.internal.ws.spi.db.DatabindingException; import com.sun.xml.internal.ws.spi.db.PropertyAccessor; @@ -95,9 +96,80 @@ public abstract class ResponseBuilder { */ public abstract Object readResponse(Message reply, Object[] args) throws JAXBException, XMLStreamException; + static final class WrappedPartBuilder { + private final XMLBridge bridge; + private final ValueSetter setter; + public WrappedPartBuilder(XMLBridge bridge, ValueSetter setter) { + this.bridge = bridge; + this.setter = setter; + } + final Object readResponse(Object[] args, XMLStreamReader r, AttachmentSet att) throws JAXBException { + Object obj; + AttachmentUnmarshallerImpl au = (att != null)?new AttachmentUnmarshallerImpl(att):null; + if (bridge instanceof RepeatedElementBridge) { + RepeatedElementBridge rbridge = (RepeatedElementBridge)bridge; + ArrayList list = new ArrayList(); + QName name = r.getName(); + while (r.getEventType()==XMLStreamReader.START_ELEMENT && name.equals(r.getName())) { + list.add(rbridge.unmarshal(r, au)); + XMLStreamReaderUtil.toNextTag(r, name); + } + obj = rbridge.collectionHandler().convert(list); + } else { + obj = bridge.unmarshal(r, au); + } + return setter.put(obj,args); + } + } + /** + * {@link ResponseBuilder.PartBuilder} keyed by the element name (inside the wrapper element.) + */ + protected Map wrappedParts = null; + protected QName wrapperName; + + protected Object readWrappedResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException { + Object retVal = null; + + if (!msg.hasPayload()) { + throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element"); + } + XMLStreamReader reader = msg.readPayload(); + XMLStreamReaderUtil.verifyTag(reader,wrapperName); + reader.nextTag(); + + while(reader.getEventType()==XMLStreamReader.START_ELEMENT) { + // TODO: QName has a performance issue + WrappedPartBuilder part = wrappedParts.get(reader.getName()); + if(part==null) { + // no corresponding part found. ignore + XMLStreamReaderUtil.skipElement(reader); + reader.nextTag(); + } else { + Object o = part.readResponse(args,reader, msg.getAttachments()); + // there's only at most one ResponseBuilder that returns a value. + if(o!=null) { + assert retVal==null; + retVal = o; + } + } + // skip any whitespace + if (reader.getEventType() != XMLStreamConstants.START_ELEMENT && + reader.getEventType() != XMLStreamConstants.END_ELEMENT) { + XMLStreamReaderUtil.nextElementContent(reader); + } + } + + // we are done with the body + reader.close(); + XMLStreamReaderFactory.recycle(reader); + + return retVal; + } + static final class None extends ResponseBuilder { private None(){ } + @Override public Object readResponse(Message msg, Object[] args) { msg.consume(); return null; @@ -108,7 +180,7 @@ public abstract class ResponseBuilder { * The singleton instance that produces null return value. * Used for operations that doesn't have any output. */ - public static ResponseBuilder NONE = new None(); + public final static ResponseBuilder NONE = new None(); /** * Returns the 'uninitialized' value for the given type. @@ -116,6 +188,7 @@ public abstract class ResponseBuilder { *

    * For primitive types, it's '0', and for reference types, it's null. */ + @SuppressWarnings("element-type-mismatch") public static Object getVMUninitializedValue(Type type) { // if this map returns null, that means the 'type' is a reference type, // in which case 'null' is the correct null value, so this code is correct. @@ -147,6 +220,7 @@ public abstract class ResponseBuilder { this.nullValue = nullValue; this.setter = setter; } + @Override public Object readResponse(Message msg, Object[] args) { return setter.put(nullValue, args); } @@ -178,6 +252,7 @@ public abstract class ResponseBuilder { this(builders.toArray(new ResponseBuilder[builders.size()])); } + @Override public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException { Object retVal = null; for (ResponseBuilder builder : builders) { @@ -238,6 +313,7 @@ public abstract class ResponseBuilder { } } + @Override public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException { // TODO not to loop for (Attachment att : msg.getAttachments()) { @@ -260,6 +336,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) { return setter.put(att.asDataHandler(), args); } @@ -270,6 +347,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) { att.getContentType(); StringDataContentHandler sdh = new StringDataContentHandler(); @@ -288,6 +366,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) { return setter.put(att.asByteArray(), args); } @@ -298,6 +377,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) { return setter.put(att.asSource(), args); } @@ -308,6 +388,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) { Image image; InputStream is = null; @@ -334,6 +415,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) { return setter.put(att.asInputStream(), args); } @@ -344,6 +426,7 @@ public abstract class ResponseBuilder { super(param, setter); } + @Override Object mapAttachment(Attachment att, Object[] args) throws JAXBException { Object obj = param.getXMLBridge().unmarshal(att.asInputStream()); return setter.put(obj, args); @@ -375,6 +458,7 @@ public abstract class ResponseBuilder { * @return null * if the parsing fails. */ + @SuppressWarnings("FinalStaticMethod") public static final String getWSDLPartName(com.sun.xml.internal.ws.api.message.Attachment att){ String cId = att.getContentId(); @@ -440,6 +524,7 @@ public abstract class ResponseBuilder { } } + @Override public Object readResponse(Message msg, Object[] args) throws JAXBException { com.sun.xml.internal.ws.api.message.Header header = null; Iterator it = @@ -477,6 +562,7 @@ public abstract class ResponseBuilder { this.setter = setter; } + @Override public Object readResponse(Message msg, Object[] args) throws JAXBException { return setter.put( msg.readPayloadAsJAXB(bridge), args ); } @@ -494,41 +580,50 @@ public abstract class ResponseBuilder { private final XMLBridge wrapper; - private final QName wrapperName; + private boolean dynamicWrapper; public DocLit(WrapperParameter wp, ValueSetterFactory setterFactory) { wrapperName = wp.getName(); wrapper = wp.getXMLBridge(); Class wrapperType = (Class) wrapper.getTypeInfo().type; + dynamicWrapper = WrapperComposite.class.equals(wrapperType); - List parts = new ArrayList(); + List tempParts = new ArrayList(); List children = wp.getWrapperChildren(); for (ParameterImpl p : children) { if(p.isIN()) continue; QName name = p.getName(); - try { - parts.add( new PartBuilder( - wp.getOwner().getBindingContext().getElementPropertyAccessor( - wrapperType, - name.getNamespaceURI(), - p.getName().getLocalPart()), - setterFactory.get(p) - )); - // wrapper parameter itself always bind to body, and - // so do all its children - assert p.getBinding()== ParameterBinding.BODY; - } catch (JAXBException e) { - throw new WebServiceException( // TODO: i18n - wrapperType+" do not have a property of the name "+name,e); + if (dynamicWrapper) { + if (wrappedParts == null) wrappedParts = new HashMap(); + XMLBridge xmlBridge = p.getInlinedRepeatedElementBridge(); + if (xmlBridge == null) xmlBridge = p.getXMLBridge(); + wrappedParts.put( p.getName(), new WrappedPartBuilder(xmlBridge, setterFactory.get(p))); + } else { + try { + tempParts.add(new PartBuilder( + wp.getOwner().getBindingContext().getElementPropertyAccessor( + wrapperType, + name.getNamespaceURI(), + p.getName().getLocalPart()), + setterFactory.get(p) + )); + // wrapper parameter itself always bind to body, and + // so do all its children + assert p.getBinding()== ParameterBinding.BODY; + } catch (JAXBException e) { + throw new WebServiceException( // TODO: i18n + wrapperType+" do not have a property of the name "+name,e); + } } } - - this.parts = parts.toArray(new PartBuilder[parts.size()]); + this.parts = tempParts.toArray(new PartBuilder[tempParts.size()]); } + @Override public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException { + if (dynamicWrapper) return readWrappedResponse(msg, args); Object retVal = null; if (parts.length>0) { @@ -599,20 +694,13 @@ public abstract class ResponseBuilder { * and processes all such wrapped parts. */ public static final class RpcLit extends ResponseBuilder { - /** - * {@link PartBuilder} keyed by the element name (inside the wrapper element.) - */ - private final Map parts = new HashMap(); - - private QName wrapperName; - public RpcLit(WrapperParameter wp, ValueSetterFactory setterFactory) { assert wp.getTypeInfo().type== WrapperComposite.class; - wrapperName = wp.getName(); + wrappedParts = new HashMap(); List children = wp.getWrapperChildren(); for (ParameterImpl p : children) { - parts.put( p.getName(), new PartBuilder( + wrappedParts.put( p.getName(), new WrappedPartBuilder( p.getXMLBridge(), setterFactory.get(p) )); // wrapper parameter itself always bind to body, and @@ -621,70 +709,9 @@ public abstract class ResponseBuilder { } } + @Override public Object readResponse(Message msg, Object[] args) throws JAXBException, XMLStreamException { - Object retVal = null; - - if (!msg.hasPayload()) { - throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element"); - } - XMLStreamReader reader = msg.readPayload(); - XMLStreamReaderUtil.verifyTag(reader,wrapperName); - reader.nextTag(); - - while(reader.getEventType()==XMLStreamReader.START_ELEMENT) { - // TODO: QName has a performance issue - PartBuilder part = parts.get(reader.getName()); - if(part==null) { - // no corresponding part found. ignore - XMLStreamReaderUtil.skipElement(reader); - reader.nextTag(); - } else { - Object o = part.readResponse(args,reader, msg.getAttachments()); - // there's only at most one ResponseBuilder that returns a value. - if(o!=null) { - assert retVal==null; - retVal = o; - } - } - // skip any whitespace - if (reader.getEventType() != XMLStreamConstants.START_ELEMENT && - reader.getEventType() != XMLStreamConstants.END_ELEMENT) { - XMLStreamReaderUtil.nextElementContent(reader); - } - } - - // we are done with the body - reader.close(); - XMLStreamReaderFactory.recycle(reader); - - return retVal; - } - - /** - * Unmarshals each wrapped part into a JAXB object and moves it - * to the expected place. - */ - static final class PartBuilder { - private final XMLBridge bridge; - private final ValueSetter setter; - - /** - * @param bridge - * specifies how the part is unmarshalled. - * @param setter - * specifies how the obtained value is returned to the client. - */ - public PartBuilder(XMLBridge bridge, ValueSetter setter) { - this.bridge = bridge; - this.setter = setter; - } - - final Object readResponse(Object[] args, XMLStreamReader r, AttachmentSet att) throws JAXBException { - Object obj = bridge.unmarshal(r, (att != null)?new AttachmentUnmarshallerImpl(att):null); - return setter.put(obj,args); - } - - + return readWrappedResponse(msg, args); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java index 2c412d75a4c..65660a9ec7a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIMethodHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -95,7 +95,7 @@ abstract class SEIMethodHandler extends MethodHandler { {// prepare objects for creating messages List rp = method.getRequestParameters(); - BodyBuilder bodyBuilder = null; + BodyBuilder tmpBodyBuilder = null; List fillers = new ArrayList(); for (ParameterImpl param : rp) { @@ -105,11 +105,11 @@ abstract class SEIMethodHandler extends MethodHandler { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) - bodyBuilder = new BodyBuilder.RpcLit((WrapperParameter)param, owner.soapVersion, getValueGetterFactory()); + tmpBodyBuilder = new BodyBuilder.RpcLit((WrapperParameter)param, owner.soapVersion, getValueGetterFactory()); else - bodyBuilder = new BodyBuilder.DocLit((WrapperParameter)param, owner.soapVersion, getValueGetterFactory()); + tmpBodyBuilder = new BodyBuilder.DocLit((WrapperParameter)param, owner.soapVersion, getValueGetterFactory()); } else { - bodyBuilder = new BodyBuilder.Bare(param, owner.soapVersion, getter); + tmpBodyBuilder = new BodyBuilder.Bare(param, owner.soapVersion, getter); } break; case HEADER: @@ -128,21 +128,21 @@ abstract class SEIMethodHandler extends MethodHandler { } } - if(bodyBuilder==null) { + if(tmpBodyBuilder==null) { // no parameter binds to body. we create an empty message switch(owner.soapVersion) { case SOAP_11: - bodyBuilder = BodyBuilder.EMPTY_SOAP11; + tmpBodyBuilder = BodyBuilder.EMPTY_SOAP11; break; case SOAP_12: - bodyBuilder = BodyBuilder.EMPTY_SOAP12; + tmpBodyBuilder = BodyBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } - this.bodyBuilder = bodyBuilder; + this.bodyBuilder = tmpBodyBuilder; this.inFillers = fillers.toArray(new MessageFiller[fillers.size()]); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java index 44f3069558f..ed4c069bd25 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SEIStub.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,8 +38,9 @@ import com.sun.xml.internal.ws.api.model.MEP; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.pipe.Fiber; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ContainerResolver; import com.sun.xml.internal.ws.binding.BindingImpl; -import com.sun.xml.internal.ws.client.AsyncResponseImpl; import com.sun.xml.internal.ws.client.*; import com.sun.xml.internal.ws.model.JavaMethodImpl; import com.sun.xml.internal.ws.model.SOAPSEIModel; @@ -131,21 +132,26 @@ public final class SEIStub extends Stub implements InvocationHandler { private final Map methodHandlers = new HashMap(); public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { - MethodHandler handler = methodHandlers.get(method); - if (handler != null) { - return handler.invoke(proxy, args); - } else { - // we handle the other method invocations by ourselves - try { - return method.invoke(this, args); - } catch (IllegalAccessException e) { - // impossible - throw new AssertionError(e); - } catch (IllegalArgumentException e) { - throw new AssertionError(e); - } catch (InvocationTargetException e) { - throw e.getCause(); + Container old = ContainerResolver.getDefault().enterContainer(owner.getContainer()); + try { + MethodHandler handler = methodHandlers.get(method); + if (handler != null) { + return handler.invoke(proxy, args); + } else { + // we handle the other method invocations by ourselves + try { + return method.invoke(this, args); + } catch (IllegalAccessException e) { + // impossible + throw new AssertionError(e); + } catch (IllegalArgumentException e) { + throw new AssertionError(e); + } catch (InvocationTargetException e) { + throw e.getCause(); + } } + } finally { + ContainerResolver.getDefault().exitContainer(old); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java index 641d93fec58..1db11463f15 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubAsyncHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,8 @@ package com.sun.xml.internal.ws.client.sei; import java.util.List; import javax.jws.soap.SOAPBinding.Style; + +import com.sun.xml.internal.ws.api.message.MessageContextFactory; import com.sun.xml.internal.ws.model.JavaMethodImpl; import com.sun.xml.internal.ws.model.ParameterImpl; import com.sun.xml.internal.ws.model.WrapperParameter; @@ -36,8 +38,8 @@ public class StubAsyncHandler extends StubHandler { private final Class asyncBeanClass; - public StubAsyncHandler(JavaMethodImpl jm, JavaMethodImpl sync) { - super(sync); + public StubAsyncHandler(JavaMethodImpl jm, JavaMethodImpl sync, MessageContextFactory mcf) { + super(sync, mcf); List rp = sync.getResponseParameters(); int size = 0; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java index 2518e3c7075..c3a2b002fa0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/StubHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,11 @@ package com.sun.xml.internal.ws.client.sei; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.databinding.ClientCallBridge; -import com.sun.xml.internal.ws.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageContextFactory; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; @@ -53,7 +54,7 @@ import java.util.Map; *

      *
    1. Accepts Object[] that represents arguments for a Java method, * and creates {@link com.sun.xml.internal.ws.message.jaxb.JAXBMessage} that represents a request message. - *
    2. Takes a {@link com.sun.xml.internal.ws.api.message.Message] that represents a response, + *
    3. Takes a {@link com.sun.xml.internal.ws.api.message.Message} that represents a response, * and extracts the return value (and updates {@link javax.xml.ws.Holder }s.) *
    * @@ -78,8 +79,9 @@ public class StubHandler implements ClientCallBridge { protected final Map checkedExceptions; protected SOAPVersion soapVersion = SOAPVersion.SOAP_11; protected ResponseBuilder responseBuilder; + protected MessageContextFactory packetFactory; - public StubHandler(JavaMethodImpl method) { + public StubHandler(JavaMethodImpl method, MessageContextFactory mcf) { //keep all the CheckedException model for the detail qname this.checkedExceptions = new HashMap(); for(CheckedExceptionImpl ce : method.getCheckedExceptions()){ @@ -93,6 +95,7 @@ public class StubHandler implements ClientCallBridge { this.soapAction = soapActionFromBinding; } this.javaMethod = method; + packetFactory = mcf; soapVersion = javaMethod.getBinding().getSOAPVersion(); @@ -210,12 +213,13 @@ public class StubHandler implements ClientCallBridge { * @param args proxy invocation arguments * @return Message for the arguments */ - public Packet createRequestPacket(JavaCallInfo call) { - Message msg = bodyBuilder.createMessage(call.getParameters()); + public Packet createRequestPacket(JavaCallInfo args) { + Message msg = bodyBuilder.createMessage(args.getParameters()); - for (MessageFiller filler : inFillers) filler.fillIn(call.getParameters(),msg); + for (MessageFiller filler : inFillers) filler.fillIn(args.getParameters(),msg); - Packet req = new Packet(msg); + Packet req = (Packet)packetFactory.createContext(msg); + req.setState(Packet.State.ClientRequest); req.soapAction = soapAction; req.expectReply = !isOneWay; req.getMessage().assertOneWay(isOneWay); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java index 4bb31294aee..7a763c42bb5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/SyncMethodHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,30 +25,19 @@ package com.sun.xml.internal.ws.client.sei; -import com.sun.xml.internal.ws.api.databinding.ClientCallBridge; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.client.RequestContext; import com.sun.xml.internal.ws.client.ResponseContextReceiver; import com.sun.xml.internal.ws.encoding.soap.DeserializationException; -import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; import com.sun.xml.internal.ws.message.jaxb.JAXBMessage; -import com.sun.xml.internal.ws.model.CheckedExceptionImpl; -import com.sun.xml.internal.ws.model.JavaMethodImpl; -import com.sun.xml.internal.ws.model.ParameterImpl; -import com.sun.xml.internal.ws.model.WrapperParameter; -import com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo; import javax.xml.bind.JAXBException; -import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; import javax.xml.ws.Holder; import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; /** * {@link MethodHandler} that handles synchronous method invocations. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java index ad05fd83099..c3da0afcc27 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java index df9cc3921fc..302d5f5ed64 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueGetterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java index 66e983a76c6..5b979a15153 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java index a03ecbf306d..cbc91160c7f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/ValueSetterFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java index fc1ade5d4a8..c23c0fcec56 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/client/sei/pacakge-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java new file mode 100644 index 00000000000..376df497391 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/commons/xmlutil/Converter.java @@ -0,0 +1,193 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.commons.xmlutil; + +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.Messages; +import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.util.xml.XmlUtil; + +import javax.xml.stream.*; +import javax.xml.xpath.XPathFactoryConfigurationException; +import java.io.*; +import java.lang.reflect.Constructor; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Level; + +/** + * Utility class that provides conversion of different XML representations + * from/to various other formats + * + * @author Marek Potociar + */ +public final class Converter { + + public static final String UTF_8 = "UTF-8"; + + private Converter() { + // prevents instantiation + } + private static final Logger LOGGER = Logger.getLogger(Converter.class); + private static final XMLOutputFactory xmlOutputFactory = XMLOutputFactory.newInstance(); + private static final AtomicBoolean logMissingStaxUtilsWarning = new AtomicBoolean(false); + + /** + * Converts a throwable to String + * + * @param throwable + * @return String representation of throwable + */ + public static String toString(Throwable throwable) { + if (throwable == null) { + return "[ No exception ]"; + } + + StringWriter stringOut = new StringWriter(); + throwable.printStackTrace(new PrintWriter(stringOut)); + + return stringOut.toString(); + } + + public static String toString(Packet packet) { + if (packet == null) { + return "[ Null packet ]"; + } else if (packet.getMessage() == null) { + return "[ Empty packet ]"; + } + + return toString(packet.getMessage()); + + } + + public static String toString(Message message) { + if (message == null) { + return "[ Null message ]"; + } + StringWriter stringOut = null; + try { + stringOut = new StringWriter(); + XMLStreamWriter writer = null; + try { + writer = xmlOutputFactory.createXMLStreamWriter(stringOut); + writer = createIndenter(writer); + message.copy().writeTo(writer); + } catch (Exception e) { // WSIT-1596 - Message Dumping should not affect other processing + LOGGER.log(Level.WARNING, "Unexpected exception occured while dumping message", e); + } finally { + if (writer != null) { + try { + writer.close(); + } catch (XMLStreamException ignored) { + LOGGER.fine("Unexpected exception occured while closing XMLStreamWriter", ignored); + } + } + } + return stringOut.toString(); + } finally { + if (stringOut != null) { + try { + stringOut.close(); + } catch (IOException ex) { + LOGGER.finest("An exception occured when trying to close StringWriter", ex); + } + } + } + } + + public static byte[] toBytes(Message message, String encoding) throws XMLStreamException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + try { + if (message != null) { + XMLStreamWriter xsw = xmlOutputFactory.createXMLStreamWriter(baos, encoding); + try { + message.writeTo(xsw); + } finally { + try { + xsw.close(); + } catch (XMLStreamException ex) { + LOGGER.warning("Unexpected exception occured while closing XMLStreamWriter", ex); + } + } + } + + return baos.toByteArray(); + } finally { + try { + baos.close(); + } catch (IOException ex) { + LOGGER.warning("Unexpected exception occured while closing ByteArrayOutputStream", ex); + } + } + } + + /** + * Converts JAX-WS RI message represented as input stream back to Message + * object. + * + * @param dataStream message data stream + * @param encoding message data stream encoding + * + * @return {@link com.sun.xml.internal.ws.api.message.Message} object created from the data stream + */ + public static Message toMessage(@NotNull InputStream dataStream, String encoding) throws XMLStreamException { + XMLStreamReader xsr = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(dataStream, encoding); + return Messages.create(xsr); + } + + public static String messageDataToString(final byte[] data, final String encoding) { + try { + return toString(toMessage(new ByteArrayInputStream(data), encoding)); + // closing ByteArrayInputStream has no effect, so ignoring the redundant call + } catch (XMLStreamException ex) { + LOGGER.warning("Unexpected exception occured while converting message data to string", ex); + return "[ Message Data Conversion Failed ]"; + } + } + + /** + * Wraps {@link javax.xml.stream.XMLStreamWriter} by an indentation engine if possible. + * + *

    + * We can do this only when we have stax-utils.jar in the class path. + */ + private static XMLStreamWriter createIndenter(XMLStreamWriter writer) { + try { + Class clazz = Converter.class.getClassLoader().loadClass("javanet.staxutils.IndentingXMLStreamWriter"); + Constructor c = clazz.getConstructor(XMLStreamWriter.class); + writer = XMLStreamWriter.class.cast(c.newInstance(writer)); + } catch (Exception ex) { + // if stax-utils.jar is not in the classpath, this will fail + // so, we'll just have to do without indentation + if (logMissingStaxUtilsWarning.compareAndSet(false, true)) { + LOGGER.log(Level.WARNING, "Put stax-utils.jar to the classpath to indent the dump output", ex); + } + } + return writer; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java index 80ff06e7204..40b28971b44 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementAssertionCreator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java index e104732db7a..07ebf4d1d37 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPolicyValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java index 1e189bf2384..3f7366a2532 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/management/policy/ManagementPrefixMapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadOnlyPropertyException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java similarity index 62% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadOnlyPropertyException.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java index e15eccb5eb0..d70a74dcd64 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadOnlyPropertyException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/dev/FeatureReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,28 +23,25 @@ * questions. */ -package com.sun.xml.internal.ws.util; +package com.sun.xml.internal.ws.config.metro.dev; -import com.sun.xml.internal.ws.api.PropertySet; +import javax.xml.namespace.QName; +import javax.xml.stream.XMLEventReader; +import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; /** - * Used to indicate that {@link PropertySet#put(String, Object)} failed - * because a property is read-only. + * Parses a XML fragment and is expected to return a corresponding WebServiceFeature. * - * @author Kohsuke Kawaguchi + * @author Fabian Ritzmann */ -public class ReadOnlyPropertyException extends IllegalArgumentException { - private final String propertyName; +public interface FeatureReader { - public ReadOnlyPropertyException(String propertyName) { - super(propertyName+" is a read-only property."); - this.propertyName = propertyName; - } + public static final QName ENABLED_ATTRIBUTE_NAME = new QName("enabled"); /** - * Gets the name of the property that was read-only. + * Parse an XML stream and return the corresponding WebServiceFeature instance. */ - public String getPropertyName() { - return propertyName; - } + public T parse(XMLEventReader reader) throws WebServiceException; + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java new file mode 100644 index 00000000000..65b5f94e40c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/config/metro/util/ParserUtil.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.config.metro.util; + +import com.sun.istack.internal.logging.Logger; + +import javax.xml.ws.WebServiceException; + +/** + * + * @author Fabian Ritzmann + */ +public class ParserUtil { + + private static final Logger LOGGER = Logger.getLogger(ParserUtil.class); + + private ParserUtil() { + } + + /** + * Return true if the value is "true" or "1". Return false if the value is + * "false" or "0". Throw an exception otherwise. The test is case sensitive. + * + * @param value The String representation of the value. Must not be null. + * @return True if the value is "true" or "1". False if the value is + * "false" or "0". + * @throws PolicyException If the value is not "true", "false", "0" or "1". + */ + public static boolean parseBooleanValue(String value) throws WebServiceException { + if ("true".equals(value) || "1".equals(value)) { + return true; + } + else if ("false".equals(value) || "0".equals(value)) { + return false; + } + // TODO logging message + throw LOGGER.logSevereException(new WebServiceException("invalid boolean value")); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java index 979f77e36da..d4658fa0b01 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package com.sun.xml.internal.ws.db; -import java.io.File; import java.io.InputStream; import java.net.URL; import java.util.HashMap; @@ -38,19 +37,17 @@ import javax.xml.transform.Source; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; -import com.sun.xml.internal.org.jvnet.ws.databinding.Databinding; -import com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingModeFeature; -import com.sun.xml.internal.org.jvnet.ws.databinding.Databinding.Builder; -import com.sun.xml.internal.org.jvnet.ws.databinding.Databinding.WSDLGenerator; import org.xml.sax.EntityResolver; +import com.oracle.webservices.internal.api.databinding.Databinding; +import com.oracle.webservices.internal.api.databinding.Databinding.Builder; +import com.oracle.webservices.internal.api.databinding.WSDLGenerator; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.databinding.DatabindingConfig; import com.sun.xml.internal.ws.api.databinding.DatabindingFactory; -import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; -import com.sun.xml.internal.ws.spi.db.DatabindingException; import com.sun.xml.internal.ws.spi.db.DatabindingProvider; import com.sun.xml.internal.ws.util.ServiceFinder; @@ -115,7 +112,7 @@ public class DatabindingFactoryImpl extends DatabindingFactory { return provider.create(config); } - public Databinding.WSDLGenerator createWsdlGen(DatabindingConfig config) { + public WSDLGenerator createWsdlGen(DatabindingConfig config) { DatabindingProvider provider = provider(config); return provider.wsdlGen(config); } @@ -145,8 +142,8 @@ public class DatabindingFactoryImpl extends DatabindingFactory { config.getMappingInfo().getDatabindingMode() != null) return config.getMappingInfo().getDatabindingMode(); if ( config.getFeatures() != null) for (WebServiceFeature f : config.getFeatures()) { - if (f instanceof DatabindingModeFeature) { - DatabindingModeFeature dmf = (DatabindingModeFeature) f; + if (f instanceof com.oracle.webservices.internal.api.databinding.DatabindingModeFeature) { + com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf = (com.oracle.webservices.internal.api.databinding.DatabindingModeFeature) f; return dmf.getMode(); } } @@ -235,16 +232,19 @@ public class DatabindingFactoryImpl extends DatabindingFactory { if (isfor(WSDLPort.class, name, value)) { config.setWsdlPort((WSDLPort)value); } + if (isfor(MetadataReader.class, name, value)) { + config.setMetadataReader((MetadataReader)value); + } return this; } boolean isfor(Class type, String name, Object value) { return type.getName().equals(name) && type.isInstance(value); } - public com.sun.xml.internal.org.jvnet.ws.databinding.Databinding build() { + public com.oracle.webservices.internal.api.databinding.Databinding build() { return factory.createRuntime(config); } - public WSDLGenerator createWSDLGenerator() { + public com.oracle.webservices.internal.api.databinding.WSDLGenerator createWSDLGenerator() { return factory.createWsdlGen(config); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java index 10bde8ee185..d5d992561f7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,21 +32,21 @@ import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; -import javax.xml.namespace.QName; import javax.xml.ws.WebServiceFeature; -import com.sun.xml.internal.org.jvnet.ws.message.MessageContext; - +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; +import com.oracle.webservices.internal.api.message.MessageContext; import com.sun.xml.internal.ws.api.databinding.EndpointCallBridge; -import com.sun.xml.internal.ws.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; import com.sun.xml.internal.ws.api.databinding.Databinding; import com.sun.xml.internal.ws.api.databinding.DatabindingConfig; import com.sun.xml.internal.ws.api.databinding.ClientCallBridge; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageContextFactory; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.MEP; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.pipe.Codec; import com.sun.xml.internal.ws.api.pipe.ContentType; @@ -57,7 +57,6 @@ import com.sun.xml.internal.ws.model.AbstractSEIModelImpl; import com.sun.xml.internal.ws.model.JavaMethodImpl; import com.sun.xml.internal.ws.model.RuntimeModeler; import com.sun.xml.internal.ws.server.sei.TieHandler; -import com.sun.xml.internal.ws.util.QNameMap; import com.sun.xml.internal.ws.wsdl.ActionBasedOperationSignature; import com.sun.xml.internal.ws.wsdl.DispatchException; import com.sun.xml.internal.ws.wsdl.OperationDispatcher; @@ -67,22 +66,25 @@ import com.sun.xml.internal.ws.wsdl.OperationDispatcher; * * @author shih-chang.chen@oracle.com */ -public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jvnet.ws.databinding.Databinding { +public class DatabindingImpl implements Databinding { AbstractSEIModelImpl seiModel; Map stubHandlers; - QNameMap wsdlOpMap = new QNameMap(); +// QNameMap wsdlOpMap = new QNameMap(); + Map wsdlOpMap = new HashMap(); Map tieHandlers = new HashMap(); OperationDispatcher operationDispatcher; OperationDispatcher operationDispatcherNoWsdl; boolean clientConfig = false; Codec codec; + MessageContextFactory packetFactory = null; public DatabindingImpl(DatabindingProviderImpl p, DatabindingConfig config) { RuntimeModeler modeler = new RuntimeModeler(config); modeler.setClassLoader(config.getClassLoader()); seiModel = modeler.buildRuntimeModel(); WSDLPort wsdlport = config.getWsdlPort(); + packetFactory = new MessageContextFactory(seiModel.getWSBinding().getFeatures()); clientConfig = isClientConfig(config); if ( clientConfig ) initStubHandlers(); seiModel.setDatabinding(this); @@ -90,8 +92,8 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv if (operationDispatcher == null) operationDispatcherNoWsdl = new OperationDispatcher(null, seiModel.getWSBinding(), seiModel); // if(!clientConfig) { for(JavaMethodImpl jm: seiModel.getJavaMethods()) if (!jm.isAsync()) { - TieHandler th = new TieHandler(jm, seiModel.getWSBinding()); - wsdlOpMap.put(jm.getOperationQName(), th); + TieHandler th = new TieHandler(jm, seiModel.getWSBinding(), packetFactory); + wsdlOpMap.put(jm, th); tieHandlers.put(th.getMethod(), th); } // } @@ -121,7 +123,7 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv // first fill in sychronized versions for (JavaMethodImpl m : seiModel.getJavaMethods()) { if (!m.getMEP().isAsync) { - StubHandler handler = new StubHandler(m); + StubHandler handler = new StubHandler(m, packetFactory); syncs.put(m.getOperationSignature(), m); stubHandlers.put(m.getMethod(), handler); } @@ -130,22 +132,24 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv JavaMethodImpl sync = syncs.get(jm.getOperationSignature()); if (jm.getMEP() == MEP.ASYNC_CALLBACK || jm.getMEP() == MEP.ASYNC_POLL) { Method m = jm.getMethod(); - StubAsyncHandler handler = new StubAsyncHandler(jm, sync); + StubAsyncHandler handler = new StubAsyncHandler(jm, sync, packetFactory); stubHandlers.put(m, handler); } } } - public QName resolveOperationQName(Packet req) throws DispatchException { - return (operationDispatcher != null)? - operationDispatcher.getWSDLOperationQName(req): - operationDispatcherNoWsdl.getWSDLOperationQName(req); + public JavaMethodImpl resolveJavaMethod(Packet req) throws DispatchException { + WSDLOperationMapping m = req.getWSDLOperationMapping(); + if (m == null) m = (operationDispatcher != null) ? + operationDispatcher.getWSDLOperationMapping(req): + operationDispatcherNoWsdl.getWSDLOperationMapping(req); + return (JavaMethodImpl) m.getJavaMethod(); } public JavaCallInfo deserializeRequest(Packet req) { - JavaCallInfo call = new JavaCallInfo(); + com.sun.xml.internal.ws.api.databinding.JavaCallInfo call = new com.sun.xml.internal.ws.api.databinding.JavaCallInfo(); try { - QName wsdlOp = resolveOperationQName(req); + JavaMethodImpl wsdlOp = resolveJavaMethod(req); TieHandler tie = wsdlOpMap.get(wsdlOp); call.setMethod(tie.getMethod()); Object[] args = tie.readRequest(req.getMessage()); @@ -173,7 +177,9 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv public Packet serializeRequest(JavaCallInfo call) { StubHandler stubHandler = stubHandlers.get(call.getMethod()); - return stubHandler.createRequestPacket(call); + Packet p = stubHandler.createRequestPacket(call); + p.setState(Packet.State.ClientRequest); + return p; } public Packet serializeResponse(JavaCallInfo call) { @@ -188,9 +194,9 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv if (call.getException() instanceof DispatchException) { message = ((DispatchException)call.getException()).fault; } - Packet response = new Packet(); - response.setMessage(message); - return response; + Packet p = (Packet)packetFactory.createContext(message); + p.setState(Packet.State.ServerResponse); + return p; } public ClientCallBridge getClientBridge(Method method) { @@ -205,12 +211,13 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv seiModel.getWSBinding(), info.getContainer(), seiModel.getEndpointClass(), info.isInlineSchemas(), - info.getExtensions()); + info.isSecureXmlProcessingDisabled(), + info.getExtensions()); wsdlGen.doGeneration(); } public EndpointCallBridge getEndpointBridge(Packet req) throws DispatchException { - QName wsdlOp = resolveOperationQName(req); + JavaMethodImpl wsdlOp = resolveJavaMethod(req); return wsdlOpMap.get(wsdlOp); } @@ -228,24 +235,20 @@ public class DatabindingImpl implements Databinding, com.sun.xml.internal.org.jv getCodec().decode(in, ct, p); } - public com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo createJavaCallInfo(Method method, Object[] args) { - return new JavaCallInfo(method, args); + public com.oracle.webservices.internal.api.databinding.JavaCallInfo createJavaCallInfo(Method method, Object[] args) { + return new com.sun.xml.internal.ws.api.databinding.JavaCallInfo(method, args); } - public MessageContext serializeRequest(com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo call) { - return serializeRequest((JavaCallInfo)call); - } - - public com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo deserializeResponse( - MessageContext message, com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo call) { + public com.oracle.webservices.internal.api.databinding.JavaCallInfo deserializeResponse( + MessageContext message, com.oracle.webservices.internal.api.databinding.JavaCallInfo call) { return deserializeResponse((Packet)message, (JavaCallInfo)call); } - public com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo deserializeRequest(MessageContext message) { + public com.oracle.webservices.internal.api.databinding.JavaCallInfo deserializeRequest(MessageContext message) { return deserializeRequest((Packet)message); } - public MessageContext serializeResponse(com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo call) { - return serializeResponse((JavaCallInfo)call); + public MessageContextFactory getMessageContextFactory() { + return packetFactory; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java index 7033fcacd95..0e307215682 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/DatabindingProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,8 +28,8 @@ package com.sun.xml.internal.ws.db; import java.io.File; import java.util.Map; -import com.sun.xml.internal.org.jvnet.ws.databinding.Databinding.WSDLGenerator; - +import com.oracle.webservices.internal.api.databinding.WSDLGenerator; +import com.oracle.webservices.internal.api.databinding.WSDLResolver; import com.sun.xml.internal.ws.api.databinding.Databinding; import com.sun.xml.internal.ws.api.databinding.DatabindingConfig; import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; @@ -45,7 +45,7 @@ public class DatabindingProviderImpl implements DatabindingProvider { Map properties; public void init(Map p) { - properties = p; + properties = p; } DatabindingImpl getCachedDatabindingImpl(DatabindingConfig config) { @@ -72,7 +72,7 @@ public class DatabindingProviderImpl implements DatabindingProvider { return true; } - static public class JaxwsWsdlGen implements Databinding.WSDLGenerator { + static public class JaxwsWsdlGen implements WSDLGenerator { DatabindingImpl databinding; WSDLGenInfo wsdlGenInfo; @@ -87,12 +87,12 @@ public class DatabindingProviderImpl implements DatabindingProvider { } public WSDLGenerator property(String name, Object value) { - // TODO Auto-generated method stub - return null; + // TODO wsdlGenInfo.set... + return this; } public void generate(WSDLResolver wsdlResolver) { -// wsdlGenInfo.setWsdlResolver(wsdlResolver); + wsdlGenInfo.setWsdlResolver(wsdlResolver); databinding.generateWSDL(wsdlGenInfo); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java index f099804adba..5cd15b72f07 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/BridgeWrapper.java @@ -50,37 +50,41 @@ import com.sun.xml.internal.ws.spi.db.TypeInfo; public class BridgeWrapper implements XMLBridge { - private JAXBRIContextWrapper parent; - private com.sun.xml.internal.bind.api.Bridge bridge; + private JAXBRIContextWrapper parent; + private com.sun.xml.internal.bind.api.Bridge bridge; - public BridgeWrapper(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge b) { - parent = p; - bridge = b; - } + public BridgeWrapper(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge b) { + parent = p; + bridge = b; + } - public BindingContext context() { - return parent; - } + @Override + public BindingContext context() { + return parent; + } - com.sun.xml.internal.bind.api.Bridge getBridge() { - return bridge; - } + com.sun.xml.internal.bind.api.Bridge getBridge() { + return bridge; + } - public boolean equals(Object obj) { - return bridge.equals(obj); - } + @Override + public boolean equals(Object obj) { + return bridge.equals(obj); + } - public JAXBRIContext getContext() { - return bridge.getContext(); - } + public JAXBRIContext getContext() { + return bridge.getContext(); + } - public TypeInfo getTypeInfo() { - return parent.typeInfo(bridge.getTypeReference()); - } + @Override + public TypeInfo getTypeInfo() { + return parent.typeInfo(bridge.getTypeReference()); + } - public int hashCode() { - return bridge.hashCode(); - } + @Override + public int hashCode() { + return bridge.hashCode(); + } // public final void marshal(BridgeContext context, T object, ContentHandler contentHandler) throws JAXBException { // bridge.marshal(context, object, contentHandler); @@ -101,32 +105,32 @@ public class BridgeWrapper implements XMLBridge { // public final void marshal(BridgeContext context, T object, XMLStreamWriter output) throws JAXBException { // bridge.marshal(context, object, output); // } + public void marshal(Marshaller m, T object, ContentHandler contentHandler) throws JAXBException { + bridge.marshal(m, object, contentHandler); + } - public void marshal(Marshaller m, T object, ContentHandler contentHandler) throws JAXBException { - bridge.marshal(m, object, contentHandler); - } + public void marshal(Marshaller m, T object, Node output) throws JAXBException { + bridge.marshal(m, object, output); + } - public void marshal(Marshaller m, T object, Node output) throws JAXBException { - bridge.marshal(m, object, output); - } + public void marshal(Marshaller m, T object, OutputStream output, NamespaceContext nsContext) throws JAXBException { + bridge.marshal(m, object, output, nsContext); + } - public void marshal(Marshaller m, T object, OutputStream output, NamespaceContext nsContext) throws JAXBException { - bridge.marshal(m, object, output, nsContext); - } + public void marshal(Marshaller m, T object, Result result) throws JAXBException { + bridge.marshal(m, object, result); + } - public void marshal(Marshaller m, T object, Result result) throws JAXBException { - bridge.marshal(m, object, result); - } - - public void marshal(Marshaller m, T object, XMLStreamWriter output) throws JAXBException { - bridge.marshal(m, object, output); + public void marshal(Marshaller m, T object, XMLStreamWriter output) throws JAXBException { + bridge.marshal(m, object, output); // bridge.marshal(m, (T) convert(object), output); - } + } - public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { + @Override + public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { // bridge.marshal((T) convert(object), contentHandler, am); - bridge.marshal(object, contentHandler, am); - } + bridge.marshal(object, contentHandler, am); + } // Object convert(Object o) { // return (o instanceof WrapperComposite)? convertWrapper((WrapperComposite)o) : o; @@ -140,44 +144,48 @@ public class BridgeWrapper implements XMLBridge { // cs.bridges[i] = ((BridgeWrapper)w.bridges[i]).getBridge(); // return cs; // } - - public void marshal(T object, ContentHandler contentHandler) throws JAXBException { - bridge.marshal(object, contentHandler); + public void marshal(T object, ContentHandler contentHandler) throws JAXBException { + bridge.marshal(object, contentHandler); // bridge.marshal((T) convert(object), contentHandler); - } + } - public void marshal(T object, Node output) throws JAXBException { - bridge.marshal(object, output); + @Override + public void marshal(T object, Node output) throws JAXBException { + bridge.marshal(object, output); // bridge.marshal((T) convert(object), output); - } + } - public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { + @Override + public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { // bridge.marshal((T) convert(object), output, nsContext, am); - bridge.marshal(object, output, nsContext, am); - } + bridge.marshal(object, output, nsContext, am); + } - public void marshal(T object, OutputStream output, NamespaceContext nsContext) throws JAXBException { - bridge.marshal(object, output, nsContext); + public void marshal(T object, OutputStream output, NamespaceContext nsContext) throws JAXBException { + bridge.marshal(object, output, nsContext); // bridge.marshal((T) convert(object), output, nsContext); - } + } - public final void marshal(T object, Result result) throws JAXBException { - bridge.marshal(object, result); - } + @Override + public final void marshal(T object, Result result) throws JAXBException { + bridge.marshal(object, result); + } - public final void marshal(T object, XMLStreamWriter output, - AttachmentMarshaller am) throws JAXBException { - bridge.marshal(object, output, am); - } + @Override + public final void marshal(T object, XMLStreamWriter output, + AttachmentMarshaller am) throws JAXBException { + bridge.marshal(object, output, am); + } - public final void marshal(T object, XMLStreamWriter output) - throws JAXBException { - bridge.marshal(object, output); - } + public final void marshal(T object, XMLStreamWriter output) + throws JAXBException { + bridge.marshal(object, output); + } - public String toString() { - return BridgeWrapper.class.getName() + " : " + bridge.toString(); - } + @Override + public String toString() { + return BridgeWrapper.class.getName() + " : " + bridge.toString(); + } // public final T unmarshal(BridgeContext context, InputStream in) // throws JAXBException { @@ -198,58 +206,62 @@ public class BridgeWrapper implements XMLBridge { // throws JAXBException { // return bridge.unmarshal(context, in); // } + @Override + public final T unmarshal(InputStream in) throws JAXBException { + return bridge.unmarshal(in); + } - public final T unmarshal(InputStream in) throws JAXBException { - return bridge.unmarshal(in); + @Override + public final T unmarshal(Node n, AttachmentUnmarshaller au) + throws JAXBException { + return bridge.unmarshal(n, au); + } + + public final T unmarshal(Node n) throws JAXBException { + return bridge.unmarshal(n); + } + + @Override + public final T unmarshal(Source in, AttachmentUnmarshaller au) + throws JAXBException { + return bridge.unmarshal(in, au); + } + + public final T unmarshal(Source in) throws DatabindingException { + try { + return bridge.unmarshal(in); + } catch (JAXBException e) { + throw new DatabindingException(e); } + } - public final T unmarshal(Node n, AttachmentUnmarshaller au) - throws JAXBException { - return bridge.unmarshal(n, au); - } + public T unmarshal(Unmarshaller u, InputStream in) throws JAXBException { + return bridge.unmarshal(u, in); + } - public final T unmarshal(Node n) throws JAXBException { - return bridge.unmarshal(n); - } + public T unmarshal(Unmarshaller context, Node n) throws JAXBException { + return bridge.unmarshal(context, n); + } - public final T unmarshal(Source in, AttachmentUnmarshaller au) - throws JAXBException { - return bridge.unmarshal(in, au); - } + public T unmarshal(Unmarshaller u, Source in) throws JAXBException { + return bridge.unmarshal(u, in); + } - public final T unmarshal(Source in) throws DatabindingException { - try { - return bridge.unmarshal(in); - } catch (JAXBException e) { - throw new DatabindingException(e); - } - } + public T unmarshal(Unmarshaller u, XMLStreamReader in) throws JAXBException { + return bridge.unmarshal(u, in); + } - public T unmarshal(Unmarshaller u, InputStream in) throws JAXBException { - return bridge.unmarshal(u, in); - } + @Override + public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) + throws JAXBException { + return bridge.unmarshal(in, au); + } - public T unmarshal(Unmarshaller context, Node n) throws JAXBException { - return bridge.unmarshal(context, n); - } - - public T unmarshal(Unmarshaller u, Source in) throws JAXBException { - return bridge.unmarshal(u, in); - } - - public T unmarshal(Unmarshaller u, XMLStreamReader in) throws JAXBException { - return bridge.unmarshal(u, in); - } - - public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) - throws JAXBException { - return bridge.unmarshal(in, au); - } - - public final T unmarshal(XMLStreamReader in) throws JAXBException { - return bridge.unmarshal(in); - } + public final T unmarshal(XMLStreamReader in) throws JAXBException { + return bridge.unmarshal(in); + } + @Override public boolean supportOutputStream() { return true; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java index 9a2a7e95975..673f1883da4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,11 +31,8 @@ import java.util.List; import java.util.Map; import java.lang.reflect.Type; import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; -import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; import com.sun.xml.internal.bind.api.TypeReference; import com.sun.xml.internal.bind.api.JAXBRIContext; import com.sun.xml.internal.bind.api.CompositeStructure; @@ -49,6 +46,7 @@ import com.sun.xml.internal.ws.spi.db.BindingInfo; import com.sun.xml.internal.ws.spi.db.DatabindingException; import com.sun.xml.internal.ws.spi.db.TypeInfo; import com.sun.xml.internal.ws.spi.db.WrapperComposite; +import java.util.Arrays; /** * JAXBRIContextFactory @@ -57,68 +55,76 @@ import com.sun.xml.internal.ws.spi.db.WrapperComposite; */ public class JAXBRIContextFactory extends BindingContextFactory { - public BindingContext newContext(JAXBContext context) { - return new JAXBRIContextWrapper((JAXBRIContext)context, null); - } + @Override + public BindingContext newContext(JAXBContext context) { + return new JAXBRIContextWrapper((JAXBRIContext) context, null); + } - public BindingContext newContext(BindingInfo bi) { - Class[] classes = bi.contentClasses().toArray(new Class[bi.contentClasses().size()]); - for (int i = 0; i < classes.length; i++) if (WrapperComposite.class.equals(classes[i])) - classes[i] = CompositeStructure.class; - Map typeInfoMappings = typeInfoMappings(bi.typeInfos()); - Map subclassReplacements = bi.subclassReplacements(); - String defaultNamespaceRemap = bi.getDefaultNamespace(); - Boolean c14nSupport = (Boolean)bi.properties().get("c14nSupport"); - RuntimeAnnotationReader ar = (RuntimeAnnotationReader)bi.properties().get("com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader"); - JAXBContextFactory jaxbContextFactory = (JAXBContextFactory)bi.properties().get(JAXBContextFactory.class.getName()); + @Override + public BindingContext newContext(BindingInfo bi) { + Class[] classes = bi.contentClasses().toArray(new Class[bi.contentClasses().size()]); + for (int i = 0; i < classes.length; i++) { + if (WrapperComposite.class.equals(classes[i])) { + classes[i] = CompositeStructure.class; + } + } + Map typeInfoMappings = typeInfoMappings(bi.typeInfos()); + Map subclassReplacements = bi.subclassReplacements(); + String defaultNamespaceRemap = bi.getDefaultNamespace(); + Boolean c14nSupport = (Boolean) bi.properties().get("c14nSupport"); + RuntimeAnnotationReader ar = (RuntimeAnnotationReader) bi.properties().get("com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader"); + JAXBContextFactory jaxbContextFactory = (JAXBContextFactory) bi.properties().get(JAXBContextFactory.class.getName()); try { - JAXBRIContext context = (jaxbContextFactory != null)? - jaxbContextFactory.createJAXBContext( - bi.getSEIModel(), - toList(classes), - toList(typeInfoMappings.values())) : - ContextFactory.createContext( - classes, typeInfoMappings.values(), - subclassReplacements, defaultNamespaceRemap, - (c14nSupport != null)? c14nSupport : false, - ar, false, false, false); - return new JAXBRIContextWrapper(context, typeInfoMappings); - } catch (Exception e) { - throw new DatabindingException(e); - } + JAXBRIContext context = (jaxbContextFactory != null) + ? jaxbContextFactory.createJAXBContext( + bi.getSEIModel(), + toList(classes), + toList(typeInfoMappings.values())) + : ContextFactory.createContext( + classes, typeInfoMappings.values(), + subclassReplacements, defaultNamespaceRemap, + (c14nSupport != null) ? c14nSupport : false, + ar, false, false, false); + return new JAXBRIContextWrapper(context, typeInfoMappings); + } catch (Exception e) { + throw new DatabindingException(e); } + } + private List toList(T[] a) { + List l = new ArrayList(); + l.addAll(Arrays.asList(a)); + return l; + } - private List toList(T[] a) { - List l = new ArrayList(); - for(T t : a) l.add(t); - return l; + private List toList(Collection col) { + if (col instanceof List) { + return (List) col; } + List l = new ArrayList(); + l.addAll(col); + return l; + } - private List toList(Collection col) { - if (col instanceof List) return (List) col; - List l = new ArrayList(); - l.addAll(col); - return l; + private Map typeInfoMappings(Collection typeInfos) { + Map map = new java.util.HashMap(); + for (TypeInfo ti : typeInfos) { + Type type = WrapperComposite.class.equals(ti.type) ? CompositeStructure.class : ti.type; + TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations); + map.put(ti, tr); } + return map; + } - private Map typeInfoMappings(Collection typeInfos) { - Map map = new java.util.HashMap(); - for (TypeInfo ti : typeInfos) { - Type type = WrapperComposite.class.equals(ti.type)? CompositeStructure.class : ti.type; - TypeReference tr = new TypeReference(ti.tagName, type, ti.annotations); - map.put(ti, tr); - } - return map; - } + @Override + protected BindingContext getContext(Marshaller m) { + return newContext(((MarshallerImpl) m).getContext()); + } - protected BindingContext getContext(Marshaller m) { - return newContext(((MarshallerImpl)m).getContext()); - } - - protected boolean isFor(String str) { - return (str.equals("glassfish.jaxb") || - str.equals(this.getClass().getName())|| - str.equals("com.sun.xml.internal.bind.v2.runtime")); - } + @Override + protected boolean isFor(String str) { + return (str.equals("glassfish.jaxb") + || str.equals(this.getClass().getName()) + || str.equals("com.sun.xml.internal.bind.v2.runtime")); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java index 19d87f108b6..6b710f0f623 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/JAXBRIContextWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,129 +29,152 @@ import java.io.IOException; import java.util.List; import java.util.Map; -import javax.xml.bind.Binder; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; -import javax.xml.bind.JAXBIntrospector; import javax.xml.bind.Marshaller; import javax.xml.bind.SchemaOutputResolver; import javax.xml.bind.Unmarshaller; import javax.xml.namespace.QName; -import javax.xml.transform.Result; - -import org.w3c.dom.Node; - -import com.sun.xml.internal.bind.api.BridgeContext; -import com.sun.xml.internal.bind.api.CompositeStructure; import com.sun.xml.internal.bind.api.JAXBRIContext; import com.sun.xml.internal.bind.api.TypeReference; import com.sun.xml.internal.bind.v2.model.runtime.RuntimeTypeInfoSet; -import com.sun.xml.internal.bind.api.Bridge; import com.sun.xml.internal.ws.spi.db.BindingContext; import com.sun.xml.internal.ws.spi.db.XMLBridge; -import com.sun.xml.internal.ws.spi.db.PropertyAccessor; import com.sun.xml.internal.ws.spi.db.TypeInfo; import com.sun.xml.internal.ws.spi.db.WrapperComposite; class JAXBRIContextWrapper implements BindingContext { - private Map typeRefs; - private Map typeInfos; - private JAXBRIContext context; + private Map typeRefs; + private Map typeInfos; + private JAXBRIContext context; - JAXBRIContextWrapper(JAXBRIContext cxt, Map refs) { - context = cxt; - typeRefs = refs; - if (refs != null) { - typeInfos = new java.util.HashMap(); - for (TypeInfo ti : refs.keySet()) typeInfos.put(typeRefs.get(ti), ti); - } + JAXBRIContextWrapper(JAXBRIContext cxt, Map refs) { + context = cxt; + typeRefs = refs; + if (refs != null) { + typeInfos = new java.util.HashMap(); + for (TypeInfo ti : refs.keySet()) { + typeInfos.put(typeRefs.get(ti), ti); + } } + } - TypeReference typeReference(TypeInfo ti) { - return (typeRefs != null)? typeRefs.get(ti) : null; + TypeReference typeReference(TypeInfo ti) { + return (typeRefs != null) ? typeRefs.get(ti) : null; + } + + TypeInfo typeInfo(TypeReference tr) { + return (typeInfos != null) ? typeInfos.get(tr) : null; + } + + @Override + public Marshaller createMarshaller() throws JAXBException { + return context.createMarshaller(); + } + + @Override + public Unmarshaller createUnmarshaller() throws JAXBException { + return context.createUnmarshaller(); + } + + @Override + public void generateSchema(SchemaOutputResolver outputResolver) + throws IOException { + context.generateSchema(outputResolver); + } + + @Override + public String getBuildId() { + return context.getBuildId(); + } + + @Override + public QName getElementName(Class o) throws JAXBException { + return context.getElementName(o); + } + + @Override + public QName getElementName(Object o) throws JAXBException { + return context.getElementName(o); + } + + @Override + public com.sun.xml.internal.ws.spi.db.PropertyAccessor getElementPropertyAccessor( + Class wrapperBean, String nsUri, String localName) + throws JAXBException { + return new RawAccessorWrapper(context.getElementPropertyAccessor(wrapperBean, nsUri, localName)); + } + + @Override + public List getKnownNamespaceURIs() { + return context.getKnownNamespaceURIs(); + } + + public RuntimeTypeInfoSet getRuntimeTypeInfoSet() { + return context.getRuntimeTypeInfoSet(); + } + + public QName getTypeName(com.sun.xml.internal.bind.api.TypeReference tr) { + return context.getTypeName(tr); + } + + @Override + public int hashCode() { + return context.hashCode(); + } + + @Override + public boolean equals(Object obj) { + if (obj == null) { + return false; } - - TypeInfo typeInfo(TypeReference tr) { - return (typeInfos != null)? typeInfos.get(tr) : null; + if (getClass() != obj.getClass()) { + return false; } - - public Marshaller createMarshaller() throws JAXBException { - return context.createMarshaller(); + final JAXBRIContextWrapper other = (JAXBRIContextWrapper) obj; + if (this.context != other.context && (this.context == null || !this.context.equals(other.context))) { + return false; } + return true; + } - public Unmarshaller createUnmarshaller() throws JAXBException { - return context.createUnmarshaller(); - } + @Override + public boolean hasSwaRef() { + return context.hasSwaRef(); + } - public void generateSchema(SchemaOutputResolver outputResolver) - throws IOException { - context.generateSchema(outputResolver); - } + @Override + public String toString() { + return JAXBRIContextWrapper.class.getName() + " : " + context.toString(); + } - public String getBuildId() { - return context.getBuildId(); - } + @Override + public XMLBridge createBridge(TypeInfo ti) { + TypeReference tr = typeRefs.get(ti); + com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr); + return WrapperComposite.class.equals(ti.type) + ? new WrapperBridge(this, b) + : new BridgeWrapper(this, b); + } - public QName getElementName(Class o) throws JAXBException { - return context.getElementName(o); - } + @Override + public JAXBContext getJAXBContext() { + return context; + } - public QName getElementName(Object o) throws JAXBException { - return context.getElementName(o); - } + @Override + public QName getTypeName(TypeInfo ti) { + TypeReference tr = typeRefs.get(ti); + return context.getTypeName(tr); + } - public com.sun.xml.internal.ws.spi.db.PropertyAccessor getElementPropertyAccessor( - Class wrapperBean, String nsUri, String localName) - throws JAXBException { - return new RawAccessorWrapper(context.getElementPropertyAccessor(wrapperBean, nsUri, localName)); - } - - public List getKnownNamespaceURIs() { - return context.getKnownNamespaceURIs(); - } - - public RuntimeTypeInfoSet getRuntimeTypeInfoSet() { - return context.getRuntimeTypeInfoSet(); - } - - public QName getTypeName(com.sun.xml.internal.bind.api.TypeReference tr) { - return context.getTypeName(tr); - } - - public int hashCode() { - return context.hashCode(); - } - - public boolean hasSwaRef() { - return context.hasSwaRef(); - } - - public String toString() { - return JAXBRIContextWrapper.class.getName() + " : " + context.toString(); - } - - public XMLBridge createBridge(TypeInfo ti) { - TypeReference tr = typeRefs.get(ti); - com.sun.xml.internal.bind.api.Bridge b = context.createBridge(tr); - return WrapperComposite.class.equals(ti.type) ? - new WrapperBridge(this, b) : - new BridgeWrapper(this, b); - } - - public JAXBContext getJAXBContext() { - return context; - } - - public QName getTypeName(TypeInfo ti) { - TypeReference tr = typeRefs.get(ti); - return context.getTypeName(tr); - } - - public XMLBridge createFragmentBridge() { - return new MarshallerBridge((com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl)context); - } + @Override + public XMLBridge createFragmentBridge() { + return new MarshallerBridge((com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl) context); + } + @Override public Object newWrapperInstace(Class wrapperType) throws InstantiationException, IllegalAccessException { return wrapperType.newInstance(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java index e3df640a05e..26cef3a2ebe 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/MarshallerBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java index 5fd6c73a1cb..a3dd9fb8a36 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/RawAccessorWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,37 +32,43 @@ import com.sun.xml.internal.bind.api.RawAccessor; @SuppressWarnings("unchecked") public class RawAccessorWrapper implements PropertyAccessor { - private RawAccessor accessor; - public RawAccessorWrapper(RawAccessor a) { - accessor = a; - } + private RawAccessor accessor; - public boolean equals(Object obj) { - return accessor.equals(obj); - } + public RawAccessorWrapper(RawAccessor a) { + accessor = a; + } - public Object get(Object bean) throws DatabindingException { - try { - return accessor.get(bean); - } catch (AccessorException e) { - throw new DatabindingException(e); - } - } + @Override + public boolean equals(Object obj) { + return accessor.equals(obj); + } - public int hashCode() { - return accessor.hashCode(); + @Override + public Object get(Object bean) throws DatabindingException { + try { + return accessor.get(bean); + } catch (AccessorException e) { + throw new DatabindingException(e); } + } - public void set(Object bean, Object value) throws DatabindingException { - try { - accessor.set(bean, value); - } catch (AccessorException e) { - throw new DatabindingException(e); - } - } + @Override + public int hashCode() { + return accessor.hashCode(); + } - public String toString() { - return accessor.toString(); + @Override + public void set(Object bean, Object value) throws DatabindingException { + try { + accessor.set(bean, value); + } catch (AccessorException e) { + throw new DatabindingException(e); } + } + + @Override + public String toString() { + return accessor.toString(); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java index 3cc3cdf2a20..e1d9bac7b23 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/db/glassfish/WrapperBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -49,92 +49,108 @@ import com.sun.xml.internal.ws.spi.db.WrapperComposite; public class WrapperBridge implements XMLBridge { - private JAXBRIContextWrapper parent; - private com.sun.xml.internal.bind.api.Bridge bridge; + private JAXBRIContextWrapper parent; + private com.sun.xml.internal.bind.api.Bridge bridge; - public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge b) { - parent = p; - bridge = b; + public WrapperBridge(JAXBRIContextWrapper p, com.sun.xml.internal.bind.api.Bridge b) { + parent = p; + bridge = b; + } + + @Override + public BindingContext context() { + return parent; + } + + @Override + public boolean equals(Object obj) { + return bridge.equals(obj); + } + + @Override + public TypeInfo getTypeInfo() { + return parent.typeInfo(bridge.getTypeReference()); + } + + @Override + public int hashCode() { + return bridge.hashCode(); + } + + static CompositeStructure convert(Object o) { + WrapperComposite w = (WrapperComposite) o; + CompositeStructure cs = new CompositeStructure(); + cs.values = w.values; + cs.bridges = new Bridge[w.bridges.length]; + for (int i = 0; i < cs.bridges.length; i++) { + cs.bridges[i] = ((BridgeWrapper) w.bridges[i]).getBridge(); } + return cs; + } - public BindingContext context() { - return parent; - } - - public boolean equals(Object obj) { - return bridge.equals(obj); - } - - public TypeInfo getTypeInfo() { - return parent.typeInfo(bridge.getTypeReference()); - } - - public int hashCode() { - return bridge.hashCode(); - } - - static CompositeStructure convert(Object o) { - WrapperComposite w = (WrapperComposite) o; - CompositeStructure cs = new CompositeStructure(); - cs.values = w.values; - cs.bridges = new Bridge[w.bridges.length]; - for (int i = 0; i < cs.bridges.length; i++) - cs.bridges[i] = ((BridgeWrapper)w.bridges[i]).getBridge(); - return cs; - } - - public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { - bridge.marshal((T) convert(object), contentHandler, am); + @Override + public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { + bridge.marshal((T) convert(object), contentHandler, am); // bridge.marshal(object, contentHandler, am); - } + } - public void marshal(T object, Node output) throws JAXBException { - throw new UnsupportedOperationException(); + @Override + public void marshal(T object, Node output) throws JAXBException { + throw new UnsupportedOperationException(); // bridge.marshal(object, output); // bridge.marshal((T) convert(object), output); - } + } - public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { - bridge.marshal((T) convert(object), output, nsContext, am); - } + @Override + public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { + bridge.marshal((T) convert(object), output, nsContext, am); + } - public final void marshal(T object, Result result) throws JAXBException { - throw new UnsupportedOperationException(); + @Override + public final void marshal(T object, Result result) throws JAXBException { + throw new UnsupportedOperationException(); // bridge.marshal(object, result); - } + } - public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException { - bridge.marshal((T) convert(object), output, am); - } + @Override + public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException { + bridge.marshal((T) convert(object), output, am); + } - public String toString() { - return BridgeWrapper.class.getName() + " : " + bridge.toString(); - } + @Override + public String toString() { + return BridgeWrapper.class.getName() + " : " + bridge.toString(); + } - public final T unmarshal(InputStream in) throws JAXBException { - //EndpointArgumentsBuilder.RpcLit.readRequest - throw new UnsupportedOperationException(); + @Override + public final T unmarshal(InputStream in) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); // return bridge.unmarshal(in); - } + } - public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException { - //EndpointArgumentsBuilder.RpcLit.readRequest - throw new UnsupportedOperationException(); + @Override + public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); // return bridge.unmarshal(n, au); - } + } - public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException { - //EndpointArgumentsBuilder.RpcLit.readRequest - throw new UnsupportedOperationException(); + @Override + public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); // return bridge.unmarshal(in, au); - } + } - public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException { - //EndpointArgumentsBuilder.RpcLit.readRequest - throw new UnsupportedOperationException(); + @Override + public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); // return bridge.unmarshal(in, au); - } + } + @Override public boolean supportOutputStream() { return true; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java index cde58d8daa4..9b9ac121555 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/BindingTypeFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java index d373dfe8e8c..03d2c366940 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/EPRRecipe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java index f624cdadaae..6964e720651 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/HttpConfigFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,7 +42,7 @@ import java.net.CookieHandler; */ public final class HttpConfigFeature extends WebServiceFeature { /** - * Constant value identifying the {@link @HttpConfigFeature} feature. + * Constant value identifying the {@link HttpConfigFeature} feature. */ public static final String ID = "http://jax-ws.java.net/features/http-config"; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java index c4b954947c9..3384c32959d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXBContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java index 8a8e5a76ade..bc56468225e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/JAXWSProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,7 +61,7 @@ public interface JAXWSProperties { /** * Set this property on the {@link BindingProvider#getRequestContext()} to - * enable {@link HttpURLConnection#httpConnection.setReadTimeout(int)} + * enable {@link HttpURLConnection#setReadTimeout(int)} * *

    * int timeout = ...; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java index f4e123516a1..0ed28c4e3cf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java index 96d781b2d26..00db1e62022 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionAddressingFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java index ea68690cf4b..e5a96231ba1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/MemberSubmissionEndpointReference.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -81,8 +81,9 @@ public final class MemberSubmissionEndpointReference extends EndpointReference i */ public MemberSubmissionEndpointReference(@NotNull Source source) { - if (source == null) + if (source == null) { throw new WebServiceException("Source parameter can not be null on constructor"); + } try { Unmarshaller unmarshaller = MemberSubmissionEndpointReference.msjc.createUnmarshaller(); @@ -102,6 +103,7 @@ public final class MemberSubmissionEndpointReference extends EndpointReference i } } + @Override public void writeTo(Result result) { try { Marshaller marshaller = MemberSubmissionEndpointReference.msjc.createMarshaller(); @@ -160,6 +162,7 @@ public final class MemberSubmissionEndpointReference extends EndpointReference i @XmlAnyElement public List elements; + @XmlType(name="address", namespace=MemberSubmissionEndpointReference.MSNS) public static class Address { public Address() { } @@ -170,6 +173,7 @@ public final class MemberSubmissionEndpointReference extends EndpointReference i public Map attributes; } + @XmlType(name="elements", namespace=MemberSubmissionEndpointReference.MSNS) public static class Elements { public Elements() {} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java index cbfcf982fbf..a04a486f787 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,8 +28,6 @@ package com.sun.xml.internal.ws.developer; import com.sun.xml.internal.ws.server.DraconianValidationErrorHandler; import javax.jws.WebService; -import javax.xml.transform.Source; -import javax.xml.validation.Schema; import javax.xml.ws.spi.WebServiceFeatureAnnotation; import java.lang.annotation.Documented; import static java.lang.annotation.ElementType.TYPE; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java index 07e07243ac0..14dd4e491a8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SchemaValidationFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,6 +82,7 @@ public class SchemaValidationFeature extends WebServiceFeature { } @ManagedAttribute + @Override public String getID() { return ID; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java index f4bca6f8a12..52c747afea4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/Serialization.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java index e312c1e84e0..36e91b37741 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/SerializationFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java index bdf9b6ef78f..0d456741daf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ServerSideException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java index f518ed70848..54aeb9e9114 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java index 6a36e15a7a7..6811df2a492 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingAttachmentFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -55,7 +55,7 @@ import com.sun.org.glassfish.gmbal.ManagedData; @ManagedData public final class StreamingAttachmentFeature extends WebServiceFeature { /** - * Constant value identifying the {@link @StreamingAttachment} feature. + * Constant value identifying the {@link StreamingAttachment} feature. */ public static final String ID = "http://jax-ws.dev.java.net/features/mime"; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java index ddccf9b6a42..9ba60a2c77d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/StreamingDataHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,14 +25,9 @@ package com.sun.xml.internal.ws.developer; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; +import java.net.URL; import javax.activation.DataSource; -import java.io.InputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.io.File; -import java.net.URL; /** * Implementation of {@link com.sun.xml.internal.org.jvnet.staxex.StreamingDataHandler} to access MIME @@ -55,6 +50,8 @@ import java.net.URL; */ public abstract class StreamingDataHandler extends com.sun.xml.internal.org.jvnet.staxex.StreamingDataHandler { + private String hrefCid; + public StreamingDataHandler(Object o, String s) { super(o, s); } @@ -67,4 +64,12 @@ public abstract class StreamingDataHandler extends com.sun.xml.internal.org.jvne super(dataSource); } + public String getHrefCid() { + return hrefCid; + } + + public void setHrefCid(final String cid) { + this.hrefCid = cid; + } + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java index a00fca6229d..8abc23c030c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java index 1b157f7b43d..5cb20b6c929 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/UsesJAXBContextFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java index 5a433247cf6..d5998a61597 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/ValidationErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,7 +35,7 @@ import javax.xml.validation.Validator; * An {@link ErrorHandler} to receive errors encountered during the * {@link Validator#validate} method invocation. Specify * a custom handler in {@link SchemaValidation}, {@link SchemaValidationFeature} - * to customize the error handling process during validaiton. + * to customize the error handling process during validation. * * @see SchemaValidation * @author Jitendra Kotamraju diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java index 65a70bdfa3f..6b4910ab87b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/WSBindingProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -98,7 +98,7 @@ public interface WSBindingProvider extends BindingProvider, Closeable, Component * @param headers * Can be null or empty. * @throws UnsupportedOperationException - * If this {@lini WSBindingProvider} is a {@link Dispatch} + * If this {@link WSBindingProvider} is a {@link Dispatch} * that does not use JAXB. */ void setOutboundHeaders(Object... headers); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java index 2c8b1978802..5a84b8211ec 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/developer/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java new file mode 100644 index 00000000000..fc294436208 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/LoggingDumpTube.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.dump; + +import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.pipe.Fiber; +import com.sun.xml.internal.ws.api.pipe.NextAction; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.pipe.TubeCloner; +import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl; +import com.sun.xml.internal.ws.commons.xmlutil.Converter; +import com.sun.xml.internal.ws.dump.MessageDumper.ProcessingState; + +import java.util.concurrent.atomic.AtomicInteger; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Marek Potociar + */ +public class LoggingDumpTube extends AbstractFilterTubeImpl { + public static enum Position { + Before(MessageDumper.ProcessingState.Received, MessageDumper.ProcessingState.Processed), + After(MessageDumper.ProcessingState.Processed, MessageDumper.ProcessingState.Received); + + private final MessageDumper.ProcessingState requestState; + private final MessageDumper.ProcessingState responseState; + + private Position(ProcessingState requestState, ProcessingState responseState) { + this.requestState = requestState; + this.responseState = responseState; + } + } + + private static final AtomicInteger ID_GENERATOR = new AtomicInteger(0); + // + private MessageDumper messageDumper; + private final Level loggingLevel; + private final Position position; + private final int tubeId; + + public LoggingDumpTube(Level loggingLevel, Position position, Tube tubelineHead) { + super(tubelineHead); + + this.position = position; + this.loggingLevel = loggingLevel; + + this.tubeId = ID_GENERATOR.incrementAndGet(); + } + + public void setLoggedTubeName(String loggedTubeName) { + assert messageDumper == null; // must not set a new message dumper once already set + this.messageDumper = new MessageDumper(loggedTubeName, Logger.getLogger(loggedTubeName), loggingLevel); + } + + /** + * Copy constructor. + */ + private LoggingDumpTube(LoggingDumpTube original, TubeCloner cloner) { + super(original, cloner); + + this.messageDumper = original.messageDumper; + this.loggingLevel = original.loggingLevel; + this.position = original.position; + + this.tubeId = ID_GENERATOR.incrementAndGet(); + } + + public LoggingDumpTube copy(TubeCloner cloner) { + return new LoggingDumpTube(this, cloner); + } + + + @Override + public NextAction processRequest(Packet request) { + if (messageDumper.isLoggable()) { + Packet dumpPacket = (request != null) ? request.copy(true) : null; + messageDumper.dump(MessageDumper.MessageType.Request, position.requestState, Converter.toString(dumpPacket), tubeId, Fiber.current().owner.id); + } + + return super.processRequest(request); + } + + @Override + public NextAction processResponse(Packet response) { + if (messageDumper.isLoggable()) { + Packet dumpPacket = (response != null) ? response.copy(true) : null; + messageDumper.dump(MessageDumper.MessageType.Response, position.responseState, Converter.toString(dumpPacket), tubeId, Fiber.current().owner.id); + } + + return super.processResponse(response); + } + + @Override + public NextAction processException(Throwable t) { + if (messageDumper.isLoggable()) { + messageDumper.dump(MessageDumper.MessageType.Exception, position.responseState, Converter.toString(t), tubeId, Fiber.current().owner.id); + } + + return super.processException(t); + } + + @Override + public void preDestroy() { + super.preDestroy(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java new file mode 100644 index 00000000000..3d61bfc32a2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumper.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.dump; + +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Marek Potociar + */ +final class MessageDumper { + + static enum MessageType { + Request("Request message"), + Response("Response message"), + Exception("Response exception"); + + private final String name; + + private MessageType(final String name) { + this.name = name; + } + + @Override + public String toString() { + return name; + } + } + + static enum ProcessingState { + Received("received"), + Processed("processed"); + + private final String name; + + private ProcessingState(final String name) { + this.name = name; + } + + @Override + public String toString() { + return name; + } + } + + + private final String tubeName; + private final Logger logger; + private Level loggingLevel; + + + public MessageDumper(String tubeName, Logger logger, Level loggingLevel) { + this.tubeName = tubeName; + this.logger = logger; + this.loggingLevel = loggingLevel; + } + + final boolean isLoggable() { + return logger.isLoggable(loggingLevel); + } + + final void setLoggingLevel(Level level) { + this.loggingLevel = level; + } + + final String createLogMessage(MessageType messageType, ProcessingState processingState, int tubeId, String engineId, String message) { + return String.format("%s %s in Tube [ %s ] Instance [ %d ] Engine [ %s ] Thread [ %s ]:%n%s", + messageType, + processingState, + tubeName, + tubeId, + engineId, + Thread.currentThread().getName(), + message); + } + + final String dump(MessageType messageType, ProcessingState processingState, String message, int tubeId, String engineId) { + String logMessage = createLogMessage(messageType, processingState, tubeId, engineId, message); + logger.log(loggingLevel, logMessage); + + return logMessage; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingMode.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java similarity index 61% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingMode.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java index 46d4a9634b0..80e3fc962f8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/org/jvnet/ws/databinding/DatabindingMode.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumping.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,15 +23,40 @@ * questions. */ -package com.sun.xml.internal.org.jvnet.ws.databinding; +package com.sun.xml.internal.ws.dump; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; import javax.xml.ws.spi.WebServiceFeatureAnnotation; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; -@WebServiceFeatureAnnotation(id="", bean=com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingModeFeature.class) +/** + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -public @interface DatabindingMode { - String value(); +@WebServiceFeatureAnnotation(id = MessageDumpingFeature.ID, bean = MessageDumpingFeature.class) +public @interface MessageDumping { + /** + * Specifies if this feature is enabled or disabled. + */ + boolean enabled() default true; + + /** + * Message logging root + */ + String messageLoggingRoot() default MessageDumpingTube.DEFAULT_MSGDUMP_LOGGING_ROOT; + + /** + * Message logging level + */ + String messageLoggingLevel() default "FINE"; + + /** + * Turns on or off storing messages + */ + boolean storeMessages() default false; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java new file mode 100644 index 00000000000..c5bd7f7fb80 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingFeature.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.dump; + +import com.sun.xml.internal.ws.api.FeatureConstructor; +import com.sun.org.glassfish.gmbal.ManagedAttribute; +import com.sun.org.glassfish.gmbal.ManagedData; + +import javax.xml.ws.WebServiceFeature; +import java.util.Queue; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.logging.Level; + +/** + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +@ManagedData +public final class MessageDumpingFeature extends WebServiceFeature { + + public static final String ID = "com.sun.xml.internal.ws.messagedump.MessageDumpingFeature"; + // + private static final Level DEFAULT_MSG_LOG_LEVEL = Level.FINE; + // + private final Queue messageQueue; + private final AtomicBoolean messageLoggingStatus; + private final String messageLoggingRoot; + private final Level messageLoggingLevel; + + public MessageDumpingFeature() { + this(null, null, true); + } + + public MessageDumpingFeature(String msgLogRoot, Level msgLogLevel, boolean storeMessages) { + this.messageQueue = (storeMessages) ? new java.util.concurrent.ConcurrentLinkedQueue() : null; + this.messageLoggingStatus = new AtomicBoolean(true); + this.messageLoggingRoot = (msgLogRoot != null && msgLogRoot.length() > 0) ? msgLogRoot : MessageDumpingTube.DEFAULT_MSGDUMP_LOGGING_ROOT; + this.messageLoggingLevel = (msgLogLevel != null) ? msgLogLevel : DEFAULT_MSG_LOG_LEVEL; + + super.enabled = true; + } + + public MessageDumpingFeature(boolean enabled) { + // this constructor is here just to satisfy JAX-WS specification requirements + this(); + super.enabled = enabled; + } + + @FeatureConstructor({"enabled", "messageLoggingRoot", "messageLoggingLevel", "storeMessages"}) + public MessageDumpingFeature(boolean enabled, String msgLogRoot, String msgLogLevel, boolean storeMessages) { + // this constructor is here just to satisfy JAX-WS specification requirements + this(msgLogRoot, Level.parse(msgLogLevel), storeMessages); + + super.enabled = enabled; + } + + @Override + @ManagedAttribute + public String getID() { + return ID; + } + + public String nextMessage() { + return (messageQueue != null) ? messageQueue.poll() : null; + } + + public void enableMessageLogging() { + messageLoggingStatus.set(true); + } + + public void disableMessageLogging() { + messageLoggingStatus.set(false); + } + + @ManagedAttribute + public boolean getMessageLoggingStatus() { + return messageLoggingStatus.get(); + } + + @ManagedAttribute + public String getMessageLoggingRoot() { + return messageLoggingRoot; + } + + @ManagedAttribute + public Level getMessageLoggingLevel() { + return messageLoggingLevel; + } + + boolean offerMessage(String message) { + return (messageQueue != null) ? messageQueue.offer(message) : false; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java new file mode 100644 index 00000000000..9bebbdf499a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTube.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.dump; + +import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.pipe.Fiber; +import com.sun.xml.internal.ws.api.pipe.NextAction; +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.api.pipe.TubeCloner; +import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl; +import com.sun.xml.internal.ws.commons.xmlutil.Converter; +import com.sun.xml.internal.ws.dump.MessageDumper.MessageType; +import com.sun.xml.internal.ws.dump.MessageDumper.ProcessingState; + +import java.util.concurrent.atomic.AtomicInteger; + +/** + * + * @author Marek Potociar (marek.potociar at sun.com) + */ +final class MessageDumpingTube extends AbstractFilterTubeImpl { + static final String DEFAULT_MSGDUMP_LOGGING_ROOT = com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".messagedump"; + private static final AtomicInteger ID_GENERATOR = new AtomicInteger(0); + // + private final MessageDumper messageDumper; + private final int tubeId; + // + private final MessageDumpingFeature messageDumpingFeature; + /** + * @param name + * Specify the name that identifies this {@link MessageDumpingTube} + * instance. This string will be printed when this pipe + * dumps messages, and allows people to distinguish which + * pipe instance is dumping a message when multiple + * {@link com.sun.xml.internal.ws.util.pipe.DumpTube}s print messages out. + * @param out + * The output to send dumps to. + * @param next + * The next {@link com.sun.xml.internal.ws.api.pipe.Tube} in the pipeline. + */ + MessageDumpingTube(Tube next, MessageDumpingFeature feature) { + super(next); + + this.messageDumpingFeature = feature; + this.tubeId = ID_GENERATOR.incrementAndGet(); + this.messageDumper = new MessageDumper( + "MesageDumpingTube", + java.util.logging.Logger.getLogger(feature.getMessageLoggingRoot()), + feature.getMessageLoggingLevel()); + } + + /** + * Copy constructor. + */ + MessageDumpingTube(MessageDumpingTube that, TubeCloner cloner) { + super(that, cloner); + + + this.messageDumpingFeature = that.messageDumpingFeature; + this.tubeId = ID_GENERATOR.incrementAndGet(); + this.messageDumper = that.messageDumper; + } + + public MessageDumpingTube copy(TubeCloner cloner) { + return new MessageDumpingTube(this, cloner); + } + + @Override + public NextAction processRequest(Packet request) { + dump(MessageType.Request, Converter.toString(request), Fiber.current().owner.id); + return super.processRequest(request); + } + + @Override + public NextAction processResponse(Packet response) { + dump(MessageType.Response, Converter.toString(response), Fiber.current().owner.id); + return super.processResponse(response); + } + + @Override + public NextAction processException(Throwable t) { + dump(MessageType.Exception, Converter.toString(t), Fiber.current().owner.id); + + return super.processException(t); + } + + protected final void dump(MessageType messageType, String message, String engineId) { + String logMessage; + if (messageDumpingFeature.getMessageLoggingStatus()) { + messageDumper.setLoggingLevel(messageDumpingFeature.getMessageLoggingLevel()); + logMessage = messageDumper.dump(messageType, ProcessingState.Received, message, tubeId, engineId); + } else { + logMessage = messageDumper.createLogMessage(messageType, ProcessingState.Received, tubeId, engineId, message); + } + messageDumpingFeature.offerMessage(logMessage); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java new file mode 100644 index 00000000000..b2c69871c24 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/dump/MessageDumpingTubeFactory.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.dump; + +import com.sun.xml.internal.ws.api.pipe.Tube; +import com.sun.xml.internal.ws.assembler.dev.ClientTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.ServerTubelineAssemblyContext; +import com.sun.xml.internal.ws.assembler.dev.TubeFactory; + +import javax.xml.ws.WebServiceException; + +public final class MessageDumpingTubeFactory implements TubeFactory { + + public Tube createTube(ClientTubelineAssemblyContext context) throws WebServiceException { + MessageDumpingFeature messageDumpingFeature = context.getBinding().getFeature(MessageDumpingFeature.class); + if (messageDumpingFeature != null) { + return new MessageDumpingTube(context.getTubelineHead(), messageDumpingFeature); + } + + return context.getTubelineHead(); + } + + public Tube createTube(ServerTubelineAssemblyContext context) throws WebServiceException { + MessageDumpingFeature messageDumpingFeature = context.getEndpoint().getBinding().getFeature(MessageDumpingFeature.class); + if (messageDumpingFeature != null) { + return new MessageDumpingTube(context.getTubelineHead(), messageDumpingFeature); + } + + return context.getTubelineHead(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java index 783e762b975..9b36d830621 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java index a44d81d269c..5c62d0c21d9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ContentTypeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,8 +34,12 @@ import com.sun.istack.internal.NotNull; public final class ContentTypeImpl implements com.sun.xml.internal.ws.api.pipe.ContentType { private final @NotNull String contentType; private final @NotNull String soapAction; - private final @Nullable String accept; + private String accept; private final @Nullable String charset; + private String boundary; + private String boundaryParameter; + private String rootId; + private ContentType internalContentType; public ContentTypeImpl(String contentType) { this(contentType, null, null); @@ -56,7 +60,8 @@ public final class ContentTypeImpl implements com.sun.xml.internal.ws.api.pipe.C if (charsetParam == null) { String tmpCharset = null; try { - tmpCharset = new ContentType(contentType).getParameter("charset"); + internalContentType = new ContentType(contentType); + tmpCharset = internalContentType.getParameter("charset"); } catch(Exception e) { //Ignore the parsing exception. } @@ -87,18 +92,57 @@ public final class ContentTypeImpl implements com.sun.xml.internal.ws.api.pipe.C } } + @Override public String getContentType() { return contentType; } + @Override public String getSOAPActionHeader() { return soapAction; } + @Override public String getAcceptHeader() { return accept; } + public void setAcceptHeader(String accept) { + this.accept = accept; + } + + public String getBoundary() { + if (boundary == null) { + if (internalContentType == null) internalContentType = new ContentType(contentType); + boundary = internalContentType.getParameter("boundary"); + } + return boundary; + } + + public void setBoundary(String boundary) { + this.boundary = boundary; + } + + public String getBoundaryParameter() { + return boundaryParameter; + } + + public void setBoundaryParameter(String boundaryParameter) { + this.boundaryParameter = boundaryParameter; + } + + public String getRootId() { + if (rootId == null) { + if (internalContentType == null) internalContentType = new ContentType(contentType); + rootId = internalContentType.getParameter("start"); + } + return rootId; + } + + public void setRootId(String rootId) { + this.rootId = rootId; + } + public static class Builder { public String contentType; public String soapAction; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java index fea70fabfd7..f42513b06e4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataHandlerDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java index daafa0f0bd3..53d53a810f0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/DataSourceStreamingDataHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ package com.sun.xml.internal.ws.encoding; -import com.sun.xml.internal.org.jvnet.mimepull.MIMEPart; - import javax.activation.DataSource; import java.io.*; @@ -41,22 +39,30 @@ public class DataSourceStreamingDataHandler extends StreamingDataHandler { super(ds); } + @Override public InputStream readOnce() throws IOException { return getInputStream(); } + @Override public void moveTo(File file) throws IOException { InputStream in = getInputStream(); OutputStream os = new FileOutputStream(file); - byte[] temp = new byte[8192]; - int len; - while((len=in.read(temp)) != -1) { - os.write(temp, 0, len); + try { + byte[] temp = new byte[8192]; + int len; + while((len=in.read(temp)) != -1) { + os.write(temp, 0, len); + } + in.close(); + } finally { + if (os != null) { + os.close(); + } } - in.close(); - os.close(); } + @Override public void close() throws IOException { // nothing to do here } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java index a1f5f26f181..fbe9676ec57 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HasEncoding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java index 3f1d503358a..350f2137ebb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/HeaderTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java index 6c31f8ecf7e..35b70d28537 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ImageDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java index f8f4bff47e9..02b452a24c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MIMEPartStreamingDataHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -62,14 +62,17 @@ public class MIMEPartStreamingDataHandler extends StreamingDataHandler { ds = (StreamingDataSource)getDataSource(); } + @Override public InputStream readOnce() throws IOException { return ds.readOnce(); } + @Override public void moveTo(File file) throws IOException { ds.moveTo(file); } + @Override public void close() throws IOException { ds.close(); } @@ -81,6 +84,7 @@ public class MIMEPartStreamingDataHandler extends StreamingDataHandler { this.part = part; } + @Override public InputStream getInputStream() throws IOException { return part.read(); //readOnce() ?? } @@ -97,14 +101,17 @@ public class MIMEPartStreamingDataHandler extends StreamingDataHandler { part.moveTo(file); } + @Override public OutputStream getOutputStream() throws IOException { return null; } + @Override public String getContentType() { return part.getContentType(); } + @Override public String getName() { return ""; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java index 1dd62ae1d08..f060a34fdb0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,12 +92,8 @@ abstract class MimeCodec implements Codec { public static final String MULTIPART_RELATED_MIME_TYPE = "multipart/related"; - private String boundary; - private String messageContentType; - private boolean hasAttachments; - protected Codec rootCodec; + protected Codec mimeRootCodec; protected final SOAPVersion version; -// protected final WSBinding binding; protected final WSFeatureList features; protected MimeCodec(SOAPVersion version, WSFeatureList f) { @@ -109,6 +105,10 @@ abstract class MimeCodec implements Codec { return MULTIPART_RELATED_MIME_TYPE; } + protected Codec getMimeRootCodec(Packet packet) { + return mimeRootCodec; + } + // TODO: preencode String literals to byte[] so that they don't have to // go through char[]->byte[] conversion at runtime. public ContentType encode(Packet packet, OutputStream out) throws IOException { @@ -116,7 +116,10 @@ abstract class MimeCodec implements Codec { if (msg == null) { return null; } - + ContentTypeImpl ctImpl = (ContentTypeImpl)getStaticContentType(packet); + String boundary = ctImpl.getBoundary(); + boolean hasAttachments = (boundary != null); + Codec rootCodec = getMimeRootCodec(packet); if (hasAttachments) { writeln("--"+boundary, out); ContentType ct = rootCodec.getStaticContentType(packet); @@ -148,7 +151,7 @@ abstract class MimeCodec implements Codec { writeAsAscii("--", out); } // TODO not returing correct multipart/related type(no boundary) - return hasAttachments ? new ContentTypeImpl(messageContentType, packet.soapAction, null) : primaryCt; + return hasAttachments ? ctImpl : primaryCt; } private void writeCustomMimeHeaders(Attachment att, OutputStream out) throws IOException { @@ -166,19 +169,28 @@ abstract class MimeCodec implements Codec { } public ContentType getStaticContentType(Packet packet) { + ContentType ct = (ContentType) packet.getInternalContentType(); + if ( ct != null ) return ct; Message msg = packet.getMessage(); - hasAttachments = !msg.getAttachments().isEmpty(); + boolean hasAttachments = !msg.getAttachments().isEmpty(); + Codec rootCodec = getMimeRootCodec(packet); if (hasAttachments) { - boundary = "uuid:" + UUID.randomUUID().toString(); + String boundary = "uuid:" + UUID.randomUUID().toString(); String boundaryParameter = "boundary=\"" + boundary + "\""; // TODO use primaryEncoder to get type - messageContentType = MULTIPART_RELATED_MIME_TYPE + + String messageContentType = MULTIPART_RELATED_MIME_TYPE + "; type=\"" + rootCodec.getMimeType() + "\"; " + boundaryParameter; - return new ContentTypeImpl(messageContentType, packet.soapAction, null); + ContentTypeImpl impl = new ContentTypeImpl(messageContentType, packet.soapAction, null); + impl.setBoundary(boundary); + impl.setBoundaryParameter(boundaryParameter); + packet.setContentType(impl); + return impl; } else { - return rootCodec.getStaticContentType(packet); + ct = rootCodec.getStaticContentType(packet); + packet.setContentType(ct); + return ct; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java index 4468e41fa9d..ca0ee816415 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MimeMultipartParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,6 @@ package com.sun.xml.internal.ws.encoding; - import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.message.Attachment; @@ -53,6 +52,8 @@ import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Parses Mime multipart message into primary part and attachment parts. It @@ -66,15 +67,18 @@ public final class MimeMultipartParser { private final String start; private final MIMEMessage message; private Attachment root; + private ContentTypeImpl contentType; // Attachments without root part private final Map attachments = new HashMap(); private boolean gotAll; - public MimeMultipartParser(InputStream in, String contentType, StreamingAttachmentFeature feature) { - ContentType ct = new ContentType(contentType); - String boundary = ct.getParameter("boundary"); + public MimeMultipartParser(InputStream in, String cType, StreamingAttachmentFeature feature) { + this.contentType = new ContentTypeImpl(cType); +// ContentType ct = new ContentType(cType); +// String boundary = ct.getParameter("boundary"); + String boundary = contentType.getBoundary(); if (boundary == null || boundary.equals("")) { throw new WebServiceException("MIME boundary parameter not found" + contentType); } @@ -82,7 +86,8 @@ public final class MimeMultipartParser { ? new MIMEMessage(in, boundary, feature.getConfig()) : new MIMEMessage(in, boundary); // Strip <...> from root part's Content-ID - String st = ct.getParameter("start"); +// String st = ct.getParameter("start"); + String st = contentType.getRootId(); if (st != null && st.length() > 2 && st.charAt(0) == '<' && st.charAt(st.length()-1) == '>') { st = st.substring(1, st.length()-1); } @@ -116,8 +121,11 @@ public final class MimeMultipartParser { List parts = message.getAttachments(); for(MIMEPart part : parts) { if (part != rootPart) { - PartAttachment attach = new PartAttachment(part); - attachments.put(attach.getContentId(), attach); + String cid = part.getContentId(); + if (!attachments.containsKey(cid)) { + PartAttachment attach = new PartAttachment(part); + attachments.put(attach.getContentId(), attach); + } } } gotAll = true; @@ -147,19 +155,21 @@ public final class MimeMultipartParser { final MIMEPart part; byte[] buf; + private StreamingDataHandler streamingDataHandler; PartAttachment(MIMEPart part) { this.part = part; } - public @NotNull String getContentId() { + public @NotNull @Override String getContentId() { return part.getContentId(); } - public @NotNull String getContentType() { + public @NotNull @Override String getContentType() { return part.getContentType(); } + @Override public byte[] asByteArray() { if (buf == null) { ByteArrayBuffer baf = new ByteArrayBuffer(); @@ -167,29 +177,44 @@ public final class MimeMultipartParser { baf.write(part.readOnce()); } catch(IOException ioe) { throw new WebServiceException(ioe); + } finally { + if (baf != null) { + try { + baf.close(); + } catch (IOException ex) { + Logger.getLogger(MimeMultipartParser.class.getName()).log(Level.FINE, null, ex); + } + } } buf = baf.toByteArray(); } return buf; } + @Override public DataHandler asDataHandler() { - return (buf != null) - ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType())) - : new MIMEPartStreamingDataHandler(part); + if (streamingDataHandler == null) { + streamingDataHandler = (buf != null) + ? new DataSourceStreamingDataHandler(new ByteArrayDataSource(buf,getContentType())) + : new MIMEPartStreamingDataHandler(part); + } + return streamingDataHandler; } + @Override public Source asSource() { return (buf != null) ? new StreamSource(new ByteArrayInputStream(buf)) : new StreamSource(part.read()); } + @Override public InputStream asInputStream() { return (buf != null) ? new ByteArrayInputStream(buf) : part.read(); } + @Override public void writeTo(OutputStream os) throws IOException { if (buf != null) { os.write(buf); @@ -204,31 +229,38 @@ public final class MimeMultipartParser { } } + @Override public void writeTo(SOAPMessage saaj) throws SOAPException { saaj.createAttachmentPart().setDataHandler(asDataHandler()); } // AttachmentEx methods begin here + @Override public Iterator getMimeHeaders() { final Iterator ih = part.getAllHeaders() .iterator(); return new Iterator() { + @Override public boolean hasNext() { return ih.hasNext(); } + @Override public MimeHeader next() { final Header hdr = ih.next(); return new AttachmentEx.MimeHeader() { + @Override public String getValue() { return hdr.getValue(); } + @Override public String getName() { return hdr.getName(); } }; } + @Override public void remove() { throw new UnsupportedOperationException(); } @@ -236,4 +268,8 @@ public final class MimeMultipartParser { } } + public ContentTypeImpl getContentType() { + return contentType; + } + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java index d8902ef059d..af084c5ac83 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/MtomCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,7 @@ import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec; import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory; import com.sun.xml.internal.ws.developer.SerializationFeature; +import com.sun.xml.internal.ws.developer.StreamingDataHandler; import com.sun.xml.internal.ws.message.MimeAttachmentSet; import com.sun.xml.internal.ws.streaming.XMLStreamWriterUtil; import com.sun.xml.internal.ws.util.ByteArrayDataSource; @@ -45,7 +46,6 @@ import com.sun.xml.internal.ws.util.xml.XMLStreamWriterFilter; import com.sun.xml.internal.ws.streaming.MtomStreamWriter; import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; import com.sun.xml.internal.ws.server.UnsupportedMediaException; -import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getFeature; import com.sun.xml.internal.org.jvnet.staxex.Base64Data; import com.sun.xml.internal.org.jvnet.staxex.NamespaceContextEx; import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx; @@ -58,7 +58,6 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import javax.xml.ws.WebServiceException; -import javax.xml.ws.WebServiceFeature; import javax.xml.ws.soap.MTOMFeature; import javax.xml.bind.attachment.AttachmentMarshaller; import java.io.IOException; @@ -74,7 +73,7 @@ import java.util.Map; import java.util.UUID; /** - * Mtom messge Codec. It can be used even for non-soap message's mtom encoding. + * Mtom message Codec. It can be used even for non-soap message's mtom encoding. * * @author Vivek Pandey * @author Jitendra Kotamraju @@ -86,10 +85,6 @@ public class MtomCodec extends MimeCodec { private static final String XOP_NAMESPACEURI = "http://www.w3.org/2004/08/xop/include"; private final StreamSOAPCodec codec; - - // encoding related parameters - private String boundary; - private String rootId; private final MTOMFeature mtomFeature; private final SerializationFeature sf; private final static String DECODED_MESSAGE_CHARSET = "decodedMessageCharset"; @@ -97,7 +92,6 @@ public class MtomCodec extends MimeCodec { MtomCodec(SOAPVersion version, StreamSOAPCodec codec, WSFeatureList features){ super(version, features); this.codec = codec; - createConteTypeHeader(); sf = features.get(SerializationFeature.class); MTOMFeature mtom = features.get(MTOMFeature.class); if(mtom == null) @@ -106,74 +100,68 @@ public class MtomCodec extends MimeCodec { this.mtomFeature = mtom; } - private void createConteTypeHeader(){ + /** + * Return the soap 1.1 and soap 1.2 specific XOP packaged ContentType + * + * @return A non-null content type for soap11 or soap 1.2 content type + */ + @Override + public ContentType getStaticContentType(Packet packet) { + return getStaticContentTypeStatic(packet, version); + } + + public static ContentType getStaticContentTypeStatic(Packet packet, SOAPVersion version) { + ContentType ct = (ContentType) packet.getInternalContentType(); + if ( ct != null ) return ct; + String uuid = UUID.randomUUID().toString(); - boundary = "uuid:" + uuid; - rootId = ""; - } + String boundary = "uuid:" + uuid; + String rootId = ""; + String soapActionParameter = SOAPVersion.SOAP_11.equals(version) ? null : createActionParameter(packet); - private String createMessageContentType() { - return createMessageContentType(null); - } - - private String createMessageContentType(String soapActionParameter) { String boundaryParameter = "boundary=\"" + boundary +"\""; - return MULTIPART_RELATED_MIME_TYPE + + String messageContentType = MULTIPART_RELATED_MIME_TYPE + ";start=\""+rootId +"\"" + ";type=\"" + XOP_XML_MIME_TYPE + "\";" + boundaryParameter + ";start-info=\"" + version.contentType + (soapActionParameter == null? "" : soapActionParameter) + "\""; + + ContentTypeImpl ctImpl = SOAPVersion.SOAP_11.equals(version) ? + new ContentTypeImpl(messageContentType, (packet.soapAction == null)?"":packet.soapAction, null) : + new ContentTypeImpl(messageContentType, null, null); + ctImpl.setBoundary(boundary); + ctImpl.setRootId(rootId); + packet.setContentType(ctImpl); + return ctImpl; } - - /** - * Return the soap 1.1 and soap 1.2 specific XOP packaged ContentType - * - * @return A non-null content type for soap11 or soap 1.2 content type - */ - public ContentType getStaticContentType(Packet packet) { - return getContentType(packet); - } - - private ContentType getContentType(Packet packet){ - switch(version){ - case SOAP_11: - return new ContentTypeImpl(createMessageContentType(), (packet.soapAction == null)?"":packet.soapAction, null); - case SOAP_12: - return new ContentTypeImpl(createMessageContentType(createActionParameter(packet)), null, null); - } - //never happens - return null; - } - - private String createActionParameter(Packet packet) { + private static String createActionParameter(Packet packet) { return packet.soapAction != null? ";action=\\\""+packet.soapAction+"\\\"" : ""; } + @Override public ContentType encode(Packet packet, OutputStream out) throws IOException { - //get the current boundary thaat will be reaturned from this method - ContentType contentType = getContentType(packet); + ContentTypeImpl ctImpl = (ContentTypeImpl) this.getStaticContentType(packet); + String boundary = ctImpl.getBoundary(); + String rootId = ctImpl.getRootId(); if(packet.getMessage() != null){ try { String encoding = getPacketEncoding(packet); packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET); - String actionParameter = version == SOAPVersion.SOAP_11? "" : createActionParameter(packet); - String soapXopContentType = XOP_XML_MIME_TYPE +";charset="+encoding+";type=\""+version.contentType+ actionParameter + "\""; + String actionParameter = getActionParameter(packet, version); + String soapXopContentType = getSOAPXopContentType(encoding, version, actionParameter); writeln("--"+boundary, out); - writeln("Content-Id: " + rootId, out); - writeln("Content-Type: "+ soapXopContentType, out); - writeln("Content-Transfer-Encoding: binary", out); - writeln(out); + writeMimeHeaders(soapXopContentType, rootId, out); //mtom attachments that need to be written after the root part List mtomAttachments = new ArrayList(); MtomStreamWriterImpl writer = new MtomStreamWriterImpl( - XMLStreamWriterFactory.create(out, encoding), mtomAttachments); + XMLStreamWriterFactory.create(out, encoding), mtomAttachments, boundary, mtomFeature); packet.getMessage().writeTo(writer); XMLStreamWriterFactory.recycle(writer); @@ -184,7 +172,7 @@ public class MtomCodec extends MimeCodec { } //now write out the attachments in the message - writeAttachments(packet.getMessage().getAttachments(),out); + writeAttachments(packet.getMessage().getAttachments(),out, boundary); //write out the end boundary writeAsAscii("--"+boundary, out); @@ -195,21 +183,32 @@ public class MtomCodec extends MimeCodec { } } //now create the boundary for next encode() call - createConteTypeHeader(); - return contentType; +// createConteTypeHeader(); + return ctImpl; } - private class ByteArrayBuffer{ + public static String getSOAPXopContentType(String encoding, SOAPVersion version, + String actionParameter) { + return XOP_XML_MIME_TYPE +";charset="+encoding+";type=\""+version.contentType+ actionParameter + "\""; + } + + public static String getActionParameter(Packet packet, SOAPVersion version) { + return (version == SOAPVersion.SOAP_11) ? "" : createActionParameter(packet); + } + + public static class ByteArrayBuffer{ final String contentId; - private DataHandler dh; + private final DataHandler dh; + private final String boundary; - ByteArrayBuffer(@NotNull DataHandler dh) { + ByteArrayBuffer(@NotNull DataHandler dh, String b) { this.dh = dh; this.contentId = encodeCid(); + boundary = b; } - void write(OutputStream os) throws IOException { + public void write(OutputStream os) throws IOException { //build attachment frame writeln("--"+boundary, os); writeMimeHeaders(dh.getContentType(), contentId, os); @@ -218,7 +217,7 @@ public class MtomCodec extends MimeCodec { } } - private void writeMimeHeaders(String contentType, String contentId, OutputStream out) throws IOException { + public static void writeMimeHeaders(String contentType, String contentId, OutputStream out) throws IOException { String cid = contentId; if(cid != null && cid.length() >0 && cid.charAt(0) != '<') cid = '<' + cid + '>'; @@ -228,7 +227,7 @@ public class MtomCodec extends MimeCodec { writeln(out); } - private void writeAttachments(AttachmentSet attachments, OutputStream out) throws IOException { + private void writeAttachments(AttachmentSet attachments, OutputStream out, String boundary) throws IOException { for(Attachment att : attachments){ //build attachment frame writeln("--"+boundary, out); @@ -238,15 +237,17 @@ public class MtomCodec extends MimeCodec { } } + @Override public ContentType encode(Packet packet, WritableByteChannel buffer) { throw new UnsupportedOperationException(); } + @Override public MtomCodec copy() { return new MtomCodec(version, (StreamSOAPCodec)codec.copy(), features); } - private String encodeCid(){ + private static String encodeCid(){ String cid="example.jaxws.sun.com"; String name = UUID.randomUUID()+"@"; return name + cid; @@ -278,7 +279,8 @@ public class MtomCodec extends MimeCodec { ); packet.setMessage(codec.decode(mtomReader, new MimeAttachmentSet(mpp))); - + packet.setMtomFeature(mtomFeature); + packet.setContentType(mpp.getContentType()); } private String getPacketEncoding(Packet packet) { @@ -286,7 +288,10 @@ public class MtomCodec extends MimeCodec { if (sf != null && sf.getEncoding() != null) { return sf.getEncoding().equals("") ? SOAPBindingCodec.DEFAULT_ENCODING : sf.getEncoding(); } + return determinePacketEncoding(packet); + } + public static String determinePacketEncoding(Packet packet) { if (packet != null && packet.endpoint != null) { // Use request message's encoding for Server-side response messages String charset = (String)packet.invocationProperties.get(DECODED_MESSAGE_CHARSET); @@ -298,34 +303,41 @@ public class MtomCodec extends MimeCodec { return SOAPBindingCodec.DEFAULT_ENCODING; } - private class MtomStreamWriterImpl extends XMLStreamWriterFilter implements XMLStreamWriterEx, + public static class MtomStreamWriterImpl extends XMLStreamWriterFilter implements XMLStreamWriterEx, MtomStreamWriter, HasEncoding { private final List mtomAttachments; - - public MtomStreamWriterImpl(XMLStreamWriter w, List mtomAttachments) { + private final String boundary; + private final MTOMFeature myMtomFeature; + public MtomStreamWriterImpl(XMLStreamWriter w, List mtomAttachments, String b, MTOMFeature myMtomFeature) { super(w); this.mtomAttachments = mtomAttachments; + this.boundary = b; + this.myMtomFeature = myMtomFeature; } + @Override public void writeBinary(byte[] data, int start, int len, String contentType) throws XMLStreamException { //check threshold and if less write as base64encoded value - if(mtomFeature.getThreshold() > len){ + if(myMtomFeature.getThreshold() > len){ writeCharacters(DatatypeConverterImpl._printBase64Binary(data, start, len)); return; } - ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType))); + ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, start, len, contentType)), boundary); writeBinary(bab); } + @Override public void writeBinary(DataHandler dataHandler) throws XMLStreamException { // TODO how do we check threshold and if less inline the data - writeBinary(new ByteArrayBuffer(dataHandler)); + writeBinary(new ByteArrayBuffer(dataHandler, boundary)); } + @Override public OutputStream writeBinary(String contentType) throws XMLStreamException { throw new UnsupportedOperationException(); } + @Override public void writePCDATA(CharSequence data) throws XMLStreamException { if(data == null) return; @@ -368,29 +380,33 @@ public class MtomCodec extends MimeCodec { * While writing, it calls the AttachmentMarshaller methods for adding attachments. * JAXB writes xop:Include in this case. */ + @Override public AttachmentMarshaller getAttachmentMarshaller() { return new AttachmentMarshaller() { + @Override public String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName) { // Should we do the threshold processing on DataHandler ? But that would be // expensive as DataHolder need to read the data again from its source - ByteArrayBuffer bab = new ByteArrayBuffer(data); + ByteArrayBuffer bab = new ByteArrayBuffer(data, boundary); mtomAttachments.add(bab); return "cid:"+bab.contentId; } + @Override public String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName) { // inline the data based on the threshold - if (mtomFeature.getThreshold() > length) { + if (myMtomFeature.getThreshold() > length) { return null; // JAXB inlines the attachment data } - ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, offset, length, mimeType))); + ByteArrayBuffer bab = new ByteArrayBuffer(new DataHandler(new ByteArrayDataSource(data, offset, length, mimeType)), boundary); mtomAttachments.add(bab); return "cid:"+bab.contentId; } + @Override public String addSwaRefAttachment(DataHandler data) { - ByteArrayBuffer bab = new ByteArrayBuffer(data); + ByteArrayBuffer bab = new ByteArrayBuffer(data, boundary); mtomAttachments.add(bab); return "cid:"+bab.contentId; } @@ -402,29 +418,38 @@ public class MtomCodec extends MimeCodec { }; } + public List getMtomAttachments() { + return this.mtomAttachments; + } + + @Override public String getEncoding() { return XMLStreamWriterUtil.getEncoding(writer); } - private class MtomNamespaceContextEx implements NamespaceContextEx { - private NamespaceContext nsContext; + private static class MtomNamespaceContextEx implements NamespaceContextEx { + private final NamespaceContext nsContext; public MtomNamespaceContextEx(NamespaceContext nsContext) { this.nsContext = nsContext; } + @Override public Iterator iterator() { throw new UnsupportedOperationException(); } + @Override public String getNamespaceURI(String prefix) { return nsContext.getNamespaceURI(prefix); } + @Override public String getPrefix(String namespaceURI) { return nsContext.getPrefix(namespaceURI); } + @Override public Iterator getPrefixes(String namespaceURI) { return nsContext.getPrefixes(namespaceURI); } @@ -437,7 +462,7 @@ public class MtomCodec extends MimeCodec { } } - private static class MtomXMLStreamReaderEx extends XMLStreamReaderFilter implements XMLStreamReaderEx { + public static class MtomXMLStreamReaderEx extends XMLStreamReaderFilter implements XMLStreamReaderEx { /** * The parser for the outer MIME 'shell'. */ @@ -449,11 +474,14 @@ public class MtomCodec extends MimeCodec { //To be used with #getTextCharacters private char[] base64EncodedText; + private String xopHref; + public MtomXMLStreamReaderEx(MimeMultipartParser mimeMP, XMLStreamReader reader) { super(reader); this.mimeMP = mimeMP; } + @Override public CharSequence getPCDATA() throws XMLStreamException { if(xopReferencePresent){ return base64AttData; @@ -461,40 +489,47 @@ public class MtomCodec extends MimeCodec { return reader.getText(); } + @Override public NamespaceContextEx getNamespaceContext() { NamespaceContext nsContext = reader.getNamespaceContext(); return new MtomNamespaceContextEx(nsContext); } + @Override public String getElementTextTrim() throws XMLStreamException { throw new UnsupportedOperationException(); } private static class MtomNamespaceContextEx implements NamespaceContextEx { - private NamespaceContext nsContext; + private final NamespaceContext nsContext; public MtomNamespaceContextEx(NamespaceContext nsContext) { this.nsContext = nsContext; } + @Override public Iterator iterator() { throw new UnsupportedOperationException(); } + @Override public String getNamespaceURI(String prefix) { return nsContext.getNamespaceURI(prefix); } + @Override public String getPrefix(String namespaceURI) { return nsContext.getPrefix(namespaceURI); } + @Override public Iterator getPrefixes(String namespaceURI) { return nsContext.getPrefixes(namespaceURI); } } + @Override public int getTextLength() { if (xopReferencePresent) { return base64AttData.length(); @@ -502,6 +537,7 @@ public class MtomCodec extends MimeCodec { return reader.getTextLength(); } + @Override public int getTextStart() { if (xopReferencePresent) { return 0; @@ -509,22 +545,29 @@ public class MtomCodec extends MimeCodec { return reader.getTextStart(); } + @Override public int getEventType() { if(xopReferencePresent) return XMLStreamConstants.CHARACTERS; return super.getEventType(); } + @Override public int next() throws XMLStreamException { int event = reader.next(); if (event == XMLStreamConstants.START_ELEMENT && reader.getLocalName().equals(XOP_LOCALNAME) && reader.getNamespaceURI().equals(XOP_NAMESPACEURI)) { //its xop reference, take the URI reference String href = reader.getAttributeValue(null, "href"); try { + xopHref = href; Attachment att = getAttachment(href); if(att != null){ + DataHandler dh = att.asDataHandler(); + if (dh instanceof StreamingDataHandler) { + ((StreamingDataHandler)dh).setHrefCid(att.getContentId()); + } base64AttData = new Base64Data(); - base64AttData.set(att.asDataHandler()); + base64AttData.set(dh); } xopReferencePresent = true; } catch (IOException e) { @@ -537,6 +580,7 @@ public class MtomCodec extends MimeCodec { if(xopReferencePresent){ xopReferencePresent = false; base64EncodedText = null; + xopHref = null; } return event; } @@ -560,6 +604,7 @@ public class MtomCodec extends MimeCodec { return mimeMP.getAttachmentPart(cid); } + @Override public char[] getTextCharacters() { if (xopReferencePresent) { char[] chars = new char[base64AttData.length()]; @@ -569,6 +614,7 @@ public class MtomCodec extends MimeCodec { return reader.getTextCharacters(); } + @Override public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException { if(xopReferencePresent){ if(target == null){ @@ -596,12 +642,25 @@ public class MtomCodec extends MimeCodec { return reader.getTextCharacters(sourceStart, target, targetStart, length); } + @Override public String getText() { if (xopReferencePresent) { return base64AttData.toString(); } return reader.getText(); } + + protected boolean isXopReference() throws XMLStreamException { + return xopReferencePresent; + } + + protected String getXopHref() { + return xopHref; + } + + public MimeMultipartParser getMimeMultipartParser() { + return mimeMP; + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java index d10bcddfa51..68c612538d3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/ParameterList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java index 6e600ac5c32..1d6ea0a0bea 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/RootOnlyCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java index b5183746f3d..706cff25ce0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SOAPBindingCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,7 @@ import java.io.OutputStream; import java.lang.reflect.Method; import java.nio.channels.ReadableByteChannel; import java.nio.channels.WritableByteChannel; -import java.util.StringTokenizer; +//import java.util.StringTokenizer; /** * SOAP binding {@link Codec} that can handle MTOM, SwA, and SOAP messages @@ -74,28 +74,6 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. public static final String UTF8_ENCODING = "utf-8"; public static final String DEFAULT_ENCODING = UTF8_ENCODING; - /** - * Based on request's Accept header this is set. - * Currently only set if MTOMFeature is enabled. - * - * Should be used on server-side, for encoding the response. - */ - private boolean acceptMtomMessages; - - /** - * If the request's Content-Type is multipart/related; type=application/xop+xml, then this set to to true - * - * Used on server-side, for encoding the repsonse. - */ - private boolean isRequestMtomMessage; - - private enum TriState {UNSET,TRUE,FALSE} - - /** - * This captures is decode is called before encode, - * if true, infers that this is being used on Server-side - */ - private TriState decodeFirst = TriState.UNSET; /** * True if Fast Infoset functionality has been @@ -132,9 +110,6 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. // The Fast Infoset SWA codec private final MimeCodec fiSwaCodec; -// private final SOAPBindingImpl binding; -// private final WebServiceFeature[] feature; - /** * The XML SOAP MIME type */ @@ -159,35 +134,17 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. return xmlSoapCodec; } - private class AcceptContentType implements ContentType { - private ContentType _c; - private String _accept; - - public AcceptContentType set(Packet p, ContentType c) { - if (!ignoreContentNegotiationProperty && p.contentNegotiation != ContentNegotiation.none) { - _accept = connegXmlAccept; - } else { - _accept = xmlAccept; - } - _c = c; - return this; - } - - public String getContentType() { - return _c.getContentType(); - } - - public String getSOAPActionHeader() { - return _c.getSOAPActionHeader(); - } - - public String getAcceptHeader() { - return _accept; + private ContentTypeImpl setAcceptHeader(Packet p, ContentTypeImpl c) { + String _accept; + if (!ignoreContentNegotiationProperty && p.contentNegotiation != ContentNegotiation.none) { + _accept = connegXmlAccept; + } else { + _accept = xmlAccept; } + c.setAcceptHeader(_accept); + return c; } - private AcceptContentType _adaptingContentType = new AcceptContentType(); - public SOAPBindingCodec(WSFeatureList features) { this(features, Codecs.createSOAPEnvelopeXmlCodec(features)); } @@ -252,10 +209,8 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. xmlAccept = clientAcceptedContentTypes; -// if(!(binding instanceof SOAPBindingImpl)) if(getSoapVersion(features) == null) throw new WebServiceException("Expecting a SOAP binding but found "); -// this.binding = (SOAPBindingImpl)binding; } public String getMimeType() { @@ -264,19 +219,21 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. public ContentType getStaticContentType(Packet packet) { ContentType toAdapt = getEncoder(packet).getStaticContentType(packet); - return (toAdapt != null) ? _adaptingContentType.set(packet, toAdapt) : null; + return setAcceptHeader(packet, (ContentTypeImpl)toAdapt); } public ContentType encode(Packet packet, OutputStream out) throws IOException { preEncode(packet); - ContentType ct = _adaptingContentType.set(packet, getEncoder(packet).encode(packet, out)); + ContentType ct = getEncoder(packet).encode(packet, out); + ct = setAcceptHeader(packet, (ContentTypeImpl)ct); postEncode(); return ct; } public ContentType encode(Packet packet, WritableByteChannel buffer) { preEncode(packet); - ContentType ct = _adaptingContentType.set(packet, getEncoder(packet).encode(packet, buffer)); + ContentType ct = getEncoder(packet).encode(packet, buffer); + ct = setAcceptHeader(packet, (ContentTypeImpl)ct); postEncode(); return ct; } @@ -286,8 +243,6 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. * Set the state so that such state is used by encode process. */ private void preEncode(Packet p) { - if (decodeFirst == TriState.UNSET) - decodeFirst = TriState.FALSE; } /** @@ -295,9 +250,6 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. * Reset the encoding state. */ private void postEncode() { - decodeFirst = TriState.UNSET; - acceptMtomMessages = false; - isRequestMtomMessage = false; } /** @@ -314,25 +266,24 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. * Set the state so that such state is used by encode(). */ private void postDecode(Packet p) { - if(decodeFirst == TriState.UNSET) - decodeFirst = TriState.TRUE; - if(features.isEnabled(MTOMFeature.class)) - acceptMtomMessages =isMtomAcceptable(p.acceptableMimeTypes); - if (!useFastInfosetForEncoding) { - useFastInfosetForEncoding = isFastInfosetAcceptable(p.acceptableMimeTypes); + p.setFastInfosetDisabled(isFastInfosetDisabled); + if(features.isEnabled(MTOMFeature.class)) p.checkMtomAcceptable(); +// p.setMtomAcceptable( isMtomAcceptable(p.acceptableMimeTypes) ); + MTOMFeature mtomFeature = features.get(MTOMFeature.class); + if (mtomFeature != null) { + p.setMtomFeature(mtomFeature); + } + if (!useFastInfosetForEncoding) { + useFastInfosetForEncoding = p.getFastInfosetAcceptable(fiMimeType); +// useFastInfosetForEncoding = isFastInfosetAcceptable(p.acceptableMimeTypes); } - } - - - private boolean isServerSide() { - return decodeFirst == TriState.TRUE; } public void decode(InputStream in, String contentType, Packet packet) throws IOException { if (contentType == null) { contentType = xmlMimeType; } - + packet.setContentType(new ContentTypeImpl(contentType)); preDecode(packet); try { if(isMultipartRelated(contentType)) @@ -391,9 +342,9 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException { // is this SwA or XOP? final String rootContentType = mpp.getRootPart().getContentType(); - - if(isApplicationXopXml(rootContentType)) { - isRequestMtomMessage = true; + boolean isMTOM = isApplicationXopXml(rootContentType); + packet.setMtomRequest(isMTOM); + if(isMTOM) { xmlMtomCodec.decode(mpp,packet); } else if (isFastInfoset(rootContentType)) { if (packet.contentNegotiation == ContentNegotiation.none) @@ -435,35 +386,34 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. b.length())); } - private boolean isFastInfosetAcceptable(String accept) { - if (accept == null || isFastInfosetDisabled) return false; - - StringTokenizer st = new StringTokenizer(accept, ","); - while (st.hasMoreTokens()) { - final String token = st.nextToken().trim(); - if (token.equalsIgnoreCase(fiMimeType)) { - return true; - } - } - return false; - } +// private boolean isFastInfosetAcceptable(String accept) { +// if (accept == null || isFastInfosetDisabled) return false; +// +// StringTokenizer st = new StringTokenizer(accept, ","); +// while (st.hasMoreTokens()) { +// final String token = st.nextToken().trim(); +// if (token.equalsIgnoreCase(fiMimeType)) { +// return true; +// } +// } +// return false; +// } /* * Just check if the Accept header contains application/xop+xml, * no need to worry about q values. */ - private boolean isMtomAcceptable(String accept) { - if (accept == null || isFastInfosetDisabled) return false; - - StringTokenizer st = new StringTokenizer(accept, ","); - while (st.hasMoreTokens()) { - final String token = st.nextToken().trim(); - if (token.toLowerCase().contains(MtomCodec.XOP_XML_MIME_TYPE)) { - return true; - } - } - return false; - } +// private boolean isMtomAcceptable(String accept) { +// if (accept == null || isFastInfosetDisabled) return false; +// StringTokenizer st = new StringTokenizer(accept, ","); +// while (st.hasMoreTokens()) { +// final String token = st.nextToken().trim(); +// if (token.toLowerCase().contains(MtomCodec.XOP_XML_MIME_TYPE)) { +// return true; +// } +// } +// return false; +// } /** * Determines the encoding codec. @@ -495,11 +445,16 @@ public class SOAPBindingCodec extends MimeCodec implements com.sun.xml.internal. return fiSwaCodec; } - if(features.isEnabled(MTOMFeature.class)) { - //On client, always use XOP encoding if MTOM is enabled - // On Server, use XOP encoding if either request is XOP encoded or client accepts XOP encoding - if(!isServerSide() || isRequestMtomMessage || acceptMtomMessages) - return xmlMtomCodec; + //If the packet does not have a binding, explicitly set the MTOMFeature + //on the packet so that it has a way to determine whether to use MTOM + if (p.getBinding() == null) { + if (features != null) { + p.setMtomFeature(features.get(MTOMFeature.class)); + } + } + + if (p.shouldUseMtom()) { + return xmlMtomCodec; } Message m = p.getMessage(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java index eda0e8a4240..696910018c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP11Codec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,9 +29,9 @@ import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.WSFeatureList; +import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.ContentType; -import com.sun.xml.internal.ws.message.stream.StreamHeader; import com.sun.xml.internal.ws.message.stream.StreamHeader11; import javax.xml.stream.XMLStreamReader; @@ -44,6 +44,13 @@ import java.util.List; * @author Paul.Sandoz@Sun.Com */ final class StreamSOAP11Codec extends StreamSOAPCodec { + static final StreamHeaderDecoder SOAP11StreamHeaderDecoder = new StreamHeaderDecoder() { + @Override + public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) { + return new StreamHeader11(reader, mark); + } + }; + public static final String SOAP11_MIME_TYPE = "text/xml"; public static final String DEFAULT_SOAP11_CONTENT_TYPE = SOAP11_MIME_TYPE+"; charset="+SOAPBindingCodec.DEFAULT_ENCODING; @@ -66,11 +73,6 @@ final class StreamSOAP11Codec extends StreamSOAPCodec { return SOAP11_MIME_TYPE; } - @Override - protected final StreamHeader createHeader(XMLStreamReader reader, XMLStreamBuffer mark) { - return new StreamHeader11(reader, mark); - } - @Override protected ContentType getContentType(Packet packet) { ContentTypeImpl.Builder b = getContenTypeBuilder(packet); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java index b7260a064ba..096ef3e0e30 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAP12Codec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,10 +29,10 @@ import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.WSFeatureList; +import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.pipe.ContentType; -import com.sun.xml.internal.ws.message.stream.StreamHeader; import com.sun.xml.internal.ws.message.stream.StreamHeader12; import javax.xml.stream.XMLStreamReader; @@ -47,6 +47,13 @@ import java.io.IOException; * @author Paul.Sandoz@Sun.Com */ final class StreamSOAP12Codec extends StreamSOAPCodec { + static final StreamHeaderDecoder SOAP12StreamHeaderDecoder = new StreamHeaderDecoder() { + @Override + public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark) { + return new StreamHeader12(reader, mark); + } + }; + public static final String SOAP12_MIME_TYPE = "application/soap+xml"; public static final String DEFAULT_SOAP12_CONTENT_TYPE = SOAP12_MIME_TYPE+"; charset="+SOAPBindingCodec.DEFAULT_ENCODING; @@ -68,11 +75,6 @@ final class StreamSOAP12Codec extends StreamSOAPCodec { return SOAP12_MIME_TYPE; } - @Override - protected final StreamHeader createHeader(XMLStreamReader reader, XMLStreamBuffer mark) { - return new StreamHeader12(reader, mark); - } - @Override protected ContentType getContentType(Packet packet) { ContentTypeImpl.Builder b = getContenTypeBuilder(packet); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java index 5d47a2d97ea..be5c854be42 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StreamSOAPCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,6 +27,8 @@ package com.sun.xml.internal.ws.encoding; import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion; +import com.oracle.webservices.internal.impl.encoding.StreamDecoderImpl; +import com.oracle.webservices.internal.impl.internalspi.encoding.StreamDecoder; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer; @@ -37,20 +39,19 @@ import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.WSFeatureList; import com.sun.xml.internal.ws.api.message.AttachmentSet; +import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.ContentType; -import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.api.streaming.XMLStreamWriterFactory; import com.sun.xml.internal.ws.developer.SerializationFeature; import com.sun.xml.internal.ws.message.AttachmentSetImpl; -import com.sun.xml.internal.ws.message.stream.StreamHeader; import com.sun.xml.internal.ws.message.stream.StreamMessage; import com.sun.xml.internal.ws.protocol.soap.VersionMismatchException; import com.sun.xml.internal.ws.server.UnsupportedMediaException; import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; -import com.sun.xml.internal.ws.streaming.TidyXMLStreamReader; +import com.sun.xml.internal.ws.util.ServiceFinder; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; @@ -79,10 +80,11 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip private static final String SOAP_HEADER = "Header"; private static final String SOAP_BODY = "Body"; - private final String SOAP_NAMESPACE_URI; private final SOAPVersion soapVersion; protected final SerializationFeature serializationFeature; + private final StreamDecoder streamDecoder; + // charset of last decoded message. Will be used for encoding server's // response messages with the request message's encoding // it will stored in the packet.invocationProperties @@ -102,8 +104,16 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip private StreamSOAPCodec(SOAPVersion soapVersion, @Nullable SerializationFeature sf) { this.soapVersion = soapVersion; - SOAP_NAMESPACE_URI = soapVersion.nsUri; this.serializationFeature = sf; + this.streamDecoder = selectStreamDecoder(); + } + + private StreamDecoder selectStreamDecoder() { + for (StreamDecoder sd : ServiceFinder.find(StreamDecoder.class)) { + return sd; + } + + return new StreamDecoderImpl(); } public ContentType getStaticContentType(Packet packet) { @@ -181,15 +191,20 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip * (like MIME multipart codec.) */ public final Message decode(XMLStreamReader reader, @NotNull AttachmentSet attachmentSet) { + return decode(soapVersion, reader, attachmentSet); + } + + public static final Message decode(SOAPVersion soapVersion, XMLStreamReader reader, + @NotNull AttachmentSet attachmentSet) { // Move to soap:Envelope and verify if(reader.getEventType()!=XMLStreamConstants.START_ELEMENT) XMLStreamReaderUtil.nextElementContent(reader); XMLStreamReaderUtil.verifyReaderState(reader,XMLStreamConstants.START_ELEMENT); - if (SOAP_ENVELOPE.equals(reader.getLocalName()) && !SOAP_NAMESPACE_URI.equals(reader.getNamespaceURI())) { - throw new VersionMismatchException(soapVersion, SOAP_NAMESPACE_URI, reader.getNamespaceURI()); + if (SOAP_ENVELOPE.equals(reader.getLocalName()) && !soapVersion.nsUri.equals(reader.getNamespaceURI())) { + throw new VersionMismatchException(soapVersion, soapVersion.nsUri, reader.getNamespaceURI()); } - XMLStreamReaderUtil.verifyTag(reader, SOAP_NAMESPACE_URI, SOAP_ENVELOPE); + XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_ENVELOPE); TagInfoset envelopeTag = new TagInfoset(reader); @@ -208,7 +223,7 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip TagInfoset headerTag = null; if (reader.getLocalName().equals(SOAP_HEADER) - && reader.getNamespaceURI().equals(SOAP_NAMESPACE_URI)) { + && reader.getNamespaceURI().equals(soapVersion.nsUri)) { headerTag = new TagInfoset(reader); // Collect namespaces on soap:Header @@ -220,11 +235,12 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip // If SOAP header blocks are present (i.e. not ) if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) { - headers = new HeaderList(); + headers = new HeaderList(soapVersion); try { // Cache SOAP header blocks - cacheHeaders(reader, namespaces, headers); + StreamHeaderDecoder headerDecoder = SOAPVersion.SOAP_11.equals(soapVersion) ? StreamSOAP11Codec.SOAP11StreamHeaderDecoder : StreamSOAP12Codec.SOAP12StreamHeaderDecoder; + cacheHeaders(reader, namespaces, headers, headerDecoder); } catch (XMLStreamException e) { // TODO need to throw more meaningful exception throw new WebServiceException(e); @@ -236,7 +252,7 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip } // Verify that is present - XMLStreamReaderUtil.verifyTag(reader, SOAP_NAMESPACE_URI, SOAP_BODY); + XMLStreamReaderUtil.verifyTag(reader, soapVersion.nsUri, SOAP_BODY); TagInfoset bodyTag = new TagInfoset(reader); String bodyPrologue = XMLStreamReaderUtil.nextWhiteSpaceContent(reader); @@ -254,8 +270,9 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip return this; } - private XMLStreamBuffer cacheHeaders(XMLStreamReader reader, - Map namespaces, HeaderList headers) throws XMLStreamException { + private static XMLStreamBuffer cacheHeaders(XMLStreamReader reader, + Map namespaces, HeaderList headers, + StreamHeaderDecoder headerDecoder) throws XMLStreamException { MutableXMLStreamBuffer buffer = createXMLStreamBuffer(); StreamReaderBufferCreator creator = new StreamReaderBufferCreator(); creator.setXMLStreamBuffer(buffer); @@ -275,7 +292,7 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip // Mark XMLStreamBuffer mark = new XMLStreamBufferMark(headerBlockNamespaces, creator); // Create Header - headers.add(createHeader(reader, mark)); + headers.add(headerDecoder.decodeHeader(reader, mark)); // Cache the header block @@ -291,9 +308,11 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip return buffer; } - protected abstract StreamHeader createHeader(XMLStreamReader reader, XMLStreamBuffer mark); + protected interface StreamHeaderDecoder { + public Header decodeHeader(XMLStreamReader reader, XMLStreamBuffer mark); + } - private MutableXMLStreamBuffer createXMLStreamBuffer() { + private static MutableXMLStreamBuffer createXMLStreamBuffer() { // TODO: Decode should own one MutableXMLStreamBuffer for reuse // since it is more efficient. ISSUE: possible issue with // lifetime of information in the buffer if accessed beyond @@ -306,7 +325,10 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip if (contentType != null && !isContentTypeSupported(contentType,expectedContentTypes)) { throw new UnsupportedMediaException(contentType, expectedContentTypes); } - String charset = new ContentTypeImpl(contentType).getCharSet(); + com.oracle.webservices.internal.api.message.ContentType pct = packet.getInternalContentType(); + ContentTypeImpl cti = (pct != null && pct instanceof ContentTypeImpl) ? + (ContentTypeImpl)pct : new ContentTypeImpl(contentType); + String charset = cti.getCharSet(); if (charset != null && !Charset.isSupported(charset)) { throw new UnsupportedMediaException(charset); } @@ -315,9 +337,7 @@ public abstract class StreamSOAPCodec implements com.sun.xml.internal.ws.api.pip } else { packet.invocationProperties.remove(DECODED_MESSAGE_CHARSET); } - XMLStreamReader reader = XMLStreamReaderFactory.create(null, in, charset, true); - reader = new TidyXMLStreamReader(reader, in); - packet.setMessage(decode(reader, att)); + packet.setMessage(streamDecoder.decode(in, charset, att, soapVersion)); } public void decode(ReadableByteChannel in, String contentType, Packet response, AttachmentSet att ) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java index 0564d49bbe7..d0e1f24343a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/StringDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java index a71946ece00..99125ed2e99 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/SwACodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,18 +48,19 @@ public final class SwACodec extends MimeCodec { public SwACodec(SOAPVersion version, WSFeatureList f, Codec rootCodec) { super(version, f); - this.rootCodec = rootCodec; + this.mimeRootCodec = rootCodec; } private SwACodec(SwACodec that) { super(that); - this.rootCodec = that.rootCodec.copy(); + this.mimeRootCodec = that.mimeRootCodec.copy(); } @Override protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException { // TODO: handle attachments correctly Attachment root = mpp.getRootPart(); + Codec rootCodec = getMimeRootCodec(packet); if (rootCodec instanceof RootOnlyCodec) { ((RootOnlyCodec)rootCodec).decode(root.asInputStream(),root.getContentType(),packet, new MimeAttachmentSet(mpp)); } else { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java index f38e4d11170..f9565090325 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/TagInfoset.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java index b1c581160d2..e12251a00bc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XMLHTTPBindingCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,6 @@ import com.sun.xml.internal.ws.util.ByteArrayBuffer; import javax.activation.DataSource; import javax.xml.ws.WebServiceException; -import javax.xml.ws.WebServiceFeature; import java.io.IOException; import java.io.InputStream; @@ -96,37 +95,18 @@ public final class XMLHTTPBindingCodec extends MimeCodec { */ private static final String fiXmlAccept = APPLICATION_FAST_INFOSET_MIME_TYPE + ", " + BASE_ACCEPT_VALUE; - private class AcceptContentType implements ContentType { - private ContentType _c; - private String _accept; - - public AcceptContentType set(Packet p, ContentType c) { - // TODO: need to compose based on underlying codecs - if (p.contentNegotiation == ContentNegotiation.optimistic - || p.contentNegotiation == ContentNegotiation.pessimistic) { - _accept = fiXmlAccept; - } else { - _accept = xmlAccept; - } - _c = c; - return this; - } - - public String getContentType() { - return _c.getContentType(); - } - - public String getSOAPActionHeader() { - return _c.getSOAPActionHeader(); - } - - public String getAcceptHeader() { - return _accept; + private ContentTypeImpl setAcceptHeader(Packet p, ContentType c) { + ContentTypeImpl ctImpl = (ContentTypeImpl)c; + if (p.contentNegotiation == ContentNegotiation.optimistic + || p.contentNegotiation == ContentNegotiation.pessimistic) { + ctImpl.setAcceptHeader(fiXmlAccept); + } else { + ctImpl.setAcceptHeader(xmlAccept); } + p.setContentType(ctImpl); + return ctImpl; } - private AcceptContentType _adaptingContentType = new AcceptContentType(); - public XMLHTTPBindingCodec(WSFeatureList f) { super(SOAPVersion.SOAP_11, f); @@ -135,44 +115,42 @@ public final class XMLHTTPBindingCodec extends MimeCodec { fiCodec = getFICodec(); } + @Override public String getMimeType() { return null; } @Override public ContentType getStaticContentType(Packet packet) { - setRootCodec(packet); - - ContentType ct = null; - if (packet.getMessage() instanceof MessageDataSource) { - final MessageDataSource mds = (MessageDataSource)packet.getMessage(); + ContentType ct; + if (packet.getInternalMessage() instanceof MessageDataSource) { + final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage(); if (mds.hasUnconsumedDataSource()) { ct = getStaticContentType(mds); return (ct != null) - ? _adaptingContentType.set(packet, ct) + ? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct) : null; } } ct = super.getStaticContentType(packet); return (ct != null) - ? _adaptingContentType.set(packet, ct) + ? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct) : null; } @Override public ContentType encode(Packet packet, OutputStream out) throws IOException { - setRootCodec(packet); - - if (packet.getMessage() instanceof MessageDataSource) { - final MessageDataSource mds = (MessageDataSource)packet.getMessage(); + if (packet.getInternalMessage() instanceof MessageDataSource) { + final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage(); if (mds.hasUnconsumedDataSource()) - return _adaptingContentType.set(packet, encode(mds, out)); + return setAcceptHeader(packet, encode(mds, out)); } - return _adaptingContentType.set(packet, super.encode(packet, out)); + return setAcceptHeader(packet, super.encode(packet, out)); } + @Override public ContentType encode(Packet packet, WritableByteChannel buffer) { throw new UnsupportedOperationException(); } @@ -208,10 +186,12 @@ public final class XMLHTTPBindingCodec extends MimeCodec { } } + @Override protected void decode(MimeMultipartParser mpp, Packet packet) throws IOException { // This method will never be invoked } + @Override public MimeCodec copy() { return new XMLHTTPBindingCodec(features); } @@ -220,10 +200,6 @@ public final class XMLHTTPBindingCodec extends MimeCodec { return compareStrings(contentType, MimeCodec.MULTIPART_RELATED_MIME_TYPE); } - private boolean isApplicationXopXml(String contentType) { - return compareStrings(contentType, MtomCodec.XOP_XML_MIME_TYPE); - } - private boolean isXml(String contentType) { return compareStrings(contentType, XMLCodec.XML_APPLICATION_MIME_TYPE) || compareStrings(contentType, XMLCodec.XML_TEXT_MIME_TYPE) @@ -285,7 +261,8 @@ public final class XMLHTTPBindingCodec extends MimeCodec { } } - private void setRootCodec(Packet p) { + @Override + protected Codec getMimeRootCodec(Packet p) { /** * The following logic is only for outbound packets * to be encoded by client. @@ -300,8 +277,7 @@ public final class XMLHTTPBindingCodec extends MimeCodec { useFastInfosetForEncoding = true; } - rootCodec = (useFastInfosetForEncoding && fiCodec != null) - ? fiCodec : xmlCodec; + return (useFastInfosetForEncoding && fiCodec != null)? fiCodec : xmlCodec; } public static boolean requiresTransformationOfDataSource( diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java index 1c6cb32b02f..8064a208508 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/XmlDataContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java index c18739c06e9..b735a07d0a7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,6 @@ import java.io.BufferedInputStream; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; -import javax.xml.stream.XMLStreamReader; import javax.xml.ws.WebServiceException; import java.io.OutputStream; import java.io.InputStream; @@ -110,7 +109,7 @@ public class FastInfosetCodec implements Codec { public void decode(InputStream in, String contentType, Packet packet) throws IOException { /* Implements similar logic as the XMLMessage.create(String, InputStream). * But it's faster, as we know the InputStream has FastInfoset content*/ - Message message = null; + Message message; in = hasSomeData(in); if (in != null) { message = Messages.createUsingPayload(new FastInfosetSource(in), @@ -135,15 +134,6 @@ public class FastInfosetCodec implements Codec { } } - private XMLStreamReader getXMLStreamReader(InputStream in) { - if (_parser != null) { - _parser.setInputStream(in); - return _parser; - } else { - return _parser = createNewStreamReader(in, _retainState); - } - } - /** * Creates a new {@link FastInfosetCodec} instance. * diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java index 0f81e070fa9..2a6c7fc1356 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetMIMETypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java index 23fdda13216..ad7529a3e85 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java index 433c92c283b..0cbd41291ac 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamReaderRecyclable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java index 0a1050301af..6015d419702 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP11Codec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java index 016ac40c3f5..b26ee31dbc1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAP12Codec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java index 857a0d6cbe6..28bb5fa7077 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/fastinfoset/FastInfosetStreamSOAPCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java index b9e102c1b60..6bc6fa72dd1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java index b734037b659..6dde050111f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPolicyValidator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java index b57b3c4d90c..767ff954ccb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/EncodingPrefixMapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java index 2135ab1ecd2..177fc879d7d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/FastInfosetFeatureConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java index 8087dc5c7f0..e43a0d1c45a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomFeatureConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.xml.internal.ws.encoding.policy; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; import com.sun.xml.internal.ws.policy.AssertionSet; import com.sun.xml.internal.ws.policy.Policy; import com.sun.xml.internal.ws.policy.PolicyAssertion; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java index 10cd169771c..4365863df5c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/MtomPolicyMapConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java index 710ceff1c10..b33b21304ef 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/policy/SelectOptimalEncodingFeatureConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java index dbbf4218326..dcb324f6f82 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/DeserializationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.encoding.soap; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * DeserializationException represents an exception that occurred while diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java index 7fc31ee048a..33c0ea74b4e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAP12Constants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java index 7e938114f8c..341912af962 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SOAPConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java index 838fb343cd4..5a548e14d2d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,9 @@ */ package com.sun.xml.internal.ws.encoding.soap; + +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * SerializationException represents an exception that occurred while diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java index 4a1d9c4f11c..ddbd6247590 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/SerializerConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java index cee159e3122..3d9c834491b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAP12NamespaceConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java index 5105fe60305..e500da3a361 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/soap/streaming/SOAPNamespaceConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java index 32d71f16465..a4fabbb33fb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLCodec.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java index fdb3944646d..5a0a6d4b9b2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java index c94bbab10e3..f9f8e989c25 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package com.sun.xml.internal.ws.encoding.xml; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.bind.api.Bridge; import com.sun.xml.internal.ws.api.SOAPVersion; -import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.WSFeatureList; import com.sun.xml.internal.ws.api.message.*; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; @@ -44,7 +43,6 @@ import com.sun.xml.internal.ws.message.MimeAttachmentSet; import com.sun.xml.internal.ws.message.source.PayloadSourceMessage; import com.sun.xml.internal.ws.util.ByteArrayBuffer; import com.sun.xml.internal.ws.util.StreamUtils; -import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getFeature; import org.xml.sax.ContentHandler; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; @@ -60,7 +58,6 @@ import javax.xml.stream.XMLStreamWriter; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; import javax.xml.ws.WebServiceException; -import javax.xml.ws.WebServiceFeature; import java.io.IOException; import java.io.InputStream; @@ -75,7 +72,6 @@ public final class XMLMessage { private static final int PLAIN_XML_FLAG = 1; // 00001 private static final int MIME_MULTIPART_FLAG = 2; // 00010 private static final int FI_ENCODED_FLAG = 16; // 10000 - private WebServiceFeature[] features; /* * Construct a message given a content type and an input stream. @@ -240,7 +236,7 @@ public final class XMLMessage { public XmlContent(String ct, InputStream in, WSFeatureList f) { super(SOAPVersion.SOAP_11); dataSource = new XmlDataSource(ct, in); - this.headerList = new HeaderList(); + this.headerList = new HeaderList(SOAPVersion.SOAP_11); // this.binding = binding; features = f; } @@ -268,7 +264,7 @@ public final class XMLMessage { return false; } - public @NotNull HeaderList getHeaders() { + public @NotNull MessageHeaders getHeaders() { return headerList; } @@ -351,12 +347,13 @@ public final class XMLMessage { private final DataSource dataSource; private final StreamingAttachmentFeature feature; private Message delegate; - private final HeaderList headerList = new HeaderList(); + private HeaderList headerList;// = new HeaderList(); // private final WSBinding binding; private final WSFeatureList features; public XMLMultiPart(final String contentType, final InputStream is, WSFeatureList f) { super(SOAPVersion.SOAP_11); + headerList = new HeaderList(SOAPVersion.SOAP_11); dataSource = createDataSource(contentType, is); this.feature = f.get(StreamingAttachmentFeature.class); this.features = f; @@ -391,7 +388,7 @@ public final class XMLMessage { return false; } - public @NotNull HeaderList getHeaders() { + public @NotNull MessageHeaders getHeaders() { return headerList; } @@ -500,7 +497,7 @@ public final class XMLMessage { public UnknownContent(DataSource ds) { super(SOAPVersion.SOAP_11); this.ds = ds; - this.headerList = new HeaderList(); + this.headerList = new HeaderList(SOAPVersion.SOAP_11); } /* @@ -534,7 +531,7 @@ public final class XMLMessage { return false; } - public HeaderList getHeaders() { + public MessageHeaders getHeaders() { return headerList; } @@ -579,8 +576,9 @@ public final class XMLMessage { final ByteArrayBuffer bos = new ByteArrayBuffer(); try { Codec codec = new XMLHTTPBindingCodec(f); - com.sun.xml.internal.ws.api.pipe.ContentType ct = codec.getStaticContentType(new Packet(msg)); - codec.encode(new Packet(msg), bos); + Packet packet = new Packet(msg); + com.sun.xml.internal.ws.api.pipe.ContentType ct = codec.getStaticContentType(packet); + codec.encode(packet, bos); return createDataSource(ct.getContentType(), bos.newInputStream()); } catch(IOException ioe) { throw new WebServiceException(ioe); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java index 6e081debe50..a8851a21070 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/encoding/xml/XMLPropertyBag.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,10 @@ package com.sun.xml.internal.ws.encoding.xml; -import com.sun.xml.internal.ws.api.PropertySet; +import com.oracle.webservices.internal.api.message.BasePropertySet; +import com.oracle.webservices.internal.api.message.PropertySet; -public class XMLPropertyBag extends PropertySet { +public class XMLPropertyBag extends BasePropertySet { private String contentType; protected PropertyMap getPropertyMap() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java index a62fa4f9ec4..58f356cb9a3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/CodeType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java index 0672a904e32..7f405325f5c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/DetailType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java index 7290c8dcc6d..837014643ba 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ExceptionBean.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -152,7 +152,9 @@ final class ExceptionBean { try { return Integer.parseInt(v); } catch (NumberFormatException e) { - if(v.equals("native")) return -2; + if ("native".equals(v)) { + return -2; + } return -1; } } @@ -166,7 +168,7 @@ final class ExceptionBean { * Checks if the given element is the XML representation of {@link ExceptionBean}. */ public static boolean isStackTraceXml(Element n) { - return n.getLocalName().equals(LOCAL_NAME) && n.getNamespaceURI().equals(NS); + return LOCAL_NAME.equals(n.getLocalName()) && NS.equals(n.getNamespaceURI()); } private static final JAXBContext JAXB_CONTEXT; @@ -189,7 +191,9 @@ final class ExceptionBean { private static final NamespacePrefixMapper nsp = new NamespacePrefixMapper() { public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) { - if(namespaceUri.equals(NS)) return ""; + if (NS.equals(namespaceUri)) { + return ""; + } return suggestion; } }; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java index 314d6eefbbe..8ed7e040c93 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ReasonType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java index 7a419ec9705..927ee131cf9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP11Fault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,6 @@ import javax.xml.soap.Detail; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFault; import javax.xml.ws.WebServiceException; -import javax.xml.ws.soap.SOAPFaultException; import java.util.Iterator; /** @@ -102,12 +101,13 @@ class SOAP11Fault extends SOAPFaultBuilder { this.faultstring = reason; this.faultactor = actor; if (detailObject != null) { - if("".equals(detailObject.getNamespaceURI()) && "detail".equals(detailObject.getLocalName())){ + if ((detailObject.getNamespaceURI() == null || + "".equals(detailObject.getNamespaceURI())) && "detail".equals(detailObject.getLocalName())) { detail = new DetailType(); - for(Element detailEntry : DOMUtil.getChildElements(detailObject)){ + for(Element detailEntry : DOMUtil.getChildElements(detailObject)) { detail.getDetails().add(detailEntry); } - }else{ + } else { detail = new DetailType(detailObject); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java index 7bd5857e192..4a508a50e5c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAP12Fault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java index fc7065a9905..aeef61462a7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SOAPFaultBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,6 @@ import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.Message; -import com.sun.xml.internal.ws.api.model.CheckedException; import com.sun.xml.internal.ws.api.model.ExceptionType; import com.sun.xml.internal.ws.encoding.soap.SOAP12Constants; import com.sun.xml.internal.ws.encoding.soap.SOAPConstants; @@ -170,7 +169,18 @@ public abstract class SOAPFaultBuilder { * @param soapVersion non-null */ public static Message createSOAPFaultMessage(SOAPVersion soapVersion, CheckedExceptionImpl ceModel, Throwable ex) { - return createSOAPFaultMessage(soapVersion, ceModel, ex, null); + // Sometimes InvocationTargetException.getCause() is null + // but InvocationTargetException.getTargetException() contains the real exception + // even though they are supposed to be equivalent. + // If we only look at .getCause this results in the real exception being lost. + // Looks like a JDK bug. + final Throwable t = + ex instanceof java.lang.reflect.InvocationTargetException + ? + ((java.lang.reflect.InvocationTargetException)ex).getTargetException() + : + ex; + return createSOAPFaultMessage(soapVersion, ceModel, t, null); } /** @@ -491,7 +501,6 @@ public abstract class SOAPFaultBuilder { } catch (JAXBException e1) { //Should we throw Internal Server Error??? faultString = e.getMessage(); - faultCode = getDefaultFaultCode(soapVersion); } } @@ -535,16 +544,18 @@ public abstract class SOAPFaultBuilder { /** * Set to false if you don't want the generated faults to have stack trace in it. */ - public static boolean captureStackTrace; + public static final boolean captureStackTrace; /*package*/ static final String CAPTURE_STACK_TRACE_PROPERTY = SOAPFaultBuilder.class.getName()+".captureStackTrace"; static { + boolean tmpVal = false; try { - captureStackTrace = Boolean.getBoolean(CAPTURE_STACK_TRACE_PROPERTY); + tmpVal = Boolean.getBoolean(CAPTURE_STACK_TRACE_PROPERTY); } catch (SecurityException e) { // ignore } + captureStackTrace = tmpVal; try { JAXB_CONTEXT = JAXBContext.newInstance(SOAP11Fault.class, SOAP12Fault.class); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java index 9a12978196d..d4ed0f77edc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/ServerSOAPFaultException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java index 4dd296775f0..038a7a22027 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/SubcodeType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java index f98716bb0d6..f90e08a5283 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/fault/TextType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java index 3dc5111bfe3..91d93339ede 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientLogicalHandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java index 782a81582d5..704d8b3613f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientMessageHandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -45,6 +45,7 @@ import javax.xml.ws.WebServiceException; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.Handler; import java.util.*; +import java.util.Map.Entry; /** * @author Rama Pulavarthi @@ -92,7 +93,8 @@ public class ClientMessageHandlerTube extends HandlerTube { //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message Map atts = (Map) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); AttachmentSet attSet = context.packet.getMessage().getAttachments(); - for(String cid : atts.keySet()){ + for (Entry entry : atts.entrySet()) { + String cid = entry.getKey(); if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); attSet.add(att); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java index 56a89ddda7b..8124e5fbe68 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ClientSOAPHandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,7 @@ import javax.xml.ws.handler.Handler; import javax.xml.ws.WebServiceException; import javax.activation.DataHandler; import java.util.*; +import java.util.Map.Entry; /** * @@ -113,7 +114,8 @@ public class ClientSOAPHandlerTube extends HandlerTube { //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message Map atts = (Map) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); AttachmentSet attSet = context.packet.getMessage().getAttachments(); - for(String cid : atts.keySet()){ + for (Entry entry : atts.entrySet()) { + String cid = entry.getKey(); if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); attSet.add(att); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java index 04374155f65..ff9a0ae143d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerChainsModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java index 3b2cf2135d7..1cce96fc2ac 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.handler; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * Exception thrown by handler-related code. Extends diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java index 07f99f7f8cb..af82f4c9384 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java index 88e97072960..d82cc78d6d0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/HandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -293,7 +293,7 @@ public abstract class HandlerTube extends AbstractFilterTubeImpl { } else { /* otherwise use this value as an approximation, since this carries - the appliation's intention --- whether it was invokeOneway vs invoke,etc. + the application's intention --- whether it was invokeOneway vs invoke,etc. */ return !(packet.expectReply != null && packet.expectReply); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java index aac31028c02..f45a82b298f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,21 +25,13 @@ package com.sun.xml.internal.ws.handler; -import com.sun.xml.internal.ws.api.message.AttachmentSet; -import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.model.SEIModel; -import com.sun.xml.internal.ws.message.EmptyMessageImpl; -import com.sun.xml.internal.ws.message.source.PayloadSourceMessage; import com.sun.xml.internal.ws.spi.db.BindingContext; -import javax.xml.transform.Source; - import javax.xml.ws.LogicalMessage; import javax.xml.ws.handler.LogicalMessageContext; -import javax.xml.bind.JAXBContext; /** * Implementation of LogicalMessageContext. This class is used at runtime diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java index 488e67d7e5d..52cb5028ac1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/LogicalMessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ package com.sun.xml.internal.ws.handler; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.message.Message; -import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.spi.db.BindingContext; @@ -184,7 +184,7 @@ class LogicalMessageImpl implements LogicalMessage { * @param binding * @return */ - public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) { + public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) { assert isPayloadModifed(); if(isPayloadModifed()) { return lm.getMessage(headers,attachments,binding); @@ -199,7 +199,7 @@ class LogicalMessageImpl implements LogicalMessage { public abstract Source getPayload(); public abstract Object getPayload(BindingContext context); public abstract Object getPayload(JAXBContext context); - public abstract Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding); + public abstract Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding); } @@ -216,12 +216,12 @@ class LogicalMessageImpl implements LogicalMessage { return dom; } - public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) { + public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) { Node n = dom.getNode(); if(n.getNodeType()== Node.DOCUMENT_NODE) { n = ((Document)n).getDocumentElement(); } - return new DOMMessage(binding.getSOAPVersion(),headers, (Element)n, attachments); + return new DOMMessage(binding.getSOAPVersion(), headers, (Element)n, attachments); } } @@ -245,7 +245,7 @@ class LogicalMessageImpl implements LogicalMessage { return null; } - public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) { + public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) { return new EmptyMessageImpl(headers,attachments,binding.getSOAPVersion()); } } @@ -303,7 +303,7 @@ class LogicalMessageImpl implements LogicalMessage { } } - public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) { + public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) { return JAXBMessage.create(BindingContextFactory.create(ctxt), o,binding.getSOAPVersion(), headers,attachments); } } @@ -356,7 +356,7 @@ class LogicalMessageImpl implements LogicalMessage { } - public Message getMessage(HeaderList headers, AttachmentSet attachments, WSBinding binding) { + public Message getMessage(MessageHeaders headers, AttachmentSet attachments, WSBinding binding) { assert (payloadSrc!=null); return new PayloadSourceMessage(headers, payloadSrc, attachments,binding.getSOAPVersion()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java index 83e514fb824..46b096e6435 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package com.sun.xml.internal.ws.handler; import com.sun.xml.internal.ws.api.message.Attachment; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.message.Packet; -import com.sun.xml.internal.ws.util.ReadOnlyPropertyException; import javax.activation.DataHandler; import javax.xml.ws.handler.MessageContext; @@ -37,29 +36,24 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; + /** * * @author WS Development Team */ class MessageContextImpl implements MessageContext { - private Map fallbackMap = null; - private Set handlerScopeProps; - Packet packet; + private final Set handlerScopeProps; + private final Packet packet; + private final Map asMapIncludingInvocationProperties; - - void fallback() { - if(fallbackMap == null) { - fallbackMap = new HashMap(); - fallbackMap.putAll(packet.createMapView()); - fallbackMap.putAll(packet.invocationProperties); - } - } /** Creates a new instance of MessageContextImpl */ public MessageContextImpl(Packet packet) { this.packet = packet; - handlerScopeProps = packet.getHandlerScopePropertyNames(false); + this.asMapIncludingInvocationProperties = packet.asMapIncludingInvocationProperties(); + this.handlerScopeProps = packet.getHandlerScopePropertyNames(false); } + protected void updatePacket() { throw new UnsupportedOperationException("wrong call"); } @@ -86,65 +80,32 @@ class MessageContextImpl implements MessageContext { } public int size() { - fallback(); - return fallbackMap.size(); + return asMapIncludingInvocationProperties.size(); } public boolean isEmpty() { - fallback(); - return fallbackMap.isEmpty(); + return asMapIncludingInvocationProperties.isEmpty(); } public boolean containsKey(Object key) { - if(fallbackMap == null) { - if(packet.supports(key)) - return true; - return packet.invocationProperties.containsKey(key); - } else { - fallback(); - return fallbackMap.containsKey(key); - } + return asMapIncludingInvocationProperties.containsKey(key); } public boolean containsValue(Object value) { - fallback(); - return fallbackMap.containsValue(value); + return asMapIncludingInvocationProperties.containsValue(value); } public Object put(String key, Object value) { - if (fallbackMap == null) { - if (packet.supports(key)) { - return packet.put(key, value); // strongly typed - } - if (!packet.invocationProperties.containsKey(key)) { - //New property, default to Scope.HANDLER - handlerScopeProps.add(key); - } - return packet.invocationProperties.put(key, value); - - } else { - fallback(); - if (!fallbackMap.containsKey(key)) { - //new property, default to Scope.HANDLER - handlerScopeProps.add(key); - } - return fallbackMap.put(key, value); + if (!asMapIncludingInvocationProperties.containsKey(key)) { + //new property, default to Scope.HANDLER + handlerScopeProps.add(key); } + return asMapIncludingInvocationProperties.put(key, value); } public Object get(Object key) { if(key == null) return null; - Object value; - if(fallbackMap == null) { - if (packet.supports(key)) { - value = packet.get(key); // strongly typed - } else { - value = packet.invocationProperties.get(key); - } - } else { - fallback(); - value = fallbackMap.get(key); - } + Object value = asMapIncludingInvocationProperties.get(key); //add the attachments from the Message to the corresponding attachment property if(key.equals(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS) || key.equals(MessageContext.INBOUND_MESSAGE_ATTACHMENTS)){ @@ -153,7 +114,16 @@ class MessageContextImpl implements MessageContext { atts = new HashMap(); AttachmentSet attSet = packet.getMessage().getAttachments(); for(Attachment att : attSet){ - atts.put(att.getContentId(), att.asDataHandler()); + String cid = att.getContentId(); + if (cid.indexOf("@jaxws.sun.com") == -1) { + Object a = atts.get(cid); + if (a == null) { + a = atts.get("<" + cid + ">"); + if (a == null) atts.put(att.getContentId(), att.asDataHandler()); + } + } else { + atts.put(att.getContentId(), att.asDataHandler()); + } } return atts; } @@ -161,61 +131,29 @@ class MessageContextImpl implements MessageContext { } public void putAll(Map t) { - fallback(); for(String key: t.keySet()) { - if(!fallbackMap.containsKey(key)) { + if(!asMapIncludingInvocationProperties.containsKey(key)) { //new property, default to Scope.HANDLER handlerScopeProps.add(key); } } - fallbackMap.putAll(t); + asMapIncludingInvocationProperties.putAll(t); } public void clear() { - fallback(); - fallbackMap.clear(); + asMapIncludingInvocationProperties.clear(); } public Object remove(Object key){ - fallback(); handlerScopeProps.remove(key); - return fallbackMap.remove(key); + return asMapIncludingInvocationProperties.remove(key); } public Set keySet() { - fallback(); - return fallbackMap.keySet(); + return asMapIncludingInvocationProperties.keySet(); } public Set> entrySet(){ - fallback(); - return fallbackMap.entrySet(); + return asMapIncludingInvocationProperties.entrySet(); } public Collection values() { - fallback(); - return fallbackMap.values(); + return asMapIncludingInvocationProperties.values(); } - - - /** - * Fill a {@link Packet} with values of this {@link MessageContext}. - */ - void fill(Packet packet) { - if(fallbackMap != null) { - for (Entry entry : fallbackMap.entrySet()) { - String key = entry.getKey(); - if (packet.supports(key)) { - try { - packet.put(key, entry.getValue()); - } catch (ReadOnlyPropertyException e) { - // Nothing to do - } - } else { - packet.invocationProperties.put(key, entry.getValue()); - } - } - - //Remove properties which are removed by user. - packet.createMapView().keySet().retainAll(fallbackMap.keySet()); - packet.invocationProperties.keySet().retainAll(fallbackMap.keySet()); - } - } - } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java index 250cf0f03d2..a03e2e8fcc8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageHandlerContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java index 88dcedf0da1..01f5c79f92f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/MessageUpdatableContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,12 +47,6 @@ public abstract class MessageUpdatableContext implements MessageContext { this.packet = packet; } - /** - * Fill a {@link Packet} with values of this {@link MessageContext}. - */ - private void fill(Packet packet) { - ctxt.fill(packet); - } /** * Updates Message in the packet with user modifications */ @@ -79,7 +73,6 @@ public abstract class MessageUpdatableContext implements MessageContext { */ public final void updatePacket() { updateMessage(); - fill(packet); } MessageContextImpl getMessageContext() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java index effb8b4a792..1efd5adfa61 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/PortInfoImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java index d51f70f6455..2f6642af88d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPHandlerProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java index b25b9cd5de9..e2f5a03066d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/SOAPMessageContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.SOAPVersion; -import com.sun.xml.internal.ws.message.saaj.SAAJMessage; import javax.xml.bind.JAXBContext; import javax.xml.namespace.QName; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java index 91262cb0180..c6836a02bf7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerLogicalHandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,7 @@ import javax.activation.DataHandler; import java.util.List; import java.util.ArrayList; import java.util.Map; +import java.util.Map.Entry; /** * @@ -156,7 +157,8 @@ public class ServerLogicalHandlerTube extends HandlerTube { //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message Map atts = (Map) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); AttachmentSet attSet = context.packet.getMessage().getAttachments(); - for(String cid : atts.keySet()){ + for (Entry entry : atts.entrySet()) { + String cid = entry.getKey(); Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); attSet.add(att); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java index 18ba1b3feb9..7cab39b48fb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerMessageHandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,6 +43,7 @@ import javax.xml.ws.WebServiceException; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.Handler; import java.util.*; +import java.util.Map.Entry; /** * @author Rama Pulavarthi @@ -82,7 +83,8 @@ public class ServerMessageHandlerTube extends HandlerTube{ //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message Map atts = (Map) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); AttachmentSet attSet = context.packet.getMessage().getAttachments(); - for(String cid : atts.keySet()){ + for (Entry entry : atts.entrySet()) { + String cid = entry.getKey(); if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); attSet.add(att); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java index b8535e9aa99..0ca35201a8b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/ServerSOAPHandlerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -138,7 +138,8 @@ public class ServerSOAPHandlerTube extends HandlerTube { //Lets copy all the MessageContext.OUTBOUND_ATTACHMENT_PROPERTY to the message Map atts = (Map) context.get(MessageContext.OUTBOUND_MESSAGE_ATTACHMENTS); AttachmentSet attSet = context.packet.getMessage().getAttachments(); - for(String cid : atts.keySet()){ + for (Map.Entry entry : atts.entrySet()) { + String cid = entry.getKey(); if (attSet.get(cid) == null) { // Otherwise we would be adding attachments twice Attachment att = new DataHandlerAttachment(cid, atts.get(cid)); attSet.add(att); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java index 18391007469..fcbfbca4ced 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/handler/XMLHandlerProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java index 1b1309afd26..051ebdbd4f2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractHeaderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -104,6 +104,8 @@ public abstract class AbstractHeaderImpl implements Header { String v = getAttribute(soapVersion.nsUri, "mustUnderstand"); if(v==null || !parseBool(v)) return true; + if (roles == null) return true; + // now role return !roles.contains(getRole(soapVersion)); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java index a1e5855324d..4ed1a77c8d6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AbstractMessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,10 +27,13 @@ package com.sun.xml.internal.ws.message; import com.sun.xml.internal.bind.api.Bridge; import com.sun.xml.internal.ws.api.SOAPVersion; -import com.sun.xml.internal.ws.api.message.HeaderList; +import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; +import com.sun.xml.internal.ws.api.message.MessageWritable; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.message.saaj.SAAJFactory; +import com.sun.xml.internal.ws.message.saaj.SAAJMessage; import com.sun.xml.internal.ws.spi.db.XMLBridge; import org.xml.sax.ContentHandler; import org.xml.sax.ErrorHandler; @@ -46,6 +49,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import javax.xml.transform.Source; import javax.xml.transform.sax.SAXSource; + import java.util.List; import java.util.Map; @@ -80,6 +84,9 @@ public abstract class AbstractMessageImpl extends Message { this.soapVersion = soapVersion; } + public SOAPVersion getSOAPVersion() { + return soapVersion; + } /** * Copy constructor. */ @@ -121,10 +128,9 @@ public abstract class AbstractMessageImpl extends Message { w.writeNamespace("S",soapNsUri); if(hasHeaders()) { w.writeStartElement("S","Header",soapNsUri); - HeaderList headers = getHeaders(); - int len = headers.size(); - for( int i=0; i> headers = null; - String key = inbound ? Packet.INBOUND_TRANSPORT_HEADERS : Packet.OUTBOUND_TRANSPORT_HEADERS; - if (packet.supports(key)) { - headers = (Map>)packet.get(key); - } - if (headers != null) { - for(Map.Entry> e : headers.entrySet()) { - if (!e.getKey().equalsIgnoreCase("Content-Type")) { - for(String value : e.getValue()) { - msg.getMimeHeaders().addHeader(e.getKey(), value); - } - } - } - } - - if (msg.saveRequired()) - msg.saveChanges(); + SOAPMessage msg = SAAJFactory.read(soapVersion, this, packet); + transportHeaders(packet, inbound, msg); return msg; } + private void transportHeaders(Packet packet, boolean inbound, SOAPMessage msg) throws SOAPException { + Map> headers = getTransportHeaders(packet, inbound); + if (headers != null) { + addSOAPMimeHeaders(msg.getMimeHeaders(), headers); + } + if (msg.saveRequired()) msg.saveChanges(); + } protected static final AttributesImpl EMPTY_ATTS = new AttributesImpl(); protected static final LocatorImpl NULL_LOCATOR = new LocatorImpl(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java index 30ef3255afa..0a459315b84 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentSetImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java index 301ed292ba9..9769a0b9b8f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/AttachmentUnmarshallerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java index 4cf771ab2a6..258e12b5041 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ByteArrayAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java index 0732325ff2f..f430f4b8a78 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -118,4 +118,26 @@ public class DOMHeader extends AbstractHeaderImpl { public String getStringContent() { return node.getTextContent(); } + + public N getWrappedNode() { + return node; + } + + + @Override + public int hashCode() { + return getWrappedNode().hashCode(); + } + + + @Override + public boolean equals(Object obj) { + if (obj instanceof DOMHeader) { + return getWrappedNode().equals(((DOMHeader) obj).getWrappedNode()); + } else { + return false; + } + } + + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java index cb0501b9b15..4052989b4bf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DOMMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.AttachmentSet; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.streaming.DOMStreamReader; import com.sun.xml.internal.ws.util.DOMUtil; import org.w3c.dom.Element; @@ -54,18 +55,18 @@ import javax.xml.ws.WebServiceException; * @author Kohsuke Kawaguchi */ public final class DOMMessage extends AbstractMessageImpl { - private HeaderList headers; + private MessageHeaders headers; private final Element payload; public DOMMessage(SOAPVersion ver, Element payload) { this(ver,null,payload); } - public DOMMessage(SOAPVersion ver, HeaderList headers, Element payload) { + public DOMMessage(SOAPVersion ver, MessageHeaders headers, Element payload) { this(ver,headers,payload,null); } - public DOMMessage(SOAPVersion ver, HeaderList headers, Element payload, AttachmentSet attachments) { + public DOMMessage(SOAPVersion ver, MessageHeaders headers, Element payload, AttachmentSet attachments) { super(ver); this.headers = headers; this.payload = payload; @@ -82,12 +83,12 @@ public final class DOMMessage extends AbstractMessageImpl { } public boolean hasHeaders() { - return getHeaders().size() > 0; + return getHeaders().hasHeaders(); } - public HeaderList getHeaders() { + public MessageHeaders getHeaders() { if (headers == null) - headers = new HeaderList(); + headers = new HeaderList(getSOAPVersion()); return headers; } @@ -151,4 +152,5 @@ public final class DOMMessage extends AbstractMessageImpl { public Message copy() { return new DOMMessage(this); } + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java index 0998c6d98ad..480c84c201f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/DataHandlerAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,9 +48,10 @@ public final class DataHandlerAttachment implements Attachment { private final DataHandler dh; private final String contentId; + String contentIdNoAngleBracket; /** - * This will be constructed by {@link AttachmentMarshallerImpl} + * This will be constructed by {@link com.sun.xml.internal.ws.message.jaxb.AttachmentMarshallerImpl} */ public DataHandlerAttachment(@NotNull String contentId, @NotNull DataHandler dh) { this.dh = dh; @@ -58,7 +59,13 @@ public final class DataHandlerAttachment implements Attachment { } public String getContentId() { - return contentId; +// return contentId; + if (contentIdNoAngleBracket == null) { + contentIdNoAngleBracket = contentId; + if (contentIdNoAngleBracket != null && contentIdNoAngleBracket.charAt(0) == '<') + contentIdNoAngleBracket = contentIdNoAngleBracket.substring(1, contentIdNoAngleBracket.length()-1); + } + return contentIdNoAngleBracket; } public String getContentType() { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java index 9285b1c27f4..1ca4f0bab43 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/EmptyMessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,15 +28,14 @@ package com.sun.xml.internal.ws.message; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.AttachmentSet; -import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; + import org.xml.sax.ContentHandler; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPMessage; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; @@ -53,19 +52,19 @@ public class EmptyMessageImpl extends AbstractMessageImpl { * If a message has no payload, it's more likely to have * some header, so we create it eagerly here. */ - private final HeaderList headers; + private final MessageHeaders headers; private final AttachmentSet attachmentSet; public EmptyMessageImpl(SOAPVersion version) { super(version); - this.headers = new HeaderList(); + this.headers = new HeaderList(version); this.attachmentSet = new AttachmentSetImpl(); } - public EmptyMessageImpl(HeaderList headers, @NotNull AttachmentSet attachmentSet, SOAPVersion version){ + public EmptyMessageImpl(MessageHeaders headers, @NotNull AttachmentSet attachmentSet, SOAPVersion version){ super(version); if(headers==null) - headers = new HeaderList(); + headers = new HeaderList(version); this.attachmentSet = attachmentSet; this.headers = headers; } @@ -80,10 +79,10 @@ public class EmptyMessageImpl extends AbstractMessageImpl { } public boolean hasHeaders() { - return !headers.isEmpty(); + return headers.hasHeaders(); } - public HeaderList getHeaders() { + public MessageHeaders getHeaders() { return headers; } @@ -118,4 +117,5 @@ public class EmptyMessageImpl extends AbstractMessageImpl { public Message copy() { return new EmptyMessageImpl(this); } + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java index 979dbb1f6ec..ed0e6a7d01a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultDetailHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java index b90a01f7f25..d3e60770d64 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/FaultMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java index c525dcdd6ba..42291619a2d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/JAXBAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package com.sun.xml.internal.ws.message; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.message.Attachment; import com.sun.xml.internal.ws.spi.db.XMLBridge; -import com.sun.xml.internal.ws.util.ASCIIUtility; import com.sun.xml.internal.ws.util.ByteArrayBuffer; import com.sun.xml.internal.ws.encoding.DataSourceStreamingDataHandler; @@ -62,14 +61,17 @@ public final class JAXBAttachment implements Attachment, DataSource { this.mimeType = mimeType; } + @Override public String getContentId() { return contentId; } + @Override public String getContentType() { return mimeType; } + @Override public byte[] asByteArray() { ByteArrayBuffer bab = new ByteArrayBuffer(); try { @@ -80,14 +82,17 @@ public final class JAXBAttachment implements Attachment, DataSource { return bab.getRawData(); } + @Override public DataHandler asDataHandler() { return new DataSourceStreamingDataHandler(this); } + @Override public Source asSource() { return new StreamSource(asInputStream()); } + @Override public InputStream asInputStream() { ByteArrayBuffer bab = new ByteArrayBuffer(); try { @@ -98,6 +103,7 @@ public final class JAXBAttachment implements Attachment, DataSource { return bab.newInputStream(); } + @Override public void writeTo(OutputStream os) throws IOException { try { bridge.marshal(jaxbObject, os, null, null); @@ -106,6 +112,7 @@ public final class JAXBAttachment implements Attachment, DataSource { } } + @Override public void writeTo(SOAPMessage saaj) throws SOAPException { AttachmentPart part = saaj.createAttachmentPart(); part.setDataHandler(asDataHandler()); @@ -113,14 +120,17 @@ public final class JAXBAttachment implements Attachment, DataSource { saaj.addAttachmentPart(part); } + @Override public InputStream getInputStream() throws IOException { return asInputStream(); } + @Override public OutputStream getOutputStream() throws IOException { throw new UnsupportedOperationException(); } + @Override public String getName() { return null; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java index 4f991ec7f75..685198df6b1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/MimeAttachmentSet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java index f76cfd3e3a6..3abb5859864 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/PayloadElementSniffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java index 35cd8b16e73..0d86ed3c4af 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/ProblemActionHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java index cea9113faae..d2e91a2fd44 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RelatesToHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java index 273812471eb..06b3f4ec659 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/RootElementSniffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java index f8e44a000f2..ab4f347e5ae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/StringHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java index 8a9de1898e3..0aebcc3867f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/Util.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java index 8f9bc50f8f6..23656605fa2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/XMLReaderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java index 7f0c0249dfb..65feec626ea 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/AttachmentMarshallerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,9 @@ package com.sun.xml.internal.ws.message.jaxb; +import com.sun.istack.internal.logging.Logger; import com.sun.xml.internal.ws.api.message.Attachment; import com.sun.xml.internal.ws.api.message.AttachmentSet; -import com.sun.xml.internal.ws.message.AttachmentSetImpl; import com.sun.xml.internal.ws.message.DataHandlerAttachment; import javax.activation.DataHandler; @@ -39,6 +39,7 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URLEncoder; import java.util.UUID; +import java.util.logging.Level; /** * Implementation of {@link AttachmentMarshaller}, its used from JAXBMessage to marshall swaref type @@ -47,6 +48,9 @@ import java.util.UUID; * @see JAXBMessage */ final class AttachmentMarshallerImpl extends AttachmentMarshaller { + + private static final Logger LOGGER = Logger.getLogger(AttachmentMarshallerImpl.class); + private AttachmentSet attachments; public AttachmentMarshallerImpl(AttachmentSet attachemnts) { @@ -60,16 +64,19 @@ final class AttachmentMarshallerImpl extends AttachmentMarshaller { attachments = null; } + @Override public String addMtomAttachment(DataHandler data, String elementNamespace, String elementLocalName) { // We don't use JAXB for handling XOP throw new IllegalStateException(); } + @Override public String addMtomAttachment(byte[] data, int offset, int length, String mimeType, String elementNamespace, String elementLocalName) { // We don't use JAXB for handling XOP throw new IllegalStateException(); } + @Override public String addSwaRefAttachment(DataHandler data) { String cid = encodeCid(null); Attachment att = new DataHandlerAttachment(cid, data); @@ -86,7 +93,9 @@ final class AttachmentMarshallerImpl extends AttachmentMarshaller { URI uri = new URI(ns); cid = uri.toURL().getHost(); } catch (URISyntaxException e) { - e.printStackTrace(); + if (LOGGER.isLoggable(Level.INFO)) { + LOGGER.log(Level.INFO, null, e); + } return null; } catch (MalformedURLException e) { try { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java index a05b67783e5..9dd3cd8d1fc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBBridgeSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java index c4d8acd30fc..4d3c82f84a6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBDispatchMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,8 @@ package com.sun.xml.internal.ws.message.jaxb; import com.sun.xml.internal.ws.api.SOAPVersion; -import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.encoding.SOAPBindingCodec; import com.sun.xml.internal.ws.message.AbstractMessageImpl; import com.sun.xml.internal.ws.message.PayloadElementSniffer; @@ -114,7 +114,7 @@ public class JAXBDispatchMessage extends AbstractMessageImpl { } @Override - public HeaderList getHeaders() { + public MessageHeaders getHeaders() { return null; } @@ -194,7 +194,7 @@ public class JAXBDispatchMessage extends AbstractMessageImpl { String encoding = XMLStreamWriterUtil.getEncoding(sw); // Get output stream and use JAXB UTF-8 writer - OutputStream os = XMLStreamWriterUtil.getOutputStream(sw); + OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null; if (rawContext != null) { Marshaller m = rawContext.createMarshaller(); m.setProperty("jaxb.fragment", Boolean.FALSE); @@ -207,7 +207,7 @@ public class JAXBDispatchMessage extends AbstractMessageImpl { } else { - if (os != null && bridge.supportOutputStream() && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) { + if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) { bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am); } else { bridge.marshal(jaxbObject, sw, am); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java index d888d02e398..54df3e6444f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -181,8 +181,8 @@ public final class JAXBHeader extends AbstractHeaderImpl { String encoding = XMLStreamWriterUtil.getEncoding(sw); // Get output stream and use JAXB UTF-8 writer - OutputStream os = XMLStreamWriterUtil.getOutputStream(sw); - if (os != null && bridge.supportOutputStream() && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) { + OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null; + if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) { bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), null); } else { bridge.marshal(jaxbObject,sw, null); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java index 9d8941ab2d1..f50116527c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/JAXBMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,7 @@ import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.encoding.SOAPBindingCodec; import com.sun.xml.internal.ws.message.AbstractMessageImpl; import com.sun.xml.internal.ws.message.AttachmentSetImpl; @@ -71,7 +72,7 @@ import java.io.OutputStream; * @author Kohsuke Kawaguchi */ public final class JAXBMessage extends AbstractMessageImpl { - private HeaderList headers; + private MessageHeaders headers; /** * The JAXB object that represents the payload. @@ -99,7 +100,7 @@ public final class JAXBMessage extends AbstractMessageImpl { */ private XMLStreamBuffer infoset; - public static Message create(BindingContext context, Object jaxbObject, SOAPVersion soapVersion, HeaderList headers, AttachmentSet attachments) { + public static Message create(BindingContext context, Object jaxbObject, SOAPVersion soapVersion, MessageHeaders headers, AttachmentSet attachments) { if(!context.hasSwaRef()) { return new JAXBMessage(context,jaxbObject,soapVersion,headers,attachments); } @@ -155,7 +156,7 @@ public final class JAXBMessage extends AbstractMessageImpl { return new JAXBMessage(context,jaxbObject,soapVersion,null,null); } - private JAXBMessage( BindingContext context, Object jaxbObject, SOAPVersion soapVer, HeaderList headers, AttachmentSet attachments ) { + private JAXBMessage( BindingContext context, Object jaxbObject, SOAPVersion soapVer, MessageHeaders headers, AttachmentSet attachments ) { super(soapVer); // this.bridge = new MarshallerBridge(context); this.bridge = context.createFragmentBridge(); @@ -165,7 +166,7 @@ public final class JAXBMessage extends AbstractMessageImpl { this.attachmentSet = attachments; } - private JAXBMessage( JAXBContext rawContext, Object jaxbObject, SOAPVersion soapVer, HeaderList headers, AttachmentSet attachments ) { + private JAXBMessage( JAXBContext rawContext, Object jaxbObject, SOAPVersion soapVer, MessageHeaders headers, AttachmentSet attachments ) { super(soapVer); // this.bridge = new MarshallerBridge(context); this.rawContext = rawContext; @@ -235,28 +236,33 @@ public final class JAXBMessage extends AbstractMessageImpl { this.rawContext = that.rawContext; } + @Override public boolean hasHeaders() { - return headers!=null && !headers.isEmpty(); + return headers!=null && headers.hasHeaders(); } - public HeaderList getHeaders() { + @Override + public MessageHeaders getHeaders() { if(headers==null) - headers = new HeaderList(); + headers = new HeaderList(getSOAPVersion()); return headers; } + @Override public String getPayloadLocalPart() { if(localName==null) sniff(); return localName; } + @Override public String getPayloadNamespaceURI() { if(nsUri==null) sniff(); return nsUri; } + @Override public boolean hasPayload() { return true; } @@ -285,10 +291,12 @@ public final class JAXBMessage extends AbstractMessageImpl { } } + @Override public Source readPayloadAsSource() { return new JAXBBridgeSource(bridge,jaxbObject); } + @Override public T readPayloadAsJAXB(Unmarshaller unmarshaller) throws JAXBException { JAXBResult out = new JAXBResult(unmarshaller); // since the bridge only produces fragments, we need to fire start/end document. @@ -307,6 +315,7 @@ public final class JAXBMessage extends AbstractMessageImpl { return (T)out.getResult(); } + @Override public XMLStreamReader readPayload() throws XMLStreamException { try { if(infoset==null) { @@ -332,6 +341,7 @@ public final class JAXBMessage extends AbstractMessageImpl { /** * Writes the payload as SAX events. */ + @Override protected void writePayloadTo(ContentHandler contentHandler, ErrorHandler errorHandler, boolean fragment) throws SAXException { try { if(fragment) @@ -353,6 +363,7 @@ public final class JAXBMessage extends AbstractMessageImpl { } } + @Override public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException { try { // MtomCodec sets its own AttachmentMarshaller @@ -364,7 +375,7 @@ public final class JAXBMessage extends AbstractMessageImpl { String encoding = XMLStreamWriterUtil.getEncoding(sw); // Get output stream and use JAXB UTF-8 writer - OutputStream os = XMLStreamWriterUtil.getOutputStream(sw); + OutputStream os = bridge.supportOutputStream() ? XMLStreamWriterUtil.getOutputStream(sw) : null; if (rawContext != null) { Marshaller m = rawContext.createMarshaller(); m.setProperty("jaxb.fragment", Boolean.TRUE); @@ -374,7 +385,7 @@ public final class JAXBMessage extends AbstractMessageImpl { else m.marshal(jaxbObject, sw); } else { - if (os != null && bridge.supportOutputStream() && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) { + if (os != null && encoding != null && encoding.equalsIgnoreCase(SOAPBindingCodec.UTF8_ENCODING)) { bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am); } else { bridge.marshal(jaxbObject, sw, am); @@ -388,6 +399,7 @@ public final class JAXBMessage extends AbstractMessageImpl { } } + @Override public Message copy() { return new JAXBMessage(this); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java index 1a31acd5f33..891e7992c6b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/MarshallerBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java index c5e36c24008..54536a677b5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/jaxb/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java index cc759fefcae..8b7a3e74690 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,7 @@ */ /** - * {@link Message} implementations. + * {@link com.sun.xml.internal.ws.api.message.Message} implementations. */ package com.sun.xml.internal.ws.message; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java index f2efefb83f3..9aa6abde7fd 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java index ccf9cc81b3f..5a1e57395f6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/saaj/SAAJMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,10 @@ package com.sun.xml.internal.ws.message.saaj; -import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.XMLStreamException2; -import com.sun.istack.internal.Nullable; import com.sun.istack.internal.FragmentContentHandler; +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.istack.internal.XMLStreamException2; import com.sun.xml.internal.bind.api.Bridge; import com.sun.xml.internal.bind.unmarshaller.DOMScanner; import com.sun.xml.internal.ws.api.SOAPVersion; @@ -36,11 +36,12 @@ import com.sun.xml.internal.ws.api.message.*; import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl; import com.sun.xml.internal.ws.spi.db.XMLBridge; import com.sun.xml.internal.ws.streaming.DOMStreamReader; +import com.sun.xml.internal.ws.util.ASCIIUtility; import com.sun.xml.internal.ws.util.DOMUtil; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Attr; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; import org.xml.sax.ContentHandler; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; @@ -50,13 +51,7 @@ import org.xml.sax.helpers.LocatorImpl; import javax.activation.DataHandler; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; -import javax.xml.soap.AttachmentPart; -import javax.xml.soap.SOAPBody; -import javax.xml.soap.SOAPEnvelope; -import javax.xml.soap.SOAPException; -import javax.xml.soap.SOAPHeader; -import javax.xml.soap.SOAPHeaderElement; -import javax.xml.soap.SOAPMessage; +import javax.xml.soap.*; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; @@ -85,7 +80,7 @@ public class SAAJMessage extends Message { private boolean accessedMessage; private final SOAPMessage sm; - private HeaderList headers; + private MessageHeaders headers; private List bodyParts; private Element payload; @@ -107,11 +102,11 @@ public class SAAJMessage extends Message { * @param headers * @param sm */ - private SAAJMessage(HeaderList headers, AttachmentSet as, SOAPMessage sm) { + private SAAJMessage(MessageHeaders headers, AttachmentSet as, SOAPMessage sm, SOAPVersion version) { this.sm = sm; this.parse(); if(headers == null) - headers = new HeaderList(); + headers = new HeaderList(version); this.headers = headers; this.attachmentSet = as; } @@ -121,7 +116,7 @@ public class SAAJMessage extends Message { try { access(); if (headers == null) - headers = new HeaderList(); + headers = new HeaderList(getSOAPVersion()); SOAPHeader header = sm.getSOAPHeader(); if (header != null) { headerAttrs = header.getAttributes(); @@ -139,7 +134,7 @@ public class SAAJMessage extends Message { } } - private void access() { + protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); @@ -166,13 +161,14 @@ public class SAAJMessage extends Message { public boolean hasHeaders() { parse(); - return headers.size() > 0; + return headers.hasHeaders(); } - public @NotNull HeaderList getHeaders() { + public @NotNull MessageHeaders getHeaders() { parse(); return headers; } + /** * Gets the attachments of this message * (attachments live outside a message.) @@ -247,7 +243,7 @@ public class SAAJMessage extends Message { newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); - for (Header header : headers) { + for (Header header : headers.asList()) { header.writeTo(msg); } SOAPEnvelope se = msg.getSOAPPart().getEnvelope(); @@ -271,7 +267,7 @@ public class SAAJMessage extends Message { newBody.appendChild(n); } addAttributes(msg.getSOAPHeader(),headerAttrs); - for (Header header : headers) { + for (Header header : headers.asList()) { header.writeTo(msg); } for (Attachment att : getAttachments()) { @@ -366,9 +362,8 @@ public class SAAJMessage extends Message { } else { writer.writeStartElement(env.getPrefix(), "Header", env.getNamespaceURI()); } - int len = headers.size(); - for (int i = 0; i < len; i++) { - headers.get(i).writeTo(writer); + for (Header h : headers.asList()) { + h.writeTo(writer); } writer.writeEndElement(); } @@ -399,11 +394,9 @@ public class SAAJMessage extends Message { if (hasHeaders()) { startPrefixMapping(contentHandler, headerAttrs,"S"); contentHandler.startElement(soapNsUri, "Header", "S:Header", getAttributes(headerAttrs)); - HeaderList headers = getHeaders(); - int len = headers.size(); - for (int i = 0; i < len; i++) { - // shouldn't JDK be smart enough to use array-style indexing for this foreach!? - headers.get(i).writeTo(contentHandler, errorHandler); + MessageHeaders headers = getHeaders(); + for (Header h : headers.asList()) { + h.writeTo(contentHandler, errorHandler); } endPrefixMapping(contentHandler, headerAttrs,"S"); contentHandler.endElement(soapNsUri, "Header", "S:Header"); @@ -520,7 +513,7 @@ public class SAAJMessage extends Message { newBody.appendChild(n); } addAttributes(newBody, bodyAttrs); - return new SAAJMessage(getHeaders(), getAttachments(), msg); + return new SAAJMessage(getHeaders(), getAttachments(), msg, soapVersion); } } catch (SOAPException e) { throw new WebServiceException(e); @@ -529,10 +522,12 @@ public class SAAJMessage extends Message { private static final AttributesImpl EMPTY_ATTS = new AttributesImpl(); private static final LocatorImpl NULL_LOCATOR = new LocatorImpl(); - private class SAAJAttachment implements AttachmentEx { + private static class SAAJAttachment implements AttachmentEx { final AttachmentPart ap; + String contentIdNoAngleBracket; + public SAAJAttachment(AttachmentPart part) { this.ap = part; } @@ -541,7 +536,12 @@ public class SAAJMessage extends Message { * Content ID of the attachment. Uniquely identifies an attachment. */ public String getContentId() { - return ap.getContentId(); + if (contentIdNoAngleBracket == null) { + contentIdNoAngleBracket = ap.getContentId(); + if (contentIdNoAngleBracket != null && contentIdNoAngleBracket.charAt(0) == '<') + contentIdNoAngleBracket = contentIdNoAngleBracket.substring(1, contentIdNoAngleBracket.length()-1); + } + return contentIdNoAngleBracket; } /** @@ -600,7 +600,11 @@ public class SAAJMessage extends Message { * Writes the contents of the attachment into the given stream. */ public void writeTo(OutputStream os) throws IOException { - os.write(asByteArray()); + try { + ASCIIUtility.copyStream(ap.getRawContent(), os); + } catch (SOAPException e) { + throw new WebServiceException(e); + } } /** @@ -647,7 +651,7 @@ public class SAAJMessage extends Message { * SAAJ wants '<' and '>' for the content ID, but {@link AttachmentSet} * doesn't. S this class also does the conversion between them. */ - private class SAAJAttachmentSet implements AttachmentSet { + private static class SAAJAttachmentSet implements AttachmentSet { private Map attMap; private Iterator attIter; @@ -708,4 +712,7 @@ public class SAAJMessage extends Message { } } + public SOAPVersion getSOAPVersion() { + return soapVersion; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java index 31f8d6517a4..80faaa2df6c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/PayloadSourceMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,6 +31,7 @@ import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.message.AttachmentSetImpl; import com.sun.xml.internal.ws.message.stream.PayloadStreamReaderMessage; import com.sun.xml.internal.ws.streaming.SourceReaderFactory; @@ -44,7 +45,7 @@ import javax.xml.transform.Source; */ public class PayloadSourceMessage extends PayloadStreamReaderMessage { - public PayloadSourceMessage(@Nullable HeaderList headers, + public PayloadSourceMessage(@Nullable MessageHeaders headers, @NotNull Source payload, @NotNull AttachmentSet attSet, @NotNull SOAPVersion soapVersion) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java index e96b1717a45..ad2fa7bed90 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/ProtocolSourceMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,8 +29,8 @@ import com.sun.xml.internal.bind.api.Bridge; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.pipe.Codecs; import com.sun.xml.internal.ws.api.pipe.StreamSOAPCodec; -import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.spi.db.XMLBridge; import com.sun.xml.internal.ws.streaming.SourceReaderFactory; @@ -69,10 +69,6 @@ public class ProtocolSourceMessage extends Message { return sm.hasHeaders(); } - public HeaderList getHeaders() { - return sm.getHeaders(); - } - public String getPayloadLocalPart() { return sm.getPayloadLocalPart(); } @@ -131,4 +127,13 @@ public class ProtocolSourceMessage extends Message { public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException { sm.writeTo(contentHandler, errorHandler); } + + public SOAPVersion getSOAPVersion() { + return sm.getSOAPVersion(); + } + + @Override + public MessageHeaders getHeaders() { + return sm.getHeaders(); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java index 676b9f04d86..78f8e184d52 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/source/SourceUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -54,9 +54,9 @@ final class SourceUtils { int srcType; - private final int domSource = 1; - private final int streamSource = 2; - private final int saxSource=4; + private static final int domSource = 1; + private static final int streamSource = 2; + private static final int saxSource=4; public SourceUtils(Source src) { if(src instanceof StreamSource){ @@ -95,8 +95,8 @@ final class SourceUtils { String namespaceUri = null; if(isDOMSource()){ - DOMSource domSource = (DOMSource)src; - Node n = domSource.getNode(); + DOMSource domSrc = (DOMSource)src; + Node n = domSrc.getNode(); if(n.getNodeType()== Node.DOCUMENT_NODE) { n = ((Document)n).getDocumentElement(); } @@ -146,15 +146,16 @@ final class SourceUtils { writer.writeStartElement(uri, localName); } } else { - assert uri != null; +// assert uri != null; if(prefix.length() > 0){ /** * Before we write the */ String writerURI = null; - if (writer.getNamespaceContext() != null) + if (writer.getNamespaceContext() != null) { writerURI = writer.getNamespaceContext().getNamespaceURI(prefix); + } String writerPrefix = writer.getPrefix(uri); if(declarePrefix(prefix, uri, writerPrefix, writerURI)){ writer.writeStartElement(prefix, localName, uri); @@ -172,11 +173,14 @@ final class SourceUtils { // Write namespace declarations for (int i = 0; i < n; i++) { String nsPrefix = reader.getNamespacePrefix(i); - if (nsPrefix == null) nsPrefix = ""; + if (nsPrefix == null) { + nsPrefix = ""; + } // StAX returns null for default ns String writerURI = null; - if (writer.getNamespaceContext() != null) + if (writer.getNamespaceContext() != null) { writerURI = writer.getNamespaceContext().getNamespaceURI(nsPrefix); + } // Zephyr: Why is this returning null? // Compare nsPrefix with prefix because of [1] (above) @@ -215,6 +219,9 @@ final class SourceUtils { break; case XMLStreamConstants.CHARACTERS: writer.writeCharacters(reader.getText()); + break; + default: + break; } } while (state != XMLStreamConstants.END_DOCUMENT); reader.close(); @@ -228,8 +235,9 @@ final class SourceUtils { */ private static void setUndeclaredPrefix(String prefix, String readerURI, XMLStreamWriter writer) throws XMLStreamException { String writerURI = null; - if (writer.getNamespaceContext() != null) + if (writer.getNamespaceContext() != null) { writerURI = writer.getNamespaceContext().getNamespaceURI(prefix); + } if (writerURI == null) { writer.setPrefix(prefix, readerURI != null ? readerURI : ""); @@ -246,8 +254,9 @@ final class SourceUtils { */ private static boolean declarePrefix(String rPrefix, String rUri, String wPrefix, String wUri){ if (wUri == null ||((wPrefix != null) && !rPrefix.equals(wPrefix))|| - (rUri != null && !wUri.equals(rUri))) + (rUri != null && !wUri.equals(rUri))) { return true; + } return false; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java index d16499395db..28dc981fca7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/OutboundStreamHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java index 753a028b224..7e025be7690 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/PayloadStreamReaderMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ package com.sun.xml.internal.ws.message.stream; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.message.AttachmentSet; -import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.message.AbstractMessageImpl; import com.sun.xml.internal.ws.message.AttachmentSetImpl; import com.sun.istack.internal.Nullable; @@ -56,7 +56,7 @@ public class PayloadStreamReaderMessage extends AbstractMessageImpl { this(null, reader,new AttachmentSetImpl(), soapVer); } - public PayloadStreamReaderMessage(@Nullable HeaderList headers, @NotNull XMLStreamReader reader, + public PayloadStreamReaderMessage(@Nullable MessageHeaders headers, @NotNull XMLStreamReader reader, @NotNull AttachmentSet attSet, @NotNull SOAPVersion soapVersion) { super(soapVersion); message = new StreamMessage(headers, attSet, reader, soapVersion); @@ -66,10 +66,6 @@ public class PayloadStreamReaderMessage extends AbstractMessageImpl { return message.hasHeaders(); } - public HeaderList getHeaders() { - return message.getHeaders(); - } - public AttachmentSet getAttachments() { return message.getAttachments(); } @@ -113,4 +109,9 @@ public class PayloadStreamReaderMessage extends AbstractMessageImpl { public Message copy() { return message.copy(); } + + @Override + public @NotNull MessageHeaders getHeaders() { + return message.getHeaders(); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java index 8eca2a43abf..dda1f187a15 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamAttachment.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java index 755d5302161..6415f1319bb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,6 +34,7 @@ import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.message.AbstractHeaderImpl; +import com.sun.xml.internal.ws.util.xml.XmlUtil; import org.w3c.dom.Node; import org.xml.sax.ContentHandler; import org.xml.sax.ErrorHandler; @@ -193,7 +194,7 @@ public abstract class StreamHeader extends AbstractHeaderImpl { // TODO what about in-scope namespaces // Not very efficient consider implementing a stream buffer // processor that produces a DOM node from the buffer. - TransformerFactory tf = TransformerFactory.newInstance(); + TransformerFactory tf = XmlUtil.newTransformerFactory(); Transformer t = tf.newTransformer(); XMLStreamBufferSource source = new XMLStreamBufferSource(_mark); DOMResult result = new DOMResult(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java index 487925e89b3..1c815041aba 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader11.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java index 5e8c2544826..1546da09235 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamHeader12.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java index 4138609d485..73f5ddee596 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/message/stream/StreamMessage.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,6 +36,7 @@ import com.sun.xml.internal.ws.api.message.AttachmentSet; import com.sun.xml.internal.ws.api.message.Header; import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.encoding.TagInfoset; import com.sun.xml.internal.ws.message.AbstractMessageImpl; @@ -69,7 +70,7 @@ import java.util.List; * TODO: we need another message class that keeps {@link XMLStreamReader} that points * at the start of the envelope element. */ -public final class StreamMessage extends AbstractMessageImpl { +public class StreamMessage extends AbstractMessageImpl { /** * The reader will be positioned at * the first child of the SOAP body @@ -77,7 +78,7 @@ public final class StreamMessage extends AbstractMessageImpl { private @NotNull XMLStreamReader reader; // lazily created - private @Nullable HeaderList headers; + private @Nullable MessageHeaders headers; /** * Because the StreamMessage leaves out the white spaces around payload @@ -123,12 +124,17 @@ public final class StreamMessage extends AbstractMessageImpl { create(SOAPVersion.SOAP_12); } + public StreamMessage(SOAPVersion v) { + super(v); + payloadLocalName = null; + payloadNamespaceURI = null; + } /** * Creates a {@link StreamMessage} from a {@link XMLStreamReader} * that points at the start element of the payload, and headers. * *

    - * This method creaets a {@link Message} from a payload. + * This method creates a {@link Message} from a payload. * * @param headers * if null, it means no headers. if non-null, @@ -137,7 +143,7 @@ public final class StreamMessage extends AbstractMessageImpl { * points at the start element/document of the payload (or the end element of the <s:Body> * if there's no payload) */ - public StreamMessage(@Nullable HeaderList headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) { + public StreamMessage(@Nullable MessageHeaders headers, @NotNull AttachmentSet attachmentSet, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) { super(soapVersion); this.headers = headers; this.attachmentSet = attachmentSet; @@ -177,18 +183,18 @@ public final class StreamMessage extends AbstractMessageImpl { * and the complete infoset of the SOAP envelope. * *

    - * See {@link #StreamMessage(HeaderList, AttachmentSet, XMLStreamReader, SOAPVersion)} for + * See {@link #StreamMessage(MessageHeaders, AttachmentSet, XMLStreamReader, SOAPVersion)} for * the description of the basic parameters. * * @param headerTag * Null if the message didn't have a header tag. * */ - public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable HeaderList headers, @NotNull TagInfoset bodyTag, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) { + public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @NotNull TagInfoset bodyTag, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) { this(envelopeTag, headerTag, attachmentSet, headers, null, bodyTag, null, reader, soapVersion); } - public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable HeaderList headers, @Nullable String bodyPrologue, @NotNull TagInfoset bodyTag, @Nullable String bodyEpilogue, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) { + public StreamMessage(@NotNull TagInfoset envelopeTag, @Nullable TagInfoset headerTag, @NotNull AttachmentSet attachmentSet, @Nullable MessageHeaders headers, @Nullable String bodyPrologue, @NotNull TagInfoset bodyTag, @Nullable String bodyEpilogue, @NotNull XMLStreamReader reader, @NotNull SOAPVersion soapVersion) { this(headers,attachmentSet,reader,soapVersion); if(envelopeTag == null ) { throw new IllegalArgumentException("EnvelopeTag TagInfoset cannot be null"); @@ -205,12 +211,12 @@ public final class StreamMessage extends AbstractMessageImpl { } public boolean hasHeaders() { - return headers!=null && !headers.isEmpty(); + return headers!=null && headers.hasHeaders(); } - public HeaderList getHeaders() { + public MessageHeaders getHeaders() { if (headers == null) { - headers = new HeaderList(); + headers = new HeaderList(getSOAPVersion()); } return headers; } @@ -384,10 +390,10 @@ public final class StreamMessage extends AbstractMessageImpl { envelopeTag.writeStart(writer); //write headers - HeaderList hl = getHeaders(); - if(hl.size() > 0){ + MessageHeaders hl = getHeaders(); + if(hl.hasHeaders()){ headerTag.writeStart(writer); - for(Header h:hl){ + for(Header h : hl.asList()){ h.writeTo(writer); } writer.writeEndElement(); @@ -523,11 +529,10 @@ public final class StreamMessage extends AbstractMessageImpl { envelopeTag.writeStart(contentHandler); headerTag.writeStart(contentHandler); if(hasHeaders()) { - HeaderList headers = getHeaders(); - int len = headers.size(); - for( int i=0; iJAXBRIContext * @deprecated */ + @Override public JAXBContext getJAXBContext() { JAXBContext jc = bindingContext.getJAXBContext(); - if (jc != null) return jc; - if (jaxbContext == null && jc instanceof JAXBRIContext) jaxbContext = (JAXBRIContext) bindingContext.getJAXBContext(); + if (jc != null) { + return jc; + } return jaxbContext; } @@ -162,8 +166,9 @@ public abstract class AbstractSEIModelImpl implements SEIModel { final List cls = new ArrayList(types.size() + additionalClasses.size()); cls.addAll(additionalClasses); - for (TypeInfo type : types) + for (TypeInfo type : types) { cls.add((Class) type.type); + } try { //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false); @@ -171,21 +176,21 @@ public abstract class AbstractSEIModelImpl implements SEIModel { bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction() { public BindingContext run() throws Exception { if(LOGGER.isLoggable(Level.FINEST)) { - LOGGER.log(Level.FINEST,"Creating JAXBContext with classes="+cls+" and types="+types); + LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types}); } UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class); - DatabindingModeFeature dbf = features.get(DatabindingModeFeature.class); + com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf = + features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class); JAXBContextFactory factory = f!=null ? f.getFactory() : null; if(factory==null) factory=JAXBContextFactory.DEFAULT; // return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types); databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory); - if (dbf != null) { + if (dmf != null) { if (LOGGER.isLoggable(Level.FINE)) - LOGGER.fine("DatabindingModeFeature in SEI specifies mode: " - + dbf.getMode()); - databindingInfo.setDatabindingMode(dbf + LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode()); + databindingInfo.setDatabindingMode(dmf .getMode()); } @@ -194,7 +199,7 @@ public abstract class AbstractSEIModelImpl implements SEIModel { databindingInfo.contentClasses().addAll(cls); databindingInfo.typeInfos().addAll(types); databindingInfo.properties().put("c14nSupport", Boolean.FALSE); - databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getTargetNamespace()); + databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace()); BindingContext bc = BindingContextFactory.create(databindingInfo); if (LOGGER.isLoggable(Level.FINE)) LOGGER.log(Level.FINE, @@ -325,7 +330,7 @@ public abstract class AbstractSEIModelImpl implements SEIModel { } /** - * Applies binding related information to the RpcLitPayload. The payload map is populated correctl + * Applies binding related information to the RpcLitPayload. The payload map is populated correctly * @return * Returns attachment parameters if/any. */ @@ -443,6 +448,15 @@ public abstract class AbstractSEIModelImpl implements SEIModel { return targetNamespace; } + String getDefaultSchemaNamespace() { + String defaultNamespace = getTargetNamespace(); + if (defaultSchemaNamespaceSuffix == null) return defaultNamespace; + if (!defaultNamespace.endsWith("/")) { + defaultNamespace += "/"; + } + return (defaultNamespace + defaultSchemaNamespaceSuffix); + } + @NotNull public QName getBoundPortTypeName() { assert portName != null; @@ -515,5 +529,6 @@ public abstract class AbstractSEIModelImpl implements SEIModel { protected ClassLoader classLoader = null; protected WSBinding wsBinding; protected BindingInfo databindingInfo; + protected String defaultSchemaNamespaceSuffix; private static final Logger LOGGER = Logger.getLogger(AbstractSEIModelImpl.class.getName()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java index a4f224f947f..32c07d924d7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/AbstractWrapperBeanGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -298,8 +298,29 @@ public abstract class AbstractWrapperBeanGenerator { * @return list of properties in the correct order for an exception bean */ public Collection collectExceptionBeanMembers(C exception) { + return collectExceptionBeanMembers(exception, true); + } + + /** + * Computes and sorts exception bean members for a given exception as per + * the 3.7 section of the spec. It takes all getter properties in the + * exception and its superclasses(except getCause, getLocalizedMessage, + * getStackTrace, getClass). The returned collection is sorted based + * on the property names. + * + *

    + * But if the exception has @XmlType its values are honored. Only the + * propOrder properties are considered. The returned collection is sorted + * as per the given propOrder. + * + * @param exception + * @param decapitalize if true, all the property names are decapitalized + * + * @return list of properties in the correct order for an exception bean + */ + public Collection collectExceptionBeanMembers(C exception, boolean decapitalize ) { TreeMap fields = new TreeMap(); - getExceptionProperties(exception, fields); + getExceptionProperties(exception, fields, decapitalize); // Consider only the @XmlType(propOrder) properties XmlType xmlType = annReader.getClassAnnotation(XmlType.class, exception, null); @@ -325,10 +346,10 @@ public abstract class AbstractWrapperBeanGenerator { } - private void getExceptionProperties(C exception, TreeMap fields) { + private void getExceptionProperties(C exception, TreeMap fields, boolean decapitalize) { C sc = nav.getSuperClass(exception); if (sc != null) { - getExceptionProperties(sc, fields); + getExceptionProperties(sc, fields, decapitalize); } Collection methods = nav.getDeclaredMethods(exception); @@ -355,9 +376,8 @@ public abstract class AbstractWrapperBeanGenerator { T returnType = getSafeType(nav.getReturnType(method)); if (nav.getMethodParameters(method).length == 0) { - String fieldName = name.startsWith("get") - ? StringUtils.decapitalize(name.substring(3)) - : StringUtils.decapitalize(name.substring(2)); + String fieldName = name.startsWith("get") ? name.substring(3) : name.substring(2); + if (decapitalize) fieldName = StringUtils.decapitalize(fieldName); fields.put(fieldName, factory.createWrapperBeanMember(returnType, fieldName, Collections.emptyList())); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java index 6bfcb93741c..3549721b38c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/CheckedExceptionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java new file mode 100644 index 00000000000..41cf3f7f4b4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ExternalMetadataReader.java @@ -0,0 +1,549 @@ +/* + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.model; + +import com.oracle.xmlns.internal.webservices.jaxws_databinding.JavaMethod; +import com.oracle.xmlns.internal.webservices.jaxws_databinding.JavaParam; +import com.oracle.xmlns.internal.webservices.jaxws_databinding.JavaWsdlMappingType; +import com.oracle.xmlns.internal.webservices.jaxws_databinding.ObjectFactory; +import com.sun.xml.internal.bind.api.JAXBRIContext; +import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; +import com.sun.xml.internal.ws.util.xml.XmlUtil; +import org.w3c.dom.Element; +import org.xml.sax.SAXException; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBElement; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.util.JAXBResult; +import javax.xml.stream.XMLInputFactory; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.transform.Source; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamSource; +import javax.xml.validation.Schema; +import javax.xml.validation.SchemaFactory; +import java.io.*; +import java.lang.annotation.Annotation; +import java.lang.reflect.Method; +import java.net.URL; +import java.util.*; + +import static com.oracle.xmlns.internal.webservices.jaxws_databinding.ExistingAnnotationsType.MERGE; + +/** + * Metadata Reader able to read from either class annotations or external metadata files or combine both, + * depending on configuration provided in xml file itself. + * + * @author shih-chang.chen@oracle.com, miroslav.kos@oracle.com + */ +public class ExternalMetadataReader extends ReflectAnnotationReader { + + private static final String NAMESPACE_WEBLOGIC_WSEE_DATABINDING = "http://xmlns.oracle.com/weblogic/weblogic-wsee-databinding"; + private static final String NAMESPACE_JAXWS_RI_EXTERNAL_METADATA = "http://xmlns.oracle.com/webservices/jaxws-databinding"; + + /** + * map of readers for defined java types + */ + private Map readers = new HashMap(); + + public ExternalMetadataReader(Collection files, Collection resourcePaths, ClassLoader classLoader, + boolean xsdValidation, boolean disableSecureXmlProcessing) { + + if (files != null) { + for (File file : files) { + try { + String namespace = Util.documentRootNamespace(newSource(file), disableSecureXmlProcessing); + JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(file), namespace, disableSecureXmlProcessing); + readers.put(externalMapping.getJavaTypeName(), externalMapping); + } catch (Exception e) { + throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", file.getAbsolutePath()); + } + } + } + + if (resourcePaths != null) { + for (String resourcePath : resourcePaths) { + try { + String namespace = Util.documentRootNamespace(newSource(resourcePath, classLoader), disableSecureXmlProcessing); + JavaWsdlMappingType externalMapping = parseMetadata(xsdValidation, newSource(resourcePath, classLoader), namespace, disableSecureXmlProcessing); + readers.put(externalMapping.getJavaTypeName(), externalMapping); + } catch (Exception e) { + throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", resourcePath); + } + } + } + } + + private StreamSource newSource(String resourcePath, ClassLoader classLoader) { + InputStream is = classLoader.getResourceAsStream(resourcePath); + return new StreamSource(is); + } + + private JavaWsdlMappingType parseMetadata(boolean xsdValidation, StreamSource source, String namespace, boolean disableSecureXmlProcessing) throws JAXBException, IOException, TransformerException { + if (NAMESPACE_WEBLOGIC_WSEE_DATABINDING.equals(namespace)) { + return Util.transformAndRead(source, disableSecureXmlProcessing); + } if (NAMESPACE_JAXWS_RI_EXTERNAL_METADATA.equals(namespace)) { + return Util.read(source, xsdValidation, disableSecureXmlProcessing); + } else { + throw new RuntimeModelerException("runtime.modeler.external.metadata.unsupported.schema", namespace, Arrays.asList(NAMESPACE_WEBLOGIC_WSEE_DATABINDING, NAMESPACE_JAXWS_RI_EXTERNAL_METADATA).toString()); + } + } + + private StreamSource newSource(File file) { + try { + return new StreamSource(new FileInputStream(file)); + } catch (FileNotFoundException e) { + throw new RuntimeModelerException("runtime.modeler.external.metadata.unable.to.read", file.getAbsolutePath()); + } + } + + public A getAnnotation(Class annType, Class cls) { + JavaWsdlMappingType r = reader(cls); + return r == null ? super.getAnnotation(annType, cls) : Util.annotation(r, annType); + } + + private JavaWsdlMappingType reader(Class cls) { + return readers.get(cls.getName()); + } + + Annotation[] getAnnotations(List objects) { + ArrayList list = new ArrayList(); + for (Object a : objects) { + if (Annotation.class.isInstance(a)) { + list.add(Annotation.class.cast(a)); + } + } + return list.toArray(new Annotation[list.size()]); + } + + public Annotation[] getAnnotations(final Class c) { + + Merger merger = new Merger(reader(c)) { + Annotation[] reflection() { + return ExternalMetadataReader.super.getAnnotations(c); + } + + Annotation[] external() { + return getAnnotations(reader.getClassAnnotation()); + } + }; + return merger.merge(); + } + + public Annotation[] getAnnotations(final Method m) { + Merger merger = new Merger(reader(m.getDeclaringClass())) { + Annotation[] reflection() { + return ExternalMetadataReader.super.getAnnotations(m); + } + + Annotation[] external() { + JavaMethod jm = getJavaMethod(m, reader); + return (jm == null) ? new Annotation[0] : getAnnotations(jm.getMethodAnnotation()); + } + }; + return merger.merge(); + } + + @SuppressWarnings("unchecked") + public A getAnnotation(final Class annType, final Method m) { + Merger merger = new Merger(reader(m.getDeclaringClass())) { + Annotation reflection() { + return ExternalMetadataReader.super.getAnnotation(annType, m); + } + + Annotation external() { + JavaMethod jm = getJavaMethod(m, reader); + return Util.annotation(jm, annType); + } + }; + return (A) merger.merge(); + } + + public Annotation[][] getParameterAnnotations(final Method m) { + Merger merger = new Merger(reader(m.getDeclaringClass())) { + Annotation[][] reflection() { + return ExternalMetadataReader.super.getParameterAnnotations(m); + } + + Annotation[][] external() { + JavaMethod jm = getJavaMethod(m, reader); + Annotation[][] a = m.getParameterAnnotations(); + for (int i = 0; i < m.getParameterTypes().length; i++) { + if (jm == null) continue; + JavaParam jp = jm.getJavaParams().getJavaParam().get(i); + a[i] = getAnnotations(jp.getParamAnnotation()); + } + return a; + } + }; + return merger.merge(); + } + + public void getProperties(final Map prop, final Class cls) { + + JavaWsdlMappingType r = reader(cls); + + // no external reader or it requires annotations merging ... + if (r == null || MERGE.equals(r.getExistingAnnotations())) { + super.getProperties(prop, cls); + } + + } + + public void getProperties(final Map prop, final Method m) { + + JavaWsdlMappingType r = reader(m.getDeclaringClass()); + + // no external reader or it requires annotations merging ... + if (r == null || MERGE.equals(r.getExistingAnnotations())) { + super.getProperties(prop, m); + } + + if (r != null) { + JavaMethod jm = getJavaMethod(m, r); + Element[] e = Util.annotation(jm); + prop.put("eclipselink-oxm-xml.xml-element", findXmlElement(e)); + } + + } + + public void getProperties(final Map prop, final Method m, int pos) { + + JavaWsdlMappingType r = reader(m.getDeclaringClass()); + + // no external reader or it requires annotations merging ... + if (r == null || MERGE.equals(r.getExistingAnnotations())) { + super.getProperties(prop, m, pos); + } + + if (r != null) { + JavaMethod jm = getJavaMethod(m, r); + if (jm == null) return; + JavaParam jp = jm.getJavaParams().getJavaParam().get(pos); + Element[] e = Util.annotation(jp); + prop.put("eclipselink-oxm-xml.xml-element", findXmlElement(e)); + } + } + + JavaMethod getJavaMethod(Method method, JavaWsdlMappingType r) { + + JavaWsdlMappingType.JavaMethods javaMethods = r.getJavaMethods(); + if (javaMethods == null) { + return null; + } + + List sameName = new ArrayList(); + for (JavaMethod jm : javaMethods.getJavaMethod()) { + if (method.getName().equals(jm.getName())) { + sameName.add(jm); + } + } + + if (sameName.isEmpty()) { + return null; + } else { + if (sameName.size() == 1) { + return sameName.get(0); + } else { + Class[] argCls = method.getParameterTypes(); + for (JavaMethod jm : sameName) { + JavaMethod.JavaParams params = jm.getJavaParams(); + if (params != null && params.getJavaParam() != null && params.getJavaParam().size() == argCls.length) { + int count = 0; + for (int i = 0; i < argCls.length; i++) { + JavaParam jp = params.getJavaParam().get(i); + if (argCls[i].getName().equals(jp.getJavaType())) { + count++; + } + } + if (count == argCls.length) { + return jm; + } + } + } + } + } + return null; + } + + Element findXmlElement(Element[] xa) { + if (xa == null) return null; + for (Element e : xa) { + if (e.getLocalName().equals("java-type")) return e; + if (e.getLocalName().equals("xml-element")) return e; + } + return null; + } + + /** + * Helper class to merge two different arrays of annotation objects. It merges annotations based on attribute + * existing-annotations in external customization file. + *

    + * We suppose that in the result array there wouldn't be two annotations of same type: + * annotation.annotationType().getName(); if there are found such annotations the one from reflection is + * considered overriden and is thrown away. + *

    + * The helper can work either with one and two dimensional array, but it can be used for two single Annotation + * objects; + */ + static abstract class Merger { + + JavaWsdlMappingType reader; + + Merger(JavaWsdlMappingType r) { + this.reader = r; + } + + abstract T reflection(); + + abstract T external(); + + @SuppressWarnings("unchecked") + T merge() { + T reflection = reflection(); + if (reader == null) { + return reflection; + } + + T external = external(); + if (!MERGE.equals(reader.getExistingAnnotations())) { + return external; + } + + if (reflection instanceof Annotation) { + return (T) doMerge((Annotation) reflection, (Annotation) external); + } else if (reflection instanceof Annotation[][]) { + return (T) doMerge((Annotation[][]) reflection, (Annotation[][]) external); + } else { + return (T) doMerge((Annotation[]) reflection, (Annotation[]) external); + } + } + + private Annotation doMerge(Annotation reflection, Annotation external) { + return external != null ? external : reflection; + } + + private Annotation[][] doMerge(Annotation[][] reflection, Annotation[][] external) { + for (int i = 0; i < reflection.length; i++) { + reflection[i] = doMerge(reflection[i], external.length > i ? external[i] : null); + } + return reflection; + } + + private Annotation[] doMerge(Annotation[] annotations, Annotation[] externalAnnotations) { + HashMap mergeMap = new HashMap(); + if (annotations != null) { + for (Annotation reflectionAnnotation : annotations) { + mergeMap.put(reflectionAnnotation.annotationType().getName(), reflectionAnnotation); + } + } + + // overriding happens here, based on annotationType().getName() ... + if (externalAnnotations != null) { + for (Annotation externalAnnotation : externalAnnotations) { + mergeMap.put(externalAnnotation.annotationType().getName(), externalAnnotation); + } + } + Collection values = mergeMap.values(); + int size = values.size(); + return size == 0 ? null : values.toArray(new Annotation[size]); + } + + } + + static class Util { + + //private static final String DATABINDING_XSD = "com/sun/xml/internal/ws/model/jaxws-databinding.xsd"; + private static final String DATABINDING_XSD = "jaxws-databinding.xsd"; + //private static final String TRANSLATE_NAMESPACES_XSL = "/com/sun/xml/internal/ws/model/jaxws-databinding-translate-namespaces.xml"; + private static final String TRANSLATE_NAMESPACES_XSL = "jaxws-databinding-translate-namespaces.xml"; + + static Schema schema; + static JAXBContext jaxbContext; + + static { + SchemaFactory sf = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); + try { + URL xsdUrl = getResource(); + if (xsdUrl != null) { + schema = sf.newSchema(xsdUrl); + } + } catch (SAXException e1) { + // e1.printStackTrace(); + } + + jaxbContext = createJaxbContext(false); + } + + private static URL getResource() { + ClassLoader classLoader = Util.class.getClassLoader(); + return classLoader != null ? classLoader.getResource(DATABINDING_XSD) : ClassLoader.getSystemResource(DATABINDING_XSD); + } + + private static JAXBContext createJaxbContext(boolean disableXmlSecurity) { + Class[] cls = {ObjectFactory.class}; + try { + if (disableXmlSecurity) { + Map properties = new HashMap(); + properties.put(JAXBRIContext.DISABLE_XML_SECURITY, disableXmlSecurity); + return JAXBContext.newInstance(cls, properties); + } else { + return JAXBContext.newInstance(cls); + } + } catch (JAXBException e) { + e.printStackTrace(); + return null; + } + } + + @SuppressWarnings("unchecked") + public static JavaWsdlMappingType read(Source src, boolean xsdValidation, boolean disableSecureXmlProcessing) throws IOException, JAXBException { + JAXBContext ctx = jaxbContext(disableSecureXmlProcessing); + try { + Unmarshaller um = ctx.createUnmarshaller(); + if (xsdValidation) { + if (schema == null) { + //TODO 0 warning for schema == null + } + um.setSchema(schema); + } + Object o = um.unmarshal(src); + return getJavaWsdlMapping(o); + } catch (JAXBException e) { + // throw new + // WebServiceException(WsDatabindingMessages.mappingFileCannotRead + // (src.getSystemId()), e); + URL url = new URL(src.getSystemId()); + Source s = new StreamSource(url.openStream()); + Unmarshaller um = ctx.createUnmarshaller(); + if (xsdValidation) { + if (schema == null) { + //TODO 0 warning for schema == null + } + um.setSchema(schema); + } + Object o = um.unmarshal(s); + return getJavaWsdlMapping(o); + } + } + + private static JAXBContext jaxbContext(boolean disableSecureXmlProcessing) { + // as it is supposed to have security enabled in most cases, we create and don't cache + // "insecure" JAXBContext - these should be corner cases + return disableSecureXmlProcessing ? createJaxbContext(true) : jaxbContext; + } + + public static JavaWsdlMappingType transformAndRead(Source src, boolean disableSecureXmlProcessing) throws TransformerException, JAXBException { + Source xsl = new StreamSource(Util.class.getResourceAsStream(TRANSLATE_NAMESPACES_XSL)); + JAXBResult result = new JAXBResult(jaxbContext(disableSecureXmlProcessing)); + TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing); + Transformer transformer = tf.newTemplates(xsl).newTransformer(); + transformer.transform(src, result); + return getJavaWsdlMapping(result.getResult()); + } + + + static JavaWsdlMappingType getJavaWsdlMapping(Object o) { + Object val = (o instanceof JAXBElement) ? ((JAXBElement) o).getValue() : o; + if (val instanceof JavaWsdlMappingType) return (JavaWsdlMappingType) val; + // else if (val instanceof JavaWsdlMappings) + // for (JavaWsdlMappingType m: ((JavaWsdlMappings) val).getJavaWsdlMapping()) + // if (seiName.equals(m.javaTypeName)) return m; + return null; + } + + static T findInstanceOf(Class type, List objects) { + for (Object o : objects) { + if (type.isInstance(o)) { + return type.cast(o); + } + } + return null; + } + + static public T annotation(JavaWsdlMappingType jwse, Class anntype) { + if (jwse == null || jwse.getClassAnnotation() == null) { + return null; + } + return findInstanceOf(anntype, jwse.getClassAnnotation()); + } + + static public T annotation(JavaMethod jm, Class anntype) { + if (jm == null || jm.getMethodAnnotation() == null) { + return null; + } + return findInstanceOf(anntype, jm.getMethodAnnotation()); + } + + static public T annotation(JavaParam jp, Class anntype) { + if (jp == null || jp.getParamAnnotation() == null) { + return null; + } + return findInstanceOf(anntype, jp.getParamAnnotation()); + } + + static public Element[] annotation(JavaMethod jm) { + if (jm == null || jm.getMethodAnnotation() == null) { + return null; + } + return findElements(jm.getMethodAnnotation()); + } + + static public Element[] annotation(JavaParam jp) { + if (jp == null || jp.getParamAnnotation() == null) { + return null; + } + return findElements(jp.getParamAnnotation()); + } + + private static Element[] findElements(List objects) { + List elems = new ArrayList(); + for (Object o : objects) { + if (o instanceof Element) { + elems.add((Element) o); + } + } + return elems.toArray(new Element[elems.size()]); + } + + static String documentRootNamespace(Source src, boolean disableSecureXmlProcessing) throws XMLStreamException { + XMLInputFactory factory; + factory = XmlUtil.newXMLInputFactory(!disableSecureXmlProcessing); + XMLStreamReader streamReader = factory.createXMLStreamReader(src); + XMLStreamReaderUtil.nextElementContent(streamReader); + String namespaceURI = streamReader.getName().getNamespaceURI(); + XMLStreamReaderUtil.close(streamReader); + return namespaceURI; + } + } + + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java index 6a4cedb5ab1..2f8218f5a43 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/FieldSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -112,11 +112,11 @@ final class FieldSignature { } private static String args(ParameterizedType p) { - String sig = "<"; + StringBuilder sig = new StringBuilder("<"); for(Type t : p.getActualTypeArguments()) { - sig += vms(t); + sig.append(vms(t)); } - return sig+">"; + return sig.append(">").toString(); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java index 38c2d55885e..1ba5a4cdf3d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/Injector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java index 858826e2c86..7d248807c46 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/JavaMethodImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -106,7 +106,8 @@ public final class JavaMethodImpl implements JavaMethod { inputAction = soapAction; else if(!inputAction.equals(soapAction)){ //both are explicitly set via annotations, make sure @Action == @WebMethod.action - throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName()); + //http://java.net/jira/browse/JAX_WS-1108 + //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName()); } } } @@ -122,7 +123,7 @@ public final class JavaMethodImpl implements JavaMethod { } /** - * @see {@link JavaMethod} + * @see JavaMethod * * @return Returns the method. */ @@ -131,7 +132,7 @@ public final class JavaMethodImpl implements JavaMethod { } /** - * @see {@link JavaMethod} + * @see JavaMethod * * @return Returns the SEI method where annotations are present */ @@ -171,7 +172,7 @@ public final class JavaMethodImpl implements JavaMethod { } /** - * Returns the {@link WSDLBoundOperation} Operation associated with {@link this} + * Returns the {@link WSDLBoundOperation} Operation associated with {@link JavaMethodImpl} * operation. * @deprecated * @return the WSDLBoundOperation for this JavaMethod diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java index d7de662c09e..d17dd3c86a9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ParameterImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,8 @@ import com.sun.xml.internal.bind.api.TypeReference; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.api.model.Parameter; import com.sun.xml.internal.ws.api.model.ParameterBinding; +import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge; +import com.sun.xml.internal.ws.spi.db.WrapperComposite; import com.sun.xml.internal.ws.spi.db.XMLBridge; import com.sun.xml.internal.ws.spi.db.TypeInfo; @@ -65,6 +67,9 @@ public class ParameterImpl implements Parameter { private QName name; private final JavaMethodImpl parent; + WrapperParameter wrapper; + TypeInfo itemTypeInfo; + public ParameterImpl(JavaMethodImpl parent, TypeInfo type, Mode mode, int index) { assert type != null; @@ -94,6 +99,26 @@ public class ParameterImpl implements Parameter { return getOwner().getXMLBridge(typeInfo); } + public XMLBridge getInlinedRepeatedElementBridge() { + TypeInfo itemType = getItemType(); + if (itemType != null) { + XMLBridge xb = getOwner().getXMLBridge(itemType); + if (xb != null) return new RepeatedElementBridge(typeInfo, xb); + } + return null; + } + + public TypeInfo getItemType() { + if (itemTypeInfo != null) return itemTypeInfo; + //RpcLit cannot inline repeated element in wrapper + if (parent.getBinding().isRpcLit() || wrapper == null) return null; + //InlinedRepeatedElementBridge is only used for dynamic wrapper (no wrapper class) + if (!WrapperComposite.class.equals(wrapper.getTypeInfo().type)) return null; + if (!getBinding().isBody()) return null; + itemTypeInfo = typeInfo.getItemType(); + return itemTypeInfo; + } + /** @deprecated */ public Bridge getBridge() { return getOwner().getBridge(typeReference); @@ -118,7 +143,7 @@ public class ParameterImpl implements Parameter { /** * Sometimes we need to overwrite the typeReferenc, such as during patching for rpclit - * @see AbstractSEIModelImpl#applyParameterBinding(com.sun.xml.internal.ws.model.wsdl.WSDLBoundPortTypeImpl) + * @see AbstractSEIModelImpl#applyRpcLitParamBinding(JavaMethodImpl, WrapperParameter, WSDLBoundPortType, WebParam.Mode) * @deprecated */ void setTypeReference(TypeReference type){ @@ -229,6 +254,7 @@ public class ParameterImpl implements Parameter { } void fillTypes(List types) { - types.add(getTypeInfo()); + TypeInfo itemType = getItemType(); + types.add((itemType != null) ? itemType : getTypeInfo()); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java index 06b068faec3..004c52c695d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/ReflectAnnotationReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java index 9d52d805952..22c9f832964 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package com.sun.xml.internal.ws.model; import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; @@ -47,8 +48,8 @@ import com.sun.xml.internal.ws.spi.db.BindingContext; import com.sun.xml.internal.ws.spi.db.BindingHelper; import com.sun.xml.internal.ws.spi.db.TypeInfo; import com.sun.xml.internal.ws.spi.db.WrapperComposite; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingMode; + +import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion; import javax.jws.*; import javax.jws.WebParam.Mode; @@ -117,6 +118,9 @@ public class RuntimeModeler { public static final Class REMOTE_EXCEPTION_CLASS = RemoteException.class; public static final Class RUNTIME_EXCEPTION_CLASS = RuntimeException.class; public static final Class EXCEPTION_CLASS = Exception.class; + public static final String DecapitalizeExceptionBeanProperties = "com.sun.xml.internal.ws.api.model.DecapitalizeExceptionBeanProperties"; + public static final String SuppressDocLitWrapperGeneration = "com.sun.xml.internal.ws.api.model.SuppressDocLitWrapperGeneration"; + public static final String DocWrappeeNamespapceQualified = "com.sun.xml.internal.ws.api.model.DocWrappeeNamespapceQualified"; /*public RuntimeModeler(@NotNull Class portClass, @NotNull QName serviceName, @NotNull BindingID bindingId, @NotNull WebServiceFeature... features) { this(portClass, serviceName, null, bindingId, features); @@ -151,6 +155,7 @@ public class RuntimeModeler { this.config = config; this.wsBinding = config.getWSBinding(); metadataReader = config.getMetadataReader(); + targetNamespace = config.getMappingInfo().getTargetNamespace(); if (metadataReader == null) metadataReader = new ReflectAnnotationReader(); if (wsBinding != null) { this.bindingId = wsBinding.getBindingId(); @@ -159,21 +164,31 @@ public class RuntimeModeler { this.features = WebServiceFeatureList.toList(wsBinding.getFeatures()); } else { this.bindingId = config.getMappingInfo().getBindingID(); + this.features = WebServiceFeatureList.toList(config.getFeatures()); if (binding != null) bindingId = binding.getBinding().getBindingId(); if (bindingId == null) bindingId = getDefaultBindingID(); - this.features = WebServiceFeatureList.toList(config.getFeatures()); if (!features.contains(MTOMFeature.class)) { MTOM mtomAn = getAnnotation(portClass, MTOM.class); if (mtomAn != null) features.add(WebServiceFeatureList.getFeature(mtomAn)); } + if (!features.contains(com.oracle.webservices.internal.api.EnvelopeStyleFeature.class)) { + com.oracle.webservices.internal.api.EnvelopeStyle es = getAnnotation(portClass, com.oracle.webservices.internal.api.EnvelopeStyle.class); + if (es != null) features.add(WebServiceFeatureList.getFeature(es)); + } this.wsBinding = bindingId.createBinding(features); } } private BindingID getDefaultBindingID() { BindingType bt = getAnnotation(portClass, BindingType.class); - String id = (bt != null) ? bt.value() : javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; - return BindingID.parse(id); + if (bt != null) return BindingID.parse(bt.value()); + SOAPVersion ver = getSoapVersion(features); + boolean mtomEnabled = features.isEnabled(MTOMFeature.class); + if (SOAPVersion.SOAP_12.equals(ver)) { + return (mtomEnabled) ? BindingID.SOAP12_HTTP_MTOM : BindingID.SOAP12_HTTP; + } else { + return (mtomEnabled) ? BindingID.SOAP11_HTTP_MTOM : BindingID.SOAP11_HTTP; + } } /** @@ -295,12 +310,12 @@ public class RuntimeModeler { // serviceName, portName); // } - if (portName == null) portName = getPortName(portClass, serviceName.getNamespaceURI(), metadataReader); + if (portName == null) portName = getPortName(portClass, metadataReader, serviceName.getNamespaceURI()); model.setPortName(portName); // Check if databinding is overridden in annotation. - DatabindingMode dbm = getAnnotation(portClass, DatabindingMode.class); - if (dbm != null) model.databindingInfo.setDatabindingMode(dbm.value()); + com.oracle.webservices.internal.api.databinding.DatabindingMode dbm2 = getAnnotation(portClass, com.oracle.webservices.internal.api.databinding.DatabindingMode.class); + if (dbm2 != null) model.databindingInfo.setDatabindingMode(dbm2.value()); processClass(seiClass); if (model.getJavaMethods().size() == 0) @@ -345,11 +360,17 @@ public class RuntimeModeler { } } + private boolean noWrapperGen() { + Object o = config.properties().get(SuppressDocLitWrapperGeneration); + return (o!= null && o instanceof Boolean) ? ((Boolean) o) : false; + } + private Class getRequestWrapperClass(String className, Method method, QName reqElemName) { ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader; try { return loader.loadClass(className); } catch (ClassNotFoundException e) { + if (noWrapperGen()) return WrapperComposite.class; logger.fine("Dynamically creating request wrapper Class " + className); return WrapperBeanGenerator.createRequestWrapperBean(className, method, reqElemName, loader); } @@ -360,6 +381,7 @@ public class RuntimeModeler { try { return loader.loadClass(className); } catch (ClassNotFoundException e) { + if (noWrapperGen()) return WrapperComposite.class; logger.fine("Dynamically creating response wrapper bean Class " + className); return WrapperBeanGenerator.createResponseWrapperBean(className, method, resElemName, loader); } @@ -367,12 +389,15 @@ public class RuntimeModeler { private Class getExceptionBeanClass(String className, Class exception, String name, String namespace) { + boolean decapitalizeExceptionBeanProperties = true; + Object o = config.properties().get(DecapitalizeExceptionBeanProperties); + if (o!= null && o instanceof Boolean) decapitalizeExceptionBeanProperties = (Boolean) o; ClassLoader loader = (classLoader == null) ? Thread.currentThread().getContextClassLoader() : classLoader; try { return loader.loadClass(className); } catch (ClassNotFoundException e) { logger.fine("Dynamically creating exception bean Class " + className); - return WrapperBeanGenerator.createExceptionBean(className, exception, targetNamespace, name, namespace, loader); + return WrapperBeanGenerator.createExceptionBean(className, exception, targetNamespace, name, namespace, loader, decapitalizeExceptionBeanProperties); } } @@ -417,6 +442,7 @@ public class RuntimeModeler { targetNamespace = portTypeName.getNamespaceURI(); model.setPortTypeName(portTypeName); model.setTargetNamespace(targetNamespace); + model.defaultSchemaNamespaceSuffix = config.getMappingInfo().getDefaultSchemaNamespaceSuffix(); model.setWSDLLocation(webService.wsdlLocation()); SOAPBinding soapBinding = getAnnotation(clazz, SOAPBinding.class); @@ -580,8 +606,9 @@ public class RuntimeModeler { * @param method the method to model */ private void processMethod(Method method) { - int mods = method.getModifiers(); +// int mods = method.getModifiers(); WebMethod webMethod = getAnnotation(method, WebMethod.class); + if (webMethod != null && webMethod.exclude()) return; /* validations are already done @@ -733,8 +760,9 @@ public class RuntimeModeler { RequestWrapper reqWrapper = getAnnotation(method,RequestWrapper.class); ResponseWrapper resWrapper = getAnnotation(method,ResponseWrapper.class); String beanPackage = packageName + PD_JAXWS_PACKAGE_PD; - if (packageName == null || (packageName != null && packageName.length() == 0)) + if (packageName == null || packageName.length() == 0) { beanPackage = JAXWS_PACKAGE_PD; + } String requestClassName; if(reqWrapper != null && reqWrapper.className().length()>0){ requestClassName = reqWrapper.className(); @@ -834,12 +862,13 @@ public class RuntimeModeler { returnType = getAsyncReturnType(method, returnType); resultQName = new QName(RETURN); } - + resultQName = qualifyWrappeeIfNeeded(resultQName, resNamespace); if (!isOneway && (returnType != null) && (!returnType.getName().equals("void"))) { Annotation[] rann = getAnnotations(method); if (resultQName.getLocalPart() != null) { TypeInfo rTypeReference = new TypeInfo(resultQName, returnType, rann); metadataReader.getProperties(rTypeReference.properties(), method); + rTypeReference.setGenericType(method.getGenericReturnType()); ParameterImpl returnParameter = new ParameterImpl(javaMethod, rTypeReference, Mode.OUT, -1); if (isResultHeader) { returnParameter.setBinding(ParameterBinding.HEADER); @@ -901,9 +930,11 @@ public class RuntimeModeler { if (isHolder && paramMode == Mode.IN) paramMode = Mode.INOUT; } + paramQName = qualifyWrappeeIfNeeded(paramQName, reqNamespace); typeRef = new TypeInfo(paramQName, clazzType, pannotations[pos]); metadataReader.getProperties(typeRef.properties(), method, pos); + typeRef.setGenericType(genericParameterTypes[pos]); ParameterImpl param = new ParameterImpl(javaMethod, typeRef, paramMode, pos++); if (isHeader) { @@ -936,6 +967,16 @@ public class RuntimeModeler { processExceptions(javaMethod, method); } + private QName qualifyWrappeeIfNeeded(QName resultQName, String ns) { + Object o = config.properties().get(DocWrappeeNamespapceQualified); + boolean qualified = (o!= null && o instanceof Boolean) ? ((Boolean) o) : false; + if (qualified) { + if (resultQName.getNamespaceURI() == null || "".equals(resultQName.getNamespaceURI())) { + return new QName(ns, resultQName.getLocalPart()); + } + } + return resultQName; + } /** * models a rpc/literal method @@ -1345,7 +1386,7 @@ public class RuntimeModeler { } QName requestQName = new QName(requestNamespace, paramName); - if (!isHeader) javaMethod.setRequestPayloadName(requestQName); + if (!isHeader && paramMode != Mode.OUT) javaMethod.setRequestPayloadName(requestQName); //doclit/wrapped TypeInfo typeRef = //operationName with upper 1 char new TypeInfo(requestQName, clazzType, @@ -1492,18 +1533,18 @@ public class RuntimeModeler { * @return the wsdl:portName for the implClass */ public static QName getPortName(Class implClass, String targetNamespace) { - return getPortName(implClass, targetNamespace, null); + return getPortName(implClass, null, targetNamespace); } public static QName getPortName(Class implClass, String targetNamespace, boolean isStandard) { - return getPortName(implClass, targetNamespace, null, isStandard); + return getPortName(implClass, null, targetNamespace, isStandard); } - public static QName getPortName(Class implClass, String targetNamespace, MetadataReader reader) { - return getPortName(implClass, targetNamespace, reader, true); + public static QName getPortName(Class implClass, MetadataReader reader, String targetNamespace) { + return getPortName(implClass, reader, targetNamespace, true); } - public static QName getPortName(Class implClass, String targetNamespace, MetadataReader reader, boolean isStandard) { + public static QName getPortName(Class implClass, MetadataReader reader, String targetNamespace, boolean isStandard) { WebService webService = getAnnotation(WebService.class, implClass, reader); if (isStandard && webService == null) { throw new RuntimeModelerException("runtime.modeler.no.webservice.annotation", @@ -1526,7 +1567,9 @@ public class RuntimeModeler { if (implClass.getPackage() != null) { packageName = implClass.getPackage().getName(); } - targetNamespace = getNamespace(packageName); + if (packageName != null) { + targetNamespace = getNamespace(packageName); + } if (targetNamespace == null) { throw new RuntimeModelerException("runtime.modeler.no.package", implClass.getName()); @@ -1550,6 +1593,11 @@ public class RuntimeModeler { public static QName getPortTypeName(Class implOrSeiClass){ return getPortTypeName(implOrSeiClass, null, null); } + + public static QName getPortTypeName(Class implOrSeiClass, MetadataReader metadataReader){ + return getPortTypeName(implOrSeiClass, null, metadataReader); + } + public static QName getPortTypeName(Class implOrSeiClass, String tns, MetadataReader reader){ assert(implOrSeiClass != null); WebService webService = getAnnotation(WebService.class, implOrSeiClass, reader); @@ -1566,7 +1614,8 @@ public class RuntimeModeler { } catch (ClassNotFoundException e) { throw new RuntimeModelerException("runtime.modeler.class.not.found", epi); } - if (!clazz.isAnnotationPresent(javax.jws.WebService.class)) { + WebService ws = getAnnotation(WebService.class, clazz, reader); + if (ws == null) { throw new RuntimeModelerException("runtime.modeler.endpoint.interface.no.webservice", webService.endpointInterface()); } @@ -1578,7 +1627,6 @@ public class RuntimeModeler { if(name.length() == 0){ name = clazz.getSimpleName(); } - tns = webService.targetNamespace(); if (tns == null || "".equals(tns.trim())) tns = webService.targetNamespace(); if (tns.length() == 0) tns = getNamespace(clazz.getPackage().getName()); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java index 8f4b1be71bc..f25af0eac8e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModelerException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ */ package com.sun.xml.internal.ws.model; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * RuntimeModelerException represents an exception that occurred while diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java index d57f3761020..e3434a58182 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/SOAPSEIModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import com.sun.xml.internal.ws.binding.WebServiceFeatureList; import javax.jws.WebParam.Mode; import javax.xml.namespace.QName; -import javax.xml.ws.WebServiceFeature; import java.util.HashSet; import java.util.Iterator; import java.util.Set; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java index de0422c307b..99eb3351fe0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperBeanGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -257,7 +257,7 @@ public class WrapperBeanGenerator { static Class createRequestWrapperBean(String className, Method method, QName reqElemName, ClassLoader cl) { - LOGGER.fine("Request Wrapper Class : "+className); + LOGGER.log(Level.FINE, "Request Wrapper Class : {0}", className); List requestMembers = RUNTIME_GENERATOR.collectRequestBeanMembers( method); @@ -276,7 +276,7 @@ public class WrapperBeanGenerator { static Class createResponseWrapperBean(String className, Method method, QName resElemName, ClassLoader cl) { - LOGGER.fine("Response Wrapper Class : "+className); + LOGGER.log(Level.FINE, "Response Wrapper Class : {0}", className); List responseMembers = RUNTIME_GENERATOR.collectResponseBeanMembers(method); @@ -327,8 +327,12 @@ public class WrapperBeanGenerator { static Class createExceptionBean(String className, Class exception, String typeNS, String elemName, String elemNS, ClassLoader cl) { + return createExceptionBean(className, exception, typeNS, elemName, elemNS, cl, true); + } - Collection fields = RUNTIME_GENERATOR.collectExceptionBeanMembers(exception); + static Class createExceptionBean(String className, Class exception, String typeNS, String elemName, String elemNS, ClassLoader cl, boolean decapitalizeExceptionBeanProperties) { + + Collection fields = RUNTIME_GENERATOR.collectExceptionBeanMembers(exception, decapitalizeExceptionBeanProperties); byte[] image; try { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java index 3df4833ab41..d1a95c65aea 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/WrapperParameter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.xml.internal.ws.model; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.api.model.ParameterBinding; import com.sun.xml.internal.ws.spi.db.TypeInfo; +import com.sun.xml.internal.ws.spi.db.WrapperComposite; import javax.jws.WebParam.Mode; import java.util.ArrayList; @@ -84,6 +85,7 @@ public class WrapperParameter extends ParameterImpl { */ public void addWrapperChild(ParameterImpl wrapperChild) { wrapperChildren.add(wrapperChild); + wrapperChild.wrapper = this; // must bind to body. see class javadoc assert wrapperChild.getBinding()== ParameterBinding.BODY; } @@ -95,12 +97,15 @@ public class WrapperParameter extends ParameterImpl { @Override void fillTypes(List types) { super.fillTypes(types); - if(getParent().getBinding().isRpcLit()) { - // for rpc/lit, we need to individually marshal/unmarshal wrapped values, - // so their TypeReference needs to be collected -// assert getTypeReference().type==CompositeStructure.class; - for (ParameterImpl p : wrapperChildren) - p.fillTypes(types); + if(WrapperComposite.class.equals(getTypeInfo().type)) { + for (ParameterImpl p : wrapperChildren) p.fillTypes(types); } +// if(getParent().getBinding().isRpcLit()) { +// // for rpc/lit, we need to individually marshal/unmarshal wrapped values, +// // so their TypeReference needs to be collected +//// assert getTypeReference().type==CompositeStructure.class; +// for (ParameterImpl p : wrapperChildren) +// p.fillTypes(types); +// } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java index b5f9fc2fb9f..461a032388c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/soap/SOAPBindingImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java index ebe7c36d1f2..cb3ac1fe133 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractExtensibleImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java index ac3302fdaf6..df10b8227c6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractFeaturedObjectImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java index 77ccef5cef8..08ff403c680 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/AbstractObjectImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java index fb3ef689b87..86dd0dc8eb4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundFaultImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java index bfeb46e4190..fd2cd94e114 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundOperationImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import com.sun.istack.internal.Nullable; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.model.ParameterBinding; import com.sun.xml.internal.ws.api.model.wsdl.*; +import com.sun.xml.internal.ws.model.RuntimeModeler; import javax.jws.WebParam.Mode; import javax.jws.soap.SOAPBinding.Style; @@ -382,7 +383,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme * For rpclit gives namespace value on soapbinding:body@namespace * * @return non-null for rpclit and null for doclit - * @see com.sun.xml.internal.ws.model.RuntimeModeler#processRpcMethod(com.sun.xml.internal.ws.model.JavaMethodImpl, String, javax.jws.WebMethod, String, java.lang.reflect.Method, javax.jws.WebService) + * @see RuntimeModeler#processRpcMethod(JavaMethodImpl, String, String, Method) */ public String getRequestNamespace(){ return (reqNamespace != null)?reqNamespace:name.getNamespaceURI(); @@ -397,7 +398,7 @@ public final class WSDLBoundOperationImpl extends AbstractExtensibleImpl impleme * For rpclit gives namespace value on soapbinding:body@namespace * * @return non-null for rpclit and null for doclit - * * @see com.sun.xml.internal.ws.modeler.RuntimeModeler#processRpcMethod(com.sun.xml.internal.ws.model.JavaMethod, String, javax.jws.WebMethod, String, java.lang.reflect.Method, javax.jws.WebService) + * @see RuntimeModeler#processRpcMethod(JavaMethodImpl, String, String, Method) */ public String getResponseNamespace(){ return (respNamespace!=null)?respNamespace:name.getNamespaceURI(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java index c0a0d174ffc..c77c6876e93 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLBoundPortTypeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -145,7 +145,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl * * @param operation wsdl:operation@name value. Must be non-null. * @param part wsdl:part@name such as value of soap:header@part. Must be non-null. - * @param mode {@link Mode#IN} or {@link Mode@OUT}. Must be non-null. + * @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null. * @return null if the binding could not be resolved for the part. */ public ParameterBinding getBinding(QName operation, String part, Mode mode) { @@ -165,7 +165,7 @@ public final class WSDLBoundPortTypeImpl extends AbstractFeaturedObjectImpl impl * * @param operation wsdl:operation@name value. Must be non-null. * @param part wsdl:part@name such as value of soap:header@part. Must be non-null. - * @param mode {@link Mode#IN} or {@link Mode@OUT}. Must be non-null. + * @param mode {@link Mode#IN} or {@link Mode#OUT}. Must be non-null. * @return null if the binding could not be resolved for the part. */ public String getMimeType(QName operation, String part, Mode mode) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java index 29a3fdae2ba..2e01c6aa7b2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLDirectProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java index 736c176d05a..d35b63378d3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLFaultImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java index d78d2861def..cde05d05d95 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLInputImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java index a898c607cb5..c3a08652060 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLMessageImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java index abd6a0e1aa8..78aa5cab554 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLModelImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java index f7db16f3c9e..5f5dd27811e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOperationImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java index 15e250c8bf7..851ba7254fb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLOutputImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java index ad424d988b4..f796fa2ec95 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java index d37cfab2698..1a0dcf12b8a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPartImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java index 832f129bad2..2813d60847c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java index 5604dd048bb..f67af10199b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java index 30d979a8eb1..6fb98e6ba6b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLPortTypeImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java index 3fd422c769e..f1a75edc67b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,14 +25,16 @@ package com.sun.xml.internal.ws.model.wsdl; +import com.oracle.webservices.internal.api.message.BasePropertySet; +import com.oracle.webservices.internal.api.message.PropertySet; import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.api.model.SEIModel; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import javax.xml.namespace.QName; import javax.xml.ws.handler.MessageContext; + import org.xml.sax.InputSource; /** @@ -41,7 +43,7 @@ import org.xml.sax.InputSource; * * @author Jitendra Kotamraju */ -public abstract class WSDLProperties extends PropertySet { +public abstract class WSDLProperties extends BasePropertySet { private static final PropertyMap model; static { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java index 3154fd8fa54..a24419f7295 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/wsdl/WSDLServiceImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java new file mode 100644 index 00000000000..f64110114c3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/ClassAdapter.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * ASM: a very small and fast Java bytecode manipulation framework + * Copyright (c) 2000-2007 INRIA, France Telecom + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.sun.xml.internal.ws.org.objectweb.asm; + +/** + * An empty {@link ClassVisitor} that delegates to another {@link ClassVisitor}. + * This class can be used as a super class to quickly implement usefull class + * adapter classes, just by overriding the necessary methods. + * + * @author Eric Bruneton + */ +public class ClassAdapter implements ClassVisitor { + + /** + * The {@link ClassVisitor} to which this adapter delegates calls. + */ + protected ClassVisitor cv; + + /** + * Constructs a new {@link ClassAdapter} object. + * + * @param cv the class visitor to which this adapter must delegate calls. + */ + public ClassAdapter(final ClassVisitor cv) { + this.cv = cv; + } + + public void visit( + final int version, + final int access, + final String name, + final String signature, + final String superName, + final String[] interfaces) + { + cv.visit(version, access, name, signature, superName, interfaces); + } + + public void visitSource(final String source, final String debug) { + cv.visitSource(source, debug); + } + + public void visitOuterClass( + final String owner, + final String name, + final String desc) + { + cv.visitOuterClass(owner, name, desc); + } + + public AnnotationVisitor visitAnnotation( + final String desc, + final boolean visible) + { + return cv.visitAnnotation(desc, visible); + } + + public void visitAttribute(final Attribute attr) { + cv.visitAttribute(attr); + } + + public void visitInnerClass( + final String name, + final String outerName, + final String innerName, + final int access) + { + cv.visitInnerClass(name, outerName, innerName, access); + } + + public FieldVisitor visitField( + final int access, + final String name, + final String desc, + final String signature, + final Object value) + { + return cv.visitField(access, name, desc, signature, value); + } + + public MethodVisitor visitMethod( + final int access, + final String name, + final String desc, + final String signature, + final String[] exceptions) + { + return cv.visitMethod(access, name, desc, signature, exceptions); + } + + public void visitEnd() { + cv.visitEnd(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java new file mode 100644 index 00000000000..2e61b0cd190 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/org/objectweb/asm/MethodAdapter.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * ASM: a very small and fast Java bytecode manipulation framework + * Copyright (c) 2000-2007 INRIA, France Telecom + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ +package com.sun.xml.internal.ws.org.objectweb.asm; + +/** + * An empty {@link MethodVisitor} that delegates to another + * {@link MethodVisitor}. This class can be used as a super class to quickly + * implement usefull method adapter classes, just by overriding the necessary + * methods. + * + * @author Eric Bruneton + */ +public class MethodAdapter implements MethodVisitor { + + /** + * The {@link MethodVisitor} to which this adapter delegates calls. + */ + protected MethodVisitor mv; + + /** + * Constructs a new {@link MethodAdapter} object. + * + * @param mv the code visitor to which this adapter must delegate calls. + */ + public MethodAdapter(final MethodVisitor mv) { + this.mv = mv; + } + + public AnnotationVisitor visitAnnotationDefault() { + return mv.visitAnnotationDefault(); + } + + public AnnotationVisitor visitAnnotation( + final String desc, + final boolean visible) + { + return mv.visitAnnotation(desc, visible); + } + + public AnnotationVisitor visitParameterAnnotation( + final int parameter, + final String desc, + final boolean visible) + { + return mv.visitParameterAnnotation(parameter, desc, visible); + } + + public void visitAttribute(final Attribute attr) { + mv.visitAttribute(attr); + } + + public void visitCode() { + mv.visitCode(); + } + + public void visitFrame( + final int type, + final int nLocal, + final Object[] local, + final int nStack, + final Object[] stack) + { + mv.visitFrame(type, nLocal, local, nStack, stack); + } + + public void visitInsn(final int opcode) { + mv.visitInsn(opcode); + } + + public void visitIntInsn(final int opcode, final int operand) { + mv.visitIntInsn(opcode, operand); + } + + public void visitVarInsn(final int opcode, final int var) { + mv.visitVarInsn(opcode, var); + } + + public void visitTypeInsn(final int opcode, final String type) { + mv.visitTypeInsn(opcode, type); + } + + public void visitFieldInsn( + final int opcode, + final String owner, + final String name, + final String desc) + { + mv.visitFieldInsn(opcode, owner, name, desc); + } + + public void visitMethodInsn( + final int opcode, + final String owner, + final String name, + final String desc) + { + mv.visitMethodInsn(opcode, owner, name, desc); + } + + public void visitJumpInsn(final int opcode, final Label label) { + mv.visitJumpInsn(opcode, label); + } + + public void visitLabel(final Label label) { + mv.visitLabel(label); + } + + public void visitLdcInsn(final Object cst) { + mv.visitLdcInsn(cst); + } + + public void visitIincInsn(final int var, final int increment) { + mv.visitIincInsn(var, increment); + } + + public void visitTableSwitchInsn( + final int min, + final int max, + final Label dflt, + final Label[] labels) + { + mv.visitTableSwitchInsn(min, max, dflt, labels); + } + + public void visitLookupSwitchInsn( + final Label dflt, + final int[] keys, + final Label[] labels) + { + mv.visitLookupSwitchInsn(dflt, keys, labels); + } + + public void visitMultiANewArrayInsn(final String desc, final int dims) { + mv.visitMultiANewArrayInsn(desc, dims); + } + + public void visitTryCatchBlock( + final Label start, + final Label end, + final Label handler, + final String type) + { + mv.visitTryCatchBlock(start, end, handler, type); + } + + public void visitLocalVariable( + final String name, + final String desc, + final String signature, + final Label start, + final Label end, + final int index) + { + mv.visitLocalVariable(name, desc, signature, start, end, index); + } + + public void visitLineNumber(final int line, final Label start) { + mv.visitLineNumber(line, start); + } + + public void visitMaxs(final int maxStack, final int maxLocals) { + mv.visitMaxs(maxStack, maxLocals); + } + + public void visitEnd() { + mv.visitEnd(); + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java index 7157e9213d9..a9c675cb73a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java index d2e389127c2..09811ee7d11 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java index abde5f3d87c..02487dffe32 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerEndpointScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java index 4f6a8b3850a..fa18db60d02 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerMessageScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java index 1f5d636d40e..6796873cf84 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerOperationScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java index ee4d30eca28..31e5456fbe2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/BuilderHandlerServiceScope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java index 30c50549de4..5e995f169b5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/DefaultPolicyResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java index 4fe43fec378..da9caccd85c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyMapBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java index d1a1cf6249e..a3497ce9e7a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java index fe08e3145b0..6310c9164aa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLGeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java index fe55de26f71..93cba73b864 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/PolicyWSDLParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,7 @@ import com.sun.xml.internal.ws.policy.sourcemodel.wspolicy.XmlToken; import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; import com.sun.xml.internal.ws.policy.PolicyException; import com.sun.xml.internal.ws.policy.PolicyMap; +import com.sun.xml.internal.ws.util.xml.XmlUtil; import java.io.IOException; import java.io.InputStream; @@ -58,6 +59,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLInputFactory; import javax.xml.ws.WebServiceException; +import javax.xml.xpath.XPathFactoryConfigurationException; /** * This class parses the Policy Attachments in the WSDL and creates a PolicyMap thaty captures the policies configured on @@ -622,7 +624,7 @@ final public class PolicyWSDLParserExtension extends WSDLParserExtension { try { final URL xmlURL = new URL(fileUrl); ios = xmlURL.openStream(); - reader = XMLInputFactory.newInstance().createXMLStreamReader(ios); + reader = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(ios); while (reader.hasNext()) { if (reader.isStartElement() && NamespaceVersion.resolveAsToken(reader.getName()) == XmlToken.Policy) { readSinglePolicy(policyReader.readPolicyElement(reader, fileUrl), false); @@ -872,6 +874,14 @@ final public class PolicyWSDLParserExtension extends WSDLParserExtension { for (WSDLBoundFault boundFault : boundOperation.getFaults()) { final WSDLFault fault = boundFault.getFault(); + + // this shouldn't happen ususally, + // but since this scenario tested in lagacy tests, dont' fail here + if (fault == null) { + LOGGER.warning(PolicyMessages.WSP_1021_FAULT_NOT_BOUND(boundFault.getName())); + continue; + } + final WSDLMessage faultMessage = fault.getMessage(); final QName faultName = new QName(boundOperation.getBoundPortType().getName().getNamespaceURI(), boundFault.getName()); // We store the message and portType/fault under the same namespace as the binding/fault so that we can match them up later diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java index cae11116254..8f36da1bbd3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/SafePolicyReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java index 6f6525bf592..b3cd21f0899 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/WSDLBoundFaultContainer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java index aeb9f2ad0d5..2e9304be0ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyFeatureConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java index 488717fad24..ba2db58cac6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/policy/jaxws/spi/PolicyMapConfigurator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java index 0864c1e8d8a..0507d8b2b04 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ClientMUTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,7 +35,6 @@ import com.sun.xml.internal.ws.client.HandlerConfiguration; import javax.xml.namespace.QName; import javax.xml.ws.soap.SOAPFaultException; -import java.util.HashSet; import java.util.Set; /** @@ -74,7 +73,7 @@ public class ClientMUTube extends MUTube { //may have been changed from the time of invocation, it ok as its only fallback case. handlerConfig = binding.getHandlerConfig(); } - Set misUnderstoodHeaders = getMisUnderstoodHeaders(response.getMessage().getHeaders(), handlerConfig.getRoles(),handlerConfig.getHandlerKnownHeaders()); + Set misUnderstoodHeaders = getMisUnderstoodHeaders(response.getMessage().getHeaders(), handlerConfig.getRoles(),binding.getKnownHeaders()); if((misUnderstoodHeaders == null) || misUnderstoodHeaders.isEmpty()) { return super.processResponse(response); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java index b8e63a3ce39..6f43a20249c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MUTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,14 +29,12 @@ import com.sun.xml.internal.ws.api.SOAPVersion; import static com.sun.xml.internal.ws.api.SOAPVersion.SOAP_11; import static com.sun.xml.internal.ws.api.SOAPVersion.SOAP_12; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.addressing.AddressingVersion; import com.sun.xml.internal.ws.api.message.Header; -import com.sun.xml.internal.ws.api.message.HeaderList; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.pipe.TubeCloner; import com.sun.xml.internal.ws.api.pipe.helper.AbstractFilterTubeImpl; -import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.binding.SOAPBindingImpl; import com.sun.xml.internal.ws.message.DOMHeader; import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; @@ -49,7 +47,6 @@ import javax.xml.soap.SOAPFault; import javax.xml.ws.WebServiceException; import javax.xml.ws.soap.SOAPBinding; import javax.xml.ws.soap.SOAPFaultException; -import java.util.HashSet; import java.util.Set; import java.util.logging.Logger; @@ -95,27 +92,10 @@ abstract class MUTube extends AbstractFilterTubeImpl { * @return returns the headers that have mustUnderstand attribute and are not understood * by the binding. */ - public final Set getMisUnderstoodHeaders(HeaderList headers, Set roles, + public final Set getMisUnderstoodHeaders(MessageHeaders headers, Set roles, Set handlerKnownHeaders) { - Set notUnderstoodHeaders = null; - for (int i = 0; i < headers.size(); i++) { - if (!headers.isUnderstood(i)) { - Header header = headers.get(i); - if (!header.isIgnorable(soapVersion, roles)) { - QName qName = new QName(header.getNamespaceURI(), header.getLocalPart()); - // see if the binding can understand it - if (!binding.understandsHeader(qName)) { - if (!handlerKnownHeaders.contains(qName)) { - logger.info("Element not understood=" + qName); - if (notUnderstoodHeaders == null) - notUnderstoodHeaders = new HashSet(); - notUnderstoodHeaders.add(qName); - } - } - } - } - } - return notUnderstoodHeaders; + return headers.getNotUnderstoodHeaders(roles, handlerKnownHeaders, binding); + } /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java index ff573855b49..c63a526da43 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/MessageCreationException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java index 7b2a9bbf6e9..bbca1f20d37 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/ServerMUTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,11 +25,9 @@ package com.sun.xml.internal.ws.protocol.soap; -import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.*; import com.sun.xml.internal.ws.client.HandlerConfiguration; -import com.sun.xml.internal.ws.binding.BindingImpl; import javax.xml.namespace.QName; import java.util.Set; @@ -51,7 +49,7 @@ public class ServerMUTube extends MUTube { //On Server, HandlerConfiguration does n't change after publish, so store locally HandlerConfiguration handlerConfig = binding.getHandlerConfig(); roles = handlerConfig.getRoles(); - handlerKnownHeaders = handlerConfig.getHandlerKnownHeaders(); + handlerKnownHeaders = binding.getKnownHeaders(); } protected ServerMUTube(ServerMUTube that, TubeCloner cloner) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java index 4df9e008873..c95cbafc55c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/soap/VersionMismatchException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java index d0299a264d9..329ec89aa88 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/protocol/xml/XMLMessageException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.protocol.xml; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * @author WS Development Team diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java index e86db7fac36..0246650ab8a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/AddressingMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java index ada66a4fd5f..06951142417 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/BindingApiMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java index 212a54ee6e7..714d8733544 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ClientMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java index e87ac36e2f0..fae39216434 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/DispatchMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java index 1d7ba74927f..73787f5d074 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/EncodingMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java index 4e085b49c57..892d8cadc44 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HandlerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java index abf3dd4608d..3bac4c6c989 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/HttpserverMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java index f535c4e44df..c59dbb64eef 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ManagementMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java index 3e44eacbfa1..832c2c6814e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ModelerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** @@ -64,6 +63,18 @@ public final class ModelerMessages { return localizer.localize(localizableRUNTIME_MODELER_WSFEATURE_NO_FTRCONSTRUCTOR(arg0, arg1)); } + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) { + return messageFactory.getMessage("runtime.modeler.external.metadata.unable.to.read", arg0); + } + + /** + * Unable to read metadata file {0}. Check configuration/deployment. + * + */ + public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(Object arg0) { + return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNABLE_TO_READ(arg0)); + } + public static Localizable localizableRUNTIME_MODELER_WEBMETHOD_MUST_BE_PUBLIC(Object arg0) { return messageFactory.getMessage("runtime.modeler.webmethod.must.be.public", arg0); } @@ -100,6 +111,18 @@ public final class ModelerMessages { return localizer.localize(localizableRUNTIME_MODELER_MTOM_CONFLICT(arg0, arg1)); } + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) { + return messageFactory.getMessage("runtime.modeler.external.metadata.generic", arg0); + } + + /** + * An error occurred while processing external WS metadata; check configuration/deployment. Nested error: {0}. + * + */ + public static String RUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(Object arg0) { + return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_GENERIC(arg0)); + } + public static Localizable localizableRUNTIME_MODELER_FEATURE_CONFLICT(Object arg0, Object arg1) { return messageFactory.getMessage("runtime.modeler.feature.conflict", arg0, arg1); } @@ -184,6 +207,18 @@ public final class ModelerMessages { return localizer.localize(localizableRUNTIME_MODELER_ADDRESSING_RESPONSES_NOSUCHMETHOD(arg0)); } + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) { + return messageFactory.getMessage("runtime.modeler.external.metadata.wrong.format", arg0); + } + + /** + * Unable to read metadata from {0}. Is the format correct? + * + */ + public static String RUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(Object arg0) { + return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_WRONG_FORMAT(arg0)); + } + public static Localizable localizableRUNTIME_MODELER_ONEWAY_OPERATION_NO_OUT_PARAMETERS(Object arg0, Object arg1) { return messageFactory.getMessage("runtime.modeler.oneway.operation.no.out.parameters", arg0, arg1); } @@ -304,6 +339,18 @@ public final class ModelerMessages { return localizer.localize(localizableRUNTIME_MODELER_ENDPOINT_INTERFACE_NO_WEBSERVICE(arg0)); } + public static Localizable localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(Object arg0, Object arg1) { + return messageFactory.getMessage("runtime.modeler.external.metadata.unsupported.schema", arg0, arg1); + } + + /** + * Unsupported metadata file schema {0}. Supported schemes are {1}. + * + */ + public static String RUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(Object arg0, Object arg1) { + return localizer.localize(localizableRUNTIME_MODELER_EXTERNAL_METADATA_UNSUPPORTED_SCHEMA(arg0, arg1)); + } + public static Localizable localizableRUNTIMEMODELER_INVALID_SOAPBINDING_ON_METHOD(Object arg0, Object arg1, Object arg2) { return messageFactory.getMessage("runtimemodeler.invalid.soapbindingOnMethod", arg0, arg1, arg2); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java index 9f21c3519b9..443a8c3c019 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/PolicyMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** @@ -232,6 +231,18 @@ public final class PolicyMessages { return localizer.localize(localizableWSP_1012_FAILED_CONFIGURE_WSDL_MODEL()); } + public static Localizable localizableWSP_1021_FAULT_NOT_BOUND(Object arg0) { + return messageFactory.getMessage("WSP_1021_FAULT_NOT_BOUND", arg0); + } + + /** + * WSP1021: Fault "{0}" not bound. Check names in port and binding definitions. + * + */ + public static String WSP_1021_FAULT_NOT_BOUND(Object arg0) { + return localizer.localize(localizableWSP_1021_FAULT_NOT_BOUND(arg0)); + } + public static Localizable localizableWSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT(Object arg0) { return messageFactory.getMessage("WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT", arg0); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java index 16af3f3fd0e..e7f472590af 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ProviderApiMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java index 76dfd530721..a26b58dc0ae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SenderMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java index 6e14905e013..53a4e033c8f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/ServerMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java index 21c3cf8b805..214e5ae001d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/SoapMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java index 0f058b3ed25..b0070e55cf6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/StreamingMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java new file mode 100644 index 00000000000..e86c57e9d7d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/TubelineassemblyMessages.java @@ -0,0 +1,282 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.resources; + +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; + + +/** + * Defines string formatting method for each constant in the resource file + * + */ +public final class TubelineassemblyMessages { + + private final static LocalizableMessageFactory messageFactory = new LocalizableMessageFactory("com.sun.xml.internal.ws.resources.tubelineassembly"); + private final static Localizer localizer = new Localizer(); + + public static Localizable localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { + return messageFactory.getMessage("MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE", arg0, arg1); + } + + /** + * MASM0019: Illegal logging level value "{1}" stored in the {0} message logging system property. Using default logging level. + * + */ + public static String MASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(Object arg0, Object arg1) { + return localizer.localize(localizableMASM_0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE(arg0, arg1)); + } + + public static Localizable localizableMASM_0009_CANNOT_FORM_VALID_URL(Object arg0) { + return messageFactory.getMessage("MASM0009_CANNOT_FORM_VALID_URL", arg0); + } + + /** + * MASM0009: Cannot form a valid URL from the resource name "{0}". For more details see the nested exception. + * + */ + public static String MASM_0009_CANNOT_FORM_VALID_URL(Object arg0) { + return localizer.localize(localizableMASM_0009_CANNOT_FORM_VALID_URL(arg0)); + } + + public static Localizable localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) { + return messageFactory.getMessage("MASM0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE", arg0); + } + + /** + * MASM0005: No default tubeline is defined in the default [ {0} ] configuration file + * + */ + public static String MASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(Object arg0) { + return localizer.localize(localizableMASM_0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE(arg0)); + } + + public static Localizable localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) { + return messageFactory.getMessage("MASM0003_DEFAULT_CFG_FILE_NOT_LOADED", arg0); + } + + /** + * MASM0003: Default [ {0} ] configuration file was not loaded + * + */ + public static String MASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(Object arg0) { + return localizer.localize(localizableMASM_0003_DEFAULT_CFG_FILE_NOT_LOADED(arg0)); + } + + public static Localizable localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) { + return messageFactory.getMessage("MASM0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE", arg0, arg1); + } + + /** + * MASM0018: Message logging {0} system property detected to be set to value {1} + * + */ + public static String MASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(Object arg0, Object arg1) { + return localizer.localize(localizableMASM_0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE(arg0, arg1)); + } + + public static Localizable localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(Object arg0) { + return messageFactory.getMessage("MASM0001_DEFAULT_CFG_FILE_NOT_FOUND", arg0); + } + + /** + * MASM0001: Default configuration file [ {0} ] was not found + * + */ + public static String MASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(Object arg0) { + return localizer.localize(localizableMASM_0001_DEFAULT_CFG_FILE_NOT_FOUND(arg0)); + } + + public static Localizable localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) { + return messageFactory.getMessage("MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING", arg0); + } + + /** + * MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ] + * + */ + public static String MASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(Object arg0) { + return localizer.localize(localizableMASM_0020_ERROR_CREATING_URI_FROM_GENERATED_STRING(arg0)); + } + + public static Localizable localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) { + return messageFactory.getMessage("MASM0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY", arg0); + } + + /** + * MASM0016: Unable to instantiate Tube factory class [ {0} ] + * + */ + public static String MASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(Object arg0) { + return localizer.localize(localizableMASM_0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY(arg0)); + } + + public static Localizable localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) { + return messageFactory.getMessage("MASM0012_LOADING_VIA_SERVLET_CONTEXT", arg0, arg1); + } + + /** + * MASM0012: Trying to load [ {0} ] via servlet context [ {1} ] + * + */ + public static String MASM_0012_LOADING_VIA_SERVLET_CONTEXT(Object arg0, Object arg1) { + return localizer.localize(localizableMASM_0012_LOADING_VIA_SERVLET_CONTEXT(arg0, arg1)); + } + + public static Localizable localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) { + return messageFactory.getMessage("MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION", arg0); + } + + /** + * MASM0010: Unable to unmarshall metro config file from location [ {0} ] + * + */ + public static String MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(Object arg0) { + return localizer.localize(localizableMASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(arg0)); + } + + public static Localizable localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) { + return messageFactory.getMessage("MASM0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE", arg0); + } + + /** + * MASM0004: No section found in the default [ {0} ] configuration file + * + */ + public static String MASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(Object arg0) { + return localizer.localize(localizableMASM_0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE(arg0)); + } + + public static Localizable localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) { + return messageFactory.getMessage("MASM0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD", arg0); + } + + /** + * MASM0013: Unable to invoke {0} method on servlet context instance + * + */ + public static String MASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(Object arg0) { + return localizer.localize(localizableMASM_0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD(arg0)); + } + + public static Localizable localizableMASM_0007_APP_CFG_FILE_NOT_FOUND() { + return messageFactory.getMessage("MASM0007_APP_CFG_FILE_NOT_FOUND"); + } + + /** + * MASM0007: No application metro.xml configuration file found. + * + */ + public static String MASM_0007_APP_CFG_FILE_NOT_FOUND() { + return localizer.localize(localizableMASM_0007_APP_CFG_FILE_NOT_FOUND()); + } + + public static Localizable localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) { + return messageFactory.getMessage("MASM0002_DEFAULT_CFG_FILE_LOCATED", arg0, arg1); + } + + /** + * MASM0002: Default [ {0} ] configuration file located at [ {1} ] + * + */ + public static String MASM_0002_DEFAULT_CFG_FILE_LOCATED(Object arg0, Object arg1) { + return localizer.localize(localizableMASM_0002_DEFAULT_CFG_FILE_LOCATED(arg0, arg1)); + } + + public static Localizable localizableMASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) { + return messageFactory.getMessage("MASM0014_UNABLE_TO_LOAD_CLASS", arg0); + } + + /** + * MASM0014: Unable to load [ {0} ] class + * + */ + public static String MASM_0014_UNABLE_TO_LOAD_CLASS(Object arg0) { + return localizer.localize(localizableMASM_0014_UNABLE_TO_LOAD_CLASS(arg0)); + } + + public static Localizable localizableMASM_0006_APP_CFG_FILE_LOCATED(Object arg0) { + return messageFactory.getMessage("MASM0006_APP_CFG_FILE_LOCATED", arg0); + } + + /** + * MASM0006: Application metro.xml configuration file located at [ {0} ] + * + */ + public static String MASM_0006_APP_CFG_FILE_LOCATED(Object arg0) { + return localizer.localize(localizableMASM_0006_APP_CFG_FILE_LOCATED(arg0)); + } + + public static Localizable localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) { + return messageFactory.getMessage("MASM0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS", arg0); + } + + /** + * MASM0017: Unable to load Tube factory class [ {0} ] + * + */ + public static String MASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(Object arg0) { + return localizer.localize(localizableMASM_0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS(arg0)); + } + + public static Localizable localizableMASM_0008_INVALID_URI_REFERENCE(Object arg0) { + return messageFactory.getMessage("MASM0008_INVALID_URI_REFERENCE", arg0); + } + + /** + * MASM0008: Invalid URI reference [ {0} ] + * + */ + public static String MASM_0008_INVALID_URI_REFERENCE(Object arg0) { + return localizer.localize(localizableMASM_0008_INVALID_URI_REFERENCE(arg0)); + } + + public static Localizable localizableMASM_0011_LOADING_RESOURCE(Object arg0, Object arg1) { + return messageFactory.getMessage("MASM0011_LOADING_RESOURCE", arg0, arg1); + } + + /** + * MASM0011: Trying to load [ {0} ] via parent resouce loader [ {1} ] + * + */ + public static String MASM_0011_LOADING_RESOURCE(Object arg0, Object arg1) { + return localizer.localize(localizableMASM_0011_LOADING_RESOURCE(arg0, arg1)); + } + + public static Localizable localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(Object arg0, Object arg1) { + return messageFactory.getMessage("MASM0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE", arg0, arg1); + } + + /** + * MASM0015: Class [ {0} ] does not implement [ {1} ] interface + * + */ + public static String MASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(Object arg0, Object arg1) { + return localizer.localize(localizableMASM_0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE(arg0, arg1)); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java index 93ece751d59..c5373ccc426 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/UtilMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java index 92dda3940ce..ad7d4d21ef2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsdlmodelMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java index f5c5de54329..909c111ef9c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/WsservletMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java index f258245dabc..9069f9fecd1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/XmlmessageMessages.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,11 @@ * questions. */ - package com.sun.xml.internal.ws.resources; -import com.sun.xml.internal.ws.util.localization.Localizable; -import com.sun.xml.internal.ws.util.localization.LocalizableMessageFactory; -import com.sun.xml.internal.ws.util.localization.Localizer; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties index d5f17445bb0..323b2b19c5c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties new file mode 100644 index 00000000000..6acc1a2a122 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_de.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=Version "{0}" von WS-Adressierung wurde erwartet, "{1}" wurde jedoch ermittelt +replyTo.cannot.parse=ReplyTo-Header kann nicht geparst werden. +faultTo.cannot.parse=FaultTo-Header kann nicht geparst werden. +unknown.wsa.header=Unbekannter WS-Adressierungs-Header +invalid.wsaw.anonymous=Ung\u00FCltiger Wert aus wsaw:Anonymous abgerufen: "{0}" +wsaw.anonymousProhibited=Vorgang enth\u00E4lt nicht zugelassenen Wert f\u00FCr wsaw:anonymous in der WSDL, Adressierung muss deaktiviert werden, und SOAP-Nachricht muss manuell erstellt werden +null.addressing.version=Nicht erwartete Nulladressierungsversion +null.soap.version=Nicht erwartete Null-SOAP-Version +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=Es kann kein Vorgang in wsdl:binding f\u00FCr "{0}" gefunden werden +null.binding=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Null-Binding wurde ermittelt +null.wsdlPort=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Null-WSDLPort wurde ermittelt +null.packet=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Nullpaket wurde ermittelt +null.action=Anforderungsadressierungs-Header werden ausgef\u00FCllt und Nullaktion wurde ermittelt +null.message=Nullnachricht bei Verarbeitung der eingehenden Serveranforderung gefunden, w\u00E4hrend WS-Adressierung erforderlich ist +null.headers=Bei Verarbeitung der eingehenden Serveranforderung wurden keine Header gefunden, w\u00E4hrend WS-Adressierung erforderlich ist +null.wsa.headers=Bei der Verarbeitung der eingehenden Serveranforderung wurden keine WS-Adressierungs-Header gefunden +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=Adressierung ist nicht aktiviert, {0} sollte nicht in der Pipeline enthalten sein" +addressing.should.be.enabled.=Adressierung ist nicht aktiviert +validation.client.nullAction=Eingehende Adressierungs-Header werden auf Client validiert, dabei wurde Nullaktion ermittelt +validation.server.nullAction=Eingehende Adressierungs-Header werden auf Server validiert, dabei wurde Nullaktion ermittelt + +nonAnonymous.response=202 wird gesendet und nicht-anonyme Antwort wird verarbeitet +nonAnonymous.unknown.protocol=Unbekanntes Protokoll: "{0}" +# {0} - URL +nonAnonymous.response.sending=Nicht-anonyme Antwort wird an "{0}" gesendet +nonAnonymous.response.nullHeaders=Keine Antwort-Header in nicht-anonymer Antwort von "{0}" gefunden +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=Nicht-anonyme Antwort wird bei unidirektionaler Nachricht ignoriert + +invalid.addressing.header.exception=Ung\u00FCltiger WS-Adressierungs-Header: "{0}", Ursache: "{1}" +action.not.supported.exception=Aktion: "{0}" nicht unterst\u00FCtzt +missing.header.exception=WS-Adressierungs-Header fehlt: "{0}" +non.unique.operation.signature=Vorg\u00E4nge in einem Port m\u00FCssen eine eindeutige Vorgangssignatur enthalten, damit ein zugeh\u00F6riger WSDL-Vorgang f\u00FCr eine Nachricht erfolgreich identifiziert werden kann. WSDL-Vorg\u00E4nge {0} und {1} haben dieselbe Vorgangssignatur, dieselbe wsa:Action "{2}" und denselben Anforderungstextblock "{3}", Methodenverteilung verl\u00E4uft zur Laufzeit m\u00F6glicherweise nicht erfolgreich. Verwenden Sie eine eindeutige wsa:Action f\u00FCr jeden Vorgang diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties new file mode 100644 index 00000000000..54aced8a092 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_es.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=Se esperaba la versi\u00F3n "{0}" de WS-Addressing, pero se ha encontrado "{1}" +replyTo.cannot.parse=No se puede analizar la cabecera ReplyTo +faultTo.cannot.parse=No se puede analizar la cabecera FaultTo +unknown.wsa.header=Cabecera WS-Addressing desconocida +invalid.wsaw.anonymous=Se ha obtenido un valor no v\u00E1lido de wsaw:Anonymous: "{0}" +wsaw.anonymousProhibited=La operaci\u00F3n tiene un valor "prohibido" para wsaw:anonymous en el WSDL. Hay que desactivar Addressing y el mensaje de SOAP se tiene que tratar manualmente +null.addressing.version=Versi\u00F3n de Addressing nula inesperada +null.soap.version=Versi\u00F3n de SOAP nula inesperada +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=No se ha encontrado una operaci\u00F3n en wsdl:binding para "{0}" +null.binding=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado un enlace nulo +null.wsdlPort=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado un puerto WSDL nulo +null.packet=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado un paquete nulo +null.action=Rellenando las cabeceras de Addressing de la solicitud y se ha encontrado una acci\u00F3n nula +null.message=Se ha encontrado un mensaje nulo al procesar la solicitud entrante del servidor y se necesita WS-Addressing +null.headers=No se ha encontrado ninguna cabecera al procesar la solicitud entrante del servidor y se necesita WS-Addressing +null.wsa.headers=No se ha encontrado ninguna cabecera de WS-Addressing al procesar la solicitud entrante del servidor +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=El direccionamiento no est\u00E1 activado; {0} no se debe incluir en el pipeline" +addressing.should.be.enabled.=El direccionamiento no est\u00E1 activado +validation.client.nullAction=Validando las cabeceras de Addressing entrantes en el cliente y se ha encontrado una acci\u00F3n nula +validation.server.nullAction=Validando las cabeceras de Addressing entrantes en el servidor y se ha encontrado una acci\u00F3n nula + +nonAnonymous.response=Enviando 202 y procesando respuesta no an\u00F3nima +nonAnonymous.unknown.protocol=Protocolo desconocido: "{0}" +# {0} - URL +nonAnonymous.response.sending=Enviando respuesta no an\u00F3nima a "{0}" +nonAnonymous.response.nullHeaders=No se ha encontrado ninguna cabecera de respuesta en una respuesta no an\u00F3nima de "{0}" +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=Ignorando la respuesta no an\u00F3nima para el mensaje unidireccional + +invalid.addressing.header.exception=Cabecera de WS-Addressing no v\u00E1lida: "{0}", Motivo: "{1}" +action.not.supported.exception=Acci\u00F3n: "{0}" no soportada +missing.header.exception=Falta la cabecera de WS-Addressing: "{0}" +non.unique.operation.signature=Las operaciones de un puerto deben tener una firma de operaci\u00F3n \u00FAnica para identificar correctamente una operaci\u00F3n WSDL asociada de un mensaje. La operaci\u00F3n WSDL {0} y {1} tienen la misma firma de operaci\u00F3n, wsa:Action "{2}" y bloque del cuerpo de solicitud "{3}". Puede que la distribuci\u00F3n del m\u00E9todo falle en tiempo de ejecuci\u00F3n. Utilice un elemento wsa:Action \u00FAnico para cada operaci\u00F3n diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties new file mode 100644 index 00000000000..d50bdc4046a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_fr.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=Version "{0}" de WS-Addressing attendue, mais "{1}" trouv\u00E9e +replyTo.cannot.parse=L'en-t\u00EAte ReplyTo ne peut pas \u00EAtre analys\u00E9 +faultTo.cannot.parse=L'en-t\u00EAte FaultTo ne peut pas \u00EAtre analys\u00E9 +unknown.wsa.header=En-t\u00EAte WS-Addressing inconnu +invalid.wsaw.anonymous=Valeur non valide obtenue \u00E0 partir de wsaw:Anonymous : "{0}" +wsaw.anonymousProhibited=L'op\u00E9ration a "interdit" la valeur pour wsaw:anonymous dans le WSDL, l'adressage doit \u00EAtre d\u00E9sactiv\u00E9 et le message SOAP doit \u00EAtre con\u00E7u manuellement +null.addressing.version=Version d'adressage NULL inattendue +null.soap.version=Version SOAP NULL inattendue +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=Op\u00E9ration introuvable dans wsdl:binding pour "{0}" +null.binding=Remplissage des en-t\u00EAtes d'adressage de demande et binding NULL trouv\u00E9 +null.wsdlPort=Remplissage des en-t\u00EAtes d'adressage de la demande et WSDLPort NULL trouv\u00E9 +null.packet=Remplissage des en-t\u00EAtes d'adressage de demande et paquet NULL trouv\u00E9 +null.action=Remplissage des en-t\u00EAtes d'adressage de demande et action NULL trouv\u00E9e +null.message=Message NULL trouv\u00E9 lors du traitement de la demande entrante du serveur et WS-Addressing requis +null.headers=Aucun en-t\u00EAte trouv\u00E9 lors du traitement de la demande entrante du serveur et WS-Addressing requis +null.wsa.headers=Aucun en-t\u00EAte WS-Addressing trouv\u00E9 lors du traitement de la demande entrante du serveur +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=L''adressage n''est pas activ\u00E9, {0} ne doit pas \u00EAtre inclus dans le pipeline" +addressing.should.be.enabled.=L'adressage n'est pas activ\u00E9 +validation.client.nullAction=Validation des en-t\u00EAtes d'adressage entrant sur le client et action NULL trouv\u00E9e +validation.server.nullAction=Validation des en-t\u00EAtes d'adressage entrant sur le serveur et action NULL trouv\u00E9e + +nonAnonymous.response=Envoi de 202 et traitement de la r\u00E9ponse non anonyme +nonAnonymous.unknown.protocol=Protocole inconnu : "{0}" +# {0} - URL +nonAnonymous.response.sending=Envoi de la r\u00E9ponse non anonyme \u00E0 "{0}" +nonAnonymous.response.nullHeaders=Aucun en-t\u00EAte de r\u00E9ponse trouv\u00E9 dans la r\u00E9ponse non anonyme \u00E0 partir de "{0}" +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=Non-prise en compte de la r\u00E9ponse non anonyme pour le message unidirectionnel + +invalid.addressing.header.exception=En-t\u00EAte WS-Addressing non valide : "{0}", raison : "{1}" +action.not.supported.exception=Action "{0}" non prise en charge +missing.header.exception=En-t\u00EAte WS-Addressing manquant : "{0}" +non.unique.operation.signature=Les op\u00E9rations d''un port doivent comporter une signature d''op\u00E9ration unique pour identifier une op\u00E9ration WSDL associ\u00E9e pour un message. Les op\u00E9rations WSDL {0} et {1} ont les m\u00EAmes signature d''op\u00E9ration wsa:Action "{2}" et bloc de corps de demande "{3}". Echec possible de la r\u00E9partition de m\u00E9thode lors de l''ex\u00E9cution. Utilisez une signature wsa:Action unique pour chaque op\u00E9ration diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties new file mode 100644 index 00000000000..f585de8524c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_it.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=Prevista la versione "{0}" di WS-Addressing ma \u00E8 stata trovata "{1}" +replyTo.cannot.parse=Impossibile analizzare l'intestazione ReplyTo +faultTo.cannot.parse=Impossibile analizzare l'intestazione FaultTo +unknown.wsa.header=Intestazione WS-Addressing sconosciuta +invalid.wsaw.anonymous=Valore non valido ottenuto da wsaw:Anonymous: "{0}" +wsaw.anonymousProhibited=L'operazione ha un valore "vietato" per wsaw:anonymous in WSDL, \u00E8 necessario disabilitare l'indirizzamento e generare manualmente il messaggio SOAP +null.addressing.version=Versione Addressing nulla non prevista +null.soap.version=Versione SOAP nulla non prevista +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=Impossibile trovare un''operazione in wsdl:binding per "{0}" +null.binding=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stata trovata una Binding nulla +null.wsdlPort=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stata trovata una WSDLPort nulla +null.packet=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stato trovato un Package nullo +null.action=\u00C8 in corso l'inserimento dei dati nelle intestazioni di indirizzamento delle richieste ed \u00E8 stata trovata una Action nulla +null.message=Nessun messaggio trovato durante l'elaborazione della richiesta in entrata del server ed \u00E8 richiesto WS-Addressing +null.headers=Nessuna intestazione trovata durante l'elaborazione della richiesta in entrata del server ed \u00E8 richiesto WS-Addressing +null.wsa.headers=Nessuna intestazione WS-Addressing trovata durante l'elaborazione della richiesta in entrata del server +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=Indirizzamento non abilitato. {0} non deve essere incluso nella pipeline" +addressing.should.be.enabled.=Indirizzamento non abilitato +validation.client.nullAction=\u00C8 in corso la convalida delle intestazioni di indirizzamento in entrata sul client ed \u00E8 stata trovata una Action nulla +validation.server.nullAction=\u00C8 in corso la convalida delle intestazioni di indirizzamento in entrata sul server ed \u00E8 stata trovata una Action nulla + +nonAnonymous.response=\u00C8 in corso l'invio di 202 e l'elaborazione della risposta non anonima +nonAnonymous.unknown.protocol=Protocollo sconosciuto: "{0}" +# {0} - URL +nonAnonymous.response.sending=\u00C8 in corso l''invio della risposta non anonima a "{0}" +nonAnonymous.response.nullHeaders=Nessuna intestazione di risposta trovata nella risposta non anonima da "{0}" +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=La risposta non anonima per un messaggio unidirezionale verr\u00E0 ignorata + +invalid.addressing.header.exception=Intestazione WS-Addressing non valida: "{0}". Motivo: "{1}" +action.not.supported.exception=Azione: "{0}" non supportata +missing.header.exception=Intestazione WS-Addressing mancante: "{0}" +non.unique.operation.signature=Le operazioni in una porta devono avere una firma dell''operazione univoca affinch\u00E9 l''identificazione di un''operazione WSDL associata per un messaggio riesca. Le operazioni WSDL {0} e {1} hanno la stessa firma dell''operazione, wsa:Action "{2}", e blocco del corpo della richiesta "{3}". \u00C8 possibile che il metodo di spedizione non riesca in fase di esecuzione. Usare una wsa:Action univoca per ogni operazione diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties new file mode 100644 index 00000000000..6b4ca72a72a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ja.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=WS-Addressing\u306E\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001"{1}"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +replyTo.cannot.parse=ReplyTo\u30D8\u30C3\u30C0\u30FC\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093 +faultTo.cannot.parse=FaultTo\u30D8\u30C3\u30C0\u30FC\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093 +unknown.wsa.header=\u4E0D\u660E\u306AWS-Addressing\u30D8\u30C3\u30C0\u30FC +invalid.wsaw.anonymous=wsaw:Anonymous\u304B\u3089\u7121\u52B9\u306A\u5024\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F: "{0}" +wsaw.anonymousProhibited=WSDL\u306Ewsaw:anonymous\u3067\u64CD\u4F5C\u306B"\u7981\u6B62\u3055\u308C\u305F"\u5024\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u3092\u7121\u52B9\u306B\u3057\u3001SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306F\u624B\u52D5\u3067\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +null.addressing.version=\u4E88\u671F\u3057\u306A\u3044null\u306E\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D0\u30FC\u30B8\u30E7\u30F3 +null.soap.version=\u4E88\u671F\u3057\u306A\u3044null\u306ESOAP\u30D0\u30FC\u30B8\u30E7\u30F3 +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound="{0}"\u306B\u3064\u3044\u3066wsdl:binding\u306B\u64CD\u4F5C\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +null.binding=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +null.wsdlPort=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306EWSDLPort\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +null.packet=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306E\u30D1\u30B1\u30C3\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +null.action=\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u79FB\u5165\u4E2D\u306Bnull\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +null.message=\u30B5\u30FC\u30D0\u30FC\u30FB\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306BNull\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002WS-Addressing\u304C\u5FC5\u8981\u3067\u3059 +null.headers=\u30B5\u30FC\u30D0\u30FC\u30FB\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306B\u30D8\u30C3\u30C0\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002WS-Addressing\u304C\u5FC5\u8981\u3067\u3059 +null.wsa.headers=\u30B5\u30FC\u30D0\u30FC\u30FB\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306BWS-Addressing\u30D8\u30C3\u30C0\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093\u3002{0}\u3092\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u306B\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093" +addressing.should.be.enabled.=\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u305B\u3093 +validation.client.nullAction=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u691C\u8A3C\u4E2D\u306B\u3001null\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +validation.server.nullAction=\u30B5\u30FC\u30D0\u30FC\u3067\u30A4\u30F3\u30D0\u30A6\u30F3\u30C9\u30FB\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u30D8\u30C3\u30C0\u30FC\u306E\u691C\u8A3C\u4E2D\u306B\u3001null\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F + +nonAnonymous.response=202\u3092\u9001\u4FE1\u3057\u3001\u975E\u533F\u540D\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u51E6\u7406\u3057\u3066\u3044\u307E\u3059 +nonAnonymous.unknown.protocol=\u4E0D\u660E\u306A\u30D7\u30ED\u30C8\u30B3\u30EB: "{0}" +# {0} - URL +nonAnonymous.response.sending=\u975E\u533F\u540D\u5FDC\u7B54\u3092"{0}"\u306B\u9001\u4FE1\u3057\u3066\u3044\u307E\u3059 +nonAnonymous.response.nullHeaders="{0}"\u304B\u3089\u306E\u975E\u533F\u540D\u30EC\u30B9\u30DD\u30F3\u30B9\u306B\u30EC\u30B9\u30DD\u30F3\u30B9\u30FB\u30D8\u30C3\u30C0\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=\u4E00\u65B9\u5411\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u306F\u975E\u533F\u540D\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u7121\u8996\u3057\u307E\u3059 + +invalid.addressing.header.exception=\u7121\u52B9\u306AWS-Addressing\u30D8\u30C3\u30C0\u30FC: "{0}"\u3001\u7406\u7531: "{1}" +action.not.supported.exception=\u30A2\u30AF\u30B7\u30E7\u30F3: "{0}"\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +missing.header.exception=WS-Addressing\u30D8\u30C3\u30C0\u30FC\u304C\u3042\u308A\u307E\u305B\u3093: "{0}" +non.unique.operation.signature=\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305FWSDL\u64CD\u4F5C\u3092\u6B63\u5E38\u306B\u8B58\u5225\u3059\u308B\u305F\u3081\u306B\u3001\u30DD\u30FC\u30C8\u306E\u64CD\u4F5C\u306B\u306F\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002WSDL\u64CD\u4F5C{0}\u304A\u3088\u3073{1}\u306B\u306F\u540C\u4E00\u306E\u64CD\u4F5C\u7F72\u540D(wsa:Action "{2}"\u304A\u3088\u3073\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF"{3}")\u304C\u3042\u308A\u3001\u5B9F\u884C\u6642\u306B\u30E1\u30BD\u30C3\u30C9\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u306B\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u64CD\u4F5C\u3054\u3068\u306B\u4E00\u610F\u306Ewsa:Action\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties new file mode 100644 index 00000000000..ffc10b3ff85 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_ko.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=WS-Addressing\uC758 "{0}" \uBC84\uC804\uC774 \uD544\uC694\uD558\uC9C0\uB9CC "{1}"\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +replyTo.cannot.parse=ReplyTo \uD5E4\uB354\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +faultTo.cannot.parse=FaultTo \uD5E4\uB354\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +unknown.wsa.header=\uC54C \uC218 \uC5C6\uB294 WS-Addressing \uD5E4\uB354 +invalid.wsaw.anonymous=wsaw:Anonymous\uC5D0\uC11C \uBD80\uC801\uD569\uD55C \uAC12\uC774 \uD655\uC778\uB428: "{0}" +wsaw.anonymousProhibited=\uC791\uC5C5\uC5D0\uC11C WSDL\uC758 wsaw:anonymous\uC5D0 \uB300\uD55C \uAC12\uC744 "\uAE08\uC9C0"\uD588\uC2B5\uB2C8\uB2E4. Addressing\uC744 \uC0AC\uC6A9 \uC548\uD568\uC73C\uB85C \uC124\uC815\uD558\uACE0 SOAP \uBA54\uC2DC\uC9C0\uB97C \uC218\uB3D9\uC73C\uB85C \uCC98\uB9AC\uD574\uC57C \uD569\uB2C8\uB2E4. +null.addressing.version=\uC608\uC0C1\uCE58 \uC54A\uC740 \uB110 Addressing \uBC84\uC804 +null.soap.version=\uC608\uC0C1\uCE58 \uC54A\uC740 \uB110 SOAP \uBC84\uC804 +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound="{0}"\uC5D0 \uB300\uD55C wsdl:binding\uC5D0\uC11C \uC791\uC5C5\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +null.binding=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uBC14\uC778\uB529\uC744 \uCC44\uC6B0\uB294 \uC911 +null.wsdlPort=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 WSDLPort\uB97C \uCC44\uC6B0\uB294 \uC911 +null.packet=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uD328\uD0B7\uC744 \uCC44\uC6B0\uB294 \uC911 +null.action=\uC694\uCCAD Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uC791\uC5C5\uC744 \uCC44\uC6B0\uB294 \uC911 +null.message=\uC11C\uBC84 \uC778\uBC14\uC6B4\uB4DC \uC694\uCCAD \uBC0F WS-Addressing \uCC98\uB9AC\uAC00 \uD544\uC694\uD560 \uB54C \uB110 \uBA54\uC2DC\uC9C0\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +null.headers=\uC11C\uBC84 \uC778\uBC14\uC6B4\uB4DC \uC694\uCCAD \uBC0F WS-Addressing \uCC98\uB9AC\uAC00 \uD544\uC694\uD560 \uB54C \uD5E4\uB354\uB97C \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. +null.wsa.headers=\uC11C\uBC84 \uC778\uBC14\uC6B4\uB4DC \uC694\uCCAD\uC744 \uCC98\uB9AC\uD558\uB294 \uC911 WS-Addressing \uD5E4\uB354\uB97C \uCC3E\uC9C0 \uBABB\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4. +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=Addressing\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD30C\uC774\uD504\uB77C\uC778\uC5D0 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +addressing.should.be.enabled.=Addressing\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +validation.client.nullAction=\uD074\uB77C\uC774\uC5B8\uD2B8\uCE21 \uC778\uBC14\uC6B4\uB4DC Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uC791\uC5C5\uC744 \uAC80\uC99D\uD558\uB294 \uC911 +validation.server.nullAction=\uC11C\uBC84\uCE21 \uC778\uBC14\uC6B4\uB4DC Addressing \uD5E4\uB354 \uBC0F \uBC1C\uACAC\uB41C \uB110 \uC791\uC5C5\uC744 \uAC80\uC99D\uD558\uB294 \uC911 + +nonAnonymous.response=202\uB97C \uC804\uC1A1\uD558\uACE0 \uBE44\uC775\uBA85 \uC751\uB2F5\uC744 \uCC98\uB9AC\uD558\uB294 \uC911 +nonAnonymous.unknown.protocol=\uC54C \uC218 \uC5C6\uB294 \uD504\uB85C\uD1A0\uCF5C: "{0}" +# {0} - URL +nonAnonymous.response.sending="{0}"(\uC73C)\uB85C \uBE44\uC775\uBA85 \uD68C\uC2E0\uC744 \uC804\uC1A1\uD558\uB294 \uC911 +nonAnonymous.response.nullHeaders="{0}"\uC758 \uBE44\uC775\uBA85 \uC751\uB2F5\uC5D0\uC11C \uC751\uB2F5 \uD5E4\uB354\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=\uB2E8\uBC29\uD5A5 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uBE44\uC775\uBA85 \uC751\uB2F5\uC744 \uBB34\uC2DC\uD558\uB294 \uC911 + +invalid.addressing.header.exception=\uBD80\uC801\uD569\uD55C WS-Addressing \uD5E4\uB354: "{0}", \uC6D0\uC778: "{1}" +action.not.supported.exception="{0}" \uC791\uC5C5\uC740 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +missing.header.exception=WS-Addressing \uD5E4\uB354\uAC00 \uB204\uB77D\uB428: "{0}" +non.unique.operation.signature=\uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD574 \uC5F0\uAD00\uB41C WSDL\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC2DD\uBCC4\uD558\uB824\uBA74 \uD3EC\uD2B8\uC758 \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. WSDL \uC791\uC5C5 {0}\uACFC(\uC640) {1}\uC758 \uC791\uC5C5 \uC11C\uBA85, wsa:Action "{2}" \uBC0F \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D "{3}"\uC774(\uAC00) \uB3D9\uC77C\uD558\uC5EC \uB7F0\uD0C0\uC784 \uC2DC \uBA54\uC18C\uB4DC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAC01 \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C wsa:Action\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties new file mode 100644 index 00000000000..f933acbcf42 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_pt_BR.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=Vers\u00E3o "{0}" esperada do Endere\u00E7amento WS, mas encontrou "{1}" +replyTo.cannot.parse=O cabe\u00E7alho ReplyTo n\u00E3o pode ser submetido a parse +faultTo.cannot.parse=O cabe\u00E7alho FaultTo n\u00E3o pode ser submetido a parse +unknown.wsa.header=Cabe\u00E7alho de Endere\u00E7amento WS desconhecido +invalid.wsaw.anonymous=Valor inv\u00E1lido obtido de wsaw:Anonymous: "{0}" +wsaw.anonymousProhibited=A opera\u00E7\u00E3o tem valor "proibido" para wsaw:anonymous no WSDL. O endere\u00E7amento deve ser desativado e a mensagem SOAP precisa ser feita manualmente +null.addressing.version=Vers\u00E3o de Endere\u00E7amento nulo esperada +null.soap.version=Vers\u00E3o de SOAP nula inesperada +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=N\u00E3o \u00E9 poss\u00EDvel localizar uma opera\u00E7\u00E3o no wsdl:binding para "{0}" +null.binding=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou Bind nulo +null.wsdlPort=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou WSDLPort nulo +null.packet=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou Pacote nulo +null.action=Preenchendo cabe\u00E7alhos de Endere\u00E7amento da solicita\u00E7\u00E3o e encontrou A\u00E7\u00E3o nula +null.message=Mensagem nula encontrada ao processar a solicita\u00E7\u00E3o de entrada do servidor e o Endere\u00E7amento WS \u00E9 necess\u00E1rio +null.headers=Nenhum cabe\u00E7alho encontrado ao processar a solicita\u00E7\u00E3o de entrada do servidor e o Endere\u00E7amento WS \u00E9 necess\u00E1rio +null.wsa.headers=Nenhum cabe\u00E7alho de Endere\u00E7amento de WS encontrado ao processar a solicita\u00E7\u00E3o de entrada do servidor +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=O endere\u00E7amento n\u00E3o est\u00E1 ativado; {0} n\u00E3o deve ser inclu\u00EDdo no pipeline" +addressing.should.be.enabled.=O endere\u00E7amento n\u00E3o foi ativado +validation.client.nullAction=Validando cabe\u00E7alhos de Endere\u00E7amento de entrada no cliente e encontrou A\u00E7\u00E3o nula +validation.server.nullAction=Validando cabe\u00E7alhos de Endere\u00E7amento de entrada no servidor e encontrou A\u00E7\u00E3o nula + +nonAnonymous.response=Enviando 202 e processando resposta n\u00E3o an\u00F4nima +nonAnonymous.unknown.protocol=Protocolo desconhecido: "{0}" +# {0} - URL +nonAnonymous.response.sending=Enviando resposta n\u00E3o an\u00F4nima para "{0}" +nonAnonymous.response.nullHeaders=Nenhum cabe\u00E7alho de resposta encontrado na resposta n\u00E3o an\u00F4nima de "{0}" +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=Ignorando resposta n\u00E3o an\u00F4nima de uma mensagem unidirecional + +invalid.addressing.header.exception=Cabe\u00E7alho de Endere\u00E7amento WS inv\u00E1lido: "{0}", Motivo: "{1}" +action.not.supported.exception=A\u00E7\u00E3o: "{0}" n\u00E3o suportada +missing.header.exception=Cabe\u00E7alho de Endere\u00E7amento WS n\u00E3o encontrado: "{0}" +non.unique.operation.signature=As opera\u00E7\u00F5es em uma porta devem ter assinatura de opera\u00E7\u00E3o exclusiva para identificar uma opera\u00E7\u00E3o wsdl associada a uma mensagem. A opera\u00E7\u00E3o WSDL {0} e {1} t\u00EAm a mesma assinatura da opera\u00E7\u00E3o, wsa:Action "{2}" e bloco de corpo da solicita\u00E7\u00E3o "{3}". O despacho do m\u00E9todo pode falhar no runtime. Use wsa:Action exclusivo para cada opera\u00E7\u00E3o diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties new file mode 100644 index 00000000000..9ce4f5bc127 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_CN.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=WS-Addressing \u7684\u7248\u672C\u5E94\u4E3A "{0}", \u4F46\u627E\u5230\u7684\u662F "{1}" +replyTo.cannot.parse=\u65E0\u6CD5\u89E3\u6790 ReplyTo \u6807\u5934 +faultTo.cannot.parse=\u65E0\u6CD5\u89E3\u6790 FaultTo \u6807\u5934 +unknown.wsa.header=\u672A\u77E5\u7684 WS-Addressing \u6807\u5934 +invalid.wsaw.anonymous=\u4ECE wsaw:Anonymous \u83B7\u53D6\u7684\u503C\u65E0\u6548: "{0}" +wsaw.anonymousProhibited=\u5BF9\u4E8E WSDL \u4E2D\u7684 wsaw:anonymous, \u64CD\u4F5C\u7684\u503C\u4E3A "\u7981\u6B62", \u5FC5\u987B\u7981\u7528\u5BFB\u5740\u5E76\u9700\u8981\u624B\u52A8\u751F\u6210 SOAP \u6D88\u606F +null.addressing.version=\u610F\u5916\u7684\u7A7A\u5BFB\u5740\u7248\u672C +null.soap.version=\u610F\u5916\u7684\u7A7A SOAP \u7248\u672C +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=\u5728 "{0}" \u7684 wsdl:binding \u4E2D\u627E\u4E0D\u5230\u64CD\u4F5C +null.binding=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u7ED1\u5B9A +null.wsdlPort=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A WSDLPort +null.packet=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u6570\u636E\u5305 +null.action=\u6B63\u5728\u586B\u5145\u8BF7\u6C42\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u64CD\u4F5C +null.message=\u5904\u7406\u670D\u52A1\u5668\u5165\u7AD9\u8BF7\u6C42\u65F6\u53D1\u73B0\u7A7A\u6D88\u606F, \u9700\u8981 WS-Addressing +null.headers=\u5904\u7406\u670D\u52A1\u5668\u5165\u7AD9\u8BF7\u6C42\u65F6\u627E\u4E0D\u5230\u6807\u5934, \u9700\u8981 WS-Addressing +null.wsa.headers=\u5904\u7406\u670D\u52A1\u5668\u5165\u7AD9\u8BF7\u6C42\u65F6\u627E\u4E0D\u5230 WS-Addressing \u6807\u5934 +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=\u672A\u542F\u7528\u5BFB\u5740, {0} \u4E0D\u5E94\u5305\u542B\u5728\u7BA1\u9053\u4E2D" +addressing.should.be.enabled.=\u672A\u542F\u7528\u5BFB\u5740 +validation.client.nullAction=\u6B63\u5728\u9A8C\u8BC1\u5BA2\u6237\u673A\u4E0A\u7684\u5165\u7AD9\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u64CD\u4F5C +validation.server.nullAction=\u6B63\u5728\u9A8C\u8BC1\u670D\u52A1\u5668\u4E0A\u7684\u5165\u7AD9\u5BFB\u5740\u6807\u5934, \u627E\u5230\u7A7A\u64CD\u4F5C + +nonAnonymous.response=\u53D1\u9001 202 \u5E76\u5904\u7406\u975E\u533F\u540D\u54CD\u5E94 +nonAnonymous.unknown.protocol=\u672A\u77E5\u534F\u8BAE: "{0}" +# {0} - URL +nonAnonymous.response.sending=\u5C06\u975E\u533F\u540D\u56DE\u590D\u53D1\u9001\u5230 "{0}" +nonAnonymous.response.nullHeaders=\u5728\u6765\u81EA "{0}" \u7684\u975E\u533F\u540D\u54CD\u5E94\u4E2D\u627E\u4E0D\u5230\u54CD\u5E94\u6807\u5934 +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=\u5FFD\u7565\u5355\u5411\u6D88\u606F\u7684\u975E\u533F\u540D\u54CD\u5E94 + +invalid.addressing.header.exception=WS-Addressing \u6807\u5934\u65E0\u6548: "{0}", \u539F\u56E0: "{1}" +action.not.supported.exception=\u4E0D\u652F\u6301\u64CD\u4F5C "{0}" +missing.header.exception=\u7F3A\u5C11 WS-Addressing \u6807\u5934: "{0}" +non.unique.operation.signature=\u7AEF\u53E3\u4E2D\u7684\u64CD\u4F5C\u5E94\u5177\u6709\u552F\u4E00\u64CD\u4F5C\u7B7E\u540D, \u4EE5\u6210\u529F\u6807\u8BC6\u6D88\u606F\u7684\u5173\u8054 wsdl \u64CD\u4F5C\u3002WSDL \u64CD\u4F5C{0}\u548C{1}\u5177\u6709\u76F8\u540C\u7684\u64CD\u4F5C\u7B7E\u540D, wsa:Action "{2}" \u548C\u8BF7\u6C42\u4E3B\u4F53\u5757 "{3}", \u65B9\u6CD5\u5206\u6D3E\u5728\u8FD0\u884C\u65F6\u53EF\u80FD\u5931\u8D25\u3002\u8BF7\u5BF9\u6BCF\u4E2A\u64CD\u4F5C\u4F7F\u7528\u552F\u4E00\u7684 wsa:Action diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties new file mode 100644 index 00000000000..01dbc01c968 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/addressing_zh_TW.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +wrong.addressing.version=\u9810\u671F\u70BA "{0}" \u7248\u672C\u7684 Web \u670D\u52D9\u5B9A\u5740, \u4F46\u627E\u5230 "{1}" +replyTo.cannot.parse=\u7121\u6CD5\u5256\u6790 ReplyTo \u6A19\u982D +faultTo.cannot.parse=\u7121\u6CD5\u5256\u6790 FaultTo \u6A19\u982D +unknown.wsa.header=\u4E0D\u660E\u7684 Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D +invalid.wsaw.anonymous=\u5F9E wsaw:Anonymous \u53D6\u5F97\u7684\u503C\u7121\u6548: "{0}" +wsaw.anonymousProhibited=\u4F5C\u696D\u5DF2\u7981\u6B62 WSDL \u4E2D\u7684 wsaw:anonymous \u503C, \u5FC5\u9808\u505C\u7528\u5B9A\u5740, \u4E26\u4E14\u5FC5\u9808\u81EA\u8A02 SOAP \u8A0A\u606F +null.addressing.version=\u672A\u9810\u671F\u7684\u7A7A\u503C\u5B9A\u5740\u7248\u672C +null.soap.version=\u672A\u9810\u671F\u7684\u7A7A\u503C SOAP \u7248\u672C +# {0} - qname of an element e.g.: Cannot find an operation in wsdl:binding for "{http://server.fromjavaroundtrip.tango2tango/}oneWayText" +wsdlBoundOperation.notFound=\u5728 "{0}" \u7684 wsdl:binding \u4E2D\u627E\u4E0D\u5230\u4F5C\u696D +null.binding=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 Binding +null.wsdlPort=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 WSDLPort +null.packet=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 Packet +null.action=\u586B\u5165\u8981\u6C42\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684 Action +null.message=\u8655\u7406\u4F3A\u670D\u5668\u5167\u9001\u8981\u6C42\u6642\u627E\u5230\u7A7A\u503C\u7684\u8A0A\u606F, \u4F46\u9700\u8981 Web \u670D\u52D9\u5B9A\u5740 +null.headers=\u8655\u7406\u4F3A\u670D\u5668\u5167\u9001\u8981\u6C42\u6642\u627E\u4E0D\u5230\u4EFB\u4F55\u6A19\u982D, \u4F46\u9700\u8981 Web \u670D\u52D9\u5B9A\u5740 +null.wsa.headers=\u8655\u7406\u4F3A\u670D\u5668\u5167\u9001\u8981\u6C42\u6642\u627E\u4E0D\u5230 Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D +# {0} - simple class name e.g.: Addressing is not enabled, WsaTube should not be included in the pipeline +addressing.notEnabled=\u672A\u555F\u7528\u5B9A\u5740, {0} \u4E0D\u61C9\u5305\u542B\u65BC\u7BA1\u9053\u4E2D +addressing.should.be.enabled.=\u672A\u555F\u7528\u5B9A\u5740 +validation.client.nullAction=\u5728\u5F9E\u5C6C\u7AEF\u9A57\u8B49\u5167\u9001\u7684\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684\u52D5\u4F5C +validation.server.nullAction=\u5728\u4F3A\u670D\u5668\u9A57\u8B49\u5167\u9001\u7684\u5B9A\u5740\u6A19\u982D, \u4F46\u767C\u73FE\u7A7A\u503C\u7684\u52D5\u4F5C + +nonAnonymous.response=\u50B3\u9001 202 \u4E26\u8655\u7406\u975E\u533F\u540D\u56DE\u61C9 +nonAnonymous.unknown.protocol=\u4E0D\u660E\u7684\u5354\u5B9A: "{0}" +# {0} - URL +nonAnonymous.response.sending=\u50B3\u9001\u975E\u533F\u540D\u7684\u56DE\u8986\u7D66 "{0}" +nonAnonymous.response.nullHeaders=\u4F86\u81EA "{0}" \u7684\u975E\u533F\u540D\u56DE\u61C9\u4E2D\u627E\u4E0D\u5230\u56DE\u61C9\u6A19\u982D +# Usage not found. TODO Remove +#nonAnonymous.response.nullMessage=No message for non-anonymous response from "{0}" +nonAnonymous.response.oneway=\u5FFD\u7565\u55AE\u5411\u8A0A\u606F\u7684\u975E\u533F\u540D\u56DE\u61C9 + +invalid.addressing.header.exception=\u7121\u6548\u7684 Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D: "{0}", \u539F\u56E0: "{1}" +action.not.supported.exception=\u52D5\u4F5C: \u4E0D\u652F\u63F4 "{0}" +missing.header.exception=\u907A\u6F0F Web \u670D\u52D9\u5B9A\u5740\u6A19\u982D: "{0}" +non.unique.operation.signature=\u9023\u63A5\u57E0\u4E2D\u7684\u4F5C\u696D\u61C9\u5305\u542B\u552F\u4E00\u7684\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u9806\u5229\u8B58\u5225\u8A0A\u606F\u7684\u76F8\u95DC WSDL \u4F5C\u696D. WSDL \u4F5C\u696D {0} \u8207 {1} \u6709\u76F8\u540C\u7684\u4F5C\u696D\u7C3D\u7AE0\u3001wsa:Action "{2}" \u4EE5\u53CA\u8981\u6C42\u4E3B\u9AD4\u5340\u584A "{3}", \u65B9\u6CD5\u5206\u914D\u53EF\u80FD\u6703\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u6642\u5931\u6557. \u8ACB\u70BA\u6BCF\u500B\u4F5C\u696D\u4F7F\u7528\u552F\u4E00\u7684 wsa:Action diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties index 42e61a78cdf..2b7ce3a94c4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties new file mode 100644 index 00000000000..cf97ec78985 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_de.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=Fault-Meldungsname darf nicht null sein. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties new file mode 100644 index 00000000000..670385d1514 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_es.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=El nombre del mensaje de fallo no debe ser nulo. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties new file mode 100644 index 00000000000..30ef182253a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_fr.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=Le nom du message d'erreur ne doit pas \u00EAtre NULL. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties new file mode 100644 index 00000000000..e518fe02a3f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_it.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=Il nome del messaggio di errore non deve essere nullo. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties new file mode 100644 index 00000000000..e98fef7591b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ja.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=\u30D5\u30A9\u30EB\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u540D\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties new file mode 100644 index 00000000000..918ad315190 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_ko.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=\uACB0\uD568 \uBA54\uC2DC\uC9C0 \uC774\uB984\uC740 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties new file mode 100644 index 00000000000..85abccd9d23 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_pt_BR.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=O nome da mensagem com falha n\u00E3o deve ser nulo. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties new file mode 100644 index 00000000000..14bac4c2f95 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_CN.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=\u9ED8\u8BA4\u6D88\u606F\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties new file mode 100644 index 00000000000..2db25d1c78e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/bindingApi_zh_TW.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +binding.api.no.fault.message.name=\u932F\u8AA4\u8A0A\u606F\u540D\u7A31\u4E0D\u5F97\u70BA\u7A7A\u503C. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties index e1443892ffc..f31bbe0b165 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties new file mode 100644 index 00000000000..99d7689c556 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_de.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=HTTP-Transportfehler: {0} +local.client.failed=Lokaler Transportfehler: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=HTTP-Statuscode 404: Nicht gefunden - {0} +http.status.code=Der Server hat HTTP-Statuscode {0} gesendet: {1} +invalid.port.name={0} ist kein g\u00FCltiger Port. G\u00FCltige Ports sind: {1} +invalid.epr.port.name=EndpointName, der in EPR {0} angegeben wird, ist kein WSDL-Port-QName, g\u00FCltige Ports sind {1} +invalid.service.name={0} ist kein g\u00FCltiger Service. G\u00FCltige Services sind: {1} +invalid.service.name.null={0} ist kein g\u00FCltiger Service +invalid.service.no.wsdl=Keine WSDL-Metadaten f\u00FCr Service: {0}, Proxy kann nicht erstellt werden. Versuchen Sie, den Service zu erstellen, indem Sie eine WSDL-URL angeben +invalid.binding.id=Ung\u00FCltige Binding-ID: {0}. Muss {1} sein +invalid.soap.role.none=SOAP 1.2-Attribut "role" kann nicht auf "none" festgelegt werden +non.logical.handler.set={0} kann in Binding nicht festgelegt werden. Handler muss ein LogicalHandler sein. +runtime.wsdlparser.invalidWSDL=Ung\u00FCltige WSDL {0}, {1} erwartet, {2} in (Zeile{3}) gefunden +undefined.binding=Undefiniertes Binding: {0} +undefined.portType=Undefinierter Porttyp: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=EPR konnte nicht geparst werden: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=EPR wird ohne Aktivierung von WS-Adressierungsunterst\u00FCtzung angegeben. +invalid.wsdl.url=Ung\u00FCltige WSDL-URL: {0} +wsdl.not.found=Auf WSDL-URL {0} kann nicht zugegriffen werden. +invalid.address=Ung\u00FCltige Adresse: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0} nicht unterst\u00FCtzt mit {1}. Muss {2} sein +invalid.soap.action=Eine g\u00FCltige SOAPAction muss im RequestContext festgelegt werden, wenn die Adressierung aktiviert ist. Legen Sie sie mit BindingProvider.SOAPACTION_URI_PROPERTY fest. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=Kein Zugriff auf WSDL bei: {0}. Zugriff nicht erfolgreich mit: \n\t{1}.\nWiederholung des Vorgangs mit MEX ergab: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=Kein Zugriff auf WSDL bei: {0}. Zugriff nicht erfolgreich mit: \n\t{1}. +wsdl.contains.no.service=WSDL {0} enth\u00E4lt keine Servicedefinition. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties new file mode 100644 index 00000000000..07fcfcd811b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_es.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=Error de transporte HTTP: {0} +local.client.failed=error de transporte local: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=C\u00F3digo de estado HTTP 404: no encontrado - {0} +http.status.code=El servidor ha enviado el c\u00F3digo de estado HTTP {0}: {1} +invalid.port.name={0} no es un puerto v\u00E1lido. Los puertos v\u00E1lidos son: {1} +invalid.epr.port.name=El elemento EndpointName especificado en la referencia de punto final {0} no es un QName de puerto WSDL; los puertos v\u00E1lidos son {1} +invalid.service.name={0} no es un servicio v\u00E1lido. Los servicios v\u00E1lidos son: {1} +invalid.service.name.null={0} no es un servicio v\u00E1lido +invalid.service.no.wsdl=No hay metadatos de WSDL para el servicio: {0}, no se puede crear el proxy. Intente crear el servicio proporcionando una URL de WSDL +invalid.binding.id=Identificador de enlace no v\u00E1lido: {0}. Debe ser: {1} +invalid.soap.role.none=No se puede definir el rol de SOAP 1.2 "ninguno" +non.logical.handler.set=No se puede definir {0} en el enlace. El manejador debe ser un manejador l\u00F3gico. +runtime.wsdlparser.invalidWSDL=WSDL no v\u00E1lido {0}; se esperaba {1}, pero se ha encontrado {2} en (l\u00EDnea{3}) +undefined.binding=Enlace no definido: {0} +undefined.portType=Tipo de puerto no definido: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=Fallo al analizar la referencia de punto final: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=Se ha especificado la referencia de punto final sin activar el soporte de WS-Addressing. +invalid.wsdl.url=URL de WSDL no v\u00E1lida: {0} +wsdl.not.found=No se puede acceder a la URL de WSDL {0}. +invalid.address=Direcci\u00F3n no v\u00E1lida: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0} no est\u00E1 soportado con {1}. Debe ser: {2} +invalid.soap.action=Se debe definir una acci\u00F3n de SOAP v\u00E1lida en RequestContext cuando Addressing est\u00E9 activado. Utilice BindingProvider.SOAPACTION_URI_PROPERTY para definirlo. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=Fallo al acceder al WSDL en: {0}. Ha fallado con: \n\t{1}.\nAl volver a intentarlo con MEX, ha devuelto: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=Fallo al acceder al WSDL en: {0}. Ha fallado con: \n\t{1}. +wsdl.contains.no.service=El WSDL {0} no contiene ninguna definici\u00F3n de servicio. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties new file mode 100644 index 00000000000..2036fae604e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_fr.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=erreur de transport HTTP : {0} +local.client.failed=erreur de transport local : {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=Code de statut HTTP 404 : introuvable - {0} +http.status.code=Le serveur a envoy\u00E9 le code de statut HTTP {0} : {1} +invalid.port.name={0} n''est pas un port valide. Les ports valides sont : {1} +invalid.epr.port.name=Le nom d''adresse indiqu\u00E9 dans la r\u00E9f\u00E9rence d''adresse {0} n''est pas un QName de port WSDL, les ports valides sont {1} +invalid.service.name={0} n''est pas un service valide. Les services valides sont : {1} +invalid.service.name.null={0} n''est pas un service valide +invalid.service.no.wsdl=Aucune m\u00E9tadonn\u00E9e WSDL pour le service {0}, impossible de cr\u00E9er un proxy. Essayez de cr\u00E9er un service en fournissant une URL WSDL +invalid.binding.id=ID de binding non valide : {0}. Il doit s''agir de : {1} +invalid.soap.role.none=Impossible de d\u00E9finir le r\u00F4le SOAP 1.2 "aucun" +non.logical.handler.set=Impossible de d\u00E9finir {0} lors du binding. Le gestionnaire doit \u00EAtre de type LogicalHandler. +runtime.wsdlparser.invalidWSDL=WSDL {0} non valide, {1} attendu, {2} trouv\u00E9 dans (ligne {3}) +undefined.binding=Binding non d\u00E9fini : {0} +undefined.portType=Type de port non d\u00E9fini : {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=Echec de l''analyse de la r\u00E9f\u00E9rence d''adresse : {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=La r\u00E9f\u00E9rence d'adresse est indiqu\u00E9e sans activation de la prise en charge de WS-Addressing. +invalid.wsdl.url=URL WSDL non valide : {0} +wsdl.not.found=L''URL WSDL {0} n''est pas accessible. +invalid.address=Adresse non valide : {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0} non pris en charge avec {1}. Il doit s''agir de : {2} +invalid.soap.action=Un en-t\u00EAte SOAPAction valide doit \u00EAtre d\u00E9fini dans RequestContext lorsque l'adressage est activ\u00E9, utilisez BindingProvider.SOAPACTION_URI_PROPERTY pour le d\u00E9finir. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=Echec de l''acc\u00E8s au WSDL \u00E0 {0} avec \n\t{1}.\nLa nouvelle tentative avec MEX a renvoy\u00E9 \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=Echec de l''acc\u00E8s au WSDL \u00E0 {0} avec \n\t{1}. +wsdl.contains.no.service=Le WSDL {0} ne contient aucune d\u00E9finition de service. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties new file mode 100644 index 00000000000..e51c17cdb53 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_it.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=errore di trasporto HTTP: {0} +local.client.failed=errore di trasporto locale: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=Codice di stato HTTP 404: Non trovato - {0} +http.status.code=Il server ha inviato il codice di stato HTTP {0}: {1} +invalid.port.name={0} non \u00E8 una porta valida. Le porte valide sono: {1} +invalid.epr.port.name=L''EndpointName specificato nell''EPR {0} non \u00E8 un QName della porta WSDL. Le porte valide sono {1} +invalid.service.name={0} non \u00E8 un servizio valido. I servizi validi sono: {1} +invalid.service.name.null={0} non \u00E8 un servizio valido +invalid.service.no.wsdl=Non sono presenti metadati WSDL per il servizio: {0}. Impossibile creare il proxy. Provare a creare il servizio fornendo un URL WSDL +invalid.binding.id=ID di associazione non valido: {0}. Deve essere: {1} +invalid.soap.role.none=Impostare il ruolo SOAP 1.2 su "none" +non.logical.handler.set=Impossibile impostare {0} sull''associazione. L''handler deve essere un LogicalHandler. +runtime.wsdlparser.invalidWSDL=WSDL non valido {0}: previsto {1}, trovato {2} in (riga {3}) +undefined.binding=Associazione non definita: {0} +undefined.portType=Tipo di porta non definito: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=Analisi dell''EPR non riuscita: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=EPR specificato senza abilitare il supporto WS-Addressing. +invalid.wsdl.url=URL WSDL non valido: {0} +wsdl.not.found=URL WSDL {0} non accessibile. +invalid.address=Indirizzo non valido: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0} non supportato con {1}. Deve essere: {2} +invalid.soap.action=\u00C8 necessario impostare una SOAPAction valida in RequestContext quando \u00E8 abilitato l'indirizzamento. Usare BindingProvider.SOAPACTION_URI_PROPERTY per impostarla. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=Accesso a WSDL non riuscito in: {0}. Non riuscito con: \n\t{1}.\nIl nuovo tentativo con MEX ha fornito: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=Accesso a WSDL non riuscito in: {0}. Non riuscito con: \n\t{1}. +wsdl.contains.no.service=WSDL {0} non contiene alcuna definizione di servizio. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties new file mode 100644 index 00000000000..9f7271d34b7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ja.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=HTTP\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u30FB\u30A8\u30E9\u30FC: {0} +local.client.failed=\u30ED\u30FC\u30AB\u30EB\u30FB\u30C8\u30E9\u30F3\u30B9\u30DD\u30FC\u30C8\u30FB\u30A8\u30E9\u30FC: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=HTTP\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30B3\u30FC\u30C9404: \u898B\u3064\u304B\u308A\u307E\u305B\u3093 - {0} +http.status.code=\u30B5\u30FC\u30D0\u30FC\u304CHTTP\u30B9\u30C6\u30FC\u30BF\u30B9\u30FB\u30B3\u30FC\u30C9{0}\u3092\u9001\u4FE1\u3057\u307E\u3057\u305F: {1} +invalid.port.name={0}\u306F\u6709\u52B9\u306A\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u306A\u30DD\u30FC\u30C8: {1} +invalid.epr.port.name=EPR {0}\u3067\u6307\u5B9A\u3055\u308C\u305FEndpointName\u306FWSDL\u30DD\u30FC\u30C8\u306EQName\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u306A\u30DD\u30FC\u30C8\u306F{1}\u3067\u3059 +invalid.service.name={0}\u306F\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9: {1} +invalid.service.name.null={0}\u306F\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +invalid.service.no.wsdl=\u30B5\u30FC\u30D3\u30B9: {0}\u306EWSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u306A\u3044\u305F\u3081\u3001\u30D7\u30ED\u30AD\u30B7\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002WSDL URL\u3092\u6307\u5B9A\u3057\u3066\u30B5\u30FC\u30D3\u30B9\u3092\u4F5C\u6210\u3057\u3066\u304F\u3060\u3055\u3044 +invalid.binding.id=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0ID: {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1} +invalid.soap.role.none=SOAP 1.2\u30ED\u30FC\u30EB\u300C\u306A\u3057\u300D\u306F\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093 +non.logical.handler.set=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B{0}\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30CF\u30F3\u30C9\u30E9\u306FLogicalHandler\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +runtime.wsdlparser.invalidWSDL=WSDL {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u6B21\u306E\u5834\u6240\u3067{1}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{2}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F(\u884C{3}) +undefined.binding=\u672A\u5B9A\u7FA9\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0: {0} +undefined.portType=\u672A\u5B9A\u7FA9\u306E\u30DD\u30FC\u30C8\u30FB\u30BF\u30A4\u30D7: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=EPR\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=EPR\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001WS-Addressing\u306E\u30B5\u30DD\u30FC\u30C8\u304C\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002 +invalid.wsdl.url=\u7121\u52B9\u306AWSDL URL: {0} +wsdl.not.found=WSDL URL {0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\u3002 +invalid.address=\u7121\u52B9\u306A\u30A2\u30C9\u30EC\u30B9: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0}\u306F{1}\u3067\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u6B21\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {2} +invalid.soap.action=\u30A2\u30C9\u30EC\u30B9\u6307\u5B9A\u304C\u6709\u52B9\u3067\u3042\u308B\u5834\u5408\u306F\u3001RequestContext\u3067\u6709\u52B9\u306ASOAPAction\u3092\u8A2D\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002BindingProvider.SOAPACTION_URI_PROPERTY\u3092\u4F7F\u7528\u3057\u3066\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=\u6B21\u306E\u5834\u6240\u3067WSDL\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}\u3002\u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3088\u308A\u5931\u6557\u3057\u307E\u3057\u305F: \n\t{1}\u3002\nMEX\u3067\u518D\u8A66\u884C\u3059\u308B\u3068\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=\u6B21\u306E\u5834\u6240\u3067WSDL\u3078\u306E\u30A2\u30AF\u30BB\u30B9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0}\u3002\u6B21\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3088\u308A\u5931\u6557\u3057\u307E\u3057\u305F: \n\t{1}\u3002 +wsdl.contains.no.service=WSDL {0}\u306B\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u304C\u542B\u307E\u308C\u307E\u305B\u3093\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties new file mode 100644 index 00000000000..4ed01e7c318 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_ko.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=HTTP \uC804\uC1A1 \uC624\uB958: {0} +local.client.failed=\uB85C\uCEEC \uC804\uC1A1 \uC624\uB958: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=HTTP \uC0C1\uD0DC \uCF54\uB4DC 404: \uCC3E\uC744 \uC218 \uC5C6\uC74C - {0} +http.status.code=\uC11C\uBC84\uAC00 HTTP \uC0C1\uD0DC \uCF54\uB4DC {0}\uC744(\uB97C) \uC804\uC1A1\uD568: {1} +invalid.port.name={0}\uC740(\uB294) \uC801\uD569\uD55C \uD3EC\uD2B8\uAC00 \uC544\uB2D9\uB2C8\uB2E4. \uC801\uD569\uD55C \uD3EC\uD2B8: {1} +invalid.epr.port.name=EPR {0}\uC5D0 \uC9C0\uC815\uB41C EndpointName\uC740 WSDL \uD3EC\uD2B8 QName\uC774 \uC544\uB2D9\uB2C8\uB2E4. \uC801\uD569\uD55C \uD3EC\uD2B8\uB294 {1}\uC785\uB2C8\uB2E4. +invalid.service.name={0}\uC740(\uB294) \uC801\uD569\uD55C \uC11C\uBE44\uC2A4\uAC00 \uC544\uB2D9\uB2C8\uB2E4. \uC801\uD569\uD55C \uC11C\uBE44\uC2A4: {1} +invalid.service.name.null={0}\uC740(\uB294) \uC801\uD569\uD55C \uC11C\uBE44\uC2A4\uAC00 \uC544\uB2D9\uB2C8\uB2E4. +invalid.service.no.wsdl=\uC11C\uBE44\uC2A4\uC5D0 \uB300\uD55C WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uAC00 \uC5C6\uC74C: {0}. \uD504\uB85D\uC2DC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! WSDL URL\uC744 \uC81C\uACF5\uD558\uC5EC \uC11C\uBE44\uC2A4\uB97C \uC0DD\uC131\uD574 \uBCF4\uC2ED\uC2DC\uC624. +invalid.binding.id=\uBD80\uC801\uD569\uD55C \uBC14\uC778\uB529 ID: {0}. \uD544\uC218: {1} +invalid.soap.role.none=SOAP 1.2 \uB864\uC744 "none"\uC73C\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +non.logical.handler.set=\uBC14\uC778\uB529\uC5D0 \uB300\uD574 {0}\uC744(\uB97C) \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC98\uB9AC\uAE30\uB294 LogicalHandler\uC5EC\uC57C \uD569\uB2C8\uB2E4. +runtime.wsdlparser.invalidWSDL={0}\uC740(\uB294) \uBD80\uC801\uD569\uD55C WSDL\uC785\uB2C8\uB2E4. {1}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {3}\uD589\uC5D0\uC11C {2}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +undefined.binding=\uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uBC14\uC778\uB529: {0} +undefined.portType=\uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uD3EC\uD2B8 \uC720\uD615: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=EPR\uC758 \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=WS-Addressing \uC9C0\uC6D0\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD558\uC9C0 \uC54A\uC740 \uC0C1\uD0DC\uC5D0\uC11C EPR\uC774 \uC9C0\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +invalid.wsdl.url=\uBD80\uC801\uD569\uD55C WSDL URL: {0} +wsdl.not.found=WSDL URL {0}\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +invalid.address=\uBD80\uC801\uD569\uD55C \uC8FC\uC18C: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0}\uC740(\uB294) {1}\uC5D0\uC11C \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC218: {2} +invalid.soap.action=Addressing\uC774 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 RequestContext\uC5D0\uC11C \uC801\uD569\uD55C SOAPAction\uC744 \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. BindingProvider.SOAPACTION_URI_PROPERTY\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC124\uC815\uD558\uC2ED\uC2DC\uC624. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=\uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC640 \uD568\uAED8 {0}\uC758 WSDL\uC5D0 \uB300\uD55C \uC561\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \n\t{1}.\nMEX gave\uB85C \uC7AC\uC2DC\uB3C4\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=\uB2E4\uC74C \uBA54\uC2DC\uC9C0\uC640 \uD568\uAED8 {0}\uC758 WSDL\uC5D0 \uB300\uD55C \uC561\uC138\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \n\t{1}. +wsdl.contains.no.service=WSDL {0}\uC5D0 \uC11C\uBE44\uC2A4 \uC815\uC758\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties new file mode 100644 index 00000000000..5d6c3faf418 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_pt_BR.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=Erro de transporte HTTP: {0} +local.client.failed=erro de transporte local: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=C\u00F3digo de Status HTTP 404: N\u00E3o Encontrado - {0} +http.status.code=O servidor enviou c\u00F3digo de status HTTP {0}: {1} +invalid.port.name={0} n\u00E3o \u00E9 uma porta v\u00E1lida. As portas v\u00E1lidas s\u00E3o: {1} +invalid.epr.port.name=EndpointName especificado no EPR {0} n\u00E3o \u00E9 um QName de porta WSDL; as Portas v\u00E1lidas s\u00E3o {1} +invalid.service.name={0} n\u00E3o \u00E9 um servi\u00E7o v\u00E1lido. Os servi\u00E7os v\u00E1lidos s\u00E3o {1} +invalid.service.name.null={0} n\u00E3o \u00E9 um servi\u00E7o v\u00E1lido +invalid.service.no.wsdl=Nenhum metadado wsdl para o servi\u00E7o {0}. N\u00E3o \u00E9 poss\u00EDvel criar o proxy! Tente criar o Servi\u00E7o fornecendo um URL do WSDL +invalid.binding.id=Id de bind inv\u00E1lido: {0}. Deve ser: {1} +invalid.soap.role.none=N\u00E3o \u00E9 poss\u00EDvel definir a atribui\u00E7\u00E3o SOAP 1.2 como "nenhuma" +non.logical.handler.set=N\u00E3o \u00E9 poss\u00EDvel definir {0} no bind. O handler deve ser um LogicalHandler. +runtime.wsdlparser.invalidWSDL=WSDL {0} inv\u00E1lido, esperada {1} encontrou {2} na (linha{3}) +undefined.binding=Bind indefinido: {0} +undefined.portType=Tipo de porta indefinido: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=Falha ao fazer parse de EPR: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=A EPR foi especificada sem ativar o suporte de Endere\u00E7amento de WS. +invalid.wsdl.url=URL do WSDL Inv\u00E1lido: {0} +wsdl.not.found=Url do WSDL {0} n\u00E3o acess\u00EDvel. +invalid.address=Endere\u00E7o inv\u00E1lido: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0} n\u00E3o suportado com {1}. Deve ser: {2} +invalid.soap.action=Uma SOAPAction v\u00E1lida dever\u00E1 ser definida no RequestContext quando o Endere\u00E7amento estiver ativado. Use BindingProvider.SOAPACTION_URI_PROPERTY para defini-la. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=Falha ao acessar o WSDL em {0}. Ele falhou com: \n\t{1}.\nRecuperando com MEX fornecido: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=Falha ao acessar o WSDL em {0}. Ele falhou com: \n\t{1}. +wsdl.contains.no.service=O WSDL {0} n\u00E3o cont\u00E9m uma defini\u00E7\u00E3o de servi\u00E7o. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties new file mode 100644 index 00000000000..84f0063b5db --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_CN.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=HTTP \u4F20\u8F93\u9519\u8BEF: {0} +local.client.failed=\u672C\u5730\u4F20\u8F93\u9519\u8BEF: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=HTTP \u72B6\u6001\u4EE3\u7801 404: \u672A\u627E\u5230 - {0} +http.status.code=\u670D\u52A1\u5668\u53D1\u9001\u4E86 HTTP \u72B6\u6001\u4EE3\u7801 {0}: {1} +invalid.port.name={0} \u4E0D\u662F\u6709\u6548\u7AEF\u53E3\u3002\u6709\u6548\u7AEF\u53E3\u4E3A: {1} +invalid.epr.port.name=EPR {0}\u4E2D\u6307\u5B9A\u7684 EndpointName \u4E0D\u662F WSDL \u7AEF\u53E3 QName, \u6709\u6548\u7AEF\u53E3\u4E3A {1} +invalid.service.name={0}\u4E0D\u662F\u6709\u6548\u670D\u52A1\u3002\u6709\u6548\u670D\u52A1\u4E3A: {1} +invalid.service.name.null={0}\u4E0D\u662F\u6709\u6548\u670D\u52A1 +invalid.service.no.wsdl=\u6CA1\u6709\u7528\u4E8E\u670D\u52A1\u7684 wsdl \u5143\u6570\u636E: {0}, \u65E0\u6CD5\u521B\u5EFA\u4EE3\u7406! \u8BF7\u5C1D\u8BD5\u901A\u8FC7\u63D0\u4F9B WSDL URL \u6765\u521B\u5EFA\u670D\u52A1 +invalid.binding.id=\u7ED1\u5B9A ID \u65E0\u6548: {0}\u3002\u5FC5\u987B\u662F: {1} +invalid.soap.role.none=\u65E0\u6CD5\u8BBE\u7F6E SOAP 1.2 \u89D2\u8272 "\u65E0" +non.logical.handler.set=\u65E0\u6CD5\u5BF9\u7ED1\u5B9A\u8BBE\u7F6E{0}\u3002\u5904\u7406\u7A0B\u5E8F\u5FC5\u987B\u662F LogicalHandler\u3002 +runtime.wsdlparser.invalidWSDL=WSDL {0}\u65E0\u6548, \u5E94\u4E3A{1}, \u5728\u884C {3} \u627E\u5230\u7684\u662F{2} +undefined.binding=\u672A\u5B9A\u4E49\u7684\u7ED1\u5B9A: {0} +undefined.portType=\u672A\u5B9A\u4E49\u7684\u7AEF\u53E3\u7C7B\u578B: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=\u65E0\u6CD5\u89E3\u6790 EPR: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=\u6307\u5B9A\u4E86 EPR, \u4F46\u672A\u542F\u7528 WS-Addressing \u652F\u6301\u3002 +invalid.wsdl.url=WSDL URL \u65E0\u6548: {0} +wsdl.not.found=WSDL url {0}\u4E0D\u53EF\u8BBF\u95EE\u3002 +invalid.address=\u5730\u5740\u65E0\u6548: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={1}\u4E0D\u652F\u6301{0}\u3002\u5FC5\u987B\u4E3A: {2} +invalid.soap.action=\u5728\u542F\u7528\u5BFB\u5740\u540E\u5E94\u5728 RequestContext \u4E2D\u8BBE\u7F6E\u6709\u6548\u7684 SOAPAction\u3002\u8BF7\u4F7F\u7528 BindingProvider.SOAPACTION_URI_PROPERTY \u8FDB\u884C\u8BBE\u7F6E\u3002 +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=\u65E0\u6CD5\u8BBF\u95EE\u4F4D\u4E8E\u4EE5\u4E0B\u4F4D\u7F6E\u7684 WSDL: {0}\u3002\u8BE5\u64CD\u4F5C\u5931\u8D25\u5E76\u663E\u793A: \n\t{1}\u3002\n\u4F7F\u7528 MEX \u91CD\u8BD5\u65F6\u663E\u793A: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=\u65E0\u6CD5\u8BBF\u95EE\u4F4D\u4E8E\u4EE5\u4E0B\u4F4D\u7F6E\u7684 WSDL: {0}\u3002\u8BE5\u64CD\u4F5C\u5931\u8D25\u5E76\u663E\u793A: \n\t{1}\u3002 +wsdl.contains.no.service=WSDL {0}\u4E0D\u5305\u542B\u670D\u52A1\u5B9A\u4E49\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties new file mode 100644 index 00000000000..d3814db7713 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/client_zh_TW.properties @@ -0,0 +1,61 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Usage not found. TODO Remove +#http.client.cannot.connect=cannot connect to server: {0} +http.client.failed=HTTP \u50B3\u8F38\u932F\u8AA4: {0} +local.client.failed=\u672C\u6A5F\u50B3\u8F38\u932F\u8AA4: {0} +# Usage not found. TODO Remove +#http.client.cannotCreateMessageFactory=cannot create message factory +# Usage not found. TODO Remove +#http.client.unauthorized=request requires HTTP authentication: {0} +http.not.found=HTTP \u72C0\u614B\u4EE3\u78BC 404: \u627E\u4E0D\u5230 - {0} +http.status.code=\u4F3A\u670D\u5668\u5DF2\u50B3\u9001 HTTP \u72C0\u614B\u4EE3\u78BC {0}: {1} +invalid.port.name={0} \u4E0D\u662F\u6709\u6548\u7684\u9023\u63A5\u57E0. \u6709\u6548\u7684\u9023\u63A5\u57E0\u70BA: {1} +invalid.epr.port.name=\u5728 EPR {0} \u4E2D\u6307\u5B9A\u7684 EndpointName \u4E0D\u662F WSDL \u9023\u63A5\u57E0 QName, \u6709\u6548\u7684\u9023\u63A5\u57E0\u70BA {1} +invalid.service.name={0} \u4E0D\u662F\u6709\u6548\u7684\u670D\u52D9. \u6709\u6548\u7684\u670D\u52D9\u70BA: {1} +invalid.service.name.null={0} \u4E0D\u662F\u6709\u6548\u7684\u670D\u52D9 +invalid.service.no.wsdl=\u670D\u52D9: {0} \u6C92\u6709 WSDL \u63CF\u8FF0\u8CC7\u6599, \u7121\u6CD5\u5EFA\u7ACB\u4EE3\u7406\u4E3B\u6A5F! \u8ACB\u5617\u8A66\u63D0\u4F9B WSDL URL \u4EE5\u5EFA\u7ACB\u670D\u52D9 +invalid.binding.id=\u7121\u6548\u7684\u9023\u7D50 ID: {0}. \u5FC5\u9808\u70BA: {1} +invalid.soap.role.none=\u7121\u6CD5\u8A2D\u5B9A SOAP 1.2 \u89D2\u8272 "none" +non.logical.handler.set=\u7121\u6CD5\u5728\u9023\u7D50\u4E2D\u8A2D\u5B9A {0}. \u8655\u7406\u7A0B\u5F0F\u5FC5\u9808\u70BA LogicalHandler. +runtime.wsdlparser.invalidWSDL=\u7121\u6548\u7684 WSDL {0}, \u9810\u671F\u70BA {1}, \u5728\u7B2C {3} \u884C \u767C\u73FE {2} +undefined.binding=\u672A\u5B9A\u7FA9\u7684\u9023\u7D50: {0} +undefined.portType=\u672A\u5B9A\u7FA9\u7684\u9023\u63A5\u57E0\u985E\u578B: {0} +# EPR = EndPoint Reference. +failed.to.parse.epr=\u7121\u6CD5\u5256\u6790 EPR: {0} +# EPR = EndPoint Reference. +epr.without.addressing.on=EPR \u6307\u5B9A\u6642\u672A\u555F\u7528 Web \u670D\u52D9\u5B9A\u5740\u652F\u63F4. +invalid.wsdl.url=\u7121\u6548\u7684 WSDL URL: {0} +wsdl.not.found=\u7121\u6CD5\u5B58\u53D6 WSDL URL {0}. +invalid.address=\u7121\u6548\u7684\u4F4D\u5740: {0} +# {0} - BindingProvider.getEndpointReference()/BindingProvider.getEndpointReference(Class class), {1} - XML/HTTP Binding, {2} - SOAP11 or SOAP12 Binding +unsupported.operation={0} \u4E0D\u652F\u63F4\u8207 {1} \u4E00\u8D77\u4F7F\u7528. \u5FC5\u9808\u70BA: {2} +invalid.soap.action=\u7576\u5B9A\u5740\u555F\u7528\u6642, \u61C9\u5728 RequestContext \u4E2D\u8A2D\u5B9A\u6709\u6548\u7684 SOAPAction, \u8ACB\u4F7F\u7528 BindingProvider.SOAPACTION_URI_PROPERTY \u4E88\u4EE5\u8A2D\u5B9A. +# {0} - WSDL URL, {1}, {2} - exception message +failed.to.parseWithMEX=\u7121\u6CD5\u5B58\u53D6\u4F4D\u65BC: {0} \u7684 WSDL. \u5931\u6557\u539F\u56E0\u5982\u4E0B: \n\t{1}.\n\u4F7F\u7528\u63D0\u4F9B\u7684 MEX \u91CD\u8A66: \n\t{2} +# {0} - WSDL URL, {1} - exception message e.g.: Failed to access the WSDL at: http://foo.org/bar?wsdl. It failed with: Connection refused: connect. +failed.to.parse=\u7121\u6CD5\u5B58\u53D6\u4F4D\u65BC: {0} \u7684 WSDL. \u5931\u6557\u539F\u56E0\u5982\u4E0B: \n\t{1}. +wsdl.contains.no.service=WSDL {0} \u672A\u5305\u542B\u670D\u52D9\u5B9A\u7FA9. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties index 64bee039fc8..a1f1ebac54b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties new file mode 100644 index 00000000000..0d17a5a0009 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_de.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=SOAP-/HTTP-Binding in {0} ist bei Null-Aufrufargument nicht zul\u00E4ssig. Muss {1} sein +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=Eine XML-/HTTP-Anforderung, die "MessageContext.HTTP_REQUEST_METHOD gleich {0}" mit einem Null-Aufrufargument verwendet, ist nicht zul\u00E4ssig. Muss {1} sein +invalid.response=Keine Antwort zur\u00FCckgegeben. +invalid.response.deserialization=Die Antwort konnte nicht deserialisiert werden. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=Dispatch von Service.Mode.PAYLOAD{0} kann nicht erstellt werden. Muss {1} sein +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=Dispatch von {0} kann nicht erstellt werden. Muss {1} sein. +invalid.datasource.dispatch.binding=Dispatch mit {0} kann nicht erstellt werden. Muss {1} sein +invalid.soapmessage.dispatch.binding=Dispatch mit {0}-Binding kann nicht erstellt werden. Muss {1}-Binding sein. +invalid.query.string=End Point-Adresse kann mit der angegebenen Abfragezeichenfolge nicht aufgel\u00F6st werden: {0}. +invalid.uri.path.query=Ein URI mit diesen Pfadinformationen {0} und dieser Abfragezeichenfolge {1} kann nicht erstellt werden. +invalid.uri=End Point-Zeichenfolge: {0} ist ein ung\u00FCltiger URI. +invalid.uri.decode=Der aufgel\u00F6ste End Point kann mit der UTF-8-Codierung nicht decodiert werden. +invalid.uri.resolution=End Point-Adresse kann mit dem angegebenen Pfad nicht aufgel\u00F6st werden: {0}. +duplicate.port=WSDLPort {0} ist bereits vorhanden. Ein Port mit demselben QName kann nicht erstellt werden. +invalid.query.leading.char=F\u00FChrendes ''?'' von MessageContext.QUERY_STRING: {0} ist nicht g\u00FCltig. Entfernen Sie ''?'', und f\u00FChren Sie den Vorgang erneut aus. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties new file mode 100644 index 00000000000..65e621baa89 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_es.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=No se permite el enlace SOAP/HTTP en {0} con un argumento de llamada nulo. Debe ser: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=No se permite una solicitud XML/HTTP que utiliza el m\u00E9todo MessageContext.HTTP_REQUEST_METHOD igual a {0} con un argumento de llamada nulo. Debe ser: {1} +invalid.response=No se ha devuelto ninguna respuesta. +invalid.response.deserialization=Fallo al anular la serializaci\u00F3n de la respuesta. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=No se puede crear Dispatch de Service.Mode.PAYLOAD{0}. Debe ser: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=No se puede crear Dispatch de {0}. Debe ser {1}. +invalid.datasource.dispatch.binding=No se puede crear Dispatch con {0}. Debe ser: {1} +invalid.soapmessage.dispatch.binding=No se puede crear Dispatch con el enlace {0}. Debe ser: enlace {1}. +invalid.query.string=No se ha podido resolver la direcci\u00F3n de punto final utilizando la cadena de consulta proporcionada: {0}. +invalid.uri.path.query=No se ha podido construir un URI con esta informaci\u00F3n de ruta de acceso {0} y esta cadena de consulta {1}. +invalid.uri=La cadena de punto final {0} es un URI no v\u00E1lido. +invalid.uri.decode=No se ha podido descodificar el punto final resuelto utilizando la codificaci\u00F3n UTF-8. +invalid.uri.resolution=No se ha podido resolver la direcci\u00F3n de punto final utilizando la ruta de acceso proporcionada: {0}. +duplicate.port=WSDLPort {0} ya existe. No se puede crear un puerto con el mismo QName. +invalid.query.leading.char=El signo ''?'' que precede a MessageContext.QUERY_STRING: {0} no es v\u00E1lido. Elimine ''?'' y vuelva a ejecutarlo. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties new file mode 100644 index 00000000000..255f6ca42b6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_fr.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=Le binding SOAP/HTTP dans {0} n''est pas autoris\u00E9 avec un argument d''appel NULL. Il doit s''agir de : {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=Une demande XML/HTTP \u00E0 l''aide de MessageContext.HTTP_REQUEST_METHOD \u00E9quivaut \u00E0 {0} avec un argument d''appel NULL et n''est pas autoris\u00E9e. Il doit s''agir de : {1} +invalid.response=Aucune r\u00E9ponse renvoy\u00E9e. +invalid.response.deserialization=Echec de la d\u00E9s\u00E9rialisation de la r\u00E9ponse. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=Impossible de cr\u00E9er Dispatch de Service.Mode.PAYLOAD{0}. Il doit s''agir de : {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=Impossible de cr\u00E9er Dispatch de {0}. Il doit s''agir de : {1}. +invalid.datasource.dispatch.binding=Impossible de cr\u00E9er Dispatch avec {0}. Il doit s''agir de : {1} +invalid.soapmessage.dispatch.binding=Impossible de cr\u00E9er Dispatch avec le binding {0}. Il doit s''agir du binding {1}. +invalid.query.string=Impossible de r\u00E9soudre l''adresse \u00E0 l''aide de la cha\u00EEne de requ\u00EAte fournie : {0}. +invalid.uri.path.query=Impossible de construire un URI avec ces informations sur le chemin {0} et cette cha\u00EEne de requ\u00EAte {1}. +invalid.uri=La cha\u00EEne d''adresse {0} est un URI non valide. +invalid.uri.decode=Impossible de d\u00E9coder l'adresse r\u00E9solue \u00E0 l'aide de l'encodage UTF-8. +invalid.uri.resolution=Impossible de r\u00E9soudre l''adresse \u00E0 l''aide du chemin fourni : {0}. +duplicate.port=Le WSDLPort {0} existe d\u00E9j\u00E0. Impossible de cr\u00E9er un port ayant le m\u00EAme QName. +invalid.query.leading.char=Le signe ''?'' de d\u00E9but de MessageContext.QUERY_STRING {0} n''est pas valide. Enlevez le signe ''?'' et recommencez. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties new file mode 100644 index 00000000000..8c67cf2c3bb --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_it.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=L''associazione SOAP/HTTP in {0} non \u00E8 consentita con un argomento di richiamo nullo. Deve essere: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=Non \u00E8 consentita una richiesta XML/HTTP che usa MessageContext.HTTP_REQUEST_METHOD uguale a {0} con un argomento di richiamo nullo. Deve essere: {1} +invalid.response=Nessuna risposta restituita. +invalid.response.deserialization=Deserializzazione della risposta non riuscita. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=Impossibile creare Dispatch di Service.Mode.PAYLOAD{0}. Deve essere: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=Impossibile creare Dispatch di {0}. Deve essere: {1} +invalid.datasource.dispatch.binding=Impossibile creare Dispatch con {0}. Deve essere: {1} +invalid.soapmessage.dispatch.binding=Impossibile creare Dispatch con l''associazione {0}. Deve essere: associazione {1}. +invalid.query.string=Impossibile risolvere l''indirizzo dell''endpoint usando la stringa di query fornita: {0}. +invalid.uri.path.query=Impossibile costruire un URI con queste informazioni sul percorso {0} e questa stringa di query {1}. +invalid.uri=La stringa dell''endpoint: {0} \u00E8 un URI non valido. +invalid.uri.decode=Impossibile decodificare l'endpoint risolto usando la codifica UTF-8. +invalid.uri.resolution=Impossibile risolvere l''indirizzo dell''endpoint usando il percorso fornito: {0}. +duplicate.port=WSDLPort {0} esiste gi\u00E0. Impossibile creare una porta con lo stesso QName. +invalid.query.leading.char=''?'' iniziale di MessageContext.QUERY_STRING: {0} non valido. Rimuovere ''?'' e ripetere l''esecuzione. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties new file mode 100644 index 00000000000..2cc9f947007 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ja.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=\u547C\u51FA\u3057\u5F15\u6570\u304Cnull\u306E\u5834\u5408\u3001{0}\u3067\u306ESOAP/HTTP\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=\u547C\u51FA\u3057\u5F15\u6570\u304CNULL\u306E\u5834\u5408\u3001MessageContext.HTTP_REQUEST_METHOD equals {0}\u3092\u4F7F\u7528\u3057\u305FXML/HTTP\u30EA\u30AF\u30A8\u30B9\u30C8\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1} +invalid.response=\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3002 +invalid.response.deserialization=\u30EC\u30B9\u30DD\u30F3\u30B9\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=Service.Mode.PAYLOAD{0}\u306EDispatch\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode={0}\u306EDispatch\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002{1}\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +invalid.datasource.dispatch.binding={0}\u3067Dispatch\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002\u6B21\u306E\u3088\u3046\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: {1} +invalid.soapmessage.dispatch.binding={0}\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3067Dispatch\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002{1}\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +invalid.query.string=\u6307\u5B9A\u3055\u308C\u305F\u554F\u5408\u305B\u6587\u5B57\u5217\u3092\u4F7F\u7528\u3057\u3066\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093: {0}\u3002 +invalid.uri.path.query=\u3053\u306E\u30D1\u30B9\u60C5\u5831{0}\u304A\u3088\u3073\u3053\u306E\u554F\u5408\u305B\u6587\u5B57\u5217{1}\u3092\u4F7F\u7528\u3057\u3066URI\u3092\u69CB\u7BC9\u3067\u304D\u307E\u305B\u3093\u3002 +invalid.uri=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u6587\u5B57\u5217: {0}\u306F\u7121\u52B9\u306AURI\u3067\u3059\u3002 +invalid.uri.decode=UTF-8\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u4F7F\u7528\u3057\u3066\u89E3\u6C7A\u6E08\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u30C7\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3002 +invalid.uri.resolution=\u6307\u5B9A\u3055\u308C\u305F\u30D1\u30B9\u3092\u4F7F\u7528\u3057\u3066\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A2\u30C9\u30EC\u30B9\u3092\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093: {0}\u3002 +duplicate.port=WSDLPort {0}\u306F\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059\u3002\u540C\u3058QName\u306E\u30DD\u30FC\u30C8\u306F\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3002 +invalid.query.leading.char=MessageContext.QUERY_STRING: {0}\u306E\u5148\u982D\u306E''?''\u306F\u6709\u52B9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002''?''\u3092\u524A\u9664\u3057\u3066\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties new file mode 100644 index 00000000000..ea868d17f80 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_ko.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode={0}\uC758 SOAP/HTTP \uBC14\uC778\uB529\uC5D0\uB294 \uB110 \uD638\uCD9C \uC778\uC218\uAC00 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=MessageContext.HTTP_REQUEST_METHOD\uB85C \uD638\uCD9C \uC778\uC218\uAC00 \uB110\uC778 {0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB294 XML/HTTP \uC694\uCCAD\uC740 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} +invalid.response=\uBC18\uD658\uB41C \uC751\uB2F5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +invalid.response.deserialization=\uC751\uB2F5 \uC9C1\uB82C\uD654 \uD574\uC81C\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=Service.Mode.PAYLOAD {0}\uC758 Dispatch\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode={0}\uC758 Dispatch\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} +invalid.datasource.dispatch.binding={0}(\uC73C)\uB85C Dispatch\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} +invalid.soapmessage.dispatch.binding={0} \uBC14\uC778\uB529\uC73C\uB85C Dispatch\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD544\uC218: {1} \uBC14\uC778\uB529 +invalid.query.string=\uC81C\uACF5\uB41C \uC9C8\uC758 \uBB38\uC790\uC5F4\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB05D\uC810 \uC8FC\uC18C\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {0}. +invalid.uri.path.query=\uACBD\uB85C \uC815\uBCF4 {0} \uBC0F \uC9C8\uC758 \uBB38\uC790\uC5F4 {1}(\uC73C)\uB85C URI\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +invalid.uri=\uB05D\uC810 \uBB38\uC790\uC5F4 {0}\uC740(\uB294) \uBD80\uC801\uD569\uD55C URI\uC785\uB2C8\uB2E4. +invalid.uri.decode=UTF-8 \uC778\uCF54\uB529\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBD84\uC11D\uB41C \uB05D\uC810\uC744 \uB514\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +invalid.uri.resolution=\uC81C\uACF5\uB41C \uACBD\uB85C\uB97C \uC0AC\uC6A9\uD558\uC5EC \uB05D\uC810 \uC8FC\uC18C\uB97C \uBD84\uC11D\uD560 \uC218 \uC5C6\uC74C: {0}. +duplicate.port=WSDLPort {0}\uC774(\uAC00) \uC874\uC7AC\uD569\uB2C8\uB2E4. \uB3D9\uC77C\uD55C QName\uC758 \uD3EC\uD2B8\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +invalid.query.leading.char=MessageContext.QUERY_STRING {0} \uC55E\uC5D0\uB294 ''?''\uAC00 \uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ''?''\uB97C \uC81C\uAC70\uD55C \uD6C4 \uB2E4\uC2DC \uC2E4\uD589\uD558\uC2ED\uC2DC\uC624. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties new file mode 100644 index 00000000000..0c4d8ae967d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_pt_BR.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=Bind de SOAP/HTTP em {0} n\u00E3o permitido com um argumento de chamada nulo. Deve ser: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=N\u00E3o \u00E9 permitida uma solicita\u00E7\u00E3o de XML/HTTP usando MessageContext.HTTP_REQUEST_METHOD igual a {0} com um Argumento de Chamada Nulo. Deve ser: {1} +invalid.response=Nenhuma resposta retornada. +invalid.response.deserialization=Falha ao desserializar a resposta. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho de Service.Mode.PAYLOAD{0}. Deve ser: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho de {0}. Deve ser {1}. +invalid.datasource.dispatch.binding=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho com {0}. Deve ser: {1} +invalid.soapmessage.dispatch.binding=N\u00E3o \u00E9 poss\u00EDvel criar o Despacho com o Bind {0}. Deve ser: Bind {1}. +invalid.query.string=N\u00E3o \u00E9 poss\u00EDvel resolver o endere\u00E7o do ponto final usando a string de consulta fornecida: {0} +invalid.uri.path.query=N\u00E3o \u00E9 poss\u00EDvel construir um URI com estas informa\u00E7\u00F5es de caminho {0} e esta string de consulta {1}. +invalid.uri=String do Ponto Final: {0} \u00E9 um URI inv\u00E1lido. +invalid.uri.decode=N\u00E3o \u00E9 poss\u00EDvel decodificar o ponto final resolvido usando a codifica\u00E7\u00E3o UTF-8. +invalid.uri.resolution=N\u00E3o \u00E9 poss\u00EDvel resolver o endere\u00E7o do ponto final usando o caminho fornecido: {0} +duplicate.port=WSDLPort {0} j\u00E1 existe. N\u00E3o \u00E9 poss\u00EDvel criar uma porta com o mesmo QName. +invalid.query.leading.char=''?'' \u00E0 esquerda de MessageContext.QUERY_STRING: {0} n\u00E3o \u00E9 v\u00E1lida. Remover ''?'' e executar novamente. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties new file mode 100644 index 00000000000..daf3632b71b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_CN.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode=\u4E0D\u5141\u8BB8\u5BF9{0}\u4E2D\u7684 SOAP/HTTP \u7ED1\u5B9A\u4F7F\u7528\u7A7A\u8C03\u7528\u53C2\u6570\u3002\u5FC5\u987B\u4E3A: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=\u4E0D\u5141\u8BB8 XML/HTTP \u8BF7\u6C42\u4F7F\u7528\u201CMessageContext.HTTP_REQUEST_METHOD = {0}\u201D\u5E76\u4E14\u5177\u6709\u7A7A\u8C03\u7528\u53C2\u6570\u3002\u5FC5\u987B\u4E3A: {1} +invalid.response=\u672A\u8FD4\u56DE\u54CD\u5E94\u3002 +invalid.response.deserialization=\u65E0\u6CD5\u53CD\u5E8F\u5217\u5316\u54CD\u5E94\u3002 +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=\u65E0\u6CD5\u521B\u5EFA Service.Mode.PAYLOAD{0} \u7684 Dispatch\u3002\u5FC5\u987B\u4E3A: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=\u65E0\u6CD5\u521B\u5EFA{0}\u7684 Dispatch\u3002\u5FC5\u987B\u4E3A{1}\u3002 +invalid.datasource.dispatch.binding=\u65E0\u6CD5\u4F7F\u7528{0}\u521B\u5EFA Dispatch\u3002\u5FC5\u987B\u4E3A: {1} +invalid.soapmessage.dispatch.binding=\u65E0\u6CD5\u4F7F\u7528{0}\u7ED1\u5B9A\u521B\u5EFA Dispatch\u3002\u5FC5\u987B\u4E3A: {1}\u7ED1\u5B9A\u3002 +invalid.query.string=\u65E0\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u67E5\u8BE2\u5B57\u7B26\u4E32\u89E3\u6790\u7AEF\u70B9\u5730\u5740: {0}\u3002 +invalid.uri.path.query=\u65E0\u6CD5\u4F7F\u7528\u6B64\u8DEF\u5F84\u4FE1\u606F{0}\u548C\u6B64\u67E5\u8BE2\u5B57\u7B26\u4E32{1}\u6784\u9020 URI\u3002 +invalid.uri=\u7AEF\u70B9\u5B57\u7B26\u4E32{0}\u662F\u65E0\u6548\u7684 URI\u3002 +invalid.uri.decode=\u65E0\u6CD5\u4F7F\u7528 UTF-8 \u7F16\u7801\u5BF9\u89E3\u6790\u7684\u7AEF\u70B9\u8FDB\u884C\u89E3\u7801\u3002 +invalid.uri.resolution=\u65E0\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u8DEF\u5F84\u89E3\u6790\u7AEF\u70B9\u5730\u5740: {0}\u3002 +duplicate.port=WSDLPort {0} \u5DF2\u5B58\u5728\u3002\u65E0\u6CD5\u521B\u5EFA QName \u76F8\u540C\u7684\u7AEF\u53E3\u3002 +invalid.query.leading.char=MessageContext.QUERY_STRING {0}\u7684\u524D\u5BFC ''?'' \u65E0\u6548\u3002\u8BF7\u5220\u9664 ''?'' \u5E76\u91CD\u65B0\u8FD0\u884C\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties new file mode 100644 index 00000000000..5eb2bd0e0b8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/dispatch_zh_TW.properties @@ -0,0 +1,43 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +invalid.nullarg.soap.msgmode={0} \u4E2D\u7684 SOAP/HTTP \u9023\u7D50\u4E0D\u5141\u8A31\u7A7A\u503C\u7684\u547C\u53EB\u5F15\u6578. \u5FC5\u9808\u70BA: {1} +# {0}, {1} - one of: POST, GET, DELETE PUT e.g.: A XML/HTTP request using MessageContext.HTTP_REQUEST_METHOD equals POST with a Null invocation Argument is not allowed. Must be: GET +invalid.nullarg.xmlhttp.request.method=\u4F7F\u7528 MessageContext.HTTP_REQUEST_METHOD \u7B49\u65BC {0} \u7684 XML/HTTP \u8981\u6C42, \u4E0D\u5F97\u6709\u7A7A\u503C\u7684\u547C\u53EB\u5F15\u6578. \u5FC5\u9808\u70BA: {1} +invalid.response=\u672A\u50B3\u56DE\u4EFB\u4F55\u56DE\u61C9. +invalid.response.deserialization=\u7121\u6CD5\u53D6\u6D88\u5E8F\u5217\u5316\u56DE\u61C9. +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.datasource.dispatch.msgmode=\u7121\u6CD5\u5EFA\u7ACB Service.Mode.PAYLOAD{0} \u7684 Dispatch. \u5FC5\u9808\u70BA: {1} +# {0} - "PAYLOAD", {1} - "MESSAGE" +invalid.soapmessage.dispatch.msgmode=\u7121\u6CD5\u5EFA\u7ACB {0} \u7684 Dispatch. \u5FC5\u9808\u70BA {1}. +invalid.datasource.dispatch.binding=\u7121\u6CD5\u5EFA\u7ACB\u542B\u6709 {0} \u7684 Dispatch. \u5FC5\u9808\u70BA: {1} +invalid.soapmessage.dispatch.binding=\u7121\u6CD5\u5EFA\u7ACB\u542B\u6709 {0} \u9023\u7D50\u7684 Dispatch. \u5FC5\u9808\u70BA: {1} \u9023\u7D50. +invalid.query.string=\u7121\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u67E5\u8A62\u5B57\u4E32\u89E3\u6790\u7AEF\u9EDE\u4F4D\u5740: {0}. +invalid.uri.path.query=\u7121\u6CD5\u4F7F\u7528\u6B64\u8DEF\u5F91\u8CC7\u8A0A {0} \u8207\u6B64\u67E5\u8A62\u5B57\u4E32 {1} \u4F86\u5EFA\u69CB URI. +invalid.uri=\u7AEF\u9EDE\u5B57\u4E32: {0} \u662F\u7121\u6548\u7684 URI. +invalid.uri.decode=\u7121\u6CD5\u4F7F\u7528 UTF-8 \u7DE8\u78BC\u4F86\u89E3\u78BC\u89E3\u6790\u7684\u7AEF\u9EDE. +invalid.uri.resolution=\u7121\u6CD5\u4F7F\u7528\u63D0\u4F9B\u7684\u8DEF\u5F91\u89E3\u6790\u7AEF\u9EDE\u4F4D\u5740: {0}. +duplicate.port=WSDLPort {0} \u5DF2\u5B58\u5728. \u7121\u6CD5\u5EFA\u7ACB\u76F8\u540C QName \u7684\u9023\u63A5\u57E0. +invalid.query.leading.char=MessageContext.QUERY_STRING: {0} \u524D\u7AEF\u7684 ''?'' \u7121\u6548. \u8ACB\u79FB\u9664 ''?'' \u5F8C\u518D\u6B21\u57F7\u884C. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties index 0fe624dedab..f002d244042 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties new file mode 100644 index 00000000000..827a66eba70 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_de.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=Serialisierungsfehler: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=Deserialisierungsfehler: {0} +nestedEncodingError=Codierungsfehler: {0} + +noSuchContentId=Es ist kein Anhang f\u00FCr diese Content-ID "{0}" vorhanden + +#EncoderDecoder +exception.notfound=Ausnahmeklasse: {0} im Modell nicht gefunden. +exception.incorrectType=ung\u00FCltiger Typ. Java.lang.Exception wurde erwartet, {0} gefunden +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=unbekanntes Pr\u00E4fix ''{0}'' +xsd.unexpectedElementName=Unerwarteter Elementname: erwartet={0}, tats\u00E4chlich={1} + +failed.to.read.response=Eine Antwort konnte nicht gelesen werden: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties new file mode 100644 index 00000000000..badbf0a48ee --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_es.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=error de serializaci\u00F3n: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=error de anulaci\u00F3n de serializaci\u00F3n: {0} +nestedEncodingError=error de codificaci\u00F3n: {0} + +noSuchContentId=No hay ning\u00FAn anexo para el identificador de contenido "{0}" + +#EncoderDecoder +exception.notfound=la clase de excepci\u00F3n: {0} no se ha encontrado en el modelo. +exception.incorrectType=tipo incorrecto. Se esperaba java.lang.Exception, pero se ha encontrado {0} +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=prefijo desconocido \"{0}\" +xsd.unexpectedElementName=nombre de elemento inesperado: se esperaba={0}, valor real:{1} + +failed.to.read.response=Fallo al leer una respuesta: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties new file mode 100644 index 00000000000..37b14eb778e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_fr.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=erreur de s\u00E9rialisation : {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=erreur de d\u00E9s\u00E9rialisation : {0} +nestedEncodingError=erreur d''encodage : {0} + +noSuchContentId=Il n''existe aucune pi\u00E8ce jointe pour l''ID de contenu "{0}" + +#EncoderDecoder +exception.notfound=classe d''exception {0} introuvable dans le mod\u00E8le. +exception.incorrectType=type incorrect. Exception java.lang.Exception attendue, {0} trouv\u00E9e +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=pr\u00E9fixe \"{0}\" inconnu +xsd.unexpectedElementName=nom d''\u00E9l\u00E9ment inattendu : attendu={0}, obtenu={1} + +failed.to.read.response=Echec de la lecture d''une r\u00E9ponse : {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties new file mode 100644 index 00000000000..da2c100b610 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_it.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=errore di serializzazione: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=errore di deserializzazione: {0} +nestedEncodingError=errore di codifica: {0} + +noSuchContentId=Non \u00E8 presente alcun allegato per l''ID contenuto "{0}" + +#EncoderDecoder +exception.notfound=classe di eccezione: {0} non trovato nel modello +exception.incorrectType=tipo errato. Previsto java.lang.Exception, trovato {0} +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=prefisso sconosciuto \"{0}\" +xsd.unexpectedElementName=nome elemento imprevisto: previsto={0}, effettivo: {1} + +failed.to.read.response=Lettura di una risposta non riuscita: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties new file mode 100644 index 00000000000..adc31fdfc8e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ja.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30E9\u30FC: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u30FB\u30A8\u30E9\u30FC: {0} +nestedEncodingError=\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u30FB\u30A8\u30E9\u30FC: {0} + +noSuchContentId=\u30B3\u30F3\u30C6\u30F3\u30C4ID "{0}"\u306E\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093 + +#EncoderDecoder +exception.notfound=\u4F8B\u5916\u30AF\u30E9\u30B9: {0}\u304C\u30E2\u30C7\u30EB\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +exception.incorrectType=\u4E0D\u6B63\u306A\u30BF\u30A4\u30D7\u3067\u3059\u3002java.lang.Exception\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{0}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=\u63A5\u982D\u8F9E\"{0}\"\u304C\u4E0D\u660E\u3067\u3059 +xsd.unexpectedElementName=\u4E88\u671F\u3057\u306A\u3044\u8981\u7D20\u540D: \u4E88\u671F={0}\u3001\u5B9F\u969B: {1} + +failed.to.read.response=\u30EC\u30B9\u30DD\u30F3\u30B9\u306E\u8AAD\u53D6\u308A\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties new file mode 100644 index 00000000000..0901727bb2e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_ko.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=\uC9C1\uB82C\uD654 \uC624\uB958: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=\uC9C1\uB82C\uD654 \uD574\uC81C \uC624\uB958: {0} +nestedEncodingError=\uC778\uCF54\uB529 \uC624\uB958: {0} + +noSuchContentId=\uCF58\uD150\uCE20 ID "{0}"\uC5D0 \uB300\uD55C \uCCA8\uBD80 \uD30C\uC77C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. + +#EncoderDecoder +exception.notfound=\uC608\uC678 \uC0AC\uD56D \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uBAA8\uB378\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! +exception.incorrectType=\uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. java.lang.Exception\uC774 \uD544\uC694\uD558\uC9C0\uB9CC {0}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=\"{0}\"\uC740(\uB294) \uC54C \uC218 \uC5C6\uB294 \uC811\uB450\uC5B4\uC785\uB2C8\uB2E4. +xsd.unexpectedElementName=\uC608\uC0C1\uCE58 \uC54A\uC740 \uC694\uC18C \uC774\uB984: {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +failed.to.read.response=\uC751\uB2F5 \uC77D\uAE30 \uC2E4\uD328: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties new file mode 100644 index 00000000000..790c99053f3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_pt_BR.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=erro de serializa\u00E7\u00E3o: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=erro de desserializa\u00E7\u00E3o: {0} +nestedEncodingError=erro de codifica\u00E7\u00E3o: {0} + +noSuchContentId=N\u00E3o h\u00E1 anexo para o ID de conte\u00FAdo "{0}" + +#EncoderDecoder +exception.notfound=classe de exce\u00E7\u00E3o {0} n\u00E3o encontrada no modelo! +exception.incorrectType=tipo incorreto. Esperava java.lang.Exception; encontrou {0} +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=prefixo desconhecido \"{0}\" +xsd.unexpectedElementName=nome do elemento inesperado: esperado={0}, real:{1} + +failed.to.read.response=Falha ao ler uma resposta: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties new file mode 100644 index 00000000000..c2677bf4484 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_CN.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=\u5E8F\u5217\u5316\u9519\u8BEF: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=\u53CD\u5E8F\u5217\u5316\u9519\u8BEF: {0} +nestedEncodingError=\u7F16\u7801\u9519\u8BEF: {0} + +noSuchContentId=\u6CA1\u6709\u5185\u5BB9 ID \u4E3A "{0}" \u7684\u9644\u4EF6 + +#EncoderDecoder +exception.notfound=\u5728\u6A21\u578B\u4E2D\u672A\u627E\u5230\u5F02\u5E38\u9519\u8BEF\u7C7B{0}! +exception.incorrectType=\u7C7B\u578B\u4E0D\u6B63\u786E\u3002\u5E94\u4E3A java.lang.Exception, \u4F46\u627E\u5230\u7684\u662F{0} +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=\u672A\u77E5\u7684\u524D\u7F00 \"{0}\" +xsd.unexpectedElementName=\u610F\u5916\u7684\u5143\u7D20\u540D: \u5E94\u4E3A{0}, \u5B9E\u9645\u4E3A{1} + +failed.to.read.response=\u65E0\u6CD5\u8BFB\u53D6\u54CD\u5E94: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties new file mode 100644 index 00000000000..ccc31c5441e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/encoding_zh_TW.properties @@ -0,0 +1,45 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +#nested +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedSerializationError=\u5E8F\u5217\u5316\u932F\u8AA4: {0} +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedDeserializationError=\u9084\u539F\u5E8F\u5217\u5316\u932F\u8AA4: {0} +nestedEncodingError=\u7DE8\u78BC\u932F\u8AA4: {0} + +noSuchContentId=\u5167\u5BB9 ID "{0}" \u6C92\u6709\u9644\u4EF6 + +#EncoderDecoder +exception.notfound=\u5728\u6A21\u578B\u4E2D\u627E\u4E0D\u5230\u7570\u5E38\u72C0\u6CC1\u985E\u5225: {0}! +exception.incorrectType=\u985E\u578B\u4E0D\u6B63\u78BA. \u9810\u671F\u70BA java.lang.Exception, \u767C\u73FE\u7684\u662F {0} +# Usage not found. TODO Remove +#incorrect.messageinfo=can't write object! unexpected type: {0} +# Usage not found. TODO Remove +#unknown.object=don\'t know how to write object: {0} +xsd.unknownPrefix=\u4E0D\u660E\u7684\u524D\u7F6E\u78BC \"{0}\" +xsd.unexpectedElementName=\u672A\u9810\u671F\u7684\u5143\u7D20\u540D\u7A31: \u9810\u671F\u70BA={0}, \u5BE6\u969B\u70BA: {1} + +failed.to.read.response=\u7121\u6CD5\u8B80\u53D6\u56DE\u61C9: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties index d99c1a354cf..260b417b218 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties new file mode 100644 index 00000000000..f6c1fcbe424 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_de.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=Handler-Fehler: {0} +handler.chain.contains.handler.only=Eine HandlerChain darf nur Handler-Instanzen enthalten: {0} +# {1} - exception message +cannot.instantiate.handler=Handler kann nicht instanziiert werden: {0}, Ursache: {1} +cannot.extend.handler.directly=Handler {0} muss LogicalHandler oder SOAPHandler implementieren. +# {0} - class name +handler.not.valid.type= {0} implementiert keine der Handler-Schnittstellen. +handler.messageContext.invalid.class= \"{0}\" ist kein zul\u00E4ssiger Wert f\u00FCr die Eigenschaft \"{1}\" +handler.predestroy.ignore=Ausnahme bei Aufruf von @PreDestroy-Methode des Handlers ignoriert: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties new file mode 100644 index 00000000000..d65a4d00917 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_es.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=error de manejador: {0} +handler.chain.contains.handler.only=HandlerChain s\u00F3lo puede contener instancias de manejador: {0} +# {1} - exception message +cannot.instantiate.handler=No se ha podido instanciar el manejador: {0} porque: {1} +cannot.extend.handler.directly=El manejador {0} debe implantar LogicalHandler o SOAPHandler. +# {0} - class name +handler.not.valid.type= {0} no implanta una de las interfaces del manejador. +handler.messageContext.invalid.class= \"{0}\" no es un valor permitido para la propiedad \"{1}\" +handler.predestroy.ignore=Se ha ignorado la excepci\u00F3n al llamar al m\u00E9todo @PreDestroy del manejador: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties new file mode 100644 index 00000000000..26721a7c05f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_fr.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=erreur de gestionnaire : {0} +handler.chain.contains.handler.only=HandlerChain ne peut contenir que des instances : {0} +# {1} - exception message +cannot.instantiate.handler=Impossible d''instancier le gestionnaire {0} car {1} +cannot.extend.handler.directly=Le gestionnaire {0} doit impl\u00E9menter LogicalHandler ou SOAPHandler. +# {0} - class name +handler.not.valid.type= {0} n''impl\u00E9mente aucune interface de gestionnaire. +handler.messageContext.invalid.class= \"{0}\" n''est pas une valeur autoris\u00E9e pour la propri\u00E9t\u00E9 \"{1}\" +handler.predestroy.ignore=Exception non prise en compte lors de l''appel de la m\u00E9thode @PreDestroy de gestionnaire : {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties new file mode 100644 index 00000000000..7b4c3b44618 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_it.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=errore dell''handler: {0} +handler.chain.contains.handler.only=Un HandlerChain pu\u00F2 contenere solo istanze di handler: {0} +# {1} - exception message +cannot.instantiate.handler=Impossibile creare un''istanza dell''handler {0} a causa di: {1} +cannot.extend.handler.directly=L''handler {0} deve implementare LogicalHandler o SOAPHandler. +# {0} - class name +handler.not.valid.type= {0} non implementa una delle interfacce dell''handler. +handler.messageContext.invalid.class= \"{0}\" non \u00E8 un valore consentito per la propriet\u00E0 \"{1}\" +handler.predestroy.ignore=Eccezione ignorata dal richiamo del metodo @PreDestroy dell''handler: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties new file mode 100644 index 00000000000..2d3561c1186 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ja.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=\u30CF\u30F3\u30C9\u30E9\u30FB\u30A8\u30E9\u30FC: {0} +handler.chain.contains.handler.only=HandlerChain\u306B\u542B\u3081\u3089\u308C\u308B\u306E\u306FHandler\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306E\u307F\u3067\u3059: {0} +# {1} - exception message +cannot.instantiate.handler=\u30CF\u30F3\u30C9\u30E9\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093: {0}\u3002\u7406\u7531: {1} +cannot.extend.handler.directly=\u30CF\u30F3\u30C9\u30E9{0}\u306FLogicalHandler\u307E\u305F\u306FSOAPHandler\u3092\u5B9F\u88C5\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +# {0} - class name +handler.not.valid.type= {0}\u306F\u3044\u305A\u308C\u304B\u306E\u30CF\u30F3\u30C9\u30E9\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u305B\u3093\u3002 +handler.messageContext.invalid.class= \"{0}\"\u306F\u3001\u30D7\u30ED\u30D1\u30C6\u30A3\"{1}\"\u306B\u8A31\u53EF\u3055\u308C\u305F\u5024\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +handler.predestroy.ignore=@PreDestroy\u30CF\u30F3\u30C9\u30E9\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u547C\u51FA\u3057\u304B\u3089\u306E\u4F8B\u5916\u304C\u7121\u8996\u3055\u308C\u307E\u3057\u305F: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties new file mode 100644 index 00000000000..3f4a31effc5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_ko.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=\uCC98\uB9AC\uAE30 \uC624\uB958: {0} +handler.chain.contains.handler.only=HandlerChain\uC740 \uCC98\uB9AC\uAE30 \uC778\uC2A4\uD134\uC2A4\uB9CC \uD3EC\uD568\uD560 \uC218 \uC788\uC74C: {0} +# {1} - exception message +cannot.instantiate.handler={0} \uCC98\uB9AC\uAE30\uB97C \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC6D0\uC778: {1} +cannot.extend.handler.directly={0} \uCC98\uB9AC\uAE30\uB294 LogicalHandler \uB610\uB294 SOAPHandler\uB97C \uAD6C\uD604\uD574\uC57C \uD569\uB2C8\uB2E4. +# {0} - class name +handler.not.valid.type= {0}\uC740(\uB294) \uCC98\uB9AC\uAE30 \uC778\uD130\uD398\uC774\uC2A4 \uC911 \uD558\uB098\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +handler.messageContext.invalid.class= \"{0}\"\uC740(\uB294) \"{1}\" \uC18D\uC131\uC5D0 \uB300\uD574 \uD5C8\uC6A9\uB418\uB294 \uAC12\uC774 \uC544\uB2D9\uB2C8\uB2E4. +handler.predestroy.ignore=\uD638\uCD9C\uD558\uB294 \uCC98\uB9AC\uAE30 @PreDestroy \uBA54\uC18C\uB4DC\uC5D0\uC11C \uC608\uC678 \uC0AC\uD56D\uC774 \uBB34\uC2DC\uB428: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties new file mode 100644 index 00000000000..a349dfea699 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_pt_BR.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=erro de handler: {0} +handler.chain.contains.handler.only=Uma HandlerChain somente pode conter inst\u00E2ncias de Handler: {0} +# {1} - exception message +cannot.instantiate.handler=N\u00E3o \u00E9 poss\u00EDvel instanciar o handler {0} em decorr\u00EAncia de {1} +cannot.extend.handler.directly=O handler {0} deve implementar LogicalHandler ou SOAPHandler. +# {0} - class name +handler.not.valid.type= {0} n\u00E3o implementa uma das interfaces do handler. +handler.messageContext.invalid.class= \"{0}\" n\u00E3o \u00E9 um valor permitido da propriedade \"{1}\" +handler.predestroy.ignore=Exce\u00E7\u00E3o ignorada do m\u00E9todo @PreDestroy do handler de chamada: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties new file mode 100644 index 00000000000..a9f11170be1 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_CN.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=\u5904\u7406\u7A0B\u5E8F\u9519\u8BEF: {0} +handler.chain.contains.handler.only=HandlerChain \u53EA\u80FD\u5305\u542B\u5904\u7406\u7A0B\u5E8F\u5B9E\u4F8B: {0} +# {1} - exception message +cannot.instantiate.handler=\u65E0\u6CD5\u5B9E\u4F8B\u5316\u5904\u7406\u7A0B\u5E8F: {0}, \u539F\u56E0\u662F: {1} +cannot.extend.handler.directly=\u5904\u7406\u7A0B\u5E8F{0}\u5FC5\u987B\u5B9E\u73B0 LogicalHandler \u6216 SOAPHandler\u3002 +# {0} - class name +handler.not.valid.type= {0}\u672A\u5B9E\u73B0\u5904\u7406\u7A0B\u5E8F\u63A5\u53E3\u4E4B\u4E00\u3002 +handler.messageContext.invalid.class= \"{0}\" \u4E0D\u662F\u5C5E\u6027 \"{1}\" \u7684\u5141\u8BB8\u503C +handler.predestroy.ignore=\u5728\u8C03\u7528\u5904\u7406\u7A0B\u5E8F @PreDestroy \u65B9\u6CD5\u671F\u95F4\u5FFD\u7565\u5F02\u5E38\u9519\u8BEF: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties new file mode 100644 index 00000000000..bcdabde4db9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/handler_zh_TW.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +handler.nestedError=\u8655\u7406\u7A0B\u5F0F\u932F\u8AA4: {0} +handler.chain.contains.handler.only=HandlerChain \u53EA\u80FD\u5305\u542B\u300C\u8655\u7406\u7A0B\u5F0F\u300D\u57F7\u884C\u8655\u7406: {0} +# {1} - exception message +cannot.instantiate.handler=\u7121\u6CD5\u5EFA\u7ACB\u8655\u7406\u7A0B\u5F0F: {0} \u56E0\u70BA: {1} +cannot.extend.handler.directly=\u8655\u7406\u7A0B\u5F0F {0} \u5FC5\u9808\u5BE6\u884C LogicalHandler \u6216 SOAPHandler. +# {0} - class name +handler.not.valid.type= {0} \u672A\u5BE6\u884C\u5176\u4E2D\u4E00\u500B\u8655\u7406\u7A0B\u5F0F\u4ECB\u9762. +handler.messageContext.invalid.class= \"{0}\" \u4E0D\u662F\u7279\u6027 \"{1}\" \u7684\u5141\u8A31\u503C +handler.predestroy.ignore=\u547C\u53EB\u8655\u7406\u7A0B\u5F0F @PreDestroy \u65B9\u6CD5: {0} \u7684\u7570\u5E38\u72C0\u6CC1\u5DF2\u5FFD\u7565 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties index e70ac4b776d..9ed1e92ebd1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties new file mode 100644 index 00000000000..58133cbcd9d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_de.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=HTTP-Methode kann nicht verarbeitet werden: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties new file mode 100644 index 00000000000..6d762bae090 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_es.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=No se puede manejar el m\u00E9todo HTTP: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties new file mode 100644 index 00000000000..09afaee3e5f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_fr.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=Impossible de g\u00E9rer la m\u00E9thode HTTP : {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties new file mode 100644 index 00000000000..94a6c7d511f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_it.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=Impossibile gestire il metodo HTTP: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties new file mode 100644 index 00000000000..0e187be0ec2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ja.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=HTTP\u30E1\u30BD\u30C3\u30C9: {0}\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties new file mode 100644 index 00000000000..b4bf24a6cb9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_ko.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=HTTP \uBA54\uC18C\uB4DC\uB97C \uCC98\uB9AC\uD560 \uC218 \uC5C6\uC74C: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties new file mode 100644 index 00000000000..4d9c0972370 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_pt_BR.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=N\u00E3o \u00E9 poss\u00EDvel tratar o m\u00E9todo HTTP: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties new file mode 100644 index 00000000000..afaf92e0d91 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_CN.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=\u65E0\u6CD5\u5904\u7406 HTTP \u65B9\u6CD5: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties new file mode 100644 index 00000000000..a14c98038ca --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/httpserver_zh_TW.properties @@ -0,0 +1,26 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +unexpected.http.method=\u7121\u6CD5\u8655\u7406 HTTP \u65B9\u6CD5: {0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties index 64dd5359e49..323d032a8ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties new file mode 100644 index 00000000000..1a4beefe3ff --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_de.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: Policy-Assertion {0} konnte nicht abgerufen werden. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: Policy-Assertion {0} in diesem Namespace erwartet. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: Policy-Assertion {0} muss ID-Attribut haben, wenn Management aktiviert ist. +WSM_1004_EXPECTED_XML_TAG=WSM1004: Tag <{0}> wurde erwartet, stattdessen wurde <{1}> gelesen. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: CommunicationServerImplementation-Tag wurde als untergeordneter Knoten von CommunicationServerImplementations erwartet. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: Die Managementeigenschaft der ManagedClient Policy-Assertion ist aktiviert. Clients k\u00F6nnen nicht verwaltet werden, und diese Einstellung wird ignoriert. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: ModelTranslator-Instanz konnte nicht erstellt werden. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: Eine Ganzzahl wurde als Wert des Attributs endpointDisposeDelay erwartet, stattdessen wurde "{0}" erhalten. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties new file mode 100644 index 00000000000..0a7ba98ba76 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_es.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: fallo al obtener la afirmaci\u00F3n de pol\u00EDtica {0}. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: afirmaci\u00F3n de pol\u00EDtica esperada {0} en este espacio de nombres. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: la afirmaci\u00F3n de pol\u00EDtica {0} debe tener un atributo de identificador si la gesti\u00F3n est\u00E1 activada. +WSM_1004_EXPECTED_XML_TAG=WSM1004: se esperaba la etiqueta <{0}>, pero se ha le\u00EDdo <{1}>. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: se esperaba encontrar una etiqueta CommunicationServerImplementation como nodo secundario de CommunicationServerImplementations. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: la propiedad de gesti\u00F3n de la afirmaci\u00F3n de pol\u00EDtica ManagedClient est\u00E1 activada. Los clientes no se pueden gestionar y este valor se ignorar\u00E1. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: fallo al crear una instancia de ModelTranslator. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: se esperaba un entero como valor del atributo endpointDisposeDelay, pero se ha obtenido esto: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties new file mode 100644 index 00000000000..1382d1a2597 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_fr.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001 : \u00E9chec de l''obtention de l''assertion de strat\u00E9gie {0}. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002 : assertion de strat\u00E9gie {0} attendue dans cet espace de noms. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003 : l''assertion de strat\u00E9gie {0} doit avoir un attribut d''ID lorsque la gestion est activ\u00E9e. +WSM_1004_EXPECTED_XML_TAG=WSM1004 : balise <{0}> attendue mais <{1}> lue \u00E0 la place. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005 : balise CommunicationServerImplementation attendue en tant que noeud enfant de CommunicationServerImplementations. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006 : la propri\u00E9t\u00E9 de gestion de l'assertion de strat\u00E9gie ManagedClient est activ\u00E9e. Les clients ne peuvent pas \u00EAtre g\u00E9r\u00E9s et ce param\u00E8tre ne sera pas pris en compte. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007 : impossible de cr\u00E9er une instance ModelTranslator. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008 : entier attendu en tant que valeur de l''attribut endpointDisposeDelay, obtention de "{0}" \u00E0 la place. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties new file mode 100644 index 00000000000..9cc306c617b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_it.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: Recupero dell''asserzione dei criteri non riuscito {0}. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: Asserzione dei criteri {0} previsto in questo spazio di nomi. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: L''asserzione dei criteri {0} deve avere un attributo ID quando \u00E8 abilitata la gestione. +WSM_1004_EXPECTED_XML_TAG=WSM1004: Prevista tag <{0}> ma letta invece <{1}>. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: Prevista una tag CommunicationServerImplementation come nodo figlio di CommunicationServerImplementations. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: La propriet\u00E0 di gestione dell'asserzione dei criteri ManagedClient \u00E8 impostata su attivo. I client non possono essere gestiti e questa impostazione verr\u00E0 ignorata. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: Creazione di un'istanza ModelTranslator non riuscita. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: Previsto un numero intero come valore dell''attributo endpointDisposeDelay, ottenuto invece: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties new file mode 100644 index 00000000000..20168ba4171 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ja.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: \u30DD\u30EA\u30B7\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3{0}\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \u3053\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u3067\u306F\u30DD\u30EA\u30B7\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3059\u3002 +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \u7BA1\u7406\u304C\u6709\u52B9\u3067\u3042\u308B\u5834\u5408\u3001\u30DD\u30B7\u30EA\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3{0}\u306B\u306Fid\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002 +WSM_1004_EXPECTED_XML_TAG=WSM1004: \u30BF\u30B0<{0}>\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u304B\u308F\u308A\u306B<{1}>\u3092\u8AAD\u307F\u53D6\u308A\u307E\u3059\u3002 +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: CommunicationServerImplementations\u306E\u5B50\u30CE\u30FC\u30C9\u3068\u3057\u3066CommunicationServerImplementation\u30BF\u30B0\u3092\u691C\u51FA\u3059\u308B\u3053\u3068\u304C\u4E88\u671F\u3055\u308C\u307E\u3059\u3002 +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient\u30DD\u30EA\u30B7\u30FC\u30FB\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u306E\u7BA1\u7406\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u30AA\u30F3\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306F\u7BA1\u7406\u3067\u304D\u305A\u3001\u3053\u306E\u8A2D\u5B9A\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002 +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: ModelTranslator\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: endpointDisposeDelay\u5C5E\u6027\u306E\u5024\u3068\u3057\u3066\u6574\u6570\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u304B\u308F\u308A\u306B\u6B21\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F: "{0}"\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties new file mode 100644 index 00000000000..790bc622c35 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_ko.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: \uC815\uCC45 \uBA85\uC81C {0} \uAC00\uC838\uC624\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \uC774 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 \uC815\uCC45 \uBA85\uC81C {0}\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \uAD00\uB9AC\uAC00 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uC815\uCC45 \uBA85\uC81C {0}\uC5D0 ID \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. +WSM_1004_EXPECTED_XML_TAG=WSM1004: <{0}> \uD0DC\uADF8\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uB300\uC2E0 <{1}>\uC744(\uB97C) \uC77D\uC5C8\uC2B5\uB2C8\uB2E4. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: CommunicationServerImplementations\uC758 \uD558\uC704 \uB178\uB4DC\uB85C CommunicationServerImplementation \uD0DC\uADF8\uB97C \uCC3E\uC544\uC57C \uD569\uB2C8\uB2E4. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient \uC815\uCC45 \uBA85\uC81C\uC758 management \uC18D\uC131\uC774 on\uC73C\uB85C \uC124\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD074\uB77C\uC774\uC5B8\uD2B8\uB97C \uAD00\uB9AC\uD560 \uC218 \uC5C6\uC73C\uBA70 \uC774 \uC124\uC815\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: ModelTranslator \uC778\uC2A4\uD134\uC2A4 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: endpointDisposeDelay \uC18D\uC131\uAC12\uC73C\uB85C \uC815\uC218\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC \uB300\uC2E0 "{0}"\uC744(\uB97C) \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties new file mode 100644 index 00000000000..7d91849b71a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_pt_BR.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: falha ao obter a asser\u00E7\u00E3o da pol\u00EDtica {0}. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: era esperada a asser\u00E7\u00E3o da pol\u00EDtica {0} neste namespace. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: a asser\u00E7\u00E3o {0} da pol\u00EDtica dever\u00E1 ter o atributo do id quando o gerenciamento estiver ativado. +WSM_1004_EXPECTED_XML_TAG=WSM1004: esperada a tag <{0}> mas, leu <{1}>. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: esperava localizar uma tag CommunicationServerImplementation como n\u00F3 do filho de CommunicationServerImplementations. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: a propriedade de gerenciamento da asser\u00E7\u00E3o da pol\u00EDtica ManagedClient foi definida como ativada. Os clientes n\u00E3o podem ser gerenciados e esta defini\u00E7\u00E3o ser\u00E1 ignorada. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: falha ao criar uma inst\u00E2ncia ModelTranslator. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: esperava um n\u00FAmero inteiro como valor do atributo endpointDisposeDelay, mas obteve: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties new file mode 100644 index 00000000000..96a791cfc80 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_CN.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: \u65E0\u6CD5\u83B7\u53D6\u7B56\u7565\u65AD\u8A00{0}\u3002 +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \u6B64\u540D\u79F0\u7A7A\u95F4\u4E2D\u5E94\u6709\u7B56\u7565\u65AD\u8A00{0}\u3002 +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \u542F\u7528\u7BA1\u7406\u65F6\u7B56\u7565\u65AD\u8A00{0}\u5FC5\u987B\u5177\u6709 ID \u5C5E\u6027\u3002 +WSM_1004_EXPECTED_XML_TAG=WSM1004: \u5E94\u4E3A\u6807\u8BB0 <{0}> \u800C\u663E\u793A\u7684\u662F <{1}>\u3002 +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: \u5E94\u627E\u5230 CommunicationServerImplementation \u6807\u8BB0\u4F5C\u4E3A CommunicationServerImplementations \u7684\u5B50\u8282\u70B9\u3002 +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient \u7B56\u7565\u65AD\u8A00\u7684\u7BA1\u7406\u5C5E\u6027\u8BBE\u7F6E\u4E3A\u542F\u7528\u3002\u65E0\u6CD5\u7BA1\u7406\u5BA2\u6237\u673A, \u5C06\u5FFD\u7565\u6B64\u8BBE\u7F6E\u3002 +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: \u65E0\u6CD5\u521B\u5EFA ModelTranslator \u5B9E\u4F8B\u3002 +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: endpointDisposeDelay \u5C5E\u6027\u7684\u503C\u5E94\u4E3A\u6574\u6570, \u800C\u5F97\u5230\u7684\u503C\u4E3A: "{0}"\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties new file mode 100644 index 00000000000..fbd910f10cb --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/management_zh_TW.properties @@ -0,0 +1,33 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSM_1001_FAILED_ASSERTION=WSM1001: \u7121\u6CD5\u53D6\u5F97\u539F\u5247\u5BA3\u544A {0}. +WSM_1002_EXPECTED_MANAGEMENT_ASSERTION=WSM1002: \u6B64\u547D\u540D\u7A7A\u9593\u4E2D\u9810\u671F\u61C9\u6709\u539F\u5247\u5BA3\u544A {0}. +WSM_1003_MANAGEMENT_ASSERTION_MISSING_ID=WSM1003: \u555F\u7528\u7BA1\u7406\u6642, \u539F\u5247\u5BA3\u544A {0} \u5FC5\u9808\u5305\u542B ID \u5C6C\u6027. +WSM_1004_EXPECTED_XML_TAG=WSM1004: \u9810\u671F\u70BA\u6A19\u8A18 <{0}>, \u4F46\u8B80\u5230\u7684\u662F <{1}>. +WSM_1005_EXPECTED_COMMUNICATION_CHILD=WSM1005: \u9810\u671F\u627E\u5230\u505A\u70BA CommunicationServerImplementations \u5B50\u7BC0\u9EDE\u7684 CommunicationServerImplementation \u6A19\u8A18. +WSM_1006_CLIENT_MANAGEMENT_ENABLED=WSM1006: ManagedClient \u539F\u5247\u5BA3\u544A\u7684\u7BA1\u7406\u7279\u6027\u8A2D\u70BA\u958B\u555F. \u7121\u6CD5\u7BA1\u7406\u5F9E\u5C6C\u7AEF, \u5C07\u5FFD\u7565\u6B64\u8A2D\u5B9A. +WSM_1007_FAILED_MODEL_TRANSLATOR_INSTANTIATION=WSM1007: \u7121\u6CD5\u5EFA\u7ACB ModelTranslator \u57F7\u884C\u8655\u7406. +WSM_1008_EXPECTED_INTEGER_DISPOSE_DELAY_VALUE=WSM1008: \u9810\u671F\u70BA\u6574\u6578\u7684 endpointDisposeDelay \u5C6C\u6027\u503C, \u4F46\u5F97\u5230\u7684\u662F: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties index 72419fa27a8..71854d9b280 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,10 @@ # Wrapped into an Exception. {0} - localizable exception message of another exception nestedModelerError=runtime modeler error: {0} +runtime.modeler.external.metadata.generic=An error occurred while processing external WS metadata; check configuration/deployment. Nested error: {0}. +runtime.modeler.external.metadata.unable.to.read=Unable to read metadata file {0}. Check configuration/deployment. +runtime.modeler.external.metadata.unsupported.schema=Unsupported metadata file schema {0}. Supported schemes are {1}. +runtime.modeler.external.metadata.wrong.format=Unable to read metadata from {0}. Is the format correct? runtime.modeler.no.webservice.annotation=A WebService annotation is not present on class: {0} runtime.modeler.endpoint.interface.no.webservice=The Endpoint Interface: {0} does not have WebService Annotation # Wrapped into an Exception. Not concatenated with any other string. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties new file mode 100644 index 00000000000..a55f0114e3b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_de.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=Runtime Modeler-Fehler: {0} + +runtime.modeler.no.webservice.annotation=Eine WebService-Annotation ist in Klasse nicht vorhanden: {0} +runtime.modeler.endpoint.interface.no.webservice=Die End Point-Schnittstelle: {0} hat keine WebService-Annotation +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=Klasse: {0} konnte nicht gefunden werden +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=Wrapper-Klasse {0} wurde nicht gefunden. Haben Sie eine Annotationsverarbeitung ausgef\u00FChrt, um sie zu generieren? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=Methode: {0} konnte in Klasse nicht gefunden werden: {1} +runtime.modeler.webmethod.must.be.public=@WebMethod ist bei einer nicht \u00F6ffentlichen Methode {0} nicht zul\u00E4ssig +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod ist bei einer statischen Methode {0} nicht zul\u00E4ssig +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod ist bei einer statischen oder finalen Methode {0} nicht zul\u00E4ssig +runtime.modeler.oneway.operation.no.out.parameters=Unidirektionaler Vorgang darf keine OUT-Parameterklasse enthalten: {0} Methode: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=Unidirektionaler Vorgang darf keine gepr\u00FCfte Ausnahmeklasse ausl\u00F6sen: {0}-Methode: {1} l\u00F6st {2} aus +runtime.modeler.cannot.get.serviceName.from.interface=Der serviceName darf nicht aus einer Schnittstelle abgerufen werden. Klasse {0} +runtime.modeler.portname.servicename.namespace.mismatch=Der Namespace von serviceName \\"{0}\\" und der Namespace von portName \\"{1}\\" m\u00FCssen \u00FCbereinstimmen +runtime.modeler.no.package=Ein @WebService.targetNamespace muss f\u00FCr Klassen ohne Package angegeben werden. Klasse: {0} +runtime.modeler.no.operations=Der Webservice, der von der Klasse {0} definiert wird, enth\u00E4lt keine g\u00FCltigen WebMethods. +runtime.modeler.mtom.conflict = Fehler bei @BindingType: MTOM-Konfiguration in Binding-ID {0} ist nicht mit Feature @MTOM {1} vereinbar +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= Feature {0} in Implementierung ist nicht mit {1} in WSDL-Konfiguration vereinbar +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API wird aus {0} geladen, die JAX-WS-Laufzeitumgebung erfordert jedoch JAX-WS 2.2 API. Verwenden Sie das "Endorsed Standards Override Mechanism"-Verfahren, um JAX-WS 2.2 API zu laden +runtime.modeler.wsfeature.no.ftrconstructor=Annotation {0} kann nicht erkannt werden, mindestens ein Konstruktor von {1} muss mit @FeatureConstructor markiert werden +runtime.modeler.wsfeature.morethanone.ftrconstructor=Annotation {0} ist unzul\u00E4ssig. Nur ein Konstruktor von {1} kann als @FeatureConstructor markiert werden +runtime.modeler.wsfeature.illegal.ftrconstructor=Annotation {0} ist unzul\u00E4ssig. In {1} stimmt der @FeatureConstructor-Wert nicht mit den Konstruktorparametern \u00FCberein +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= Ung\u00FCltige Verwendung von Annotation {0} in {1}, ParameterStyle kann nur WRAPPED bei RPC-Webservice sein. +runtime.modeler.soapbinding.conflict= SOAPBinding-Stil {0} f\u00FCr Methode {1} ist nicht mit globalem SOAPBinding-Stil {2} vereinbar +runtimemodeler.invalid.soapbindingOnMethod=Ung\u00FCltige Annotation: {0} in Methode {1} in Klasse {2}. Eine Methode kann nicht mit @SOAPBinding-Annotation mit \\"RPC\\"-Stil versehen werden +unable.to.create.JAXBContext=JAXBContext kann nicht erstellt werden +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0} enth\u00E4lt Methode {1} mit Annotation BARE, enth\u00E4lt jedoch mehr als einen Parameter, der an den Nachrichtentext gebunden ist. Dies ist ung\u00FCltig. Versehen Sie die Methode mit folgender Annotation: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties new file mode 100644 index 00000000000..e0f2a8d5ee5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_es.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=error de modelador en tiempo de ejecuci\u00F3n: {0} + +runtime.modeler.no.webservice.annotation=No existe una anotaci\u00F3n de WebService en la clase: {0} +runtime.modeler.endpoint.interface.no.webservice=La interfaz de punto final: {0} no tiene una anotaci\u00F3n de WebService +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=No se ha encontrado la clase: {0}. +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=No se ha encontrado la clase de envoltorio {0}. \u00BFHa ejecutado la herramienta de procesamiento de anotaciones para generarlas? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=No se ha encontrado el m\u00E9todo {0} en la clase {1}. +runtime.modeler.webmethod.must.be.public=@WebMethod no est\u00E1 permitido en un m\u00E9todo no p\u00FAblico {0} +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod no est\u00E1 permitido en un m\u00E9todo est\u00E1tico {0} +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod no est\u00E1 permitido en un m\u00E9todo est\u00E1tico o final {0} +runtime.modeler.oneway.operation.no.out.parameters=la operaci\u00F3n unidireccional no deber\u00EDa tener la clase de par\u00E1metros OUT: {0} m\u00E9todo: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=La operaci\u00F3n unidireccional no deber\u00EDa devolver ninguna clase de excepci\u00F3n comprobada: {0} m\u00E9todo: {1} devuelve: {2} +runtime.modeler.cannot.get.serviceName.from.interface=No se puede recuperar el elemento serviceName de una interfaz. Clase {0} +runtime.modeler.portname.servicename.namespace.mismatch=El espacio de nombres de serviceName \\"{0}\\" debe coincidir con el espacio de nombres de portName \\"{1}\\" +runtime.modeler.no.package=Se debe especificar @WebService.targetNamespace en las clases sin paquete. Clase: {0} +runtime.modeler.no.operations=El servicio web definido por la clase {0} no contiene ning\u00FAn m\u00E9todo web v\u00E1lido. +runtime.modeler.mtom.conflict = Error en @BindingType: la configuraci\u00F3n de MTOM del identificador de enlace {0} entra en conflicto con la funci\u00F3n @MTOM {1} +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= La funci\u00F3n {0} de la implantaci\u00F3n entra en conflicto con {1} en la configuraci\u00F3n de WSDL +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = La API de JAX-WS 2.1 se ha cargado desde {0}, pero JAX-WS en tiempo de ejecuci\u00F3n necesita la API JAX-WS 2.2. Utilice el mecanismo de sustituci\u00F3n de est\u00E1ndares aprobado para cargar la API JAX-WS 2.2 +runtime.modeler.wsfeature.no.ftrconstructor=La anotaci\u00F3n {0} no es reconocible. Al menos un constructor de {1} se deber\u00EDa marcar con @FeatureConstructor +runtime.modeler.wsfeature.morethanone.ftrconstructor=La anotaci\u00F3n {0} no es v\u00E1lida. S\u00F3lo un constructor de {1} se puede marcar como @FeatureConstructor +runtime.modeler.wsfeature.illegal.ftrconstructor=La anotaci\u00F3n {0} no es v\u00E1lida. En {1}, el valor de @FeatureConstructor no coincide con los par\u00E1metros del constructor +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= Uso incorrecto de la anotaci\u00F3n {0} en {1}. ParameterStyle s\u00F3lo puede ser WRAPPED con el servicio web de estilo RPC. +runtime.modeler.soapbinding.conflict= El estilo SOAPBinding {0} del m\u00E9todo {1} entra en conflicto con el estilo SOAPBinding global {2} +runtimemodeler.invalid.soapbindingOnMethod=Anotaci\u00F3n no v\u00E1lida: {0} en el m\u00E9todo {1} de la clase {2}. No se puede anotar un m\u00E9todo con @SOAPBinding con el estilo \\"RPC\\" +unable.to.create.JAXBContext=No se ha podido crear JAXBContext. +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=La interfaz de punto final de servicio {0} tiene anotado el m\u00E9todo {1} como BARE, pero tiene m\u00E1s de un par\u00E1metro enlazado al cuerpo. Esto no es v\u00E1lido. Anote el m\u00E9todo con la anotaci\u00F3n: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties new file mode 100644 index 00000000000..4bbbe0604ed --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_fr.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=erreur de modeleur d''ex\u00E9cution : {0} + +runtime.modeler.no.webservice.annotation=Aucune annotation WebService ne figure sur la classe {0} +runtime.modeler.endpoint.interface.no.webservice=L''interface d''adresse {0} ne comporte aucune annotation WebService +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=la classe {0} est introuvable +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=La classe de wrapper {0} est introuvable. Avez-vous ex\u00E9cut\u00E9 le traitement d''annotation pour la g\u00E9n\u00E9rer ? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=la m\u00E9thode {0} est introuvable sur la classe {1} +runtime.modeler.webmethod.must.be.public=@WebMethod n''est pas autoris\u00E9e sur une m\u00E9thode d''un type autre que public {0} +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod n''est pas autoris\u00E9e sur une m\u00E9thode de type static {0} +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod n''est pas autoris\u00E9e sur une m\u00E9thode de type static ou final {0} +runtime.modeler.oneway.operation.no.out.parameters=une op\u00E9ration unidirectionnelle ne doit pas comporter une classe de param\u00E8tres OUT : {0} m\u00E9thode : {1} +runtime.modeler.oneway.operation.no.checked.exceptions=L''op\u00E9ration unidirectionnelle ne doit g\u00E9n\u00E9rer aucune classe d''exceptions contr\u00F4l\u00E9es : {0}. La m\u00E9thode {1} g\u00E9n\u00E8re {2} +runtime.modeler.cannot.get.serviceName.from.interface=L''\u00E9l\u00E9ment serviceName ne peut pas \u00EAtre extrait d''une interface. Classe : {0} +runtime.modeler.portname.servicename.namespace.mismatch=Les espaces de noms de l''\u00E9l\u00E9ment serviceName \"{0}\" et de l''\u00E9l\u00E9ment portName \"{1}\" doivent correspondre +runtime.modeler.no.package=Une annotation @WebService.targetNamespace doit \u00EAtre indiqu\u00E9e sur les classes sans package. Classe : {0} +runtime.modeler.no.operations=Le service Web d\u00E9fini par la classe {0} ne contient aucun \u00E9l\u00E9ment WebMethod valide. +runtime.modeler.mtom.conflict = Erreur dans @BindingType : la configuration MTOM dans l''identificateur de binding {0} est en conflit avec la fonctionnalit\u00E9 @MTOM {1} +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= La fonctionnalit\u00E9 {0} dans l''impl\u00E9mentation est en conflit avec {1} dans la configuration WSDL +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 est charg\u00E9 \u00E0 partir de {0}, mais le runtime JAX-WS exige l''API JAX-WS 2.2. Utilisez le m\u00E9canisme Endorsed Standards Override Mechanism pour charger l''API JAX-WS 2.2 +runtime.modeler.wsfeature.no.ftrconstructor=L''annotation {0} n''est pas reconnaissable, au moins un constructeur de {1} doit \u00EAtre marqu\u00E9 avec @FeatureConstructor +runtime.modeler.wsfeature.morethanone.ftrconstructor=L''annotation {0} est interdite, seul un constructeur de {1} peut \u00EAtre marqu\u00E9 comme @FeatureConstructor +runtime.modeler.wsfeature.illegal.ftrconstructor=L''annotation {0} est interdite ; dans {1}, la valeur @FeatureConstructor ne correspond pas aux param\u00E8tres constructeur +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= Syntaxe incorrecte de l''annotation {0} sur {1}, ParameterStyle ne peut \u00EAtre que WRAPPED avec le service Web de style RPC. +runtime.modeler.soapbinding.conflict= Le style SOAPBinding {0} de la m\u00E9thode {1} est en conflit avec le style SOAPBinding {2} global +runtimemodeler.invalid.soapbindingOnMethod=Annotation {0} non valide sur la m\u00E9thode {1} dans la classe {2}, une m\u00E9thode ne peut pas \u00EAtre annot\u00E9e avec @SOAPBinding avec le style \"RPC\" +unable.to.create.JAXBContext=Impossible de cr\u00E9er JAXBContext +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=L''interface d''adresse de service {0} comporte la m\u00E9thode {1} qui est annot\u00E9e comme \u00E9tant BARE mais contient plus d''un param\u00E8tre li\u00E9 au corps. Cela n''est pas valide. Annotez la m\u00E9thode comme suit : @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties new file mode 100644 index 00000000000..6efd0ed88f6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_it.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=errore del modeler di runtime: {0} + +runtime.modeler.no.webservice.annotation=Annotazione WebService non presente sulla classe: {0} +runtime.modeler.endpoint.interface.no.webservice=L''interfaccia Endpoint: {0} non dispone dell''annotazione WebService +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=impossibile trovare la classe: {0} +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=Classe wrapper {0} non trovata. \u00C8 stata eseguita l''elaborazione dell''annotazione per generarla? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=impossibile trovare il metodo: {0} sulla classe: {1} +runtime.modeler.webmethod.must.be.public=@WebMethod non \u00E8 consentito su un metodo non pubblico {0} +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod non \u00E8 consentito su un metodo statico {0} +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod non \u00E8 consentito su un metodo statico o finale {0} +runtime.modeler.oneway.operation.no.out.parameters=l''operazione unidirezionale non deve avere parametri OUT. Classe: {0} metodo: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=L''operazione unidirezionale non deve restituire eccezioni verificate. Classe: {0} metodo: {1} restituzioni: {2} +runtime.modeler.cannot.get.serviceName.from.interface=Impossibile recuperare il serviceName da un''interfaccia. Classe {0} +runtime.modeler.portname.servicename.namespace.mismatch=Lo spazio di nomi del serviceName \"{0}\" e quello del portName \"{1}\" devono corrispondere +runtime.modeler.no.package=\u00C8 necessario specificare un @WebService.targetNamespace sulle classi senza package. Classe: {0} +runtime.modeler.no.operations=Il servizio Web definito dalla classe {0} non contiene alcun WebMethods valido. +runtime.modeler.mtom.conflict = Errore in @BindingType: la configurazione MTOM nell''identificativo di associazione {0} \u00E8 in conflitto con la funzione @MTOM {1} +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= La funzione {0} nell''implementazione \u00E8 in conflitto con {1} nella configurazione WSDL +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = L''API JAX-WS 2.1 viene caricata da {0} ma il runtime JAX-WS richiede l''API JAX-WS 2.2. Usare il meccanismo Endorsed Standards Override Mechanism per caricare l''API JAX-WS 2.2 +runtime.modeler.wsfeature.no.ftrconstructor=L''annotazione {0} non \u00E8 riconoscibile. Almeno un costruttore di {1} deve essere contrassegnato con @FeatureConstructor +runtime.modeler.wsfeature.morethanone.ftrconstructor=L''annotazione {0} non \u00E8 valida. Solo un costruttore di {1} pu\u00F2 essere contrassegnato come @FeatureConstructor +runtime.modeler.wsfeature.illegal.ftrconstructor=L''annotazione {0} non \u00E8 valida. Il valore {1} @FeatureConstructor non corrisponde ai parametri del costruttore +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= Uso errato dell''annotazione {0} su {1}. ParameterStyle pu\u00F2 essere solo WRAPPED con il servizio Web dello stile RPC. +runtime.modeler.soapbinding.conflict= Lo stile SOAPBinding {0} per il metodo {1} \u00E8 in conflitto con lo stile SOAPBinding globale {2} +runtimemodeler.invalid.soapbindingOnMethod=Annotazione non valida: {0} sul metodo {1} nella classe {2}. Un metodo non pu\u00F2 essere annotato con @SOAPBinding con lo stile \"RPC\" +unable.to.create.JAXBContext=Impossibile creare JAXBContext +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0} ha il metodo {1} annotato come BARE ma ha pi\u00F9 parametri associati al corpo. Questo non \u00E8 valido. Annotare il metodo con l''annotazione: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties new file mode 100644 index 00000000000..21c0c5c11e4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ja.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=\u5B9F\u884C\u6642\u30E2\u30C7\u30E9\u30FC\u30FB\u30A8\u30E9\u30FC: {0} + +runtime.modeler.no.webservice.annotation=WebService\u6CE8\u91C8\u304C\u30AF\u30E9\u30B9: {0}\u306B\u5B58\u5728\u3057\u307E\u305B\u3093 +runtime.modeler.endpoint.interface.no.webservice=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: {0}\u306BWebService\u6CE8\u91C8\u304C\u3042\u308A\u307E\u305B\u3093 +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=\u30AF\u30E9\u30B9: {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=\u30E9\u30C3\u30D1\u30FC\u30FB\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u30E9\u30C3\u30D1\u30FC\u30FB\u30AF\u30E9\u30B9\u3092\u751F\u6210\u3059\u308B\u305F\u3081\u306E\u6CE8\u91C8\u51E6\u7406\u3092\u5B9F\u884C\u3057\u307E\u3057\u305F\u304B\u3002 +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=\u30E1\u30BD\u30C3\u30C9: {0}\u304C\u30AF\u30E9\u30B9: {1}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F +runtime.modeler.webmethod.must.be.public=@WebMethod\u306Fpublic\u4EE5\u5916\u306E\u30E1\u30BD\u30C3\u30C9{0}\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod\u306Fstatic\u30E1\u30BD\u30C3\u30C9{0}\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod\u306Fstatic\u307E\u305F\u306Ffinal\u30E1\u30BD\u30C3\u30C9{0}\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 +runtime.modeler.oneway.operation.no.out.parameters=\u4E00\u65B9\u5411\u64CD\u4F5C\u306B\u306FOUT\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=\u4E00\u65B9\u5411\u64CD\u4F5C\u306F\u78BA\u8A8D\u6E08\u4F8B\u5916\u3092\u30B9\u30ED\u30FC\u3057\u306A\u3044\u3088\u3046\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30AF\u30E9\u30B9: {0}\u3001\u30E1\u30BD\u30C3\u30C9: {1}\u3001\u30B9\u30ED\u30FC: {2} +runtime.modeler.cannot.get.serviceName.from.interface=serviceName\u3092\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3002\u30AF\u30E9\u30B9{0} +runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u304A\u3088\u3073portName \"{1}\"\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306F\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +runtime.modeler.no.package=@WebService.targetNamespace\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306A\u3057\u306E\u30AF\u30E9\u30B9\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30AF\u30E9\u30B9: {0} +runtime.modeler.no.operations=\u30AF\u30E9\u30B9{0}\u306B\u3088\u308A\u5B9A\u7FA9\u3055\u308C\u305FWeb\u30B5\u30FC\u30D3\u30B9\u306B\u306F\u3001\u6709\u52B9\u306AWebMethods\u304C\u542B\u307E\u308C\u307E\u305B\u3093\u3002 +runtime.modeler.mtom.conflict = @BindingType\u306E\u30A8\u30E9\u30FC: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u8B58\u5225\u5B50{0}\u306EMTOM\u69CB\u6210\u304C\u6A5F\u80FD@MTOM {1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= \u5B9F\u88C5\u306E\u6A5F\u80FD{0}\u304CWSDL\u69CB\u6210\u306E{1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\u306F{0}\u304B\u3089\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3059\u304C\u3001JAX-WS\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u306FJAX-WS 2.2 API\u304C\u5FC5\u8981\u3067\u3059\u3002JAX-WS 2.2 API\u3092\u30ED\u30FC\u30C9\u3059\u308B\u306B\u306F\u3001Endorsed Standards Override Mechanism\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044 +runtime.modeler.wsfeature.no.ftrconstructor=\u6CE8\u91C8{0}\u3092\u8A8D\u8B58\u3067\u304D\u307E\u305B\u3093\u3002{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u5C11\u306A\u304F\u3068\u30821\u3064\u304C@FeatureConstructor\u3067\u30DE\u30FC\u30AF\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +runtime.modeler.wsfeature.morethanone.ftrconstructor=\u6CE8\u91C8{0}\u304C\u4E0D\u6B63\u3067\u3059\u3002@FeatureConstructor\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3067\u304D\u308B{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306F\u30011\u3064\u306E\u307F\u3067\u3059 +runtime.modeler.wsfeature.illegal.ftrconstructor=\u6CE8\u91C8{0}\u304C\u4E0D\u6B63\u3067\u3059\u3002{1}\u3067\u3001@FeatureConstructor\u306E\u5024\u304C\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= {1}\u306B\u304A\u3051\u308B\u6CE8\u91C8{0}\u306E\u4F7F\u7528\u65B9\u6CD5\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002RPC\u30B9\u30BF\u30A4\u30EBWeb\u30B5\u30FC\u30D3\u30B9\u3067\u306F\u3001ParameterStyle\u306FWRAPPED\u306E\u307F\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002 +runtime.modeler.soapbinding.conflict= \u30E1\u30BD\u30C3\u30C9{1}\u306ESOAPBinding\u30B9\u30BF\u30A4\u30EB{0}\u304C\u30B0\u30ED\u30FC\u30D0\u30EBSOAPBinding\u30B9\u30BF\u30A4\u30EB{2}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 +runtimemodeler.invalid.soapbindingOnMethod=\u30AF\u30E9\u30B9{2}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306E\u6CE8\u91C8: {0}\u304C\u7121\u52B9\u3067\u3059\u3002\u30B9\u30BF\u30A4\u30EB\"RPC\"\u306E\u30E1\u30BD\u30C3\u30C9\u306F@SOAPBinding\u3067\u6CE8\u91C8\u3092\u4ED8\u3051\u3089\u308C\u307E\u305B\u3093 +unable.to.create.JAXBContext=JAXBContext\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0}\u306B\u306FBARE\u3068\u3057\u3066\u6CE8\u91C8\u304C\u4ED8\u3051\u3089\u308C\u305F\u30E1\u30BD\u30C3\u30C9{1}\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u8907\u6570\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u672C\u6587\u306B\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u306F\u7121\u52B9\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u306B\u6B21\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties new file mode 100644 index 00000000000..3041777a52c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_ko.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=\uB7F0\uD0C0\uC784 \uBAA8\uB378\uB7EC \uC624\uB958: {0} + +runtime.modeler.no.webservice.annotation=WebService \uC8FC\uC11D\uC774 \uD074\uB798\uC2A4\uC5D0 \uC5C6\uC74C: {0} +runtime.modeler.endpoint.interface.no.webservice=\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0 WebService \uC8FC\uC11D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found={0} \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=\uB798\uD37C \uD074\uB798\uC2A4 {0}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC11D \uCC98\uB9AC\uB97C \uC2E4\uD589\uD558\uC5EC \uC0DD\uC131\uD588\uC2B5\uB2C8\uAE4C? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found={0} \uBA54\uC18C\uB4DC\uB97C \uD074\uB798\uC2A4\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {1} +runtime.modeler.webmethod.must.be.public=@WebMethod\uB294 non-public \uBA54\uC18C\uB4DC {0}\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod\uB294 static \uBA54\uC18C\uB4DC {0}\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod\uB294 static \uB610\uB294 final \uBA54\uC18C\uB4DC {0}\uC5D0\uC11C \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +runtime.modeler.oneway.operation.no.out.parameters=\uB2E8\uBC29\uD5A5 \uC791\uC5C5\uC5D0\uB294 OUT \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0}, \uBA54\uC18C\uB4DC: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=\uB2E8\uBC29\uD5A5 \uC791\uC5C5\uC774 \uD655\uC778\uB41C \uC608\uC678 \uC0AC\uD56D\uC744 throw\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0}, \uBA54\uC18C\uB4DC: {1}, throw: {2} +runtime.modeler.cannot.get.serviceName.from.interface=\uC778\uD130\uD398\uC774\uC2A4\uC5D0\uC11C serviceName\uC744 \uAC80\uC0C9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0} +runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\"\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC640 portName \"{1}\"\uC758 \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uAC00 \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. +runtime.modeler.no.package=\uD328\uD0A4\uC9C0\uAC00 \uC5C6\uB294 \uD074\uB798\uC2A4\uC5D0 \uB300\uD574 @WebService.targetNamespace\uB97C \uC9C0\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. \uD074\uB798\uC2A4: {0} +runtime.modeler.no.operations={0} \uD074\uB798\uC2A4\uAC00 \uC815\uC758\uD55C \uC6F9 \uC11C\uBE44\uC2A4\uC5D0 \uC801\uD569\uD55C WebMethods\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +runtime.modeler.mtom.conflict = @BindingType\uC5D0 \uC624\uB958 \uBC1C\uC0DD: \uBC14\uC778\uB529 \uC2DD\uBCC4\uC790 {0}\uC758 MTOM \uAD6C\uC131\uC774 @MTOM {1} \uAE30\uB2A5\uACFC \uCDA9\uB3CC\uD569\uB2C8\uB2E4. +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= \uAD6C\uD604\uC758 {0} \uAE30\uB2A5\uC774 WSDL \uAD6C\uC131\uC758 {1}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4. +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API\uAC00 {0}\uC5D0\uC11C \uB85C\uB4DC\uB418\uC5C8\uC9C0\uB9CC JAX-WS \uB7F0\uD0C0\uC784\uC5D0 JAX-WS 2.2 API\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC778\uC99D\uB41C \uD45C\uC900 \uBB34\uD6A8\uD654 \uBC29\uC2DD\uC744 \uC0AC\uC6A9\uD558\uC5EC AX-WS 2.2 API\uB97C \uB85C\uB4DC\uD558\uC2ED\uC2DC\uC624. +runtime.modeler.wsfeature.no.ftrconstructor={0} \uC8FC\uC11D\uC744 \uC778\uC2DD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uB098 \uC774\uC0C1\uC758 {1} \uC0DD\uC131\uC790\uAC00 @FeatureConstructor\uB85C \uD45C\uC2DC\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +runtime.modeler.wsfeature.morethanone.ftrconstructor={0} \uC8FC\uC11D\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uD558\uB098\uC758 {1} \uC0DD\uC131\uC790\uB9CC @FeatureConstructor\uB85C \uD45C\uC2DC\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +runtime.modeler.wsfeature.illegal.ftrconstructor={0} \uC8FC\uC11D\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. {1}\uC5D0\uC11C @FeatureConstructor \uAC12\uC774 \uC0DD\uC131\uC790 \uB9E4\uAC1C\uBCC0\uC218\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= {1}\uC5D0 {0} \uC8FC\uC11D\uC774 \uC798\uBABB \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. ParameterStyle\uC740 RPC \uC2A4\uD0C0\uC77C \uC6F9 \uC11C\uBE44\uC2A4\uB85C\uB9CC WRAPPED\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +runtime.modeler.soapbinding.conflict= {1} \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C SOAPBinding \uC2A4\uD0C0\uC77C {0}\uC774(\uAC00) \uC804\uC5ED SOAPBinding \uC2A4\uD0C0\uC77C {2}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4. +runtimemodeler.invalid.soapbindingOnMethod={2} \uD074\uB798\uC2A4\uC758 {1} \uBA54\uC18C\uB4DC\uC5D0 \uBD80\uC801\uD569\uD55C \uC8FC\uC11D {0}\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. \uBA54\uC18C\uB4DC\uB294 \"RPC\" \uC2A4\uD0C0\uC77C\uC758 @SOAPBinding\uC73C\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +unable.to.create.JAXBContext=JAXBContext\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0}\uC758 {1} \uBA54\uC18C\uB4DC\uAC00 BARE\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC9C0\uB9CC \uB450 \uAC1C \uC774\uC0C1\uC758 \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uBCF8\uBB38\uC5D0 \uBC14\uC778\uB4DC\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. \uBA54\uC18C\uB4DC\uB97C @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED \uC8FC\uC11D\uC73C\uB85C \uC8FC\uC11D \uCC98\uB9AC\uD558\uC2ED\uC2DC\uC624. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties new file mode 100644 index 00000000000..ce6362b959d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_pt_BR.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=erro do modelador de runtime: {0} + +runtime.modeler.no.webservice.annotation=Uma anota\u00E7\u00E3o do WebService n\u00E3o est\u00E1 presente na classe: {0} +runtime.modeler.endpoint.interface.no.webservice=A Interface do Ponto Final: {0} n\u00E3o tem Anota\u00E7\u00E3o do WebService +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=n\u00E3o foi poss\u00EDvel encontrar a classe: {0} +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=A classe {0} de wrapper n\u00E3o foi encontrada. Voc\u00EA executou o processamento da anota\u00E7\u00E3o para ger\u00E1-la? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=n\u00E3o foi poss\u00EDvel encontrar o m\u00E9todo: {0} na classe: {1} +runtime.modeler.webmethod.must.be.public=@WebMethod n\u00E3o \u00E9 permitido em um m\u00E9todo n\u00E3o p\u00FAblico {0} +runtime.modeler.webmethod.must.be.nonstatic=@WebMethod n\u00E3o \u00E9 permitido em um m\u00E9todo est\u00E1tico {0} +runtime.modeler.webmethod.must.be.nonstaticfinal=@WebMethod n\u00E3o \u00E9 permitido em um m\u00E9todo est\u00E1tico ou final {0} +runtime.modeler.oneway.operation.no.out.parameters=a opera\u00E7\u00E3o unidirecional n\u00E3o deve ter a classe de par\u00E2metros OUT: {0} m\u00E9todo: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=A opera\u00E7\u00E3o unidirecional n\u00E3o deve gerar nenhuma classe {0}: m\u00E9todo: {1} gera\u00E7\u00F5es: {2} de exce\u00E7\u00F5es verificadas +runtime.modeler.cannot.get.serviceName.from.interface=O serviceName n\u00E3o pode ser recuperado de uma interface. classe {0} +runtime.modeler.portname.servicename.namespace.mismatch=O namespace do serviceName \\"{0}\\" e o namespace do portName \\"{1}\\" devem ser correspondentes +runtime.modeler.no.package=Um @WebService.targetNamespace deve ser especificado nas classes sem pacote. Classe: {0} +runtime.modeler.no.operations=O web service definido pela classe {0} n\u00E3o cont\u00E9m nenhum WebMethods v\u00E1lido. +runtime.modeler.mtom.conflict = Erro em @BindingType: a Configura\u00E7\u00E3o de MTOM no identificador de bind {0} est\u00E1 em conflito com o recurso @MTOM {1} +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= O recurso {0} na implementa\u00E7\u00E3o est\u00E1 em conflito com {1} na configura\u00E7\u00E3o do WSDL +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = A API de JAX-WS 2.1 foi carregada de {0}, mas o runtime de JAX-WS requer a API JAX-WS 2.2. Use o mecanismo de substitui\u00E7\u00E3o de padr\u00F5es endossados para carregar a API de JAX-WS 2.2 +runtime.modeler.wsfeature.no.ftrconstructor=A anota\u00E7\u00E3o {0} n\u00E3o \u00E9 reconhec\u00EDvel, pelo menos um construtor de {1} deve ser marcado com @FeatureConstructor +runtime.modeler.wsfeature.morethanone.ftrconstructor=A anota\u00E7\u00E3o {0} \u00E9 inv\u00E1lida. Somente um construtor de {1} pode ser marcado como @FeatureConstructor +runtime.modeler.wsfeature.illegal.ftrconstructor=A anota\u00E7\u00E3o {0} \u00E9 inv\u00E1lida. No {1} o valor de @FeatureConstructor n\u00E3o corresponde aos par\u00E2metros do construtor +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= Uso incorreto da Anota\u00E7\u00E3o {0} em {1}; o ParameterStyle s\u00F3 pode ser WRAPPED com o Web service de Estilo de RPC. +runtime.modeler.soapbinding.conflict= O Estilo de SOAPBinding {0} do m\u00E9todo {1} est\u00E1 em conflito com o Estilo SOAPBinding {2} global +runtimemodeler.invalid.soapbindingOnMethod=Anota\u00E7\u00E3o inv\u00E1lida: {0} no M\u00E9todo {1} na Classe {2}. Um m\u00E9todo n\u00E3o pode ser anotado com @SOAPBinding com Estilo \\"RPC\\" +unable.to.create.JAXBContext=N\u00E3o \u00E9 poss\u00EDvel criar o JAXBContext +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0} tem o m\u00E9todo {1} anotado como BARE, mas tem mais de um par\u00E2metro vinculado ao corpo. Ele \u00E9 v\u00E1lido. Anote o m\u00E9todo com a anota\u00E7\u00E3o: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties new file mode 100644 index 00000000000..eee8988d700 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_CN.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=\u8FD0\u884C\u65F6\u5EFA\u6A21\u7A0B\u5E8F\u9519\u8BEF: {0} + +runtime.modeler.no.webservice.annotation=\u7C7B\u4E0A\u4E0D\u5B58\u5728 Web \u670D\u52A1\u6CE8\u91CA: {0} +runtime.modeler.endpoint.interface.no.webservice=\u7AEF\u70B9\u63A5\u53E3{0}\u6CA1\u6709 Web \u670D\u52A1\u6CE8\u91CA +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=\u627E\u4E0D\u5230\u7C7B{0} +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=\u672A\u627E\u5230\u5305\u88C5\u7C7B{0}\u3002\u60A8\u662F\u5426\u5DF2\u8FD0\u884C\u6CE8\u91CA\u5904\u7406\u6765\u751F\u6210\u5B83\u4EEC? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=\u5728\u7C7B{1}\u4E0A\u627E\u4E0D\u5230\u65B9\u6CD5{0} +runtime.modeler.webmethod.must.be.public=\u975E\u516C\u5171\u65B9\u6CD5{0}\u4E0A\u4E0D\u5141\u8BB8\u6709 @WebMethod +runtime.modeler.webmethod.must.be.nonstatic=\u9759\u6001\u65B9\u6CD5{0}\u4E0A\u4E0D\u5141\u8BB8\u6709 @WebMethod +runtime.modeler.webmethod.must.be.nonstaticfinal=\u9759\u6001\u6216\u6700\u7EC8\u65B9\u6CD5{0}\u4E0A\u4E0D\u5141\u8BB8\u6709 @WebMethod +runtime.modeler.oneway.operation.no.out.parameters=\u5355\u5411\u64CD\u4F5C\u4E0D\u5E94\u6709 OUT \u53C2\u6570\u7C7B: {0}, \u65B9\u6CD5: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=\u5355\u5411\u64CD\u4F5C\u4E0D\u80FD\u629B\u51FA\u4EFB\u4F55\u9009\u4E2D\u7684\u5F02\u5E38\u9519\u8BEF\u7C7B: {0}, \u65B9\u6CD5: {1}, \u629B\u51FA: {2} +runtime.modeler.cannot.get.serviceName.from.interface=\u65E0\u6CD5\u4ECE\u63A5\u53E3\u68C0\u7D22 serviceName\u3002\u7C7B{0} +runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\" \u7684\u540D\u79F0\u7A7A\u95F4\u4E0E portName \"{1}\" \u7684\u540D\u79F0\u7A7A\u95F4\u5FC5\u987B\u5339\u914D +runtime.modeler.no.package=\u5FC5\u987B\u5728\u6CA1\u6709\u7A0B\u5E8F\u5305\u7684\u7C7B\u4E0A\u6307\u5B9A @WebService.targetNamespace\u3002\u7C7B: {0} +runtime.modeler.no.operations=\u7531\u7C7B{0}\u5B9A\u4E49\u7684 Web \u670D\u52A1\u4E0D\u5305\u542B\u4EFB\u4F55\u6709\u6548\u7684 WebMethods\u3002 +runtime.modeler.mtom.conflict = @BindingType \u4E2D\u51FA\u9519: \u7ED1\u5B9A\u6807\u8BC6\u7B26{0}\u4E2D\u7684 MTOM \u914D\u7F6E\u4E0E\u529F\u80FD @MTOM {1}\u53D1\u751F\u51B2\u7A81 +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= \u5B9E\u73B0\u4E2D\u7684\u529F\u80FD{0}\u4E0E WSDL \u914D\u7F6E\u4E2D\u7684{1}\u53D1\u751F\u51B2\u7A81 +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u4ECE{0}\u4E2D\u52A0\u8F7D, \u4F46 JAX-WS \u8FD0\u884C\u65F6\u9700\u8981 JAX-WS 2.2 API\u3002\u8BF7\u4F7F\u7528\u6388\u6743\u6807\u51C6\u8986\u76D6\u673A\u5236\u6765\u52A0\u8F7D JAX-WS 2.2 API +runtime.modeler.wsfeature.no.ftrconstructor=\u65E0\u6CD5\u8BC6\u522B\u6CE8\u91CA{0}, \u5E94\u4F7F\u7528 @FeatureConstructor \u81F3\u5C11\u6807\u8BB0{1}\u7684\u4E00\u4E2A\u6784\u9020\u5668 +runtime.modeler.wsfeature.morethanone.ftrconstructor=\u6CE8\u91CA{0}\u662F\u975E\u6CD5\u7684, \u53EA\u80FD\u5C06{1}\u7684\u4E00\u4E2A\u6784\u9020\u5668\u6807\u8BB0\u4E3A @FeatureConstructor +runtime.modeler.wsfeature.illegal.ftrconstructor=\u6CE8\u91CA{0}\u662F\u975E\u6CD5\u7684, \u5728{1}\u4E2D, @FeatureConstructor \u503C\u4E0E\u6784\u9020\u5668\u53C2\u6570\u4E0D\u5339\u914D +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= {1}\u4E0A\u6CE8\u91CA{0}\u7684\u7528\u6CD5\u4E0D\u6B63\u786E, ParameterStyle \u53EA\u80FD\u662F\u5E26\u6709 RPC \u6837\u5F0F Web \u670D\u52A1\u7684 WRAPPED\u3002 +runtime.modeler.soapbinding.conflict= \u65B9\u6CD5{1}\u7684 SOAPBinding \u6837\u5F0F{0}\u4E0E\u5168\u5C40 SOAPBinding \u6837\u5F0F{2}\u53D1\u751F\u51B2\u7A81 +runtimemodeler.invalid.soapbindingOnMethod=\u7C7B{2}\u4E2D\u7684\u65B9\u6CD5{1}\u4E0A\u7684\u6CE8\u91CA{0}\u65E0\u6548, \u65B9\u6CD5\u4E0D\u80FD\u4F7F\u7528\u5177\u6709\u6837\u5F0F \"RPC\" \u7684 @SOAPBinding \u8FDB\u884C\u6CE8\u91CA +unable.to.create.JAXBContext=\u65E0\u6CD5\u521B\u5EFA JAXBContext +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0}\u5177\u6709\u6CE8\u91CA\u4E3A BARE \u7684\u65B9\u6CD5{1}, \u4F46\u8BE5\u65B9\u6CD5\u6709\u591A\u4E2A\u53C2\u6570\u7ED1\u5B9A\u5230\u4E3B\u4F53\u3002\u8FD9\u662F\u65E0\u6548\u7684\u3002\u8BF7\u4F7F\u7528\u4EE5\u4E0B\u6CE8\u91CA\u5BF9\u8BE5\u65B9\u6CD5\u8FDB\u884C\u6CE8\u91CA: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties new file mode 100644 index 00000000000..85ef977a19a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/modeler_zh_TW.properties @@ -0,0 +1,60 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +nestedModelerError=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u6A21\u578B\u88FD\u4F5C\u5668\u932F\u8AA4: {0} + +runtime.modeler.no.webservice.annotation=Web \u670D\u52D9\u8A3B\u89E3\u4E0D\u5B58\u5728\u4E0B\u5217\u985E\u5225\u4E2D: {0} +runtime.modeler.endpoint.interface.no.webservice=\u7AEF\u9EDE\u4ECB\u9762: {0} \u672A\u5305\u542B Web \u670D\u52D9\u8A3B\u89E3 +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.class.not.found=\u627E\u4E0D\u5230\u985E\u5225: {0} +# APT - Annotation Processing Tool. Should not be translated. +runtime.modeler.wrapper.not.found=\u627E\u4E0D\u5230\u5305\u88DD\u51FD\u5F0F\u985E\u5225 {0}. \u60A8\u662F\u5426\u5DF2\u57F7\u884C\u8A3B\u89E3\u8655\u7406\u4F86\u7522\u751F\u5B83\u5011? +# Wrapped into an Exception. Not concatenated with any other string. +runtime.modeler.method.not.found=\u5728\u985E\u5225: {1} \u627E\u4E0D\u5230\u65B9\u6CD5: {0} +runtime.modeler.webmethod.must.be.public=\u4E0D\u5141\u8A31\u5728\u975E\u516C\u7528\u65B9\u6CD5 {0} \u4E2D\u4F7F\u7528 @WebMethod +runtime.modeler.webmethod.must.be.nonstatic=\u4E0D\u5141\u8A31\u5728\u975C\u614B\u65B9\u6CD5 {0} \u4E2D\u4F7F\u7528 @WebMethod +runtime.modeler.webmethod.must.be.nonstaticfinal=\u4E0D\u5141\u8A31\u5728\u975C\u614B\u6216\u6700\u7D42\u65B9\u6CD5 {0} \u4E2D\u4F7F\u7528 @WebMethod +runtime.modeler.oneway.operation.no.out.parameters=\u55AE\u5411\u4F5C\u696D\u4E0D\u61C9\u5305\u542B OUT \u53C3\u6578\u985E\u5225: {0} \u65B9\u6CD5: {1} +runtime.modeler.oneway.operation.no.checked.exceptions=\u55AE\u5411\u4F5C\u696D\u4E0D\u61C9\u767C\u51FA\u4EFB\u4F55\u5DF2\u6AA2\u67E5\u7684\u7570\u5E38\u72C0\u6CC1\u985E\u5225: {0} \u65B9\u6CD5: {1} \u767C\u51FA: {2} +runtime.modeler.cannot.get.serviceName.from.interface=\u7121\u6CD5\u5F9E\u4ECB\u9762\u64F7\u53D6 serviceName. \u985E\u5225 {0} +runtime.modeler.portname.servicename.namespace.mismatch=serviceName \"{0}\" \u7684\u547D\u540D\u7A7A\u9593\u8207 portName \"{1}\" \u7684\u547D\u540D\u7A7A\u9593\u5FC5\u9808\u76F8\u7B26 +runtime.modeler.no.package=\u6C92\u6709\u5957\u88DD\u7A0B\u5F0F\u7684\u985E\u5225\u5FC5\u9808\u6307\u5B9A @WebService.targetNamespace. \u985E\u5225: {0} +runtime.modeler.no.operations=\u985E\u5225 {0} \u5B9A\u7FA9\u7684 Web \u670D\u52D9\u672A\u5305\u542B\u4EFB\u4F55\u6709\u6548\u7684 WebMethod. +runtime.modeler.mtom.conflict = @BindingType \u767C\u751F\u932F\u8AA4: \u9023\u7D50 ID {0} \u4E2D\u7684 MTOM \u7D44\u614B\u8207\u529F\u80FD @MTOM {1} \u767C\u751F\u885D\u7A81 +# {0} - feature class name, {1} - feature class name +runtime.modeler.feature.conflict= \u5BE6\u884C\u4E2D\u7684\u529F\u80FD {0} \u8207 WSDL \u7D44\u614B\u4E2D\u7684 {1} \u767C\u751F\u885D\u7A81 +# {0} - absolute class location +runtime.modeler.addressing.responses.nosuchmethod = JAX-WS 2.1 API \u5DF2\u5F9E {0} \u8F09\u5165, \u4F46 JAX-WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u9700\u8981 JAX-WS 2.2 API. \u8ACB\u4F7F\u7528\u8A8D\u53EF\u7684\u6A19\u6E96\u8986\u5BEB\u6A5F\u5236\u4F86\u8F09\u5165 JAX-WS 2.2 API +runtime.modeler.wsfeature.no.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6CD5\u8FA8\u8B58, \u81F3\u5C11\u4E00\u500B {1} \u7684\u5EFA\u69CB\u5B50\u61C9\u6A19\u793A @FeatureConstructor +runtime.modeler.wsfeature.morethanone.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6548, \u53EA\u80FD\u6709\u4E00\u500B {1} \u7684\u5EFA\u69CB\u5B50\u6A19\u793A\u70BA @FeatureConstructor +runtime.modeler.wsfeature.illegal.ftrconstructor=\u8A3B\u89E3 {0} \u7121\u6548, \u5728 {1} \u4E2D, @FeatureConstructor \u503C\u8207\u5EFA\u69CB\u5B50\u53C3\u6578\u4E0D\u7B26 +# WRAPPED is a member of enumeration and should not be translated. {0} - SoapBinding annotation, {1} - class name +runtime.modeler.invalid.soapbinding.parameterstyle= {1} \u7684\u8A3B\u89E3 {0} \u7528\u6CD5\u4E0D\u6B63\u78BA, ParameterStyle \u53EA\u80FD\u662F\u4F7F\u7528 RPC \u6A23\u5F0F Web \u670D\u52D9\u7684 WRAPPED. +runtime.modeler.soapbinding.conflict= \u65B9\u6CD5 {1} \u7684 SOAPBinding \u6A23\u5F0F {0} \u8207\u5168\u57DF SOAPBinding \u6A23\u5F0F {2} \u885D\u7A81 +runtimemodeler.invalid.soapbindingOnMethod=\u985E\u5225 {2} \u65B9\u6CD5 {1} \u4E2D\u7684\u8A3B\u89E3: {0} \u7121\u6548, \u4E0D\u80FD\u4F7F\u7528\u5177\u6709\u6A23\u5F0F \"RPC\" \u7684 @SOAPBinding \u4F86\u52A0\u8A3B\u65B9\u6CD5 +unable.to.create.JAXBContext=\u7121\u6CD5\u5EFA\u7ACB JAXBContext +# BARE is a member of enumeration and should not be translated. +not.a.valid.bare.method=SEI {0} \u7684\u65B9\u6CD5 {1} \u5DF2\u52A0\u8A3B\u70BA BARE, \u4F46\u5176\u6709\u4E00\u500B\u4EE5\u4E0A\u7684\u53C3\u6578\u9023\u7D50\u81F3\u4E3B\u9AD4. \u9019\u662F\u7121\u6548\u7684. \u8ACB\u4F7F\u7528\u8A3B\u89E3: @SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.WRAPPED) \u5C07\u65B9\u6CD5\u52A0\u8A3B diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties index f3821e158f1..bfa4ab4dc34 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -45,3 +45,4 @@ WSP_1017_MAP_UPDATE_FAILED=WSP1048: Policy map setup failed - exception occurred WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: Failed to marshal policy "{0}". WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: Failed to find any configuration file. Creating new empty policy map. WSP_1020_DUPLICATE_ID=WSP1020: Found two policies in one document with the same id: "{0}". +WSP_1021_FAULT_NOT_BOUND=WSP1021: Fault "{0}" not bound. Check names in port and binding definitions. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties new file mode 100644 index 00000000000..5c832540d17 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_de.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: XMLStreamException beim Lesen des Policy-Referenzelements. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: Marshalling von Policy oder deren Referenz nicht m\u00F6glich. Weitere Einzelheiten finden Sie in der urspr\u00FCnglichen Ausnahme. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: Elementname f\u00FCr Klasse "{0}" und WSDL-Name "{1}" kann nicht gepr\u00FCft werden. +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: Policy-URIs d\u00FCrfen nicht null sein. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: Policy, die von URI "{0}" referenziert wird, konnte nicht gefunden werden. +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: Policy-Zuordnungserweiterung darf nicht null sein. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: Policy-Ausnahme bei Abschluss des WSDL-Parsings aufgetreten. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: Keine Marshalling Policy, WSDL-Subject ist null f\u00FCr "{0}". +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: Policy-Zuordnung war null, kein Marshalling von Policys. +WSP_1010_NO_POLICIES_DEFINED=WSP1010: Keine Policys definiert. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: G\u00FCltige Policy f\u00FCr Subject konnte nicht abgerufen werden: {0}. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: WSDL-Modell konnte nicht konfiguriert werden. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: Ausnahme beim Lesen des Policy-Elements aufgetreten. Bis jetzt wurde Folgendes gelesen: {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: Policy "{0}" kann nicht gefunden werden, die von WSDL referenziert wird. Pr\u00FCfen Sie die Policy-Referenzen in der WSDL. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: Serverseitige Assertionsvalidierung f\u00FCr "{0}"-Assertion war nicht erfolgreich. Assertion wurde als "{1}" ausgewertet. +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: Die Policy wird nicht hinzugef\u00FCgt, weil sie keine ID hat oder weil bereits eine Policy mit derselben ID hinzugef\u00FCgt wurde: {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048: Setup der Policy-Zuordnung nicht erfolgreich - Ausnahme beim Versuch, Content der Policy-Zuordnung zu \u00E4ndern. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: Marshalling von Policy "{0}" nicht erfolgreich. +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: Es konnte keine Konfigurationsdatei gefunden werden. Eine neue leere Policy-Zuordnung wird erstellt. +WSP_1020_DUPLICATE_ID=WSP1020: Es wurde zwei Policys mit derselben ID in einem Dokument gefunden: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties new file mode 100644 index 00000000000..259a55ca8b8 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_es.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: se ha producido una excepci\u00F3n de flujo XML al leer el elemento de referencia de la pol\u00EDtica. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: no se ha podido canalizar la pol\u00EDtica o su referencia. Consulte la excepci\u00F3n original para obtener m\u00E1s informaci\u00F3n. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: no se ha podido comprobar el nombre de elemento de la clase "{0}" y el nombre de WSDL "{1}". +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: los URI de pol\u00EDtica no pueden ser nulos. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: no se ha encontrado la pol\u00EDtica a la que hace referencia el URI "{0}". +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: el extensor de asignaciones de pol\u00EDticas no puede ser nulo. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: se ha producido una excepci\u00F3n de pol\u00EDtica al finalizar el an\u00E1lisis de WSDL. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: no se est\u00E1 canalizando la pol\u00EDtica; el asunto de WSDL es nulo para "{0}". +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: la asignaci\u00F3n de pol\u00EDtica es nula; no se est\u00E1 canalizando ninguna pol\u00EDtica. +WSP_1010_NO_POLICIES_DEFINED=WSP1010: no se ha definido ninguna pol\u00EDtica. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: Fallo al recuperar la pol\u00EDtica efectiva para el asunto: {0}. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: fallo al configurar el modelo de WSDL. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: se ha producido una excepci\u00F3n al leer el elemento de la pol\u00EDtica. Se ha le\u00EDdo lo siguiente hasta ahora: {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: no se ha encontrado la pol\u00EDtica "{0}" a la que se hace referencia desde el WSDL. Compruebe las referencias de la pol\u00EDtica en el WSDL. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: fallo de validaci\u00F3n de afirmaci\u00F3n del servidor para la afirmaci\u00F3n "{0}". La afirmaci\u00F3n se ha evaluado como "{1}". +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: La pol\u00EDtica no se ha agregado porque no tiene un identificador o ya se ha agregado una pol\u00EDtica con el mismo identificador: {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048: Fallo en la configuraci\u00F3n de asignaci\u00F3n de pol\u00EDticas: se ha producido una excepci\u00F3n al intentar modificar el contenido de asignaci\u00F3n de pol\u00EDticas. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: fallo al canalizar la pol\u00EDtica "{0}". +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: no se ha encontrado ning\u00FAn archivo de configuraci\u00F3n. Creando nueva asignaci\u00F3n de pol\u00EDtica vac\u00EDa. +WSP_1020_DUPLICATE_ID=WSP1020: Se han encontrado dos pol\u00EDticas en un documento con el mismo identificador: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties new file mode 100644 index 00000000000..931c34776ee --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_fr.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001 : une exception XMLStreamException s'est produite lors de la lecture de l'\u00E9l\u00E9ment de r\u00E9f\u00E9rence de strat\u00E9gie. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002 : impossible de s\u00E9rialiser la strat\u00E9gie ou sa r\u00E9f\u00E9rence. Pour plus de d\u00E9tails, consultez l'exception d'origine. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003 : impossible de v\u00E9rifier le nom d''\u00E9l\u00E9ment pour la classe "{0}" et le nom WSDL "{1}". +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004 : les URI de strat\u00E9gie ne peuvent pas \u00EAtre NULL. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005 : strat\u00E9gie r\u00E9f\u00E9renc\u00E9e par l''URI "{0}" introuvable. +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006 : l'extension de la mappe de strat\u00E9gie ne peut pas \u00EAtre NULL. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007 : une exception de strat\u00E9gie s'est produite lors de la finalisation de l'analyse WSDL. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008 : aucune strat\u00E9gie de s\u00E9rialisation, le sujet WSDL est NULL pour "{0}". +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009 : la mappe de strat\u00E9gie \u00E9tait NULL, aucune s\u00E9rialisation des strat\u00E9gies. +WSP_1010_NO_POLICIES_DEFINED=WSP1010 : aucune strat\u00E9gie d\u00E9finie. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011 : \u00E9chec de l''extraction de la strat\u00E9gie en cours pour le sujet {0}. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012 : \u00E9chec de la configuration du mod\u00E8le WSDL. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013 : une exception s''est produite lors de la lecture de l''\u00E9l\u00E9ment de strat\u00E9gie. Voici ce qui a \u00E9t\u00E9 lu jusqu''\u00E0 pr\u00E9sent : {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014 : la strat\u00E9gie "{0}" r\u00E9f\u00E9renc\u00E9e \u00E0 partir du WSDL est introuvable. V\u00E9rifiez les r\u00E9f\u00E9rences de strat\u00E9gie dans le WSDL. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015 : \u00E9chec de la validation d''assertion c\u00F4t\u00E9 serveur pour l''assertion "{0}". L''assertion a \u00E9t\u00E9 \u00E9valu\u00E9e en tant que "{1}". +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016 : la strat\u00E9gie n''est pas ajout\u00E9e car elle ne contient aucun ID ou une strat\u00E9gie avec le m\u00EAme ID a d\u00E9j\u00E0 \u00E9t\u00E9 ajout\u00E9e : {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048 : \u00E9chec de configuration de la mappe de strat\u00E9gie. Une exception s'est produite lors de la tentative de modification du contenu de la mappe de strat\u00E9gie. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018 : \u00E9chec de la s\u00E9rialisation de la strat\u00E9gie "{0}". +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019 : fichier de configuration introuvable. Cr\u00E9ation d'une mappe de strat\u00E9gie vide. +WSP_1020_DUPLICATE_ID=WSP1020 : deux strat\u00E9gies trouv\u00E9es dans un document avec le m\u00EAme ID : "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties new file mode 100644 index 00000000000..9c228e21698 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_it.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: Si \u00E8 verificata una XMLStreamException durante la lettura dell'elemento di riferimento del criterio. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: Impossibile eseguire il marshalling del criterio o del relativo riferimento. Vedere l'eccezione originale per ulteriori dettagli. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: Impossibile controllare il nome dell''elemento per la classe "{0}" e il nome WSDL "{1}". +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: Gli URI del criterio non possono essere nulli. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: Individuazione non riuscita del criterio a cui viene fatto riferimento dall''URI: {0}. +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1004: L'estensione della mappa dei criteri non pu\u00F2 essere nulla. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: Si \u00E8 verificata un'eccezione del criterio alla fine dell'analisi WSDL. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: Non viene eseguito il marshalling del criterio. L''oggetto WSDL \u00E8 nullo per "{0}". +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1004: La mappa dei criteri \u00E8 nulla. Non viene eseguito il marshalling di alcun criterio. +WSP_1010_NO_POLICIES_DEFINED=WSP1010: Nessun criterio definito. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: Recupero non riuscito del criterio effettivo per l''oggetto: {0}. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: Configurazione del modello WSDL non riuscita. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: Si \u00E8 verificata un''eccezione durante la lettura dell''elemento del criterio. Di seguito \u00E8 riportato quanto \u00E8 stato letto finora: {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: Impossibile trovare il criterio "{0}" a cui viene fatto riferimento nel WSDL. Controllare i riferimenti del criterio nel WSDL. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: Convalida dell''asserzione lato server non riuscita per l''asserzione "{0}". L''asserzione \u00E8 stata valutata come "{1}". +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: Il criterio non viene aggiunto perch\u00E9 non ha un ID oppure \u00E8 gi\u00E0 stato aggiunto un criterio con lo stesso ID: {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048: Impostazione della mappa dei criteri non riuscita. Si \u00E8 verificata un'eccezione durante il tentativo di modifica del contenuto della mappa dei criteri. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: Marshalling del criterio "{0}" non riuscito. +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: Individuazione di un file di configurazione non riuscita. Viene creata una nuova mappa dei criteri vuota. +WSP_1020_DUPLICATE_ID=WSP1020: Trovati due criteri in un documento con lo stesso ID: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties new file mode 100644 index 00000000000..223afc21d01 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ja.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \u30DD\u30EA\u30B7\u30FC\u53C2\u7167\u8981\u7D20\u306E\u8AAD\u53D6\u308A\u4E2D\u306BXMLStreamException\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \u30DD\u30EA\u30B7\u30FC\u307E\u305F\u306F\u30DD\u30EA\u30B7\u30FC\u306E\u53C2\u7167\u3092\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3067\u304D\u307E\u305B\u3093\u3002\u8A73\u7D30\u306F\u5143\u306E\u4F8B\u5916\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: \u30AF\u30E9\u30B9"{0}"\u306E\u8981\u7D20\u540D\u304A\u3088\u3073WSDL\u540D"{1}"\u3092\u78BA\u8A8D\u3067\u304D\u307E\u305B\u3093\u3002 +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \u30DD\u30EA\u30B7\u30FCURI\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002 +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: URI "{0}"\u3067\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\u30DD\u30EA\u30B7\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002 +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u62E1\u5F35\u6A5F\u80FD\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093\u3002 +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: WSDL\u89E3\u6790\u306E\u7D42\u4E86\u6642\u306B\u30DD\u30EA\u30B7\u30FC\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \u30DD\u30EA\u30B7\u30FC\u3092\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3057\u3066\u3044\u307E\u305B\u3093\u3002"{0}"\u306EWSDL\u30B5\u30D6\u30B8\u30A7\u30AF\u30C8\u304Cnull\u3067\u3059\u3002 +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u304Cnull\u3067\u3042\u308A\u3001\u3044\u305A\u308C\u306E\u30DD\u30EA\u30B7\u30FC\u3082\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u3057\u3066\u3044\u307E\u305B\u3093\u3002 +WSP_1010_NO_POLICIES_DEFINED=WSP1010: \u30DD\u30EA\u30B7\u30FC\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \u30B5\u30D6\u30B8\u30A7\u30AF\u30C8: {0}\u306E\u6709\u52B9\u306A\u30DD\u30EA\u30B7\u30FC\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: WSDL\u30E2\u30C7\u30EB\u306E\u69CB\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \u30DD\u30EA\u30B7\u30FC\u8981\u7D20\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3053\u308C\u307E\u3067\u8AAD\u307F\u53D6\u3089\u308C\u305F\u5185\u5BB9\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: {0}\u3002 +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: WSDL\u304B\u3089\u53C2\u7167\u3055\u308C\u3066\u3044\u308B\u30DD\u30EA\u30B7\u30FC"{0}"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002WSDL\u3067\u306E\u30DD\u30EA\u30B7\u30FC\u53C2\u7167\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: \u30B5\u30FC\u30D0\u30FC\u5074\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u691C\u8A3C\u304C"{0}"\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u3067\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u30A2\u30B5\u30FC\u30B7\u30E7\u30F3\u306F"{1}"\u3068\u3057\u3066\u8A55\u4FA1\u3055\u308C\u307E\u3057\u305F\u3002 +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \u30DD\u30EA\u30B7\u30FC\u306BID\u304C\u306A\u3044\u304B\u3001\u540C\u3058ID\u3092\u6301\u3064\u30DD\u30EA\u30B7\u30FC\u304C\u3059\u3067\u306B\u8FFD\u52A0\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u3053\u306E\u30DD\u30EA\u30B7\u30FC\u306F\u8FFD\u52A0\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}\u3002 +WSP_1017_MAP_UPDATE_FAILED=WSP1048: \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u306E\u8A2D\u5B9A\u306B\u5931\u6557\u3057\u307E\u3057\u305F - \u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u30FB\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u5909\u66F4\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002 +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: \u30DD\u30EA\u30B7\u30FC"{0}"\u306E\u30DE\u30FC\u30B7\u30E3\u30EA\u30F3\u30B0\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u7A7A\u306E\u65B0\u898F\u30DD\u30EA\u30B7\u30FC\u30FB\u30DE\u30C3\u30D7\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059\u3002 +WSP_1020_DUPLICATE_ID=WSP1020: 1\u3064\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306B\u3001\u540C\u3058ID: "{0}"\u3092\u6301\u30642\u3064\u306E\u30DD\u30EA\u30B7\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties new file mode 100644 index 00000000000..34cb6b436fe --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_ko.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \uC815\uCC45 \uCC38\uC870 \uC694\uC18C\uB97C \uC77D\uB294 \uC911 XMLStreamException\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \uC815\uCC45 \uB610\uB294 \uD574\uB2F9 \uCC38\uC870\uB97C \uB9C8\uC15C\uB9C1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC6D0\uB798 \uC608\uC678 \uC0AC\uD56D\uC744 \uCC38\uC870\uD558\uC2ED\uC2DC\uC624. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: "{0}" \uD074\uB798\uC2A4 \uBC0F WSDL \uC774\uB984 "{1}"\uC5D0 \uB300\uD55C \uC694\uC18C \uC774\uB984\uC744 \uD655\uC778\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \uC815\uCC45 URI\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: URI "{0}"\uC774(\uAC00) \uCC38\uC870\uD558\uB294 \uC815\uCC45 \uCC3E\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \uC815\uCC45 \uB9F5 \uD655\uC7A5\uAE30\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: WSDL \uAD6C\uBB38 \uBD84\uC11D\uC744 \uC644\uB8CC\uD558\uB294 \uC911 \uC815\uCC45 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \uC815\uCC45\uC744 \uB9C8\uC15C\uB9C1\uD558\uACE0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{0}"\uC5D0 \uB300\uD55C WSDL \uC8FC\uCCB4\uAC00 \uB110\uC785\uB2C8\uB2E4. +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \uC815\uCC45 \uB9F5\uC774 \uB110\uC785\uB2C8\uB2E4. \uC815\uCC45\uC744 \uB9C8\uC15C\uB9C1\uD558\uACE0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +WSP_1010_NO_POLICIES_DEFINED=WSP1010: \uC815\uC758\uB41C \uC815\uCC45\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \uC8FC\uCCB4\uC5D0 \uB300\uD55C \uC720\uD6A8\uD55C \uC815\uCC45 \uAC80\uC0C9 \uC2E4\uD328: {0}. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: WSDL \uBAA8\uB378 \uAD6C\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \uC815\uCC45 \uC694\uC18C\uB97C \uC77D\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uAE4C\uC9C0 \uC77D\uC740 \uC694\uC18C: {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: WSDL\uC5D0\uC11C \uCC38\uC870\uB41C "{0}" \uC815\uCC45\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. WSDL\uC5D0\uC11C \uC815\uCC45 \uCC38\uC870\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: "{0}" \uBA85\uC81C\uC5D0 \uB300\uD55C \uC11C\uBC84\uCE21 \uBA85\uC81C \uAC80\uC99D\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBA85\uC81C\uAC00 "{1}"(\uC73C)\uB85C \uD3C9\uAC00\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \uC815\uCC45\uC5D0 ID\uAC00 \uC5C6\uAC70\uB098 \uB3D9\uC77C\uD55C ID\uB97C \uC0AC\uC6A9\uD558\uB294 \uC815\uCC45\uC774 \uC774\uBBF8 \uCD94\uAC00\uB418\uC5B4 \uC815\uCC45\uC774 \uCD94\uAC00\uB418\uC9C0 \uC54A\uC74C: {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048: \uC815\uCC45 \uB9F5 \uC124\uC815 \uC2E4\uD328 - \uC815\uCC45 \uB9F5 \uCF58\uD150\uCE20\uB97C \uC218\uC815\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: "{0}" \uC815\uCC45 \uB9C8\uC15C\uB9C1\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \uAD6C\uC131 \uD30C\uC77C \uCC3E\uAE30\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uBE44\uC5B4 \uC788\uB294 \uC0C8 \uC815\uCC45 \uB9F5\uC744 \uC0DD\uC131\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. +WSP_1020_DUPLICATE_ID=WSP1020: \uB3D9\uC77C\uD55C ID\uB97C \uC0AC\uC6A9\uD558\uB294 \uD558\uB098\uC758 \uBB38\uC11C\uC5D0\uC11C \uB450 \uAC1C\uC758 \uC815\uCC45\uC744 \uCC3E\uC74C: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties new file mode 100644 index 00000000000..93b78dc80ce --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_pt_BR.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: ocorreu XMLStreamException ao ler o elemento de refer\u00EAncia da pol\u00EDtica. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: n\u00E3o \u00E9 poss\u00EDvel efetuar marshalling da pol\u00EDtica ou de sua refer\u00EAncia. Consulte a exce\u00E7\u00E3o original para obter mais detalhes. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: n\u00E3o \u00E9 poss\u00EDvel verificar o nome do elemento da classe "{0}" e o nome do WSDL "{1}". +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: os URIs da pol\u00EDtica n\u00E3o podem ser nulos. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: falha ao localizar a pol\u00EDtica mencionada pelo URI "{0}". +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: o extensor do mapa de pol\u00EDtica n\u00E3o pode ser nulo. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: ocorreu uma exce\u00E7\u00E3o da pol\u00EDtica ao finalizar o parse do WSDL. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: n\u00E3o efetuar marshalling da pol\u00EDtica; o assunto do wsdl \u00E9 nulo para "{0}". +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: o mapa da pol\u00EDtica era nulo; n\u00E3o fazer marshall de nenhuma pol\u00EDtica. +WSP_1010_NO_POLICIES_DEFINED=WSP1010: nenhuma pol\u00EDtica definida. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: falha ao recuperar a pol\u00EDtica efetiva do assunto: {0}. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: falha ao configurar o modelo wsdl. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: ocorreu uma exce\u00E7\u00E3o ao ler o elemento da pol\u00EDtica. O seguinte item foi lido at\u00E9 o momento: {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: n\u00E3o \u00E9 poss\u00EDvel localizar a pol\u00EDtica "{0}" mencionada no WSDL. Verifique as refer\u00EAncias da pol\u00EDtica no WSDL. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: falha na valida\u00E7\u00E3o de asser\u00E7\u00E3o do servidor para a asser\u00E7\u00E3o "{0}". A asser\u00E7\u00E3o foi avaliada como "{1}". +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: a pol\u00EDtica n\u00E3o foi adicionada porque ela n\u00E3o tem ID ou porque uma pol\u00EDtica com o mesmo ID j\u00E1 foi adicionada: {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048: falha na configura\u00E7\u00E3o do mapa da pol\u00EDtica - ocorreu uma exce\u00E7\u00E3o ao tentar modificar o conte\u00FAdo do mapa da pol\u00EDtica. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: falha ao fazer marshall da pol\u00EDtica "{0}". +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: falha ao localizar qualquer arquivo de configura\u00E7\u00E3o. Criando novo mapa de pol\u00EDtica vazia. +WSP_1020_DUPLICATE_ID=WSP1020: foram detectadas duas pol\u00EDticas em um documento com o mesmo id: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties new file mode 100644 index 00000000000..0da2903e4f7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_CN.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \u8BFB\u53D6\u7B56\u7565\u5F15\u7528\u5143\u7D20\u65F6\u51FA\u73B0 XMLStreamException\u3002 +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \u65E0\u6CD5\u7F16\u96C6\u7B56\u7565\u6216\u5176\u5F15\u7528\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u539F\u59CB\u5F02\u5E38\u9519\u8BEF\u3002 +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: \u65E0\u6CD5\u68C0\u67E5\u7C7B "{0}" \u7684\u5143\u7D20\u540D\u548C WSDL \u540D\u79F0 "{1}"\u3002 +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \u7B56\u7565 URI \u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002 +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: \u627E\u4E0D\u5230\u7531 URI "{0}" \u5F15\u7528\u7684\u7B56\u7565\u3002 +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \u7B56\u7565\u6620\u5C04\u6269\u5C55\u7A0B\u5E8F\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002 +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: \u5B8C\u6210 WSDL \u89E3\u6790\u65F6\u51FA\u73B0\u7B56\u7565\u5F02\u5E38\u9519\u8BEF\u3002 +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \u672A\u7F16\u96C6\u7B56\u7565, "{0}" \u7684 wsdl \u4E3B\u9898\u4E3A\u7A7A\u503C\u3002 +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \u7B56\u7565\u6620\u5C04\u4E3A\u7A7A\u503C, \u672A\u7F16\u96C6\u4EFB\u4F55\u7B56\u7565\u3002 +WSP_1010_NO_POLICIES_DEFINED=WSP1010: \u672A\u5B9A\u4E49\u7B56\u7565\u3002 +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \u65E0\u6CD5\u68C0\u7D22\u4E3B\u9898{0}\u7684\u6709\u6548\u7B56\u7565\u3002 +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: \u65E0\u6CD5\u914D\u7F6E wsdl \u6A21\u578B\u3002 +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \u8BFB\u53D6\u7B56\u7565\u5143\u7D20\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002\u4E0B\u9762\u662F\u5230\u76EE\u524D\u4E3A\u6B62\u6240\u663E\u793A\u7684\u5185\u5BB9: {0}\u3002 +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: \u627E\u4E0D\u5230\u4ECE WSDL \u4E2D\u5F15\u7528\u7684\u7B56\u7565 "{0}"\u3002\u8BF7\u5728 WSDL \u4E2D\u68C0\u67E5\u7B56\u7565\u5F15\u7528\u3002 +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: "{0}" \u65AD\u8A00\u7684\u670D\u52A1\u5668\u7AEF\u65AD\u8A00\u9A8C\u8BC1\u5931\u8D25\u3002\u65AD\u8A00\u5DF2\u8BC4\u4F30\u4E3A "{1}"\u3002 +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \u672A\u6DFB\u52A0\u8BE5\u7B56\u7565, \u539F\u56E0\u662F\u8BE5\u7B56\u7565\u6CA1\u6709 ID \u6216\u5DF2\u6DFB\u52A0\u5177\u6709\u76F8\u540C ID \u7684\u7B56\u7565: {0}\u3002 +WSP_1017_MAP_UPDATE_FAILED=WSP1048: \u7B56\u7565\u6620\u5C04\u8BBE\u7F6E\u5931\u8D25 - \u5C1D\u8BD5\u4FEE\u6539\u7B56\u7565\u6620\u5C04\u5185\u5BB9\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\u3002 +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: \u65E0\u6CD5\u7F16\u96C6\u7B56\u7565 "{0}"\u3002 +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \u627E\u4E0D\u5230\u4EFB\u4F55\u914D\u7F6E\u6587\u4EF6\u3002\u6B63\u5728\u521B\u5EFA\u65B0\u7684\u7A7A\u7B56\u7565\u6620\u5C04\u3002 +WSP_1020_DUPLICATE_ID=WSP1020: \u5728\u4E00\u4E2A\u6587\u6863\u627E\u5230\u5177\u6709\u76F8\u540C ID \u7684\u4E24\u4E2A\u7B56\u7565: "{0}"\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties new file mode 100644 index 00000000000..b5373c290aa --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/policy_zh_TW.properties @@ -0,0 +1,47 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +WSP_1001_XML_EXCEPTION_WHEN_PROCESSING_POLICY_REFERENCE=WSP1001: \u8B80\u53D6\u539F\u5247\u53C3\u7167\u5143\u7D20\u6642\u767C\u751F XMLStreamException. +WSP_1002_UNABLE_TO_MARSHALL_POLICY_OR_POLICY_REFERENCE=WSP1002: \u7121\u6CD5\u5C01\u9001\u8655\u7406 (Marshal) \u539F\u5247\u6216\u5176\u53C3\u7167. \u8ACB\u53C3\u95B1\u539F\u59CB\u7684\u7570\u5E38\u72C0\u6CC1\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A. +WSP_1003_UNABLE_TO_CHECK_ELEMENT_NAME=WSP1003: \u7121\u6CD5\u6AA2\u67E5\u985E\u5225 "{0}" \u7684\u5143\u7D20\u540D\u7A31\u8207 WSDL \u540D\u7A31 "{1}". +WSP_1004_POLICY_URIS_CAN_NOT_BE_NULL=WSP1004: \u539F\u5247 URI \u4E0D\u53EF\u70BA\u7A7A\u503C. +WSP_1005_POLICY_REFERENCE_DOES_NOT_EXIST=WSP1005: \u627E\u4E0D\u5230 URI "{0}" \u53C3\u7167\u7684\u539F\u5247. +WSP_1006_POLICY_MAP_EXTENDER_CAN_NOT_BE_NULL=WSP1006: \u539F\u5247\u5C0D\u61C9\u64F4\u5145\u9805\u4E0D\u53EF\u70BA\u7A7A\u503C. +WSP_1007_POLICY_EXCEPTION_WHILE_FINISHING_PARSING_WSDL=WSP1007: \u5B8C\u6210 WSDL \u5256\u6790\u6642\u767C\u751F\u539F\u5247\u7570\u5E38\u72C0\u6CC1. +# {0} - human readable policy subject: "policy subject { subject = 'subject' Policy { namespace version = '...' ... } }" +WSP_1008_NOT_MARSHALLING_WSDL_SUBJ_NULL=WSP1008: \u672A\u5C01\u9001\u8655\u7406 (Marshal) \u539F\u5247, "{0}" \u7684 WSDL \u4E3B\u9AD4\u70BA\u7A7A\u503C. +WSP_1009_NOT_MARSHALLING_ANY_POLICIES_POLICY_MAP_IS_NULL=WSP1009: \u539F\u5247\u5C0D\u61C9\u70BA\u7A7A\u503C, \u672A\u5C01\u9001\u8655\u7406 (Marshal) \u4EFB\u4F55\u539F\u5247. +WSP_1010_NO_POLICIES_DEFINED=WSP1010: \u672A\u5B9A\u7FA9\u539F\u5247. +WSP_1011_FAILED_TO_RETRIEVE_EFFECTIVE_POLICY_FOR_SUBJECT=WSP1011: \u7121\u6CD5\u64F7\u53D6\u4E3B\u9AD4: {0} \u7684\u6709\u6548\u539F\u5247. +WSP_1012_FAILED_CONFIGURE_WSDL_MODEL=WSP1012: \u7121\u6CD5\u8A2D\u5B9A WSDL \u6A21\u578B. +# {0} - part of an XML document. e.g.: WSP1013: Exception occurred while reading policy element. Following was read so far: . +WSP_1013_EXCEPTION_WHEN_READING_POLICY_ELEMENT=WSP1013: \u8B80\u53D6\u539F\u5247\u5143\u7D20\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u76EE\u524D\u8B80\u5230\u7684\u8CC7\u8A0A\u5982\u4E0B: {0}. +WSP_1014_CAN_NOT_FIND_POLICY=WSP1014: \u627E\u4E0D\u5230 WSDL \u53C3\u7167\u7684\u539F\u5247 "{0}". \u8ACB\u6AA2\u67E5 WSDL \u4E2D\u7684\u539F\u5247\u53C3\u7167. +WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED=WSP1015: "{0}" \u5BA3\u544A\u7684\u4F3A\u670D\u5668\u7AEF\u5BA3\u544A\u9A57\u8B49\u5931\u6557. \u5BA3\u544A\u5DF2\u8A55\u4F30\u70BA "{1}". +WSP_1016_POLICY_ID_NULL_OR_DUPLICATE=WSP1016: \u672A\u65B0\u589E\u539F\u5247, \u56E0\u70BA\u5B83\u6C92\u6709 ID, \u6216\u5DF2\u65B0\u589E\u4E86\u76F8\u540C ID \u7684\u539F\u5247: {0}. +WSP_1017_MAP_UPDATE_FAILED=WSP1048: \u539F\u5247\u5C0D\u61C9\u8A2D\u5B9A\u5931\u6557 - \u5617\u8A66\u4FEE\u6539\u539F\u5247\u5C0D\u61C9\u5167\u5BB9\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1. +WSP_1018_FAILED_TO_MARSHALL_POLICY=WSP1018: \u7121\u6CD5\u5C01\u9001\u8655\u7406 (Marshal) \u539F\u5247 "{0}". +WSP_1019_CREATE_EMPTY_POLICY_MAP=WSP1019: \u627E\u4E0D\u5230\u4EFB\u4F55\u7D44\u614B\u6A94. \u6B63\u5728\u5EFA\u7ACB\u65B0\u7684\u7A7A\u767D\u539F\u5247\u5C0D\u61C9. +WSP_1020_DUPLICATE_ID=WSP1020: \u5728\u4E00\u500B\u6587\u4EF6\u4E2D\u767C\u73FE\u5169\u500B\u539F\u5247\u64C1\u6709\u76F8\u540C ID: "{0}". diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties index c9701f811c2..e29e03b7e97 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties new file mode 100644 index 00000000000..18f53f5c8ad --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_de.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=Adresse in einer EPR darf nicht null sein +null.address.service.endpoint=Adresse in einer EPR darf nicht null sein, wenn serviceName oder portName null ist +null.service=serviceName darf nicht null sein, wenn portName angegeben ist +null.portname=EPR enth\u00E4lt EndpointName in den Metadaten nicht +null.wsdl= EPR enth\u00E4lt keine WSDL-Metadaten, die f\u00FCr den aktuellen Vorgang ben\u00F6tigt werden +notfound.service.in.wsdl= Service: {0} in WSDL {1} nicht gefunden +no.wsdl.no.port = WSDL-Metadaten f\u00FCr Erstellen des Proxys nicht verf\u00FCgbar, entweder Serviceinstanz oder ServiceEndpointInterface {0} muss WSDL-Informationen enthalten +notfound.port.in.wsdl=Port: {0} ist kein g\u00FCltiger Port in Service: {1} in WSDL: {2} +error.wsdl= Fehler beim Parsen von WSDL: {0}. +null.epr= EndpointReference ist null diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties new file mode 100644 index 00000000000..56e0d0cb856 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_es.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=La direcci\u00F3n en una referencia de punto final no puede ser nula +null.address.service.endpoint=La direcci\u00F3n en una referencia de punto final no puede ser nula si serviceName o portName son nulos +null.service=serviceName no puede ser nulo si se especifica portName +null.portname=La referencia de punto final no tiene EndpointName en los metadatos +null.wsdl= La referencia de punto final no tiene los metadatos de WSDL que son necesarios para la operaci\u00F3n actual +notfound.service.in.wsdl= El servicio: {0} no se ha encontrado en el WSDL: {1} +no.wsdl.no.port = Los metadatos de WSDL no est\u00E1n disponibles para crear el proxy. La instancia de servicio o ServiceEndpointInterface {0} deber\u00EDan tener informaci\u00F3n de WSDL +notfound.port.in.wsdl=El puerto: {0} no es v\u00E1lido en el servicio: {1} de WSDL: {2} +error.wsdl= Error al analizar el WSDL: {0} +null.epr= EndpointReference es nulo diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties new file mode 100644 index 00000000000..0bafda4361a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_fr.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=L'adresse d'une r\u00E9f\u00E9rence d'adresse ne peut pas \u00EAtre NULL +null.address.service.endpoint=L'adresse d'une r\u00E9f\u00E9rence d'adresse ne peut pas \u00EAtre NULL lorsque serviceName ou portName est NULL +null.service=serviceName ne peut pas \u00EAtre NULL lorsque portName est indiqu\u00E9 +null.portname=La r\u00E9f\u00E9rence d'adresse ne comporte pas de nom d'adresse dans les m\u00E9tadonn\u00E9es +null.wsdl= La r\u00E9f\u00E9rence d'adresse ne comporte pas les m\u00E9tadonn\u00E9es WSDL n\u00E9cessaires \u00E0 l'op\u00E9ration en cours +notfound.service.in.wsdl= Service {0} introuvable dans le WSDL {1} +no.wsdl.no.port = M\u00E9tadonn\u00E9es WSDL non disponibles pour cr\u00E9er le proxy, l''instance de service ou ServiceEndpointInterface {0} doit comporter des informations WSDL +notfound.port.in.wsdl=Le port {0} n''est pas valide dans le service {1} dans le WSDL {2} +error.wsdl= Erreur lors de l''analyse du WSDL : {0}. +null.epr= EndpointReference est NULL diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties new file mode 100644 index 00000000000..46fd9e7f87e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_it.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=L'indirizzo in un EPR non pu\u00F2 essere nullo +null.address.service.endpoint=L'indirizzo in un EPR non pu\u00F2 essere nullo quando \u00E8 nullo serviceName o portName +null.service=serviceName non pu\u00F2 essere nullo quando \u00E8 specificato portName +null.portname=L'EPR non dispone di EndpointName nei metadati +null.wsdl= L'EPR non dispone dei metadati WSDL necessari per l'operazione corrente +notfound.service.in.wsdl= Servizio: {0} non trovato in WSDL: {1} +no.wsdl.no.port = Metadati WSDL non disponibili per la creazione del proxy. L''istanza di servizio o ServiceEndpointInterface {0} devono contenere le informazioni WSDL +notfound.port.in.wsdl=La porta: {0} non \u00E8 una porta valida nel servizio: {1} in WSDL: {2} +error.wsdl= Errore durante l''analisi di WSDL: {0} +null.epr= EndpointReference nullo diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties new file mode 100644 index 00000000000..2cfcc72bb9f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ja.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=EPR\u306E\u30A2\u30C9\u30EC\u30B9\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093 +null.address.service.endpoint=serviceName\u307E\u305F\u306FportName\u304Cnull\u3067\u3042\u308B\u5834\u5408\u3001EPR\u306E\u30A2\u30C9\u30EC\u30B9\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093 +null.service=portName\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001serviceName\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093 +null.portname=EPR\u3067\u30E1\u30BF\u30C7\u30FC\u30BF\u306BEndpointName\u304C\u3042\u308A\u307E\u305B\u3093 +null.wsdl= EPR\u306B\u306F\u73FE\u5728\u306E\u64CD\u4F5C\u306B\u5FC5\u8981\u306AWSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093 +notfound.service.in.wsdl= WSDL: {1}\u306B\u30B5\u30FC\u30D3\u30B9: {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +no.wsdl.no.port = \u30D7\u30ED\u30AD\u30B7\u3092\u4F5C\u6210\u3059\u308B\u305F\u3081\u306EWSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u307E\u305F\u306FServiceEndpointInterface {0}\u306BWSDL\u60C5\u5831\u304C\u5FC5\u8981\u3067\u3059 +notfound.port.in.wsdl=WSDL: {2}\u306E\u30B5\u30FC\u30D3\u30B9: {1}\u306E\u30DD\u30FC\u30C8: {0}\u306F\u6709\u52B9\u306A\u30DD\u30FC\u30C8\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +error.wsdl= WSDL: {0}\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F +null.epr= EndpointReference\u304Cnull\u3067\u3059 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties new file mode 100644 index 00000000000..2e77661aaa7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_ko.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=EPR\uC758 \uC8FC\uC18C\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +null.address.service.endpoint=serviceName \uB610\uB294 portName\uC774 \uB110\uC778 \uACBD\uC6B0 EPR\uC758 \uC8FC\uC18C\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +null.service=portName\uC774 \uC9C0\uC815\uB41C \uACBD\uC6B0 serviceName\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +null.portname=EPR\uC758 \uBA54\uD0C0 \uB370\uC774\uD130\uC5D0 EndpointName\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +null.wsdl= \uD604\uC7AC \uC791\uC5C5\uC5D0 \uD544\uC694\uD55C WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uAC00 EPR\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4. +notfound.service.in.wsdl= {0} \uC11C\uBE44\uC2A4\uB97C WSDL\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {1} +no.wsdl.no.port = \uD504\uB85D\uC2DC \uC0DD\uC131\uC5D0 WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC11C\uBE44\uC2A4 \uC778\uC2A4\uD134\uC2A4 \uB610\uB294 ServiceEndpointInterface {0}\uC5D0 WSDL \uC815\uBCF4\uAC00 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. +notfound.port.in.wsdl={0} \uD3EC\uD2B8\uAC00 WSDL\uC758 {1} \uC11C\uBE44\uC2A4\uC5D0 \uC801\uD569\uD55C \uD3EC\uD2B8\uAC00 \uC544\uB2D8: {2} +error.wsdl= WSDL\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0} +null.epr= EndpointReference\uAC00 \uB110\uC785\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties new file mode 100644 index 00000000000..e1b7d9184f9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_pt_BR.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=O endere\u00E7o em um EPR n\u00E3o pode ser nulo +null.address.service.endpoint=O endere\u00E7o em um EPF n\u00E3o poder\u00E1 ser nulo quando serviceName ou portName for nulo +null.service=serviceName n\u00E3o poder\u00E1 ser nulo quando portName for especificado +null.portname=O EPF n\u00E3o tem EndpointName nos Metadados +null.wsdl= O EPR n\u00E3o tem os Metadados WSDL necess\u00E1rios \u00E0 opera\u00E7\u00E3o atual +notfound.service.in.wsdl= Servi\u00E7o: {0} n\u00E3o encontrado no WSDL: {1} +no.wsdl.no.port = Os Metadados WSDL n\u00E3o est\u00E3o dispon\u00EDveis para criar o proxy; a inst\u00E2ncia Service ou ServiceEndpointInterface {0} deve ter informa\u00E7\u00F5es do WSDL +notfound.port.in.wsdl=Porta: {0} n\u00E3o \u00E9 uma porta v\u00E1lida no Servi\u00E7o {1} no WSDL {2} +error.wsdl= Erro ao fazer parse do WSDL: {0} +null.epr= EndpointReference \u00E9 nulo diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties new file mode 100644 index 00000000000..c01eadd9be4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_CN.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=EPR \u4E2D\u7684\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A\u503C +null.address.service.endpoint=\u5F53 serviceName \u6216 portName \u4E3A\u7A7A\u503C\u65F6, EPR \u4E2D\u7684\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A\u503C +null.service=\u6307\u5B9A portName \u65F6, serviceName \u4E0D\u80FD\u4E3A\u7A7A\u503C +null.portname=EPR \u7684\u5143\u6570\u636E\u4E2D\u6CA1\u6709 EndpointName +null.wsdl= EPR \u6CA1\u6709\u5F53\u524D\u64CD\u4F5C\u6240\u9700\u7684 WSDL \u5143\u6570\u636E +notfound.service.in.wsdl= \u5728 WSDL {1}\u4E2D\u672A\u627E\u5230\u670D\u52A1{0} +no.wsdl.no.port = WSDL \u5143\u6570\u636E\u65E0\u6CD5\u7528\u4E8E\u521B\u5EFA\u4EE3\u7406, \u670D\u52A1\u5B9E\u4F8B\u6216 ServiceEndpointInterface {0}\u5E94\u5305\u542B WSDL \u4FE1\u606F +notfound.port.in.wsdl=\u7AEF\u53E3{0}\u4E0D\u662F WSDL {2}\u7684\u670D\u52A1{1}\u4E2D\u7684\u6709\u6548\u7AEF\u53E3 +error.wsdl= \u89E3\u6790 WSDL \u65F6\u51FA\u9519: {0} +null.epr= EndpointReference \u4E3A\u7A7A\u503C diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties new file mode 100644 index 00000000000..d9d38bb4971 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/providerApi_zh_TW.properties @@ -0,0 +1,35 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +null.address=EPR \u4E2D\u7684\u4F4D\u5740\u4E0D\u53EF\u70BA\u7A7A\u503C +null.address.service.endpoint=\u7576 serviceName \u6216 portName \u70BA\u7A7A\u503C\u6642, EPR \u4E2D\u7684\u4F4D\u5740\u4E0D\u53EF\u70BA\u7A7A\u503C +null.service=\u7576\u6307\u5B9A portName \u6642, serviceName \u4E0D\u53EF\u70BA\u7A7A\u503C +null.portname=EPR \u7684\u63CF\u8FF0\u8CC7\u6599\u4E2D\u6C92\u6709 EndpointName +null.wsdl= EPR \u6C92\u6709\u76EE\u524D\u4F5C\u696D\u6240\u9700\u7684 WSDL \u63CF\u8FF0\u8CC7\u6599 +notfound.service.in.wsdl= \u5728 WSDL: {1} \u4E2D\u627E\u4E0D\u5230\u670D\u52D9: {0} +no.wsdl.no.port = WSDL \u63CF\u8FF0\u8CC7\u6599\u7121\u6CD5\u7528\u65BC\u5EFA\u7ACB\u4EE3\u7406\u4E3B\u6A5F, \u670D\u52D9\u57F7\u884C\u8655\u7406\u6216 ServiceEndpointInterface {0} \u61C9\u5305\u542B WSDL \u8CC7\u8A0A +notfound.port.in.wsdl=WSDL: {2} \u4E2D\u4E4B\u670D\u52D9: {1} \u7684\u9023\u63A5\u57E0: {0} \u4E0D\u662F\u6709\u6548\u7684\u9023\u63A5\u57E0 +error.wsdl= \u5256\u6790 WSDL \u6642\u767C\u751F\u932F\u8AA4: {0} +null.epr= EndpointReference \u70BA\u7A7A\u503C diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties index 9a38a1a84a9..c43dfacd066 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties new file mode 100644 index 00000000000..246ab9a0dcc --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_de.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=Absenderfehler: {0} +sender.request.messageNotReady=Nachricht nicht zum Senden bereit +sender.response.cannotDecodeFaultDetail=Fault-Details k\u00F6nnen nicht decodiert werden +sender.request.illegalValueForContentNegotiation=Unzul\u00E4ssiger Wert f\u00FCr Contentnegotiationseigenschaft \\"{0}\\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties new file mode 100644 index 00000000000..69776f3ba00 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_es.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=error de remitente: {0} +sender.request.messageNotReady=el mensaje no est\u00E1 preparado para ser enviado +sender.response.cannotDecodeFaultDetail=no se puede descodificar el detalle del fallo +sender.request.illegalValueForContentNegotiation=valor no v\u00E1lido para la propiedad de negociaci\u00F3n de contenido \"{0}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties new file mode 100644 index 00000000000..b472fd1662e --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_fr.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=erreur d''\u00E9metteur : {0} +sender.request.messageNotReady=le message n'est pas pr\u00EAt \u00E0 \u00EAtre envoy\u00E9 +sender.response.cannotDecodeFaultDetail=le d\u00E9tail par d\u00E9faut ne peut pas \u00EAtre d\u00E9cod\u00E9 +sender.request.illegalValueForContentNegotiation=valeur interdite pour la propri\u00E9t\u00E9 de n\u00E9gociation de contenu \"{0}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties new file mode 100644 index 00000000000..62ee177ea04 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_it.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=errore del mittente: {0} +sender.request.messageNotReady=il messaggio non \u00E8 pronto per essere inviato +sender.response.cannotDecodeFaultDetail=impossibile decodificare i dettagli dell'errore +sender.request.illegalValueForContentNegotiation=valore non valido per la propriet\u00E0 di negoziazione del contenuto \"{0}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties new file mode 100644 index 00000000000..7696a1d79fa --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ja.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=\u9001\u4FE1\u5074\u30A8\u30E9\u30FC: {0} +sender.request.messageNotReady=\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u9001\u4FE1\u3059\u308B\u6E96\u5099\u304C\u3067\u304D\u3066\u3044\u307E\u305B\u3093 +sender.response.cannotDecodeFaultDetail=\u30D5\u30A9\u30EB\u30C8\u8A73\u7D30\u3092\u30C7\u30B3\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093 +sender.request.illegalValueForContentNegotiation=\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30CD\u30B4\u30B7\u30A8\u30FC\u30B7\u30E7\u30F3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\"{0}\"\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties new file mode 100644 index 00000000000..5746e91a8ff --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_ko.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=\uBC1C\uC2E0\uC790 \uC624\uB958: {0} +sender.request.messageNotReady=\uBA54\uC2DC\uC9C0 \uC804\uC1A1 \uC900\uBE44\uAC00 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +sender.response.cannotDecodeFaultDetail=\uACB0\uD568 \uC138\uBD80 \uC815\uBCF4\uB97C \uB514\uCF54\uB529\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +sender.request.illegalValueForContentNegotiation=\uCF58\uD150\uCE20 \uD611\uC0C1 \uC18D\uC131 \"{0}\"\uC5D0 \uB300\uD55C \uAC12\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties new file mode 100644 index 00000000000..4cc56be5734 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_pt_BR.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=erro do emissor: {0} +sender.request.messageNotReady=a mensagem n\u00E3o est\u00E1 pronta para ser enviada +sender.response.cannotDecodeFaultDetail=o detalhe da falha n\u00E3o pode ser decodificado +sender.request.illegalValueForContentNegotiation=valor inv\u00E1lido para a propriedade \"{0}\" de negocia\u00E7\u00E3o de conte\u00FAdo diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties new file mode 100644 index 00000000000..22b0c1d3232 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_CN.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=\u53D1\u9001\u65B9\u9519\u8BEF: {0} +sender.request.messageNotReady=\u6D88\u606F\u5C1A\u672A\u5C31\u7EEA, \u65E0\u6CD5\u53D1\u9001 +sender.response.cannotDecodeFaultDetail=\u65E0\u6CD5\u89E3\u7801\u6545\u969C\u8BE6\u7EC6\u4FE1\u606F +sender.request.illegalValueForContentNegotiation=\u5185\u5BB9\u534F\u5546\u5C5E\u6027 \"{0}\" \u7684\u503C\u975E\u6CD5 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties new file mode 100644 index 00000000000..2bf72dee8be --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/sender_zh_TW.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# Wrapped into an Exception. {0} - localizable exception message of another exception +sender.nestedError=\u5BC4\u4EF6\u8005\u932F\u8AA4: {0} +sender.request.messageNotReady=\u8A0A\u606F\u5C1A\u672A\u5099\u59A5, \u7121\u6CD5\u50B3\u9001 +sender.response.cannotDecodeFaultDetail=\u7121\u6CD5\u89E3\u78BC\u932F\u8AA4\u8A73\u7D30\u8CC7\u8A0A +sender.request.illegalValueForContentNegotiation=\u5167\u5BB9\u5354\u8B70\u7279\u6027 \"{0}\" \u7684\u503C\u7121\u6548 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties index a47b94befad..a94cb838d67 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties new file mode 100644 index 00000000000..5476c17b2df --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_de.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=Fehler beim Decodieren von SOAP-Nachricht +server.rt.err=Serverlaufzeitfehler: {0} +soapencoder.err=Fehler beim Codieren von SOAP-Nachricht + +annotation.only.once=Nur eine Methode kann die Annotation \"{0}\" enthalten +not.zero.parameters=Methode \"{0}\" darf keine Argumente enthalten + +wrong.field.type=Ung\u00FCltiger Typ f\u00FCr Feld \"{0}\" +wrong.no.parameters=Ung\u00FCltige Anzahl Argumente f\u00FCr Methode \"{0}\" +wrong.parameter.type=Ung\u00FCltige Argumenttypen f\u00FCr Methode \"{0}\" + +can.not.generate.wsdl=WSDL f\u00FCr Binding \"{0}\" kann nicht generiert werden +generate.non.standard.wsdl=Nicht-Standard-WSDL f\u00FCr das angegebene Binding wird generiert +null.implementor=Implementor darf nicht null sein + +runtime.wsdl.patcher=Fehler beim Patchen des zu WSDL geh\u00F6rigen Dokuments + +# {0} - class name +not.implement.provider=\"{0}\" implementiert Provider nicht +# {0} - class name +provider.not.parameterized=\"{0}\" implementiert Provider, gibt jedoch den Typparameter nicht an +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" implementiert Provider, der Typparameter {1} ist jedoch ung\u00FCltig + +wsdl.required=WSDL ist erforderlich +service.name.required=Service-QName nicht gefunden +port.name.required=Port-QName nicht gefunden +wrong.tns.for.port=Port-Namespace {0} stimmt nicht mit Service-Namespace {1} \u00FCberein + +# {0} - probably URL/port of a server +already.http.server=Es ist bereits ein HTTP-Server vorhanden in: {0}# {0} - wahrscheinlich URL/Port eines Servers +already.https.server=Es ist bereits ein HTTPS-Server vorhanden in: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=Unterst\u00FCtzt Endpoint.publish({0}) nicht. Bekannte Kontexttypen sind {1} und {2} + +duplicate.primary.wsdl=Metadaten enthalten mehr als eine WSDL, die die Servicedefinition f\u00FCr den End Point enth\u00E4lt. WSDL={0} ist eine derartige WSDL. +duplicate.abstract.wsdl=Metadaten enthalten mehr als eine WSDL, die die PortType-Definition f\u00FCr den End Point enth\u00E4lt. WSDL={0} ist eine derartige WSDL. + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=Klasse in Laufzeitdeskriptor nicht gefunden: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=Fehler beim Parsen von Laufzeitdeskriptor: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=unerwarteter Content in Laufzeitdeskriptor (Zeile {0}) +runtime.parser.invalidElement=ung\u00FCltiges Element \"{1}\" in Laufzeitdeskriptor (Zeile {0}) +runtime.parser.invalidAttributeValue=ung\u00FCltiger Wert f\u00FCr Attribut \"{2}\" von Element \"{1}\" in Laufzeitdeskriptor (Zeile {0}) +runtime.parser.invalidVersionNumber=nicht unterst\u00FCtzte Laufzeitdeskriptorversion: {2} +runtime.parser.missing.attribute=fehlendes Attribut \"{2}\" in Element \"{1}\" von Laufzeitdeskriptor (Zeile {0}) +runtime.parser.invalid.attribute.value=ung\u00FCltiger Attributwert \"{1}\" in Laufzeitdeskriptor (Zeile {0}) +runtime.parser.missing.attribute.no.line=fehlendes Attribut \"{2}\" in Element \"{1}\" von Laufzeitdeskriptor +runtime.parser.wrong.element=Element \"{1}\" ermittelt, \"{2}\" in Laufzeitdeskriptor erwartet (Zeile {0}) +runtime.parser.wsdl.not.found={0} wurde in der .war-Datei nicht gefunden. Verpacken Sie sie in der .war-Datei, oder korrigieren Sie sie in sun-jaxws.xml. +runtime.parser.wsdl=Ausnahme beim Parsen von WSDL: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=mehrere Bindings f\u00FCr Binding-ID {0} f\u00FCr Service {1} in WSDL {2} gefunden +runtime.parser.wsdl.noservice.in.wsdlmodel=Bei der Verarbeitung der WSDL {0} ist ein Fehler aufgetreten, und es wurden keine g\u00FCltigen Services gefunden. +runtime.parser.wsdl.incorrectservice=Binding konnte nicht aus WSDL!-Service abgerufen werden: {0} nicht in der WSDL {1} gefunden.\nM\u00F6glicherweise stimmt der Servicename nicht mit wsdl:service-Name der WSDL \u00FCberein. Folgende Ursachen sind m\u00F6glich:\n1. Servicename ist in Deployment-Deskriptor nicht vorhanden\n2. Der Servicename des Deployment-Deskriptors enth\u00E4lt einen Tippfehler.\n3. Die berechneten Namen aus @WebService stimmen nicht mit wsdl:service-Name \u00FCberein \nODER\n4. Beim Parsen der WSDL ist ein Fehler aufgetreten und der Service mit Name {0} wurde in WSDLModel nicht gefunden.\nEs wird empfohlen, dass Sie eine der folgenden Schritte ausf\u00FChren:\n1. F\u00FCgen Sie Eintr\u00E4ge f\u00FCr den Servicenamen in den Deployment-Deskriptor ein bzw. korrigieren Sie diese \n2. Geben Sie targetNamespace, serviceName in @WebService in der End Point-Klasse an + +runtime.parser.wsdl.incorrectserviceport=Binding konnte nicht aus WSDL!-Service abgerufen werden: {0} oder Port {1} wurde nicht in der WSDL gefunden {2}.\nM\u00F6glicherweise stimmen die Service- und Portnamen nicht mit den wsdl:service- und wsdl:port-Namen der WSDL \u00FCberein. Folgende Ursachen sind m\u00F6glich:\n1. Service- und Portnamen sind im Deployment-Deskriptor nicht vorhanden.\n2. Die Service- und Portnamen im Deployment-Deskriptor enthalten einen Tippfehler.\n3. Die berechneten Namen aus @WebService stimmen nicht mit den wsdl:service- und wsdl:port-Namen \u00FCberein.\nEs wird empfohlen, dass Sie einen der folgenden Schritte ausf\u00FChren:\n1. F\u00FCgen Sie Eintr\u00E4ge f\u00FCr die Service- und Portnamen in den Deployment-Deskriptor ein bzw. korrigieren Sie diese.\n2. Geben Sie targetNamespace, serviceName, portName in @WebService in der End Point-Klasse an + +stateful.cookie.header.required=Dies ist ein Stateful-Webservice und {0}-Header ist erforderlich. +stateful.cookie.header.incorrect=Ung\u00FCltiger/abgelaufener {0}-Header-Wert: {1} +stateful.invalid.webservice.context=Kein WebServiceContext aus JAX-WS RI: {0} +stateful.requres.addressing=Stateful-Webservice {0} erfordert die Unterst\u00FCtzung der WS-Adressierung, damit er aktiviert werden kann. M\u00F6glicherweise fehlt @Addressing + +no.current.packet=Dieser Thread verarbeitet aktuell keine Webserviceanforderung + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver={0} kann nicht instanziiert werden (wird in {1} in {2} angegeben) + +static.resource.injection.only=Injection von statischer Ressource {0} in nicht-statischer "{1}" ist nicht m\u00F6glich + +dd.mtom.conflict = Fehler in Deployment-Deskriptor: MTOM-Konfiguration in Binding {0} ist nicht mit enable-mtom-Attributwert {1} vereinbar + +# {0} - qname of an element +dispatch.cannotFindMethod=Verteilungsmethode f\u00FCr {0} kann nicht gefunden werden +non.unique.dispatch.qname=Nicht eindeutige Textteile. Gem\u00E4\u00DF BP 1.1 R2710 m\u00FCssen Vorg\u00E4nge in einem Port eindeutige Vorgangssignaturen enthalten, damit die Verteilung erfolgreich verl\u00E4uft. Methoden {0} haben denselben Anforderungstextblock {1}. Die Verteilung von Methoden verl\u00E4uft m\u00F6glicherweise nicht erfolgreich, die Laufzeitumgebung wird versuchen, die Verteilung mit SOAPAction vorzunehmen. Eine andere M\u00F6glichkeit besteht darin, AddressingFeature zu aktivieren, damit die Laufzeitumgebung WSDL-Vorg\u00E4nge eindeutig mit wsa:Action-Header identifizieren kann. + +unsupported.contentType=Nicht unterst\u00FCtzter Content-Type: {0} Unterst\u00FCtzte Content-Types sind: {1} +no.contentType=Die Anforderung hat keinen Content-Type. +unsupported.charset=Nicht unterst\u00FCtzter Zeichensatz "{0}" im Content-Type der empfangenen Nachricht +duplicate.portKnownHeader=Empfangene SOAP-Nachricht enth\u00E4lt doppelten Header: {0} f\u00FCr einen gebundenen Parameter + +runtimemodeler.invalidannotationOnImpl=Ung\u00FCltige Annotation: {0} bei End Point-Implementierungsklasse \\"{1}\\" - wird ignoriert. \\"{1}\\" ist mit @WebService-Annotation versehen (endpointInterface=\\"{2}\\"}, sie darf keine {0}-Annotation enthalten. Um das Problem zu beheben, setzen Sie diese Annotation in SEI {2}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties new file mode 100644 index 00000000000..8194ec01045 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_es.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=Error al descodificar el mensaje de SOAP +server.rt.err=Error en tiempo de ejecuci\u00F3n del servidor: {0} +soapencoder.err=Error al codificar el mensaje de SOAP + +annotation.only.once=S\u00F3lo un m\u00E9todo debe tener la anotaci\u00F3n \"{0}\" +not.zero.parameters=El m\u00E9todo \"{0}\" no deber\u00EDa tener ning\u00FAn argumento + +wrong.field.type=Tipo incorrecto para el campo \\"{0}\\" +wrong.no.parameters=N\u00FAmero de argumentos incorrecto para el m\u00E9todo \"{0}\". +wrong.parameter.type=Tipos de argumentos incorrectos para el m\u00E9todo \"{0}\" + +can.not.generate.wsdl=No se puede generar el WSDL para el enlace \"{0}\" +generate.non.standard.wsdl=Generando WSDL no est\u00E1ndar para el enlace especificado +null.implementor=El implantador no puede ser nulo + +runtime.wsdl.patcher=error al aplicar el parche al documento relacionado con el WSDL + +# {0} - class name +not.implement.provider=\"{0}\" no implanta el proveedor +# {0} - class name +provider.not.parameterized=\"{0}\" implanta el proveedor, pero no especifica el par\u00E1metro del tipo +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" implanta el proveedor, pero el par\u00E1metro de tipo {1} es incorrecto + +wsdl.required=el WSDL es necesario +service.name.required=No se ha encontrado el QName del servicio +port.name.required=No se ha encontrado el QName del puerto +wrong.tns.for.port=El espacio de nombres del puerto {0} no coincide con el espacio de nombres del servicio {1} + +# {0} - probably URL/port of a server +already.http.server=Ya hay un servidor HTTP en: {0}# {0}; probablemente es la URL/puerto de un servidor +already.https.server=Ya hay un servidor HTTPS en: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=No soporta Endpoint.publish({0}). Los tipos de contextos conocidos son {1} y {2} + +duplicate.primary.wsdl=Los metadatos tienen m\u00E1s de un WSDL que tiene una definici\u00F3n de servicio para el punto final. WSDL={0} es uno de esos WSDL. +duplicate.abstract.wsdl=Los metadatos tienen m\u00E1s de un WSDL que tiene una definici\u00F3n de PortType para el punto final. WSDL={0} es uno de esos WSDL. + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=No se ha encontrado la clase en el descriptor de tiempo de ejecuci\u00F3n: {0}. +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=Error al analizar el descriptor de tiempo de ejecuci\u00F3n: {0}. +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=contenido inesperado en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0}) +runtime.parser.invalidElement=elemento no v\u00E1lido \"{1}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0}) +runtime.parser.invalidAttributeValue=valor no v\u00E1lido para el atributo \"{2}\" del elemento \"{1}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0}) +runtime.parser.invalidVersionNumber=versi\u00F3n del descriptor de tiempo de ejecuci\u00F3n no soportada: {2} +runtime.parser.missing.attribute=falta el atributo \"{2}\" en el elemento \"{1}\" del descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0}) +runtime.parser.invalid.attribute.value=valor de atributo no v\u00E1lido \"{1}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea {0}) +runtime.parser.missing.attribute.no.line=falta el atributo \"{2}\" en el elemento \"{1}\" del descriptor de tiempo de ejecuci\u00F3n +runtime.parser.wrong.element=se ha encontrado el elemento \"{1}\", pero se esperaba \"{2}\" en el descriptor de tiempo de ejecuci\u00F3n (l\u00EDnea{0}) +runtime.parser.wsdl.not.found={0} no se ha encontrado en el archivo WAR. Empaqu\u00E9telo en el archivo WAR o corr\u00EDjalo en sun-jaxws.xml. +runtime.parser.wsdl=excepci\u00F3n durante el an\u00E1lisis de WSDL: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=se han encontrado varios enlaces para el identificador de enlace {0} del servicio {1} en el WSDL {2} +runtime.parser.wsdl.noservice.in.wsdlmodel=Se ha producido un error al procesar el WSDL {0} y no se ha encontrado ning\u00FAn servicio v\u00E1lido. +runtime.parser.wsdl.incorrectservice=no se ha podido obtener el enlace del WSDL. El servicio {0} no se ha encontrado en el WSDL {1}.\nEsto podr\u00EDa deberse a que el nombre del servicio no coincide con el nombre de wsdl:service del WSDL:\n1. el nombre de servicio no est\u00E1 all\u00ED en el descriptor de despliegue O \n2. Tambi\u00E9n puede haber un error tipogr\u00E1fico en el nombre de servicio del descriptor de despliegue O\n3. Los nombres calculados de @WebService no coinciden con el nombre de wsdl:service\nO\n1. Se ha producido un error al analizar el WSDL y el servicio con el nombre {0} no se ha encontrado en WSDLModel.\nSe sugiere lo siguiente:\n1. Agregar o corregir las entradas del nombre de servicio en el descriptor de despliegue O \n2. Especificar targetNamespace, serviceName en @WebService en la clase de punto final + +runtime.parser.wsdl.incorrectserviceport=no se ha podido obtener el enlace del WSDL. El servicio: {0} o el puerto {1} no se han encontrado en el WSDL {2}.\nEsto podr\u00EDa deberse a que los nombres del servicio y el puerto no coinciden con los nombres de wsdl:service y wsdl:port del WSDL:\n1. los nombres de servicio y de puerto no est\u00E1n all\u00ED en el descriptor de despliegue O\n2. Tambi\u00E9n puede haber un error tipogr\u00E1fico en los nombres de servicio y de puerto del descriptor de despliegue O\n3. Los nombres calculados de @WebService no coinciden con los nombres de wsdl:service y wsdl:port\nSe sugiere lo siguiente:\n1. Agregar o corregir las entradas de los nombres de servicio y de puerto en el descriptor de despliegue O \n2. Especificar targetNamespace, serviceName, portName en @WebService en la clase de punto final + +stateful.cookie.header.required=Esto es un servicio web con estado y se necesita la cabecera {0}. +stateful.cookie.header.incorrect=Valor de cabecera {0} no v\u00E1lido/caducado: {1} +stateful.invalid.webservice.context=No es un WebServiceContext de la implantaci\u00F3n de referencia de JAX-WS: {0} +stateful.requres.addressing=El servicio web con estado {0} necesita que est\u00E9 activado el soporte de WS-Addressing. Quiz\u00E1 le falta @Addressing + +no.current.packet=Este thread no est\u00E1 procesando actualmente ninguna solicitud de servicio web. + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver=No se ha podido instanciar {0} (que se especifica en {1} en {2}) + +static.resource.injection.only=El recurso est\u00E1tico {0} no se puede inyectar en un "{1}" no est\u00E1tico + +dd.mtom.conflict = Error en el descriptor de despliegue: la configuraci\u00F3n de MTOM en el enlace {0} entra en conflicto con el valor del atributo enable-mtom {1} + +# {0} - qname of an element +dispatch.cannotFindMethod=No se ha encontrado el m\u00E9todo de distribuci\u00F3n de {0} +non.unique.dispatch.qname=Partes de cuerpo no \u00FAnicas. En un puerto, las operaciones R2710 de BP 1.1 deben tener una firma de operaci\u00F3n \u00FAnica en la transmisi\u00F3n para que se distribuyan correctamente. Los m\u00E9todos {0} poseen el mismo bloque del cuerpo de solicitud {1}. Puede que la distribuci\u00F3n de m\u00E9todos falle, en cuyo caso el tiempo de ejecuci\u00F3n intentar\u00E1 realizar la distribuci\u00F3n utilizando la acci\u00F3n de SOAP. Otra opci\u00F3n es activar AddressingFeature para permitir que el tiempo de ejecuci\u00F3n identifique la operaci\u00F3n de WSDL de manera \u00FAnica utilizando la cabecera de wsa:Action. + +unsupported.contentType=Tipo de contenido no soportado: {0} Los soportados son: {1} +no.contentType=La solicitud no tiene un tipo de contenido +unsupported.charset=Juego de caracteres no soportado "{0}" en el tipo de contenido del mensaje recibido +duplicate.portKnownHeader=El mensaje SOAP recibido contiene una cabecera duplicada: {0} para un par\u00E1metro enlazado + +runtimemodeler.invalidannotationOnImpl=La anotaci\u00F3n no v\u00E1lida: {0} en la clase de implantaci\u00F3n de punto final \\"{1}\\" se ignorar\u00E1. \\"{1}\\" est\u00E1 anotado con @WebService(endpointInterface=\\"{2}\\"}; no se debe anotar con {0}; para corregirlo, coloque esta anotaci\u00F3n en la interfaz de punto final de servicio {2}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties new file mode 100644 index 00000000000..0ff4d89e502 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_fr.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=Erreur lors du d\u00E9codage du message SOAP +server.rt.err=Erreur d''ex\u00E9cution du serveur : {0} +soapencoder.err=Erreur de l'encodage du message SOAP + +annotation.only.once=Une seule m\u00E9thode doit comporter l''annotation \"{0}\" +not.zero.parameters=La m\u00E9thode \"{0}\" ne doit comporter aucun argument + +wrong.field.type=Type incorrect pour le champ \"{0}\" +wrong.no.parameters=Nombre incorrect d''arguments pour la m\u00E9thode \"{0}\" +wrong.parameter.type=Types d''argument incorrects pour la m\u00E9thode \"{0}\" + +can.not.generate.wsdl=Impossible de g\u00E9n\u00E9rer le WSDL pour le binding \"{0}\" +generate.non.standard.wsdl=G\u00E9n\u00E9ration d'un WSDL non standard pour le binding indiqu\u00E9 +null.implementor=L'impl\u00E9mentateur ne peut pas \u00EAtre NULL + +runtime.wsdl.patcher=erreur lors de l'application de patches sur le document associ\u00E9 au WSDL + +# {0} - class name +not.implement.provider=\"{0}\" n''impl\u00E9mente pas le fournisseur +# {0} - class name +provider.not.parameterized=\"{0}\" impl\u00E9mente le fournisseur mais n''indique pas le param\u00E8tre de type +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" impl\u00E9mente le fournisseur mais son param\u00E8tre de type {1} est incorrect + +wsdl.required=le WSDL est obligatoire +service.name.required=Le QName de service est introuvable +port.name.required=Le QName de port est introuvable +wrong.tns.for.port=L''espace de noms de port {0} ne correspond \u00E0 aucun espace de noms de service {1} + +# {0} - probably URL/port of a server +already.http.server=Il existe d\u00E9j\u00E0 un serveur HTTP dans {0}# {0}, probablement l''URL/le port d''un serveur +already.https.server=Il existe d\u00E9j\u00E0 un serveur HTTP dans {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=Ne prend pas en charge Endpoint.publish({0}). Les types de contexte connus sont {1} et {2} + +duplicate.primary.wsdl=Les m\u00E9tadonn\u00E9es comportent plusieurs WSDL ayant une d\u00E9finition de service pour l''adresse. Le WSDL {0} est l''un d''entre eux. +duplicate.abstract.wsdl=Les m\u00E9tadonn\u00E9es comportent plusieurs WSDL ayant une d\u00E9finition PortType pour l''adresse. Le WSDL {0} est l''un d''entre eux + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=classe introuvable dans le descripteur d''ex\u00E9cution : {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=erreur lors de l''analyse du descripteur d''ex\u00E9cution : {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=contenu inattendu dans le descripteur d''ex\u00E9cution (ligne {0}) +runtime.parser.invalidElement=\u00E9l\u00E9ment \"{1}\" non valide dans le descripteur d''ex\u00E9cution (ligne {0}) +runtime.parser.invalidAttributeValue=valeur non valide pour l''attribut \"{2}\" de l''\u00E9l\u00E9ment \"{1}\" dans le descripteur d''ex\u00E9cution (ligne {0}) +runtime.parser.invalidVersionNumber=version de descripteur d''ex\u00E9cution non prise en charge : {2} +runtime.parser.missing.attribute=attribut \"{2}\" manquant dans l''\u00E9l\u00E9ment \"{1}\" du descripteur d''ex\u00E9cution (ligne {0}) +runtime.parser.invalid.attribute.value=valeur d''attribut \"{1}\" non valide dans le descripteur d''ex\u00E9cution (ligne {0}) +runtime.parser.missing.attribute.no.line=attribut \"{2}\" manquant dans l''\u00E9l\u00E9ment \"{1}\" du descripteur d''ex\u00E9cution +runtime.parser.wrong.element=\u00E9l\u00E9ment \"{1}\" trouv\u00E9, \"{2}\" attendu dans le descripteur d''ex\u00E9cution (ligne {0}) +runtime.parser.wsdl.not.found={0} est introuvable dans le fichier WAR. Packagez-le dans le fichier WAR ou corrigez-le dans sun-jaxws.xml. +runtime.parser.wsdl=exception lors de l''analyse du WSDL : {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=plusieurs bindings trouv\u00E9s dans l''ID de binding {0} pour le service {1} dans le WSDL {2} +runtime.parser.wsdl.noservice.in.wsdlmodel=Une erreur s''est produite lors du traitement du WSDL {0} et aucun service valide n''a \u00E9t\u00E9 trouv\u00E9. +runtime.parser.wsdl.incorrectservice=impossible d''obtenir le binding du service WSDL : {0} introuvable dans le WSDL {1}.\nCela peut \u00EAtre d\u00FB au fait que le nom de service ne correspond pas au nom wsdl:service du WSDL :\n1. Le nom de service ne figure pas dans le descripteur de d\u00E9ploiement. OU\n2. Le nom de service du descripteur de d\u00E9ploiement comporte une faute de frappe. OU\n3. Les noms calcul\u00E9s \u00E0 partir de @WebService ne correspondent pas au nom wsdl:service.\nOU\n4. Une erreur a \u00E9t\u00E9 d\u00E9tect\u00E9e lors de l''analyse du WSDL et le service portant le nom {0} est introuvable dans le WSDLModel.\nNous vous sugg\u00E9rons les solutions suivantes :\n1. Ajoutez/Corrigez les entr\u00E9es pour le nom de service dans le descripteur de d\u00E9ploiement OU \n2. Indiquez targetNamespace, serviceName dans @WebService sur la classe d''adresse + +runtime.parser.wsdl.incorrectserviceport=impossible d''obtenir le binding \u00E0 partir du service WSDL {0} ou le port {1} est introuvable dans le WSDL {2}.\nCela peut \u00EAtre d\u00FB au fait que les noms de service et de port ne correspondant pas aux noms wsdl:service et wsdl:port du WSDL :\n1. Les noms de service et de port ne figurent pas dans le descripteur de d\u00E9ploiement. OU\n2. Les noms de service et de port du descripteur de d\u00E9ploiement comportent une faute de frappe. OU\n3. Les noms calcul\u00E9s \u00E0 partir de @WebService ne correspondent pas aux noms wsdl:service et wsdl:port.\nNous vous sugg\u00E9rons les solutions suivantes :\n1. Ajoutez/Corrigez les entr\u00E9es pour les noms de service et de port dans le descripteur de d\u00E9ploiement. OU \n2. Indiquez targetNamespace, serviceName, portName dans @WebService sur la classe d''adresse. + +stateful.cookie.header.required=Il s''agit d''un service Web avec conservation de statut et l''en-t\u00EAte {0} est obligatoire. +stateful.cookie.header.incorrect=Valeur d''en-t\u00EAte {0} non valide/arriv\u00E9e \u00E0 expiration : {1} +stateful.invalid.webservice.context=N''est pas un \u00E9l\u00E9ment WebServiceContext de l''impl\u00E9mentation de r\u00E9f\u00E9rence JAX-WS : {0} +stateful.requres.addressing=Le service Web avec conservation de statut {0} exige l''activation de la prise en charge de WS-Addressing. Il manque peut-\u00EAtre @Addressing + +no.current.packet=Ce thread ne traite actuellement aucune demande de service Web. + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver=Impossible d''instancier {0} (indiqu\u00E9 dans {1} sur {2}) + +static.resource.injection.only=La ressource statique {0} ne peut pas \u00EAtre inject\u00E9e dans un \u00E9l\u00E9ment "{1}" non statique + +dd.mtom.conflict = Erreur dans le descripteur de d\u00E9ploiement : la configuration MTOM dans le binding {0} est en conflit avec la valeur d''attribut enable-mtom {1} + +# {0} - qname of an element +dispatch.cannotFindMethod=M\u00E9thode de r\u00E9partition introuvable pour {0} +non.unique.dispatch.qname=Parties du corps non uniques. Dans un port, les op\u00E9rations BP 1.1 R2710 doivent comporter une signature d''op\u00E9ration unique sur le wire pour une r\u00E9partition r\u00E9ussie. Les m\u00E9thodes {0} ont le m\u00EAme bloc de corps de demande {1}. La r\u00E9partition de m\u00E9thode peut \u00E9chouer, le runtime essaiera d''effectuer la r\u00E9partition \u00E0 l''aide de SOAPAction. Vous pouvez \u00E9galement activer AddressingFeature pour permettre au runtime d''identifier de mani\u00E8re unique l''op\u00E9ration WSDL \u00E0 l''aide de l''en-t\u00EAte wsa:Action. + +unsupported.contentType=Content-Type non pris en charge : {0}. Les \u00E9l\u00E9ments pris en charge sont : {1} +no.contentType=Content-Type manquant dans la demande +unsupported.charset=Jeu de caract\u00E8res "{0}" non pris en charge dans l''en-t\u00EAte Content-Type du message re\u00E7u +duplicate.portKnownHeader=Le message SOAP re\u00E7u contient un en-t\u00EAte en double {0} pour un param\u00E8tre li\u00E9 + +runtimemodeler.invalidannotationOnImpl=L''annotation non valide {0} sur la classe d''impl\u00E9mentation d''adresse \"{1}\" ne sera pas prise en compte. \"{1}\" est annot\u00E9 avec @WebService(endpointInterface = \"{2}\"}, il doit \u00EAtre annot\u00E9 avec {0} ; pour le corriger, placez cette annotation sur l''interface d''adresse de service {2}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties new file mode 100644 index 00000000000..482f243b7da --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_it.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=Errore durante la decodifica del messaggio SOAP +server.rt.err=errore in fase di esecuzione del server: {0} +soapencoder.err=Errore durante la codifica del messaggio SOAP + +annotation.only.once=Solo un metodo deve avere l''annotazione \"{0}\" +not.zero.parameters=Il metodo \"{0}\" non deve avere alcun argomento + +wrong.field.type=Tipo errato per il campo \"{0}\" +wrong.no.parameters=Numero errato di argomenti per il metodo \"{0}\" +wrong.parameter.type=Tipi di argomenti errati per il metodo \"{0}\" + +can.not.generate.wsdl=Impossibile generare WSDL per l''associazione \"{0}\" +generate.non.standard.wsdl=Generazione di WSDL non standard per l'associazione specificata +null.implementor=L'implementatore non pu\u00F2 essere nullo + +runtime.wsdl.patcher=errore durante l'applicazione di patch al documento relativo a WSDL + +# {0} - class name +not.implement.provider=\"{0}\" non implementa il provider +# {0} - class name +provider.not.parameterized=\"{0}\" implementa il provider ma non specifica il parametro del tipo +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" implementa il provider ma il relativo parametro del tipo {1} \u00E8 errato + +wsdl.required=WSDL \u00E8 obbligatorio +service.name.required=QName del servizio non trovato +port.name.required=QName della porta non trovato +wrong.tns.for.port=Lo spazio di nomi della porta {0} non corrisponde allo spazio di nomi del servizio {1} + +# {0} - probably URL/port of a server +already.http.server=Esiste gi\u00E0 un server HTTPS in: {0}# {0} - probabilmente l''URL o la porta di un server +already.https.server=Esiste gi\u00E0 un server HTTPS in: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=Non supporta Endpoint.publish({0}). I tipi di contesto conosciuti sono {1} e {2} + +duplicate.primary.wsdl=I metadati hanno pi\u00F9 WSDL contenenti la definizione di servizio per l''endpoint. WSDL={0} \u00E8 uno di tali WSDL. +duplicate.abstract.wsdl=I metadati hanno pi\u00F9 WSDL contenenti la definizione PortType per l''endpoint. WSDL={0} \u00E8 uno di tali WSDL. + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=classe non trovata nel descrittore di runtime: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=errore durante l''analisi del descrittore di runtime: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=contenuto imprevisto nel descrittore di runtime (riga {0}) +runtime.parser.invalidElement=elemento non valido \"{1}\" nel descrittore di runtime (riga {0}) +runtime.parser.invalidAttributeValue=valore non valido per l''attributo \"{2}\" dell''elemento \"{1}\" nel descrittore di runtime (riga {0}) +runtime.parser.invalidVersionNumber=versione del descrittore di runtime non supportata: {2} +runtime.parser.missing.attribute=attributo mancante \"{2}\" nell''elemento \"{1}\" del descrittore di runtime (riga {0}) +runtime.parser.invalid.attribute.value=valore dell''attributo non valido \"{1}\" nel descrittore di runtime (riga {0}) +runtime.parser.missing.attribute.no.line=attributo mancante \"{2}\" nell''elemento \"{1}\" del descrittore di runtime +runtime.parser.wrong.element=trovato elemento \"{1}\", previsto \"{2}\", nel descrittore di runtime (riga {0}) +runtime.parser.wsdl.not.found={0} non trovato nel file WAR. Inserirlo all''interno di un package nel file WAR oppure correggerlo in sun-jaxws.xml. +runtime.parser.wsdl=eccezione durante l''analisi di WSDL: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=trovate pi\u00F9 associazioni per l''ID associazione {0} per il servizio {1} in WSDL {2} +runtime.parser.wsdl.noservice.in.wsdlmodel=Errore durante l''elaborazione di WSDL {0} e nessun servizio valido trovato. +runtime.parser.wsdl.incorrectservice=impossibile ottenere l''associazione da WSDL. Servizio: {0} non trovato in WSDL {1}.\nIl motivo potrebbe essere la mancata corrispondenza del nome servizio con il nome sdl:service di WSDL:\n1. Il nome servizio non \u00E8 presente nel descrittore di distribuzione O\n2. Nel nome servizio del descrittore di distribuzione \u00E8 presente un errore di battitura O\n3. I nomi calcolati da @WebService non corrispondono al nome wsdl:service\nO\n1. Si \u00E8 verificato un errore durante l''analisi di WSDL e il servizio con nome {0} non \u00E8 stato trovato in WSDLModel.\nSi suggerisce di eseguire le seguenti operazioni:\n1. Aggiungere/correggere le voci per il nome servizio nel descrittore di distribuzione O \n2. Specificare targetNamespace, serviceName in @WebService sulla classe dell''endpoint + +runtime.parser.wsdl.incorrectserviceport=impossibile ottenere l''associazione da WSDL. Servizio: {0} o porta {1} non trovati in WSDL {2}.\nIl motivo potrebbe essere la mancata corrispondenza dei nomi servizio e porta con i nomi wsdl:service e wsdl:port di WSDL:\n1. I nomi servizio e porta non sono presenti nel descrittore di distribuzione O\n2. Nei nomi servizio e porta del descrittore di distribuzione \u00E8 presente un errore di battitura O\n3. I nomi calcolati da @WebService non corrispondono ai nomi wsdl:service e wsdl:port\nSi suggerisce di eseguire le seguenti operazioni:\n1. Aggiungere/correggere le voci per i nomi servizio e porta nel descrittore di distribuzione O \n2. Specificare targetNamespace, serviceName, portName in @WebService sulla classe dell''endpoint + +stateful.cookie.header.required=Questo \u00E8 un servizio Web con conservazione dello stato ed \u00E8 obbligatoria l''intestazione {0}. +stateful.cookie.header.incorrect=Valore dell''intestazione {0} non valido/scaduto: {1} +stateful.invalid.webservice.context=Non un WebServiceContext da JAX-WS RI: {0} +stateful.requres.addressing=Il servizio Web con conservazione dello stato {0} richiede l''abilitazione del supporto WS-Addressing. \u00C8 possibile che manchi @Addressing + +no.current.packet=Al momento questo thread non sta elaborando alcuna richiesta del servizio Web. + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver=Impossibile creare un''istanza di {0} (specificata in {1} su {2}) + +static.resource.injection.only=Impossibile inserire la risorsa statica {0} in "{1}" non statico + +dd.mtom.conflict = Errore nel descrittore di distribuzione: la configurazione MTOM nell''associazione {0} \u00E8 in conflitto con il valore dell''attributo enable-mtom {1} + +# {0} - qname of an element +dispatch.cannotFindMethod=Impossibile trovare il metodo di spedizione per {0} +non.unique.dispatch.qname=Parti del corpo non univoche. In una porta, come per BP 1.1 R2710, le operazioni devono avere una firma dell''operazione univoca in rete affinch\u00E9 la spedizione riesca. I metodi {0} hanno lo stesso blocco del corpo della richiesta {1}. Se il metodo di spedizione non riesce, runtime prover\u00E0 a consegnare usando SOAPAction. Un''altra opzione \u00E8 di abilitare AddressingFeature per il runtime abilitato in modo che identifichi solo l''operazione WSDL usando l''intestazione wsa:Action. + +unsupported.contentType=Content-Type non supportato: {0}. I tipi supportati sono: {1} +no.contentType=La richiesta non ha un Content-Type +unsupported.charset=Set di caratteri non supportato "{0}" nel Content-Type del messaggio ricevuto +duplicate.portKnownHeader=Il messaggio SOAP ricevuto contiene un''intestazione duplicata: {0} per un parametro associato + +runtimemodeler.invalidannotationOnImpl=Annotazione non valida: {0} sulla classe di implementazione dell''endpoint \"{1}\" e pertanto verr\u00E0 ignorata. \"{1}\" \u00E8 annotato con @WebService(endpointInterface=\"{2}\"}, non deve essere annotato con {0}. Per correggerlo inserire questa annotazione su SEI {2}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties new file mode 100644 index 00000000000..7a01e10ddfd --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ja.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u30C7\u30B3\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F +server.rt.err=\u30B5\u30FC\u30D0\u30FC\u5B9F\u884C\u6642\u30A8\u30E9\u30FC: {0} +soapencoder.err=SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u30A8\u30F3\u30B3\u30FC\u30C9\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F + +annotation.only.once=\u6CE8\u91C8\"{0}\"\u3092\u4ED8\u3051\u308B\u30E1\u30BD\u30C3\u30C9\u306F1\u3064\u306E\u307F\u3068\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +not.zero.parameters=\u30E1\u30BD\u30C3\u30C9\"{0}\"\u306B\u306F\u5F15\u6570\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 + +wrong.field.type=\u30D5\u30A3\u30FC\u30EB\u30C9\"{0}\"\u306E\u30BF\u30A4\u30D7\u304C\u4E0D\u6B63\u3067\u3059 +wrong.no.parameters=\u30E1\u30BD\u30C3\u30C9\"{0}\"\u306E\u5F15\u6570\u306E\u6570\u304C\u4E0D\u6B63\u3067\u3059 +wrong.parameter.type=\u30E1\u30BD\u30C3\u30C9\"{0}\"\u306E\u5F15\u6570\u30BF\u30A4\u30D7\u304C\u4E0D\u6B63\u3067\u3059 + +can.not.generate.wsdl=\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\"{0}\"\u7528\u306EWSDL\u3092\u751F\u6210\u3067\u304D\u307E\u305B\u3093 +generate.non.standard.wsdl=\u6307\u5B9A\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u7528\u306E\u975E\u6A19\u6E96WSDL\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059 +null.implementor=\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u306Fnull\u306B\u3067\u304D\u307E\u305B\u3093 + +runtime.wsdl.patcher=WSDL\u95A2\u9023\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3078\u306E\u30D1\u30C3\u30C1\u9069\u7528\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F + +# {0} - class name +not.implement.provider=\"{0}\"\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u305B\u3093 +# {0} - class name +provider.not.parameterized=\"{0}\"\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6307\u5B9A\u3057\u3066\u3044\u307E\u305B\u3093 +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\"\u306F\u30D7\u30ED\u30D0\u30A4\u30C0\u3092\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u304C\u3001\u30BF\u30A4\u30D7\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF{1}\u304C\u4E0D\u6B63\u3067\u3059 + +wsdl.required=WSDL\u306F\u5FC5\u9808\u3067\u3059 +service.name.required=\u30B5\u30FC\u30D3\u30B9\u306EQName\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +port.name.required=\u30DD\u30FC\u30C8\u306EQName\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +wrong.tns.for.port=\u30DD\u30FC\u30C8\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{0}\u304C\u30B5\u30FC\u30D3\u30B9\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{1}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 + +# {0} - probably URL/port of a server +already.http.server=\u6B21\u306E\u5834\u6240\u306B\u3059\u3067\u306BHTTP\u30B5\u30FC\u30D0\u30FC\u304C\u3042\u308A\u307E\u3059: {0}# {0} - \u901A\u5E38\u306F\u30B5\u30FC\u30D0\u30FC\u306EURL/\u30DD\u30FC\u30C8 +already.https.server=\u6B21\u306E\u5834\u6240\u306B\u3059\u3067\u306BHTTPS\u30B5\u30FC\u30D0\u30FC\u304C\u3042\u308A\u307E\u3059: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=Endpoint.publish({0})\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u4E0D\u660E\u306A\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30BF\u30A4\u30D7\u306F{1}\u304A\u3088\u3073{2}\u3067\u3059 + +duplicate.primary.wsdl=\u30E1\u30BF\u30C7\u30FC\u30BF\u306B\u3001\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306E\u30B5\u30FC\u30D3\u30B9\u5B9A\u7FA9\u304C\u3042\u308B\u8907\u6570\u306EWSDL\u304C\u542B\u307E\u308C\u307E\u3059\u3002WSDL={0}\u306F\u305D\u306E\u3088\u3046\u306AWSDL\u306E\u4E00\u3064\u3067\u3059\u3002 +duplicate.abstract.wsdl=\u30E1\u30BF\u30C7\u30FC\u30BF\u306B\u3001\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306EPortType\u5B9A\u7FA9\u304C\u3042\u308B\u8907\u6570\u306EWSDL\u304C\u542B\u307E\u308C\u307E\u3059\u3002WSDL={0}\u306F\u305D\u306E\u3088\u3046\u306AWSDL\u306E\u4E00\u3064\u3067\u3059\u3002 + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u306B\u4E88\u671F\u3057\u306A\u3044\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059 +runtime.parser.invalidElement=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u3067\u8981\u7D20\"{1}\"\u304C\u7121\u52B9\u3067\u3059 +runtime.parser.invalidAttributeValue=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u3067\u8981\u7D20\"{1}\"\u306E\u5C5E\u6027\"{2}\"\u306E\u5024\u304C\u7121\u52B9\u3067\u3059 +runtime.parser.invalidVersionNumber=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u30FB\u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u3059: {2} +runtime.parser.missing.attribute=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u306E\u8981\u7D20\"{1}\"\u306B\u5C5E\u6027\"{2}\"\u304C\u3042\u308A\u307E\u305B\u3093 +runtime.parser.invalid.attribute.value=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u3067\u5C5E\u6027\u5024\"{1}\"\u304C\u7121\u52B9\u3067\u3059 +runtime.parser.missing.attribute.no.line=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u8981\u7D20\"{1}\"\u306B\u5C5E\u6027\"{2}\"\u304C\u3042\u308A\u307E\u305B\u3093 +runtime.parser.wrong.element=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF(\u884C{0})\u306B\u8981\u7D20\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\"{2}\"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059 +runtime.parser.wsdl.not.found=WAR\u30D5\u30A1\u30A4\u30EB\u306B{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\u3053\u308C\u3092WAR\u30D5\u30A1\u30A4\u30EB\u306B\u30D1\u30C3\u30B1\u30FC\u30B8\u5316\u3059\u308B\u304B\u3001sun-jaxws.xml\u3067\u4FEE\u6B63\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +runtime.parser.wsdl=WSDL\u306E\u89E3\u6790\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=WSDL {2}\u306E\u30B5\u30FC\u30D3\u30B9{1}\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0ID {0}\u306B\u8907\u6570\u306E\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +runtime.parser.wsdl.noservice.in.wsdlmodel=WSDL {0}\u306E\u51E6\u7406\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6709\u52B9\u306A\u30B5\u30FC\u30D3\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002 +runtime.parser.wsdl.incorrectservice=WSDL\u304B\u3089\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B5\u30FC\u30D3\u30B9: {0}\u304CWSDL {1}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\n\u30B5\u30FC\u30D3\u30B9\u540D\u304CWSDL\u306Ewsdl:service\u540D\u3068\u4E00\u81F4\u3057\u306A\u3044\u305F\u3081\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059: \n1. \u30B5\u30FC\u30D3\u30B9\u540D\u304C\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u3042\u308A\u307E\u305B\u3093\n2.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u30B5\u30FC\u30D3\u30B9\u540D\u306B\u5165\u529B\u30DF\u30B9\u304C\u3042\u308A\u307E\u3059\n3.@WebService\u304B\u3089\u7B97\u51FA\u3055\u308C\u305F\u540D\u524D\u304Cwsdl:service\u540D\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\n\u307E\u305F\u306F\n1.wsdl\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u540D\u524D{0}\u306E\u30B5\u30FC\u30D3\u30B9\u304CWSDLModel\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\n\u6B21\u306E\u3068\u304A\u308A\u5B9F\u884C\u3059\u308B\u3053\u3068\u3092\u304A\u85A6\u3081\u3057\u307E\u3059:\n1.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u30B5\u30FC\u30D3\u30B9\u540D\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001\u4FEE\u6B63\u3057\u307E\u3059\u3002\u307E\u305F\u306F\n2.\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u306E@WebService\u3067\u3001targetNamespace\u3001serviceName\u3092\u6307\u5B9A\u3057\u307E\u3059 + +runtime.parser.wsdl.incorrectserviceport=WSDL\u304B\u3089\u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30B5\u30FC\u30D3\u30B9: {0}\u307E\u305F\u306F\u30DD\u30FC\u30C8{1}\u304CWSDL {2}\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002\n\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u304CWSDL\u306Ewsdl:service\u540D\u304A\u3088\u3073wsdl:port\u540D\u3068\u4E00\u81F4\u3057\u306A\u3044\u305F\u3081\u3067\u3042\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059:\n1.\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u304C\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u3042\u308A\u307E\u305B\u3093\n2.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u306B\u5165\u529B\u30DF\u30B9\u304C\u3042\u308A\u307E\u3059\n3.@WebService\u304B\u3089\u7B97\u51FA\u3055\u308C\u305F\u540D\u524D\u304Cwsdl:service\u540D\u304A\u3088\u3073wsdl:port\u540D\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\n\u6B21\u306E\u3068\u304A\u308A\u5B9F\u884C\u3059\u308B\u3053\u3068\u3092\u304A\u85A6\u3081\u3057\u307E\u3059:\n1.\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u30B5\u30FC\u30D3\u30B9\u540D\u304A\u3088\u3073\u30DD\u30FC\u30C8\u540D\u306E\u30A8\u30F3\u30C8\u30EA\u3092\u8FFD\u52A0\u3059\u308B\u304B\u3001\u4FEE\u6B63\u3057\u307E\u3059\u3002\u307E\u305F\u306F\n2.\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30AF\u30E9\u30B9\u306E@WebService\u3067\u3001targetNamespace\u3001serviceName\u3001portName\u3092\u6307\u5B9A\u3057\u307E\u3059 + +stateful.cookie.header.required=\u3053\u308C\u306F\u30B9\u30C6\u30FC\u30C8\u30D5\u30EBWeb\u30B5\u30FC\u30D3\u30B9\u3067\u3042\u308A\u3001{0}\u30D8\u30C3\u30C0\u30FC\u304C\u5FC5\u8981\u3067\u3059\u3002 +stateful.cookie.header.incorrect=\u7121\u52B9/\u671F\u9650\u5207\u308C{0}\u30D8\u30C3\u30C0\u30FC\u5024: {1} +stateful.invalid.webservice.context=JAX-WS RI\u306EWebServiceContext\u3067\u306F\u3042\u308A\u307E\u305B\u3093: {0} +stateful.requres.addressing=\u30B9\u30C6\u30FC\u30C8\u30D5\u30EBWeb\u30B5\u30FC\u30D3\u30B9{0}\u3067\u306F\u3001WS-Addressing\u306E\u30B5\u30DD\u30FC\u30C8\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002@Addressing\u304C\u6B20\u843D\u3057\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 + +no.current.packet=\u3053\u306E\u30B9\u30EC\u30C3\u30C9\u3067\u306F\u3001\u73FE\u5728\u3044\u305A\u308C\u306EWeb\u30B5\u30FC\u30D3\u30B9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u3082\u51E6\u7406\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002 + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver={0} ({2}\u306E{1}\u3067\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059)\u3092\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3067\u304D\u307E\u305B\u3093 + +static.resource.injection.only=\u9759\u7684\u30EA\u30BD\u30FC\u30B9{0}\u306F\u9759\u7684\u3067\u306A\u3044"{1}"\u306B\u6CE8\u5165\u3067\u304D\u307E\u305B\u3093 + +dd.mtom.conflict = \u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306E\u30A8\u30E9\u30FC: \u30D0\u30A4\u30F3\u30C7\u30A3\u30F3\u30B0{0}\u306EMTOM\u69CB\u6210\u304Cenable-mtom\u306E\u5C5E\u6027\u5024{1}\u3068\u7AF6\u5408\u3057\u3066\u3044\u307E\u3059 + +# {0} - qname of an element +dispatch.cannotFindMethod={0}\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u30FB\u30E1\u30BD\u30C3\u30C9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +non.unique.dispatch.qname=\u672C\u6587\u30D1\u30FC\u30C8\u304C\u4E00\u610F\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u30DD\u30FC\u30C8\u306B\u304A\u3044\u3066BP 1.1 R2710\u306E\u3068\u304A\u308A\u3001\u6B63\u5E38\u306B\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u3059\u308B\u305F\u3081\u306B\u64CD\u4F5C\u306B\u306F\u901A\u4FE1\u4E0A\u306B\u4E00\u610F\u306E\u64CD\u4F5C\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9{0}\u306B\u540C\u3058\u30EA\u30AF\u30A8\u30B9\u30C8\u672C\u6587\u30D6\u30ED\u30C3\u30AF{1}\u304C\u3042\u308A\u307E\u3059\u3002\u30E1\u30BD\u30C3\u30C9\u306E\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u5931\u6557\u3057\u305F\u5834\u5408\u306F\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066SOAPAction\u3092\u4F7F\u7528\u3057\u305F\u30C7\u30A3\u30B9\u30D1\u30C3\u30C1\u304C\u8A66\u884C\u3055\u308C\u307E\u3059\u3002\u307E\u305F\u3001\u6709\u52B9\u5316\u3055\u308C\u305F\u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u5BFE\u3057\u3066AddressingFeature\u3092\u6709\u52B9\u5316\u3057\u3001wsa:Action\u30D8\u30C3\u30C0\u30FC\u3092\u4F7F\u7528\u3057\u3066WSDL\u64CD\u4F5C\u3092\u4E00\u610F\u306B\u8B58\u5225\u3059\u308B\u65B9\u6CD5\u3082\u3042\u308A\u307E\u3059\u3002 + +unsupported.contentType=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044Content-Type: {0} \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u306E\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059: {1} +no.contentType=\u30EA\u30AF\u30A8\u30B9\u30C8\u306BContent-Type\u304C\u3042\u308A\u307E\u305B\u3093 +unsupported.charset=\u53D7\u3051\u53D6\u3063\u305F\u30E1\u30C3\u30BB\u30FC\u30B8\u306EContent-Type\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u6587\u5B57\u30BB\u30C3\u30C8"{0}"\u304C\u3042\u308A\u307E\u3059 +duplicate.portKnownHeader=\u53D7\u3051\u53D6\u3063\u305FSOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3001\u30D0\u30A4\u30F3\u30C9\u3055\u308C\u305F\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u5BFE\u3059\u308B\u91CD\u8907\u3059\u308B\u30D8\u30C3\u30C0\u30FC: {0}\u304C\u542B\u307E\u308C\u307E\u3059 + +runtimemodeler.invalidannotationOnImpl=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u5B9F\u88C5\u30AF\u30E9\u30B9\"{1}\"\u306E\u7121\u52B9\u306A\u6CE8\u91C8: {0} - \u7121\u8996\u3055\u308C\u307E\u3059\u3002\"{1}\"\u306B\u306F@WebService(endpointInterface=\"{2}\"}\u306E\u6CE8\u91C8\u304C\u4ED8\u3044\u3066\u3044\u307E\u3059\u304C\u3001{0}\u306E\u6CE8\u91C8\u3092\u4ED8\u3051\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002\u4FEE\u6B63\u3059\u308B\u306B\u306F\u3001SEI {2}\u306B\u3053\u306E\u6CE8\u91C8\u3092\u7F6E\u304D\u307E\u3059\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties new file mode 100644 index 00000000000..114322656c0 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_ko.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=SOAP \uBA54\uC2DC\uC9C0\uB97C \uB514\uCF54\uB529\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +server.rt.err=\uC11C\uBC84 \uB7F0\uD0C0\uC784 \uC624\uB958: {0} +soapencoder.err=SOAP \uBA54\uC2DC\uC9C0\uB97C \uC778\uCF54\uB529\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. + +annotation.only.once=\uD558\uB098\uC758 \uBA54\uC18C\uB4DC\uC5D0\uB9CC \"{0}\" \uC8FC\uC11D\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. +not.zero.parameters=\"{0}\" \uBA54\uC18C\uB4DC\uC5D0\uB294 \uC778\uC218\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +wrong.field.type=\"{0}\" \uD544\uB4DC\uC5D0 \uB300\uD55C \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wrong.no.parameters=\"{0}\" \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C \uC778\uC218 \uC218\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +wrong.parameter.type=\"{0}\" \uBA54\uC18C\uB4DC\uC5D0 \uB300\uD55C \uC778\uC218 \uC720\uD615\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +can.not.generate.wsdl=\"{0}\" \uBC14\uC778\uB529\uC5D0 \uB300\uD55C WSDL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +generate.non.standard.wsdl=\uC9C0\uC815\uB41C \uBC14\uC778\uB529\uC5D0 \uB300\uD55C \uBE44\uD45C\uC900 WSDL\uC744 \uC0DD\uC131\uD558\uB294 \uC911 +null.implementor=\uAD6C\uD604\uC790\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +runtime.wsdl.patcher=WSDL \uAD00\uB828 \uBB38\uC11C\uC758 \uD328\uCE58\uB97C \uC801\uC6A9\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. + +# {0} - class name +not.implement.provider=\"{0}\"\uC774(\uAC00) \uC81C\uACF5\uC790\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# {0} - class name +provider.not.parameterized=\"{0}\"\uC774(\uAC00) \uC81C\uACF5\uC790\uB97C \uAD6C\uD604\uD558\uC9C0\uB9CC \uC720\uD615 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\"\uC774(\uAC00) \uC81C\uACF5\uC790\uB97C \uAD6C\uD604\uD558\uC9C0\uB9CC \uD574\uB2F9 \uC720\uD615 \uB9E4\uAC1C\uBCC0\uC218 {1}\uC774(\uAC00) \uC62C\uBC14\uB974\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +wsdl.required=WSDL\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +service.name.required=\uC11C\uBE44\uC2A4 QName\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +port.name.required=\uD3EC\uD2B8 QName\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +wrong.tns.for.port=\uD3EC\uD2B8 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 {0}\uC774(\uAC00) \uC11C\uBE44\uC2A4 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 {1}\uACFC(\uC640) \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +# {0} - probably URL/port of a server +already.http.server={0}#\uC5D0 HTTP \uC11C\uBC84\uAC00 \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4. {0}\uC740(\uB294) \uC11C\uBC84\uC758 URL/\uD3EC\uD2B8\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. +already.https.server={0}\uC5D0 HTTPS \uC11C\uBC84\uAC00 \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4. +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=Endpoint.publish({0})\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uD655\uC778\uB41C \uCEE8\uD14D\uC2A4\uD2B8 \uC720\uD615\uC740 {1} \uBC0F {2}\uC785\uB2C8\uB2E4. + +duplicate.primary.wsdl=\uBA54\uD0C0 \uB370\uC774\uD130\uC5D0 \uB05D\uC810\uC5D0 \uB300\uD55C \uC11C\uBE44\uC2A4 \uC815\uC758\uB97C \uD3EC\uD568\uD558\uB294 WSDL\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. WSDL={0}\uC774(\uAC00) \uD574\uB2F9 WSDL \uC911 \uD558\uB098\uC785\uB2C8\uB2E4. +duplicate.abstract.wsdl=\uBA54\uD0C0 \uB370\uC774\uD130\uC5D0 \uB05D\uC810\uC5D0 \uB300\uD55C PortType \uC815\uC758\uB97C \uD3EC\uD568\uD558\uB294 WSDL\uC774 \uB450 \uAC1C \uC774\uC0C1 \uC788\uC2B5\uB2C8\uB2E4. WSDL={0}\uC774(\uAC00) \uD574\uB2F9 WSDL \uC911 \uD558\uB098\uC785\uB2C8\uB2E4. + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=\uD074\uB798\uC2A4\uB97C \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958 \uBC1C\uC0DD: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \uC608\uC0C1\uCE58 \uC54A\uC740 \uCF58\uD150\uCE20\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +runtime.parser.invalidElement=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uC694\uC18C \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +runtime.parser.invalidAttributeValue=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \"{1}\" \uC694\uC18C\uC758 \"{2}\" \uC18D\uC131\uC5D0 \uB300\uD55C \uBD80\uC801\uD569\uD55C \uAC12\uC774 \uC788\uC2B5\uB2C8\uB2E4. +runtime.parser.invalidVersionNumber=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790 \uBC84\uC804: {2} +runtime.parser.missing.attribute=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC758 \"{1}\" \uC694\uC18C\uC5D0 \"{2}\" \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +runtime.parser.invalid.attribute.value=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0 \uBD80\uC801\uD569\uD55C \uC18D\uC131\uAC12 \"{1}\"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +runtime.parser.missing.attribute.no.line=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \"{1}\" \uC694\uC18C\uC5D0 \"{2}\" \uC18D\uC131\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +runtime.parser.wrong.element=\"{1}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790({0}\uD589)\uC5D0\uB294 \"{2}\"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4. +runtime.parser.wsdl.not.found={0}\uC744(\uB97C) WAR \uD30C\uC77C\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. WAR \uD30C\uC77C\uC5D0\uC11C \uD328\uD0A4\uC9C0\uD654\uD558\uAC70\uB098 sun-jaxws.xml\uC5D0\uC11C \uC218\uC815\uD558\uC2ED\uC2DC\uC624. +runtime.parser.wsdl=WSDL \uAD6C\uBB38 \uBD84\uC11D \uC911 \uC608\uC678 \uC0AC\uD56D \uBC1C\uC0DD: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding={1} \uC11C\uBE44\uC2A4\uC758 \uBC14\uC778\uB529 ID {0}\uC5D0 \uB300\uD55C \uBC14\uC778\uB529\uC774 WSDL {2}\uC5D0\uC11C \uC5EC\uB7EC \uAC1C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +runtime.parser.wsdl.noservice.in.wsdlmodel=WSDL {0}\uC744(\uB97C) \uCC98\uB9AC\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC73C\uBA70 \uC801\uD569\uD55C \uC11C\uBE44\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +runtime.parser.wsdl.incorrectservice=WSDL\uC5D0\uC11C \uBC14\uC778\uB529\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! {0} \uC11C\uBE44\uC2A4\uB97C WSDL {1}\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC11C\uBE44\uC2A4 \uC774\uB984\uC774 WSDL\uC758 wsdl:service name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n1. \uC11C\uBE44\uC2A4 \uC774\uB984\uC774 \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.\n2. \uBC30\uCE58 \uAE30\uC220\uC790\uC758 \uC11C\uBE44\uC2A4 \uC774\uB984\uC5D0 \uCCA0\uC790 \uC624\uB958\uAC00 \uC788\uC2B5\uB2C8\uB2E4.\n3. @WebService\uC758 \uACC4\uC0B0\uB41C \uC774\uB984\uC774 wsdl:service name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uB610\uB294\n1. WSDL\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC73C\uBA70 \uC774\uB984\uC774 {0}\uC778 \uC11C\uBE44\uC2A4\uB97C WSDLModel\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC218\uD589\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n1. \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0\uC11C \uC11C\uBE44\uC2A4 \uC774\uB984\uC5D0 \uB300\uD55C \uD56D\uBAA9\uC744 \uCD94\uAC00/\uC218\uC815\uD569\uB2C8\uB2E4. \n2. \uB05D\uC810 \uD074\uB798\uC2A4\uC758 @WebService\uC5D0 targetNamespace, serviceName\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. + +runtime.parser.wsdl.incorrectserviceport=WSDL\uC5D0\uC11C \uBC14\uC778\uB529\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4! {0} \uC11C\uBE44\uC2A4 \uB610\uB294 {1} \uD3EC\uD2B8\uB97C WSDL {2}\uC5D0\uC11C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n\uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC774 WSDL\uC758 wsdl:service name \uBC0F wsdl:port name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.\n1. \uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC774 \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0 \uC5C6\uC2B5\uB2C8\uB2E4.\n2. \uBC30\uCE58 \uAE30\uC220\uC790\uC758 \uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC5D0 \uCCA0\uC790 \uC624\uB958\uAC00 \uC788\uC2B5\uB2C8\uB2E4.\n3. @WebService\uC758 \uACC4\uC0B0\uB41C \uC774\uB984\uC774 wsdl:service name \uBC0F wsdl:port name\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\n\uB2E4\uC74C \uC791\uC5C5 \uC911 \uD558\uB098\uB97C \uC218\uD589\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.\n1. \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0\uC11C \uC11C\uBE44\uC2A4 \uBC0F \uD3EC\uD2B8 \uC774\uB984\uC5D0 \uB300\uD55C \uD56D\uBAA9\uC744 \uCD94\uAC00/\uC218\uC815\uD569\uB2C8\uB2E4. \n2. \uB05D\uC810 \uD074\uB798\uC2A4\uC758 @WebService\uC5D0 targetNamespace, serviceName, portName\uC744 \uC9C0\uC815\uD569\uB2C8\uB2E4. + +stateful.cookie.header.required=Stateful \uC6F9 \uC11C\uBE44\uC2A4\uC774\uBA70 {0} \uD5E4\uB354\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +stateful.cookie.header.incorrect=\uBD80\uC801\uD569\uD558\uAC70\uB098 \uB9CC\uB8CC\uB41C {0} \uD5E4\uB354 \uAC12: {1} +stateful.invalid.webservice.context=JAX-WS RI\uC758 WebServiceContext\uAC00 \uC544\uB2D8: {0} +stateful.requres.addressing=Stateful \uC6F9 \uC11C\uBE44\uC2A4 {0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uB824\uBA74 WS-Addressing \uC9C0\uC6D0\uC744 \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4. @Addressing\uC774 \uB204\uB77D\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. + +no.current.packet=\uC774 \uC2A4\uB808\uB4DC\uB294 \uD604\uC7AC \uC6F9 \uC11C\uBE44\uC2A4 \uC694\uCCAD\uC744 \uCC98\uB9AC\uD558\uACE0 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver={2}\uC758 {1}\uC5D0 \uC9C0\uC815\uB41C {0}\uC744(\uB97C) \uC778\uC2A4\uD134\uC2A4\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +static.resource.injection.only=\uC815\uC801 \uB9AC\uC18C\uC2A4 {0}\uC744(\uB97C) \uBE44\uC815\uC801 "{1}"\uC5D0 \uC0BD\uC785\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +dd.mtom.conflict = \uBC30\uCE58 \uAE30\uC220\uC790\uC5D0 \uC624\uB958 \uBC1C\uC0DD: {0} \uBC14\uC778\uB529\uC758 MTOM \uAD6C\uC131\uC774 enable-mtom \uC18D\uC131\uAC12 {1}\uACFC(\uC640) \uCDA9\uB3CC\uD569\uB2C8\uB2E4. + +# {0} - qname of an element +dispatch.cannotFindMethod={0}\uC5D0 \uB300\uD55C dispatch \uBA54\uC18C\uB4DC\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +non.unique.dispatch.qname=\uACE0\uC720\uD558\uC9C0 \uC54A\uC740 \uBCF8\uBB38 \uBD80\uBD84\uC785\uB2C8\uB2E4! \uC791\uC5C5 \uD560\uB2F9\uC744 \uC131\uACF5\uC801\uC73C\uB85C \uC218\uD589\uD558\uB824\uBA74 BP 1.1 R2710\uC5D0 \uB530\uB77C \uD3EC\uD2B8\uC5D0\uC11C \uC791\uC5C5\uC5D0 \uACE0\uC720\uD55C \uC791\uC5C5 \uC11C\uBA85\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. {0} \uBA54\uC18C\uB4DC\uC758 \uC694\uCCAD \uBCF8\uBB38 \uBE14\uB85D {1}\uC774(\uAC00) \uB3D9\uC77C\uD569\uB2C8\uB2E4. \uBA54\uC18C\uB4DC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2E4\uD328\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB7F0\uD0C0\uC784\uC774 SOAPAction\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uD560\uB2F9\uC744 \uC2DC\uB3C4\uD569\uB2C8\uB2E4. \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uB41C \uB7F0\uD0C0\uC784\uC5D0 \uB300\uD574 AddressingFeature\uB97C \uC0AC\uC6A9\uC73C\uB85C \uC124\uC815\uD558\uC5EC wsa:Action \uD5E4\uB354\uB97C \uC0AC\uC6A9\uD558\uB294 WSDL \uC791\uC5C5\uC744 \uACE0\uC720\uD558\uAC8C \uC2DD\uBCC4\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. + +unsupported.contentType=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 Content-Type: {0}. \uC9C0\uC6D0\uB418\uB294 Content-Type: {1} +no.contentType=\uC694\uCCAD\uC5D0 Content-Type\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +unsupported.charset=\uC218\uC2E0\uB41C \uBA54\uC2DC\uC9C0\uC758 Content-Type\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uBB38\uC790 \uC9D1\uD569 "{0}"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +duplicate.portKnownHeader=\uC218\uC2E0\uB41C SOAP \uBA54\uC2DC\uC9C0\uC5D0 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294 \uBC14\uC778\uB4DC\uB41C \uB9E4\uAC1C\uBCC0\uC218\uC5D0 \uB300\uD55C {0} \uD5E4\uB354\uAC00 \uC911\uBCF5\uB429\uB2C8\uB2E4. + +runtimemodeler.invalidannotationOnImpl=\uB05D\uC810 \uAD6C\uD604 \uD074\uB798\uC2A4 \"{1}\"\uC758 \uBD80\uC801\uD569\uD55C \uC8FC\uC11D {0}\uC774(\uAC00) \uBB34\uC2DC\uB429\uB2C8\uB2E4. \"{1}\"\uC740(\uB294) @WebService(endpointInterface=\"{2}\")\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC5C8\uC73C\uBA70 {0}(\uC73C)\uB85C \uC8FC\uC11D \uCC98\uB9AC\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uC218\uC815\uD558\uB824\uBA74 SEI {2}\uC5D0\uC11C \uC774 \uC8FC\uC11D\uC744 \uC0BD\uC785\uD558\uC2ED\uC2DC\uC624. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties new file mode 100644 index 00000000000..4e07e979a27 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_pt_BR.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=Erro na decodifica\u00E7\u00E3o da Mensagem SOAP +server.rt.err=Erro de Runtime do Servidor: {0} +soapencoder.err=Erro na codifica\u00E7\u00E3o da Mensagem SOAP + +annotation.only.once=S\u00F3 um m\u00E9todo deve ter a anota\u00E7\u00E3o \"{0}\" +not.zero.parameters=O m\u00E9todo \"{0}\" n\u00E3o deve ter argumentos + +wrong.field.type=Tipo incorreto de campo \"{0}\" +wrong.no.parameters=N\u00FAmero incorreto de argumentos para o m\u00E9todo \"{0}\" +wrong.parameter.type=Tipos de argumentos incorretos para o m\u00E9todo \"{0}\" + +can.not.generate.wsdl=N\u00E3o \u00E9 poss\u00EDvel gerar o WSDL para bind \\"{0}\\" +generate.non.standard.wsdl=Gerando WSDL n\u00E3o padr\u00E3o para o bind especificado +null.implementor=O implementador n\u00E3o pode ser nulo + +runtime.wsdl.patcher=erro ao fazer patch do documento relacionado ao WSDL + +# {0} - class name +not.implement.provider=\"{0}\" n\u00E3o implementa o Provedor +# {0} - class name +provider.not.parameterized=\"{0}\" implementa o Provedor mas n\u00E3o especifica o par\u00E2metro de tipo +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" implementa o Provedor mas seu par\u00E2metro de tipo {1} \u00E9 incorreto + +wsdl.required=wsdl \u00E9 obrigat\u00F3rio +service.name.required=QName de Servi\u00E7o n\u00E3o encontrado +port.name.required=QName da Porta n\u00E3o encontrado +wrong.tns.for.port=O namespace da porta {0} n\u00E3o corresponde ao namespace {1} do Servi\u00E7o + +# {0} - probably URL/port of a server +already.http.server=J\u00E1 existe um servidor HTTP em : {0}# {0} - provavelmente URL/porta de um servidor +already.https.server=J\u00E1 existe um servidor HTTPS em: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=N\u00E3o suporta Endpoint.publish({0}). Os tipos de contexto conhecidos s\u00E3o {1} e {2} + +duplicate.primary.wsdl=Os metadados t\u00EAm mais de um WSDL que tem defini\u00E7\u00E3o de Servi\u00E7o do ponto final. O WSDL={0} \u00E9 um desses WSDLs. +duplicate.abstract.wsdl=Os metadados t\u00EAm mais de um WSDL que tem defini\u00E7\u00E3o de Servi\u00E7o do ponto final. O WSDL={0} \u00E9 desses WSDLs. + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=classe n\u00E3o encontrada no descritor de runtime: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=erro ao fazer parse do descritor de runtime: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=conte\u00FAdo inesperado no descritor de runtime (linha {0}) +runtime.parser.invalidElement=elemento inv\u00E1lido \\"{1}\\" no descritor de runtime (linha {0}) +runtime.parser.invalidAttributeValue=valor inv\u00E1lido para o atributo \\"{2}\\" do elemento \\"{1}\\" no descritor de runtime (linha {0}) +runtime.parser.invalidVersionNumber=vers\u00E3o do descritor de runtime n\u00E3o suportada: {2} +runtime.parser.missing.attribute=atributo \\"{2}\\" n\u00E3o encontrado no elemento \\"{1}\\" do descritor de runtime (linha {0}) +runtime.parser.invalid.attribute.value=valor do atributo inv\u00E1lido \\"{1}\\" no descritor de runtime (linha {0}) +runtime.parser.missing.attribute.no.line=atributo \\"{2}\\" n\u00E3o encontrado no elemento \\"{1}\\" do descritor de runtime +runtime.parser.wrong.element=elemento \\"{1}\\" encontrado, esperava \\"{2}\\" no descritor de runtime (linha {0}) +runtime.parser.wsdl.not.found={0} n\u00E3o encontrado no arquivo WAR. Empacote-o no arquivo WAR ou corrija-o no sun-jaxws.xml. +runtime.parser.wsdl=exce\u00E7\u00E3o durante o parse do WSDL: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=v\u00E1rios binds encontrados para o ID de binding {0} do servi\u00E7o {1} no WSDL {2} +runtime.parser.wsdl.noservice.in.wsdlmodel=Houve um erro no processamento do WSDL {0} e nenhum servi\u00E7o v\u00E1lido foi encontrado. +runtime.parser.wsdl.incorrectservice=n\u00E3o foi poss\u00EDvel obter bind do WSDL!: o servi\u00E7o {0} n\u00E3o foi encontrado no WSDL {1}.\nIsso pode ocorrer porque o nome do servi\u00E7o n\u00E3o corresponde ao wsdl:service name de WSDL:\n1. o nome do servi\u00E7o n\u00E3o est\u00E1 no descritor de implanta\u00E7\u00E3o OU\n2. H\u00E1 um erro de digita\u00E7\u00E3o no nome do servi\u00E7o do descritor de implanta\u00E7\u00E3o OU\n3. Os nomes calculados de @WebService n\u00E3o correspondem ao nome do wsdl:service\nOU\n1. H\u00E1 um erro ao fazer parse do wsdl e o Servi\u00E7o com o nome {0} n\u00E3o foi encontrado no WSDLModel.\nSugerimos o seguinte:\n1. Adicionar/corrigir entradas do nome de servi\u00E7o no descritor de implanta\u00E7\u00E3o OU \n2. Especificar targetNamespace, serviceName no @WebService na classe do ponto final + +runtime.parser.wsdl.incorrectserviceport=n\u00E3o foi poss\u00EDvel obter bind do WSDL!: o servi\u00E7o {0} ou a porta {1} n\u00E3o foi encontrado(a) no WSDL {2}.\nIsso pode ocorrer porque os nomes do servi\u00E7o e da porta n\u00E3o correspondem aos nomes de wsdl:service e wsdl:port de WSDL:\n1. os nomes do servi\u00E7o e da porta n\u00E3o est\u00E3o no descritor de implanta\u00E7\u00E3o OU\n2. H\u00E1 um erro de digita\u00E7\u00E3o no nome do servi\u00E7o e da porta do descritor de implanta\u00E7\u00E3o OU\n3. Os nomes calculados de @WebService n\u00E3o correspondem ao nome do wsdl:service e do wsdl:port\nSugerimos o seguinte:\n1. Adicionar/corrigir entradas de nome de servi\u00E7o e porta no descritor de implanta\u00E7\u00E3o OU \n2. Especificar targetNamespace, serviceName, portName no @WebService na classe do ponto final + +stateful.cookie.header.required=Este \u00E9 um web service com informa\u00E7\u00F5es de estado e o cabe\u00E7alho {0} \u00E9 necess\u00E1rio. +stateful.cookie.header.incorrect=Valor do cabe\u00E7alho {0} inv\u00E1lido/expirado: {1} +stateful.invalid.webservice.context=N\u00E3o \u00E9 uma WebServiceContext de JAX-WS RI: {0} +stateful.requres.addressing=Web service {0} com informa\u00E7\u00F5es de estado requer que o suporte de Endere\u00E7amento de WS seja ativado. Talvez esteja faltando @Addressing + +no.current.packet=Este thread n\u00E3o est\u00E1 processamento nenhuma solicita\u00E7\u00E3o de web servi\u00E7o no momento. + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver=N\u00E3o \u00E9 poss\u00EDvel instanciar {0} (que foi especificado em {1} na {2}) + +static.resource.injection.only=O recurso est\u00E1tico {0} n\u00E3o pode ser injetado para n\u00E3o est\u00E1tico "{1}" + +dd.mtom.conflict = Erro no Descritor de Implanta\u00E7\u00E3o: a Configura\u00E7\u00E3o de MTOM no bind {0} est\u00E1 em conflito com o valor do atributo enable-mtom {1} + +# {0} - qname of an element +dispatch.cannotFindMethod=N\u00E3o \u00E9 poss\u00EDvel localizar o m\u00E9todo de despacho para {0} +non.unique.dispatch.qname=Sem partes do corpo exclusivas! Em uma porta, conforme BP 1.1 R2710, as opera\u00E7\u00F5es devem ter assinatura de opera\u00E7\u00E3o exclusiva na conex\u00E3o para obter despacho com sucesso. Os m\u00E9todos {0} t\u00EAm o mesmo bloco do corpo da solicita\u00E7\u00E3o {1}. O m\u00E9todo de despacho pode falhar, o runtime tentar\u00E1 despachar usando SOAPAction. Outra op\u00E7\u00E3o \u00E9 ativar o AddressingFeature para o runtime ativado identificar exclusivamente a opera\u00E7\u00E3o do WSDL usando o cabe\u00E7alho wsa:Action. + +unsupported.contentType=Tipo de Conte\u00FAdo N\u00E3o Suportado: {0} Os tipos suportados s\u00E3o: {1} +no.contentType=A solicita\u00E7\u00E3o n\u00E3o tem um Tipo de Conte\u00FAdo +unsupported.charset=Conjunto de caracteres "{0}" n\u00E3o suportados no Tipo de Conte\u00FAdo da mensagem recebida +duplicate.portKnownHeader=A mensagem SOAP recebida cont\u00E9m cabe\u00E7alho duplicado: {0} para um par\u00E2metro associado + +runtimemodeler.invalidannotationOnImpl=Anota\u00E7\u00E3o inv\u00E1lida: {0} na classe de implementa\u00E7\u00E3o do ponto final \\"{1}\\" - ser\u00E1 ignorado(a). \\"{1}\\" est\u00E1 anotada com @WebService(endpointInterface=\\"{2}\\"}, ela n\u00E3o deve ser anotada com {0}, para corrig\u00ED-la, coloque esta anota\u00E7\u00E3o no SEI {2}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties new file mode 100644 index 00000000000..13b3cdfb323 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_CN.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=\u89E3\u7801 SOAP \u6D88\u606F\u65F6\u51FA\u9519 +server.rt.err=\u670D\u52A1\u5668\u8FD0\u884C\u65F6\u9519\u8BEF: {0} +soapencoder.err=\u7F16\u7801 SOAP \u6D88\u606F\u65F6\u51FA\u9519 + +annotation.only.once=\u53EA\u80FD\u6709\u4E00\u4E2A\u65B9\u6CD5\u5177\u6709\u6CE8\u91CA \"{0}\" +not.zero.parameters=\u65B9\u6CD5 \"{0}\" \u4E0D\u5E94\u6709\u4EFB\u4F55\u53C2\u6570 + +wrong.field.type=\u5B57\u6BB5 \"{0}\" \u7684\u7C7B\u578B\u4E0D\u6B63\u786E +wrong.no.parameters=\u65B9\u6CD5 \"{0}\" \u7684\u53C2\u6570\u6570\u76EE\u4E0D\u6B63\u786E +wrong.parameter.type=\u65B9\u6CD5 \"{0}\" \u7684\u53C2\u6570\u7C7B\u578B\u4E0D\u6B63\u786E + +can.not.generate.wsdl=\u65E0\u6CD5\u4E3A\u7ED1\u5B9A \"{0}\" \u751F\u6210 WSDL +generate.non.standard.wsdl=\u4E3A\u6307\u5B9A\u7684\u7ED1\u5B9A\u751F\u6210\u975E\u6807\u51C6 WSDL +null.implementor=\u5B9E\u73B0\u65B9\u4E0D\u80FD\u4E3A\u7A7A\u503C + +runtime.wsdl.patcher=\u4E3A WSDL \u76F8\u5173\u6587\u6863\u6253\u8865\u4E01\u65F6\u51FA\u9519 + +# {0} - class name +not.implement.provider=\"{0}\" \u4E0D\u5B9E\u73B0\u63D0\u4F9B\u65B9 +# {0} - class name +provider.not.parameterized=\"{0}\" \u5B9E\u73B0\u63D0\u4F9B\u65B9, \u4F46\u672A\u6307\u5B9A\u7C7B\u578B\u53C2\u6570 +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" \u5B9E\u73B0\u63D0\u4F9B\u65B9, \u4F46\u5176\u7C7B\u578B\u53C2\u6570{1}\u4E0D\u6B63\u786E + +wsdl.required=wsdl \u662F\u5FC5\u9700\u7684 +service.name.required=\u672A\u627E\u5230\u670D\u52A1 QName +port.name.required=\u672A\u627E\u5230\u7AEF\u53E3 QName +wrong.tns.for.port=\u7AEF\u53E3\u540D\u79F0\u7A7A\u95F4{0}\u4E0E\u670D\u52A1\u540D\u79F0\u7A7A\u95F4{1}\u4E0D\u5339\u914D + +# {0} - probably URL/port of a server +already.http.server=\u4EE5\u4E0B\u4F4D\u7F6E\u5DF2\u6709\u4E00\u4E2A HTTP \u670D\u52A1\u5668: {0}# {0} - \u53EF\u80FD\u662F\u670D\u52A1\u5668\u7684 URL/\u7AEF\u53E3 +already.https.server=\u4EE5\u4E0B\u4F4D\u7F6E\u5DF2\u6709\u4E00\u4E2A HTTPS \u670D\u52A1\u5668: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=\u4E0D\u652F\u6301 Endpoint.publish({0})\u3002\u5DF2\u77E5\u4E0A\u4E0B\u6587\u7C7B\u578B\u4E3A{1}\u548C{2} + +duplicate.primary.wsdl=\u5143\u6570\u636E\u6709\u591A\u4E2A WSDL \u5305\u542B\u7AEF\u70B9\u7684\u670D\u52A1\u5B9A\u4E49\u3002WSDL={0}\u5C31\u662F\u5176\u4E2D\u4E00\u4E2A\u8FD9\u6837\u7684 WSDL\u3002 +duplicate.abstract.wsdl=\u5143\u6570\u636E\u6709\u591A\u4E2A WSDL \u5305\u542B\u7AEF\u70B9\u7684 PortType \u5B9A\u4E49\u3002WSDL={0}\u5C31\u662F\u5176\u4E2D\u4E00\u4E2A\u8FD9\u6837\u7684 WSDL\u3002 + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=\u5728\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u672A\u627E\u5230\u7C7B: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=\u89E3\u6790\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u65F6\u51FA\u9519: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u51FA\u73B0\u610F\u5916\u7684\u5185\u5BB9 (\u7B2C {0} \u884C) +runtime.parser.invalidElement=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u7684\u5143\u7D20 \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C) +runtime.parser.invalidAttributeValue=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u7684\u5143\u7D20 \"{1}\" \u7684\u5C5E\u6027 \"{2}\" \u7684\u503C\u65E0\u6548 (\u7B2C {0} \u884C) +runtime.parser.invalidVersionNumber=\u4E0D\u652F\u6301\u7684\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u7248\u672C: {2} +runtime.parser.missing.attribute=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u7684\u5143\u7D20 \"{1}\" \u4E2D\u7F3A\u5C11\u5C5E\u6027 \"{2}\" (\u7B2C {0} \u884C) +runtime.parser.invalid.attribute.value=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u7684\u5C5E\u6027\u503C \"{1}\" \u65E0\u6548 (\u7B2C {0} \u884C) +runtime.parser.missing.attribute.no.line=\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u7684\u5143\u7D20 \"{1}\" \u4E2D\u7F3A\u5C11\u5C5E\u6027 \"{2}\" +runtime.parser.wrong.element=\u5728\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u627E\u5230\u5143\u7D20 \"{1}\", \u5E94\u4E3A \"{2}\" (\u7B2C {0} \u884C) +runtime.parser.wsdl.not.found=\u5728 WAR \u6587\u4EF6\u4E2D\u672A\u627E\u5230{0}\u3002\u8BF7\u5C06\u5B83\u6253\u5305\u5728 WAR \u6587\u4EF6\u4E2D\u6216\u5728 sun-jaxws.xml \u4E2D\u66F4\u6B63\u5B83\u3002 +runtime.parser.wsdl=WSDL \u89E3\u6790\u671F\u95F4\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=\u9488\u5BF9 WSDL {2}\u4E2D\u7684\u670D\u52A1{1}\u7684\u7ED1\u5B9A ID {0}, \u627E\u5230\u591A\u4E2A\u7ED1\u5B9A +runtime.parser.wsdl.noservice.in.wsdlmodel=\u5904\u7406 WSDL {0}\u65F6\u51FA\u9519, \u627E\u4E0D\u5230\u6709\u6548\u7684\u670D\u52A1\u3002 +runtime.parser.wsdl.incorrectservice=\u65E0\u6CD5\u4ECE WSDL \u83B7\u53D6\u7ED1\u5B9A! \u5728 WSDL {1}\u4E2D\u672A\u627E\u5230\u670D\u52A1{0}\u3002\n\u8FD9\u53EF\u80FD\u662F\u56E0\u4E3A\u670D\u52A1\u540D\u4E0E WSDL \u7684 wsdl:service \u540D\u4E0D\u5339\u914D:\n1. \u670D\u52A1\u540D\u6CA1\u6709\u4F4D\u4E8E\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D, \u6216\u8005\n2. \u90E8\u7F72\u63CF\u8FF0\u7B26\u7684\u670D\u52A1\u540D\u4E2D\u5B58\u5728\u62FC\u5199\u9519\u8BEF, \u6216\u8005\n3. \u4ECE @WebService \u8BA1\u7B97\u5F97\u51FA\u7684\u540D\u79F0\u4E0E wsdl:service \u540D\u4E0D\u5339\u914D\n\u6216\u8005\n1. \u89E3\u6790 wsdl \u65F6\u51FA\u9519, \u5728 WSDLModel \u4E2D\u627E\u4E0D\u5230\u540D\u4E3A{0}\u7684\u670D\u52A1\u3002\n\u5EFA\u8BAE\u6267\u884C\u4EE5\u4E0B\u64CD\u4F5C:\n1. \u5728\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D\u6DFB\u52A0/\u66F4\u6B63\u670D\u52A1\u540D\u7684\u6761\u76EE, \u6216\u8005\n2. \u5728\u7AEF\u70B9\u7C7B\u4E0A\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace, serviceName + +runtime.parser.wsdl.incorrectserviceport=\u65E0\u6CD5\u4ECE WSDL \u83B7\u53D6\u7ED1\u5B9A! \u5728 WSDL {2}\u4E2D\u672A\u627E\u5230\u670D\u52A1{0}\u6216\u7AEF\u53E3 {1}\u3002\n\u8FD9\u53EF\u80FD\u662F\u56E0\u4E3A\u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u4E0E WSDL \u7684 wsdl:service \u540D\u548C wsdl:port \u540D\u4E0D\u5339\u914D:\n1. \u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u6CA1\u6709\u4F4D\u4E8E\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D, \u6216\u8005\n2. \u90E8\u7F72\u63CF\u8FF0\u7B26\u7684\u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u4E2D\u5B58\u5728\u62FC\u5199\u9519\u8BEF, \u6216\u8005\n3. \u4ECE @WebService \u8BA1\u7B97\u5F97\u51FA\u7684\u540D\u79F0\u4E0E wsdl:service \u540D\u548C wsdl:port \u540D\u4E0D\u5339\u914D\n\u5EFA\u8BAE\u6267\u884C\u4EE5\u4E0B\u64CD\u4F5C:\n1. \u5728\u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D\u6DFB\u52A0/\u66F4\u6B63\u670D\u52A1\u540D\u548C\u7AEF\u53E3\u540D\u7684\u6761\u76EE, \u6216\u8005\n2. \u5728\u7AEF\u70B9\u7C7B\u4E0A\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace, serviceName, portName + +stateful.cookie.header.required=\u8FD9\u662F\u6709\u72B6\u6001\u7684 Web \u670D\u52A1, \u9700\u8981{0}\u6807\u5934\u3002 +stateful.cookie.header.incorrect={0}\u6807\u5934\u503C\u65E0\u6548/\u5DF2\u8FC7\u671F: {1} +stateful.invalid.webservice.context=\u4E0D\u662F\u6765\u81EA JAX-WS RI \u7684 WebServiceContext: {0} +stateful.requres.addressing=\u6709\u72B6\u6001\u7684 Web \u670D\u52A1{0}\u9700\u8981\u542F\u7528 WS-Addressing \u652F\u6301\u3002\u53EF\u80FD\u7F3A\u5C11 @Addressing + +no.current.packet=\u6B64\u7EBF\u7A0B\u5F53\u524D\u672A\u5904\u7406\u4EFB\u4F55 Web \u670D\u52A1\u8BF7\u6C42\u3002 + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver=\u65E0\u6CD5\u5B9E\u4F8B\u5316{0} (\u5728{2}\u4E0A\u7684{1}\u4E2D\u6307\u5B9A) + +static.resource.injection.only=\u9759\u6001\u8D44\u6E90{0}\u65E0\u6CD5\u6CE8\u5165\u5230\u975E\u9759\u6001 "{1}" + +dd.mtom.conflict = \u90E8\u7F72\u63CF\u8FF0\u7B26\u4E2D\u51FA\u9519: \u7ED1\u5B9A{0}\u4E2D\u7684 MTOM \u914D\u7F6E\u4E0E enable-mtom \u5C5E\u6027\u503C{1}\u53D1\u751F\u51B2\u7A81 + +# {0} - qname of an element +dispatch.cannotFindMethod=\u627E\u4E0D\u5230{0}\u7684\u5206\u6D3E\u65B9\u6CD5 +non.unique.dispatch.qname=\u975E\u552F\u4E00\u4E3B\u4F53\u90E8\u5206! \u6839\u636E BP 1.1 R2710 \u89C4\u5B9A, \u5728\u7AEF\u53E3\u4E2D\u64CD\u4F5C\u5FC5\u987B\u5177\u6709\u552F\u4E00\u7684\u901A\u4FE1\u64CD\u4F5C\u7B7E\u540D\u624D\u80FD\u6210\u529F\u5206\u6D3E\u3002\u65B9\u6CD5{0}\u5177\u6709\u76F8\u540C\u7684\u8BF7\u6C42\u4E3B\u4F53\u5757{1}\u3002\u65B9\u6CD5\u5206\u6D3E\u53EF\u80FD\u5931\u8D25, \u8FD0\u884C\u65F6\u5C06\u5C1D\u8BD5\u4F7F\u7528 SOAPAction \u8FDB\u884C\u5206\u6D3E\u3002\u8FD8\u53EF\u4EE5\u542F\u7528 AddressingFeature \u4EE5\u5141\u8BB8\u8FD0\u884C\u65F6\u4F7F\u7528 wsa:Action \u6807\u5934\u552F\u4E00\u5730\u6807\u8BC6 WSDL \u64CD\u4F5C\u3002 + +unsupported.contentType=\u4E0D\u652F\u6301\u7684 Content-Type: {0}, \u652F\u6301\u7684 Content-Type \u4E3A: {1} +no.contentType=\u8BF7\u6C42\u6CA1\u6709 Content-Type +unsupported.charset=\u6536\u5230\u7684\u6D88\u606F\u7684 Content-Type \u4E2D\u5305\u542B\u4E0D\u652F\u6301\u7684\u5B57\u7B26\u96C6 "{0}" +duplicate.portKnownHeader=\u6536\u5230\u7684 SOAP \u6D88\u606F\u4E2D\u5305\u542B\u5BF9\u4E8E\u7ED1\u5B9A\u53C2\u6570\u91CD\u590D\u7684\u6807\u5934: {0} + +runtimemodeler.invalidannotationOnImpl=\u7AEF\u70B9\u5B9E\u73B0\u7C7B \"{1}\" \u4E0A\u7684\u6CE8\u91CA{0}\u65E0\u6548 - \u5C06\u5FFD\u7565\u6B64\u6CE8\u91CA\u3002\"{1}\" \u4F7F\u7528 @WebService(endpointInterface=\"{2}\"} \u8FDB\u884C\u6CE8\u91CA, \u5B83\u4E0D\u80FD\u4F7F\u7528{0}\u8FDB\u884C\u6CE8\u91CA, \u8981\u4FEE\u590D\u6B64\u95EE\u9898 - \u8BF7\u5C06\u6B64\u6CE8\u91CA\u653E\u5165 SEI {2}\u3002 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties new file mode 100644 index 00000000000..674094ad749 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/server_zh_TW.properties @@ -0,0 +1,115 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soapdecoder.err=\u89E3\u78BC SOAP \u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4 +server.rt.err=\u4F3A\u670D\u5668\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u932F\u8AA4: {0} +soapencoder.err=\u7DE8\u78BC SOAP \u8A0A\u606F\u6642\u767C\u751F\u932F\u8AA4 + +annotation.only.once=\u50C5\u6709\u4E00\u500B\u65B9\u6CD5\u61C9\u5305\u542B\u8A3B\u89E3 \"{0}\" +not.zero.parameters=\u65B9\u6CD5 \"{0}\" \u4E0D\u61C9\u5305\u542B\u4EFB\u4F55\u5F15\u6578 + +wrong.field.type=\u6B04\u4F4D \"{0}\" \u7684\u985E\u578B\u4E0D\u6B63\u78BA +wrong.no.parameters=\u65B9\u6CD5 \"{0}\" \u7684\u5F15\u6578\u6578\u76EE\u4E0D\u6B63\u78BA +wrong.parameter.type=\u65B9\u6CD5 \"{0}\" \u7684\u5F15\u6578\u985E\u578B\u4E0D\u6B63\u78BA + +can.not.generate.wsdl=\u7121\u6CD5\u7522\u751F\u9023\u7D50 \"{0}\" \u7684 WSDL +generate.non.standard.wsdl=\u6B63\u5728\u70BA\u6307\u5B9A\u7684\u9023\u7D50\u7522\u751F\u975E\u6A19\u6E96\u7684 WSDL +null.implementor=\u5BE6\u4F5C\u9805\u4E0D\u53EF\u70BA\u7A7A\u503C + +runtime.wsdl.patcher=\u4FEE\u6B63 WSDL \u76F8\u95DC\u6587\u4EF6\u6642\u767C\u751F\u932F\u8AA4 + +# {0} - class name +not.implement.provider=\"{0}\" \u672A\u5BE6\u884C\u63D0\u4F9B\u8005 +# {0} - class name +provider.not.parameterized=\"{0}\" \u5BE6\u884C\u4E86\u63D0\u4F9B\u8005, \u4F46\u672A\u6307\u5B9A\u985E\u578B\u53C3\u6578 +# {0}, {1} - class name e.g.: "class foo.bar.ClassImpl" implements Provider but its type parameter interface foo.bar.Iface is incorrect +provider.invalid.parameterType=\"{0}\" \u5BE6\u884C\u4E86\u63D0\u4F9B\u8005, \u4F46\u5176\u985E\u578B\u53C3\u6578 {1} \u4E0D\u6B63\u78BA + +wsdl.required=\u9700\u8981 WSDL +service.name.required=\u627E\u4E0D\u5230\u670D\u52D9 QName +port.name.required=\u627E\u4E0D\u5230\u9023\u63A5\u57E0 QName +wrong.tns.for.port=\u9023\u63A5\u57E0\u547D\u540D\u7A7A\u9593 {0} \u8207\u670D\u52D9\u547D\u540D\u7A7A\u9593 {1} \u4E0D\u7B26 + +# {0} - probably URL/port of a server +already.http.server=\u4E0B\u5217\u4F4D\u7F6E\u5DF2\u7D93\u6709\u4E00\u500B HTTP \u4F3A\u670D\u5668: {0}# {0} - \u53EF\u80FD\u662F\u4F3A\u670D\u5668\u7684 URL/\u9023\u63A5\u57E0 +already.https.server=\u4E0B\u5217\u4F4D\u7F6E\u5DF2\u7D93\u6709\u4E00\u500B HTTPS \u4F3A\u670D\u5668: {0} +#not.HttpContext.type=Required com.sun.net.httpserver.HttpContext. Got : {0} + +not.know.HttpContext.type=\u4E0D\u652F\u63F4 Endpoint.publish({0}). \u5DF2\u77E5\u7684\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u985E\u578B\u70BA {1} \u8207 {2} + +duplicate.primary.wsdl=\u63CF\u8FF0\u8CC7\u6599\u6709\u4E00\u500B\u4EE5\u4E0A\u7684 WSDL \u64C1\u6709\u7AEF\u9EDE\u7684 Service \u5B9A\u7FA9. WSDL={0} \u662F\u5176\u4E2D\u4E00\u500B\u9019\u985E WSDL. +duplicate.abstract.wsdl=\u63CF\u8FF0\u8CC7\u6599\u6709\u4E00\u500B\u4EE5\u4E0A\u7684 WSDL \u64C1\u6709\u7AEF\u9EDE\u7684 PortType \u5B9A\u7FA9. WSDL={0} \u662F\u5176\u4E2D\u4E00\u500B\u9019\u985E WSDL. + +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.classNotFound=\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u4E2D\u627E\u4E0D\u5230\u985E\u5225: {0} +# Wrapped into an Exception. Not concatenated with any other string. +runtime.parser.xmlReader=\u5256\u6790\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u6642\u767C\u751F\u932F\u8AA4: {0} +# Usage not found. TODO Remove +#runtime.parser.invalidReaderState=error parsing runtime descriptor: {0} +runtime.parser.unexpectedContent=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u4E2D\u6709\u672A\u9810\u671F\u7684\u5167\u5BB9 (\u884C {0}) +runtime.parser.invalidElement=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u6709\u7121\u6548\u7684\u5143\u7D20 \"{1}\" +runtime.parser.invalidAttributeValue=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u5143\u7D20 \"{1}\" \u7684\u5C6C\u6027\u503C \"{2}\" \u7121\u6548 +runtime.parser.invalidVersionNumber=\u4E0D\u652F\u63F4\u7684\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u7248\u672C: {2} +runtime.parser.missing.attribute=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u7684\u5143\u7D20 \"{1}\" \u907A\u6F0F\u5C6C\u6027 \"{2}\" +runtime.parser.invalid.attribute.value=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u6709\u7121\u6548\u7684\u5C6C\u6027\u503C \"{1}\" +runtime.parser.missing.attribute.no.line=\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u7684\u5143\u7D20 \"{1}\" \u907A\u6F0F\u5C6C\u6027 \"{2}\" +runtime.parser.wrong.element=\u5728\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 (\u884C {0}) \u4E2D\u767C\u73FE\u5143\u7D20 \"{1}\", \u9810\u671F\u70BA \"{2}\" +runtime.parser.wsdl.not.found=\u5728 WAR \u6A94\u6848\u4E2D\u627E\u4E0D\u5230 {0}. \u8ACB\u5C07\u5176\u5C01\u88DD\u65BC WAR \u6A94\u6848\u4E2D, \u6216\u5728 sun-jaxws.xml \u4E2D\u66F4\u6B63\u5B83. +runtime.parser.wsdl=\u5256\u6790 WSDL \u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1: {0} +runtime.saxparser.exception={0}\n{1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.noservice=can\'t apply binding! service {0} not found in the WSDL {1} +# Usage not found. TODO Remove +#runtime.parser.wsdl.nobinding=can\'t apply binding! no binding found for binding ID {0} for service {1} in WSDL {2} +runtime.parser.wsdl.multiplebinding=\u767C\u73FE WSDL {2} \u4E2D\u4E4B\u670D\u52D9 {1} \u7684\u9023\u7D50 ID {0} \u6709\u591A\u500B\u9023\u7D50 +runtime.parser.wsdl.noservice.in.wsdlmodel=\u8655\u7406 WSDL {0} \u6642\u767C\u751F\u932F\u8AA4, \u627E\u4E0D\u5230\u6709\u6548\u7684\u670D\u52D9. +runtime.parser.wsdl.incorrectservice=\u7121\u6CD5\u5F9E WSDL! \u670D\u52D9\u53D6\u5F97\u9023\u7D50: \u5728 WSDL {1} \u4E2D\u627E\u4E0D\u5230 {0}.\n\u53EF\u80FD\u662F\u56E0\u70BA\u670D\u52D9\u540D\u7A31\u8207 WSDL \u7684 wsdl:service \u540D\u7A31\u4E0D\u7B26:\n1. \u670D\u52D9\u540D\u7A31\u4E0D\u5728\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D, \u6216\n2. \u5EFA\u7F6E\u63CF\u8FF0\u5143\u7684\u670D\u52D9\u540D\u7A31\u53EF\u80FD\u8F38\u5165\u932F\u8AA4, \u6216\n3. \u5F9E @WebService \u8A08\u7B97\u7684\u540D\u7A31\u8207 wsdl:service \u540D\u7A31\u4E0D\u7B26\n\u6216\n4. \u5256\u6790 WSDL \u6642\u767C\u751F\u932F\u8AA4, \u800C\u4E14\u5728 WSDLModel \u4E2D\u627E\u4E0D\u5230\u540D\u7A31\u70BA {0} \u7684\u670D\u52D9.\n\u5EFA\u8B70\u57F7\u884C\u4E0B\u5217\u52D5\u4F5C:\n1. \u65B0\u589E/\u66F4\u6B63\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D\u7684\u670D\u52D9\u540D\u7A31\u9805\u76EE, \u6216 \n2. \u5728\u7AEF\u9EDE\u985E\u5225\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace\u3001serviceName + +runtime.parser.wsdl.incorrectserviceport=\u7121\u6CD5\u5F9E WSDL! \u670D\u52D9\u53D6\u5F97\u9023\u7D50: \u5728 WSDL {2} \u4E2D\u627E\u4E0D\u5230 {0} \u6216\u9023\u63A5\u57E0 {1}.\n\u53EF\u80FD\u662F\u56E0\u70BA\u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u8207 WSDL \u7684 wsdl:service \u548C wsdl:port \u540D\u7A31\u4E0D\u7B26:\n1. \u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u4E0D\u5728\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D, \u6216\n2. \u5EFA\u7F6E\u63CF\u8FF0\u5143\u7684\u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u53EF\u80FD\u8F38\u5165\u932F\u8AA4, \u6216\n3. \u5F9E @WebService \u8A08\u7B97\u7684\u540D\u7A31\u8207 wsdl:service \u548C wsdl:port \u540D\u7A31\u4E0D\u7B26\n\u5EFA\u8B70\u57F7\u884C\u4E0B\u5217\u52D5\u4F5C:\n1. \u65B0\u589E/\u66F4\u6B63\u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D\u7684\u670D\u52D9\u8207\u9023\u63A5\u57E0\u540D\u7A31\u9805\u76EE, \u6216 \n2. \u5728\u7AEF\u9EDE\u985E\u5225\u7684 @WebService \u4E2D\u6307\u5B9A targetNamespace\u3001serviceName\u3001portName + +stateful.cookie.header.required=\u6B64\u70BA\u72C0\u614B\u6027 Web \u670D\u52D9, \u9700\u8981 {0} \u6A19\u982D. +stateful.cookie.header.incorrect=\u7121\u6548/\u904E\u671F\u7684 {0} \u6A19\u982D\u503C: {1} +stateful.invalid.webservice.context=\u4E0D\u662F JAX-WS RI \u4E2D\u7684 WebServiceContext: {0} +stateful.requres.addressing=\u72C0\u614B\u6027 Web \u670D\u52D9 {0} \u5FC5\u9808\u555F\u7528 Web \u670D\u52D9\u5B9A\u5740\u652F\u63F4. \u4E5F\u8A31\u60A8\u907A\u6F0F\u4E86 @Addressing + +no.current.packet=\u6B64\u7E6B\u7DDA\u76EE\u524D\u672A\u8655\u7406\u4EFB\u4F55 Web \u670D\u52D9\u8981\u6C42. + +# {0} - class name. {1} - annotation type class name, {2} - class name e.g.: Unable to instantiate class foo.Bar (which is specified in foo.Bar1 on class foo.Bar2) +failed.to.instantiate.instanceResolver=\u7121\u6CD5\u5EFA\u7ACB {0} (\u5176\u6307\u5B9A\u65BC {2} \u7684 {1} \u4E2D) + +static.resource.injection.only=\u975C\u614B\u8CC7\u6E90 {0} \u7121\u6CD5\u5F15\u5165\u975E\u975C\u614B\u7684 "{1}" + +dd.mtom.conflict = \u5EFA\u7F6E\u63CF\u8FF0\u5143\u4E2D\u767C\u751F\u932F\u8AA4: \u9023\u7D50 {0} \u4E2D\u7684 MTOM \u7D44\u614B\u8207 enable-mtom \u5C6C\u6027\u503C {1} \u885D\u7A81 + +# {0} - qname of an element +dispatch.cannotFindMethod=\u627E\u4E0D\u5230 {0} \u7684\u5206\u914D\u65B9\u6CD5 +non.unique.dispatch.qname=\u975E\u552F\u4E00\u7684\u4E3B\u9AD4\u90E8\u5206! \u4F9D\u64DA BP 1.1 R2710, \u9023\u63A5\u57E0\u4E2D\u7684\u4F5C\u696D\u65BC\u7DDA\u4E0A\u5FC5\u9808\u6709\u552F\u4E00\u7684\u4F5C\u696D\u7C3D\u7AE0, \u624D\u80FD\u6210\u529F\u9032\u884C\u5206\u914D. \u65B9\u6CD5 {0} \u6709\u76F8\u540C\u7684\u8981\u6C42\u4E3B\u9AD4\u5340\u584A {1}. \u65B9\u6CD5\u5206\u914D\u53EF\u80FD\u6703\u5931\u6557, \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5C07\u5617\u8A66\u4F7F\u7528 SOAPAction \u9032\u884C\u5206\u914D. \u53E6\u4E00\u500B\u9078\u9805\u662F\u555F\u7528 AddressingFeature, \u4F7F\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u4F7F\u7528 wsa:Action \u6A19\u982D\u4F86\u552F\u4E00\u8B58\u5225 WSDL \u4F5C\u696D. + +unsupported.contentType=\u4E0D\u652F\u63F4\u7684 Content-Type: {0} \u652F\u63F4\u7684\u5167\u5BB9\u985E\u578B\u70BA: {1} +no.contentType=\u8981\u6C42\u6C92\u6709 Content-Type +unsupported.charset=\u5DF2\u63A5\u6536\u8A0A\u606F\u7684 Content-Type \u4E2D\u6709\u4E0D\u652F\u63F4\u7684\u5B57\u5143\u96C6 "{0}" +duplicate.portKnownHeader=\u5DF2\u63A5\u6536 SOAP \u8A0A\u606F\u7684\u9023\u7D50\u53C3\u6578\u5305\u542B\u91CD\u8907\u7684\u6A19\u982D: {0} + +runtimemodeler.invalidannotationOnImpl=\u7AEF\u9EDE\u5BE6\u884C\u985E\u5225 \"{1}\" \u4E2D\u7684\u8A3B\u89E3: {0} \u7121\u6548 - \u5C07\u88AB\u5FFD\u7565. \"{1}\" \u662F\u4F7F\u7528 @WebService(endpointInterface=\"{2}\"} \u52A0\u8A3B, \u4E0D\u5F97\u4F7F\u7528 {0} \u52A0\u8A3B, \u82E5\u8981\u4FEE\u6B63 - \u8ACB\u5C07\u6B64\u8A3B\u89E3\u653E\u7F6E\u65BC SEI {2}. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties index bc9832277b1..1a7fb12fb45 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties new file mode 100644 index 00000000000..6b3ac65e6a6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_de.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=SOAP-Nachricht konnte wegen folgender Ausnahme nicht erstellt werden: {0} +soap.msg.factory.create.err=SOAP-Nachrichten-Factory konnte wegen folgender Ausnahme nicht erstellt werden: {0} +soap.protocol.invalidFaultCode=Ung\u00FCltiger Fault-Code: {0} +soap.factory.create.err=SOAP-Factory konnte wegen folgender Ausnahme nicht erstellt werden: {0} +soap.fault.create.err=SOAP-Fault konnte wegen folgender Ausnahme nicht erstellt werden: {0} +soap.version.mismatch.err=SOAP-Nachricht konnte nicht erstellt werden. Envelope wird in Namespace {0} erwartet, es wurde jedoch {1} ermittelt diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties new file mode 100644 index 00000000000..7a04dff418a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_es.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=No se ha podido crear el mensaje SOAP debido a la excepci\u00F3n {0} +soap.msg.factory.create.err=No se ha podido crear la f\u00E1brica de mensajes SOAP debido a la excepci\u00F3n {0} +soap.protocol.invalidFaultCode=C\u00F3digo de fallo no v\u00E1lido: {0} +soap.factory.create.err=No se ha podido crear la f\u00E1brica SOAP debido a la excepci\u00F3n {0} +soap.fault.create.err=No se ha podido crear el fallo SOAP debido a la excepci\u00F3n {0} +soap.version.mismatch.err=No se ha podido crear el mensaje SOAP. Se esperaba Envelope en el espacio de nombres {0}, pero se ha obtenido {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties new file mode 100644 index 00000000000..855b47606b6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_fr.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=Impossible de cr\u00E9er le message SOAP en raison de l''exception : {0} +soap.msg.factory.create.err=Impossible de cr\u00E9er une fabrique de messages SOAP en raison de l''exception : {0} +soap.protocol.invalidFaultCode=Code d''erreur non valide : {0} +soap.factory.create.err=Impossible de cr\u00E9er une fabrique SOAP en raison de l''exception {0} +soap.fault.create.err=Impossible de cr\u00E9er l''erreur SOAP en raison de l''exception {0} +soap.version.mismatch.err=Impossible de cr\u00E9er le message SOAP. Attente de Envelope dans l''espace de noms {0}, mais {1} obtenu diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties new file mode 100644 index 00000000000..0d013e92bec --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_it.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=Impossibile creare il messaggio SOAP a causa dell''eccezione: {0} +soap.msg.factory.create.err=Impossibile creare il message factory SOAP a causa dell''eccezione: {0} +soap.protocol.invalidFaultCode=Codice di errore non valido: {0} +soap.factory.create.err=Impossibile creare il factory SOAP a causa dell''eccezione: {0} +soap.fault.create.err=Impossibile creare l''errore SOAP a causa dell''eccezione: {0} +soap.version.mismatch.err=Impossibile creare il messaggio SOAP. Prevista envelope nello spazio di nomi {0} ma trovato {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties new file mode 100644 index 00000000000..31bb7b32195 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ja.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0} +soap.msg.factory.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0} +soap.protocol.invalidFaultCode=\u7121\u52B9\u306A\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30FC\u30C9: {0} +soap.factory.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30D5\u30A1\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0} +soap.fault.create.err=\u4F8B\u5916\u306B\u3088\u308A\u3001SOAP\u30D5\u30A9\u30EB\u30C8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0} +soap.version.mismatch.err=SOAP\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9{0}\u306B\u30A8\u30F3\u30D9\u30ED\u30FC\u30D7\u304C\u5FC5\u8981\u3067\u3059\u304C\u3001{1}\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties new file mode 100644 index 00000000000..dd82777c8b2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_ko.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0} +soap.msg.factory.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uBA54\uC2DC\uC9C0 \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0} +soap.protocol.invalidFaultCode=\uBD80\uC801\uD569\uD55C \uACB0\uD568 \uCF54\uB4DC: {0} +soap.factory.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uD329\uD1A0\uB9AC\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0} +soap.fault.create.err=\uC608\uC678 \uC0AC\uD56D\uC73C\uB85C \uC778\uD574 SOAP \uACB0\uD568\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC74C: {0} +soap.version.mismatch.err=SOAP \uBA54\uC2DC\uC9C0\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {0} \uB124\uC784\uC2A4\uD398\uC774\uC2A4\uC5D0 Envelope\uAC00 \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC744(\uB97C) \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties new file mode 100644 index 00000000000..81b29b5d86f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_pt_BR.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=N\u00E3o foi poss\u00EDvel criar a mensagem SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0} +soap.msg.factory.create.err=N\u00E3o foi poss\u00EDvel criar a factory da mensagem SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0} +soap.protocol.invalidFaultCode=C\u00F3digo de falha inv\u00E1lido: {0} +soap.factory.create.err=N\u00E3o foi poss\u00EDvel criar a factory de SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0} +soap.fault.create.err=N\u00E3o foi poss\u00EDvel criar a Falha de SOAP em decorr\u00EAncia da exce\u00E7\u00E3o: {0} +soap.version.mismatch.err=N\u00E3o foi poss\u00EDvel criar a mensagem SOAP. Esperando Envelope no namespace {0}, mas obteve {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties new file mode 100644 index 00000000000..f12299f9b8a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_CN.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u6D88\u606F: {0} +soap.msg.factory.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u6D88\u606F\u5DE5\u5382: {0} +soap.protocol.invalidFaultCode=\u6545\u969C\u4EE3\u7801\u65E0\u6548: {0} +soap.factory.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u5DE5\u5382: {0} +soap.fault.create.err=\u7531\u4E8E\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF, \u65E0\u6CD5\u521B\u5EFA SOAP \u6545\u969C: {0} +soap.version.mismatch.err=\u65E0\u6CD5\u521B\u5EFA SOAP \u6D88\u606F\u3002\u5E94\u4E3A\u540D\u79F0\u7A7A\u95F4{0}\u4E2D\u7684\u4FE1\u5C01, \u4F46\u5F97\u5230\u7684\u662F{1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties new file mode 100644 index 00000000000..d111e271cca --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/soap_zh_TW.properties @@ -0,0 +1,31 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +soap.msg.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u8A0A\u606F: {0} +soap.msg.factory.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u8A0A\u606F\u8655\u7406\u7AD9: {0} +soap.protocol.invalidFaultCode=\u7121\u6548\u7684\u932F\u8AA4\u4EE3\u78BC: {0} +soap.factory.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u8655\u7406\u7AD9: {0} +soap.fault.create.err=\u56E0\u70BA\u7570\u5E38\u72C0\u6CC1, \u7121\u6CD5\u5EFA\u7ACB SOAP \u932F\u8AA4: {0} +soap.version.mismatch.err=\u7121\u6CD5\u5EFA\u7ACB SOAP \u8A0A\u606F. \u9810\u671F\u5728\u547D\u540D\u7A7A\u9593 {0} \u4E2D\u70BA Envelope, \u4F46\u6536\u5230\u7684\u662F {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties index c610ed88d3f..330a576dd40 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties new file mode 100644 index 00000000000..8ac79fe6b54 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_de.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=Fehler beim XML-Parsen: {0} +streaming.parseException=Fehler beim XML-Parsen: {0} + +xmlreader.illegalStateEncountered=Interner Fehler bei XML-Reader: Unzul\u00E4ssiger Status ({0}) +xmlreader.unexpectedCharacterContent=Fehler bei XML-Reader: Unerwarteter Zeicheninhalt: \"{0}\" +xmlreader.ioException=Fehler bei XML-Reader: {0} +xmlreader.parseException=Fehler beim XML-Parsen: {0} +xmlreader.nestedError=Fehler bei XML-Reader: {0} + +xmlwriter.noPrefixForURI=Fehler bei XML-Writer: Kein Pr\u00E4fix f\u00FCr URI: \"{0}\" +xmlwriter.ioException=Fehler bei XML-Writer: {0} +xmlwriter.nestedError=Fehler bei XML-Writer: {0} +xmlreader.unexpectedState=Unerwarteter XML-Reader-Status. Erwartet: {0}, gefunden: {1} +xmlreader.unexpectedState.message=Unerwarteter XML-Reader-Status. Erwartet: {0}, gefunden: {1}. {2} +xmlreader.unexpectedState.tag=Unerwartetes Tag. Erwartet: {0}, gefunden: {1} + +xmlrecorder.recording.ended=keine weiteren aufgezeichneten Elemente verf\u00FCgbar + +stax.cantCreate=StAX-Reader oder -Writer kann nicht erstellt werden +staxreader.xmlstreamexception=Ausnahme bei XML-Stream Reader: {0} + +fastinfoset.decodingNotAccepted=Fast Infoset-Decodierung wird nicht akzeptiert +fastinfoset.noImplementation=Kompatible Implementierung von Fast Infoset kann in Classpath nicht gefunden werden + +sourcereader.invalidSource=Reader kann nicht aus Quelle \"{0}\" erstellt werden diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties new file mode 100644 index 00000000000..2345978db24 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_es.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=error de an\u00E1lisis XML: {0} +streaming.parseException=error de an\u00E1lisis XML: {0} + +xmlreader.illegalStateEncountered=error interno del lector XML: Estado no v\u00E1lido ({0}) +xmlreader.unexpectedCharacterContent=error del lector XML: Contenido de caracteres inesperado: \"{0}\" +xmlreader.ioException=error del lector XML: {0} +xmlreader.parseException=error de an\u00E1lisis XML: {0} +xmlreader.nestedError=error del lector XML: {0} + +xmlwriter.noPrefixForURI=error del escritor XML: No hay ning\u00FAn prefijo para el URI: \"{0}\" +xmlwriter.ioException=error del escritor XML: {0} +xmlwriter.nestedError=error del escritor XML: {0} +xmlreader.unexpectedState=estado del lector XML inesperado. Se esperaba: {0}, pero se ha encontrado: {1} +xmlreader.unexpectedState.message=estado del lector de XML inesperado. Se esperaba: {0}, pero se ha encontrado: {1}. {2} +xmlreader.unexpectedState.tag=etiqueta XML inesperada. Se esperaba: {0}, pero se ha encontrado: {1} + +xmlrecorder.recording.ended=no hay disponibles m\u00E1s elementos registrados + +stax.cantCreate=No se ha podido crear el lector ni el escritor de StAX +staxreader.xmlstreamexception=Excepci\u00F3n del lector de flujo XML: {0} + +fastinfoset.decodingNotAccepted=No se acepta la descodificaci\u00F3n del juego de informaci\u00F3n r\u00E1pido +fastinfoset.noImplementation=No se ha encontrado la implantaci\u00F3n compatible del juego de informaci\u00F3n r\u00E1pido en la classpath + +sourcereader.invalidSource=No se ha podido crear el lector desde el origen \\"{0}\\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties new file mode 100644 index 00000000000..b0c02541f0a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_fr.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=erreur d''analyse XML : {0} +streaming.parseException=erreur d''analyse XML : {0} + +xmlreader.illegalStateEncountered=erreur interne du processus de lecture XML : \u00E9tat ({0}) non autoris\u00E9 +xmlreader.unexpectedCharacterContent=erreur interne du processus de lecture XML : contenu de caract\u00E8re inattendu : \"{0}\" +xmlreader.ioException=erreur du processus de lecture XML : {0} +xmlreader.parseException=erreur d''analyse XML : {0} +xmlreader.nestedError=erreur du processus de lecture XML : {0} + +xmlwriter.noPrefixForURI=erreur du processus d''\u00E9criture XML : aucun pr\u00E9fixe pour l''URI : \"{0}\" +xmlwriter.ioException=erreur du processus d''\u00E9criture XML : {0} +xmlwriter.nestedError=erreur du processus d''\u00E9criture XML : {0} +xmlreader.unexpectedState=\u00E9tat de processus de lecture XML inattendu ; attendu : {0}, obtenu : {1} +xmlreader.unexpectedState.message=\u00E9tat de processus de lecture XML inattendu ; attendu : {0}, obtenu : {1}. {2} +xmlreader.unexpectedState.tag=balise XML inattendue ; attendue : {0}, obtenue : {1} + +xmlrecorder.recording.ended=plus d'\u00E9l\u00E9ment enregistr\u00E9 disponible + +stax.cantCreate=Impossible de cr\u00E9er le processus de lecture ou le processus d'\u00E9criture StAX +staxreader.xmlstreamexception=Exception du processus de lecture du flux XML : {0} + +fastinfoset.decodingNotAccepted=Le d\u00E9codage Fast Infoset n'est pas accept\u00E9 +fastinfoset.noImplementation=Impossible de localiser l'impl\u00E9mentation compatible de Fast Infoset dans le classpath + +sourcereader.invalidSource=Impossible de cr\u00E9er un processus de lecture \u00E0 partir de la source \"{0}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties new file mode 100644 index 00000000000..c3179d8e29f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_it.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=errore di analisi XML: {0} +streaming.parseException=errore di analisi XML: {0} + +xmlreader.illegalStateEncountered=errore interno del processo di lettura XML: stato non valido ({0}) +xmlreader.unexpectedCharacterContent=errore del processo di lettura XML: contenuto di caratteri imprevisto: \"{0}\" +xmlreader.ioException=errore del processo di lettura XML: {0} +xmlreader.parseException=errore di analisi XML: {0} +xmlreader.nestedError=errore del processo di lettura XML: {0} + +xmlwriter.noPrefixForURI=errore del processo di scrittura XML: nessun prefisso per l''URI: \"{0}\" +xmlwriter.ioException=errore del processo di scrittura XML: {0} +xmlwriter.nestedError=errore del processo di scrittura XML: {0} +xmlreader.unexpectedState=stato del processo di lettura XML imprevisto. Previsto: {0}, trovato: {1} +xmlreader.unexpectedState.message=stato del processo di lettura XML imprevisto. Previsto: {0}, trovato: {1}. {2} +xmlreader.unexpectedState.tag=tag XML imprevista. Prevista: {0}, trovata: {1} + +xmlrecorder.recording.ended=nessun altro elemento registrato disponibile + +stax.cantCreate=Impossibile creare il processo di lettura o di scrittura StAX +staxreader.xmlstreamexception=eccezione del processo di lettura del flusso XML: {0} + +fastinfoset.decodingNotAccepted=Decodifica Fast Infoset non accettata +fastinfoset.noImplementation=Impossibile individuare l'implementazione compatibile di Fast Infoset nel classpath + +sourcereader.invalidSource=Impossibile creare il processo di lettura dall''origine \"{0}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties new file mode 100644 index 00000000000..9afd32766e7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ja.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=XML\u89E3\u6790\u30A8\u30E9\u30FC: {0} +streaming.parseException=XML\u89E3\u6790\u30A8\u30E9\u30FC: {0} + +xmlreader.illegalStateEncountered=XML\u30EA\u30FC\u30C0\u30FC\u5185\u90E8\u30A8\u30E9\u30FC: \u4E0D\u6B63\u306A\u72B6\u614B({0}) +xmlreader.unexpectedCharacterContent=XML\u30EA\u30FC\u30C0\u30FC\u30FB\u30A8\u30E9\u30FC: \u4E88\u671F\u3057\u3066\u3044\u306A\u3044\u6587\u5B57\u30B3\u30F3\u30C6\u30F3\u30C4: \"{0}\" +xmlreader.ioException=XML\u30EA\u30FC\u30C0\u30FC\u30FB\u30A8\u30E9\u30FC: {0} +xmlreader.parseException=XML\u89E3\u6790\u30A8\u30E9\u30FC: {0} +xmlreader.nestedError=XML\u30EA\u30FC\u30C0\u30FC\u30FB\u30A8\u30E9\u30FC: {0} + +xmlwriter.noPrefixForURI=XML\u30E9\u30A4\u30BF\u30FC\u30FB\u30A8\u30E9\u30FC: URI: \"{0}\"\u306E\u63A5\u982D\u8F9E\u304C\u3042\u308A\u307E\u305B\u3093 +xmlwriter.ioException=XML\u30E9\u30A4\u30BF\u30FC\u30FB\u30A8\u30E9\u30FC: {0} +xmlwriter.nestedError=XML\u30E9\u30A4\u30BF\u30FC\u30FB\u30A8\u30E9\u30FC: {0} +xmlreader.unexpectedState=\u4E88\u671F\u3057\u3066\u3044\u306A\u3044XML\u30EA\u30FC\u30C0\u30FC\u306E\u72B6\u614B\u3002{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F +xmlreader.unexpectedState.message=\u4E88\u671F\u3057\u306A\u3044XML\u30EA\u30FC\u30C0\u30FC\u306E\u72B6\u614B\u3067\u3059\u3002{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u3002{2} +xmlreader.unexpectedState.tag=\u4E88\u671F\u3057\u306A\u3044XML\u30BF\u30B0\u3067\u3059\u3002{0}\u304C\u4E88\u671F\u3055\u308C\u307E\u3057\u305F\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F + +xmlrecorder.recording.ended=\u8A18\u9332\u3055\u308C\u305F\u8981\u7D20\u306F\u3053\u308C\u4EE5\u4E0A\u3042\u308A\u307E\u305B\u3093 + +stax.cantCreate=StAX\u30EA\u30FC\u30C0\u30FC\u307E\u305F\u306F\u30E9\u30A4\u30BF\u30FC\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 +staxreader.xmlstreamexception=XML\u30B9\u30C8\u30EA\u30FC\u30E0\u30FB\u30EA\u30FC\u30C0\u30FC\u306E\u4F8B\u5916: {0} + +fastinfoset.decodingNotAccepted=Fast Infoset\u306B\u3088\u308B\u30C7\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u306F\u53D7\u3051\u5165\u308C\u3089\u308C\u307E\u305B\u3093 +fastinfoset.noImplementation=\u30AF\u30E9\u30B9\u30D1\u30B9\u306B\u3001Fast Infoset\u306E\u4E92\u63DB\u6027\u306E\u3042\u308B\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 + +sourcereader.invalidSource=\u30BD\u30FC\u30B9\"{0}\"\u304B\u3089\u30EA\u30FC\u30C0\u30FC\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties new file mode 100644 index 00000000000..982706b67a3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_ko.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=XML \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0} +streaming.parseException=XML \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0} + +xmlreader.illegalStateEncountered=XML \uC77D\uAE30 \uC7A5\uCE58 \uB0B4\uBD80 \uC624\uB958: \uC798\uBABB\uB41C \uC0C1\uD0DC({0}) +xmlreader.unexpectedCharacterContent=XML \uC77D\uAE30 \uC7A5\uCE58 \uC624\uB958: \uC608\uC0C1\uCE58 \uC54A\uC740 \uBB38\uC790 \uCF58\uD150\uCE20: \"{0}\" +xmlreader.ioException=XML \uC77D\uAE30 \uC7A5\uCE58 \uC624\uB958: {0} +xmlreader.parseException=XML \uAD6C\uBB38 \uBD84\uC11D \uC624\uB958: {0} +xmlreader.nestedError=XML \uC77D\uAE30 \uC7A5\uCE58 \uC624\uB958: {0} + +xmlwriter.noPrefixForURI=XML \uC4F0\uAE30 \uC7A5\uCE58 \uC624\uB958: URI\uC5D0 \uB300\uD55C \uC811\uB450\uC5B4 \uC5C6\uC74C: \"{0}\" +xmlwriter.ioException=XML \uC4F0\uAE30 \uC7A5\uCE58 \uC624\uB958: {0} +xmlwriter.nestedError=XML \uC4F0\uAE30 \uC7A5\uCE58 \uC624\uB958: {0} +xmlreader.unexpectedState=\uC608\uC0C1\uCE58 \uC54A\uC740 XML \uC77D\uAE30 \uC7A5\uCE58 \uC0C1\uD0DC\uC785\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +xmlreader.unexpectedState.message=\uC608\uC0C1\uCE58 \uC54A\uC740 XML \uC77D\uAE30 \uC7A5\uCE58 \uC0C1\uD0DC\uC785\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. {2} +xmlreader.unexpectedState.tag=\uC608\uC0C1\uCE58 \uC54A\uC740 XML \uD0DC\uADF8\uC785\uB2C8\uB2E4. {0}\uC774(\uAC00) \uD544\uC694\uD558\uC9C0\uB9CC {1}\uC774(\uAC00) \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +xmlrecorder.recording.ended=\uB354 \uC774\uC0C1 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uAE30\uB85D\uB41C \uC694\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. + +stax.cantCreate=StAX \uC77D\uAE30 \uC7A5\uCE58 \uB610\uB294 \uC4F0\uAE30 \uC7A5\uCE58\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +staxreader.xmlstreamexception=XML \uC2A4\uD2B8\uB9BC \uC77D\uAE30 \uC7A5\uCE58 \uC608\uC678 \uC0AC\uD56D: {0} + +fastinfoset.decodingNotAccepted=\uBE60\uB978 \uC815\uBCF4 \uC9D1\uD569 \uB514\uCF54\uB529\uC740 \uC2B9\uC778\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +fastinfoset.noImplementation=\uD074\uB798\uC2A4 \uACBD\uB85C\uC5D0\uC11C \uBE60\uB978 \uC815\uBCF4 \uC9D1\uD569\uC758 \uD638\uD658\uB418\uB294 \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. + +sourcereader.invalidSource=\"{0}\" \uC18C\uC2A4\uC5D0\uC11C \uC77D\uAE30 \uC7A5\uCE58\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties new file mode 100644 index 00000000000..823fa73f5d9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_pt_BR.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=erro de parse XML: {0} +streaming.parseException=erro de parse XML: {0} + +xmlreader.illegalStateEncountered=erro interno do leitor XML: estado inv\u00E1lido ({0}) +xmlreader.unexpectedCharacterContent=erro do leitor XML: conte\u00FAdo do caractere inesperado: \"{0}\" +xmlreader.ioException=erro do leitor XML: {0} +xmlreader.parseException=erro de parse XML: {0} +xmlreader.nestedError=erro do leitor XML: {0} + +xmlwriter.noPrefixForURI=erro do gravador XML: nenhum prefixo para o URI: \"{0}\" +xmlwriter.ioException=erro do gravador XML: {0} +xmlwriter.nestedError=erro do gravador XML: {0} +xmlreader.unexpectedState=estado do leitor XML inesperado: esperava {0} mas encontrou: {1} +xmlreader.unexpectedState.message=estado do leitor XML inesperado: esperava {0}, mas encontrou: {1}. {2} +xmlreader.unexpectedState.tag=tag XML inesperada: esperava {0}, mas encontrou: {1} + +xmlrecorder.recording.ended=n\u00E3o h\u00E1 mais elementos gravados dispon\u00EDveis + +stax.cantCreate=N\u00E3o \u00E9 poss\u00EDvel criar o leitor ou gravador StAX +staxreader.xmlstreamexception=exce\u00E7\u00E3o do leitor de fluxo XML: {0} + +fastinfoset.decodingNotAccepted=Decodifica\u00E7\u00E3o do Conjunto de informa\u00E7\u00F5es r\u00E1pidas n\u00E3o aceita +fastinfoset.noImplementation=N\u00E3o \u00E9 poss\u00EDvel localizar a implementa\u00E7\u00E3o compat\u00EDvel do Conjunto de informa\u00E7\u00F5es R\u00E1pidas no classpath + +sourcereader.invalidSource=N\u00E3o \u00E9 poss\u00EDvel criar o leitor de origem \"{0}\" diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties new file mode 100644 index 00000000000..a5578c552d4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_CN.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=XML \u89E3\u6790\u9519\u8BEF: {0} +streaming.parseException=XML \u89E3\u6790\u9519\u8BEF: {0} + +xmlreader.illegalStateEncountered=XML \u8BFB\u8FDB\u7A0B\u5185\u90E8\u9519\u8BEF: \u975E\u6CD5\u7684\u72B6\u6001 ({0}) +xmlreader.unexpectedCharacterContent=XML \u8BFB\u8FDB\u7A0B\u9519\u8BEF: \u610F\u5916\u7684\u5B57\u7B26\u5185\u5BB9: \"{0}\" +xmlreader.ioException=XML \u8BFB\u8FDB\u7A0B\u9519\u8BEF: {0} +xmlreader.parseException=XML \u89E3\u6790\u9519\u8BEF: {0} +xmlreader.nestedError=XML \u8BFB\u8FDB\u7A0B\u9519\u8BEF: {0} + +xmlwriter.noPrefixForURI=XML \u5199\u8FDB\u7A0B\u9519\u8BEF: URI \u6CA1\u6709\u524D\u7F00: \"{0}\" +xmlwriter.ioException=XML \u5199\u8FDB\u7A0B\u9519\u8BEF: {0} +xmlwriter.nestedError=XML \u5199\u8FDB\u7A0B\u9519\u8BEF: {0} +xmlreader.unexpectedState=\u610F\u5916\u7684 XML \u8BFB\u8FDB\u7A0B\u72B6\u6001\u3002\u5E94\u4E3A: {0}, \u4F46\u627E\u5230\u7684\u662F: {1} +xmlreader.unexpectedState.message=\u610F\u5916\u7684 XML \u8BFB\u8FDB\u7A0B\u72B6\u6001\u3002\u5E94\u4E3A: {0}, \u4F46\u627E\u5230\u7684\u662F: {1}\u3002{2} +xmlreader.unexpectedState.tag=\u610F\u5916\u7684 XML \u6807\u8BB0\u3002\u5E94\u4E3A: {0}, \u4F46\u627E\u5230\u7684\u662F: {1} + +xmlrecorder.recording.ended=\u6CA1\u6709\u66F4\u591A\u7684\u8BB0\u5F55\u5143\u7D20\u53EF\u7528 + +stax.cantCreate=\u65E0\u6CD5\u521B\u5EFA StAX \u8BFB\u8FDB\u7A0B\u6216\u5199\u8FDB\u7A0B +staxreader.xmlstreamexception=XML \u6D41\u8BFB\u8FDB\u7A0B\u5F02\u5E38\u9519\u8BEF: {0} + +fastinfoset.decodingNotAccepted=\u4E0D\u63A5\u53D7\u5FEB\u901F\u4FE1\u606F\u96C6\u89E3\u7801 +fastinfoset.noImplementation=\u5728\u7C7B\u8DEF\u5F84\u4E2D\u627E\u4E0D\u5230\u5FEB\u901F\u4FE1\u606F\u96C6\u7684\u517C\u5BB9\u5B9E\u73B0 + +sourcereader.invalidSource=\u65E0\u6CD5\u4ECE\u6E90 \"{0}\" \u521B\u5EFA\u8BFB\u8FDB\u7A0B diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties new file mode 100644 index 00000000000..6702c2bef85 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/streaming_zh_TW.properties @@ -0,0 +1,50 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +streaming.ioException=XML \u5256\u6790\u932F\u8AA4: {0} +streaming.parseException=XML \u5256\u6790\u932F\u8AA4: {0} + +xmlreader.illegalStateEncountered=XML \u8B80\u53D6\u5668\u5167\u90E8\u932F\u8AA4: \u7121\u6548\u7684\u72C0\u614B ({0}) +xmlreader.unexpectedCharacterContent=XML \u8B80\u53D6\u5668\u932F\u8AA4: \u672A\u9810\u671F\u7684\u5B57\u5143\u5167\u5BB9: \"{0}\" +xmlreader.ioException=XML \u8B80\u53D6\u5668\u932F\u8AA4: {0} +xmlreader.parseException=XML \u5256\u6790\u932F\u8AA4: {0} +xmlreader.nestedError=XML \u8B80\u53D6\u5668\u932F\u8AA4: {0} + +xmlwriter.noPrefixForURI=XML \u5BEB\u5165\u5668\u932F\u8AA4: URI \"{0}\" \u6C92\u6709\u524D\u7F6E\u78BC +xmlwriter.ioException=XML \u5BEB\u5165\u5668\u932F\u8AA4: {0} +xmlwriter.nestedError=XML \u5BEB\u5165\u5668\u932F\u8AA4: {0} +xmlreader.unexpectedState=\u672A\u9810\u671F\u7684 XML \u8B80\u53D6\u5668\u72C0\u614B. \u9810\u671F: {0} \u4F46\u627E\u5230: {1} +xmlreader.unexpectedState.message=\u672A\u9810\u671F\u7684 XML \u8B80\u53D6\u5668\u72C0\u614B. \u9810\u671F\u70BA: {0} \u4F46\u627E\u5230: {1}. {2} +xmlreader.unexpectedState.tag=\u672A\u9810\u671F\u7684 XML \u6A19\u8A18. \u9810\u671F\u70BA: {0} \u4F46\u627E\u5230: {1} + +xmlrecorder.recording.ended=\u6C92\u6709\u66F4\u591A\u53EF\u7528\u7684\u8A18\u9304\u5143\u7D20 + +stax.cantCreate=\u7121\u6CD5\u5EFA\u7ACB StAX \u8B80\u53D6\u5668\u6216\u5BEB\u5165\u5668 +staxreader.xmlstreamexception=XML \u4E32\u6D41\u8B80\u53D6\u5668\u7570\u5E38\u72C0\u6CC1: {0} + +fastinfoset.decodingNotAccepted=\u4E0D\u63A5\u53D7 Fast Infoset \u89E3\u78BC +fastinfoset.noImplementation=\u5728\u985E\u5225\u8DEF\u5F91\u4E2D\u627E\u4E0D\u5230\u76F8\u5BB9\u7684 Fast Infoset \u5BE6\u884C + +sourcereader.invalidSource=\u7121\u6CD5\u5F9E\u4F86\u6E90 \"{0}\" \u5EFA\u7ACB\u8B80\u53D6\u5668 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties new file mode 100644 index 00000000000..8a0ca923635 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/tubelineassembly.properties @@ -0,0 +1,67 @@ +# +# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# MASM00XX +# TODO: parametrize config file (jaxws-tubes-default.xml) name!!! +MASM0001_DEFAULT_CFG_FILE_NOT_FOUND = MASM0001: Default configuration file [ {0} ] was not found + +MASM0002_DEFAULT_CFG_FILE_LOCATED = MASM0002: Default [ {0} ] configuration file located at [ {1} ] + +MASM0003_DEFAULT_CFG_FILE_NOT_LOADED = MASM0003: Default [ {0} ] configuration file was not loaded + +MASM0004_NO_TUBELINES_SECTION_IN_DEFAULT_CFG_FILE = MASM0004: No section found in the default [ {0} ] configuration file + +MASM0005_NO_DEFAULT_TUBELINE_IN_DEFAULT_CFG_FILE = MASM0005: No default tubeline is defined in the default [ {0} ] configuration file + +MASM0006_APP_CFG_FILE_LOCATED = MASM0006: Application metro.xml configuration file located at [ {0} ] + +MASM0007_APP_CFG_FILE_NOT_FOUND = MASM0007: No application metro.xml configuration file found. + +MASM0008_INVALID_URI_REFERENCE = MASM0008: Invalid URI reference [ {0} ] + +MASM0009_CANNOT_FORM_VALID_URL = MASM0009: Cannot form a valid URL from the resource name "{0}". For more details see the nested exception. + +MASM0010_ERROR_READING_CFG_FILE_FROM_LOCATION = MASM0010: Unable to unmarshall metro config file from location [ {0} ] + +MASM0011_LOADING_RESOURCE = MASM0011: Trying to load [ {0} ] via parent resouce loader [ {1} ] + +MASM0012_LOADING_VIA_SERVLET_CONTEXT = MASM0012: Trying to load [ {0} ] via servlet context [ {1} ] + +MASM0013_ERROR_INVOKING_SERVLET_CONTEXT_METHOD = MASM0013: Unable to invoke {0} method on servlet context instance + +MASM0014_UNABLE_TO_LOAD_CLASS = MASM0014: Unable to load [ {0} ] class + +MASM0015_CLASS_DOES_NOT_IMPLEMENT_INTERFACE = MASM0015: Class [ {0} ] does not implement [ {1} ] interface + +MASM0016_UNABLE_TO_INSTANTIATE_TUBE_FACTORY = MASM0016: Unable to instantiate Tube factory class [ {0} ] + +MASM0017_UNABLE_TO_LOAD_TUBE_FACTORY_CLASS = MASM0017: Unable to load Tube factory class [ {0} ] + +# {0} - system property name (e.g.: "com.sun.metro.soap.dump"/"com.sun.metro.soap.dump.level"), {1} - boolean value (true/false) / string value "SEVERE"/"WARNING"/"INFO"/"CONFIG"/"FINE"/"FINER"/"FINEST" +MASM0018_MSG_LOGGING_SYSTEM_PROPERTY_SET_TO_VALUE = MASM0018: Message logging {0} system property detected to be set to value {1} + +MASM0019_MSG_LOGGING_SYSTEM_PROPERTY_ILLEGAL_VALUE = MASM0019: Illegal logging level value "{1}" stored in the {0} message logging system property. Using default logging level. + +MASM0020_ERROR_CREATING_URI_FROM_GENERATED_STRING = MASM0020: Unable to create a new URI instance for generated endpoint URI string [ {0} ] diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties index 03de329c183..58729b9f464 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties new file mode 100644 index 00000000000..fecb833a10d --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_de.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation=Eine WebService-Annotation ist in Klasse nicht vorhanden: {0} +util.handler.endpoint.interface.no.webservice="Die End Point-Schnittstelle: {0} hat keine WebService-Annotation" +util.handler.class.not.found="Klasse: {0} konnte nicht gefunden werden" +util.handler.cannot.combine.soapmessagehandlers=Sie m\u00FCssen die HandlerChain-Annotation verwenden und nicht SOAPMessageHandlers +util.parser.wrong.element=Element \\"{1}\\" ermittelt, \\"{2}\\" in Konfiguration der HandlerChain erwartet (Zeile {0}) +util.failed.to.find.handlerchain.file=HandlerChain-Datei {1} f\u00FCr Klasse {0} nicht gefunden +util.failed.to.parse.handlerchain.file=HandlerChain-Datei {1} f\u00FCr Klasse {0} konnte nicht geparst werden +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=\ in Zeile {0} von {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties new file mode 100644 index 00000000000..f72670166de --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_es.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="No existe una anotaci\u00F3n de WebService en la clase: {0}" +util.handler.endpoint.interface.no.webservice="La interfaz de punto final: {0} no tiene una anotaci\u00F3n de WebService" +util.handler.class.not.found="No se ha encontrado la clase: {0}" +util.handler.cannot.combine.soapmessagehandlers=Debe utilizar la anotaci\u00F3n HandlerChain, no SOAPMessageHandlers +util.parser.wrong.element=se ha encontrado el elemento \"{1}\", pero se esperaba \"{2}\" en la configuraci\u00F3n de la cadena del manejador (l\u00EDnea {0}) +util.failed.to.find.handlerchain.file=No se ha encontrado el archivo de la cadena del manejador {1} para la clase {0} +util.failed.to.parse.handlerchain.file=No se ha podido analizar el archivo de la cadena del manejador {1} para la clase {0} +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=en la l\u00EDnea {0} de {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties new file mode 100644 index 00000000000..3aba8841a36 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_fr.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="Aucune annotation de service Web ne figure sur la classe {0}" +util.handler.endpoint.interface.no.webservice="L''interface d''adresse {0} ne comporte aucune annotation WebService" +util.handler.class.not.found="La classe {0} est introuvable" +util.handler.cannot.combine.soapmessagehandlers=Vous devez utiliser l'annotation HanlderChain et non SOAPMessageHandlers +util.parser.wrong.element=\u00E9l\u00E9ment \"{1}\" trouv\u00E9, \"{2}\" attendu dans la configuration de cha\u00EEne de gestionnaires (ligne {0}) +util.failed.to.find.handlerchain.file=Fichier de cha\u00EEne de gestionnaires {1} introuvable pour la classe {0} +util.failed.to.parse.handlerchain.file=Impossible d''analyser le fichier de cha\u00EEne de gestionnaires {1} pour la classe {0} +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=\u00E0 la ligne {0} sur {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties new file mode 100644 index 00000000000..a917984b79b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_it.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="Annotazione WebService non presente sulla classe: {0}" +util.handler.endpoint.interface.no.webservice="L''interfaccia Endpoint: {0} non dispone dell''annotazione WebService" +util.handler.class.not.found="Impossibile trovare la classe: {0}" +util.handler.cannot.combine.soapmessagehandlers=\u00C8 necessario usare l'annotazione HandlerChain, non SOAPMessageHandlers +util.parser.wrong.element=trovato elemento \"{1}\", previsto \"{2}\", nella configurazione della catena di handler (riga {0}) +util.failed.to.find.handlerchain.file=Impossibile trovare il file della catena di handler {1} per la classe {0} +util.failed.to.parse.handlerchain.file=Impossibile analizzare il file della catena di handler {1} per la classe {0} +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=alla riga {0} di {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties new file mode 100644 index 00000000000..5c9fb8c79cc --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ja.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="WebService\u6CE8\u91C8\u304C\u30AF\u30E9\u30B9: {0}\u306B\u5B58\u5728\u3057\u307E\u305B\u3093" +util.handler.endpoint.interface.no.webservice="\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30FB\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9: {0}\u306BWebService\u6CE8\u91C8\u304C\u3042\u308A\u307E\u305B\u3093" +util.handler.class.not.found="\u30AF\u30E9\u30B9: {0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F" +util.handler.cannot.combine.soapmessagehandlers=SOAPMessageHandlers\u3067\u306F\u306A\u304FHanlderChain\u6CE8\u91C8\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +util.parser.wrong.element=\u30CF\u30F3\u30C9\u30E9\u30FB\u30C1\u30A7\u30FC\u30F3\u69CB\u6210(\u884C{0})\u306B\u8981\u7D20\"{1}\"\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F\u304C\u3001\"{2}\"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059 +util.failed.to.find.handlerchain.file=\u30AF\u30E9\u30B9{0}\u306E\u30CF\u30F3\u30C9\u30E9\u30FB\u30C1\u30A7\u30FC\u30F3\u30FB\u30D5\u30A1\u30A4\u30EB{1}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F +util.failed.to.parse.handlerchain.file=\u30AF\u30E9\u30B9{0}\u306E\u30CF\u30F3\u30C9\u30E9\u30FB\u30C1\u30A7\u30FC\u30F3\u30FB\u30D5\u30A1\u30A4\u30EB{1}\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location={1}\u306E\u884C{0} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties new file mode 100644 index 00000000000..3c4634ab65b --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_ko.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="WebService \uC8FC\uC11D\uC774 \uD074\uB798\uC2A4\uC5D0 \uC5C6\uC74C: {0}" +util.handler.endpoint.interface.no.webservice="\uB05D\uC810 \uC778\uD130\uD398\uC774\uC2A4 {0}\uC5D0 WebService \uC8FC\uC11D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4." +util.handler.class.not.found="{0} \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4." +util.handler.cannot.combine.soapmessagehandlers=SOAPMessageHandlers\uAC00 \uC544\uB2CC HanlderChain \uC8FC\uC11D\uC744 \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. +util.parser.wrong.element=\"{1}\" \uC694\uC18C\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC9C0\uB9CC \uCC98\uB9AC\uAE30 \uCCB4\uC778 \uAD6C\uC131({0}\uD589)\uC5D0 \"{2}\"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4. +util.failed.to.find.handlerchain.file={0} \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C \uCC98\uB9AC\uAE30 \uCCB4\uC778 \uD30C\uC77C {1}\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +util.failed.to.parse.handlerchain.file={0} \uD074\uB798\uC2A4\uC5D0 \uB300\uD55C \uCC98\uB9AC\uAE30 \uCCB4\uC778 \uD30C\uC77C {1}\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location={1}\uC758 {0}\uD589 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties new file mode 100644 index 00000000000..fbaf5be6065 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_pt_BR.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="Uma anota\u00E7\u00E3o do WebService n\u00E3o est\u00E1 presente na classe: {0}" +util.handler.endpoint.interface.no.webservice="A Interface do Ponto Final: {0} n\u00E3o tem Anota\u00E7\u00E3o do WebService" +util.handler.class.not.found="N\u00E3o foi poss\u00EDvel encontrar a Classe: {0}" +util.handler.cannot.combine.soapmessagehandlers=Voc\u00EA de e usar a anota\u00E7\u00E3o HanlderChain, n\u00E3o a SOAPMessageHandlers +util.parser.wrong.element=elemento encontrado \\"{1}\\", esperava \\"{2}\\" na configura\u00E7\u00E3o da cadeia de handler (linha {0}) +util.failed.to.find.handlerchain.file=N\u00E3o foi poss\u00EDvel localizar o arquivo da cadeia de handler {1} para a classe {0} +util.failed.to.parse.handlerchain.file=N\u00E3o foi poss\u00EDvel fazer parse do arquivo da cadeia de handler {1} para a classe {0} +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=na linha {0} de {1} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties new file mode 100644 index 00000000000..6b326aca53a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_CN.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="\u7C7B\u4E0A\u4E0D\u5B58\u5728 Web \u670D\u52A1\u6CE8\u91CA: {0}" +util.handler.endpoint.interface.no.webservice="\u7AEF\u70B9\u63A5\u53E3{0}\u6CA1\u6709 Web \u670D\u52A1\u6CE8\u91CA" +util.handler.class.not.found="\u627E\u4E0D\u5230\u7C7B{0}" +util.handler.cannot.combine.soapmessagehandlers=\u5FC5\u987B\u4F7F\u7528 HanlderChain annotation, \u800C\u4E0D\u662F SOAPMessageHandlers +util.parser.wrong.element=\u5728\u5904\u7406\u7A0B\u5E8F\u94FE\u914D\u7F6E\u4E2D\u627E\u5230\u7684\u662F\u5143\u7D20 \"{1}\", \u5E94\u4E3A \"{2}\" (\u7B2C {0} \u884C) +util.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230\u7C7B{0}\u7684\u5904\u7406\u7A0B\u5E8F\u94FE\u6587\u4EF6{1} +util.failed.to.parse.handlerchain.file=\u65E0\u6CD5\u89E3\u6790\u7C7B{0}\u7684\u5904\u7406\u7A0B\u5E8F\u94FE\u6587\u4EF6{1} +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=\u4F4D\u4E8E{1}\u7684\u7B2C {0} \u884C diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties new file mode 100644 index 00000000000..baa82efb3ce --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/util_zh_TW.properties @@ -0,0 +1,34 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +util.handler.no.webservice.annotation="Web \u670D\u52D9\u8A3B\u89E3\u4E0D\u5B58\u5728\u4E0B\u5217\u985E\u5225\u4E2D: {0}" +util.handler.endpoint.interface.no.webservice="\u7AEF\u9EDE\u4ECB\u9762: {0} \u672A\u5305\u542B Web \u670D\u52D9\u8A3B\u89E3" +util.handler.class.not.found="\u627E\u4E0D\u5230\u985E\u5225: {0}" +util.handler.cannot.combine.soapmessagehandlers=\u60A8\u5FC5\u9808\u4F7F\u7528 HanlderChain \u8A3B\u89E3, \u800C\u975E SOAPMessageHandlers +util.parser.wrong.element=\u5728\u8655\u7406\u7A0B\u5F0F\u93C8\u7D44\u614B (\u884C {0}) \u4E2D\u767C\u73FE\u5143\u7D20 \"{1}\", \u9810\u671F\u70BA \"{2}\" +util.failed.to.find.handlerchain.file=\u627E\u4E0D\u5230\u985E\u5225 {0} \u7684\u8655\u7406\u7A0B\u5F0F\u93C8\u6A94\u6848 {1} +util.failed.to.parse.handlerchain.file=\u7121\u6CD5\u5256\u6790\u985E\u5225 {0} \u7684\u8655\u7406\u7A0B\u5F0F\u93C8\u6A94\u6848 {1} +# Concatenated with qname/exception message (qname + util.location, exception message). +util.location=\u5728 {1} \u7684\u7B2C {0} \u884C diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties index 2c41b9bff43..323a3bcc513 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties new file mode 100644 index 00000000000..496b0a33fe5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_de.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=MEX-WSDL-Metadaten k\u00F6nnen nicht geparst werden, die systemId der MEX-Quelle ist null. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=Import von {0} verletzt BP 1.1 R2001. Es wird mit einer Warnung fortgefahren.\nR2001 Eine DESCRIPTION darf nur die WSDL-Anweisung \\"import\\" verwenden, um eine andere WSDL-Beschreibung zu importieren. +wsdl.portaddress.epraddress.not.match= Bei Port {0} stimmt das Serviceverzeichnis {1} nicht mit der Adresse {2} in der EndpointReference \u00FCberein diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties new file mode 100644 index 00000000000..d67af02eedb --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_es.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=Los metadatos de WSDL de MEX no se pueden analizar. El identificador del sistema del origen MEX es nulo. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=La importaci\u00F3n de {0} es una violaci\u00F3n de BP 1.1 R2001. Se contin\u00FAa con una advertencia.\nR2001 DESCRIPTION s\u00F3lo debe utilizar la sentencia \\"import\\" de WSDL para importar otra descripci\u00F3n de WSDL. +wsdl.portaddress.epraddress.not.match= Para el puerto: {0}, la ubicaci\u00F3n del servicio {1} no coincide con la direcci\u00F3n {2} en la referencia del punto final diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties new file mode 100644 index 00000000000..fd31c26b6c5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_fr.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=Les m\u00E9tadonn\u00E9es WSDL MEX ne peuvent pas \u00EAtre analys\u00E9es, l'\u00E9l\u00E9ment systemId est l'une des sources MEX NULL. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=L''import de {0} est une violation de BP 1.1 R2001. Poursuite de l''op\u00E9ration avec un avertissement. \nR2001 Une DESCRIPTION doit utiliser uniquement l''instruction \"import\" WSDL pour importer une autre description WSDL. +wsdl.portaddress.epraddress.not.match= Pour le port {0}, l''emplacement du service {1} ne correspond pas \u00E0 l''adresse {2} dans l''\u00E9l\u00E9ment EndpointReference diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties new file mode 100644 index 00000000000..3af00fc104f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_it.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=Impossibile analizzare i metadati WSDL MEX, l'ID sistema dell'origine MEX \u00E8 nullo. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=L''importazione di {0} \u00E8 una violazione di BP 1.1 R2001. Si continua con un''avvertenza.\nR2001 Una DESCRIPTION deve usare solo l''istruzione \"import\" WSDL per importare un''altra descrizione WSDL. +wsdl.portaddress.epraddress.not.match= Per Port: {0}, la posizione del servizio {1} non corrisponde all''indirizzo {2} in EndpointReference diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties new file mode 100644 index 00000000000..1cac3d11c0f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ja.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=MEX WSDL\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3002MEX\u30BD\u30FC\u30B9\u306EsystemId\u304Cnull\u3067\u3059\u3002 +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl={0}\u306E\u30A4\u30F3\u30DD\u30FC\u30C8\u306F\u3001BP 1.1 R2001\u306B\u9055\u53CD\u3057\u3066\u3044\u307E\u3059\u3002\u8B66\u544A\u3042\u308A\u3067\u51E6\u7406\u3057\u3066\u3044\u307E\u3059\u3002\nR2001 \u5225\u306EWSDL\u8AAC\u660E\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3059\u308B\u306B\u306F\u3001DESCRIPTION\u3067WSDL \"import\"\u6587\u306E\u307F\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 +wsdl.portaddress.epraddress.not.match= \u30DD\u30FC\u30C8: {0}\u306B\u3064\u3044\u3066\u3001\u30B5\u30FC\u30D3\u30B9\u306E\u5834\u6240{1}\u304CEndpointReference\u306E\u30A2\u30C9\u30EC\u30B9{2}\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties new file mode 100644 index 00000000000..76836df7a74 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_ko.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=MEX WSDL \uBA54\uD0C0 \uB370\uC774\uD130\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. MEX \uC18C\uC2A4\uC758 systemId\uAC00 \uB110\uC785\uB2C8\uB2E4. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl={0} \uC784\uD3EC\uD2B8\uB294 BP 1.1 R2001\uC744 \uC704\uBC18\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. \uACBD\uACE0 \uC0C1\uD0DC\uC5D0\uC11C \uC791\uC5C5\uC744 \uC9C4\uD589\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4.\nR2001 DESCRIPTION\uC740 WSDL \"import\" \uBB38\uC744 \uD1B5\uD574\uC11C\uB9CC \uB2E4\uB978 WSDL \uC124\uBA85\uC744 \uC784\uD3EC\uD2B8\uD574\uC57C \uD569\uB2C8\uB2E4. +wsdl.portaddress.epraddress.not.match= {0} \uD3EC\uD2B8\uC758 \uACBD\uC6B0 \uC11C\uBE44\uC2A4 \uC704\uCE58 {1}\uC774(\uAC00) EndpointReference\uC758 {2} \uC8FC\uC18C\uC640 \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties new file mode 100644 index 00000000000..1fea8cdaa00 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_pt_BR.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=N\u00E3o \u00E9 poss\u00EDvel fazer parse dos metadados MEX WSDL; o systemId da origem MEX \u00E9 nulo. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=A importa\u00E7\u00E3o de {0} \u00E9 a viola\u00E7\u00E3o de BP 1.1 R2001. Continuando com a advert\u00EAncia.\nR2001 A DESCRIPTION s\u00F3 deve usar a instru\u00E7\u00E3o \\"import\\" do WSDL para importar outra descri\u00E7\u00E3o do WSDL. +wsdl.portaddress.epraddress.not.match= Para a Porta: {0}, a localiza\u00E7\u00E3o de servi\u00E7o {1} n\u00E3o corresponde ao endere\u00E7o {2} na EndpointReference diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties new file mode 100644 index 00000000000..968a18e3097 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_CN.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=\u65E0\u6CD5\u89E3\u6790 MEX WSDL \u5143\u6570\u636E, MEX \u6E90\u7684 systemId \u4E3A\u7A7A\u503C\u3002 +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=\u5BFC\u5165{0}\u8FDD\u53CD\u4E86 BP 1.1 R2001\u3002\u7EE7\u7EED\u64CD\u4F5C\u4F1A\u51FA\u73B0\u8B66\u544A\u3002\nR2001 DESCRIPTION \u53EA\u80FD\u4F7F\u7528 WSDL \"import\" \u8BED\u53E5\u5BFC\u5165\u5176\u4ED6 WSDL \u8BF4\u660E\u3002 +wsdl.portaddress.epraddress.not.match= \u5BF9\u4E8E\u7AEF\u53E3 {0}, \u670D\u52A1\u4F4D\u7F6E{1}\u4E0E EndpointReference \u4E2D\u7684\u5730\u5740 {2} \u4E0D\u5339\u914D diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties new file mode 100644 index 00000000000..bca0cd5ac11 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsdlmodel_zh_TW.properties @@ -0,0 +1,29 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +Mex.metadata.systemid.null=\u7121\u6CD5\u5256\u6790 MEX WSDL \u63CF\u8FF0\u8CC7\u6599, MEX \u4F86\u6E90\u7684 systemId \u70BA\u7A7A\u503C. +# R2001 is a standardized message so it should not be translated (http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html). At least DESCRIPTION should remain the same. +wsdl.import.should.be.wsdl=\u532F\u5165 {0} \u6703\u9055\u53CD BP 1.1 R2001 \u898F\u5B9A. \u7E7C\u7E8C\u9032\u884C, \u4F46\u767C\u51FA\u8B66\u544A.\nR2001 DESCRIPTION \u5FC5\u9808\u53EA\u80FD\u4F7F\u7528 WSDL \"import\" \u6558\u8FF0\u53E5\u4F86\u532F\u5165\u53E6\u4E00\u500B WSDL \u63CF\u8FF0. +wsdl.portaddress.epraddress.not.match= \u5C0D\u65BC\u9023\u63A5\u57E0: {0}, \u670D\u52D9\u4F4D\u7F6E {1} \u8207 EndpointReference \u4E2D\u7684\u4F4D\u5740 {2} \u4E0D\u7B26 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties index b79608eb005..a51a4b70a1b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties new file mode 100644 index 00000000000..5eb38f85c35 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_de.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=Laufzeitdeskriptor "{0}" fehlt + +listener.parsingFailed=WSSERVLET11: Laufzeitdeskriptor konnte nicht geparst werden: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser konnte sun-jaxws.xml-Laufzeitdeskriptor nicht parsen +WSSERVLET11.diag.check.1=Pr\u00FCfen Sie die sun-jaxws.xml-Datei auf Richtigkeit +WSSERVLET11.diag.cause.2=Der Laufzeit-Deployment-Deskriptor von sun-jaxws.xml fehlt m\u00F6glicherweise +WSSERVLET11.diag.check.2=Pr\u00FCfen Sie, ob die jaxrpc-ri.xml-Datei in der .war-Datei vorhanden ist + + +listener.info.initialize=WSSERVLET12: Initialisierung von JAX-WS-Kontext-Listener +WSSERVLET12.diag.cause.1=Hochfahren von Kontext-Listener +WSSERVLET12.diag.check.1=Normales Hochfahren des Webservice + +listener.info.destroy=WSSERVLET13: JAX-WS-Kontext-Listener endg\u00FCltig gel\u00F6scht +WSSERVLET13.diag.cause.1=Herunterfahren von Kontext-Listener +WSSERVLET13.diag.check.1=Normales Herunterfahren des Webservice + +servlet.info.initialize=WSSERVLET14: Initialisierung von JAX-WS-Servlet +WSSERVLET14.diag.cause.1=Webservices-Servlet wird hochgefahren. +WSSERVLET14.diag.check.1=Normales Webservice-Deployment. Deployment des Service abgeschlossen. + +servlet.info.destroy=WSSERVLET15: JAX-WS-Servlet endg\u00FCltig gel\u00F6scht +WSSERVLET15.diag.cause.1=Herunterfahren des Webservices-Servlets. +WSSERVLET15.diag.check.1=Normales Undeployment des Webservice. Undeployment abgeschlossen. + +servlet.warning.missingContextInformation=WSSERVLET16: Kontextinformationen fehlen +WSSERVLET16.diag.cause.1=Die Datei jaxrpc-ri.xml fehlt m\u00F6glicherweise in der .war-Datei +WSSERVLET16.diag.check.1=Extrahieren Sie die .war-Datei des Service; pr\u00FCfen Sie, ob die Datei jaxrpc-ri-runtime.xml vorhanden ist + + +servlet.warning.duplicateEndpointName=WSSERVLET17: Doppelter End Point-Name +WSSERVLET17.diag.cause.1=Es wurden mindestens zwei End Points mit demselben Namen im Laufzeitdeskriptor jaxrpc-ri.xml gefunden +WSSERVLET17.diag.check.1=Beachten Sie, dass dies Probleme beim Deployment des Service verursachen kann + + +servlet.info.emptyRequestMessage=WSSERVLET18: Leere Anforderungsnachricht erhalten +WSSERVLET18.diag.cause.1=Die von diesem Client gesendete Nachricht ist leer +WSSERVLET18.diag.check.1=Dies ist m\u00F6glicherweise Absicht. Wenn nicht, pr\u00FCfen Sie die Clientprogramme auf Fehler. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: Anforderung f\u00FCr End Point erhalten: {0} +WSSERVLET19.diag.cause.1=Clientanforderung f\u00FCr diesen End Point ist eingegangen +WSSERVLET19.diag.check.1=Nur Informationsmeldung. Normaler Betrieb. + +servlet.error.noImplementorForEndpoint=WSSERVLET20: Kein Implementor f\u00FCr End Point: {0} +WSSERVLET20.diag.cause.1=Implementierung f\u00FCr diesen Service kann nicht gefunden werden +WSSERVLET20.diag.check.1=Dekomprimieren Sie die .war-Datei. Werden Tie- und Serializer-Klassen gefunden? + +servlet.trace.invokingImplementor=WSSERVLET21: Implementor wird aufgerufen: {0} +WSSERVLET21.diag.cause.1=Der Webservice wird aufgerufen +WSSERVLET21.diag.check.1=Normaler Webserviceaufruf. + +servlet.error.noEndpointSpecified=WSSERVLET22: Kein End Point angegeben +WSSERVLET22.diag.cause.1=Eine Anforderung wurde ohne End Point aufgerufen +WSSERVLET22.diag.check.1=Legen Sie den End Point mit der Eigenschaft stub.setTargetEndpoint fest + +servlet.error.noResponseMessage=WSSERVLET23: Keine Antwortnachricht +WSSERVLET23.diag.cause.1=Die Anforderung hat keine Antwort von dem Service generiert +WSSERVLET23.diag.check.1=Wenn eine Antwort erwartet wurde, pr\u00FCfen Sie, ob wirklich eine Anforderungsnachricht gesendet wurde +WSSERVLET23.diag.check.2=Die Anforderung hat m\u00F6glicherweise das falsche Format und wird vom Service akzeptiert, hat jedoch keine Antwort generiert + +servlet.trace.writingFaultResponse=WSSERVLET24: Fault-Antwort wird geschrieben +WSSERVLET24.diag.cause.1=SOAPFault-Nachricht wird an den Client zur\u00FCckgegeben. +WSSERVLET24.diag.check.1=Fault bei Tracing-Nachricht aufgezeichnet. + +servlet.trace.writingSuccessResponse=WSSERVLET25: Erfolgsantwort wird geschrieben +WSSERVLET25.diag.cause.1=SOAPMessage-Antwort wird an Client zur\u00FCckgegeben +WSSERVLET25.diag.check.1=Tracing-Nachricht, normale Antwort. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: Doppeltes URL-Muster in End Point: {0} +WSSERVLET26.diag.cause.1=Die End Point-URL ist ein Duplikat +WSSERVLET26.diag.check.1=Dies kann zu einem Problem f\u00FChren, entfernen Sie die doppelten End Points + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: Nicht unterst\u00FCtztes implizites URL-Muster in End Point: {0} +WSSERVLET27.diag.cause.1=Implizite URLs werden in diesem Release nicht unterst\u00FCtzt +WSSERVLET27.diag.check.1=Entfernen Sie die implizite URL + +servlet.faultstring.missingPort=WSSERVLET28: Portinformationen fehlen +WSSERVLET28.diag.cause.1=Ziel-End Point ist null +WSSERVLET28.diag.check.1=Legen Sie den Ziel-End Point mit der Eigenschaft stub.setTargetEndpoint fest + +servlet.faultstring.portNotFound=WSSERVLET29: Port nicht gefunden ({0}) +WSSERVLET29.diag.cause.1=Ein Port ist angegeben, es wird jedoch keine entsprechende Serviceimplementierung gefunden +WSSERVLET29.diag.check.1=Ist der Port g\u00FCltig? Dekomprimieren Sie die .war-Datei, und stellen Sie sicher, dass Tie und Serializer vorhanden sind + +servlet.faultstring.internalServerError=WSSERVLET30: Interner Serverfehler ({0}) +WSSERVLET30.diag.cause.1=Bei der Verarbeitung der Anforderung ist ein Serverfehler aufgetreten +WSSERVLET30.diag.check.1=Dies kann eine Reihe von Ursachen haben. Pr\u00FCfen Sie die Serverlogdatei auf Ausnahmen. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: Throwable beim Recovery einer fr\u00FCheren Ausnahme abgefangen: {0} +WSSERVLET51.diag.cause.1=Die Serviceverarbeitung der Anforderung hat eine Ausnahme generiert; beim Versuch, eine SOAPFaultMessage zur\u00FCckzugeben, wurde erneut ein Throwable generiert +WSSERVLET51.diag.check.1=Pr\u00FCfen Sie die server.xml-Logdatei auf Ausnahmeinformationen + +error.servlet.caughtThrowable=WSSERVLET49: Throwable abgefangen: {0} +WSSERVLET49.diag.cause.1=Die Serviceverarbeitung der Anforderung hat eine Ausnahme generiert; beim Versuch, eine SOAPFaultMessage zur\u00FCckzugeben, wurde erneut ein Throwable generiert +WSSERVLET49.diag.check.1=Pr\u00FCfen Sie die server.xml-Logdatei auf Ausnahmeinformationen + +error.servlet.caughtThrowableInInit=WSSERVLET50: Throwable bei Servlet-Initialisierung abgefangen: {0} +WSSERVLET50.diag.cause.1=Sun-jaxws.xml oder web.xml von WS-Laufzeitumgebung sind m\u00F6glicherweise nicht korrekt +WSSERVLET50.diag.check.1=Pr\u00FCfen Sie, ob sun-jaxws.xml und web.xml in der .war-Datei des Service korrekt sind +WSSERVLET50.diag.cause.2=Deployment-Deskriptoren des Application Servers sind m\u00F6glicherweise falsch +WSSERVLET50.diag.check.2=Pr\u00FCfen Sie, ob die Deployment-Deskriptoren des Application Servers in der .war-Datei des Service korrekt sind +WSSERVLET50.diag.cause.3=M\u00F6glicherweise liegen einige Probleme bei der Application Server-Initialisierung vor +WSSERVLET50.diag.check.3=Pr\u00FCfen Sie die server.xml-Datei im Domainverzeichnis auf Fehler + +publisher.info.applyingTransformation=WSSERVLET31: Transformation mit aktueller Adresse wird angewendet: {0} +WSSERVLET31.diag.cause.1=Transformation wird angewendet +WSSERVLET31.diag.check.1=Normaler Vorgang + +publisher.info.generatingWSDL=WSSERVLET32: WSDL f\u00FCr End Point wird generiert: {0} +WSSERVLET32.diag.cause.1=WSDL wird generiert +WSSERVLET32.diag.check.1=Normaler Vorgang. + +exception.cannotCreateTransformer=WSSERVLET33: Transformer kann nicht erstellt werden +WSSERVLET33.diag.cause.1=Bei der Ver\u00F6ffentlichung der Service-WSDL wird das HTTP-Verzeichnis mit dem bereitgestellten Verzeichnis/End Point mit der XSLT-Transformation gepatcht. Der Transformer zur Durchf\u00FChrung der Transformation konnte nicht erstellt werden. +WSSERVLET33.diag.check.1=M\u00F6glicherweise wird eine nicht kompatible Transformations-Engine verwendet. Stellen Sie sicher, dass Sie den richtigen Transformer und die richtige Version verwenden. +WSSERVLET33.diag.cause.2=Bei der Ver\u00F6ffentlichung der Service-WSDL wird das HTTP-Verzeichnis mit dem bereitgestellten Verzeichnis/End Point mit der XSLT-Transformation gepatcht. Der Transformer zur Durchf\u00FChrung der Transformation konnte nicht erstellt werden. +WSSERVLET33.diag.check.2=M\u00F6glicherweise wird die Transformations-Engine nicht unterst\u00FCtzt oder ist inkompatibel. Pr\u00FCfen Sie die Datei server.xml auf Ausnahmen. + + +exception.transformationFailed=WSSERVLET34: Transformation nicht erfolgreich: {0} +WSSERVLET34.diag.cause.1=Das Patching des Verzeichnisses in der WSDL war beim Transformationsversuch nicht erfolgreich. +WSSERVLET34.diag.check.1=Pr\u00FCfen Sie die Logdateien auf detailliertere Fehler/Ausnahmen + +exception.templateCreationFailed=WSSERVLET35: Konnte kein Vorlagenobjekt erstellen +WSSERVLET35.diag.cause.1=Eine XSLT-Stylesheet-Vorlage wird f\u00FCr das Patching des WSDL-Verzeichnisses mit der Transformation erstellt. Vorlage konnte nicht erstellt werden. +WSSERVLET35.diag.check.1=Eine Ausnahme wurde bei der Erstellung der Vorlage ausgel\u00F6st. F\u00FCr weitere Einzelheiten zeigen Sie die Ausnahme und den Stack Trace an. + +servlet.html.method=WSSERVLET63: Sie m\u00FCssen Post f\u00FCr diesen Anforderungstyp verwenden +WSSERVLET63.diag.cause.1=Webserviceanforderungen m\u00FCssen die HTTP-POST-Methode verwenden: WSI BP 1.0 +WSSERVLET63.diag.check.1=Stellen Sie sicher, dass der HTTP-Client POST-Anforderungen und keine GET-Anforderungen verwendet + + +servlet.faultstring.invalidContentType=WSSERVLET64: Ung\u00FCltiger Content-Type, text/xml erforderlich +WSSERVLET64.diag.cause.1=Webserviceanforderungen m\u00FCssen den Content-Type text/xml aufweisen: WSI BP 1.0 +WSSERVLET64.diag.check.1=Stellen Sie sicher, dass die Clientanforderung text/xml verwendet + +error.implementorFactory.newInstanceFailed=WSSERVLET43: Serviceimplementor f\u00FCr Port \\"{0}\\" konnte nicht instanziiert werden +WSSERVLET43.diag.cause.1=Instanziierung des Webservice nicht erfolgreich. +WSSERVLET43.diag.check.1=Stellen Sie sicher, dass der Webservice verf\u00FCgbar und \u00F6ffentlich ist. Pr\u00FCfen Sie die Ausnahme auf weitere Einzelheiten + +error.implementorFactory.servantInitFailed=WSSERVLET44: Serviceimplementor f\u00FCr Port \\"{0}\\" konnte nicht initialisiert werden +WSSERVLET44.diag.cause.1=Der Webservice wurde instanziiert, konnte jedoch nicht initialisiert werden +WSSERVLET44.diag.check.1=Pr\u00FCfen Sie die Ausnahme auf weitere Einzelheiten. Stellen Sie sicher, dass alle Konfigurationsdateien korrekt sind. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: Ung\u00FCltiger Header. SOAPAction erforderlich +WSSERVLET65.diag.cause.1=SOAP-Aktion ist erforderlich +WSSERVLET65.diag.check.1=F\u00FCgen Sie SOAPAction und den entsprechenden Wert hinzu + +# {0} - URI +servlet.no.address.available=Es ist keine Adresse f\u00FCr {0} verf\u00FCgbar + +servlet.html.title= Webservices +servlet.html.title2=

    Webservices

    +servlet.html.noInfoAvailable=

    Keine JAX-WS-Kontextinformationen verf\u00FCgbar.

    +servlet.html.columnHeader.portName=End Point +servlet.html.columnHeader.status=Status +servlet.html.columnHeader.information=Informationen +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    Servicename\\:{0}
    Portname\\:{1}
    +servlet.html.information.table=
    Adresse\:{0}
    WSDL\:{0}?wsdl
    Implementierungsklasse\:{1}
    +servlet.html.notFound=

    404 Nicht gefunden: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: Keine Konfiguration angegeben +error.implementorFactory.noInputStream=WSSERVLET37: Keine Konfiguration angegeben +error.implementorRegistry.unknownName=WSSERVLET38: Unbekannter Portname: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: Konfiguration kann nicht gelesen werden +error.implementorRegistry.classNotFound=WSSERVLET40: Klasse nicht gefunden: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: Konfigurationsinformationen sind unvollst\u00E4ndig +error.implementorRegistry.duplicateName=WSSERVLET42: Doppelter Portname: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: Datei nicht gefunden: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: Konfiguration kann nicht gelesen werden +error.servlet.init.config.parameter.missing=WSSERVLET47: Konfigurationsparameter kann nicht gefunden werden: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: Konfigurationsdatei: \"{0}\" nicht gefunden +# + +error.servlet.noImplementorForPort=WSSERVLET52: Kein Implementor f\u00FCr Port registriert: {0} +error.servlet.noPortSpecified=WSSERVLET53: Kein Port in HTTP-POST-Anforderungs-URL angegeben +error.servlet.noResponseWasProduced=WSSERVLET54: Es wurde keine Antwort erzeugt (interner Fehler) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: Leere Anforderungsnachricht erhalten +info.servlet.initializing=WSSERVLET56: JAX-WS-Servlet: init +info.servlet.destroying=WSSERVLET57: JAX-WS-Servlet: destroy +# +trace.servlet.requestForPortNamed=WSSERVLET58: Anforderung f\u00FCr Port erhalten: {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: Anforderung wird an Implementor \u00FCbergeben: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: Antwort von Implementor erhalten: {0} +trace.servlet.writingFaultResponse=WSSERVLET61: Fault-Antwort wird geschrieben +trace.servlet.writingSuccessResponse=WSSERVLET62: Erfolgsantwort wird geschrieben +# +html.nonRootPage.title= Webservice +html.nonRootPage.body1=

    Ein Webservice ist bei dieser URL installiert.

    +html.nonRootPage.body2=

    Ung\u00FCltiger Anforderungs-URI.

    Pr\u00FCfen Sie die Deployment-Informationen.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Webservice +html.wsdlPage.noWsdl=

    Es ist kein WSDL-Dokument zur Ver\u00F6ffentlichung verf\u00FCgbar.

    Pr\u00FCfen Sie die Deployment-Informationen.

    +html.rootPage.title= Webservice +html.rootPage.body1=

    Ein Webservice ist bei dieser URL installiert.

    +html.rootPage.body2a=

    Er unterst\u00FCtzt die folgenden Ports: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    Dieser End Point ist nicht richtig konfiguriert. Pr\u00FCfen Sie Verzeichnis und Content der Konfigurationsdatei.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties new file mode 100644 index 00000000000..2bb7e80bff9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_es.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=Falta el descriptor en tiempo de ejecuci\u00F3n"{0}" + +listener.parsingFailed=WSSERVLET11: Fallo al analizar el descriptor en tiempo de ejecuci\u00F3n: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser no ha podido analizar el descriptor en tiempo de ejecuci\u00F3n sun-jaxws.xml +WSSERVLET11.diag.check.1=Compruebe el archivo sun-jaxws.xml para asegurarse de que es correcto +WSSERVLET11.diag.cause.2=Puede que falte el descriptor de despliegue en tiempo de ejecuci\u00F3n sun-jaxws.xml +WSSERVLET11.diag.check.2=Compruebe el archivo jaxrpc-ri.xml para asegurarse de que se encuentra en el archivo war + + +listener.info.initialize=WSSERVLET12: inicializando el listener de contexto de JAX-WS +WSSERVLET12.diag.cause.1=Iniciando listener de contexto +WSSERVLET12.diag.check.1=Inicio de servicio web normal + +listener.info.destroy=WSSERVLET13: el listener de contexto de JAX-WS se ha destruido +WSSERVLET13.diag.cause.1=Cierre de listener de contexto +WSSERVLET13.diag.check.1=Cierre de servicio web normal + +servlet.info.initialize=WSSERVLET14: inicializando el servlet de JAX-WS +WSSERVLET14.diag.cause.1=Iniciando el servlet de servicios web. +WSSERVLET14.diag.check.1=Despliegue de servicio web normal. Se ha completado el despliegue del servicio. + +servlet.info.destroy=WSSERVLET15: el servlet de JAX-WS se ha destruido +WSSERVLET15.diag.cause.1=El servlet de servicios web se ha cerrado. +WSSERVLET15.diag.check.1=Anulaci\u00F3n de despliegue normal del servicio web. Se ha completado la anulaci\u00F3n del despliegue. + +servlet.warning.missingContextInformation=WSSERVLET16: falta informaci\u00F3n de contexto +WSSERVLET16.diag.cause.1=Puede que falte el archivo jaxrpc-ri.xml en el archivo war +WSSERVLET16.diag.check.1=Extraiga el archivo jar del archivo war del servicio para comprobar si est\u00E1 el archivo jaxrpc-ri-runtime.xml + + +servlet.warning.duplicateEndpointName=WSSERVLET17: nombre de punto final duplicado +WSSERVLET17.diag.cause.1=Se han encontrado dos o m\u00E1s puntos finales con el mismo nombre en el descriptor de tiempo de ejecuci\u00F3n jaxrpc-ri.xml +WSSERVLET17.diag.check.1=Tenga en cuenta que esto podr\u00EDa producir problemas con el despliegue del servicio + + +servlet.info.emptyRequestMessage=WSSERVLET18: se ha obtenido un mensaje de solicitud vac\u00EDo +WSSERVLET18.diag.cause.1=El mensaje que ha enviado el cliente est\u00E1 vac\u00EDo +WSSERVLET18.diag.check.1=Podr\u00EDa ser o no intencionado. En caso de que no lo sea, examine el programa del cliente para buscar errores. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: Se ha obtenido la solicitud para el punto final: {0} +WSSERVLET19.diag.cause.1=Ha llegado la solicitud del cliente para este punto final +WSSERVLET19.diag.check.1=S\u00F3lo mensaje informativo. Funcionamiento normal. + +servlet.error.noImplementorForEndpoint=WSSERVLET20: No hay ning\u00FAn implantador para el punto final: {0} +WSSERVLET20.diag.cause.1=No se ha encontrado la implantaci\u00F3n de este servicio +WSSERVLET20.diag.check.1=Descomprima el archivo war. \u00BFEncuentra las clases del serializador y de uni\u00F3n? + +servlet.trace.invokingImplementor=WSSERVLET21: Llamando al implantador: {0} +WSSERVLET21.diag.cause.1=Se est\u00E1 llamando al servicio web +WSSERVLET21.diag.check.1=Llamada normal al servicio web. + +servlet.error.noEndpointSpecified=WSSERVLET22: no se ha especificado un punto final +WSSERVLET22.diag.cause.1=Se ha llamado a una solicitud sin ning\u00FAn punto final +WSSERVLET22.diag.check.1=Defina el punto final con la propiedad stub.setTargetEndpoint + +servlet.error.noResponseMessage=WSSERVLET23: no hay ning\u00FAn mensaje de respuesta +WSSERVLET23.diag.cause.1=La solicitud no ha generado ninguna respuesta del servicio +WSSERVLET23.diag.check.1=Si se esperaba una respuesta, compruebe si realmente se ha enviado un mensaje de solicitud +WSSERVLET23.diag.check.2=Puede que la solicitud tenga un formato incorrecto y que la haya aceptado el servicio, pero no se haya generado una respuesta + +servlet.trace.writingFaultResponse=WSSERVLET24: escribiendo respuesta a fallo +WSSERVLET24.diag.cause.1=Se est\u00E1 devolviendo al cliente el mensaje SOAPFault. +WSSERVLET24.diag.check.1=Se ha registrado el fallo del mensaje de rastreo. + +servlet.trace.writingSuccessResponse=WSSERVLET25: escribiendo respuesta correcta +WSSERVLET25.diag.cause.1=Se est\u00E1 devolviendo la respuesta SOAPMessage al cliente +WSSERVLET25.diag.check.1=Rastreando mensaje; respuesta normal. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: Patr\u00F3n de URL duplicado en punto final: {0} +WSSERVLET26.diag.cause.1=La URL de punto final es un duplicado +WSSERVLET26.diag.check.1=Podr\u00EDa producir un problema. Elimine los puntos finales duplicados + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: Patr\u00F3n de URL impl\u00EDcitas no soportado en el punto final: {0} +WSSERVLET27.diag.cause.1=Las URL impl\u00EDcitas no est\u00E1n soportadas en esta versi\u00F3n +WSSERVLET27.diag.check.1=Elimine la URL impl\u00EDcita + +servlet.faultstring.missingPort=WSSERVLET28: falta la informaci\u00F3n de puerto +WSSERVLET28.diag.cause.1=El punto final de destino es nulo +WSSERVLET28.diag.check.1=Defina el punto final de destino con la propiedad stub.setTargetEndpoint(). + +servlet.faultstring.portNotFound=WSSERVLET29: no se ha encontrado el puerto ({0}) +WSSERVLET29.diag.cause.1=Se ha especificado un puerto, pero no se ha encontrado una implantaci\u00F3n del servicio correspondiente +WSSERVLET29.diag.check.1=\u00BFEl puerto es v\u00E1lido? Descomprima el archivo war y aseg\u00FArese de que la uni\u00F3n y los serializadores se encuentran en \u00E9l + +servlet.faultstring.internalServerError=WSSERVLET30: error de servidor interno ({0}) +WSSERVLET30.diag.cause.1=Se ha producido un error del servidor al procesar la solicitud +WSSERVLET30.diag.check.1=Se puede deber a varias causas. Compruebe si hay excepciones en el archivo log del servidor. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: Devoluci\u00F3n resuelta al recuperarse de una excepci\u00F3n anterior: {0} +WSSERVLET51.diag.cause.1=El procesamiento del servicio de la solicitud ha generado una excepci\u00F3n. Al intentar devolver un SOAPPFaultMessage, se ha generado de nuevo una devoluci\u00F3n +WSSERVLET51.diag.check.1=Compruebe en el archivo log server.xml la informaci\u00F3n de la excepci\u00F3n + +error.servlet.caughtThrowable=WSSERVLET49: Devoluci\u00F3n resuelta: {0} +WSSERVLET49.diag.cause.1=El procesamiento del servicio de la solicitud ha generado una excepci\u00F3n. Al intentar devolver un SOAPFaultMessage, se ha generado de nuevo una devoluci\u00F3n +WSSERVLET49.diag.check.1=Compruebe en el archivo log server.xml la informaci\u00F3n de la excepci\u00F3n + +error.servlet.caughtThrowableInInit=WSSERVLET50: Devoluci\u00F3n resuelta durante la inicializaci\u00F3n del servlet: {0} +WSSERVLET50.diag.cause.1=Puede que sun-jaxws.xml o web.xml en tiempo de ejecuci\u00F3n de WS sean incorrectos +WSSERVLET50.diag.check.1=Verifique que sun-jaxws.xml y web.xml son correctos en el archivo war del servicio +WSSERVLET50.diag.cause.2=Puede que los descriptores de despliegue del servidor de aplicaciones sean incorrectos +WSSERVLET50.diag.check.2=Verifique que los descriptores de despliegue del servidor de aplicaciones sean correctos en el archivo war del servicio +WSSERVLET50.diag.cause.3=Puede que haya algunos problemas de inicializaci\u00F3n del servidor de aplicaciones +WSSERVLET50.diag.check.3=Compruebe el archivo server.xml en el directorio del dominio para ver si hay fallos + +publisher.info.applyingTransformation=WSSERVLET31: Aplicando la transformaci\u00F3n con la direcci\u00F3n real: {0} +WSSERVLET31.diag.cause.1=Se est\u00E1 aplicando la transformaci\u00F3n +WSSERVLET31.diag.check.1=Funcionamiento normal + +publisher.info.generatingWSDL=WSSERVLET32: Generando WSDL para punto final: {0} +WSSERVLET32.diag.cause.1=Se est\u00E1 generando el WSDL +WSSERVLET32.diag.check.1=Funcionamiento normal. + +exception.cannotCreateTransformer=WSSERVLET33: no se puede crear el transformador +WSSERVLET33.diag.cause.1=Cuando se publica el WSDL de servicio, se aplica un parche a la ubicaci\u00F3n http con la ubicaci\u00F3n/punto final desplegados utilizando la transformaci\u00F3n XSLT. No se ha podido crear el transformador para realizar la transformaci\u00F3n. +WSSERVLET33.diag.check.1=Puede que se est\u00E9 utilizando un motor de transformaci\u00F3n que no es compatible. Aseg\u00FArese de que est\u00E1 utilizando el transformador y la versi\u00F3n correctos. +WSSERVLET33.diag.cause.2=Cuando se publica el WSDL de servicio, se aplica un parche a la ubicaci\u00F3n http con la ubicaci\u00F3n/punto final desplegados utilizando la transformaci\u00F3n XSLT. No se ha podido crear el transformador para realizar la transformaci\u00F3n. +WSSERVLET33.diag.check.2=Puede que haya un motor de transformaci\u00F3n que no est\u00E1 soportado o es incompatible. Compruebe el archivo server.xml para ver si hay excepciones. + + +exception.transformationFailed=WSSERVLET34: Fallo en la transformaci\u00F3n: {0} +WSSERVLET34.diag.cause.1=Ha fallado la aplicaci\u00F3n de parches de ubicaci\u00F3n en el WSDL al intentar realizar la transformaci\u00F3n. +WSSERVLET34.diag.check.1=Consulte el archivo log para obtener excepciones/errores m\u00E1s detallados. + +exception.templateCreationFailed=WSSERVLET35: fallo al crear un objeto de plantilla +WSSERVLET35.diag.cause.1=Se ha creado una plantilla de hoja de estilo XSLT para la aplicaci\u00F3n de parches de ubicaci\u00F3n del WSDL utilizando la transformaci\u00F3n. Fallo de creaci\u00F3n de la plantilla. +WSSERVLET35.diag.check.1=Se ha devuelto una excepci\u00F3n durante la creaci\u00F3n de la plantilla. Consulte la excepci\u00F3n y el rastreo de pila para obtener m\u00E1s detalles. + +servlet.html.method=WSSERVLET63: debe utilizar Post para este tipo de solicitud +WSSERVLET63.diag.cause.1=Las solicitudes de servicios web deben utilizar el m\u00E9todo HTTP POST: WSI BP 1.0 +WSSERVLET63.diag.check.1=Aseg\u00FArese de que el cliente HTTP est\u00E1 utilizando solicitudes POST, no GET + + +servlet.faultstring.invalidContentType=WSSERVLET64: tipo de contenido no v\u00E1lido; se necesita text/xml +WSSERVLET64.diag.cause.1=Las solicitudes de servicios web deben tener el tipo de contenido text/xml: WSI BP 1.0 +WSSERVLET64.diag.check.1=Aseg\u00FArese de que la solicitud del cliente est\u00E1 utilizando text/xml + +error.implementorFactory.newInstanceFailed=WSSERVLET43: fallo al instanciar el implantador del servicio para el puerto \\"{0}\\" +WSSERVLET43.diag.cause.1=Fallo en la instanciaci\u00F3n del servicio web. +WSSERVLET43.diag.check.1=Aseg\u00FArese de que el servicio web est\u00E1 disponible y es p\u00FAblico. Examine la excepci\u00F3n para obtener m\u00E1s detalles. + +error.implementorFactory.servantInitFailed=WSSERVLET44: fallo al inicializar el implantador del servicio para el puerto \"{0}\" +WSSERVLET44.diag.cause.1=El servicio web se ha instanciado, pero no se ha podido inicializar +WSSERVLET44.diag.check.1=Revise la excepci\u00F3n para obtener m\u00E1s detalles. Aseg\u00FArese de que todos los archivos de configuraci\u00F3n son correctos. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: cabecera no v\u00E1lida. Se necesita una acci\u00F3n de SOAP +WSSERVLET65.diag.cause.1=Se necesita una acci\u00F3n de SOAP +WSSERVLET65.diag.check.1=Agregue una acci\u00F3n de SOAP y el valor adecuado + +# {0} - URI +servlet.no.address.available=No hay disponible ninguna direcci\u00F3n para {0} + +servlet.html.title= Servicios Web +servlet.html.title2=

    Servicios web

    +servlet.html.noInfoAvailable=

    No hay disponible ninguna informaci\u00F3n de contexto JAX-WS.

    +servlet.html.columnHeader.portName=Punto Final +servlet.html.columnHeader.status=Estado +servlet.html.columnHeader.information=Informaci\u00F3n +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    Nombre de Servicio\\:{0}
    Nombre de Puerto\\:{1}
    +servlet.html.information.table=
    Direcci\u00F3n\\:{0}
    WSDL\\:{0}?wsdl
    Clase de Implantaci\u00F3n\\:{1}
    +servlet.html.notFound=

    404 no se ha encontrado: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: no se ha especificado ninguna configuraci\u00F3n +error.implementorFactory.noInputStream=WSSERVLET37: no se ha especificado ninguna configuraci\u00F3n +error.implementorRegistry.unknownName=WSSERVLET38: Nombre de puerto desconocido: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: no se puede leer la configuraci\u00F3n +error.implementorRegistry.classNotFound=WSSERVLET40: No se ha encontrado la clase: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: la informaci\u00F3n de configuraci\u00F3n est\u00E1 incompleta +error.implementorRegistry.duplicateName=WSSERVLET42: Nombre de puerto duplicado: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: No se ha encontrado el archivo: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: no se puede leer la configuraci\u00F3n +error.servlet.init.config.parameter.missing=WSSERVLET47: No se ha encontrado el par\u00E1metro de configuraci\u00F3n: \\"{0}\\" +error.servlet.init.config.fileNotFound=WSSERVLET48: no se ha encontrado el archivo de configuraci\u00F3n \"{0}\" +# + +error.servlet.noImplementorForPort=WSSERVLET52: No se ha registrado ning\u00FAn implantador para el puerto: {0} +error.servlet.noPortSpecified=WSSERVLET53: no se ha especificado ning\u00FAn puerto en la URL de la solicitud POST de HTTP +error.servlet.noResponseWasProduced=WSSERVLET54: no se ha producido ninguna respuesta (error interno) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: se ha obtenido un mensaje de solicitud vac\u00EDo +info.servlet.initializing=WSSERVLET56: Servlet JAX-WS: inicializar +info.servlet.destroying=WSSERVLET57: Servlet JAX-WS: destruir +# +trace.servlet.requestForPortNamed=WSSERVLET58: se ha obtenido una solicitud para el puerto {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: Entregando solicitud al implantador: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: Se ha obtenido respuesta del implantador: {0} +trace.servlet.writingFaultResponse=WSSERVLET61: escribiendo respuesta con fallos +trace.servlet.writingSuccessResponse=WSSERVLET62: escribiendo respuesta correcta +# +html.nonRootPage.title= Servicio Web +html.nonRootPage.body1=

    Hay instalado un servicio web en esta URL.

    +html.nonRootPage.body2=

    URI de solicitud no v\u00E1lido.

    Revise su informaci\u00F3n de despliegue.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Servicio Web +html.wsdlPage.noWsdl=

    No hay disponible ning\u00FAn documento WSDL para la publicaci\u00F3n.

    Revise la informaci\u00F3n de despliegue.

    +html.rootPage.title= Servicio Web +html.rootPage.body1=

    Hay instalado un servicio web en esta URL.

    +html.rootPage.body2a=

    Soporta los puertos siguientes: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    Este punto final est\u00E1 configurado de manera incorrecta. Compruebe la ubicaci\u00F3n y el contenido del archivo de configuraci\u00F3n.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties new file mode 100644 index 00000000000..8d6670ebe36 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_fr.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=Le descripteur d''ex\u00E9cution "{0}" est manquant + +listener.parsingFailed=WSSERVLET11 : \u00E9chec de l''analyse du descripteur d''ex\u00E9cution : {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser n'a pas pu analyser le descripteur d'ex\u00E9cution sun-jaxws.xml +WSSERVLET11.diag.check.1=V\u00E9rifiez le fichier sun-jaxws.xml pour vous assurer qu'il est correct +WSSERVLET11.diag.cause.2=Le descripteur de d\u00E9ploiement d'ex\u00E9cution sun-jaxws.xml est peut-\u00EAtre manquant +WSSERVLET11.diag.check.2=V\u00E9rifiez le fichier jaxrpc-ri.xml pour vous assurer qu'il figure dans le fichier WAR + + +listener.info.initialize=WSSERVLET12 : initialisation du processus d'\u00E9coute de contexte JAX-WS +WSSERVLET12.diag.cause.1=D\u00E9marrage du processus d'\u00E9coute de contexte +WSSERVLET12.diag.check.1=D\u00E9marrage de service Web normal + +listener.info.destroy=WSSERVLET13 : processus d'\u00E9coute de contexte JAX-WS d\u00E9truit +WSSERVLET13.diag.cause.1=Arr\u00EAt du processus d'\u00E9coute de contexte +WSSERVLET13.diag.check.1=Arr\u00EAt du service Web normal + +servlet.info.initialize=WSSERVLET14 : initialisation du servlet JAX-WS +WSSERVLET14.diag.cause.1=D\u00E9marrage du servlet des services Web. +WSSERVLET14.diag.check.1=D\u00E9ploiement du service Web normal. D\u00E9ploiement du service termin\u00E9. + +servlet.info.destroy=WSSERVLET15 : servlet AX-WS d\u00E9truit +WSSERVLET15.diag.cause.1=Arr\u00EAt du servlet des services Web. +WSSERVLET15.diag.check.1=Annulation du d\u00E9ploiement du service Web normal. Annulation du d\u00E9ploiement termin\u00E9e. + +servlet.warning.missingContextInformation=WSSERVLET16 : informations de contexte manquantes +WSSERVLET16.diag.cause.1=Le fichier jaxrpc-ri.xml est peut-\u00EAtre manquant dans le fichier WAR +WSSERVLET16.diag.check.1=D\u00E9compressez le fichier WAR de service ; v\u00E9rifiez que le fichier jaxrpc-ri-runtime.xml est pr\u00E9sent + + +servlet.warning.duplicateEndpointName=WSSERVLET17 : nom d'adresse en double +WSSERVLET17.diag.cause.1=Au moins deux adresses portant le m\u00EAme nom ont \u00E9t\u00E9 trouv\u00E9es dans le descripteur d'ex\u00E9cution jaxrpc-ri.xml +WSSERVLET17.diag.check.1=Cela peut entra\u00EEner des probl\u00E8mes avec le d\u00E9ploiement de service + + +servlet.info.emptyRequestMessage=WSSERVLET18 : message de demande vide obtenu +WSSERVLET18.diag.cause.1=Le message envoy\u00E9 par le client est vide +WSSERVLET18.diag.check.1=Cela peut \u00EAtre intentionnel ou non. Si cela ne l'est pas, recherchez les erreurs dans le programme client. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19 : demande pour l''adresse {0} obtenue +WSSERVLET19.diag.cause.1=La demande client pour cette adresse est arriv\u00E9e +WSSERVLET19.diag.check.1=Message d'information uniquement. Fonctionnement normal. + +servlet.error.noImplementorForEndpoint=WSSERVLET20 : aucun impl\u00E9mentateur pour l''adresse : {0} +WSSERVLET20.diag.cause.1=L'impl\u00E9mentation de ce service est introuvable +WSSERVLET20.diag.check.1=D\u00E9compressez le fichier WAR, les classes de liaison et de serializer ont-elles \u00E9t\u00E9 trouv\u00E9es ? + +servlet.trace.invokingImplementor=WSSERVLET21 : appel de l''impl\u00E9mentateur : {0} +WSSERVLET21.diag.cause.1=Le service Web est en cours d'appel +WSSERVLET21.diag.check.1=Appel de service Web normal. + +servlet.error.noEndpointSpecified=WSSERVLET22 : aucune adresse indiqu\u00E9e +WSSERVLET22.diag.cause.1=Une demande a \u00E9t\u00E9 appel\u00E9e sans adresse +WSSERVLET22.diag.check.1=D\u00E9finir l'adresse avec la propri\u00E9t\u00E9 stub.setTargetEndpoint + +servlet.error.noResponseMessage=WSSERVLET23 : aucun message de r\u00E9ponse +WSSERVLET23.diag.cause.1=La demande n'a g\u00E9n\u00E9r\u00E9 aucune r\u00E9ponse de la part du service +WSSERVLET23.diag.check.1=Si une r\u00E9ponse \u00E9tait attendue, v\u00E9rifiez qu'un message de demande a bien \u00E9t\u00E9 envoy\u00E9 +WSSERVLET23.diag.check.2=La demande peut \u00EAtre incorrecte et avoir \u00E9t\u00E9 accept\u00E9e par le service, mais elle n'a g\u00E9n\u00E9r\u00E9 aucune r\u00E9ponse + +servlet.trace.writingFaultResponse=WSSERVLET24 : \u00E9criture d'une r\u00E9ponse d'erreur +WSSERVLET24.diag.cause.1=Le message SOAPFault est en cours de renvoi au client. +WSSERVLET24.diag.check.1=Erreur de message de trace enregistr\u00E9e. + +servlet.trace.writingSuccessResponse=WSSERVLET25 : \u00E9criture d'une r\u00E9ponse de succ\u00E8s +WSSERVLET25.diag.cause.1=La r\u00E9ponse SOAPMessage est en cours de renvoi au client +WSSERVLET25.diag.check.1=Message de trace, r\u00E9ponse normale. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26 : mod\u00E8le d''URL en double dans l''adresse : {0} +WSSERVLET26.diag.cause.1=L'URL endpoint est en double +WSSERVLET26.diag.check.1=Cela peut poser probl\u00E8me, enlevez les adresses en double + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27 : mod\u00E8le d''URL implicite non pris en charge dans l''adresse : {0} +WSSERVLET27.diag.cause.1=Les URL implicites ne sont pas prises en charge dans cette version +WSSERVLET27.diag.check.1=Enlever l'URL implicite + +servlet.faultstring.missingPort=WSSERVLET28 : informations sur le port manquantes +WSSERVLET28.diag.cause.1=L'adresse cible est NULL +WSSERVLET28.diag.check.1=D\u00E9finissez l'adresse cible avec la propri\u00E9t\u00E9 stub.setTargetEndpoint(). + +servlet.faultstring.portNotFound=WSSERVLET29 : port introuvable ({0}) +WSSERVLET29.diag.cause.1=Un port est indiqu\u00E9, mais une impl\u00E9mentation de service correspondante est introuvable +WSSERVLET29.diag.check.1=Le port est-il valide ? D\u00E9compressez le fichier WAR et assurez-vous que la liaison et les serializers sont pr\u00E9sents + +servlet.faultstring.internalServerError=WSSERVLET30 : erreur de serveur interne ({0}) +WSSERVLET30.diag.cause.1=Une erreur de serveur s'est produite lors du traitement de la demande +WSSERVLET30.diag.check.1=Cela peut avoir plusieurs causes. Pour conna\u00EEtre les exceptions, consultez le fichier journal du serveur. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51 : objet Throwable d\u00E9tect\u00E9 lors de la r\u00E9cup\u00E9ration \u00E0 partir d''une exception pr\u00E9c\u00E9dente : {0} +WSSERVLET51.diag.cause.1=Le traitement de service de la demande a g\u00E9n\u00E9r\u00E9 une exception ; lors de la tentative de renvoi d'un message SOAPPFaultMessage, un objet Throwable a encore \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9 +WSSERVLET51.diag.check.1=Pour plus d'informations sur l'exception, consultez le fichier journal server.xml + +error.servlet.caughtThrowable=WSSERVLET49 : objet Throwable d\u00E9tect\u00E9 : {0} +WSSERVLET49.diag.cause.1=Le traitement de service de la demande a g\u00E9n\u00E9r\u00E9 une exception ; lors de la tentative de renvoi d'un message SOAPFaultMessage, un objet Throwable a encore \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9 +WSSERVLET49.diag.check.1=Pour plus d'informations sur l'exception, consultez le fichier journal server.xml + +error.servlet.caughtThrowableInInit=WSSERVLET50 : objet Throwable d\u00E9tect\u00E9 lors de l''initialisation du servlet : {0} +WSSERVLET50.diag.cause.1=Le fichier sun-jaxws.xml ou web.xml d'ex\u00E9cution WS est peut-\u00EAtre incorrect +WSSERVLET50.diag.check.1=V\u00E9rifiez que sun-jaxws.xml et web.xml sont corrects dans le fichier WAR de service +WSSERVLET50.diag.cause.2=Les descripteurs de d\u00E9ploiement du serveur d'applications sont peut-\u00EAtre incorrects +WSSERVLET50.diag.check.2=V\u00E9rifiez que les descripteurs de d\u00E9ploiement du serveur d'applications sont corrects dans le fichier WAR du service +WSSERVLET50.diag.cause.3=Des probl\u00E8mes d'initialisation du serveur d'applications peuvent se produire +WSSERVLET50.diag.check.3=Pour conna\u00EEtre les \u00E9checs, consultez le fichier server.xml dans le r\u00E9pertoire de domaines + +publisher.info.applyingTransformation=WSSERVLET31 : application de la transformation avec l''adresse r\u00E9elle : {0} +WSSERVLET31.diag.cause.1=Transformation en cours d'application +WSSERVLET31.diag.check.1=Fonctionnement normal + +publisher.info.generatingWSDL=WSSERVLET32 : g\u00E9n\u00E9ration du WSDL pour l''adresse : {0} +WSSERVLET32.diag.cause.1=WSDL en cours de g\u00E9n\u00E9ration +WSSERVLET32.diag.check.1=Fonctionnement normal. + +exception.cannotCreateTransformer=WSSERVLET33 : impossible de cr\u00E9er le transformateur +WSSERVLET33.diag.cause.1=Lors de la publication du WSDL de service, des patches sont appliqu\u00E9s \u00E0 l'emplacement http avec l'emplacement/adresse d\u00E9ploy\u00E9 \u00E0 l'aide de la transformation XSLT. Le transformateur n'a pas pu \u00EAtre cr\u00E9\u00E9 pour effectuer la transformation. +WSSERVLET33.diag.check.1=Un moteur de transformation non compatible est peut-\u00EAtre en cours d'utilisation. Assurez-vous que vous utilisez le transformateur et la version corrects. +WSSERVLET33.diag.cause.2=Lors de la publication du WSDL de service, des patches sont appliqu\u00E9s \u00E0 l'emplacement http avec l'emplacement/adresse d\u00E9ploy\u00E9 \u00E0 l'aide de la transformation XSLT. Le transformateur n'a pas pu \u00EAtre cr\u00E9\u00E9 pour effectuer la transformation. +WSSERVLET33.diag.check.2=Un moteur de transformation non pris en charge ou non compatible est peut-\u00EAtre utilis\u00E9. Pour conna\u00EEtre les exceptions, consultez le fichier server.xml. + + +exception.transformationFailed=WSSERVLET34 : \u00E9chec de la transformation : {0} +WSSERVLET34.diag.cause.1=L'application de patches \u00E0 l'emplacement sur le WSDL a \u00E9chou\u00E9 lors de la tentative de transformation. +WSSERVLET34.diag.check.1=Pour plus de d\u00E9tails sur les erreurs/exceptions, consultez les fichiers journaux. + +exception.templateCreationFailed=WSSERVLET35 : \u00E9chec de la cr\u00E9ation d'un objet de mod\u00E8le +WSSERVLET35.diag.cause.1=Un mod\u00E8le de feuille de style XSLT est cr\u00E9\u00E9 pour l'application de patches \u00E0 l'emplacement WSDL \u00E0 l'aide de la transformation. Echec de la cr\u00E9ation du mod\u00E8le. +WSSERVLET35.diag.check.1=Une exception a \u00E9t\u00E9 g\u00E9n\u00E9r\u00E9e lors de la cr\u00E9ation du mod\u00E8le. Pour plus de d\u00E9tails, consultez l'exception et la trace de pile. + +servlet.html.method=WSSERVLET63 : vous devez utiliser POST pour ce type de demande +WSSERVLET63.diag.cause.1=Les demandes de service Web doivent utiliser la m\u00E9thode HTTP POST : WSI BP 1.0 +WSSERVLET63.diag.check.1=Assurez-vous que le client HTTP utilise les demandes POST, et non les demandes GET + + +servlet.faultstring.invalidContentType=WSSERVLET64 : Content-Type non valide, text/xml requis +WSSERVLET64.diag.cause.1=Le type de contenu des demandes de service Web doit \u00EAtre text/xml : WSI BP 1.0 +WSSERVLET64.diag.check.1=Assurez-vous que la demande client utilise text/xml + +error.implementorFactory.newInstanceFailed=WSSERVLET43 : \u00E9chec de l''instanciation d''un impl\u00E9mentateur de service pour le port \"{0}\" +WSSERVLET43.diag.cause.1=Echec de l'instanciation du service Web. +WSSERVLET43.diag.check.1=Assurez-vous que le service Web est disponible et public. Pour plus de d\u00E9tails, examinez l'exception + +error.implementorFactory.servantInitFailed=WSSERVLET44 : \u00E9chec de l''initialisation de l''impl\u00E9mentateur de service pour le port \"{0}\" +WSSERVLET44.diag.cause.1=Le service Web a \u00E9t\u00E9 instanci\u00E9 ; cependant, il n'a pas pu \u00EAtre initialis\u00E9 +WSSERVLET44.diag.check.1=Pour plus de d\u00E9tails, v\u00E9rifiez l'exception. Assurez-vous que tous les fichiers de configuration sont corrects. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65 : en-t\u00EAte SOAPAction non valide requis +WSSERVLET65.diag.cause.1=L'action SOAP est obligatoire +WSSERVLET65.diag.check.1=Ajouter SOAPAction et la valeur appropri\u00E9e + +# {0} - URI +servlet.no.address.available=Aucune adresse n''est disponible pour {0} + +servlet.html.title= Services Web +servlet.html.title2=

    Services Web

    +servlet.html.noInfoAvailable=

    Aucune information de contexte JAX-WS disponible.

    +servlet.html.columnHeader.portName=Adresse +servlet.html.columnHeader.status=Statut +servlet.html.columnHeader.information=Informations +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    Nom de service \:{0}
    Nom de port \:{1}
    +servlet.html.information.table=
    Adresse \:{0}
    WSDL\:{0}?wsdl
    Classe d''impl\u00E9mentation \:{1}
    +servlet.html.notFound=

    404 Introuvable : {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36 : aucune configuration sp\u00E9cifi\u00E9e +error.implementorFactory.noInputStream=WSSERVLET37 : aucune configuration sp\u00E9cifi\u00E9e +error.implementorRegistry.unknownName=WSSERVLET38 : nom de port {0} inconnu +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39 : impossible de lire la configuration +error.implementorRegistry.classNotFound=WSSERVLET40 : classe introuvable : {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41 : les informations de configuration sont incompl\u00E8tes +error.implementorRegistry.duplicateName=WSSERVLET42 : nom de port en double : {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45 : fichier introuvable : {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46 : impossible de lire la configuration +error.servlet.init.config.parameter.missing=WSSERVLET47 : param\u00E8tre de configuration \"{0}\" introuvable +error.servlet.init.config.fileNotFound=WSSERVLET48 : fichier de configuration \"{0}\" introuvable +# + +error.servlet.noImplementorForPort=WSSERVLET52 : aucun impl\u00E9mentateur inscrit pour le port : {0} +error.servlet.noPortSpecified=WSSERVLET53 : aucun port indiqu\u00E9 dans l'URL de demande HTTP POST +error.servlet.noResponseWasProduced=WSSERVLET54 : aucune r\u00E9ponse n'a \u00E9t\u00E9 produite (erreur interne) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55 : message de demande vide obtenu +info.servlet.initializing=WSSERVLET56 : servlet JAX-WS : initialisation +info.servlet.destroying=WSSERVLET57 : servlet JAX-WS : destruction +# +trace.servlet.requestForPortNamed=WSSERVLET58 : demande obtenue pour le port : {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59 : gestion de la demande sur l''impl\u00E9mentateur : {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60 : r\u00E9ponse de l''impl\u00E9mentateur obtenue : {0} +trace.servlet.writingFaultResponse=WSSERVLET61 : \u00E9criture de la r\u00E9ponse d'erreur +trace.servlet.writingSuccessResponse=WSSERVLET62 : \u00E9criture de la r\u00E9ponse de succ\u00E8s +# +html.nonRootPage.title= Service Web +html.nonRootPage.body1=

    Un service Web est install\u00E9 \u00E0 cette URL.

    +html.nonRootPage.body2=

    URI de demande non valide.

    V\u00E9rifiez les informations de d\u00E9ploiement.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Service Web +html.wsdlPage.noWsdl=

    Aucun document WSDL disponible pour publication.

    V\u00E9rifiez les informations de d\u00E9ploiement.

    +html.rootPage.title= Service Web +html.rootPage.body1=

    Un service Web est install\u00E9 \u00E0 cette URL.

    +html.rootPage.body2a=

    Il prend en charge les ports suivants : +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    Cette adresse n'est pas configur\u00E9e correctement. V\u00E9rifiez l'emplacement et le contenu du fichier de configuration.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties new file mode 100644 index 00000000000..9f834d0aafb --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_it.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=Descrittore di runtime "{0}" mancante + +listener.parsingFailed=WSSERVLET11: analisi del descrittore di runtime non riuscita: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser non \u00E8 riuscito ad analizzare il descrittore di runtime sun-jaxws.xml runtime +WSSERVLET11.diag.check.1=Controllare il file sun-jaxws.xml per assicurarsi che sia corretto +WSSERVLET11.diag.cause.2=\u00C8 possibile che manchi il descrittore di distribuzione di runtime sun-jaxws.xml +WSSERVLET11.diag.check.2=Controllare il file jaxrpc-ri.xml per assicurarsi che sia presente nel file war + + +listener.info.initialize=WSSERVLET12: inizializzazione del listener del contesto JAX-WS +WSSERVLET12.diag.cause.1=Avvio del listener del contesto +WSSERVLET12.diag.check.1=Normale avvio del servizio Web + +listener.info.destroy=WSSERVLET13: listener del contesto JAX-WS eliminato +WSSERVLET13.diag.cause.1=Chiusura del listener del contesto +WSSERVLET13.diag.check.1=Normale chiusura del servizio Web + +servlet.info.initialize=WSSERVLET14: inizializzazione del servlet JAX-WS +WSSERVLET14.diag.cause.1=Avvio del servlet dei servizi Web. +WSSERVLET14.diag.check.1=Normale distribuzione del servizio Web. Distribuzione del servizio completata. + +servlet.info.destroy=WSSERVLET15: servlet JAX-WS eliminato +WSSERVLET15.diag.cause.1=Chiusura del servlet dei servizi Web. +WSSERVLET15.diag.check.1=Normale annullamento della distribuzione del servizio Web. Annullamento della distribuzione completata. + +servlet.warning.missingContextInformation=WSSERVLET16: informazioni mancanti sul contesto +WSSERVLET16.diag.cause.1=\u00C8 possibile che nel file war manchi il file jaxrpc-ri.xml +WSSERVLET16.diag.check.1=Estrarre il file war di servizio. Controllare che sia presente il file jaxrpc-ri-runtime.xml + + +servlet.warning.duplicateEndpointName=WSSERVLET17: nome endpoint duplicato +WSSERVLET17.diag.cause.1=Nel descrittore di runtime jaxrpc-ri.xml sono stati trovati due o pi\u00F9 endpoint con lo stesso nome +WSSERVLET17.diag.check.1=Tenere presente che questo potrebbe causare problemi con la distribuzione del servizio + + +servlet.info.emptyRequestMessage=WSSERVLET18: ricevuto messaggio di richiesta vuoto +WSSERVLET18.diag.cause.1=Il messaggio inviato dal client \u00E8 vuoto +WSSERVLET18.diag.check.1=Potrebbe essere intenzionale o meno. In quest'ultimo caso, esaminare il programma client per gli errori. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: ricevuta richiesta per l''endpoint: {0} +WSSERVLET19.diag.cause.1=\u00C8 arrivata la richiesta del client per questo endpoint +WSSERVLET19.diag.check.1=Messaggio solo informativo. Funzionamento normale. + +servlet.error.noImplementorForEndpoint=WSSERVLET20: nessun implementatore per l''endpoint: {0} +WSSERVLET20.diag.cause.1=Impossibile trovare l'implementazione per questo servizio +WSSERVLET20.diag.check.1=Estrarre il file war e controllare se sono presenti le classi di collegamento e del serializzatore. + +servlet.trace.invokingImplementor=WSSERVLET21: richiamo dell''implementatore: {0} +WSSERVLET21.diag.cause.1=\u00C8 in corso il richiamo del servizio Web +WSSERVLET21.diag.check.1=Normale richiamo del servizio Web. + +servlet.error.noEndpointSpecified=WSSERVLET22: nessun endpoint specificato +WSSERVLET22.diag.cause.1=\u00C8 stata richiamata una richiesta senza endpoint +WSSERVLET22.diag.check.1=Impostare l'endpoint con la propriet\u00E0 stub.setTargetEndpoint + +servlet.error.noResponseMessage=WSSERVLET23: nessun messaggio di risposta +WSSERVLET23.diag.cause.1=La richiesta non ha generato alcuna risposta dal servizio +WSSERVLET23.diag.check.1=Se era prevista una risposta, controllare che sia stato effettivamente inviato un messaggio di richiesta +WSSERVLET23.diag.check.2=\u00C8 possibile che la richiesta abbia un formato non valido e che sia stata accettata dal servizio e che perci\u00F2 non sia stata generata una risposta + +servlet.trace.writingFaultResponse=WSSERVLET24: scrittura della risposta di errore +WSSERVLET24.diag.cause.1=\u00C8 in corso la restituzione del messaggio SOAPFault al client. +WSSERVLET24.diag.check.1=Trace dell'errore del messaggio registrato. + +servlet.trace.writingSuccessResponse=WSSERVLET24: scrittura della risposta di operazione riuscita +WSSERVLET25.diag.cause.1=\u00C8 in corso la restituzione della risposta SOAPMessage al client +WSSERVLET25.diag.check.1=Trace del messaggio, risposta normale. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: pattern dell''URL duplicato nell''endpoint: {0} +WSSERVLET26.diag.cause.1=L'URL dell'endpoint \u00E8 un duplicato +WSSERVLET26.diag.check.1=Questo potrebbe causare problemi. Rimuovere gli endpoint duplicati. + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: pattern dell''URL implicito non supportato nell''endpoint: {0} +WSSERVLET27.diag.cause.1=Gli URL impliciti non sono supportati in questa release +WSSERVLET27.diag.check.1=Rimuovere l'URL implicito + +servlet.faultstring.missingPort=WSSERVLET28: Informazioni mancanti sulla porta +WSSERVLET28.diag.cause.1=L'endpoint di destinazione \u00E8 nullo +WSSERVLET28.diag.check.1=Impostare l'endpoint di destinazione con la propriet\u00E0 stub.setTargetEndpoint(). + +servlet.faultstring.portNotFound=WSSERVLET29: Porta non trovata ({0}) +WSSERVLET29.diag.cause.1=\u00C8 specificata una porta ma non \u00E8 stata trovata un'implementazione del servizio corrispondente +WSSERVLET29.diag.check.1=Verificare che la porta sia valida. Estrarre il file war e assicurarsi che siano presenti il collegamento e i serializzatori + +servlet.faultstring.internalServerError=WSSERVLET30: Errore interno del server ({0}) +WSSERVLET30.diag.cause.1=Si \u00E8 verificato un errore del server durante l'elaborazione della richiesta +WSSERVLET30.diag.check.1=Ci\u00F2 potrebbe essere dovuto a numerosi motivi. Controllare il file di log del server per le eccezioni. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: rilevato Throwable durante il recupero da un''eccezione precedente: {0} +WSSERVLET51.diag.cause.1=L'elaborazione del servizio della richiesta ha generato un'eccezione. Durante il tentativo di restituzione di un SOAPPFaultMessage \u00E8 stato generato un nuovo Throwable. +WSSERVLET51.diag.check.1=Controllare il file di log server.xml per informazioni sull'eccezione + +error.servlet.caughtThrowable=WSSERVLET49: rilevato Throwable: {0} +WSSERVLET49.diag.cause.1=L'elaborazione del servizio della richiesta ha generato un'eccezione. Durante il tentativo di restituzione di un SOAPFaultMessage \u00E8 stato generato un nuovo Throwable. +WSSERVLET49.diag.check.1=Controllare il file di log server.xml per informazioni sull'eccezione + +error.servlet.caughtThrowableInInit=WSSERVLET51: rilevato Throwable durante l''inizializzazione del servlet: {0} +WSSERVLET50.diag.cause.1=\u00C8 possibile che sun-jaxws.xml o web.xml del runtime WS siano errati +WSSERVLET50.diag.check.1=Verificare che sun-jaxws.xml e web.xml siano corretti nel file war del servizio +WSSERVLET50.diag.cause.2=\u00C8 possibile che i descrittori di distribuzione dell'Application Server siano errati +WSSERVLET50.diag.check.2=Verificare che i descrittori di distribuzione dell'Application Server siano corretti nel file war del servizio +WSSERVLET50.diag.cause.3=Potrebbero esserci dei problemi di inizializzazione dell'Application Server +WSSERVLET50.diag.check.3=Controllare il file server.xml nella directory del dominio per gli errori + +publisher.info.applyingTransformation=WSSERVLET31: la trasformazione viene applicata con l''indirizzo effettivo: {0} +WSSERVLET31.diag.cause.1=\u00C8 in corso l'applicazione della trasformazione +WSSERVLET31.diag.check.1=Funzionamento normale + +publisher.info.generatingWSDL=WSSERVLET32: generazione di WSDL per l''endpoint: {0} +WSSERVLET32.diag.cause.1=\u00C8 in corso la generazione di WSDL +WSSERVLET32.diag.check.1=Funzionamento normale. + +exception.cannotCreateTransformer=WSSERVLET33: impossibile creare il trasformatore +WSSERVLET33.diag.cause.1=Durante la pubblicazione del WSDL del servizio, alla posizione http vengono applicate patch con la posizione/endpoint distribuiti usando la trasformazione XSLT. Impossibile creare il trasformatore per eseguire la trasformazione. +WSSERVLET33.diag.check.1=\u00C8 possibile che sia in uso un motore di trasformazione non compatibile. Assicurarsi che vengano usati il trasformatore e la versione corretti. +WSSERVLET33.diag.cause.2=Durante la pubblicazione del WSDL del servizio, alla posizione http vengono applicate patch con la posizione/endpoint distribuiti usando la trasformazione XSLT. Impossibile creare il trasformatore per eseguire la trasformazione. +WSSERVLET33.diag.check.2=\u00C8 possibile che sia presente un motore di trasformazione non supportato o compatibile. Controllare il file server.xml per le eccezioni. + + +exception.transformationFailed=WSSERVLET34: trasformazione non riuscita: {0} +WSSERVLET34.diag.cause.1=L'applicazione di patch alla posizione sul WSDL non \u00E8 riuscita durante il tentativo di trasformazione. +WSSERVLET34.diag.check.1=Per ulteriori dettagli sugli errori/eccezioni, consultare i file di log. + +exception.templateCreationFailed=WSSERVLET35: creazione di un oggetto modello non riuscita +WSSERVLET35.diag.cause.1=Viene creato un modello di foglio di stile XSLT per l'applicazione di patch alla posizione WSDL usando la trasformazione. Creazione del modello non riuscita. +WSSERVLET35.diag.check.1=\u00C8 stata restituita un'eccezione durante la creazione del modello. Visualizzare l'eccezione e lo stack trace per ulteriori dettagli. + +servlet.html.method=WSSERVLET63: per questo tipo di richiesta \u00E8 necessario usare POST +WSSERVLET63.diag.cause.1=Le richieste del servizio Web devono usare il metodo HTTP POST: WSI BP 1.0 +WSSERVLET63.diag.check.1=Assicurarsi che il client HTTP stia usando le richieste POST e non le richieste GET + + +servlet.faultstring.invalidContentType=WSSERVLET64: Content-Type non valido. \u00C8 richiesto text/xml +WSSERVLET64.diag.cause.1=Le richieste del servizio Web devono essere un tipo di contenuto text/xml: WSI BP 1.0 +WSSERVLET64.diag.check.1=Accertarsi che la richiesta del client usi text/xml + +error.implementorFactory.newInstanceFailed=WSSERVLET43: creazione dell''istanza dell''implementatore del servizio per la porta \"{0}\" non riuscita +WSSERVLET43.diag.cause.1=Creazione dell'istanza del servizio Web non riuscita. +WSSERVLET43.diag.check.1=Assicurarsi che il servizio Web sia disponibile e pubblico. Esaminare l'eccezione per ulteriori dettagli. + +error.implementorFactory.servantInitFailed=WSSERVLET44: inizializzazione dell''implementatore del servizio per la porta \"{0}\" non riuscita +WSSERVLET44.diag.cause.1=\u00C8 stata creata un'istanza del servizio ma non \u00E8 stato possibile inizializzarlo. +WSSERVLET44.diag.check.1=Controllare l'eccezione per ulteriori dettagli. Assicurarsi che tutti i file di configurazione siano corretti. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: SOAPAction dell'intestazione non valida richiesta +WSSERVLET65.diag.cause.1=SOAPAction richiesta +WSSERVLET65.diag.check.1=Aggiungere SOAPAction e il valore appropriato + +# {0} - URI +servlet.no.address.available=Nessun indirizzo disponibile per {0} + +servlet.html.title= Servizi Web +servlet.html.title2=

    Servizi Web

    +servlet.html.noInfoAvailable=

    Non sono disponibili informazioni sul contesto JAX-WS.

    +servlet.html.columnHeader.portName=Endpoint +servlet.html.columnHeader.status=Stato +servlet.html.columnHeader.information=Informazioni +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    Nome servizio\:{0}
    Nome porta\:{1}
    +servlet.html.information.table=
    Indirizzo\:{0}
    WSDL\:{0}?wsdl
    Classe di implementazione\:{1}
    +servlet.html.notFound=

    404 Non trovato: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: nessuna configurazione specificata +error.implementorFactory.noInputStream=WSSERVLET37: nessuna configurazione specificata +error.implementorRegistry.unknownName=WSSERVLET38: nome porta sconosciuto: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: impossibile leggere la configurazione +error.implementorRegistry.classNotFound=WSSERVLET40: classe non trovata: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: le informazioni di configurazione sono incomplete +error.implementorRegistry.duplicateName=WSSERVLET42: nome porta duplicato: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: file non trovato: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: impossibile leggere la configurazione +error.servlet.init.config.parameter.missing=WSSERVLET47: impossibile trovare il parametro di configurazione: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: file di configurazione: \"{0}\" non trovato +# + +error.servlet.noImplementorForPort=WSSERVLET52: nessun implementatore registrato per la porta: {0} +error.servlet.noPortSpecified=WSSERVLET53: nessuna porta specificata nell'URL della richiesta POST HTTP +error.servlet.noResponseWasProduced=WSSERVLET54: nessuna risposta prodotta (errore interno) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: ricevuto messaggio di richiesta vuoto +info.servlet.initializing=WSSERVLET56: servlet JAX-WS: inizializzazione +info.servlet.destroying=WSSERVLET57: servlet JAX-WS: eliminazione +# +trace.servlet.requestForPortNamed=WSSERVLET58: ricevuta richiesta per la porta: {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: passaggio della richiesta all''implementatore: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: ricevuta risposta dall''implementatore: {0} +trace.servlet.writingFaultResponse=WSSERVLET61: scrittura della risposta di errore +trace.servlet.writingSuccessResponse=WSSERVLET62: scrittura della risposta di operazione riuscita +# +html.nonRootPage.title= Servizio Web +html.nonRootPage.body1=

    In questo URL \u00E8 installato un servizio Web.

    +html.nonRootPage.body2=

    URI richiesta non valido.

    Controllare le informazioni sulla distribuzione.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Servizio Web +html.wsdlPage.noWsdl=

    Nessun documento WSDL disponibile per la pubblicazione.

    Controllare le informazioni sulla distribuzione.

    +html.rootPage.title= Servizio Web +html.rootPage.body1=

    In questo URL \u00E8 installato un servizio Web.

    +html.rootPage.body2a=

    Supporta le seguenti porte: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    Questo endpoint \u00E8 configurato in modo errato. Controllare la posizione e il contenuto del file di configurazione.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties new file mode 100644 index 00000000000..e3ee6577db7 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ja.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF"{0}"\u304C\u3042\u308A\u307E\u305B\u3093 + +listener.parsingFailed=WSSERVLET11: \u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF: {0}\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser\u306Fsun-jaxws.xml\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +WSSERVLET11.diag.check.1=sun-jaxws.xml\u30D5\u30A1\u30A4\u30EB\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u3001\u30D5\u30A1\u30A4\u30EB\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 +WSSERVLET11.diag.cause.2=sun-jaxws.xml\u5B9F\u884C\u6642\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +WSSERVLET11.diag.check.2=jaxrpc-ri.xml\u30D5\u30A1\u30A4\u30EB\u3092\u30C1\u30A7\u30C3\u30AF\u3057\u3001\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u304CWAR\u30D5\u30A1\u30A4\u30EB\u306B\u5B58\u5728\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + + +listener.info.initialize=WSSERVLET12: JAX-WS\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u521D\u671F\u5316\u3057\u3066\u3044\u307E\u3059 +WSSERVLET12.diag.cause.1=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u8D77\u52D5\u3057\u3066\u3044\u307E\u3059 +WSSERVLET12.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u3092\u8D77\u52D5\u3057\u3066\u3044\u307E\u3059 + +listener.info.destroy=WSSERVLET13: JAX-WS\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u7834\u68C4\u3057\u307E\u3057\u305F +WSSERVLET13.diag.cause.1=\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u30FB\u30EA\u30B9\u30CA\u30FC\u3092\u505C\u6B62\u3057\u307E\u3057\u305F +WSSERVLET13.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u3092\u505C\u6B62\u3057\u307E\u3057\u305F + +servlet.info.initialize=WSSERVLET14: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u521D\u671F\u5316\u3057\u3066\u3044\u307E\u3059 +WSSERVLET14.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u8D77\u52D5\u3057\u3066\u3044\u307E\u3059\u3002 +WSSERVLET14.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002 + +servlet.info.destroy=WSSERVLET15: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u7834\u68C4\u3057\u307E\u3057\u305F +WSSERVLET15.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u3092\u505C\u6B62\u3057\u307E\u3057\u305F\u3002 +WSSERVLET15.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u306E\u30A2\u30F3\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u3059\u3002\u30A2\u30F3\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002 + +servlet.warning.missingContextInformation=WSSERVLET16: \u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u60C5\u5831\u304C\u3042\u308A\u307E\u305B\u3093 +WSSERVLET16.diag.cause.1=WAR\u30D5\u30A1\u30A4\u30EB\u306Bjaxrpc-ri.xml\u30D5\u30A1\u30A4\u30EB\u304C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +WSSERVLET16.diag.check.1=\u30B5\u30FC\u30D3\u30B9WAR\u30D5\u30A1\u30A4\u30EB\u3092\u89E3\u51CD\u3057\u3001jaxrpc-ri-runtime.xml\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + + +servlet.warning.duplicateEndpointName=WSSERVLET17: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u540D\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 +WSSERVLET17.diag.cause.1=\u540C\u3058\u540D\u524D\u306E2\u3064\u4EE5\u4E0A\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304Cjaxrpc-ri.xml\u5B9F\u884C\u6642\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F +WSSERVLET17.diag.check.1=\u3053\u308C\u306B\u3088\u308A\u30B5\u30FC\u30D3\u30B9\u30FB\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u554F\u984C\u304C\u767A\u751F\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 + + +servlet.info.emptyRequestMessage=WSSERVLET18: \u7A7A\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F +WSSERVLET18.diag.cause.1=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u3088\u308A\u9001\u4FE1\u3055\u308C\u305F\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u7A7A\u3067\u3059 +WSSERVLET18.diag.check.1=\u3053\u308C\u306F\u610F\u56F3\u7684\u306A\u5834\u5408\u3082\u3042\u308A\u307E\u3059\u3002\u610F\u56F3\u7684\u3067\u306A\u3044\u5834\u5408\u3001\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30FB\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u30A8\u30E9\u30FC\u304C\u306A\u3044\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u306B\u5BFE\u3059\u308B\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F +WSSERVLET19.diag.cause.1=\u3053\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306B\u5BFE\u3059\u308B\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u5230\u7740\u3057\u307E\u3057\u305F +WSSERVLET19.diag.check.1=\u5358\u306A\u308B\u60C5\u5831\u30E1\u30C3\u30BB\u30FC\u30B8\u3067\u3059\u3002\u901A\u5E38\u306E\u64CD\u4F5C\u3067\u3059\u3002 + +servlet.error.noImplementorForEndpoint=WSSERVLET20: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u306E\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u304C\u5B58\u5728\u3057\u307E\u305B\u3093 +WSSERVLET20.diag.cause.1=\u3053\u306E\u30B5\u30FC\u30D3\u30B9\u306E\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +WSSERVLET20.diag.check.1=WAR\u3092\u89E3\u51CD\u3057\u307E\u3059\u3002tie\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30B7\u30EA\u30A2\u30E9\u30A4\u30B6\u30FB\u30AF\u30E9\u30B9\u306F\u898B\u3064\u304B\u308A\u307E\u3059\u304B\u3002 + +servlet.trace.invokingImplementor=WSSERVLET21: \u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059: {0} +WSSERVLET21.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u3092\u547C\u3073\u51FA\u3057\u3066\u3044\u307E\u3059 +WSSERVLET21.diag.check.1=\u901A\u5E38\u306EWeb\u30B5\u30FC\u30D3\u30B9\u306E\u547C\u51FA\u3057\u3067\u3059\u3002 + +servlet.error.noEndpointSpecified=WSSERVLET22: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +WSSERVLET22.diag.cause.1=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306A\u3057\u3067\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u547C\u3073\u51FA\u3055\u308C\u307E\u3057\u305F +WSSERVLET22.diag.check.1=stub.setTargetEndpoint\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u3088\u308A\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044 + +servlet.error.noResponseMessage=WSSERVLET23: \u30EC\u30B9\u30DD\u30F3\u30B9\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u3042\u308A\u307E\u305B\u3093 +WSSERVLET23.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u3088\u308A\u30B5\u30FC\u30D3\u30B9\u304B\u3089\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F +WSSERVLET23.diag.check.1=\u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u4E88\u671F\u3055\u308C\u305F\u5834\u5408\u3001\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u5B9F\u969B\u306B\u9001\u4FE1\u3055\u308C\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 +WSSERVLET23.diag.check.2=\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u6B63\u3057\u304F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30B5\u30FC\u30D3\u30B9\u306B\u3088\u308A\u53D7\u5165\u308C\u53EF\u80FD\u3067\u3059\u304C\u3001\u30EC\u30B9\u30DD\u30F3\u30B9\u306F\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F + +servlet.trace.writingFaultResponse=WSSERVLET24: \u30D5\u30A9\u30EB\u30C8\u30FB\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059 +WSSERVLET24.diag.cause.1=SOAPFault\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u8FD4\u3057\u3066\u3044\u307E\u3059\u3002 +WSSERVLET24.diag.check.1=\u30C8\u30EC\u30FC\u30B9\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u30FB\u30D5\u30A9\u30EB\u30C8\u304C\u8A18\u9332\u3055\u308C\u307E\u3057\u305F\u3002 + +servlet.trace.writingSuccessResponse=WSSERVLET25: \u6B63\u5E38\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059 +WSSERVLET25.diag.cause.1=SOAPMessage\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306B\u8FD4\u3057\u3066\u3044\u307E\u3059 +WSSERVLET25.diag.check.1=\u30C8\u30EC\u30FC\u30B9\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3001\u901A\u5E38\u306E\u30EC\u30B9\u30DD\u30F3\u30B9\u3002 + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306B\u91CD\u8907\u3057\u305FURL\u30D1\u30BF\u30FC\u30F3\u304C\u3042\u308A\u307E\u3059: {0} +WSSERVLET26.diag.cause.1=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8URL\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059 +WSSERVLET26.diag.check.1=\u3053\u308C\u306B\u3088\u308A\u554F\u984C\u304C\u767A\u751F\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u91CD\u8907\u3057\u305F\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044 + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u3067\u306F\u6697\u9ED9\u7684\u306AURL\u30D1\u30BF\u30FC\u30F3\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +WSSERVLET27.diag.cause.1=\u3053\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u6697\u9ED9\u7684\u306AURL\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +WSSERVLET27.diag.check.1=\u6697\u9ED9\u7684\u306AURL\u3092\u524A\u9664\u3057\u307E\u3059 + +servlet.faultstring.missingPort=WSSERVLET28: \u30DD\u30FC\u30C8\u60C5\u5831\u304C\u3042\u308A\u307E\u305B\u3093 +WSSERVLET28.diag.cause.1=\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304Cnull\u3067\u3059 +WSSERVLET28.diag.check.1=stub.setTargetEndpoint()\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u3088\u308A\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +servlet.faultstring.portNotFound=WSSERVLET29: \u30DD\u30FC\u30C8\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093({0}) +WSSERVLET29.diag.cause.1=\u30DD\u30FC\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u30B5\u30FC\u30D3\u30B9\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +WSSERVLET29.diag.check.1=\u30DD\u30FC\u30C8\u306F\u6709\u52B9\u3067\u3059\u304B\u3002WAR\u30D5\u30A1\u30A4\u30EB\u3092\u89E3\u51CD\u3057\u3001tie\u304A\u3088\u3073\u30B7\u30EA\u30A2\u30E9\u30A4\u30B6\u304C\u5B58\u5728\u3059\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + +servlet.faultstring.internalServerError=WSSERVLET30: \u5185\u90E8\u30B5\u30FC\u30D0\u30FC\u30FB\u30A8\u30E9\u30FC({0}) +WSSERVLET30.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u51E6\u7406\u4E2D\u306B\u30B5\u30FC\u30D0\u30FC\u30FB\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F +WSSERVLET30.diag.check.1=\u3053\u308C\u306B\u306F\u591A\u304F\u306E\u539F\u56E0\u304C\u8003\u3048\u3089\u308C\u307E\u3059\u3002\u30B5\u30FC\u30D0\u30FC\u30FB\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u306E\u6709\u7121\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \u524D\u306E\u4F8B\u5916\u304B\u3089\u306E\u56DE\u5FA9\u4E2D\u306Bthrowable\u3092\u6355\u6349\u3057\u307E\u3057\u305F: {0} +WSSERVLET51.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30B5\u30FC\u30D3\u30B9\u51E6\u7406\u3067\u4F8B\u5916\u304C\u751F\u6210\u3055\u308C\u307E\u3057\u305F\u3002SOAPPFaultMessage\u3092\u8FD4\u3059\u51E6\u7406\u306E\u8A66\u884C\u4E2D\u306Bthrowable\u304C\u518D\u5EA6\u751F\u6210\u3055\u308C\u307E\u3057\u305F +WSSERVLET51.diag.check.1=server.xml\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + +error.servlet.caughtThrowable=WSSERVLET49: throwable\u3092\u6355\u6349\u3057\u307E\u3057\u305F: {0} +WSSERVLET49.diag.cause.1=\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30B5\u30FC\u30D3\u30B9\u51E6\u7406\u3067\u4F8B\u5916\u304C\u751F\u6210\u3055\u308C\u307E\u3057\u305F\u3002SOAPFaultMessage\u3092\u8FD4\u3059\u51E6\u7406\u306E\u8A66\u884C\u4E2D\u306Bthrowable\u304C\u518D\u5EA6\u751F\u6210\u3055\u308C\u307E\u3057\u305F +WSSERVLET49.diag.check.1=server.xml\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + +error.servlet.caughtThrowableInInit=WSSERVLET50: \u30B5\u30FC\u30D6\u30EC\u30C3\u30C8\u306E\u521D\u671F\u5316\u4E2D\u306Bthrowable\u3092\u6355\u6349\u3057\u307E\u3057\u305F: {0} +WSSERVLET50.diag.cause.1=WS\u30E9\u30F3\u30BF\u30A4\u30E0sun-jaxws.xml\u307E\u305F\u306Fweb.xml\u304C\u6B63\u3057\u304F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +WSSERVLET50.diag.check.1=\u30B5\u30FC\u30D3\u30B9WAR\u30D5\u30A1\u30A4\u30EB\u3067sun-jaxws.xml\u304A\u3088\u3073web.xml\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 +WSSERVLET50.diag.cause.2=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30B5\u30FC\u30D0\u30FC\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u6B63\u3057\u304F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +WSSERVLET50.diag.check.2=\u30B5\u30FC\u30D3\u30B9WAR\u30D5\u30A1\u30A4\u30EB\u3067\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30B5\u30FC\u30D0\u30FC\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u30FB\u30C7\u30A3\u30B9\u30AF\u30EA\u30D7\u30BF\u304C\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 +WSSERVLET50.diag.cause.3=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30FB\u30B5\u30FC\u30D0\u30FC\u306E\u521D\u671F\u5316\u306E\u554F\u984C\u304C\u767A\u751F\u3057\u305F\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +WSSERVLET50.diag.check.3=\u30C9\u30E1\u30A4\u30F3\u30FB\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306Eserver.xml\u30D5\u30A1\u30A4\u30EB\u306B\u554F\u984C\u304C\u306A\u3044\u304B\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + +publisher.info.applyingTransformation=WSSERVLET31: \u5B9F\u969B\u306E\u30A2\u30C9\u30EC\u30B9\u3067\u5909\u63DB\u3092\u9069\u7528\u3057\u3066\u3044\u307E\u3059: {0} +WSSERVLET31.diag.cause.1=\u5909\u63DB\u3092\u9069\u7528\u3057\u3066\u3044\u307E\u3059 +WSSERVLET31.diag.check.1=\u901A\u5E38\u306E\u64CD\u4F5C + +publisher.info.generatingWSDL=WSSERVLET32: \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8: {0}\u306B\u3064\u3044\u3066WSDL\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059 +WSSERVLET32.diag.cause.1=WSDL\u3092\u751F\u6210\u3057\u3066\u3044\u307E\u3059 +WSSERVLET32.diag.check.1=\u901A\u5E38\u306E\u64CD\u4F5C\u3067\u3059\u3002 + +exception.cannotCreateTransformer=WSSERVLET33: \u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 +WSSERVLET33.diag.cause.1=\u30B5\u30FC\u30D3\u30B9WSDL\u3092\u30D1\u30D6\u30EA\u30C3\u30B7\u30E5\u3059\u308B\u969B\u306B\u3001XSLT\u5909\u63DB\u3092\u4F7F\u7528\u3057\u3066HTTP\u306E\u5834\u6240\u306B\u30C7\u30D7\u30ED\u30A4\u6E08\u306E\u5834\u6240/\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u30D1\u30C3\u30C1\u3055\u308C\u307E\u3059\u3002\u5909\u63DB\u3092\u884C\u3046\u305F\u3081\u306E\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002 +WSSERVLET33.diag.check.1=\u4E92\u63DB\u6027\u306E\u306A\u3044\u5909\u63DB\u30A8\u30F3\u30B8\u30F3\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u6B63\u3057\u3044\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u304A\u3088\u3073\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 +WSSERVLET33.diag.cause.2=\u30B5\u30FC\u30D3\u30B9WSDL\u3092\u30D1\u30D6\u30EA\u30C3\u30B7\u30E5\u3059\u308B\u969B\u306B\u3001XSLT\u5909\u63DB\u3092\u4F7F\u7528\u3057\u3066HTTP\u306E\u5834\u6240\u306B\u30C7\u30D7\u30ED\u30A4\u6E08\u306E\u5834\u6240/\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304C\u30D1\u30C3\u30C1\u3055\u308C\u307E\u3059\u3002\u5909\u63DB\u3092\u884C\u3046\u305F\u3081\u306E\u30C8\u30E9\u30F3\u30B9\u30D5\u30A9\u30FC\u30DE\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002 +WSSERVLET33.diag.check.2=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u304B\u4E92\u63DB\u6027\u306E\u306A\u3044\u5909\u63DB\u30A8\u30F3\u30B8\u30F3\u304C\u5B58\u5728\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002server.xml\u30D5\u30A1\u30A4\u30EB\u3067\u4F8B\u5916\u306E\u6709\u7121\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + + +exception.transformationFailed=WSSERVLET34: \u5909\u63DB\u306B\u5931\u6557\u3057\u307E\u3057\u305F: {0} +WSSERVLET34.diag.cause.1=\u5909\u63DB\u306E\u8A66\u884C\u4E2D\u306B\u3001WSDL\u3067\u306E\u5834\u6240\u306E\u30D1\u30C3\u30C1\u9069\u7528\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSSERVLET34.diag.check.1=\u30A8\u30E9\u30FC/\u4F8B\u5916\u306E\u8A73\u7D30\u306F\u3001\u30ED\u30B0\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +exception.templateCreationFailed=WSSERVLET35: \u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30FB\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F +WSSERVLET35.diag.cause.1=\u5909\u63DB\u3092\u4F7F\u7528\u3057\u305FWSDL\u306E\u5834\u6240\u306E\u30D1\u30C3\u30C1\u9069\u7528\u3067\u306F\u3001XSLT\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u30FB\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u304C\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSSERVLET35.diag.check.1=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306E\u4F5C\u6210\u4E2D\u306B\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F\u3002\u8A73\u7D30\u306F\u3001\u4F8B\u5916\u304A\u3088\u3073\u30B9\u30BF\u30C3\u30AF\u30FB\u30C8\u30EC\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +servlet.html.method=WSSERVLET63: \u3053\u306E\u30BF\u30A4\u30D7\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B\u306FPOST\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +WSSERVLET63.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u306FHTTP POST\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: WSI BP 1.0 +WSSERVLET63.diag.check.1=HTTP\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C(GET\u30EA\u30AF\u30A8\u30B9\u30C8\u3067\u306F\u306A\u304F)POST\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + + +servlet.faultstring.invalidContentType=WSSERVLET64: \u7121\u52B9\u306AContent-Type\u3067\u3059\u3002text/xml\u304C\u5FC5\u8981\u3067\u3059 +WSSERVLET64.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30BF\u30A4\u30D7\u306Ftext/xml\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059: WSI BP 1.0 +WSSERVLET64.diag.check.1=\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u30FB\u30EA\u30AF\u30A8\u30B9\u30C8\u3067text/xml\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044 + +error.implementorFactory.newInstanceFailed=WSSERVLET43: \u30DD\u30FC\u30C8\"{0}\"\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F +WSSERVLET43.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u306E\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002 +WSSERVLET43.diag.check.1=Web\u30B5\u30FC\u30D3\u30B9\u304C\u4F7F\u7528\u53EF\u80FD\u304B\u3064\u30D1\u30D6\u30EA\u30C3\u30AF\u3067\u3042\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u8A73\u7D30\u306F\u4F8B\u5916\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044 + +error.implementorFactory.servantInitFailed=WSSERVLET44: \u30DD\u30FC\u30C8\"{0}\"\u306E\u30B5\u30FC\u30D3\u30B9\u30FB\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u306E\u521D\u671F\u5316\u306B\u5931\u6557\u3057\u307E\u3057\u305F +WSSERVLET44.diag.cause.1=Web\u30B5\u30FC\u30D3\u30B9\u306F\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u5316\u3055\u308C\u307E\u3057\u305F\u304C\u3001\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +WSSERVLET44.diag.check.1=\u8A73\u7D30\u306F\u4F8B\u5916\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u304C\u3059\u3079\u3066\u6B63\u3057\u3044\u3053\u3068\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002 + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: \u5FC5\u9808\u306E\u30D8\u30C3\u30C0\u30FCSOAPAction\u304C\u7121\u52B9\u3067\u3059 +WSSERVLET65.diag.cause.1=SOAP\u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u5FC5\u9808\u3067\u3059 +WSSERVLET65.diag.check.1=SOAPAction\u304A\u3088\u3073\u9069\u5207\u306A\u5024\u3092\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044 + +# {0} - URI +servlet.no.address.available={0}\u306B\u4F7F\u7528\u3067\u304D\u308B\u30A2\u30C9\u30EC\u30B9\u304C\u3042\u308A\u307E\u305B\u3093 + +servlet.html.title= Web\u30B5\u30FC\u30D3\u30B9 +servlet.html.title2=

    Web\u30B5\u30FC\u30D3\u30B9

    +servlet.html.noInfoAvailable=

    JAX-WS\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u60C5\u5831\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002

    +servlet.html.columnHeader.portName=\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8 +servlet.html.columnHeader.status=\u30B9\u30C6\u30FC\u30BF\u30B9 +servlet.html.columnHeader.information=\u60C5\u5831 +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    \u30B5\u30FC\u30D3\u30B9\u540D\:{0}
    \u30DD\u30FC\u30C8\u540D\:{1}
    +servlet.html.information.table=
    \u30A2\u30C9\u30EC\u30B9\:{0}
    WSDL\:{0}?wsdl
    \u5B9F\u88C5\u30AF\u30E9\u30B9\:{1}
    +servlet.html.notFound=

    404\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: \u69CB\u6210\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +error.implementorFactory.noInputStream=WSSERVLET37: \u69CB\u6210\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +error.implementorRegistry.unknownName=WSSERVLET38: \u4E0D\u660E\u306A\u30DD\u30FC\u30C8\u540D: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \u69CB\u6210\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093 +error.implementorRegistry.classNotFound=WSSERVLET40: \u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: \u69CB\u6210\u60C5\u5831\u304C\u4E0D\u5341\u5206\u3067\u3059 +error.implementorRegistry.duplicateName=WSSERVLET42: \u91CD\u8907\u3057\u305F\u30DD\u30FC\u30C8\u540D: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: \u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \u69CB\u6210\u3092\u8AAD\u307F\u53D6\u308C\u307E\u305B\u3093 +error.servlet.init.config.parameter.missing=WSSERVLET47: \u69CB\u6210\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: \u69CB\u6210\u30D5\u30A1\u30A4\u30EB: \"{0}\"\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093 +# + +error.servlet.noImplementorForPort=WSSERVLET52: \u30DD\u30FC\u30C8: {0}\u306B\u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF\u304C\u767B\u9332\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +error.servlet.noPortSpecified=WSSERVLET53: HTTP POST\u30EA\u30AF\u30A8\u30B9\u30C8URL\u306B\u30DD\u30FC\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +error.servlet.noResponseWasProduced=WSSERVLET54: \u30EC\u30B9\u30DD\u30F3\u30B9\u304C\u751F\u6210\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F(\u5185\u90E8\u30A8\u30E9\u30FC) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: \u7A7A\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F +info.servlet.initializing=WSSERVLET56: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8: \u521D\u671F\u5316 +info.servlet.destroying=WSSERVLET57: JAX-WS\u30B5\u30FC\u30D6\u30EC\u30C3\u30C8: \u7834\u68C4 +# +trace.servlet.requestForPortNamed=WSSERVLET58: \u30DD\u30FC\u30C8: {0}\u306B\u5BFE\u3059\u308B\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF: {0}\u306B\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u6E21\u3057\u3066\u3044\u307E\u3059 +trace.servlet.gotResponseFromImplementor=WSSERVLET60: \u30A4\u30F3\u30D7\u30EA\u30E1\u30F3\u30BF: {0}\u304B\u3089\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u53D6\u5F97\u3057\u307E\u3057\u305F +trace.servlet.writingFaultResponse=WSSERVLET61: \u30D5\u30A9\u30EB\u30C8\u30FB\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059 +trace.servlet.writingSuccessResponse=WSSERVLET62: \u6B63\u5E38\u30EC\u30B9\u30DD\u30F3\u30B9\u3092\u66F8\u304D\u8FBC\u3093\u3067\u3044\u307E\u3059 +# +html.nonRootPage.title= Web\u30B5\u30FC\u30D3\u30B9 +html.nonRootPage.body1=

    Web\u30B5\u30FC\u30D3\u30B9\u306F\u3053\u306EURL\u3067\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u307E\u3059\u3002

    +html.nonRootPage.body2=

    \u7121\u52B9\u306A\u30EA\u30AF\u30A8\u30B9\u30C8URI\u3067\u3059\u3002

    \u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Web\u30B5\u30FC\u30D3\u30B9 +html.wsdlPage.noWsdl=

    \u30D1\u30D6\u30EA\u30C3\u30B7\u30E5\u306B\u4F7F\u7528\u3067\u304D\u308BWSDL\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093\u3002

    \u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u60C5\u5831\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002

    +html.rootPage.title= Web\u30B5\u30FC\u30D3\u30B9 +html.rootPage.body1=

    Web\u30B5\u30FC\u30D3\u30B9\u306F\u3053\u306EURL\u3067\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u307E\u3059\u3002

    +html.rootPage.body2a=

    \u6B21\u306E\u30DD\u30FC\u30C8\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u3059: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    \u3053\u306E\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306F\u6B63\u3057\u304F\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u69CB\u6210\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240\u304A\u3088\u3073\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties new file mode 100644 index 00000000000..c46c0dc20ec --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_ko.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=\uB7F0\uD0C0\uC784 \uAE30\uC220\uC790 "{0}"\uC774(\uAC00) \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +listener.parsingFailed=WSSERVLET11: \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \uAD6C\uBB38 \uBD84\uC11D \uC2E4\uD328: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser\uAC00 sun-jaxws.xml \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET11.diag.check.1=sun-jaxws.xml \uD30C\uC77C\uC5D0\uC11C \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +WSSERVLET11.diag.cause.2=sun-jaxws.xml \uB7F0\uD0C0\uC784 \uBC30\uCE58 \uAE30\uC220\uC790\uAC00 \uB204\uB77D\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. +WSSERVLET11.diag.check.2=jaxrpc-ri.xml \uD30C\uC77C\uC5D0\uC11C war \uD30C\uC77C\uC5D0 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + + +listener.info.initialize=WSSERVLET12: JAX-WS \uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108\uB97C \uCD08\uAE30\uD654\uD558\uB294 \uC911 +WSSERVLET12.diag.cause.1=\uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108\uB97C \uC2DC\uC791\uD558\uB294 \uC911 +WSSERVLET12.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uC2DC\uC791 + +listener.info.destroy=WSSERVLET13: JAX-WS \uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108\uAC00 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET13.diag.cause.1=\uCEE8\uD14D\uC2A4\uD2B8 \uB9AC\uC2A4\uB108 \uC885\uB8CC +WSSERVLET13.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uC885\uB8CC + +servlet.info.initialize=WSSERVLET14: JAX-WS \uC11C\uBE14\uB9BF\uC744 \uCD08\uAE30\uD654\uD558\uB294 \uC911 +WSSERVLET14.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC11C\uBE14\uB9BF\uC744 \uC2DC\uC791\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. +WSSERVLET14.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uBC30\uCE58\uC785\uB2C8\uB2E4. \uC11C\uBE44\uC2A4 \uBC30\uCE58\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +servlet.info.destroy=WSSERVLET15: JAX-WS \uC11C\uBE14\uB9BF\uC774 \uC0AD\uC81C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET15.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC11C\uBE14\uB9BF\uC774 \uC885\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET15.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uBC30\uCE58 \uD574\uC81C\uC785\uB2C8\uB2E4. \uBC30\uCE58 \uD574\uC81C\uAC00 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +servlet.warning.missingContextInformation=WSSERVLET16: \uCEE8\uD14D\uC2A4\uD2B8 \uC815\uBCF4\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET16.diag.cause.1=war \uD30C\uC77C\uC5D0 jaxrpc-ri.xml \uD30C\uC77C\uC774 \uB204\uB77D\uB41C \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. +WSSERVLET16.diag.check.1=\uC11C\uBE44\uC2A4 war \uD30C\uC77C\uC758 \uC555\uCD95\uC744 \uD478\uC2ED\uC2DC\uC624. jaxrpc-ri-runtime.xml \uD30C\uC77C\uC774 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + + +servlet.warning.duplicateEndpointName=WSSERVLET17: \uB05D\uC810 \uC774\uB984\uC774 \uC911\uBCF5\uB429\uB2C8\uB2E4. +WSSERVLET17.diag.cause.1=\uB3D9\uC77C\uD55C \uC774\uB984\uC744 \uC0AC\uC6A9\uD558\uB294 \uB450 \uAC1C \uC774\uC0C1\uC758 \uB05D\uC810\uC774 jaxrpc-ri.xml \uB7F0\uD0C0\uC784 \uAE30\uC220\uC790\uC5D0\uC11C \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET17.diag.check.1=\uC774\uB85C \uC778\uD574 \uC11C\uBE44\uC2A4 \uBC30\uCE58 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. + + +servlet.info.emptyRequestMessage=WSSERVLET18: \uBE48 \uC694\uCCAD \uBA54\uC2DC\uC9C0\uB97C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4. +WSSERVLET18.diag.cause.1=\uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 \uC804\uC1A1\uD55C \uBA54\uC2DC\uC9C0\uAC00 \uBE44\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +WSSERVLET18.diag.check.1=\uC758\uB3C4\uC801\uC778 \uAC83\uC77C \uC218\uB3C4 \uC788\uACE0, \uC758\uB3C4\uC801\uC778 \uAC83\uC774 \uC544\uB2D0 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC758\uB3C4\uC801\uC778 \uAC83\uC774 \uC544\uB2D0 \uACBD\uC6B0 \uD074\uB77C\uC774\uC5B8\uD2B8 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC624\uB958\uB97C \uAC80\uC0AC\uD558\uC2ED\uC2DC\uC624. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: \uB05D\uC810\uC5D0 \uB300\uD55C \uC694\uCCAD\uC744 \uAC00\uC838\uC634: {0} +WSSERVLET19.diag.cause.1=\uC774 \uB05D\uC810\uC5D0 \uB300\uD55C \uD074\uB77C\uC774\uC5B8\uD2B8 \uC694\uCCAD\uC774 \uB3C4\uCC29\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET19.diag.check.1=\uB2E8\uC21C\uD55C \uC815\uBCF4 \uBA54\uC2DC\uC9C0\uC785\uB2C8\uB2E4. \uC815\uC0C1\uC801\uC778 \uC791\uC5C5\uC785\uB2C8\uB2E4. + +servlet.error.noImplementorForEndpoint=WSSERVLET20: \uB05D\uC810\uC5D0 \uB300\uD55C \uAD6C\uD604\uC790\uAC00 \uC5C6\uC74C: {0} +WSSERVLET20.diag.cause.1=\uC774 \uC11C\uBE44\uC2A4\uC5D0 \uB300\uD55C \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET20.diag.check.1=war\uC758 \uC555\uCD95\uC744 \uD478\uC2ED\uC2DC\uC624. tie \uBC0F serializer \uD074\uB798\uC2A4\uAC00 \uBC1C\uACAC\uB418\uC5C8\uC2B5\uB2C8\uAE4C? + +servlet.trace.invokingImplementor=WSSERVLET21: \uAD6C\uD604\uC790\uB97C \uD638\uCD9C\uD558\uB294 \uC911: {0} +WSSERVLET21.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4\uB97C \uD638\uCD9C\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. +WSSERVLET21.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC6F9 \uC11C\uBE44\uC2A4 \uD638\uCD9C\uC785\uB2C8\uB2E4. + +servlet.error.noEndpointSpecified=WSSERVLET22: \uC9C0\uC815\uB41C \uB05D\uC810\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET22.diag.cause.1=\uC694\uCCAD\uC774 \uB05D\uC810 \uC5C6\uC774 \uD638\uCD9C\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET22.diag.check.1=stub.setTargetEndpoint \uC18D\uC131\uC73C\uB85C \uB05D\uC810\uC744 \uC124\uC815\uD558\uC2ED\uC2DC\uC624. + +servlet.error.noResponseMessage=WSSERVLET23: \uC751\uB2F5 \uBA54\uC2DC\uC9C0\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET23.diag.cause.1=\uC694\uCCAD\uC774 \uC11C\uBE44\uC2A4\uB85C\uBD80\uD130 \uC751\uB2F5\uC744 \uC0DD\uC131\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +WSSERVLET23.diag.check.1=\uC751\uB2F5\uC774 \uD544\uC694\uD55C \uACBD\uC6B0 \uC694\uCCAD \uBA54\uC2DC\uC9C0\uAC00 \uC2E4\uC81C\uB85C \uC804\uC1A1\uB418\uC5C8\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +WSSERVLET23.diag.check.2=\uD615\uC2DD\uC774 \uC798\uBABB\uB418\uC5C8\uC744 \uC218 \uC788\uB294 \uC694\uCCAD\uC744 \uC11C\uBE44\uC2A4\uAC00 \uC2B9\uC778\uD588\uC73C\uBA70 \uC751\uB2F5\uC774 \uC0DD\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. + +servlet.trace.writingFaultResponse=WSSERVLET24: \uACB0\uD568 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911 +WSSERVLET24.diag.cause.1=SOAPFault \uBA54\uC2DC\uC9C0\uB97C \uD074\uB77C\uC774\uC5B8\uD2B8\uB85C \uBC18\uD658\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. +WSSERVLET24.diag.check.1=\uBA54\uC2DC\uC9C0 \uCD94\uC801 \uACB0\uD568\uC774 \uAE30\uB85D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +servlet.trace.writingSuccessResponse=WSSERVLET25: \uC131\uACF5 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911 +WSSERVLET25.diag.cause.1=SOAPMessage \uC751\uB2F5\uC744 \uD074\uB77C\uC774\uC5B8\uD2B8\uB85C \uBC18\uD658\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. +WSSERVLET25.diag.check.1=\uBA54\uC2DC\uC9C0\uB97C \uCD94\uC801\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uC815\uC0C1\uC801\uC778 \uC751\uB2F5\uC785\uB2C8\uB2E4. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \uB05D\uC810\uC5D0 \uC911\uBCF5 URL \uD328\uD134\uC774 \uC788\uC74C: {0} +WSSERVLET26.diag.cause.1=\uB05D\uC810 URL\uC774 \uC911\uBCF5\uB429\uB2C8\uB2E4. +WSSERVLET26.diag.check.1=\uC774\uB85C \uC778\uD574 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC911\uBCF5 \uB05D\uC810\uC744 \uC81C\uAC70\uD558\uC2ED\uC2DC\uC624. + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \uB05D\uC810\uC5D0 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uB294 \uC554\uC2DC\uC801 URL \uD328\uD134\uC774 \uC788\uC74C: {0} +WSSERVLET27.diag.cause.1=\uC774 \uB9B4\uB9AC\uC2A4\uC5D0\uC11C\uB294 \uC554\uC2DC\uC801 URL\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +WSSERVLET27.diag.check.1=\uC554\uC2DC\uC801 URL\uC744 \uC81C\uAC70\uD558\uC2ED\uC2DC\uC624. + +servlet.faultstring.missingPort=WSSERVLET28: \uD3EC\uD2B8 \uC815\uBCF4\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET28.diag.cause.1=\uB300\uC0C1 \uB05D\uC810\uC774 \uB110\uC785\uB2C8\uB2E4. +WSSERVLET28.diag.check.1=stub.setTargetEndpoint() \uC18D\uC131\uC73C\uB85C \uB300\uC0C1 \uB05D\uC810\uC744 \uC124\uC815\uD558\uC2ED\uC2DC\uC624. + +servlet.faultstring.portNotFound=WSSERVLET29: \uD3EC\uD2B8\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4({0}). +WSSERVLET29.diag.cause.1=\uD3EC\uD2B8\uAC00 \uC9C0\uC815\uB418\uC5C8\uC9C0\uB9CC \uD574\uB2F9 \uC11C\uBE44\uC2A4 \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET29.diag.check.1=\uD3EC\uD2B8\uAC00 \uC801\uD569\uD569\uB2C8\uAE4C? war \uD30C\uC77C\uC758 \uC555\uCD95\uC744 \uD480\uACE0 tie \uBC0F serializer\uAC00 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +servlet.faultstring.internalServerError=WSSERVLET30: \uB0B4\uBD80 \uC11C\uBC84 \uC624\uB958({0}) +WSSERVLET30.diag.cause.1=\uC694\uCCAD\uC744 \uCC98\uB9AC\uD558\uB294 \uC911 \uC11C\uBC84 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET30.diag.check.1=\uC808 \uC218\uB85C \uC778\uD55C \uAC83\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC608\uC678 \uC0AC\uD56D\uC740 \uC11C\uBC84 \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \uC774\uC804 \uC608\uC678 \uC0AC\uD56D\uC5D0\uC11C \uBCF5\uAD6C\uD558\uB294 \uC911 throwable\uC744 \uAC10\uC9C0\uD568: {0} +WSSERVLET51.diag.cause.1=\uC694\uCCAD\uC758 \uC11C\uBE44\uC2A4 \uCC98\uB9AC\uB85C \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. SOAPPFaultMessage\uB97C \uBC18\uD658\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 throwable\uC774 \uB2E4\uC2DC \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET51.diag.check.1=\uC608\uC678 \uC0AC\uD56D \uC815\uBCF4\uB294 server.xml \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +error.servlet.caughtThrowable=WSSERVLET49: throwable\uC744 \uAC10\uC9C0\uD568: {0} +WSSERVLET49.diag.cause.1=\uC694\uCCAD\uC758 \uC11C\uBE44\uC2A4 \uCC98\uB9AC\uB85C \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. SOAPFaultMessage\uB97C \uBC18\uD658\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 throwable\uC774 \uB2E4\uC2DC \uC0DD\uC131\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +WSSERVLET49.diag.check.1=\uC608\uC678 \uC0AC\uD56D \uC815\uBCF4\uB294 server.xml \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +error.servlet.caughtThrowableInInit=WSSERVLET50: \uC11C\uBE14\uB9BF \uCD08\uAE30\uD654 \uC911 throwable\uC744 \uAC10\uC9C0\uD568: {0} +WSSERVLET50.diag.cause.1=WS \uB7F0\uD0C0\uC784 sun-jaxws.xml \uB610\uB294 web.xml\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. +WSSERVLET50.diag.check.1=\uC11C\uBE44\uC2A4 war \uD30C\uC77C\uC5D0\uC11C sun-jaxws.xml \uBC0F web.xml\uC774 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +WSSERVLET50.diag.cause.2=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC11C\uBC84 \uBC30\uCE58 \uAE30\uC220\uC790\uAC00 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC740 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. +WSSERVLET50.diag.check.2=\uC11C\uBE44\uC2A4 war \uD30C\uC77C\uC5D0\uC11C \uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC11C\uBC84 \uBC30\uCE58 \uAE30\uC220\uC790\uAC00 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +WSSERVLET50.diag.cause.3=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 \uC11C\uBC84 \uCD08\uAE30\uD654 \uBB38\uC81C\uAC00 \uC788\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. +WSSERVLET50.diag.check.3=\uC624\uB958\uB294 \uB3C4\uBA54\uC778 \uB514\uB809\uD1A0\uB9AC\uC758 server.xml \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +publisher.info.applyingTransformation=WSSERVLET31: \uC2E4\uC81C \uC8FC\uC18C\uB85C \uBCC0\uD658\uC744 \uC801\uC6A9\uD558\uB294 \uC911: {0} +WSSERVLET31.diag.cause.1=\uBCC0\uD658\uC744 \uC801\uC6A9\uD558\uB294 \uC911 +WSSERVLET31.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC791\uC5C5 + +publisher.info.generatingWSDL=WSSERVLET32: \uB05D\uC810\uC5D0 \uB300\uD55C WSDL\uC744 \uC0DD\uC131\uD558\uB294 \uC911: {0} +WSSERVLET32.diag.cause.1=WSDL\uC744 \uC0DD\uC131\uD558\uB294 \uC911 +WSSERVLET32.diag.check.1=\uC815\uC0C1\uC801\uC778 \uC791\uC5C5\uC785\uB2C8\uB2E4. + +exception.cannotCreateTransformer=WSSERVLET33: \uBCC0\uD658\uAE30\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET33.diag.cause.1=\uC11C\uBE44\uC2A4 WSDL\uC744 \uAC8C\uC2DC\uD560 \uB54C XSLT \uBCC0\uD658\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBC30\uCE58\uB41C \uC704\uCE58/\uB05D\uC810\uACFC \uD568\uAED8 HTTP \uC704\uCE58\uC5D0 \uD328\uCE58\uAC00 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uBCC0\uD658 \uC218\uD589\uC5D0 \uD544\uC694\uD55C \uBCC0\uD658\uAE30\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET33.diag.check.1=\uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uBCC0\uD658 \uC5D4\uC9C4\uC744 \uC0AC\uC6A9\uD558\uACE0 \uC788\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uC62C\uBC14\uB978 \uBCC0\uD658\uAE30\uC640 \uBC84\uC804\uC744 \uC0AC\uC6A9 \uC911\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. +WSSERVLET33.diag.cause.2=\uC11C\uBE44\uC2A4 WSDL\uC744 \uAC8C\uC2DC\uD560 \uB54C XSLT \uBCC0\uD658\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBC30\uCE58\uB41C \uC704\uCE58/\uB05D\uC810\uACFC \uD568\uAED8 HTTP \uC704\uCE58\uC5D0 \uD328\uCE58\uAC00 \uC801\uC6A9\uB429\uB2C8\uB2E4. \uBCC0\uD658 \uC218\uD589\uC5D0 \uD544\uC694\uD55C \uBCC0\uD658\uAE30\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET33.diag.check.2=\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uAC70\uB098 \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uBCC0\uD658 \uC5D4\uC9C4\uC774 \uC788\uB294 \uAC83 \uAC19\uC2B5\uB2C8\uB2E4. \uC608\uC678 \uC0AC\uD56D\uC740 server.xml \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + + +exception.transformationFailed=WSSERVLET34: \uBCC0\uD658 \uC2E4\uD328: {0} +WSSERVLET34.diag.cause.1=\uBCC0\uD658\uD558\uB824\uACE0 \uC2DC\uB3C4\uD558\uB294 \uC911 WSDL\uC5D0\uC11C \uC704\uCE58 \uD328\uCE58 \uC801\uC6A9\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET34.diag.check.1=\uC790\uC138\uD55C \uC624\uB958/\uC608\uC678 \uC0AC\uD56D\uC740 \uB85C\uADF8 \uD30C\uC77C\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +exception.templateCreationFailed=WSSERVLET35: \uD15C\uD50C\uB9AC\uD2B8 \uAC1D\uCCB4 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET35.diag.cause.1=\uBCC0\uD658\uC744 \uD1B5\uD55C WSDL \uC704\uCE58 \uD328\uCE58 \uC801\uC6A9\uC744 \uC704\uD574 XSLT \uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uD15C\uD50C\uB9AC\uD2B8\uAC00 \uC0DD\uC131\uB429\uB2C8\uB2E4. \uD15C\uD50C\uB9AC\uD2B8 \uC0DD\uC131\uC744 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET35.diag.check.1=\uD15C\uD50C\uB9AC\uD2B8 \uC0DD\uC131 \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC608\uC678 \uC0AC\uD56D \uBC0F \uC2A4\uD0DD \uCD94\uC801\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +servlet.html.method=WSSERVLET63: \uC774 \uC720\uD615\uC758 \uC694\uCCAD\uC5D0 Post\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. +WSSERVLET63.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC694\uCCAD\uC740 HTTP POST \uBA54\uC18C\uB4DC\uB97C \uC0AC\uC6A9\uD574\uC57C \uD568: WSI BP 1.0 +WSSERVLET63.diag.check.1=HTTP \uD074\uB77C\uC774\uC5B8\uD2B8\uAC00 GET \uC694\uCCAD\uC774 \uC544\uB2CC POST \uC694\uCCAD\uC744 \uC0AC\uC6A9 \uC911\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + + +servlet.faultstring.invalidContentType=WSSERVLET64: Content-Type\uC774 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. text/xml\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +WSSERVLET64.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC694\uCCAD\uC758 \uCF58\uD150\uCE20 \uC720\uD615\uC740 text/xml\uC774\uC5B4\uC57C \uD568: WSI BP 1.0 +WSSERVLET64.diag.check.1=\uD074\uB77C\uC774\uC5B8\uD2B8 \uC694\uCCAD\uC774 text/xml\uC744 \uC0AC\uC6A9 \uC911\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +error.implementorFactory.newInstanceFailed=WSSERVLET43: \"{0}\" \uD3EC\uD2B8\uC5D0 \uB300\uD55C \uC11C\uBE44\uC2A4 \uAD6C\uD604\uC790 \uC778\uC2A4\uD134\uC2A4\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET43.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4 \uC778\uC2A4\uD134\uC2A4\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET43.diag.check.1=\uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC0AC\uC6A9 \uAC00\uB2A5\uD558\uBA70 \uACF5\uC6A9\uC778\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC608\uC678 \uC0AC\uD56D\uC744 \uAC80\uC0AC\uD558\uC2ED\uC2DC\uC624. + +error.implementorFactory.servantInitFailed=WSSERVLET44: \"{0}\" \uD3EC\uD2B8\uC5D0 \uB300\uD55C \uC11C\uBE44\uC2A4 \uAD6C\uD604\uC790 \uCD08\uAE30\uD654\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. +WSSERVLET44.diag.cause.1=\uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC778\uC2A4\uD134\uC2A4\uD654\uB418\uC5C8\uC9C0\uB9CC \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +WSSERVLET44.diag.check.1=\uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uC608\uC678 \uC0AC\uD56D\uC744 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. \uAD6C\uC131 \uD30C\uC77C\uC774 \uBAA8\uB450 \uC62C\uBC14\uB978\uC9C0 \uD655\uC778\uD558\uC2ED\uC2DC\uC624. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: \uD5E4\uB354\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. SOAPAction\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +WSSERVLET65.diag.cause.1=SOAP Action\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +WSSERVLET65.diag.check.1=SOAPAction \uBC0F \uC801\uD569\uD55C \uAC12\uC744 \uCD94\uAC00\uD558\uC2ED\uC2DC\uC624. + +# {0} - URI +servlet.no.address.available={0}\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC8FC\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. + +servlet.html.title= \uC6F9 \uC11C\uBE44\uC2A4 +servlet.html.title2=

    \uC6F9 \uC11C\uBE44\uC2A4

    +servlet.html.noInfoAvailable=

    \uC0AC\uC6A9 \uAC00\uB2A5\uD55C JAX-WS \uCEE8\uD14D\uC2A4\uD2B8 \uC815\uBCF4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.

    +servlet.html.columnHeader.portName=\uB05D\uC810 +servlet.html.columnHeader.status=\uC0C1\uD0DC +servlet.html.columnHeader.information=\uC815\uBCF4 +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    \uC11C\uBE44\uC2A4 \uC774\uB984\:{0}
    \uD3EC\uD2B8 \uC774\uB984\:{1}
    +servlet.html.information.table=
    \uC8FC\uC18C\:{0}
    WSDL\:{0}?wsdl
    \uAD6C\uD604 \uD074\uB798\uC2A4\:{1}
    +servlet.html.notFound=

    404 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: \uC9C0\uC815\uB41C \uAD6C\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +error.implementorFactory.noInputStream=WSSERVLET37: \uC9C0\uC815\uB41C \uAD6C\uC131\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. +error.implementorRegistry.unknownName=WSSERVLET38: \uC54C \uC218 \uC5C6\uB294 \uD3EC\uD2B8 \uC774\uB984: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \uAD6C\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +error.implementorRegistry.classNotFound=WSSERVLET40: \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: \uAD6C\uC131 \uC815\uBCF4\uAC00 \uBD88\uC644\uC804\uD569\uB2C8\uB2E4. +error.implementorRegistry.duplicateName=WSSERVLET42: \uC911\uBCF5 \uD3EC\uD2B8 \uC774\uB984: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \uAD6C\uC131\uC744 \uC77D\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +error.servlet.init.config.parameter.missing=WSSERVLET47: \uAD6C\uC131 \uB9E4\uAC1C\uBCC0\uC218\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: \uAD6C\uC131 \uD30C\uC77C \"{0}\"\uC744(\uB97C) \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# + +error.servlet.noImplementorForPort=WSSERVLET52: \uD3EC\uD2B8\uC5D0 \uB300\uD574 \uB4F1\uB85D\uB41C \uAD6C\uD604\uC790\uAC00 \uC5C6\uC74C: {0} +error.servlet.noPortSpecified=WSSERVLET53: HTTP POST \uC694\uCCAD URL\uC5D0 \uC9C0\uC815\uB41C \uD3EC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. +error.servlet.noResponseWasProduced=WSSERVLET54: \uC0DD\uC131\uB41C \uC751\uB2F5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4(\uB0B4\uBD80 \uC624\uB958). +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: \uBE48 \uC694\uCCAD \uBA54\uC2DC\uC9C0\uB97C \uAC00\uC838\uC654\uC2B5\uB2C8\uB2E4. +info.servlet.initializing=WSSERVLET56: JAX-WS \uC11C\uBE14\uB9BF: \uCD08\uAE30\uD654 +info.servlet.destroying=WSSERVLET57: JAX-WS \uC11C\uBE14\uB9BF: \uC0AD\uC81C +# +trace.servlet.requestForPortNamed=WSSERVLET58: \uD3EC\uD2B8\uC5D0 \uB300\uD55C \uC694\uCCAD\uC744 \uAC00\uC838\uC634: {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \uAD6C\uD604\uC790\uB85C \uC694\uCCAD\uC744 \uC804\uC1A1\uD558\uB294 \uC911: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: \uAD6C\uD604\uC790\uC5D0\uC11C \uC751\uB2F5\uC744 \uAC00\uC838\uC634: {0} +trace.servlet.writingFaultResponse=WSSERVLET61: \uACB0\uD568 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911 +trace.servlet.writingSuccessResponse=WSSERVLET62: \uC131\uACF5 \uC751\uB2F5\uC744 \uC4F0\uB294 \uC911 +# +html.nonRootPage.title= \uC6F9 \uC11C\uBE44\uC2A4 +html.nonRootPage.body1=

    \uC774 URL\uC5D0 \uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC124\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.

    +html.nonRootPage.body2=

    \uC694\uCCAD URI\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4.

    \uBC30\uCE58 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= \uC6F9 \uC11C\uBE44\uC2A4 +html.wsdlPage.noWsdl=

    \uAC8C\uC2DC\uC5D0 \uC0AC\uC6A9 \uAC00\uB2A5\uD55C WSDL \uBB38\uC11C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.

    \uBC30\uCE58 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.

    +html.rootPage.title= \uC6F9 \uC11C\uBE44\uC2A4 +html.rootPage.body1=

    \uC774 URL\uC5D0 \uC6F9 \uC11C\uBE44\uC2A4\uAC00 \uC124\uCE58\uB418\uC5C8\uC2B5\uB2C8\uB2E4.

    +html.rootPage.body2a=

    \uC9C0\uC6D0\uD558\uB294 \uD3EC\uD2B8: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    \uC774 \uB05D\uC810\uC740 \uC81C\uB300\uB85C \uAD6C\uC131\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uAD6C\uC131 \uD30C\uC77C\uC758 \uC704\uCE58 \uBC0F \uCF58\uD150\uCE20\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties new file mode 100644 index 00000000000..082e17ac828 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_pt_BR.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=O descritor de runtime "{0}" n\u00E3o foi encontrado + +listener.parsingFailed=WSSERVLET11: falha ao fazer parse do descritor de runtime: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser n\u00E3o conseguiu fazer parse do descritor de runtime sun-jaxws.xml +WSSERVLET11.diag.check.1=Verifique o arquivo sun-jaxws.xml para certificar-se de que ele est\u00E1 correto +WSSERVLET11.diag.cause.2=Pode ser que o descritor de implanta\u00E7\u00E3o de runtime sun-jaxws.xml esteja faltando +WSSERVLET11.diag.check.2=Verifique o arquivo jaxrpc-ri.xml para certificar-se de que ele est\u00E1 presente no arquivo war + + +listener.info.initialize=WSSERVLET12: inicializa\u00E7\u00E3o do listener de contexto de JAX-WS +WSSERVLET12.diag.cause.1=Iniciando listener de contexto +WSSERVLET12.diag.check.1=Inicializa\u00E7\u00E3o do web service normal + +listener.info.destroy=WSSERVLET13: listener de contexto de JAX-WS destru\u00EDdo +WSSERVLET13.diag.cause.1=Shutdown do listener de contexto +WSSERVLET13.diag.check.1=Shutdown do web service normal + +servlet.info.initialize=WSSERVLET14: Inicializando servlet de JAX-WS +WSSERVLET14.diag.cause.1=Inicializando servlet de Web Services. +WSSERVLET14.diag.check.1=Implanta\u00E7\u00E3o de Web Service Normal. Implanta\u00E7\u00E3o do servi\u00E7o conclu\u00EDda. + +servlet.info.destroy=WSSERVLET15: servlet de JAX-WS destru\u00EDdo +WSSERVLET15.diag.cause.1=Shutdown do servlet do Web Services. +WSSERVLET15.diag.check.1=Cancelamento da implanta\u00E7\u00E3o do Web service normal. Cancelamento da implanta\u00E7\u00E3o conclu\u00EDdo. + +servlet.warning.missingContextInformation=WSSERVLET16: informa\u00E7\u00F5es de contexto n\u00E3o encontradas +WSSERVLET16.diag.cause.1=O arquivo jaxrpc-ri.xml talvez n\u00E3o tenha sido encontrado no arquivo war +WSSERVLET16.diag.check.1=Cancele o jar o arquivo war de servi\u00E7o; verifique se o arquivo jaxrpc-ri-runtime.xml est\u00E1 presente + + +servlet.warning.duplicateEndpointName=WSSERVLET17: nome do ponto final duplicado +WSSERVLET17.diag.cause.1=Dois ou mais pontos finais com o mesmo nome encontrados no descritor de runtime de jaxrpc-ri.xml +WSSERVLET17.diag.check.1=Observe que isso pode causar problemas com a implanta\u00E7\u00E3o de servi\u00E7o + + +servlet.info.emptyRequestMessage=WSSERVLET18: obteve mensagem de solicita\u00E7\u00E3o vazia +WSSERVLET18.diag.cause.1=A mensagem enviada pelo cliente est\u00E1 vazia +WSSERVLET18.diag.check.1=Isso pode ou n\u00E3o ser intencional. Se n\u00E3o for, examine o programa de cliente para obter erros. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: obteve solicita\u00E7\u00E3o para ponto final: {0} +WSSERVLET19.diag.cause.1=Chegou a solicita\u00E7\u00E3o do cliente para este ponto final +WSSERVLET19.diag.check.1=S\u00F3 mensagem informativa. Opera\u00E7\u00E3o normal. + +servlet.error.noImplementorForEndpoint=WSSERVLET20: nenhum implementador para o ponto final: {0} +WSSERVLET20.diag.cause.1=A implementa\u00E7\u00E3o deste servi\u00E7o n\u00E3o pode ser encontrada +WSSERVLET20.diag.check.1=Descompacte o war, as classes de liga\u00E7\u00E3o e do serializador foram encontradas? + +servlet.trace.invokingImplementor=WSSERVLET21: chamando o implementador: {0} +WSSERVLET21.diag.cause.1=O Web service est\u00E1 sendo chamado +WSSERVLET21.diag.check.1=Chamada de web service normal. + +servlet.error.noEndpointSpecified=WSSERVLET22: nenhum ponto final especificado +WSSERVLET22.diag.cause.1=Uma solicita\u00E7\u00E3o foi chamada sem ponto final +WSSERVLET22.diag.check.1=Definir ponto final com a propriedade stub.setTargetEndpoint + +servlet.error.noResponseMessage=WSSERVLET23: nenhuma mensagem de resposta +WSSERVLET23.diag.cause.1=A solicita\u00E7\u00E3o foi gerada sem resposta do servi\u00E7o +WSSERVLET23.diag.check.1=Se uma resposta era esperada, verifique se uma mensagem de solicita\u00E7\u00E3o foi realmente enviada +WSSERVLET23.diag.check.2=A solicita\u00E7\u00E3o pode estar incorreta e pode ser aceita pelo servi\u00E7o. N\u00E3o foi gerada uma resposta. + +servlet.trace.writingFaultResponse=WSSERVLET24: gravando resposta com falha +WSSERVLET24.diag.cause.1=A mensagem SOAPFault est\u00E1 sendo retornada ao cliente. +WSSERVLET24.diag.check.1=Rastreando falha de mensagem gravada. + +servlet.trace.writingSuccessResponse=WSSERVLET25: gravando resposta com sucesso +WSSERVLET25.diag.cause.1=A resposta de SOAPMessage est\u00E1 sendo retornada ao cliente +WSSERVLET25.diag.check.1=Rastreando mensagem, resposta normal. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: padr\u00E3o de URL duplicado no ponto final: {0} +WSSERVLET26.diag.cause.1=O URL do ponto final \u00E9 duplicado +WSSERVLET26.diag.check.1=Isso pode causar um problema. Remova pontos finais duplicados. + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: padr\u00E3o de URL impl\u00EDcito n\u00E3o suportado no ponto final: {0} +WSSERVLET27.diag.cause.1=URLS impl\u00EDcito n\u00E3o suportado nesta release +WSSERVLET27.diag.check.1=Remova o URL impl\u00EDcito + +servlet.faultstring.missingPort=WSSERVLET28: informa\u00E7\u00F5es de porta n\u00E3o encontradas +WSSERVLET28.diag.cause.1=O ponto final do alvo \u00E9 nulo +WSSERVLET28.diag.check.1=Defina o ponto final do alvo com a propriedade stub.setTargetEndpoint() + +servlet.faultstring.portNotFound=WSSERVLET29: Porta n\u00E3o encontrada ({0}) +WSSERVLET29.diag.cause.1=Uma porta foi especificada, mas uma implementa\u00E7\u00E3o de servi\u00E7o correspondente n\u00E3o foi encontrada +WSSERVLET29.diag.check.1=A porta \u00E9 v\u00E1lida? Descompacte o arquivo war e certifique-se de que a liga\u00E7\u00E3o e os serializadores est\u00E3o presentes + +servlet.faultstring.internalServerError=WSSERVLET30: erro de servidor interno ({0}) +WSSERVLET30.diag.cause.1=Houve um erro do servidor ao processar a solicita\u00E7\u00E3o +WSSERVLET30.diag.check.1=Isso pode ter ocorrido em decorr\u00EAncia de v\u00E1rias causas. Verifique o arquivo de log do servidor para obter exce\u00E7\u00F5es. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: exce\u00E7\u00E3o detectada ao recuperar-se de uma exce\u00E7\u00E3o anterior: {0} +WSSERVLET51.diag.cause.1=O processamento de servi\u00E7o da solicita\u00E7\u00E3o gerou uma exce\u00E7\u00E3o; ao tentar retornar um SOAPPFaultMessage uma exce\u00E7\u00E3o foi gerada novamente +WSSERVLET51.diag.check.1=Verifique o arquivo de log server.xml para obter informa\u00E7\u00F5es de exce\u00E7\u00E3o + +error.servlet.caughtThrowable=WSSERVLET49: exce\u00E7\u00E3o detectada: {0} +WSSERVLET49.diag.cause.1=O processamento de servi\u00E7o da solicita\u00E7\u00E3o gerou uma exce\u00E7\u00E3o; ao tentar retornar um SOAPFaultMessage uma exce\u00E7\u00E3o foi gerada novamente +WSSERVLET49.diag.check.1=Verifique o arquivo de log server.xml para obter informa\u00E7\u00F5es de exce\u00E7\u00E3o + +error.servlet.caughtThrowableInInit=WSSERVLET50: exce\u00E7\u00E3o detectada durante a inicializa\u00E7\u00E3o do servlet: {0} +WSSERVLET50.diag.cause.1=sun-jaxws.xml ou web.xml de runtime de WS podem estar incorretos +WSSERVLET50.diag.check.1=Verifique se sun-jaxws.xml e web.xml est\u00E3o corretos no arquivo war de servi\u00E7o +WSSERVLET50.diag.cause.2=Os descritores de implanta\u00E7\u00E3o do servidor de aplica\u00E7\u00F5es pode estar incorreto +WSSERVLET50.diag.check.2=Verifique se os descritores de implanta\u00E7\u00E3o do servidor de Aplica\u00E7\u00F5es est\u00E3o corretos no arquivo war de servi\u00E7o +WSSERVLET50.diag.cause.3=Podem haver alguns problemas na inicializa\u00E7\u00E3o do Servidor de Aplica\u00E7\u00F5es +WSSERVLET50.diag.check.3=Verifique o arquivo server.xml no diret\u00F3rio de dom\u00EDnio para obter falhas + +publisher.info.applyingTransformation=WSSERVLET31: aplicando transforma\u00E7\u00E3o com o endere\u00E7o real: {0} +WSSERVLET31.diag.cause.1=Transforma\u00E7\u00E3o sendo aplicada +WSSERVLET31.diag.check.1=Opera\u00E7\u00E3o normal + +publisher.info.generatingWSDL=WSSERVLET32: gerando WSDL para ponto final: {0} +WSSERVLET32.diag.cause.1=WSDL sendo gerado +WSSERVLET32.diag.check.1=Opera\u00E7\u00E3o Normal. + +exception.cannotCreateTransformer=WSSERVLET33: n\u00E3o \u00E9 poss\u00EDvel criar o transformador +WSSERVLET33.diag.cause.1=Ao publicar o wsdl de servi\u00E7o, a localiza\u00E7\u00E3o http \u00E9 submetida a patch com a localiza\u00E7\u00E3o/ponto final implantada usando a transforma\u00E7\u00E3o XSLT. O transformador n\u00E3o p\u00F4de ser criado para fazer a transforma\u00E7\u00E3o. +WSSERVLET33.diag.check.1=Pode ser que um mecanismo de transforma\u00E7\u00E3o que est\u00E1 sendo usado n\u00E3o \u00E9 compat\u00EDvel. Certifique-se de que voc\u00EA est\u00E1 usando o transformador e a vers\u00E3o corretos. +WSSERVLET33.diag.cause.2=Ao publicar o wsdl de servi\u00E7o, a localiza\u00E7\u00E3o http \u00E9 submetida a patch com a localiza\u00E7\u00E3o/ponto final implantada usando a transforma\u00E7\u00E3o XSLT. O transformador n\u00E3o p\u00F4de ser criado para fazer a transforma\u00E7\u00E3o. +WSSERVLET33.diag.check.2=Pode ser que um mecanismo de transforma\u00E7\u00E3o n\u00E3o seja suportado ou n\u00E3o seja compat\u00EDvel. Verifique o arquivo xml do servidor para obter exce\u00E7\u00F5es. + + +exception.transformationFailed=WSSERVLET34: falha na transforma\u00E7\u00E3o : {0} +WSSERVLET34.diag.cause.1=O patch da localiza\u00E7\u00E3o no wsdl falhou ao tentar transformar. +WSSERVLET34.diag.check.1=Verifique o(s) arquivo(s) de log para obter erros/exce\u00E7\u00F5es mais detalhados. + +exception.templateCreationFailed=WSSERVLET35: falha ao criar um objeto do modelo +WSSERVLET35.diag.cause.1=Um modelo de planilha de estilo XSLT \u00E9 criado para o patch de local wsdl usando a transforma\u00E7\u00E3o. Falha na cria\u00E7\u00E3o do modelo. +WSSERVLET35.diag.check.1=Uma exce\u00E7\u00E3o foi gerada durante a cria\u00E7\u00E3o do modelo. Exiba a exce\u00E7\u00E3o e o rastreamento de pilha para obter mais detalhes. + +servlet.html.method=WSSERVLET63: deve usar Post para este tipo de solicita\u00E7\u00E3o +WSSERVLET63.diag.cause.1=As solicita\u00E7\u00F5es de web service devem usar o m\u00E9todo HTTP POST: WSI BP 1.0 +WSSERVLET63.diag.check.1=Certifique-se de que seu cliente HTTP est\u00E1 usando solicita\u00E7\u00F5es POST, n\u00E3o solicita\u00E7\u00F5es GET + + +servlet.faultstring.invalidContentType=WSSERVLET64: Tipo de Conte\u00FAdo Inv\u00E1lido, texto/xml obrigat\u00F3rio +WSSERVLET64.diag.cause.1=As solicita\u00E7\u00F5es de web service devem ser um tipo de conte\u00FAdo texto/xml: WSI BP 1.0 +WSSERVLET64.diag.check.1=Certifique-se de que a solicita\u00E7\u00E3o do cliente est\u00E1 usando texto/xml + +error.implementorFactory.newInstanceFailed=WSSERVLET43: falha ao instanciar o implementador de servi\u00E7o da porta \"{0}\" +WSSERVLET43.diag.cause.1=Falha na instancia\u00E7\u00E3o do web service. +WSSERVLET43.diag.check.1=Certifique-se de que o web service est\u00E1 dispon\u00EDvel e \u00E9 p\u00FAblico. Examine a exce\u00E7\u00E3o para obter mais detalhes + +error.implementorFactory.servantInitFailed=WSSERVLET44: falha ao inicializar o implementador de servi\u00E7o da porta \"{0}\" +WSSERVLET44.diag.cause.1=O web service foi instanciado, no entanto, n\u00E3o p\u00F4de ser inicializado +WSSERVLET44.diag.check.1=Verifique a exce\u00E7\u00E3o para obter mais detalhes. Certifique-se de que os arquivos de configura\u00E7\u00E3o est\u00E3o corretos. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: SOAPAction de Cabe\u00E7alho inv\u00E1lido obrigat\u00F3rio +WSSERVLET65.diag.cause.1=A\u00E7\u00E3o SOAP obrigat\u00F3ria +WSSERVLET65.diag.check.1=Adicione SOAPAction e o valor apropriado + +# {0} - URI +servlet.no.address.available=Nenhum endere\u00E7o dispon\u00EDvel para {0} + +servlet.html.title= Web Services +servlet.html.title2=

    Web Services

    +servlet.html.noInfoAvailable=

    Nenhuma informa\u00E7\u00E3o de contexto de JAX-WS dispon\u00EDvel.

    +servlet.html.columnHeader.portName=Ponto Final +servlet.html.columnHeader.status=Status +servlet.html.columnHeader.information=Informa\u00E7\u00F5es +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    Nome do Servi\u00E7o\:{0}
    Port Name\:{1}
    +servlet.html.information.table=
    Endere\u00E7o\:{0}
    WSDL\:{0}?wsdl
    Classe de implementa\u00E7\u00E3o\:{1}
    +servlet.html.notFound=

    404 N\u00E3o Encontrado: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: nenhuma configura\u00E7\u00E3o especificada +error.implementorFactory.noInputStream=WSSERVLET37: nenhuma configura\u00E7\u00E3o especificada +error.implementorRegistry.unknownName=WSSERVLET38: nome da porta desconhecido: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: n\u00E3o \u00E9 poss\u00EDvel ler a configura\u00E7\u00E3o +error.implementorRegistry.classNotFound=WSSERVLET40: classe n\u00E3o encontrada: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: informa\u00E7\u00F5es de configura\u00E7\u00E3o incompletas +error.implementorRegistry.duplicateName=WSSERVLET42: nome da porta duplicado: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: arquivo n\u00E3o encontrado: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: n\u00E3o \u00E9 poss\u00EDvel ler a configura\u00E7\u00E3o +error.servlet.init.config.parameter.missing=WSSERVLET47: n\u00E3o \u00E9 poss\u00EDvel localizar o par\u00E2metro de configura\u00E7\u00E3o: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: arquivo de configura\u00E7\u00E3o: \"{0}\" n\u00E3o encontrado +# + +error.servlet.noImplementorForPort=WSSERVLET52: nenhum implementador registrado para a porta: {0} +error.servlet.noPortSpecified=WSSERVLET53: nenhuma porta especificada no URL de solicita\u00E7\u00E3o HTTP POST +error.servlet.noResponseWasProduced=WSSERVLET54: nenhuma resposta produzida (erro interno) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: obteve mensagem de solicita\u00E7\u00E3o vazia +info.servlet.initializing=WSSERVLET56: servlet de JAX-WS: inicializar +info.servlet.destroying=WSSERVLET57: servlet de JAX-WS: destruir +# +trace.servlet.requestForPortNamed=WSSERVLET58: obteve solicita\u00E7\u00E3o da porta: {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: tratando solicita\u00E7\u00E3o para implementador: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: obteve resposta do implementador: {0} +trace.servlet.writingFaultResponse=WSSERVLET61: grava\u00E7\u00E3o de resposta com falha +trace.servlet.writingSuccessResponse=WSSERVLET62: grava\u00E7\u00E3o de resposta com sucesso +# +html.nonRootPage.title= Web Service +html.nonRootPage.body1=

    Um Web Service foi instalado neste URL.

    +html.nonRootPage.body2=

    URI de solicita\u00E7\u00E3o inv\u00E1lido.

    Verifique suas informa\u00E7\u00F5es de implanta\u00E7\u00E3o.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Web Service +html.wsdlPage.noWsdl=

    Nenhum documento do WSDL dispon\u00EDvel para publica\u00E7\u00E3o.

    Verifique suas informa\u00E7\u00F5es de implanta\u00E7\u00E3o.

    +html.rootPage.title= Web Service +html.rootPage.body1=

    Um Web Service foi instalado neste URL.

    +html.rootPage.body2a=

    Ele suporta as seguintes portas: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    Este ponto final foi configurado incorretamente. Verifique a localiza\u00E7\u00E3o e o conte\u00FAdo do arquivo de configura\u00E7\u00E3o.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties new file mode 100644 index 00000000000..9a769b5f599 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_CN.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=\u7F3A\u5C11\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26 "{0}" + +listener.parsingFailed=WSSERVLET11: \u65E0\u6CD5\u89E3\u6790\u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser \u65E0\u6CD5\u89E3\u6790 sun-jaxws.xml \u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26 +WSSERVLET11.diag.check.1=\u8BF7\u68C0\u67E5 sun-jaxws.xml \u6587\u4EF6\u4EE5\u786E\u4FDD\u5176\u6B63\u786E\u65E0\u8BEF +WSSERVLET11.diag.cause.2=\u53EF\u80FD\u7F3A\u5C11 sun-jaxws.xml \u8FD0\u884C\u65F6\u90E8\u7F72\u63CF\u8FF0\u7B26 +WSSERVLET11.diag.check.2=\u8BF7\u68C0\u67E5 jaxrpc-ri.xml \u6587\u4EF6\u4EE5\u786E\u4FDD\u5B83\u5B58\u5728\u4E8E war \u6587\u4EF6\u4E2D + + +listener.info.initialize=WSSERVLET12: JAX-WS \u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u6B63\u5728\u521D\u59CB\u5316 +WSSERVLET12.diag.cause.1=\u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u6B63\u5728\u542F\u52A8 +WSSERVLET12.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u542F\u52A8 + +listener.info.destroy=WSSERVLET13: JAX-WS \u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u5DF2\u9500\u6BC1 +WSSERVLET13.diag.cause.1=\u4E0A\u4E0B\u6587\u76D1\u542C\u7A0B\u5E8F\u5DF2\u5173\u95ED +WSSERVLET13.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u5173\u95ED + +servlet.info.initialize=WSSERVLET14: JAX-WS servlet \u6B63\u5728\u521D\u59CB\u5316 +WSSERVLET14.diag.cause.1=Web \u670D\u52A1 servlet \u6B63\u5728\u542F\u52A8\u3002 +WSSERVLET14.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u90E8\u7F72\u3002\u670D\u52A1\u90E8\u7F72\u5B8C\u6210\u3002 + +servlet.info.destroy=WSSERVLET15: JAX-WS servlet \u5DF2\u9500\u6BC1 +WSSERVLET15.diag.cause.1=Web \u670D\u52A1 servlet \u5DF2\u5173\u95ED\u3002 +WSSERVLET15.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u53D6\u6D88\u90E8\u7F72\u3002\u53D6\u6D88\u90E8\u7F72\u5B8C\u6210\u3002 + +servlet.warning.missingContextInformation=WSSERVLET16: \u7F3A\u5C11\u4E0A\u4E0B\u6587\u4FE1\u606F +WSSERVLET16.diag.cause.1=war \u6587\u4EF6\u4E2D\u53EF\u80FD\u7F3A\u5C11 jaxrpc-ri.xml \u6587\u4EF6 +WSSERVLET16.diag.check.1=\u89E3\u538B\u7F29\u670D\u52A1 war \u6587\u4EF6; \u68C0\u67E5 jaxrpc-ri-runtime.xml \u6587\u4EF6\u662F\u5426\u5B58\u5728 + + +servlet.warning.duplicateEndpointName=WSSERVLET17: \u7AEF\u70B9\u540D\u79F0\u91CD\u590D +WSSERVLET17.diag.cause.1=\u5728 jaxrpc-ri.xml \u8FD0\u884C\u65F6\u63CF\u8FF0\u7B26\u4E2D\u627E\u5230\u540C\u540D\u7684\u4E24\u4E2A\u6216\u66F4\u591A\u7AEF\u70B9 +WSSERVLET17.diag.check.1=\u8BF7\u6CE8\u610F, \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4\u670D\u52A1\u90E8\u7F72\u51FA\u73B0\u95EE\u9898 + + +servlet.info.emptyRequestMessage=WSSERVLET18: \u6536\u5230\u7A7A\u8BF7\u6C42\u6D88\u606F +WSSERVLET18.diag.cause.1=\u5BA2\u6237\u673A\u53D1\u9001\u7684\u6D88\u606F\u4E3A\u7A7A +WSSERVLET18.diag.check.1=\u8FD9\u53EF\u80FD\u662F\u4E5F\u53EF\u80FD\u4E0D\u662F\u6709\u610F\u7684\u3002\u5982\u679C\u4E0D\u662F\u6709\u610F\u7684, \u8BF7\u68C0\u67E5\u5BA2\u6237\u673A\u7A0B\u5E8F\u662F\u5426\u51FA\u9519\u3002 + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: \u6536\u5230\u7AEF\u70B9\u8BF7\u6C42: {0} +WSSERVLET19.diag.cause.1=\u6B64\u7AEF\u70B9\u7684\u5BA2\u6237\u673A\u8BF7\u6C42\u5DF2\u5230\u8FBE +WSSERVLET19.diag.check.1=\u4EC5\u4FE1\u606F\u6027\u6D88\u606F\u3002\u6B63\u5E38\u64CD\u4F5C\u3002 + +servlet.error.noImplementorForEndpoint=WSSERVLET20: \u6CA1\u6709\u7AEF\u70B9\u7684\u5B9E\u73B0\u65B9: {0} +WSSERVLET20.diag.cause.1=\u627E\u4E0D\u5230\u6B64\u670D\u52A1\u7684\u5B9E\u73B0 +WSSERVLET20.diag.check.1=\u89E3\u538B\u7F29 war, \u662F\u5426\u627E\u5230\u8054\u63A5\u548C\u4E32\u884C\u5668\u7C7B? + +servlet.trace.invokingImplementor=WSSERVLET21: \u8C03\u7528\u5B9E\u73B0\u65B9: {0} +WSSERVLET21.diag.cause.1=\u6B63\u5728\u8C03\u7528 Web \u670D\u52A1 +WSSERVLET21.diag.check.1=Web \u670D\u52A1\u6B63\u5E38\u8C03\u7528\u3002 + +servlet.error.noEndpointSpecified=WSSERVLET22: \u672A\u6307\u5B9A\u7AEF\u70B9 +WSSERVLET22.diag.cause.1=\u5728\u6CA1\u6709\u7AEF\u70B9\u7684\u60C5\u51B5\u4E0B\u8C03\u7528\u4E86\u8BF7\u6C42 +WSSERVLET22.diag.check.1=\u4F7F\u7528 stub.setTargetEndpoint \u5C5E\u6027\u8BBE\u7F6E\u7AEF\u70B9 + +servlet.error.noResponseMessage=WSSERVLET23: \u65E0\u54CD\u5E94\u6D88\u606F +WSSERVLET23.diag.cause.1=\u8BF7\u6C42\u672A\u4ECE\u670D\u52A1\u751F\u6210\u54CD\u5E94 +WSSERVLET23.diag.check.1=\u5982\u679C\u9700\u8981\u54CD\u5E94, \u8BF7\u68C0\u67E5\u662F\u5426\u786E\u5B9E\u53D1\u9001\u4E86\u8BF7\u6C42\u6D88\u606F +WSSERVLET23.diag.check.2=\u8BE5\u8BF7\u6C42\u7684\u683C\u5F0F\u53EF\u80FD\u4E0D\u6B63\u786E, \u670D\u52A1\u5DF2\u63A5\u53D7\u8BE5\u8BF7\u6C42, \u4F46\u672A\u751F\u6210\u54CD\u5E94 + +servlet.trace.writingFaultResponse=WSSERVLET24: \u5199\u5165\u6545\u969C\u54CD\u5E94 +WSSERVLET24.diag.cause.1=\u6B63\u5728\u5C06 SOAPFault \u6D88\u606F\u8FD4\u56DE\u7ED9\u5BA2\u6237\u673A\u3002 +WSSERVLET24.diag.check.1=\u5DF2\u8BB0\u5F55\u8DDF\u8E2A\u6D88\u606F\u6545\u969C\u3002 + +servlet.trace.writingSuccessResponse=WSSERVLET25: \u5199\u5165\u6210\u529F\u54CD\u5E94 +WSSERVLET25.diag.cause.1=\u6B63\u5728\u5C06 SOAPMessage \u6D88\u606F\u8FD4\u56DE\u7ED9\u5BA2\u6237\u673A +WSSERVLET25.diag.check.1=\u8DDF\u8E2A\u6D88\u606F, \u6B63\u5E38\u54CD\u5E94\u3002 + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \u7AEF\u70B9\u4E2D\u7684 URL \u6A21\u5F0F\u91CD\u590D: {0} +WSSERVLET26.diag.cause.1=\u7AEF\u70B9 URL \u91CD\u590D +WSSERVLET26.diag.check.1=\u8FD9\u53EF\u80FD\u4F1A\u4EA7\u751F\u95EE\u9898, \u8BF7\u5220\u9664\u91CD\u590D\u7684\u7AEF\u70B9 + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \u7AEF\u70B9\u4E2D\u5305\u542B\u4E0D\u652F\u6301\u7684\u9690\u5F0F URL \u6A21\u5F0F: {0} +WSSERVLET27.diag.cause.1=\u6B64\u53D1\u884C\u7248\u4E2D\u4E0D\u652F\u6301\u9690\u5F0F URL +WSSERVLET27.diag.check.1=\u5220\u9664\u9690\u5F0F URL + +servlet.faultstring.missingPort=WSSERVLET28: \u7F3A\u5C11\u7AEF\u53E3\u4FE1\u606F +WSSERVLET28.diag.cause.1=\u76EE\u6807\u7AEF\u70B9\u4E3A\u7A7A\u503C +WSSERVLET28.diag.check.1=\u4F7F\u7528 stub.setTargetEndpoint() \u5C5E\u6027\u8BBE\u7F6E\u76EE\u6807\u7AEF\u70B9\u3002 + +servlet.faultstring.portNotFound=WSSERVLET29: \u672A\u627E\u5230\u7AEF\u53E3 ({0}) +WSSERVLET29.diag.cause.1=\u6307\u5B9A\u4E86\u7AEF\u53E3, \u4F46\u672A\u627E\u5230\u76F8\u5E94\u7684\u670D\u52A1\u5B9E\u73B0 +WSSERVLET29.diag.check.1=\u8BE5\u7AEF\u53E3\u662F\u5426\u6709\u6548? \u8BF7\u89E3\u538B\u7F29 war \u6587\u4EF6\u5E76\u786E\u4FDD\u8054\u63A5\u548C\u4E32\u884C\u5668\u5B58\u5728 + +servlet.faultstring.internalServerError=WSSERVLET30: \u5185\u90E8\u670D\u52A1\u5668\u9519\u8BEF ({0}) +WSSERVLET30.diag.cause.1=\u5904\u7406\u8BF7\u6C42\u65F6\u51FA\u73B0\u670D\u52A1\u5668\u9519\u8BEF +WSSERVLET30.diag.check.1=\u8FD9\u6709\u8BB8\u591A\u539F\u56E0\u3002\u6709\u5173\u5F02\u5E38\u9519\u8BEF, \u8BF7\u67E5\u770B\u670D\u52A1\u5668\u65E5\u5FD7\u6587\u4EF6\u3002 + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \u4ECE\u5148\u524D\u7684\u5F02\u5E38\u9519\u8BEF\u6062\u590D\u65F6\u6355\u83B7\u5230\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF: {0} +WSSERVLET51.diag.cause.1=\u8BF7\u6C42\u7684\u670D\u52A1\u5904\u7406\u4EA7\u751F\u4E86\u5F02\u5E38\u9519\u8BEF; \u5C1D\u8BD5\u8FD4\u56DE SOAPPFaultMessage \u65F6, \u518D\u6B21\u4EA7\u751F\u4E86\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF +WSSERVLET51.diag.check.1=\u6709\u5173\u5F02\u5E38\u9519\u8BEF\u4FE1\u606F, \u8BF7\u67E5\u770B server.xml \u65E5\u5FD7\u6587\u4EF6 + +error.servlet.caughtThrowable=WSSERVLET49: \u6355\u83B7\u5230\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF: {0} +WSSERVLET49.diag.cause.1=\u8BF7\u6C42\u7684\u670D\u52A1\u5904\u7406\u4EA7\u751F\u4E86\u5F02\u5E38\u9519\u8BEF; \u5C1D\u8BD5\u8FD4\u56DE SOAPFaultMessage \u65F6, \u518D\u6B21\u4EA7\u751F\u4E86\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF +WSSERVLET49.diag.check.1=\u6709\u5173\u5F02\u5E38\u9519\u8BEF\u4FE1\u606F, \u8BF7\u67E5\u770B server.xml \u65E5\u5FD7\u6587\u4EF6 + +error.servlet.caughtThrowableInInit=WSSERVLET50: servlet \u521D\u59CB\u5316\u671F\u95F4\u6355\u83B7\u5230\u53EF\u629B\u51FA\u7684\u5F02\u5E38\u9519\u8BEF: {0} +WSSERVLET50.diag.cause.1=WS \u8FD0\u884C\u65F6 sun-jaxws.xml \u6216 web.xml \u53EF\u80FD\u4E0D\u6B63\u786E +WSSERVLET50.diag.check.1=\u786E\u4FDD\u670D\u52A1 war \u6587\u4EF6\u4E2D\u7684 sun-jaxws.xml \u548C web.xml \u6B63\u786E +WSSERVLET50.diag.cause.2=\u5E94\u7528\u7A0B\u5E8F\u670D\u52A1\u5668\u90E8\u7F72\u63CF\u8FF0\u7B26\u53EF\u80FD\u4E0D\u6B63\u786E +WSSERVLET50.diag.check.2=\u786E\u4FDD\u670D\u52A1 war \u6587\u4EF6\u4E2D\u7684\u5E94\u7528\u7A0B\u5E8F\u670D\u52A1\u5668\u90E8\u7F72\u63CF\u8FF0\u7B26\u6B63\u786E +WSSERVLET50.diag.cause.3=\u53EF\u80FD\u5B58\u5728\u67D0\u4E9B\u5E94\u7528\u7A0B\u5E8F\u670D\u52A1\u5668\u521D\u59CB\u5316\u95EE\u9898 +WSSERVLET50.diag.check.3=\u6709\u5173\u6545\u969C, \u8BF7\u67E5\u770B\u57DF\u76EE\u5F55\u4E2D\u7684 server.xml \u6587\u4EF6 + +publisher.info.applyingTransformation=WSSERVLET31: \u4F7F\u7528\u5B9E\u9645\u5730\u5740\u5E94\u7528\u8F6C\u6362: {0} +WSSERVLET31.diag.cause.1=\u6B63\u5728\u5E94\u7528\u8F6C\u6362 +WSSERVLET31.diag.check.1=\u6B63\u5E38\u64CD\u4F5C + +publisher.info.generatingWSDL=WSSERVLET32: \u4E3A\u7AEF\u70B9\u751F\u6210 WSDL: {0} +WSSERVLET32.diag.cause.1=\u6B63\u5728\u751F\u6210 WSDL +WSSERVLET32.diag.check.1=\u6B63\u5E38\u64CD\u4F5C\u3002 + +exception.cannotCreateTransformer=WSSERVLET33: \u65E0\u6CD5\u521B\u5EFA\u8F6C\u6362\u5668 +WSSERVLET33.diag.cause.1=\u53D1\u5E03\u670D\u52A1 wsdl \u65F6, \u5C06\u5728 XSLT \u8F6C\u6362\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u5DF2\u90E8\u7F72\u7684\u4F4D\u7F6E/\u7AEF\u70B9\u5BF9 http \u4F4D\u7F6E\u6253\u8865\u4E01\u3002\u65E0\u6CD5\u521B\u5EFA\u8F6C\u6362\u5668\u6765\u6267\u884C\u6B64\u8F6C\u6362\u3002 +WSSERVLET33.diag.check.1=\u6240\u4F7F\u7528\u7684\u8F6C\u6362\u5F15\u64CE\u53EF\u80FD\u4E0D\u517C\u5BB9\u3002\u8BF7\u786E\u4FDD\u4F7F\u7528\u7684\u662F\u6B63\u786E\u7684\u8F6C\u6362\u5668\u548C\u7248\u672C\u3002 +WSSERVLET33.diag.cause.2=\u53D1\u5E03\u670D\u52A1 wsdl \u65F6, \u5C06\u5728 XSLT \u8F6C\u6362\u8FC7\u7A0B\u4E2D\u4F7F\u7528\u5DF2\u90E8\u7F72\u7684\u4F4D\u7F6E/\u7AEF\u70B9\u5BF9 http \u4F4D\u7F6E\u6253\u8865\u4E01\u3002\u65E0\u6CD5\u521B\u5EFA\u8F6C\u6362\u5668\u6765\u6267\u884C\u6B64\u8F6C\u6362\u3002 +WSSERVLET33.diag.check.2=\u8F6C\u6362\u5F15\u64CE\u53EF\u80FD\u4E0D\u53D7\u652F\u6301\u6216\u4E0D\u517C\u5BB9\u3002\u6709\u5173\u5F02\u5E38\u9519\u8BEF, \u8BF7\u67E5\u770B server.xml \u6587\u4EF6\u3002 + + +exception.transformationFailed=WSSERVLET34: \u8F6C\u6362\u5931\u8D25: {0} +WSSERVLET34.diag.cause.1=\u5728\u5C1D\u8BD5\u8F6C\u6362\u65F6, \u672A\u80FD\u5BF9 wsdl \u8FDB\u884C\u4F4D\u7F6E\u6253\u8865\u4E01\u3002 +WSSERVLET34.diag.check.1=\u6709\u5173\u8BE6\u7EC6\u9519\u8BEF/\u5F02\u5E38\u9519\u8BEF, \u8BF7\u67E5\u770B\u65E5\u5FD7\u6587\u4EF6\u3002 + +exception.templateCreationFailed=WSSERVLET35: \u65E0\u6CD5\u521B\u5EFA\u6A21\u677F\u5BF9\u8C61 +WSSERVLET35.diag.cause.1=\u4F7F\u7528\u8F6C\u6362\u4E3A wsdl \u4F4D\u7F6E\u6253\u8865\u4E01\u521B\u5EFA XSLT \u6837\u5F0F\u8868\u6A21\u677F\u3002\u672A\u80FD\u521B\u5EFA\u6A21\u677F\u3002 +WSSERVLET35.diag.check.1=\u521B\u5EFA\u6A21\u677F\u671F\u95F4\u629B\u51FA\u5F02\u5E38\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u67E5\u770B\u5F02\u5E38\u9519\u8BEF\u548C\u5806\u6808\u8DDF\u8E2A\u3002 + +servlet.html.method=WSSERVLET63: \u5FC5\u987B\u5BF9\u6B64\u7C7B\u578B\u7684\u8BF7\u6C42\u4F7F\u7528 Post +WSSERVLET63.diag.cause.1=Web \u670D\u52A1\u8BF7\u6C42\u5FC5\u987B\u4F7F\u7528 HTTP POST \u65B9\u6CD5: WSI BP 1.0 +WSSERVLET63.diag.check.1=\u786E\u4FDD HTTP \u5BA2\u6237\u673A\u4F7F\u7528\u7684\u662F POST \u8BF7\u6C42, \u800C\u4E0D\u662F GET \u8BF7\u6C42 + + +servlet.faultstring.invalidContentType=WSSERVLET64: Content-Type \u65E0\u6548, \u9700\u8981 text/xml +WSSERVLET64.diag.cause.1=Web \u670D\u52A1\u8BF7\u6C42\u5FC5\u987B\u662F\u5185\u5BB9\u7C7B\u578B text/xml: WSI BP 1.0 +WSSERVLET64.diag.check.1=\u786E\u4FDD\u5BA2\u6237\u673A\u8BF7\u6C42\u4F7F\u7528\u7684\u662F text/xml + +error.implementorFactory.newInstanceFailed=WSSERVLET43: \u65E0\u6CD5\u5B9E\u4F8B\u5316\u7AEF\u53E3 \"{0}\" \u7684\u670D\u52A1\u5B9E\u73B0\u65B9 +WSSERVLET43.diag.cause.1=Web \u670D\u52A1\u5B9E\u4F8B\u5316\u5931\u8D25\u3002 +WSSERVLET43.diag.check.1=\u786E\u4FDD Web \u670D\u52A1\u662F\u53EF\u7528\u548C\u516C\u5171\u7684\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u67E5\u770B\u5F02\u5E38\u9519\u8BEF + +error.implementorFactory.servantInitFailed=WSSERVLET44: \u65E0\u6CD5\u521D\u59CB\u5316\u7AEF\u53E3 \"{0}\" \u7684\u670D\u52A1\u5B9E\u73B0\u65B9 +WSSERVLET44.diag.cause.1=Web \u670D\u52A1\u5DF2\u5B9E\u4F8B\u5316, \u4F46\u65E0\u6CD5\u521D\u59CB\u5316 +WSSERVLET44.diag.check.1=\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u67E5\u770B\u5F02\u5E38\u9519\u8BEF\u3002\u786E\u4FDD\u6240\u6709\u914D\u7F6E\u6587\u4EF6\u90FD\u6B63\u786E\u3002 + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: \u6240\u9700\u7684\u6807\u5934 SOAPAction \u65E0\u6548 +WSSERVLET65.diag.cause.1=\u9700\u8981 SOAP \u64CD\u4F5C +WSSERVLET65.diag.check.1=\u6DFB\u52A0 SOAPAction \u53CA\u9002\u5F53\u7684\u503C + +# {0} - URI +servlet.no.address.available=\u6CA1\u6709\u53EF\u7528\u4E8E{0}\u7684\u5730\u5740 + +servlet.html.title= Web \u670D\u52A1 +servlet.html.title2=

    Web \u670D\u52A1

    +servlet.html.noInfoAvailable=

    \u6CA1\u6709\u53EF\u7528\u7684 JAX-WS \u4E0A\u4E0B\u6587\u4FE1\u606F\u3002

    +servlet.html.columnHeader.portName=\u7AEF\u70B9 +servlet.html.columnHeader.status=\u72B6\u6001 +servlet.html.columnHeader.information=\u4FE1\u606F +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    \u670D\u52A1\u540D\:{0}
    \u7AEF\u53E3\u540D\:{1}
    +servlet.html.information.table=
    \u5730\u5740\:{0}
    WSDL\:{0}?wsdl
    \u5B9E\u73B0\u7C7B\:{1}
    +servlet.html.notFound=

    404 \u672A\u627E\u5230: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: \u672A\u6307\u5B9A\u914D\u7F6E +error.implementorFactory.noInputStream=WSSERVLET37: \u672A\u6307\u5B9A\u914D\u7F6E +error.implementorRegistry.unknownName=WSSERVLET38: \u672A\u77E5\u7AEF\u53E3\u540D: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \u65E0\u6CD5\u8BFB\u53D6\u914D\u7F6E +error.implementorRegistry.classNotFound=WSSERVLET40: \u672A\u627E\u5230\u7C7B: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: \u914D\u7F6E\u4FE1\u606F\u4E0D\u5B8C\u6574 +error.implementorRegistry.duplicateName=WSSERVLET42: \u7AEF\u53E3\u540D\u91CD\u590D: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: \u672A\u627E\u5230\u6587\u4EF6: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \u65E0\u6CD5\u8BFB\u53D6\u914D\u7F6E +error.servlet.init.config.parameter.missing=WSSERVLET47: \u627E\u4E0D\u5230\u914D\u7F6E\u53C2\u6570: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: \u672A\u627E\u5230\u914D\u7F6E\u6587\u4EF6: \"{0}\" +# + +error.servlet.noImplementorForPort=WSSERVLET52: \u6CA1\u6709\u4E3A\u7AEF\u53E3\u6CE8\u518C\u5B9E\u73B0\u65B9: {0} +error.servlet.noPortSpecified=WSSERVLET53: \u672A\u5728 HTTP POST \u8BF7\u6C42 URL \u4E2D\u6307\u5B9A\u7AEF\u53E3 +error.servlet.noResponseWasProduced=WSSERVLET54: \u672A\u751F\u6210\u54CD\u5E94 (\u5185\u90E8\u9519\u8BEF) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: \u6536\u5230\u7A7A\u8BF7\u6C42\u6D88\u606F +info.servlet.initializing=WSSERVLET56: JAX-WS servlet: \u521D\u59CB\u5316 +info.servlet.destroying=WSSERVLET57: JAX-WS servlet: \u9500\u6BC1 +# +trace.servlet.requestForPortNamed=WSSERVLET58: \u6536\u5230\u7AEF\u53E3\u7684\u8BF7\u6C42: {0} +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \u5C06\u8BF7\u6C42\u8F6C\u4EA4\u7ED9\u5B9E\u73B0\u65B9: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: \u4ECE\u5B9E\u73B0\u65B9\u6536\u5230\u54CD\u5E94: {0} +trace.servlet.writingFaultResponse=WSSERVLET61: \u5199\u5165\u6545\u969C\u54CD\u5E94 +trace.servlet.writingSuccessResponse=WSSERVLET62: \u5199\u5165\u6210\u529F\u54CD\u5E94 +# +html.nonRootPage.title= Web \u670D\u52A1 +html.nonRootPage.body1=

    Web \u670D\u52A1\u5B89\u88C5\u5728\u6B64 URL \u4E2D\u3002

    +html.nonRootPage.body2=

    \u8BF7\u6C42 URI \u65E0\u6548\u3002

    \u8BF7\u67E5\u770B\u90E8\u7F72\u4FE1\u606F\u3002

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Web \u670D\u52A1 +html.wsdlPage.noWsdl=

    \u6CA1\u6709\u53EF\u4F9B\u53D1\u5E03\u7684 WSDL \u6587\u6863\u3002

    \u8BF7\u67E5\u770B\u90E8\u7F72\u4FE1\u606F\u3002

    +html.rootPage.title= Web \u670D\u52A1 +html.rootPage.body1=

    Web \u670D\u52A1\u5B89\u88C5\u5728\u6B64 URL \u4E2D\u3002

    +html.rootPage.body2a=

    \u5B83\u652F\u6301\u4EE5\u4E0B\u7AEF\u53E3: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    \u6B64\u7AEF\u70B9\u7684\u914D\u7F6E\u4E0D\u6B63\u786E\u3002\u8BF7\u67E5\u770B\u914D\u7F6E\u6587\u4EF6\u7684\u4F4D\u7F6E\u548C\u5185\u5BB9\u3002

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties new file mode 100644 index 00000000000..7f02495d8f5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/wsservlet_zh_TW.properties @@ -0,0 +1,243 @@ +# +# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +no.sunjaxws.xml=\u907A\u6F0F\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 "{0}" + +listener.parsingFailed=WSSERVLET11: \u7121\u6CD5\u5256\u6790\u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143: {0} +JAXRPCSERVLET11.diag.cause.1=WSRuntimeInfoParser \u7121\u6CD5\u5256\u6790 sun-jaxws.xml \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143 +WSSERVLET11.diag.check.1=\u8ACB\u6AA2\u67E5 sun-jaxws.xml \u6A94\u6848, \u78BA\u5B9A\u8A72\u6A94\u6848\u6B63\u78BA +WSSERVLET11.diag.cause.2=\u53EF\u80FD\u907A\u6F0F sun-jaxws.xml \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u5EFA\u7F6E\u63CF\u8FF0\u5143 +WSSERVLET11.diag.check.2=\u8ACB\u6AA2\u67E5 jaxrpc-ri.xml \u6A94\u6848, \u78BA\u8A8D\u5176\u5B58\u5728 WAR \u6A94\u6848\u4E2D + + +listener.info.initialize=WSSERVLET12: \u6B63\u5728\u8D77\u59CB JAX-WS \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668 +WSSERVLET12.diag.cause.1=\u6B63\u5728\u555F\u52D5\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668 +WSSERVLET12.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u555F\u52D5 + +listener.info.destroy=WSSERVLET13: \u5DF2\u6BC0\u68C4 JAX-WS \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668 +WSSERVLET13.diag.cause.1=\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u76E3\u807D\u5668\u95DC\u9589 +WSSERVLET13.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u95DC\u9589 + +servlet.info.initialize=WSSERVLET14: \u6B63\u5728\u8D77\u59CB JAX-WS Servlet +WSSERVLET14.diag.cause.1=Web \u670D\u52D9 Servlet \u6B63\u5728\u555F\u52D5. +WSSERVLET14.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u5EFA\u7F6E. \u670D\u52D9\u5EFA\u7F6E\u5B8C\u6210. + +servlet.info.destroy=WSSERVLET15: \u5DF2\u6BC0\u68C4 JAX-WS Servlet +WSSERVLET15.diag.cause.1=Web \u670D\u52D9 Servlet \u95DC\u9589. +WSSERVLET15.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u53D6\u6D88\u5EFA\u7F6E. \u53D6\u6D88\u5EFA\u7F6E\u5B8C\u6210. + +servlet.warning.missingContextInformation=WSSERVLET16: \u907A\u6F0F\u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u8CC7\u8A0A +WSSERVLET16.diag.cause.1=WAR \u6A94\u6848\u4E2D\u53EF\u80FD\u907A\u6F0F jaxrpc-ri.xml \u6A94\u6848 +WSSERVLET16.diag.check.1=\u89E3\u58D3\u7E2E\u670D\u52D9 WAR \u6A94\u6848; \u67E5\u770B jaxrpc-ri-runtime.xml \u6A94\u6848\u662F\u5426\u5B58\u5728 + + +servlet.warning.duplicateEndpointName=WSSERVLET17: \u7AEF\u9EDE\u540D\u7A31\u91CD\u8907 +WSSERVLET17.diag.cause.1=\u5728 jaxrpc-ri.xml \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C\u63CF\u8FF0\u5143\u4E2D\u767C\u73FE\u5169\u500B\u6216\u66F4\u591A\u7AEF\u9EDE\u5177\u6709\u76F8\u540C\u7684\u540D\u7A31 +WSSERVLET17.diag.check.1=\u8ACB\u6CE8\u610F, \u9019\u53EF\u80FD\u6703\u5C0E\u81F4\u670D\u52D9\u5EFA\u7F6E\u767C\u751F\u554F\u984C + + +servlet.info.emptyRequestMessage=WSSERVLET18: \u6536\u5230\u7A7A\u767D\u7684\u8981\u6C42\u8A0A\u606F +WSSERVLET18.diag.cause.1=\u5F9E\u5C6C\u7AEF\u50B3\u9001\u7684\u8A0A\u606F\u70BA\u7A7A\u767D +WSSERVLET18.diag.check.1=\u9019\u53EF\u80FD\u6709\u7279\u5225\u76EE\u7684. \u82E5\u4E0D\u662F, \u8ACB\u6AA2\u67E5\u5F9E\u5C6C\u7AEF\u7A0B\u5F0F\u662F\u5426\u767C\u751F\u932F\u8AA4. + +servlet.trace.gotRequestForEndpoint=WSSERVLET19: \u6536\u5230\u7AEF\u9EDE: {0} \u7684\u8981\u6C42 +WSSERVLET19.diag.cause.1=\u6B64\u7AEF\u9EDE\u7684\u5F9E\u5C6C\u7AEF\u8981\u6C42\u5DF2\u5230\u9054 +WSSERVLET19.diag.check.1=\u50C5\u63D0\u4F9B\u8CC7\u8A0A\u8A0A\u606F. \u6B63\u5E38\u4F5C\u696D. + +servlet.error.noImplementorForEndpoint=WSSERVLET20: \u7AEF\u9EDE: {0} \u6C92\u6709\u5BE6\u4F5C\u9805 +WSSERVLET20.diag.cause.1=\u627E\u4E0D\u5230\u6B64\u670D\u52D9\u7684\u5BE6\u884C +WSSERVLET20.diag.check.1=\u8ACB\u89E3\u58D3\u7E2E WAR, \u662F\u5426\u627E\u5230 Tie \u8207 Serializer \u985E\u5225? + +servlet.trace.invokingImplementor=WSSERVLET21: \u6B63\u5728\u547C\u53EB\u5BE6\u4F5C\u9805: {0} +WSSERVLET21.diag.cause.1=\u6B63\u5728\u547C\u53EB\u6B64 Web \u670D\u52D9 +WSSERVLET21.diag.check.1=\u4E00\u822C Web \u670D\u52D9\u547C\u53EB. + +servlet.error.noEndpointSpecified=WSSERVLET22: \u672A\u6307\u5B9A\u7AEF\u9EDE +WSSERVLET22.diag.cause.1=\u5DF2\u547C\u53EB\u8981\u6C42, \u4F46\u6C92\u6709\u7AEF\u9EDE +WSSERVLET22.diag.check.1=\u8ACB\u4F7F\u7528 stub.setTargetEndpoint \u7279\u6027\u8A2D\u5B9A\u7AEF\u9EDE + +servlet.error.noResponseMessage=WSSERVLET23: \u6C92\u6709\u56DE\u61C9\u8A0A\u606F +WSSERVLET23.diag.cause.1=\u8981\u6C42\u672A\u7522\u751F\u4F86\u81EA\u670D\u52D9\u7684\u56DE\u61C9 +WSSERVLET23.diag.check.1=\u82E5\u9810\u671F\u61C9\u6709\u56DE\u61C9, \u8ACB\u6AA2\u67E5\u662F\u5426\u771F\u7684\u50B3\u9001\u4E86\u8981\u6C42\u8A0A\u606F +WSSERVLET23.diag.check.2=\u8981\u6C42\u7684\u683C\u5F0F\u53EF\u80FD\u932F\u8AA4, \u4E26\u4E14\u670D\u52D9\u5DF2\u63A5\u53D7\u8981\u6C42, \u4F46\u4E26\u672A\u7522\u751F\u56DE\u61C9 + +servlet.trace.writingFaultResponse=WSSERVLET24: \u6B63\u5728\u5BEB\u5165\u932F\u8AA4\u56DE\u61C9 +WSSERVLET24.diag.cause.1=\u6B63\u5728\u5C07 SOAPFault \u8A0A\u606F\u50B3\u56DE\u5F9E\u5C6C\u7AEF. +WSSERVLET24.diag.check.1=\u5DF2\u8A18\u9304\u8FFD\u8E64\u8A0A\u606F\u932F\u8AA4. + +servlet.trace.writingSuccessResponse=WSSERVLET25: \u6B63\u5728\u5BEB\u5165\u6210\u529F\u56DE\u61C9 +WSSERVLET25.diag.cause.1=\u6B63\u5728\u5C07 SOAPMessage \u56DE\u61C9\u50B3\u56DE\u5F9E\u5C6C\u7AEF +WSSERVLET25.diag.check.1=\u8FFD\u8E64\u8A0A\u606F, \u4E00\u822C\u56DE\u61C9. + +servlet.warning.duplicateEndpointUrlPattern=WSSERVLET26: \u7AEF\u9EDE : {0} \u4E2D\u6709\u91CD\u8907\u7684 URL \u6A23\u5F0F +WSSERVLET26.diag.cause.1=\u7AEF\u9EDE URL \u91CD\u8907 +WSSERVLET26.diag.check.1=\u9019\u6A23\u53EF\u80FD\u6703\u5C0E\u81F4\u554F\u984C, \u8ACB\u79FB\u9664\u91CD\u8907\u7684\u7AEF\u9EDE + +servlet.warning.ignoringImplicitUrlPattern=WSSERVLET27: \u7AEF\u9EDE: {0} \u4E2D\u6709\u4E0D\u652F\u63F4\u7684\u96B1\u542B URL \u6A23\u5F0F +WSSERVLET27.diag.cause.1=\u6B64\u7248\u672C\u4E0D\u652F\u63F4\u96B1\u542B\u7684 URL +WSSERVLET27.diag.check.1=\u8ACB\u79FB\u9664\u96B1\u542B\u7684 URL + +servlet.faultstring.missingPort=WSSERVLET28: \u907A\u6F0F\u9023\u63A5\u57E0\u8CC7\u8A0A +WSSERVLET28.diag.cause.1=\u76EE\u6A19\u7AEF\u9EDE\u70BA\u7A7A\u503C +WSSERVLET28.diag.check.1=\u8ACB\u4F7F\u7528 stub.setTargetEndpoint() \u7279\u6027\u8A2D\u5B9A\u76EE\u6A19\u7AEF\u9EDE + +servlet.faultstring.portNotFound=WSSERVLET29: \u627E\u4E0D\u5230\u9023\u63A5\u57E0 ({0}) +WSSERVLET29.diag.cause.1=\u5DF2\u6307\u5B9A\u9023\u63A5\u57E0, \u4F46\u627E\u4E0D\u5230\u5C0D\u61C9\u7684\u670D\u52D9\u5BE6\u884C +WSSERVLET29.diag.check.1=\u9023\u63A5\u57E0\u662F\u5426\u6709\u6548? \u8ACB\u89E3\u58D3\u7E2E WAR \u6A94\u6848, \u4E26\u78BA\u8A8D Tie \u8207 Serializer \u5B58\u5728 + +servlet.faultstring.internalServerError=WSSERVLET30: \u5167\u90E8\u4F3A\u670D\u5668\u932F\u8AA4 ({0}) +WSSERVLET30.diag.cause.1=\u8655\u7406\u8981\u6C42\u6642\u767C\u751F\u4F3A\u670D\u5668\u932F\u8AA4 +WSSERVLET30.diag.check.1=\u9019\u53EF\u80FD\u662F\u56E0\u70BA\u67D0\u4E9B\u539F\u56E0\u6240\u5C0E\u81F4. \u8ACB\u67E5\u770B\u4F3A\u670D\u5668\u65E5\u8A8C\u6A94\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1. + +error.servlet.caughtThrowableWhileRecovering=WSSERVLET51: \u5F9E\u5148\u524D\u7684\u7570\u5E38\u72C0\u6CC1: {0} \u5FA9\u539F\u6642\u767C\u51FA Throwable +WSSERVLET51.diag.cause.1=\u8981\u6C42\u7684\u670D\u52D9\u8655\u7406\u7522\u751F\u7570\u5E38\u72C0\u6CC1; \u5617\u8A66\u50B3\u56DE SOAPPFaultMessage \u6642, \u53C8\u518D\u5EA6\u7522\u751F Throwable +WSSERVLET51.diag.check.1=\u8ACB\u67E5\u770B server.xml \u65E5\u8A8C\u6A94\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1\u8CC7\u8A0A + +error.servlet.caughtThrowable=WSSERVLET49: \u767C\u751F Throwable: {0} +WSSERVLET49.diag.cause.1=\u8981\u6C42\u7684\u670D\u52D9\u8655\u7406\u7522\u751F\u7570\u5E38\u72C0\u6CC1; \u5617\u8A66\u50B3\u56DE SOAPFaultMessage \u6642, \u53C8\u518D\u5EA6\u7522\u751F Throwable +WSSERVLET49.diag.check.1=\u8ACB\u67E5\u770B server.xml \u65E5\u8A8C\u6A94\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1\u8CC7\u8A0A + +error.servlet.caughtThrowableInInit=WSSERVLET50: \u521D\u59CB\u5316 Servlet \u6642\u767C\u751F Throwable: {0} +WSSERVLET50.diag.cause.1=WS \u7A0B\u5F0F\u5BE6\u969B\u57F7\u884C sun-jaxws.xml \u6216 web.xml \u53EF\u80FD\u4E0D\u6B63\u78BA +WSSERVLET50.diag.check.1=\u8ACB\u78BA\u8A8D\u670D\u52D9 WAR \u6A94\u6848\u4E2D\u7684 sun-jaxws.xml \u53CA web.xml \u662F\u5426\u6B63\u78BA +WSSERVLET50.diag.cause.2=\u61C9\u7528\u7A0B\u5F0F\u4F3A\u670D\u5668\u5EFA\u7F6E\u63CF\u8FF0\u5143\u53EF\u80FD\u4E0D\u6B63\u78BA +WSSERVLET50.diag.check.2=\u8ACB\u78BA\u8A8D\u670D\u52D9 WAR \u6A94\u6848\u4E2D\u7684\u61C9\u7528\u7A0B\u5F0F\u4F3A\u670D\u5668\u5EFA\u7F6E\u63CF\u8FF0\u5143\u662F\u5426\u6B63\u78BA +WSSERVLET50.diag.cause.3=\u53EF\u80FD\u767C\u751F\u67D0\u4E9B\u61C9\u7528\u7A0B\u5F0F\u4F3A\u670D\u5668\u521D\u59CB\u5316\u554F\u984C +WSSERVLET50.diag.check.3=\u8ACB\u6AA2\u67E5\u7DB2\u57DF\u76EE\u9304\u4E2D\u7684 server.xml \u6A94\u6848\u662F\u5426\u767C\u751F\u932F\u8AA4 + +publisher.info.applyingTransformation=WSSERVLET31: \u6B63\u5728\u4F7F\u7528\u5BE6\u969B\u4F4D\u5740: {0} \u5957\u7528\u8F49\u63DB +WSSERVLET31.diag.cause.1=\u6B63\u5728\u5957\u7528\u8F49\u63DB +WSSERVLET31.diag.check.1=\u6B63\u5E38\u4F5C\u696D + +publisher.info.generatingWSDL=WSSERVLET32: \u6B63\u5728\u7522\u751F\u7AEF\u9EDE: {0} \u7684 WSDL +WSSERVLET32.diag.cause.1=\u6B63\u5728\u7522\u751F WSDL +WSSERVLET32.diag.check.1=\u6B63\u5E38\u4F5C\u696D. + +exception.cannotCreateTransformer=WSSERVLET33: \u7121\u6CD5\u5EFA\u7ACB\u8F49\u63DB\u5668 +WSSERVLET33.diag.cause.1=\u767C\u4F48\u670D\u52D9 WSDL \u6642, \u6703\u4F7F\u7528 XSLT \u8F49\u63DB, \u4EE5\u5EFA\u7F6E\u7684\u4F4D\u7F6E/\u7AEF\u9EDE\u4F86\u4FEE\u6B63 http \u4F4D\u7F6E. \u7121\u6CD5\u5EFA\u7ACB\u8F49\u63DB\u5668\u4EE5\u9032\u884C\u8F49\u63DB. +WSSERVLET33.diag.check.1=\u53EF\u80FD\u662F\u4F7F\u7528\u4E2D\u7684\u8F49\u63DB\u5F15\u64CE\u4E0D\u76F8\u5BB9. \u8ACB\u78BA\u5B9A\u60A8\u4F7F\u7528\u6B63\u78BA\u7684\u8F49\u63DB\u5668\u8207\u7248\u672C. +WSSERVLET33.diag.cause.2=\u767C\u4F48\u670D\u52D9 WSDL \u6642, \u6703\u4F7F\u7528 XSLT \u8F49\u63DB, \u4EE5\u5EFA\u7F6E\u7684\u4F4D\u7F6E/\u7AEF\u9EDE\u4F86\u4FEE\u6B63 http \u4F4D\u7F6E. \u7121\u6CD5\u5EFA\u7ACB\u8F49\u63DB\u5668\u4EE5\u9032\u884C\u8F49\u63DB. +WSSERVLET33.diag.check.2=\u8F49\u63DB\u5668\u5F15\u64CE\u53EF\u80FD\u4E0D\u652F\u63F4\u6216\u4E0D\u76F8\u5BB9. \u8ACB\u67E5\u770B server.xml \u6A94\u6848\u662F\u5426\u6709\u7570\u5E38\u72C0\u6CC1. + + +exception.transformationFailed=WSSERVLET34: \u8F49\u63DB\u5931\u6557 : {0} +WSSERVLET34.diag.cause.1=\u5617\u8A66\u8F49\u63DB\u6642, WSDL \u7684\u4F4D\u7F6E\u4FEE\u6B63\u5931\u6557. +WSSERVLET34.diag.check.1=\u8ACB\u67E5\u770B\u65E5\u8A8C\u6A94, \u77AD\u89E3\u8A73\u7D30\u7684\u932F\u8AA4/\u7570\u5E38\u72C0\u6CC1. + +exception.templateCreationFailed=WSSERVLET35: \u7121\u6CD5\u5EFA\u7ACB\u6A23\u677F\u7269\u4EF6 +WSSERVLET35.diag.cause.1=\u4F7F\u7528\u8F49\u63DB\u6642, \u6703\u5EFA\u7ACB XSLT \u6A23\u5F0F\u8868\u6A23\u677F\u4EE5\u7528\u65BC WSDL \u4F4D\u7F6E\u4FEE\u6B63. \u6A23\u677F\u5EFA\u7ACB\u5931\u6557. +WSSERVLET35.diag.check.1=\u5EFA\u7ACB\u6A23\u677F\u6642\u767C\u751F\u7570\u5E38\u72C0\u6CC1. \u8ACB\u6AA2\u8996\u7570\u5E38\u72C0\u6CC1\u8207\u5806\u758A\u8FFD\u8E64\u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A. + +servlet.html.method=WSSERVLET63: \u6B64\u985E\u578B\u7684\u8981\u6C42\u5FC5\u9808\u4F7F\u7528 Post +WSSERVLET63.diag.cause.1=Web \u670D\u52D9\u8981\u6C42\u5FC5\u9808\u4F7F\u7528 HTTP POST \u65B9\u6CD5: WSI BP 1.0 +WSSERVLET63.diag.check.1=\u8ACB\u78BA\u5B9A\u60A8\u7684 HTTP \u5F9E\u5C6C\u7AEF\u4F7F\u7528 POST \u8981\u6C42, \u800C\u975E GET \u8981\u6C42 + + +servlet.faultstring.invalidContentType=WSSERVLET64: \u7121\u6548\u7684 Content-Type, \u9700\u8981 text/xml +WSSERVLET64.diag.cause.1=Web \u670D\u52D9\u8981\u6C42\u5FC5\u9808\u662F\u5167\u5BB9\u985E\u578B text/xml: WSI BP 1.0 +WSSERVLET64.diag.check.1=\u8ACB\u78BA\u5B9A\u5F9E\u5C6C\u7AEF\u8981\u6C42\u4F7F\u7528\u7684\u662F text/xml + +error.implementorFactory.newInstanceFailed=WSSERVLET43: \u7121\u6CD5\u70BA\u9023\u63A5\u57E0 \"{0}\" \u5EFA\u7ACB\u670D\u52D9\u5BE6\u4F5C\u9805 +WSSERVLET43.diag.cause.1=Web \u670D\u52D9\u5EFA\u7ACB\u5931\u6557. +WSSERVLET43.diag.check.1=\u8ACB\u78BA\u5B9A Web \u670D\u52D9\u53EF\u4EE5\u4F7F\u7528\u4E14\u70BA\u516C\u7528. \u8ACB\u6AA2\u67E5\u7570\u5E38\u72C0\u6CC1, \u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A + +error.implementorFactory.servantInitFailed=WSSERVLET44: \u7121\u6CD5\u8D77\u59CB\u9023\u63A5\u57E0 \"{0}\" \u7684\u670D\u52D9\u5BE6\u4F5C\u9805 +WSSERVLET44.diag.cause.1=Web \u670D\u52D9\u5DF2\u5EFA\u7ACB, \u4F46\u7121\u6CD5\u8D77\u59CB +WSSERVLET44.diag.check.1=\u8ACB\u6AA2\u67E5\u7570\u5E38\u72C0\u6CC1, \u4EE5\u77AD\u89E3\u8A73\u7D30\u8CC7\u8A0A. \u8ACB\u78BA\u5B9A\u6240\u6709\u7D44\u614B\u6A94\u90FD\u6B63\u78BA. + +#not used by anything currently +servlet.faultstring.invalidSOAPAction=WSSERVLET65: \u6A19\u982D\u7121\u6548. \u9700\u8981 SOAPAction +WSSERVLET65.diag.cause.1=\u9700\u8981 SOAP \u52D5\u4F5C +WSSERVLET65.diag.check.1=\u8ACB\u65B0\u589E SOAPAction \u8207\u9069\u7576\u7684\u503C + +# {0} - URI +servlet.no.address.available={0} \u6C92\u6709\u53EF\u7528\u7684\u4F4D\u5740 + +servlet.html.title= Web \u670D\u52D9 +servlet.html.title2=

    Web \u670D\u52D9

    +servlet.html.noInfoAvailable=

    \u6C92\u6709\u53EF\u7528\u7684 JAX-WS \u76F8\u95DC\u8CC7\u8A0A\u74B0\u5883\u8CC7\u8A0A.

    +servlet.html.columnHeader.portName=\u7AEF\u9EDE +servlet.html.columnHeader.status=\u72C0\u614B +servlet.html.columnHeader.information=\u8CC7\u8A0A +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.active=ACTIVE +# This is a status code and should not be translated (if you have to, translate it using capital letters). +servlet.html.status.error=ERROR +servlet.html.endpoint.table=
    \u670D\u52D9\u540D\u7A31\:{0}
    \u9023\u63A5\u57E0\u540D\u7A31\:{1}
    +servlet.html.information.table=
    \u4F4D\u5740\:{0}
    WSDL\:{0}?wsdl
    \u5BE6\u884C\u985E\u5225\:{1}
    +servlet.html.notFound=

    404 \u627E\u4E0D\u5230: {0}

    + + +# +# +# all the following properties are used by the http/ea package +# these properties are not longer used as http/ea is no longer used +# +error.implementorFactory.noConfiguration=WSSERVLET36: \u672A\u6307\u5B9A\u7D44\u614B +error.implementorFactory.noInputStream=WSSERVLET37: \u672A\u6307\u5B9A\u7D44\u614B +error.implementorRegistry.unknownName=WSSERVLET38: \u4E0D\u660E\u7684\u9023\u63A5\u57E0\u540D\u7A31: {0} +error.implementorRegistry.cannotReadConfiguration=WSSERVLET39: \u7121\u6CD5\u8B80\u53D6\u7D44\u614B +error.implementorRegistry.classNotFound=WSSERVLET40: \u627E\u4E0D\u5230\u985E\u5225: {0} +error.implementorRegistry.incompleteInformation=WSSERVLET41: \u7D44\u614B\u8CC7\u8A0A\u4E0D\u5B8C\u6574 +error.implementorRegistry.duplicateName=WSSERVLET42: \u91CD\u8907\u7684\u9023\u63A5\u57E0\u540D\u7A31: {0} + +error.implementorRegistry.fileNotFound=WSSERVLET45: \u627E\u4E0D\u5230\u6A94\u6848: {0} +error.wsdlPublisher.cannotReadConfiguration=WSSERVLET46: \u7121\u6CD5\u8B80\u53D6\u7D44\u614B +error.servlet.init.config.parameter.missing=WSSERVLET47: \u627E\u4E0D\u5230\u7D44\u614B\u53C3\u6578: \"{0}\" +error.servlet.init.config.fileNotFound=WSSERVLET48: \u627E\u4E0D\u5230\u7D44\u614B\u6A94: \"{0}\" +# + +error.servlet.noImplementorForPort=WSSERVLET52: \u6C92\u6709\u70BA\u9023\u63A5\u57E0: {0} \u8A3B\u518A\u5BE6\u4F5C\u9805 +error.servlet.noPortSpecified=WSSERVLET53: \u672A\u5728 HTTP POST \u8981\u6C42 URL \u4E2D\u6307\u5B9A\u9023\u63A5\u57E0 +error.servlet.noResponseWasProduced=WSSERVLET54: \u672A\u7522\u751F\u56DE\u61C9 (\u5167\u90E8\u932F\u8AA4) +# +info.servlet.gotEmptyRequestMessage=WSSERVLET55: \u6536\u5230\u7A7A\u767D\u7684\u8981\u6C42\u8A0A\u606F +info.servlet.initializing=WSSERVLET56: JAX-WS Servlet: \u8D77\u59CB +info.servlet.destroying=WSSERVLET57: JAX-WS Servlet: \u6BC0\u68C4 +# +trace.servlet.requestForPortNamed=WSSERVLET58: \u6536\u5230\u9023\u63A5\u57E0: {0} \u7684\u8981\u6C42 +trace.servlet.handingRequestOverToImplementor=WSSERVLET59: \u6B63\u5728\u5C07\u8981\u6C42\u79FB\u4EA4\u7D66\u5BE6\u4F5C\u9805: {0} +trace.servlet.gotResponseFromImplementor=WSSERVLET60: \u6536\u5230\u5BE6\u4F5C\u9805: {0} \u7684\u56DE\u61C9 +trace.servlet.writingFaultResponse=WSSERVLET61: \u6B63\u5728\u5BEB\u5165\u932F\u8AA4\u56DE\u61C9 +trace.servlet.writingSuccessResponse=WSSERVLET62: \u6B63\u5728\u5BEB\u5165\u6210\u529F\u56DE\u61C9 +# +html.nonRootPage.title= Web \u670D\u52D9 +html.nonRootPage.body1=

    \u6B64 URL \u5DF2\u5B89\u88DD Web \u670D\u52D9.

    +html.nonRootPage.body2=

    \u7121\u6548\u7684\u8981\u6C42 URI.

    \u8ACB\u6AA2\u67E5\u60A8\u7684\u5EFA\u7F6E\u8CC7\u8A0A.

    +# Usage not found. TODO Remove +#html.nonRootPage.body3a=

    Please refer to this page for information about the deployed services.

    +html.wsdlPage.title= Web \u670D\u52D9 +html.wsdlPage.noWsdl=

    \u6C92\u6709\u53EF\u767C\u4F48\u7684 WSDL \u6587\u4EF6.

    \u8ACB\u6AA2\u67E5\u60A8\u7684\u5EFA\u7F6E\u8CC7\u8A0A.

    +html.rootPage.title= Web \u670D\u52D9 +html.rootPage.body1=

    \u6B64 URL \u5DF2\u5B89\u88DD Web \u670D\u52D9.

    +html.rootPage.body2a=

    \u5B83\u652F\u63F4\u4E0B\u5217\u9023\u63A5\u57E0: +html.rootPage.body2b=

    +# Usage not found. TODO Remove +#html.rootPage.body3a=

    A WSDL description of these ports is available here.

    +html.rootPage.body4=

    \u6B64\u7AEF\u9EDE\u7684\u8A2D\u5B9A\u4E0D\u6B63\u78BA. \u8ACB\u6AA2\u67E5\u7D44\u614B\u6A94\u7684\u4F4D\u7F6E\u8207\u5167\u5BB9.

    diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties index c9af16b13b2..79ec8587ff6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties new file mode 100644 index 00000000000..3bd7142309c --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_de.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=Ung\u00FCltiges Argument. MimeHeaders=null +xml.no.Content-Type=MimeHeaders enth\u00E4lt Content-Type Header nicht +xml.unknown.Content-Type=Nicht erkannter Content-Type +xml.cannot.internalize.message=XMLMessage kann nicht erstellt werden +xml.root.part.invalid.Content-Type= Ung\u00FCltiger Content-Type f\u00FCr Root-Teil: {0} +xml.get.source.err=Quelle konnte nicht zur\u00FCckgegeben werden +xml.set.payload.err=Payload konnte in XMLMessage nicht festgelegt werden +xml.get.ds.err=DataSource konnte nicht abgerufen werden +xml.content-type.mustbe.multipart=Content-Type muss Multipart/Related mit type=text/xml sein +xml.invalid.content-type=Ung\u00FCltiger Content-Type: {0} +xml.Content-Type.parse.err=Fehler beim Parsen von MimeHeaders f\u00FCr Content-Type diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties new file mode 100644 index 00000000000..39b4f55c9f9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_es.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=Argumento no v\u00E1lido. MimeHeaders=null +xml.no.Content-Type=MimeHeaders no contiene la cabecera Content-Type +xml.unknown.Content-Type=Tipo de contenido no reconocido +xml.cannot.internalize.message=No se puede crear el mensaje XML +xml.root.part.invalid.Content-Type= Tipo de contenido err\u00F3neo para la parte ra\u00EDz: {0} +xml.get.source.err=No se ha podido devolver el origen +xml.set.payload.err=No se ha podido definir la carga \u00FAtil en el mensaje XML +xml.get.ds.err=No se ha podido obtener el origen de datos +xml.content-type.mustbe.multipart=Content-Type tiene que ser Multipart/Related y type=text/xml +xml.invalid.content-type=Tipo de contenido no v\u00E1lido: {0} +xml.Content-Type.parse.err=Error al analizar MimeHeaders para Content-Type diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties new file mode 100644 index 00000000000..c452fb66fb3 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_fr.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=Argument non valide. MimeHeaders = NULL +xml.no.Content-Type=MimeHeaders ne contient aucun en-t\u00EAte Content-Type +xml.unknown.Content-Type=Content-Type non reconnu +xml.cannot.internalize.message=Impossible de cr\u00E9er XMLMessage +xml.root.part.invalid.Content-Type= Content-Type incorrect pour la partie racine : {0} +xml.get.source.err=Impossible de renvoyer la source +xml.set.payload.err=Impossible de d\u00E9finir les donn\u00E9es trait\u00E9es dans XMLMessage +xml.get.ds.err=Impossible d'obtenir DataSource +xml.content-type.mustbe.multipart=Content-Type doit \u00EAtre Multipart/Related et avec le type=text/xml +xml.invalid.content-type=Content-Type non valide : {0} +xml.Content-Type.parse.err=Erreur lors de l'analyse de MimeHeaders pour Content-Type diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties new file mode 100644 index 00000000000..28657b871ec --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_it.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=Argomento non valido. MimeHeaders=null +xml.no.Content-Type=MimeHeaders non contiene l'intestazione Content-Type +xml.unknown.Content-Type=Content-Type non riconosciuto +xml.cannot.internalize.message=Impossibile creare XMLMessage +xml.root.part.invalid.Content-Type= Content-Type non valido per Root Part: {0} +xml.get.source.err=Impossibile restituire Source +xml.set.payload.err=Impossibile impostare Payload in XMLMessage +xml.get.ds.err=Impossibile ottenere DataSource +xml.content-type.mustbe.multipart=Content-Type deve essere Multipart/Related e con type=text/xml +xml.invalid.content-type=Content-Type non valido: {0} +xml.Content-Type.parse.err=Errore durante l'analisi di MimeHeaders per Content-Type diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties new file mode 100644 index 00000000000..c469c156e25 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ja.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=\u7121\u52B9\u306A\u5F15\u6570\u3067\u3059\u3002MimeHeaders=null +xml.no.Content-Type=MimeHeaders\u306BContent-Type\u30D8\u30C3\u30C0\u30FC\u304C\u542B\u307E\u308C\u307E\u305B\u3093 +xml.unknown.Content-Type=\u8A8D\u8B58\u3067\u304D\u306A\u3044Content-Type +xml.cannot.internalize.message=XMLMessage\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093 +xml.root.part.invalid.Content-Type= \u30EB\u30FC\u30C8\u30FB\u30D1\u30FC\u30C8: {0}\u306EContent-Type\u304C\u4E0D\u6B63\u3067\u3059 +xml.get.source.err=\u30BD\u30FC\u30B9\u3092\u8FD4\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +xml.set.payload.err=XMLMessage\u3067\u30DA\u30A4\u30ED\u30FC\u30C9\u3092\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +xml.get.ds.err=DataSource\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F +xml.content-type.mustbe.multipart=Content-Type\u306FMultipart/Related\u3067\u3042\u308A\u3001type=text/xml\u304C\u542B\u307E\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +xml.invalid.content-type=\u7121\u52B9\u306AContent-Type: {0} +xml.Content-Type.parse.err=Content-Type\u306EMimeHeaders\u306E\u89E3\u6790\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties new file mode 100644 index 00000000000..3f87982bc57 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_ko.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=\uC778\uC218\uAC00 \uBD80\uC801\uD569\uD569\uB2C8\uB2E4. MimeHeaders\uAC00 \uB110\uC785\uB2C8\uB2E4. +xml.no.Content-Type=MimeHeaders\uC5D0 Content-Type \uD5E4\uB354\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +xml.unknown.Content-Type=\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 Content-Type +xml.cannot.internalize.message=XMLMessage\uB97C \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +xml.root.part.invalid.Content-Type= \uB8E8\uD2B8 \uBD80\uBD84\uC5D0 \uB300\uD574 \uC798\uBABB\uB41C Content-Type: {0} +xml.get.source.err=\uC18C\uC2A4\uB97C \uBC18\uD658\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +xml.set.payload.err=XMLMessage\uC5D0\uC11C \uD398\uC774\uB85C\uB4DC\uB97C \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +xml.get.ds.err=DataSource\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +xml.content-type.mustbe.multipart=Content-Type\uC740 Multipart/Related\uC5EC\uC57C \uD558\uBA70 \uC720\uD615\uC774 text/xml\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. +xml.invalid.content-type=\uBD80\uC801\uD569\uD55C Content-Type: {0} +xml.Content-Type.parse.err=Content-Type\uC5D0 \uB300\uD55C MimeHeaders\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD558\uB294 \uC911 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties new file mode 100644 index 00000000000..5254aedb8d6 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_pt_BR.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=Argumento inv\u00E1lido. MimeHeaders=nulo +xml.no.Content-Type=MimeHeaders n\u00E3o cont\u00E9m o cabe\u00E7alho do Tipo do Cabe\u00E7alho +xml.unknown.Content-Type=Tipo de Conte\u00FAdo N\u00E3o reconhecido +xml.cannot.internalize.message=N\u00E3o \u00E9 poss\u00EDvel criar XMLMessage +xml.root.part.invalid.Content-Type= Tipo de Conte\u00FAdo Inv\u00E1lido para a Parte da Raiz : {0} +xml.get.source.err=N\u00E3o foi poss\u00EDvel retornar a Origem +xml.set.payload.err=N\u00E3o foi poss\u00EDvel o Payload na XMLMessage +xml.get.ds.err=N\u00E3o foi poss\u00EDvel obter DataSource +xml.content-type.mustbe.multipart=O Tipo de Conte\u00FAdo precisa ser de V\u00E1rias Partes/Relacionado com tipo=texto/xml +xml.invalid.content-type=Tipo de Conte\u00FAdo Inv\u00E1lido: {0} +xml.Content-Type.parse.err=Erro ao fazer parse de MimeHeaders para o Tipo de Conte\u00FAdo diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties new file mode 100644 index 00000000000..ba360ee6841 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_CN.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=\u53C2\u6570\u65E0\u6548\u3002MimeHeaders=null +xml.no.Content-Type=MimeHeaders \u4E0D\u5305\u542B Content-Type \u6807\u5934 +xml.unknown.Content-Type=\u65E0\u6CD5\u8BC6\u522B\u7684 Content-Type +xml.cannot.internalize.message=\u65E0\u6CD5\u521B\u5EFA XMLMessage +xml.root.part.invalid.Content-Type= \u6839\u90E8\u5206\u7684 Content-Type \u9519\u8BEF: {0} +xml.get.source.err=\u65E0\u6CD5\u8FD4\u56DE\u6E90 +xml.set.payload.err=\u65E0\u6CD5\u5728 XMLMessage \u4E2D\u8BBE\u7F6E\u6709\u6548\u8D1F\u8F7D +xml.get.ds.err=\u65E0\u6CD5\u83B7\u53D6\u6570\u636E\u6E90 +xml.content-type.mustbe.multipart=Content-Type \u5FC5\u987B\u662F\u201C\u591A\u90E8\u5206/\u76F8\u5173\u201D\u5E76\u5E26\u6709 type=text/xml +xml.invalid.content-type=Content-Type \u65E0\u6548: {0} +xml.Content-Type.parse.err=\u89E3\u6790 Content-Type \u7684 MimeHeaders \u65F6\u51FA\u9519 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties new file mode 100644 index 00000000000..d72e6b6f15a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/resources/xmlmessage_zh_TW.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +xml.null.headers=\u5F15\u6578\u7121\u6548. MimeHeaders=null +xml.no.Content-Type=MimeHeaders \u672A\u5305\u542B Content-Type \u6A19\u982D +xml.unknown.Content-Type=\u7121\u6CD5\u8FA8\u8B58\u7684 Content-Type +xml.cannot.internalize.message=\u7121\u6CD5\u5EFA\u7ACB XMLMessage +xml.root.part.invalid.Content-Type= \u6839\u76EE\u9304\u90E8\u5206\u7684 Content-Type \u932F\u8AA4 : {0} +xml.get.source.err=\u7121\u6CD5\u50B3\u56DE\u4F86\u6E90 +xml.set.payload.err=\u7121\u6CD5\u5728 XMLMessage \u4E2D\u8A2D\u5B9A\u6709\u6548\u8CA0\u8F09 (Payload) +xml.get.ds.err=\u7121\u6CD5\u53D6\u5F97\u8CC7\u6599\u4F86\u6E90 +xml.content-type.mustbe.multipart=Content-Type \u5FC5\u9808\u662F Multipart/Related \u548C type=text/xml +xml.invalid.content-type=Content-Type \u7121\u6548: {0} +xml.Content-Type.parse.err=\u5256\u6790 Content-Type \u7684 MimeHeaders \u6642\u767C\u751F\u932F\u8AA4 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java new file mode 100644 index 00000000000..ad7c7e22a70 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/MetroConfig.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.*; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * + * The root element in Metro configuration file. + * + * + *

    Java class for metro element declaration. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <element name="metro">
    + *   <complexType>
    + *     <complexContent>
    + *       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *         <sequence>
    + *           <element ref="{http://java.sun.com/xml/ns/metro/config}tubelines" minOccurs="0"/>
    + *           <any/>
    + *         </sequence>
    + *         <attribute name="version" use="required" type="{http://java.sun.com/xml/ns/metro/config}metroConfigVersionSType" />
    + *       </restriction>
    + *     </complexContent>
    + *   </complexType>
    + * </element>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "", propOrder = { + "tubelines", + "any" +}) +@XmlRootElement(name = "metro") +public class MetroConfig { + + protected Tubelines tubelines; + @XmlAnyElement(lax = true) + protected List any; + @XmlAttribute(required = true) + protected String version; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the tubelines property. + * + * @return + * possible object is + * {@link Tubelines } + * + */ + public Tubelines getTubelines() { + return tubelines; + } + + /** + * Sets the value of the tubelines property. + * + * @param value + * allowed object is + * {@link Tubelines } + * + */ + public void setTubelines(Tubelines value) { + this.tubelines = value; + } + + /** + * Gets the value of the any property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getAny().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets the value of the version property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getVersion() { + return version; + } + + /** + * Sets the value of the version property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setVersion(String value) { + this.version = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

    + * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java new file mode 100644 index 00000000000..9f37adbd6c2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/ObjectFactory.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import javax.xml.bind.JAXBElement; +import javax.xml.bind.annotation.XmlElementDecl; +import javax.xml.bind.annotation.XmlRegistry; +import javax.xml.namespace.QName; + + +/** + * This object contains factory methods for each + * Java content interface and Java element interface + * generated in the com.sun.xml.internal.ws.runtime.config package. + *

    An ObjectFactory allows you to programatically + * construct new instances of the Java representation + * for XML content. The Java representation of XML + * content can consist of schema derived interfaces + * and classes representing the binding of schema + * type definitions, element declarations and model + * groups. Factory methods for each of these are + * provided in this class. + * + */ +@XmlRegistry +public class ObjectFactory { + + private final static QName _Tubelines_QNAME = new QName("http://java.sun.com/xml/ns/metro/config", "tubelines"); + private final static QName _TubelineMapping_QNAME = new QName("http://java.sun.com/xml/ns/metro/config", "tubeline-mapping"); + private final static QName _Tubeline_QNAME = new QName("http://java.sun.com/xml/ns/metro/config", "tubeline"); + + /** + * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.sun.xml.internal.ws.runtime.config + * + */ + public ObjectFactory() { + } + + /** + * Create an instance of {@link TubeFactoryConfig } + * + */ + public TubeFactoryConfig createTubeFactoryConfig() { + return new TubeFactoryConfig(); + } + + /** + * Create an instance of {@link TubeFactoryList } + * + */ + public TubeFactoryList createTubeFactoryList() { + return new TubeFactoryList(); + } + + /** + * Create an instance of {@link TubelineDefinition } + * + */ + public TubelineDefinition createTubelineDefinition() { + return new TubelineDefinition(); + } + + /** + * Create an instance of {@link Tubelines } + * + */ + public Tubelines createTubelines() { + return new Tubelines(); + } + + /** + * Create an instance of {@link MetroConfig } + * + */ + public MetroConfig createMetroConfig() { + return new MetroConfig(); + } + + /** + * Create an instance of {@link TubelineMapping } + * + */ + public TubelineMapping createTubelineMapping() { + return new TubelineMapping(); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link Tubelines }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/metro/config", name = "tubelines") + public JAXBElement createTubelines(Tubelines value) { + return new JAXBElement(_Tubelines_QNAME, Tubelines.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TubelineMapping }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/metro/config", name = "tubeline-mapping") + public JAXBElement createTubelineMapping(TubelineMapping value) { + return new JAXBElement(_TubelineMapping_QNAME, TubelineMapping.class, null, value); + } + + /** + * Create an instance of {@link JAXBElement }{@code <}{@link TubelineDefinition }{@code >}} + * + */ + @XmlElementDecl(namespace = "http://java.sun.com/xml/ns/metro/config", name = "tubeline") + public JAXBElement createTubeline(TubelineDefinition value) { + return new JAXBElement(_Tubeline_QNAME, TubelineDefinition.class, null, value); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java new file mode 100644 index 00000000000..960fbe46e48 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryConfig.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.*; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + *

    Java class for tubeFactoryCType complex type. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <complexType name="tubeFactoryCType">
    + *   <complexContent>
    + *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *       <sequence>
    + *         <any/>
    + *       </sequence>
    + *       <attribute name="className" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
    + *     </restriction>
    + *   </complexContent>
    + * </complexType>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "tubeFactoryCType", propOrder = { + "any" +}) +public class TubeFactoryConfig { + + @XmlAnyElement(lax = true) + protected List any; + @XmlAttribute(required = true) + protected String className; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the any property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getAny().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets the value of the className property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getClassName() { + return className; + } + + /** + * Sets the value of the className property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setClassName(String value) { + this.className = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

    + * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java new file mode 100644 index 00000000000..8db7587db83 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubeFactoryList.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.*; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + *

    Java class for tubeFactoryListCType complex type. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <complexType name="tubeFactoryListCType">
    + *   <complexContent>
    + *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *       <sequence>
    + *         <element name="tube-factory" type="{http://java.sun.com/xml/ns/metro/config}tubeFactoryCType" maxOccurs="unbounded"/>
    + *         <any/>
    + *       </sequence>
    + *     </restriction>
    + *   </complexContent>
    + * </complexType>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "tubeFactoryListCType", propOrder = { + "tubeFactoryConfigs", + "any" +}) +public class TubeFactoryList { + + @XmlElement(name = "tube-factory", required = true) + protected List tubeFactoryConfigs; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the tubeFactoryConfigs property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the tubeFactoryConfigs property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getTubeFactoryConfigs().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link TubeFactoryConfig } + * + * + */ + public List getTubeFactoryConfigs() { + if (tubeFactoryConfigs == null) { + tubeFactoryConfigs = new ArrayList(); + } + return this.tubeFactoryConfigs; + } + + /** + * Gets the value of the any property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getAny().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

    + * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java new file mode 100644 index 00000000000..22367dd1e48 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineDefinition.java @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.*; +import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + *

    Java class for tubelineDefinitionCType complex type. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <complexType name="tubelineDefinitionCType">
    + *   <complexContent>
    + *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *       <sequence>
    + *         <element name="client-side" type="{http://java.sun.com/xml/ns/metro/config}tubeFactoryListCType" minOccurs="0"/>
    + *         <element name="endpoint-side" type="{http://java.sun.com/xml/ns/metro/config}tubeFactoryListCType" minOccurs="0"/>
    + *         <any/>
    + *       </sequence>
    + *       <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}ID" />
    + *     </restriction>
    + *   </complexContent>
    + * </complexType>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "tubelineDefinitionCType", propOrder = { + "clientSide", + "endpointSide", + "any" +}) +public class TubelineDefinition { + + @XmlElement(name = "client-side") + protected TubeFactoryList clientSide; + @XmlElement(name = "endpoint-side") + protected TubeFactoryList endpointSide; + @XmlAnyElement(lax = true) + protected List any; + @XmlAttribute + @XmlJavaTypeAdapter(CollapsedStringAdapter.class) + @XmlID + @XmlSchemaType(name = "ID") + protected String name; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the clientSide property. + * + * @return + * possible object is + * {@link TubeFactoryList } + * + */ + public TubeFactoryList getClientSide() { + return clientSide; + } + + /** + * Sets the value of the clientSide property. + * + * @param value + * allowed object is + * {@link TubeFactoryList } + * + */ + public void setClientSide(TubeFactoryList value) { + this.clientSide = value; + } + + /** + * Gets the value of the endpointSide property. + * + * @return + * possible object is + * {@link TubeFactoryList } + * + */ + public TubeFactoryList getEndpointSide() { + return endpointSide; + } + + /** + * Sets the value of the endpointSide property. + * + * @param value + * allowed object is + * {@link TubeFactoryList } + * + */ + public void setEndpointSide(TubeFactoryList value) { + this.endpointSide = value; + } + + /** + * Gets the value of the any property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getAny().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets the value of the name property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getName() { + return name; + } + + /** + * Sets the value of the name property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setName(String value) { + this.name = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

    + * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/LocalizableImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java similarity index 57% rename from jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/LocalizableImpl.java rename to jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java index 9870a8432cf..4b551438404 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/LocalizableImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,35 +23,41 @@ * questions. */ -package com.sun.xml.internal.ws.util.localization; +package com.sun.xml.internal.ws.runtime.config; -import java.util.Arrays; +import com.sun.xml.internal.ws.api.FeatureConstructor; +import com.sun.org.glassfish.gmbal.ManagedAttribute; +import com.sun.org.glassfish.gmbal.ManagedData; + +import javax.xml.ws.WebServiceFeature; +import java.util.List; /** - * Straight-forward {@link Localizable} implementation. + * WebServiceFeature for the Tubeline {@link javax.xml.ws.WebServiceFeature} * - * @author Kohsuke Kawaguchi + * @author Fabian Ritzmann */ -public final class LocalizableImpl implements Localizable { - private final String key; - private final Object[] arguments; - private final String resourceBundleName; +@ManagedData +public class TubelineFeature extends WebServiceFeature { - public LocalizableImpl(String key, Object[] arguments, String resourceBundleName) { - this.key = key; - this.arguments = arguments; - this.resourceBundleName = resourceBundleName; + public static final String ID = "com.sun.xml.internal.ws.runtime.config.TubelineFeature"; + + @FeatureConstructor({ + "enabled" + }) + public TubelineFeature(boolean enabled) { + super.enabled = enabled; } - public String getKey() { - return key; + @Override + @ManagedAttribute + public String getID() { + return ID; } - public Object[] getArguments() { - return Arrays.copyOf(arguments, arguments.length); + // TODO implement + List getTubeFactories() { + return null; } - public String getResourceBundleName() { - return resourceBundleName; - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java new file mode 100644 index 00000000000..b142129b085 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineFeatureReader.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.runtime.config; + +import com.sun.istack.internal.logging.Logger; +import com.sun.xml.internal.ws.config.metro.dev.FeatureReader; +import com.sun.xml.internal.ws.config.metro.util.ParserUtil; + +import javax.xml.namespace.QName; +import javax.xml.stream.XMLEventReader; +import javax.xml.stream.XMLStreamConstants; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.events.Attribute; +import javax.xml.stream.events.EndElement; +import javax.xml.stream.events.StartElement; +import javax.xml.stream.events.XMLEvent; +import javax.xml.ws.WebServiceException; +import java.util.Iterator; + +/** + * + * @author Fabian Ritzmann + */ +public class TubelineFeatureReader implements FeatureReader { + + private static final Logger LOGGER = Logger.getLogger(TubelineFeatureReader.class); + private static final QName NAME_ATTRIBUTE_NAME = new QName("name"); + + // TODO implement + public TubelineFeature parse(XMLEventReader reader) throws WebServiceException { + try { + final StartElement element = reader.nextEvent().asStartElement(); + boolean attributeEnabled = true; + final Iterator iterator = element.getAttributes(); + while (iterator.hasNext()) { + final Attribute nextAttribute = (Attribute) iterator.next(); + final QName attributeName = nextAttribute.getName(); + if (ENABLED_ATTRIBUTE_NAME.equals(attributeName)) { + attributeEnabled = ParserUtil.parseBooleanValue(nextAttribute.getValue()); + } else if (NAME_ATTRIBUTE_NAME.equals(attributeName)) { + // TODO use name attribute + } else { + // TODO logging message + throw LOGGER.logSevereException(new WebServiceException("Unexpected attribute")); + } + } + return parseFactories(attributeEnabled, element, reader); + } catch (XMLStreamException e) { + throw LOGGER.logSevereException(new WebServiceException("Failed to unmarshal XML document", e)); + } + } + + private TubelineFeature parseFactories(final boolean enabled, final StartElement element, final XMLEventReader reader) + throws WebServiceException { + int elementRead = 0; + loop: + while (reader.hasNext()) { + try { + final XMLEvent event = reader.nextEvent(); + switch (event.getEventType()) { + case XMLStreamConstants.COMMENT: + break; // skipping the comments and start document events + case XMLStreamConstants.CHARACTERS: + if (event.asCharacters().isWhiteSpace()) { + break; + } + else { + // TODO: logging message + throw LOGGER.logSevereException(new WebServiceException("No character data allowed, was " + event.asCharacters())); + } + case XMLStreamConstants.START_ELEMENT: + // TODO implement + elementRead++; + break; + case XMLStreamConstants.END_ELEMENT: + elementRead--; + if (elementRead < 0) { + final EndElement endElement = event.asEndElement(); + if (!element.getName().equals(endElement.getName())) { + // TODO logging message + throw LOGGER.logSevereException(new WebServiceException("End element does not match " + endElement)); + } + break loop; + } + else { + break; + } + default: + // TODO logging message + throw LOGGER.logSevereException(new WebServiceException("Unexpected event, was " + event)); + } + } catch (XMLStreamException e) { + // TODO logging message + throw LOGGER.logSevereException(new WebServiceException("Failed to unmarshal XML document", e)); + } + } + + // TODO implement + return new TubelineFeature(enabled); + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java new file mode 100644 index 00000000000..e59c825c670 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/TubelineMapping.java @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.*; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + *

    Java class for tubelineMappingCType complex type. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <complexType name="tubelineMappingCType">
    + *   <complexContent>
    + *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *       <sequence>
    + *         <element name="endpoint-ref" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
    + *         <element name="tubeline-ref" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
    + *         <any/>
    + *       </sequence>
    + *     </restriction>
    + *   </complexContent>
    + * </complexType>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "tubelineMappingCType", propOrder = { + "endpointRef", + "tubelineRef", + "any" +}) +public class TubelineMapping { + + @XmlElement(name = "endpoint-ref", required = true) + @XmlSchemaType(name = "anyURI") + protected String endpointRef; + @XmlElement(name = "tubeline-ref", required = true) + @XmlSchemaType(name = "anyURI") + protected String tubelineRef; + @XmlAnyElement(lax = true) + protected List any; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the endpointRef property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getEndpointRef() { + return endpointRef; + } + + /** + * Sets the value of the endpointRef property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setEndpointRef(String value) { + this.endpointRef = value; + } + + /** + * Gets the value of the tubelineRef property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getTubelineRef() { + return tubelineRef; + } + + /** + * Sets the value of the tubelineRef property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setTubelineRef(String value) { + this.tubelineRef = value; + } + + /** + * Gets the value of the any property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getAny().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

    + * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java new file mode 100644 index 00000000000..93bd23e76d9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/Tubelines.java @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + + +package com.sun.xml.internal.ws.runtime.config; + +import org.w3c.dom.Element; + +import javax.xml.bind.annotation.*; +import javax.xml.namespace.QName; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + *

    Java class for tubelinesConfigCType complex type. + * + *

    The following schema fragment specifies the expected content contained within this class. + * + *

    + * <complexType name="tubelinesConfigCType">
    + *   <complexContent>
    + *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
    + *       <sequence>
    + *         <element ref="{http://java.sun.com/xml/ns/metro/config}tubeline-mapping" maxOccurs="unbounded" minOccurs="0"/>
    + *         <element ref="{http://java.sun.com/xml/ns/metro/config}tubeline" maxOccurs="unbounded" minOccurs="0"/>
    + *         <any/>
    + *       </sequence>
    + *       <attribute name="default" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
    + *     </restriction>
    + *   </complexContent>
    + * </complexType>
    + * 
    + * + * + */ +@XmlAccessorType(XmlAccessType.FIELD) +@XmlType(name = "tubelinesConfigCType", propOrder = { + "tubelineMappings", + "tubelineDefinitions", + "any" +}) +public class Tubelines { + + @XmlElement(name = "tubeline-mapping") + protected List tubelineMappings; + @XmlElement(name = "tubeline") + protected List tubelineDefinitions; + @XmlAnyElement(lax = true) + protected List any; + @XmlAttribute(name = "default") + @XmlSchemaType(name = "anyURI") + protected String _default; + @XmlAnyAttribute + private Map otherAttributes = new HashMap(); + + /** + * Gets the value of the tubelineMappings property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the tubelineMappings property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getTubelineMappings().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link TubelineMapping } + * + * + */ + public List getTubelineMappings() { + if (tubelineMappings == null) { + tubelineMappings = new ArrayList(); + } + return this.tubelineMappings; + } + + /** + * Gets the value of the tubelineDefinitions property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the tubelineDefinitions property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getTubelineDefinitions().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link TubelineDefinition } + * + * + */ + public List getTubelineDefinitions() { + if (tubelineDefinitions == null) { + tubelineDefinitions = new ArrayList(); + } + return this.tubelineDefinitions; + } + + /** + * Gets the value of the any property. + * + *

    + * This accessor method returns a reference to the live list, + * not a snapshot. Therefore any modification you make to the + * returned list will be present inside the JAXB object. + * This is why there is not a set method for the any property. + * + *

    + * For example, to add a new item, do as follows: + *

    +     *    getAny().add(newItem);
    +     * 
    + * + * + *

    + * Objects of the following type(s) are allowed in the list + * {@link Element } + * {@link Object } + * + * + */ + public List getAny() { + if (any == null) { + any = new ArrayList(); + } + return this.any; + } + + /** + * Gets the value of the default property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getDefault() { + return _default; + } + + /** + * Sets the value of the default property. + * + * @param value + * allowed object is + * {@link String } + * + */ + public void setDefault(String value) { + this._default = value; + } + + /** + * Gets a map that contains attributes that aren't bound to any typed property on this class. + * + *

    + * the map is keyed by the name of the attribute and + * the value is the string value of the attribute. + * + * the map returned by this method is live, and you can add new attribute + * by updating the map directly. Because of this design, there's no setter. + * + * + * @return + * always non-null + */ + public Map getOtherAttributes() { + return otherAttributes; + } + +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java new file mode 100644 index 00000000000..76f50df4bf9 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/runtime/config/package-info.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +// +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-600 +// See http://java.sun.com/xml/jaxb +// Any modifications to this file will be lost upon recompilation of the source schema. +// Generated on: 2008.11.17 at 11:49:55 AM CET +// + +@javax.xml.bind.annotation.XmlSchema(namespace = "http://java.sun.com/xml/ns/metro/config", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +package com.sun.xml.internal.ws.runtime.config; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java index 10a74ae4d3c..85b971d7c90 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractMultiInstanceResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java index 0981c76e74b..c0199f65a1c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/AbstractWebServiceContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.xml.internal.ws.server; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.api.server.WSWebServiceContext; +import com.sun.xml.internal.ws.server.provider.AsyncProviderInvokerTube; import com.sun.istack.internal.NotNull; import org.w3c.dom.Element; @@ -41,7 +42,8 @@ import java.security.Principal; * {@link Packet} and concrete implementations provide it via * {@link #getRequestPacket()}. * - * @see InvokerTube, AsyncProviderInvokerTube + * @see InvokerTube, + * @see AsyncProviderInvokerTube * * @author Jitendra Kotamraju */ @@ -91,7 +93,7 @@ public abstract class AbstractWebServiceContext implements WSWebServiceContext { if(endpoint.getServiceDefinition() != null) { wsdlAddress = packet.webServiceContextDelegate.getWSDLAddress(packet,endpoint); } - return clazz.cast(((WSEndpointImpl)endpoint).getEndpointReference(clazz,address,wsdlAddress, referenceParameters)); + return clazz.cast(endpoint.getEndpointReference(clazz,address,wsdlAddress, referenceParameters)); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java index 816073513a6..6fde575355d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DefaultResourceInjector.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,9 @@ package com.sun.xml.internal.ws.server; import com.sun.istack.internal.NotNull; -import com.sun.xml.internal.ws.api.server.AbstractInstanceResolver; import com.sun.xml.internal.ws.api.server.ResourceInjector; import com.sun.xml.internal.ws.api.server.WSWebServiceContext; +import com.sun.xml.internal.ws.util.InjectionPlan; import javax.xml.ws.WebServiceContext; @@ -40,7 +40,7 @@ import javax.xml.ws.WebServiceContext; */ public final class DefaultResourceInjector extends ResourceInjector { public void inject(@NotNull WSWebServiceContext context, @NotNull Object instance) { - AbstractInstanceResolver.buildInjectionPlan( + InjectionPlan.buildInjectionPlan( instance.getClass(),WebServiceContext.class,false).inject(instance,context); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java index 8c1c44e2449..c95a780ad88 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/DraconianValidationErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java index db523d2a133..cd460dcfa6a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointAwareTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java index 6373ac98785..271cf59d50c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,17 +27,27 @@ package com.sun.xml.internal.ws.server; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory; -import com.sun.xml.internal.ws.api.policy.PolicyResolver; -import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; -import com.sun.xml.internal.ws.api.databinding.DatabindingFactory; +import com.sun.xml.internal.ws.api.WSFeatureList; import com.sun.xml.internal.ws.api.databinding.DatabindingConfig; +import com.sun.xml.internal.ws.api.databinding.DatabindingFactory; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; +import com.sun.xml.internal.ws.api.databinding.WSDLGenInfo; import com.sun.xml.internal.ws.api.model.SEIModel; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; -import com.sun.xml.internal.ws.api.pipe.Tube; -import com.sun.xml.internal.ws.api.server.*; +import com.sun.xml.internal.ws.api.policy.PolicyResolver; +import com.sun.xml.internal.ws.api.policy.PolicyResolverFactory; +import com.sun.xml.internal.ws.api.server.AsyncProvider; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ContainerResolver; +import com.sun.xml.internal.ws.api.server.InstanceResolver; +import com.sun.xml.internal.ws.api.server.Invoker; +import com.sun.xml.internal.ws.api.server.SDDocument; +import com.sun.xml.internal.ws.api.server.SDDocumentSource; +import com.sun.xml.internal.ws.api.server.WSEndpoint; +import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension; import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver; import com.sun.xml.internal.ws.api.wsdl.parser.XMLEntityResolver.Parser; @@ -46,11 +56,14 @@ import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.binding.SOAPBindingImpl; import com.sun.xml.internal.ws.binding.WebServiceFeatureList; import com.sun.xml.internal.ws.model.AbstractSEIModelImpl; +import com.sun.xml.internal.ws.model.ReflectAnnotationReader; import com.sun.xml.internal.ws.model.RuntimeModeler; import com.sun.xml.internal.ws.model.SOAPSEIModel; import com.sun.xml.internal.ws.model.wsdl.WSDLModelImpl; import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; import com.sun.xml.internal.ws.model.wsdl.WSDLServiceImpl; +import com.sun.xml.internal.ws.policy.PolicyMap; +import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil; import com.sun.xml.internal.ws.resources.ServerMessages; import com.sun.xml.internal.ws.server.provider.ProviderInvokerTube; import com.sun.xml.internal.ws.server.sei.SEIInvokerTube; @@ -58,20 +71,20 @@ import com.sun.xml.internal.ws.util.HandlerAnnotationInfo; import com.sun.xml.internal.ws.util.HandlerAnnotationProcessor; import com.sun.xml.internal.ws.util.ServiceConfigurationError; import com.sun.xml.internal.ws.util.ServiceFinder; +import com.sun.xml.internal.ws.util.xml.XmlUtil; import com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser; -import com.sun.xml.internal.ws.wsdl.writer.WSDLGenerator; -import com.sun.xml.internal.ws.policy.PolicyMap; -import com.sun.xml.internal.ws.policy.jaxws.PolicyUtil; import org.xml.sax.EntityResolver; +import org.xml.sax.InputSource; import org.xml.sax.SAXException; import javax.jws.WebService; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; import javax.xml.ws.Provider; import javax.xml.ws.WebServiceException; -import javax.xml.ws.WebServiceProvider; import javax.xml.ws.WebServiceFeature; +import javax.xml.ws.WebServiceProvider; import javax.xml.ws.soap.SOAPBinding; import java.io.IOException; import java.net.URL; @@ -165,8 +178,10 @@ public class EndpointFactory { if(implType ==null) throw new IllegalArgumentException(); + MetadataReader metadataReader = getExternalMetadatReader(implType, binding); + if (isStandard) { - verifyImplementorClass(implType); + verifyImplementorClass(implType, metadataReader); } if (invoker == null) { @@ -184,10 +199,10 @@ public class EndpointFactory { container = ContainerResolver.getInstance().getContainer(); if(serviceName==null) - serviceName = getDefaultServiceName(implType); + serviceName = getDefaultServiceName(implType, metadataReader); if(portName==null) - portName = getDefaultPortName(serviceName,implType); + portName = getDefaultPortName(serviceName,implType, metadataReader); {// error check String serviceNS = serviceName.getNamespaceURI(); @@ -207,21 +222,21 @@ public class EndpointFactory { QName portTypeName = null; if (isStandard && implType.getAnnotation(WebServiceProvider.class)==null) { - portTypeName = RuntimeModeler.getPortTypeName(implType); + portTypeName = RuntimeModeler.getPortTypeName(implType, metadataReader); } // Categorises the documents as WSDL, Schema etc List docList = categoriseMetadata(md, serviceName, portTypeName); // Finds the primary WSDL and makes sure that metadata doesn't have // two concrete or abstract WSDLs - SDDocumentImpl primaryDoc = findPrimary(docList); + SDDocumentImpl primaryDoc = primaryWsdl != null ? SDDocumentImpl.create(primaryWsdl,serviceName,portTypeName) : findPrimary(docList); EndpointAwareTube terminal; WSDLPortImpl wsdlPort = null; AbstractSEIModelImpl seiModel = null; // create WSDL model if (primaryDoc != null) { - wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container); + wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); } WebServiceFeatureList features=((BindingImpl)binding).getFeatures(); @@ -247,7 +262,7 @@ public class EndpointFactory { configFtrs = PolicyUtil.getPortScopedFeatures(policyMap,serviceName,portName); } features.mergeFeatures(configFtrs, true); - terminal = createProviderInvokerTube(implType,binding,invoker); + terminal = createProviderInvokerTube(implType, binding, invoker, container); } else { // Create runtime model for non Provider endpoints seiModel = createSEIModel(wsdlPort, implType, serviceName, portName, binding); @@ -260,7 +275,7 @@ public class EndpointFactory { if (primaryDoc == null) { primaryDoc = generateWSDL(binding, seiModel, docList, container, implType); // create WSDL model - wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container); + wsdlPort = getWSDLPort(primaryDoc, docList, serviceName, portName, container, resolver); seiModel.freeze(wsdlPort); } policyMap = wsdlPort.getOwner().getParent().getPolicyMap(); @@ -277,8 +292,9 @@ public class EndpointFactory { } // Selects only required metadata for this endpoint from the passed-in metadata if (primaryDoc != null) { - docList = findMetadataClosure(primaryDoc, docList); + docList = findMetadataClosure(primaryDoc, docList, resolver); } + ServiceDefinitionImpl serviceDefiniton = (primaryDoc != null) ? new ServiceDefinitionImpl(docList, primaryDoc) : null; return create(serviceName, portName, binding, container, seiModel, wsdlPort, implType, serviceDefiniton, @@ -298,10 +314,10 @@ public class EndpointFactory { return new SEIInvokerTube(seiModel,invoker,binding); } - protected EndpointAwareTube createProviderInvokerTube(Class implType, WSBinding binding, Invoker invoker) { - return ProviderInvokerTube.create(implType, binding, invoker); + protected EndpointAwareTube createProviderInvokerTube(final Class implType, final WSBinding binding, + final Invoker invoker, final Container container) { + return ProviderInvokerTube.create(implType, binding, invoker, container); } - /** * Goes through the original metadata documents and collects the required ones. * This done traversing from primary WSDL and its imports until it builds a @@ -311,7 +327,7 @@ public class EndpointFactory { * @param docList complete metadata * @return new metadata that doesn't contain extraneous documnets. */ - private static List findMetadataClosure(SDDocumentImpl primaryDoc, List docList) { + private static List findMetadataClosure(SDDocumentImpl primaryDoc, List docList, EntityResolver resolver) { // create a map for old metadata Map oldMap = new HashMap(); for(SDDocumentImpl doc : docList) { @@ -328,10 +344,24 @@ public class EndpointFactory { SDDocumentImpl doc = oldMap.get(url); if (doc == null) { // old metadata doesn't have this imported doc, may be external - continue; + if (resolver != null) { + try { + InputSource source = resolver.resolveEntity(null, url); + if (source != null) { + MutableXMLStreamBuffer xsb = new MutableXMLStreamBuffer(); + XMLStreamReader reader = XmlUtil.newXMLInputFactory(true).createXMLStreamReader(source.getByteStream()); + xsb.createFromXMLStreamReader(reader); + + SDDocumentSource sdocSource = SDDocumentImpl.create(new URL(url), xsb); + doc = SDDocumentImpl.create(sdocSource, null, null); + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } } // Check if new metadata already contains this doc - if (!newMap.containsKey(url)) { + if (doc != null && !newMap.containsKey(url)) { newMap.put(url, doc); remaining.addAll(doc.getImports()); } @@ -366,8 +396,29 @@ public class EndpointFactory { * If it has both @WebService and @WebServiceProvider annotations */ public static boolean verifyImplementorClass(Class clz) { - WebServiceProvider wsProvider = clz.getAnnotation(WebServiceProvider.class); - WebService ws = clz.getAnnotation(WebService.class); + return verifyImplementorClass(clz, null); + } + + /** + * Verifies if the endpoint implementor class has @WebService or @WebServiceProvider + * annotation; passing MetadataReader instance allows to read annotations from + * xml descriptor instead of class's annotations + * + * @return + * true if it is a Provider or AsyncProvider endpoint + * false otherwise + * @throws java.lang.IllegalArgumentException + * If it doesn't have any one of @WebService or @WebServiceProvider + * If it has both @WebService and @WebServiceProvider annotations + */ + public static boolean verifyImplementorClass(Class clz, MetadataReader metadataReader) { + + if (metadataReader == null) { + metadataReader = new ReflectAnnotationReader(); + } + + WebServiceProvider wsProvider = metadataReader.getAnnotation(WebServiceProvider.class, clz); + WebService ws = metadataReader.getAnnotation(WebService.class, clz); if (wsProvider == null && ws == null) { throw new IllegalArgumentException(clz +" has neither @WebService nor @WebServiceProvider annotation"); } @@ -415,10 +466,22 @@ public class EndpointFactory { // config.getMappingInfo().setBindingID(binding.getBindingId()); config.setClassLoader(implType.getClassLoader()); config.getMappingInfo().setPortName(portName); + + config.setMetadataReader(getExternalMetadatReader(implType, binding)); + com.sun.xml.internal.ws.db.DatabindingImpl rt = (com.sun.xml.internal.ws.db.DatabindingImpl)fac.createRuntime(config); return (AbstractSEIModelImpl) rt.getModel(); } + public static MetadataReader getExternalMetadatReader(Class implType, WSBinding binding) { + com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature ef = binding.getFeature( + com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature.class); + // TODO-Miran: would it be necessary to disable secure xml processing? + if (ef != null) + return ef.getMetadataReader(implType.getClassLoader(), false); + return null; + } + /** *Set the mtom enable setting from wsdl model (mtom policy assertion) on to @link WSBinding} if DD has * not already set it on BindingID. Also check conflicts. @@ -443,18 +506,29 @@ public class EndpointFactory { * @return non-null service name */ public static @NotNull QName getDefaultServiceName(Class implType) { - return getDefaultServiceName(implType, true); + return getDefaultServiceName(implType, null); + } + + public static @NotNull QName getDefaultServiceName(Class implType, MetadataReader metadataReader) { + return getDefaultServiceName(implType, true, metadataReader); } public static @NotNull QName getDefaultServiceName(Class implType, boolean isStandard) { + return getDefaultServiceName(implType, isStandard, null); + } + + public static @NotNull QName getDefaultServiceName(Class implType, boolean isStandard, MetadataReader metadataReader) { + if (metadataReader == null) { + metadataReader = new ReflectAnnotationReader(); + } QName serviceName; - WebServiceProvider wsProvider = implType.getAnnotation(WebServiceProvider.class); + WebServiceProvider wsProvider = metadataReader.getAnnotation(WebServiceProvider.class, implType); if (wsProvider!=null) { String tns = wsProvider.targetNamespace(); String local = wsProvider.serviceName(); serviceName = new QName(tns, local); } else { - serviceName = RuntimeModeler.getServiceName(implType, isStandard); + serviceName = RuntimeModeler.getServiceName(implType, metadataReader, isStandard); } assert serviceName != null; return serviceName; @@ -467,18 +541,29 @@ public class EndpointFactory { * @return non-null port name */ public static @NotNull QName getDefaultPortName(QName serviceName, Class implType) { - return getDefaultPortName(serviceName, implType, true); + return getDefaultPortName(serviceName, implType, null); + } + + public static @NotNull QName getDefaultPortName(QName serviceName, Class implType, MetadataReader metadataReader) { + return getDefaultPortName(serviceName, implType, true, metadataReader); } public static @NotNull QName getDefaultPortName(QName serviceName, Class implType, boolean isStandard) { + return getDefaultPortName(serviceName, implType, isStandard, null); + } + + public static @NotNull QName getDefaultPortName(QName serviceName, Class implType, boolean isStandard, MetadataReader metadataReader) { + if (metadataReader == null) { + metadataReader = new ReflectAnnotationReader(); + } QName portName; - WebServiceProvider wsProvider = implType.getAnnotation(WebServiceProvider.class); + WebServiceProvider wsProvider = metadataReader.getAnnotation(WebServiceProvider.class, implType); if (wsProvider!=null) { String tns = wsProvider.targetNamespace(); String local = wsProvider.portName(); portName = new QName(tns, local); } else { - portName = RuntimeModeler.getPortName(implType, serviceName.getNamespaceURI(), isStandard); + portName = RuntimeModeler.getPortName(implType, metadataReader, serviceName.getNamespaceURI(), isStandard); } assert portName != null; return portName; @@ -494,19 +579,39 @@ public class EndpointFactory { * @return wsdl if there is wsdlLocation, else null */ public static @Nullable String getWsdlLocation(Class implType) { - String wsdl; - WebService ws = implType.getAnnotation(WebService.class); + return getWsdlLocation(implType, new ReflectAnnotationReader()); + } + + /** + * Returns the wsdl from @WebService, or @WebServiceProvider annotation using + * wsdlLocation element. + * + * @param implType + * endpoint implementation class + * make sure that you called {@link #verifyImplementorClass} on it. + * @return wsdl if there is wsdlLocation, else null + */ + public static @Nullable String getWsdlLocation(Class implType, MetadataReader metadataReader) { + + if (metadataReader == null) { + metadataReader = new ReflectAnnotationReader(); + } + + WebService ws = metadataReader.getAnnotation(WebService.class, implType); if (ws != null) { - wsdl = ws.wsdlLocation(); + return nullIfEmpty(ws.wsdlLocation()); } else { WebServiceProvider wsProvider = implType.getAnnotation(WebServiceProvider.class); assert wsProvider != null; - wsdl = wsProvider.wsdlLocation(); + return nullIfEmpty(wsProvider.wsdlLocation()); } - if (wsdl.length() < 1) { - wsdl = null; + } + + private static String nullIfEmpty(String string) { + if (string.length() < 1) { + string = null; } - return wsdl; + return string; } /** @@ -532,6 +637,7 @@ public class EndpointFactory { wsdlGenInfo.setContainer(container); wsdlGenInfo.setExtensions(ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); wsdlGenInfo.setInlineSchemas(false); + wsdlGenInfo.setSecureXmlProcessingDisabled(isSecureXmlProcessingDisabled(binding.getFeatures())); seiModel.getDatabinding().generateWSDL(wsdlGenInfo); // WSDLGenerator wsdlGen = new WSDLGenerator(seiModel, wsdlResolver, binding, container, implType, false, // ServiceFinder.find(WSDLGeneratorExtension.class).toArray()); @@ -539,6 +645,11 @@ public class EndpointFactory { return wsdlResolver.updateDocs(); } + private static boolean isSecureXmlProcessingDisabled(WSFeatureList featureList) { + // TODO-Miran: would it be necessary to disable secure xml processing? + return false; + } + /** * Builds {@link SDDocumentImpl} from {@link SDDocumentSource}. */ @@ -619,12 +730,13 @@ public class EndpointFactory { * @return non-null wsdl port object */ private static @NotNull WSDLPortImpl getWSDLPort(SDDocumentSource primaryWsdl, List metadata, - @NotNull QName serviceName, @NotNull QName portName, Container container) { + @NotNull QName serviceName, @NotNull QName portName, Container container, + EntityResolver resolver) { URL wsdlUrl = primaryWsdl.getSystemId(); try { // TODO: delegate to another entity resolver WSDLModelImpl wsdlDoc = RuntimeWSDLParser.parse( - new Parser(primaryWsdl), new EntityResolverImpl(metadata), + new Parser(primaryWsdl), new EntityResolverImpl(metadata, resolver), false, container, ServiceFinder.find(WSDLParserExtension.class).toArray()); if(wsdlDoc.getServices().size() == 0) { throw new ServerRtException(ServerMessages.localizableRUNTIME_PARSER_WSDL_NOSERVICE_IN_WSDLMODEL(wsdlUrl)); @@ -654,11 +766,13 @@ public class EndpointFactory { */ private static final class EntityResolverImpl implements XMLEntityResolver { private Map metadata = new HashMap(); + private EntityResolver resolver; - public EntityResolverImpl(List metadata) { + public EntityResolverImpl(List metadata, EntityResolver resolver) { for (SDDocumentSource doc : metadata) { this.metadata.put(doc.getSystemId().toExternalForm(),doc); } + this.resolver = resolver; } public Parser resolveEntity (String publicId, String systemId) throws IOException, XMLStreamException { @@ -667,6 +781,17 @@ public class EndpointFactory { if (doc != null) return new Parser(doc); } + if (resolver != null) { + try { + InputSource source = resolver.resolveEntity(publicId, systemId); + if (source != null) { + Parser p = new Parser(null, XMLStreamReaderFactory.create(source, true)); + return p; + } + } catch (SAXException e) { + throw new XMLStreamException(e); + } + } return null; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java index 6aa086f3d11..0bbd2b3cbbb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/EndpointMessageContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -51,7 +51,6 @@ import javax.activation.DataHandler; * * @author Jitendra Kotamraju */ -@SuppressWarnings({"SuspiciousMethodCalls"}) public final class EndpointMessageContextImpl extends AbstractMap implements MessageContext { /** @@ -69,6 +68,7 @@ public final class EndpointMessageContextImpl extends AbstractMap } @Override + @SuppressWarnings("element-type-mismatch") public Object get(Object key) { if (packet.supports(key)) { return packet.get(key); // strongly typed @@ -113,6 +113,7 @@ public final class EndpointMessageContextImpl extends AbstractMap } @Override + @SuppressWarnings("element-type-mismatch") public Object remove(Object key) { if (packet.supports(key)) { return packet.remove(key); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java index 1d7ee238a97..2ff8baf8667 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/InvokerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java index 334c968bb9e..7d56bf3f2a7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,14 +26,11 @@ package com.sun.xml.internal.ws.server; import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.config.management.policy.ManagedClientAssertion; import com.sun.xml.internal.ws.api.config.management.policy.ManagedServiceAssertion; import com.sun.xml.internal.ws.api.config.management.policy.ManagementAssertion.Setting; -import com.sun.xml.internal.ws.api.server.BoundEndpoint; import com.sun.xml.internal.ws.api.server.Container; -import com.sun.xml.internal.ws.api.server.Module; import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.client.Stub; import com.sun.org.glassfish.external.amx.AMXGlassfish; @@ -45,16 +42,11 @@ import com.sun.org.glassfish.gmbal.ManagedObjectManager; import com.sun.org.glassfish.gmbal.ManagedObjectManagerFactory; import java.io.IOException; import java.lang.reflect.*; -import java.net.URL; -import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; -import javax.management.ObjectName; -import javax.xml.namespace.QName; // BEGIN IMPORTS FOR RewritingMOM import java.util.ResourceBundle ; -import java.io.Closeable ; import java.lang.reflect.AnnotatedElement ; import java.lang.annotation.Annotation ; import javax.management.ObjectName ; @@ -276,7 +268,7 @@ public abstract class MonitorBase { ObjectName ignoredName = mom.getObjectName(mom.getRoot()); // The name is null when the MOM is a NOOP. if (ignoredName != null) { - logger.log(Level.INFO, "Metro monitoring rootname successfully set to: " + ignoredName); + logger.log(Level.INFO, "Metro monitoring rootname successfully set to: {0}", ignoredName); } return mom; } @@ -300,19 +292,6 @@ public abstract class MonitorBase { } } - public static void closeMOM(ManagedObjectManager mom) { - try { - final ObjectName name = mom.getObjectName(mom.getRoot()); - // The name is null when the MOM is a NOOP. - if (name != null) { - logger.log(Level.INFO, "Closing Metro monitoring root: " + name); - } - mom.close(); - } catch (java.io.IOException e) { - logger.log(Level.WARNING, "Ignoring error when closing Managed Object Manager", e); - } - } - private static Setting clientMonitoring = Setting.NOT_SET; private static Setting endpointMonitoring = Setting.NOT_SET; private static int typelibDebug = -1; @@ -382,7 +361,6 @@ class RewritingMOM implements ManagedObjectManager private final ManagedObjectManager mom; private final static String gmbalQuotingCharsRegex = "\n|\\|\"|\\*|\\?|:|=|,"; - private final static String jmxQuotingCharsRegex = ",|=|:|\""; private final static String replacementChar = "-"; RewritingMOM(final ManagedObjectManager mom) { this.mom = mom; } @@ -393,42 +371,42 @@ class RewritingMOM implements ManagedObjectManager // The interface - public void suspendJMXRegistration() { mom.suspendJMXRegistration(); } - public void resumeJMXRegistration() { mom.resumeJMXRegistration(); } - public GmbalMBean createRoot() { return mom.createRoot(); } - public GmbalMBean createRoot(Object root) { return mom.createRoot(root); } - public GmbalMBean createRoot(Object root, String name) { + @Override public void suspendJMXRegistration() { mom.suspendJMXRegistration(); } + @Override public void resumeJMXRegistration() { mom.resumeJMXRegistration(); } + @Override public GmbalMBean createRoot() { return mom.createRoot(); } + @Override public GmbalMBean createRoot(Object root) { return mom.createRoot(root); } + @Override public GmbalMBean createRoot(Object root, String name) { return mom.createRoot(root, rewrite(name)); } - public Object getRoot() { return mom.getRoot(); } - public GmbalMBean register(Object parent, Object obj, String name) { + @Override public Object getRoot() { return mom.getRoot(); } + @Override public GmbalMBean register(Object parent, Object obj, String name) { return mom.register(parent, obj, rewrite(name)); } - public GmbalMBean register(Object parent, Object obj) { return mom.register(parent, obj);} - public GmbalMBean registerAtRoot(Object obj, String name) { + @Override public GmbalMBean register(Object parent, Object obj) { return mom.register(parent, obj);} + @Override public GmbalMBean registerAtRoot(Object obj, String name) { return mom.registerAtRoot(obj, rewrite(name)); } - public GmbalMBean registerAtRoot(Object obj) { return mom.registerAtRoot(obj); } - public void unregister(Object obj) { mom.unregister(obj); } - public ObjectName getObjectName(Object obj) { return mom.getObjectName(obj); } - public AMXClient getAMXClient(Object obj) { return mom.getAMXClient(obj); } - public Object getObject(ObjectName oname) { return mom.getObject(oname); } - public void stripPrefix(String... str) { mom.stripPrefix(str); } - public void stripPackagePrefix() { mom.stripPackagePrefix(); } - public String getDomain() { return mom.getDomain(); } - public void setMBeanServer(MBeanServer server){mom.setMBeanServer(server); } - public MBeanServer getMBeanServer() { return mom.getMBeanServer(); } - public void setResourceBundle(ResourceBundle rb) { mom.setResourceBundle(rb); } - public ResourceBundle getResourceBundle() { return mom.getResourceBundle(); } - public void addAnnotation(AnnotatedElement element, Annotation annotation) { mom.addAnnotation(element, annotation); } - public void setRegistrationDebug(RegistrationDebugLevel level) { mom.setRegistrationDebug(level); } - public void setRuntimeDebug(boolean flag) { mom.setRuntimeDebug(flag); } - public void setTypelibDebug(int level) { mom.setTypelibDebug(level); } - public String dumpSkeleton(Object obj) { return mom.dumpSkeleton(obj); } - public void suppressDuplicateRootReport(boolean suppressReport) { mom.suppressDuplicateRootReport(suppressReport); } - public void close() throws IOException { mom.close(); } - public void setJMXRegistrationDebug(boolean x) { mom.setJMXRegistrationDebug(x); } - public boolean isManagedObject(Object x) { return mom.isManagedObject(x); } + @Override public GmbalMBean registerAtRoot(Object obj) { return mom.registerAtRoot(obj); } + @Override public void unregister(Object obj) { mom.unregister(obj); } + @Override public ObjectName getObjectName(Object obj) { return mom.getObjectName(obj); } + @Override public AMXClient getAMXClient(Object obj) { return mom.getAMXClient(obj); } + @Override public Object getObject(ObjectName oname) { return mom.getObject(oname); } + @Override public void stripPrefix(String... str) { mom.stripPrefix(str); } + @Override public void stripPackagePrefix() { mom.stripPackagePrefix(); } + @Override public String getDomain() { return mom.getDomain(); } + @Override public void setMBeanServer(MBeanServer server){mom.setMBeanServer(server); } + @Override public MBeanServer getMBeanServer() { return mom.getMBeanServer(); } + @Override public void setResourceBundle(ResourceBundle rb) { mom.setResourceBundle(rb); } + @Override public ResourceBundle getResourceBundle() { return mom.getResourceBundle(); } + @Override public void addAnnotation(AnnotatedElement element, Annotation annotation) { mom.addAnnotation(element, annotation); } + @Override public void setRegistrationDebug(RegistrationDebugLevel level) { mom.setRegistrationDebug(level); } + @Override public void setRuntimeDebug(boolean flag) { mom.setRuntimeDebug(flag); } + @Override public void setTypelibDebug(int level) { mom.setTypelibDebug(level); } + @Override public String dumpSkeleton(Object obj) { return mom.dumpSkeleton(obj); } + @Override public void suppressDuplicateRootReport(boolean suppressReport) { mom.suppressDuplicateRootReport(suppressReport); } + @Override public void close() throws IOException { mom.close(); } + @Override public void setJMXRegistrationDebug(boolean x) { mom.setJMXRegistrationDebug(x); } + @Override public boolean isManagedObject(Object x) { return mom.isManagedObject(x); } } // End of file. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java index d78987d1726..1972be8f796 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/MonitorRootService.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,63 +26,20 @@ package com.sun.xml.internal.ws.server; import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.WSFeatureList; -import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; -import com.sun.xml.internal.ws.api.addressing.WSEndpointReference; -import com.sun.xml.internal.ws.api.message.Message; -import com.sun.xml.internal.ws.api.message.Packet; -import com.sun.xml.internal.ws.api.model.SEIModel; -import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; -import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundPortType; -import com.sun.xml.internal.ws.api.model.wsdl.WSDLService; -import com.sun.xml.internal.ws.api.pipe.Codec; -import com.sun.xml.internal.ws.api.pipe.Engine; -import com.sun.xml.internal.ws.api.pipe.Fiber; -import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor; -import com.sun.xml.internal.ws.api.pipe.ServerPipeAssemblerContext; -import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; -import com.sun.xml.internal.ws.api.pipe.Tube; -import com.sun.xml.internal.ws.api.pipe.TubeCloner; -import com.sun.xml.internal.ws.api.pipe.TubelineAssembler; -import com.sun.xml.internal.ws.api.pipe.TubelineAssemblerFactory; import com.sun.xml.internal.ws.api.server.*; -import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; -import com.sun.xml.internal.ws.model.wsdl.WSDLProperties; -import com.sun.xml.internal.ws.model.wsdl.WSDLPortImpl; -import com.sun.xml.internal.ws.resources.HandlerMessages; import com.sun.xml.internal.ws.transport.http.HttpAdapter; import com.sun.xml.internal.ws.util.RuntimeVersion; -import com.sun.org.glassfish.external.amx.AMXGlassfish; import com.sun.org.glassfish.gmbal.AMXMetadata; import com.sun.org.glassfish.gmbal.Description; -import com.sun.org.glassfish.gmbal.InheritedAttribute; -import com.sun.org.glassfish.gmbal.InheritedAttributes; import com.sun.org.glassfish.gmbal.ManagedAttribute; -import com.sun.org.glassfish.gmbal.ManagedData; import com.sun.org.glassfish.gmbal.ManagedObject; -import com.sun.org.glassfish.gmbal.ManagedObjectManager; -import com.sun.org.glassfish.gmbal.ManagedObjectManagerFactory; import java.net.URL; -import javax.management.ObjectName; - - -import javax.annotation.PreDestroy; import javax.xml.namespace.QName; -import javax.xml.ws.EndpointReference; -import javax.xml.ws.WebServiceException; -import javax.xml.ws.handler.Handler; -import javax.xml.stream.XMLStreamException; -import javax.management.InstanceAlreadyExistsException; -import java.lang.reflect.Method; import java.util.*; -import java.util.concurrent.Executor; -import java.util.logging.Level; -import java.util.logging.Logger; /** * @author Harold Carr @@ -128,28 +85,6 @@ public final class MonitorRootService extends MonitorBase { return endpoint.getServiceName(); } - // - // Items from assembler context - // - /* NOTE: These are not ready when the AMX Validator runs so NPE. - @ManagedAttribute - @Description("The last tube in the dispatch chain") - public @NotNull Tube terminalTube() { - return endpoint.getAssemblerContext().getTerminalTube(); - } - - @ManagedAttribute - @Description("True if tubeline is known to be used for serving synchronous transport") - public boolean synchronous() { - return endpoint.getAssemblerContext().isSynchronous(); - } - - @ManagedAttribute - @Description("") - public String codecMimeType() { - return endpoint.getAssemblerContext().getCodec().getMimeType(); - } - */ // // Items from WSBinding // @@ -246,7 +181,7 @@ public final class MonitorRootService extends MonitorBase { @ManagedAttribute @Description("Show what goes across HTTP transport") - public void dumpHTTPMessages(final boolean x) { HttpAdapter.dump = x; } + public void dumpHTTPMessages(final boolean x) { HttpAdapter.setDump(x); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java index d4edf4fc9f3..4618541834d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SDDocumentImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java index 96b7661c1ec..bfc52906c92 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerPropertyConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java index 24b8176d6e3..7ce5b6eb6cb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerRtException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.server; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** */ diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java index 03803dcde20..8319adf63ee 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServerSchemaValidationTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java index edc4c16836a..3a5f4ba2dca 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/ServiceDefinitionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java index a090af36519..f2645a89ba1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/SingletonResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java index 3426dc11d35..7c915608802 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/UnsupportedMediaException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java index 55953d0e89b..5b89c3e23d7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSDLGenResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,7 +30,6 @@ import com.sun.xml.internal.stream.buffer.MutableXMLStreamBuffer; import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult; import com.sun.xml.internal.ws.api.server.SDDocument; import com.sun.xml.internal.ws.api.server.SDDocumentSource; -import com.sun.xml.internal.ws.wsdl.writer.WSDLResolver; import javax.xml.namespace.QName; import javax.xml.transform.Result; @@ -49,7 +48,7 @@ import java.util.Map; * * @author Jitendra Kotamraju */ -final class WSDLGenResolver implements WSDLResolver { +final class WSDLGenResolver implements com.oracle.webservices.internal.api.databinding.WSDLResolver { private final List docs; private final List newDocs = new ArrayList(); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java index 6e8548b006c..cd9dd1fa96d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import com.sun.xml.internal.ws.addressing.EPRSDDocumentFilter; import com.sun.xml.internal.ws.addressing.WSEPRExtension; import com.sun.xml.internal.ws.api.Component; import com.sun.xml.internal.ws.api.ComponentFeature; +import com.sun.xml.internal.ws.api.ComponentsFeature; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; @@ -40,25 +41,8 @@ import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.SEIModel; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; -import com.sun.xml.internal.ws.api.pipe.Codec; -import com.sun.xml.internal.ws.api.pipe.Engine; -import com.sun.xml.internal.ws.api.pipe.Fiber; -import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor; -import com.sun.xml.internal.ws.api.pipe.ServerPipeAssemblerContext; -import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; -import com.sun.xml.internal.ws.api.pipe.SyncStartForAsyncFeature; -import com.sun.xml.internal.ws.api.pipe.Tube; -import com.sun.xml.internal.ws.api.pipe.TubeCloner; -import com.sun.xml.internal.ws.api.pipe.TubelineAssembler; -import com.sun.xml.internal.ws.api.pipe.TubelineAssemblerFactory; -import com.sun.xml.internal.ws.api.server.Container; -import com.sun.xml.internal.ws.api.server.EndpointAwareCodec; -import com.sun.xml.internal.ws.api.server.EndpointComponent; -import com.sun.xml.internal.ws.api.server.EndpointReferenceExtensionContributor; -import com.sun.xml.internal.ws.api.server.LazyMOMProvider; -import com.sun.xml.internal.ws.api.server.TransportBackChannel; -import com.sun.xml.internal.ws.api.server.WSEndpoint; -import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate; +import com.sun.xml.internal.ws.api.pipe.*; +import com.sun.xml.internal.ws.api.server.*; import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; import com.sun.xml.internal.ws.model.wsdl.WSDLDirectProperties; @@ -81,18 +65,12 @@ import javax.xml.ws.EndpointReference; import javax.xml.ws.WebServiceException; import javax.xml.ws.handler.Handler; import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.concurrent.CopyOnWriteArraySet; import java.util.concurrent.Executor; import java.util.logging.Level; import java.util.logging.Logger; +import javax.management.ObjectName; /** * {@link WSEndpoint} implementation. @@ -101,41 +79,42 @@ import java.util.logging.Logger; * @author Jitendra Kotamraju */ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMOMProvider.WSEndpointScopeChangeListener { - private static final Logger LOGGER = Logger.getLogger(WSEndpointImpl.class.getName()); + + private static final Logger logger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.endpoint"); private final @NotNull QName serviceName; private final @NotNull QName portName; - protected final WSBinding binding; - private final SEIModel seiModel; + protected final WSBinding binding; + private final SEIModel seiModel; private final @NotNull Container container; - private final WSDLPort port; + private final WSDLPort port; - protected final Tube masterTubeline; - private final ServiceDefinitionImpl serviceDef; - private final SOAPVersion soapVersion; - private final Engine engine; + protected final Tube masterTubeline; + private final ServiceDefinitionImpl serviceDef; + private final SOAPVersion soapVersion; + private final Engine engine; private final @NotNull Codec masterCodec; private final @NotNull PolicyMap endpointPolicy; - private final Pool tubePool; + private final Pool tubePool; private final OperationDispatcher operationDispatcher; - private @NotNull ManagedObjectManager managedObjectManager; - private boolean managedObjectManagerClosed = false; - private Object managedObjectManagerLock = new Object(); - private LazyMOMProvider.Scope lazyMOMProviderScope = LazyMOMProvider.Scope.STANDALONE; + private @NotNull ManagedObjectManager managedObjectManager; + private boolean managedObjectManagerClosed = false; + private final Object managedObjectManagerLock = new Object(); + private LazyMOMProvider.Scope lazyMOMProviderScope = LazyMOMProvider.Scope.STANDALONE; private final @NotNull ServerTubeAssemblerContext context; private Map endpointReferenceExtensions = new HashMap(); - /** - * Set to true once we start shutting down this endpoint. - * Used to avoid running the clean up processing twice. - * - * @see #dispose() - */ - private boolean disposed; - - private final Class implementationClass; - private final @NotNull WSDLProperties wsdlProperties; - private final Set componentRegistry = new CopyOnWriteArraySet(); + /** + * Set to true once we start shutting down this endpoint. Used to avoid + * running the clean up processing twice. + * + * @see #dispose() + */ + private boolean disposed; + private final Class implementationClass; + private final @NotNull + WSDLProperties wsdlProperties; + private final Set componentRegistry = new CopyOnWriteArraySet(); protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, SEIModel seiModel, WSDLPort port, @@ -157,44 +136,60 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO LazyMOMProvider.INSTANCE.registerEndpoint(this); initManagedObjectManager(); - if (serviceDef != null) { - serviceDef.setOwner(this); - } + if (serviceDef != null) { + serviceDef.setOwner(this); + } - ComponentFeature cf = binding.getFeature(ComponentFeature.class); - if (cf != null) { - switch(cf.getTarget()) { - case ENDPOINT: - componentRegistry.add(cf.getComponent()); - break; - case CONTAINER: - container.getComponents().add(cf.getComponent()); - default: - throw new IllegalArgumentException(); - } + ComponentFeature cf = binding.getFeature(ComponentFeature.class); + if (cf != null) { + switch (cf.getTarget()) { + case ENDPOINT: + componentRegistry.add(cf.getComponent()); + break; + case CONTAINER: + container.getComponents().add(cf.getComponent()); + break; + default: + throw new IllegalArgumentException(); + } + } + ComponentsFeature csf = binding.getFeature(ComponentsFeature.class); + if (csf != null) { + for (ComponentFeature cfi : csf.getComponentFeatures()) { + switch (cfi.getTarget()) { + case ENDPOINT: + componentRegistry.add(cfi.getComponent()); + break; + case CONTAINER: + container.getComponents().add(cfi.getComponent()); + break; + default: + throw new IllegalArgumentException(); } + } + } TubelineAssembler assembler = TubelineAssemblerFactory.create( Thread.currentThread().getContextClassLoader(), binding.getBindingId(), container); - assert assembler != null; + assert assembler != null; this.operationDispatcher = (port == null) ? null : new OperationDispatcher(port, binding, seiModel); context = createServerTubeAssemblerContext(terminalTube, isSynchronous); - this.masterTubeline = assembler.createServer(context); + this.masterTubeline = assembler.createServer(context); - Codec c = context.getCodec(); - if (c instanceof EndpointAwareCodec) { + Codec c = context.getCodec(); + if (c instanceof EndpointAwareCodec) { // create a copy to avoid sharing the codec between multiple endpoints - c = c.copy(); - ((EndpointAwareCodec) c).setEndpoint(this); - } - this.masterCodec = c; + c = c.copy(); + ((EndpointAwareCodec) c).setEndpoint(this); + } + this.masterCodec = c; - tubePool = new TubePool(masterTubeline); - terminalTube.setEndpoint(this); - engine = new Engine(toString()); - wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); + tubePool = new TubePool(masterTubeline); + terminalTube.setEndpoint(this); + engine = new Engine(toString(), container); + wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); Map eprExtensions = new HashMap(); try { @@ -230,9 +225,9 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO protected ServerTubeAssemblerContext createServerTubeAssemblerContext( EndpointAwareTube terminalTube, boolean isSynchronous) { - ServerTubeAssemblerContext context = new ServerPipeAssemblerContext( + ServerTubeAssemblerContext ctx = new ServerPipeAssemblerContext( seiModel, port, this, terminalTube, isSynchronous); - return context; + return ctx; } protected WSEndpointImpl(@NotNull QName serviceName, @NotNull QName portName, WSBinding binding, Container container, @@ -259,7 +254,7 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO seiModel, port, this, null /* not known */, false); tubePool = new TubePool(masterTubeline); - engine = new Engine(toString()); + engine = new Engine(toString(), container); wsdlProperties = (port == null) ? new WSDLDirectProperties(serviceName, portName, seiModel) : new WSDLPortProperties(port, seiModel); } @@ -313,96 +308,143 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO processAsync(request, callback, interceptor, true); } - private void processAsync(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor, boolean schedule) { - request.endpoint = WSEndpointImpl.this; - request.addSatellite(wsdlProperties); + private void processAsync(final Packet request, + final CompletionCallback callback, + FiberContextSwitchInterceptor interceptor, boolean schedule) { + Container old = ContainerResolver.getDefault().enterContainer(container); + try { + request.endpoint = WSEndpointImpl.this; + request.addSatellite(wsdlProperties); - Fiber fiber = engine.createFiber(); - if (interceptor != null) { - fiber.addInterceptor(interceptor); + Fiber fiber = engine.createFiber(); + fiber.setDeliverThrowableInPacket(true); + if (interceptor != null) { + fiber.addInterceptor(interceptor); + } + final Tube tube = tubePool.take(); + Fiber.CompletionCallback cbak = new Fiber.CompletionCallback() { + public void onCompletion(@NotNull Packet response) { + ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class); + if (tc == null) { + // Only recycle tubes in non-exception path as some Tubes may be + // in invalid state following exception + tubePool.recycle(tube); + } + + if (callback != null) { + if (tc != null) { + response = createServiceResponseForException(tc, + response, + soapVersion, + request.endpoint.getPort(), + null, + request.endpoint.getBinding()); + } + callback.onCompletion(response); + } } - final Tube tube = tubePool.take(); - Fiber.CompletionCallback cbak = new Fiber.CompletionCallback() { - public void onCompletion(@NotNull Packet response) { - tubePool.recycle(tube); - if (callback != null) { - callback.onCompletion(response); - } - } - public void onCompletion(@NotNull Throwable error) { - // let's not reuse tubes as they might be in a wrong state, so not - // calling tubePool.recycle() - // Convert all runtime exceptions to Packet so that transport doesn't - // have to worry about converting to wire message - // TODO XML/HTTP binding - Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage( - soapVersion, null, error); - Packet response = request.createServerResponse(faultMsg, request.endpoint.getPort(), null, - request.endpoint.getBinding()); - if (callback != null) { - callback.onCompletion(response); - } - } - }; + public void onCompletion(@NotNull Throwable error) { + // will never be called now that we are using + // fiber.setDeliverThrowableInPacket(true); + throw new IllegalStateException(); + } + }; - fiber.start(tube, request, cbak, - binding.isFeatureEnabled(SyncStartForAsyncFeature.class) || !schedule); + fiber.start(tube, request, cbak, + binding.isFeatureEnabled(SyncStartForAsyncFeature.class) + || !schedule); + } finally { + ContainerResolver.getDefault().exitContainer(old); } + } + + @Override + public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc, + final Packet responsePacket, + final SOAPVersion soapVersion, + final WSDLPort wsdlPort, + final SEIModel seiModel, + final WSBinding binding) + { + // This will happen in addressing if it is enabled. + if (tc.isFaultCreated()) return responsePacket; + + final Message faultMessage = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, tc.getThrowable()); + final Packet result = responsePacket.createServerResponse(faultMessage, wsdlPort, seiModel, binding); + // Pass info to upper layers + tc.setFaultMessage(faultMessage); + tc.setResponsePacket(responsePacket); + tc.setFaultCreated(true); + return result; + } @Override public void process(final Packet request, final CompletionCallback callback, FiberContextSwitchInterceptor interceptor) { processAsync(request, callback, interceptor, false); } - public @NotNull PipeHead createPipeHead() { - return new PipeHead() { - private final Tube tube = TubeCloner.clone(masterTubeline); + public @NotNull + PipeHead createPipeHead() { + return new PipeHead() { + private final Tube tube = TubeCloner.clone(masterTubeline); - public @NotNull Packet process(Packet request, WebServiceContextDelegate wscd, TransportBackChannel tbc) { - request.webServiceContextDelegate = wscd; - request.transportBackChannel = tbc; - request.endpoint = WSEndpointImpl.this; - request.addSatellite(wsdlProperties); + public @NotNull + Packet process(Packet request, WebServiceContextDelegate wscd, + TransportBackChannel tbc) { + Container old = ContainerResolver.getDefault().enterContainer(container); + try { + request.webServiceContextDelegate = wscd; + request.transportBackChannel = tbc; + request.endpoint = WSEndpointImpl.this; + request.addSatellite(wsdlProperties); - Fiber fiber = engine.createFiber(); - Packet response; - try { - response = fiber.runSync(tube, request); - } catch (RuntimeException re) { - // Catch all runtime exceptions so that transport doesn't - // have to worry about converting to wire message - // TODO XML/HTTP binding - Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage( - soapVersion, null, re); - response = request.createServerResponse(faultMsg, request.endpoint.getPort(), null, request.endpoint.getBinding()); - } - return response; - } - }; - } + Fiber fiber = engine.createFiber(); + Packet response; + try { + response = fiber.runSync(tube, request); + } catch (RuntimeException re) { + // Catch all runtime exceptions so that transport + // doesn't + // have to worry about converting to wire message + // TODO XML/HTTP binding + Message faultMsg = SOAPFaultBuilder + .createSOAPFaultMessage(soapVersion, null, re); + response = request.createServerResponse(faultMsg, + request.endpoint.getPort(), null, + request.endpoint.getBinding()); + } + return response; + } finally { + ContainerResolver.getDefault().exitContainer(old); + } + } + }; + } public synchronized void dispose() { - if (disposed) - return; - disposed = true; + if (disposed) { + return; + } + disposed = true; - masterTubeline.preDestroy(); + masterTubeline.preDestroy(); - for (Handler handler : binding.getHandlerChain()) { - for (Method method : handler.getClass().getMethods()) { - if (method.getAnnotation(PreDestroy.class) == null) { - continue; - } - try { - method.invoke(handler); - } catch (Exception e) { - logger.log(Level.WARNING, HandlerMessages.HANDLER_PREDESTROY_IGNORE(e.getMessage()), e); - } - break; - } + for (Handler handler : binding.getHandlerChain()) { + for (Method method : handler.getClass().getMethods()) { + if (method.getAnnotation(PreDestroy.class) == null) { + continue; + } + try { + method.invoke(handler); + } catch (Exception e) { + logger.log(Level.WARNING, HandlerMessages.HANDLER_PREDESTROY_IGNORE(e.getMessage()), e); + } + break; } - closeManagedObjectManager(); + } + closeManagedObjectManager(); + LazyMOMProvider.INSTANCE.unregisterEndpoint(this); } public ServiceDefinitionImpl getServiceDefinition() { @@ -488,7 +530,7 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO @Override public boolean equals(Object obj) { - return component.equals(obj); + return component.equals(obj); } } @@ -514,34 +556,32 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO } } + @Override public @NotNull Set getComponents() { return componentRegistry; } - private static final Logger logger = Logger.getLogger( - com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.endpoint"); - - public T getEndpointReference(Class - clazz, String address, String wsdlAddress, Element... referenceParameters) { + public T getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters) { List refParams = null; if (referenceParameters != null) { refParams = Arrays.asList(referenceParameters); } return getEndpointReference(clazz, address, wsdlAddress, null, refParams); } + public T getEndpointReference(Class clazz, - String address, String wsdlAddress, List metadata, - List referenceParameters) { - QName portType = null; - if (port != null) { - portType = port.getBinding().getPortTypeName(); - } + String address, String wsdlAddress, List metadata, + List referenceParameters) { + QName portType = null; + if (port != null) { + portType = port.getBinding().getPortTypeName(); + } AddressingVersion av = AddressingVersion.fromSpecClass(clazz); return new WSEndpointReference( - av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters,endpointReferenceExtensions.values(), null).toSpec(clazz); + av, address, serviceName, portName, portType, metadata, wsdlAddress, referenceParameters, endpointReferenceExtensions.values(), null).toSpec(clazz); - } + } public @NotNull QName getPortName() { return portName; @@ -583,12 +623,12 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO */ @NotNull ManagedObjectManager obtainManagedObjectManager() { final MonitorRootService monitorRootService = new MonitorRootService(this); - final ManagedObjectManager managedObjectManager = monitorRootService.createManagedObjectManager(this); + final ManagedObjectManager mOM = monitorRootService.createManagedObjectManager(this); // ManagedObjectManager was suspended due to root creation (see MonitorBase#initMOM) - managedObjectManager.resumeJMXRegistration(); + mOM.resumeJMXRegistration(); - return managedObjectManager; + return mOM; } public void scopeChanged(LazyMOMProvider.Scope scope) { @@ -617,8 +657,11 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO } } + private static final Logger monitoringLogger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".monitoring"); + // This can be called independently of WSEndpoint.dispose. // Example: the WSCM framework calls this before dispose. + @Override public void closeManagedObjectManager() { synchronized (managedObjectManagerLock) { if (managedObjectManagerClosed == true) { @@ -634,16 +677,23 @@ public /*final*/ class WSEndpointImpl extends WSEndpoint implements LazyMO } if (close) { - // no further notification on scope change - LazyMOMProvider.INSTANCE.unregisterEndpoint(this); - MonitorBase.closeMOM(managedObjectManager); + try { + final ObjectName name = managedObjectManager.getObjectName(managedObjectManager.getRoot()); + // The name is null when the MOM is a NOOP. + if (name != null) { + monitoringLogger.log(Level.INFO, "Closing Metro monitoring root: {0}", name); + } + managedObjectManager.close(); + } catch (java.io.IOException e) { + monitoringLogger.log(Level.WARNING, "Ignoring error when closing Managed Object Manager", e); + } } } managedObjectManagerClosed = true; } } - public @NotNull ServerTubeAssemblerContext getAssemblerContext() { + public @NotNull @Override ServerTubeAssemblerContext getAssemblerContext() { return context; } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java index 9f4b6c5e734..65e7222f177 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/WSEndpointMOMProxy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,20 @@ package com.sun.xml.internal.ws.server; import com.sun.istack.internal.NotNull; +import com.sun.xml.internal.ws.api.SOAPVersion; +import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.api.pipe.Codec; +import com.sun.xml.internal.ws.api.pipe.FiberContextSwitchInterceptor; +import com.sun.xml.internal.ws.api.pipe.ServerTubeAssemblerContext; +import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet; +import com.sun.xml.internal.ws.api.server.Container; +import com.sun.xml.internal.ws.api.server.ServiceDefinition; +import com.sun.xml.internal.ws.api.server.WSEndpoint; +import com.sun.xml.internal.ws.policy.PolicyMap; +import com.sun.xml.internal.ws.wsdl.OperationDispatcher; import com.sun.org.glassfish.gmbal.AMXClient; import com.sun.org.glassfish.gmbal.GmbalMBean; import com.sun.org.glassfish.gmbal.ManagedObjectManager; @@ -35,7 +49,13 @@ import javax.management.ObjectName; import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; +import java.util.List; import java.util.ResourceBundle; +import java.util.Set; +import java.util.concurrent.Executor; +import javax.xml.namespace.QName; +import javax.xml.ws.EndpointReference; +import org.w3c.dom.Element; /** * {@link ManagedObjectManager} proxy class for {@link WSEndpointImpl} instances that could be used when Gmbal API calls @@ -43,7 +63,7 @@ import java.util.ResourceBundle; * method from {@link ManagedObjectManager} is invoked on it. In this case a real instance of ManagedObjectManager is * obtained from WSEndpointImpl and the method is rather invoked on this object. */ -public class WSEndpointMOMProxy implements ManagedObjectManager { +public class WSEndpointMOMProxy extends WSEndpoint implements ManagedObjectManager { private final @NotNull WSEndpointImpl wsEndpoint; @@ -58,7 +78,8 @@ public class WSEndpointMOMProxy implements ManagedObjectManager { * * @return an ManagedObjectManager instance */ - private ManagedObjectManager getManagedObjectManager() { + @Override + public ManagedObjectManager getManagedObjectManager() { if (managedObjectManager == null) { managedObjectManager = wsEndpoint.obtainManagedObjectManager(); } @@ -83,124 +104,275 @@ public class WSEndpointMOMProxy implements ManagedObjectManager { return wsEndpoint; } + @Override public void suspendJMXRegistration() { getManagedObjectManager().suspendJMXRegistration(); } + @Override public void resumeJMXRegistration() { getManagedObjectManager().resumeJMXRegistration(); } + @Override public boolean isManagedObject(Object obj) { return getManagedObjectManager().isManagedObject(obj); } + @Override public GmbalMBean createRoot() { return getManagedObjectManager().createRoot(); } + @Override public GmbalMBean createRoot(Object root) { return getManagedObjectManager().createRoot(root); } + @Override public GmbalMBean createRoot(Object root, String name) { return getManagedObjectManager().createRoot(root, name); } + @Override public Object getRoot() { return getManagedObjectManager().getRoot(); } + @Override public GmbalMBean register(Object parent, Object obj, String name) { return getManagedObjectManager().register(parent, obj, name); } + @Override public GmbalMBean register(Object parent, Object obj) { return getManagedObjectManager().register(parent, obj); } + @Override public GmbalMBean registerAtRoot(Object obj, String name) { return getManagedObjectManager().registerAtRoot(obj, name); } + @Override public GmbalMBean registerAtRoot(Object obj) { return getManagedObjectManager().registerAtRoot(obj); } + @Override public void unregister(Object obj) { getManagedObjectManager().unregister(obj); } + @Override public ObjectName getObjectName(Object obj) { return getManagedObjectManager().getObjectName(obj); } + @Override public AMXClient getAMXClient(Object obj) { return getManagedObjectManager().getAMXClient(obj); } + @Override public Object getObject(ObjectName oname) { return getManagedObjectManager().getObject(oname); } + @Override public void stripPrefix(String... str) { getManagedObjectManager().stripPrefix(str); } + @Override public void stripPackagePrefix() { getManagedObjectManager().stripPackagePrefix(); } + @Override public String getDomain() { return getManagedObjectManager().getDomain(); } + @Override public void setMBeanServer(MBeanServer server) { getManagedObjectManager().setMBeanServer(server); } + @Override public MBeanServer getMBeanServer() { return getManagedObjectManager().getMBeanServer(); } + @Override public void setResourceBundle(ResourceBundle rb) { getManagedObjectManager().setResourceBundle(rb); } + @Override public ResourceBundle getResourceBundle() { return getManagedObjectManager().getResourceBundle(); } + @Override public void addAnnotation(AnnotatedElement element, Annotation annotation) { getManagedObjectManager().addAnnotation(element, annotation); } + @Override public void setRegistrationDebug(RegistrationDebugLevel level) { getManagedObjectManager().setRegistrationDebug(level); } + @Override public void setRuntimeDebug(boolean flag) { getManagedObjectManager().setRuntimeDebug(flag); } + @Override public void setTypelibDebug(int level) { getManagedObjectManager().setTypelibDebug(level); } + @Override public void setJMXRegistrationDebug(boolean flag) { getManagedObjectManager().setJMXRegistrationDebug(flag); } + @Override public String dumpSkeleton(Object obj) { return getManagedObjectManager().dumpSkeleton(obj); } + @Override public void suppressDuplicateRootReport(boolean suppressReport) { getManagedObjectManager().suppressDuplicateRootReport(suppressReport); } + @Override public void close() throws IOException { getManagedObjectManager().close(); } + @Override + public boolean equalsProxiedInstance(WSEndpoint endpoint) { + if (wsEndpoint == null) { + return (endpoint == null); + } + return wsEndpoint.equals(endpoint); + } + + @Override + public Codec createCodec() { + return this.wsEndpoint.createCodec(); + } + + @Override + public QName getServiceName() { + return this.wsEndpoint.getServiceName(); + } + + @Override + public QName getPortName() { + return this.wsEndpoint.getPortName(); + } + + @Override + public Class getImplementationClass() { + return this.wsEndpoint.getImplementationClass(); + } + + @Override + public WSBinding getBinding() { + return this.wsEndpoint.getBinding(); + } + + @Override + public Container getContainer() { + return this.wsEndpoint.getContainer(); + } + + @Override + public WSDLPort getPort() { + return this.wsEndpoint.getPort(); + } + + @Override + public void setExecutor(Executor exec) { + this.wsEndpoint.setExecutor(exec); + } + + @Override + public void schedule(Packet request, CompletionCallback callback, FiberContextSwitchInterceptor interceptor) { + this.wsEndpoint.schedule(request, callback, interceptor); + } + + @Override + public PipeHead createPipeHead() { + return this.wsEndpoint.createPipeHead(); + } + + @Override + public void dispose() { + if (this.wsEndpoint != null) { + this.wsEndpoint.dispose(); + } + } + + @Override + public ServiceDefinition getServiceDefinition() { + return this.wsEndpoint.getServiceDefinition(); + } + + @Override + public Set getComponentRegistry() { + return this.wsEndpoint.getComponentRegistry(); + } + + @Override + public SEIModel getSEIModel() { + return this.wsEndpoint.getSEIModel(); + } + + @Override + public PolicyMap getPolicyMap() { + return this.wsEndpoint.getPolicyMap(); + } + + @Override + public void closeManagedObjectManager() { + this.wsEndpoint.closeManagedObjectManager(); + } + + @Override + public ServerTubeAssemblerContext getAssemblerContext() { + return this.wsEndpoint.getAssemblerContext(); + } + + @Override + public EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, Element... referenceParameters) { + return wsEndpoint.getEndpointReference(clazz, address, wsdlAddress, referenceParameters); + } + + @Override + public EndpointReference getEndpointReference(Class clazz, String address, String wsdlAddress, List metadata, List referenceParameters) { + return wsEndpoint.getEndpointReference(clazz, address, wsdlAddress, metadata, referenceParameters); + } + + @Override + public OperationDispatcher getOperationDispatcher() { + return wsEndpoint.getOperationDispatcher(); + } + + @Override + public Packet createServiceResponseForException(final ThrowableContainerPropertySet tc, + final Packet responsePacket, + final SOAPVersion soapVersion, + final WSDLPort wsdlPort, + final SEIModel seiModel, + final WSBinding binding) + { + return wsEndpoint.createServiceResponseForException(tc, responsePacket, soapVersion, + wsdlPort, seiModel, binding); + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java index 6893a1554ed..d43c44b8236 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java index 63f117f3dc4..48d4fe74d78 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/AsyncProviderInvokerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.Fiber; import com.sun.xml.internal.ws.api.pipe.NextAction; +import com.sun.xml.internal.ws.api.pipe.ThrowableContainerPropertySet; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.server.AsyncProvider; import com.sun.xml.internal.ws.api.server.AsyncProviderCallback; @@ -45,6 +46,7 @@ import java.util.logging.Logger; * * @author Jitendra Kotamraju */ +public // TODO needed by factory class AsyncProviderInvokerTube extends ProviderInvokerTube { private static final Logger LOGGER = Logger.getLogger( @@ -76,8 +78,14 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { } synchronized(callback) { - if (resumer.response != null) - return doReturnWith(resumer.response); + if (resumer.response != null) { + // Only used by AsyncProvider + // Implementation may pass Packet containing throwable; use both + ThrowableContainerPropertySet tc = resumer.response.getSatellite(ThrowableContainerPropertySet.class); + Throwable t = (tc != null) ? tc.getThrowable() : null; + + return t != null ? doThrow(resumer.response, t) : doReturnWith(resumer.response); + } // Suspend the Fiber. AsyncProviderCallback will resume the Fiber after // it receives response. @@ -90,7 +98,7 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { public void onResume(Packet response); } - private class FiberResumer implements Resumer { + /*private*/ public class FiberResumer implements Resumer { // TODO public for DISI private final Fiber fiber; public FiberResumer() { @@ -98,7 +106,11 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { } public void onResume(Packet response) { - fiber.resume(response); + // Only used by AsyncProvider + // Implementation may pass Packet containing throwable; use both + ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class); + Throwable t = (tc != null) ? tc.getThrowable() : null; + fiber.resume(t, response); } } @@ -110,7 +122,7 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { } } - private class AsyncProviderCallbackImpl implements AsyncProviderCallback { + /*private*/ public class AsyncProviderCallbackImpl implements AsyncProviderCallback { // TODO public for DISI private final Packet request; private Resumer resumer; @@ -133,8 +145,8 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { public void sendError(@NotNull Throwable t) { Exception e; - if (t instanceof RuntimeException) { - e = (RuntimeException)t; + if (t instanceof Exception) { + e = (Exception) t; } else { e = new RuntimeException(t); } @@ -148,10 +160,10 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { /** * The single {@link javax.xml.ws.WebServiceContext} instance injected into application. */ - private static final class AsyncWebServiceContext extends AbstractWebServiceContext { + /*private static final*/ public class AsyncWebServiceContext extends AbstractWebServiceContext { // TODO public for DISI final Packet packet; - AsyncWebServiceContext(WSEndpoint endpoint, Packet packet) { + public AsyncWebServiceContext(WSEndpoint endpoint, Packet packet) { // TODO public for DISI super(endpoint); this.packet = packet; } @@ -166,7 +178,7 @@ class AsyncProviderInvokerTube extends ProviderInvokerTube { } public @NotNull NextAction processException(@NotNull Throwable t) { - throw new IllegalStateException("AsyncProviderInvokerTube's processException shouldn't be called."); + return doThrow(t); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java index c0478e82608..3da2695073d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/MessageProviderArgumentBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,7 @@ final class MessageProviderArgumentBuilder extends ProviderArgumentsBuilder { /** @@ -57,7 +60,7 @@ abstract class ProviderArgumentsBuilder { * Binds {@link com.sun.xml.internal.ws.api.message.Message} to method invocation parameter * @param packet */ - protected abstract T getParameter(Packet packet); + /*protected*/ public abstract T getParameter(Packet packet); // TODO public for DISI pluggable Provider protected abstract Message getResponseMessage(T returnValue); @@ -75,21 +78,26 @@ abstract class ProviderArgumentsBuilder { public static ProviderArgumentsBuilder create(ProviderEndpointModel model, WSBinding binding) { if (model.datatype == Packet.class) - return new PacketProviderArgumentsBuilder(); + return new PacketProviderArgumentsBuilder(binding.getSOAPVersion()); return (binding instanceof SOAPBinding) ? SOAPProviderArgumentBuilder.create(model, binding.getSOAPVersion()) : XMLProviderArgumentBuilder.createBuilder(model, binding); } private static class PacketProviderArgumentsBuilder extends ProviderArgumentsBuilder { + private final SOAPVersion soapVersion; - @Override - protected Message getResponseMessage(Exception e) { - // Should never be called - throw new IllegalStateException(); + public PacketProviderArgumentsBuilder(SOAPVersion soapVersion) { + this.soapVersion = soapVersion; } @Override - protected Packet getParameter(Packet packet) { + protected Message getResponseMessage(Exception e) { + // Will be called by AsyncProviderCallbackImpl.sendError + return SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, e); + } + + @Override + /*protected*/ public Packet getParameter(Packet packet) { return packet; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java index 602a8c1089a..b60ae3ff49e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderEndpointModel.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java index 15df2e1108a..0f1892634ae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/ProviderInvokerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,9 @@ package com.sun.xml.internal.ws.server.provider; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.pipe.Tube; import com.sun.xml.internal.ws.api.server.AsyncProvider; +import com.sun.xml.internal.ws.api.server.Container; import com.sun.xml.internal.ws.api.server.Invoker; +import com.sun.xml.internal.ws.api.server.ProviderInvokerTubeFactory; import com.sun.xml.internal.ws.binding.SOAPBindingImpl; import com.sun.xml.internal.ws.server.InvokerTube; @@ -49,16 +51,15 @@ public abstract class ProviderInvokerTube extends InvokerTube> { } public static ProviderInvokerTube - create(Class implType, WSBinding binding, Invoker invoker) { + create(final Class implType, final WSBinding binding, final Invoker invoker, final Container container) { - ProviderEndpointModel model = new ProviderEndpointModel(implType, binding); - ProviderArgumentsBuilder argsBuilder = ProviderArgumentsBuilder.create(model, binding); + final ProviderEndpointModel model = new ProviderEndpointModel(implType, binding); + final ProviderArgumentsBuilder argsBuilder = ProviderArgumentsBuilder.create(model, binding); if (binding instanceof SOAPBindingImpl) { //set portKnownHeaders on Binding, so that they can be used for MU processing ((SOAPBindingImpl) binding).setMode(model.mode); } - return model.isAsync ? new AsyncProviderInvokerTube(invoker, argsBuilder) - : new SyncProviderInvokerTube(invoker, argsBuilder); + return ProviderInvokerTubeFactory.create(null, container, implType, invoker, argsBuilder, model.isAsync); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java index 17ee492720f..77abb6a26f0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/SOAPProviderArgumentBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -77,7 +77,7 @@ abstract class SOAPProviderArgumentBuilder extends ProviderArgumentsBuilder extends ProviderArgumentsBuilder extends ProviderArgumentsBuilder extends ProviderInvokerTube { private static final Logger LOGGER = Logger.getLogger( @@ -79,15 +81,21 @@ class SyncProviderInvokerTube extends ProviderInvokerTube { } } Packet response = argsBuilder.getResponse(request,returnValue,port,binding); + + // Only used by Provider + // Implementation may pass Packet containing throwable; use both + ThrowableContainerPropertySet tc = response.getSatellite(ThrowableContainerPropertySet.class); + Throwable t = (tc != null) ? tc.getThrowable() : null; + + return t != null ? doThrow(response, t) : doReturnWith(response); + } + + public @NotNull NextAction processResponse(@NotNull Packet response) { return doReturnWith(response); } - public NextAction processResponse(Packet response) { - throw new IllegalStateException("InovkerPipe's processResponse shouldn't be called."); - } - - public NextAction processException(@NotNull Throwable t) { - throw new IllegalStateException("InovkerPipe's processException shouldn't be called."); + public @NotNull NextAction processException(@NotNull Throwable t) { + return doThrow(t); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java index bc540ce129d..7a4cbc25b50 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/provider/XMLProviderArgumentBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -90,7 +90,7 @@ abstract class XMLProviderArgumentBuilder extends ProviderArgumentsBuilder this.binding = binding; } public DataSource getParameter(Packet packet) { - Message msg = packet.getMessage(); + Message msg = packet.getInternalMessage(); return (msg instanceof XMLMessage.MessageDataSource) ? ((XMLMessage.MessageDataSource) msg).getDataSource() : XMLMessage.getDataSource(msg, binding.getFeatures()); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java index 6fdc7bbf29b..3de2e67a3d4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointArgumentsBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import com.sun.xml.internal.ws.message.AttachmentUnmarshallerImpl; import com.sun.xml.internal.ws.model.ParameterImpl; import com.sun.xml.internal.ws.model.WrapperParameter; import com.sun.xml.internal.ws.resources.ServerMessages; +import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge; import com.sun.xml.internal.ws.spi.db.XMLBridge; import com.sun.xml.internal.ws.spi.db.DatabindingException; import com.sun.xml.internal.ws.spi.db.PropertyAccessor; @@ -52,7 +53,6 @@ import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPFault; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; -import javax.xml.stream.XMLStreamConstants; import javax.xml.transform.Source; import javax.xml.ws.Holder; import javax.xml.ws.WebServiceException; @@ -96,6 +96,7 @@ public abstract class EndpointArgumentsBuilder { static final class None extends EndpointArgumentsBuilder { private None(){ } + @Override public void readRequest(Message msg, Object[] args) { msg.consume(); } @@ -105,7 +106,7 @@ public abstract class EndpointArgumentsBuilder { * The singleton instance that produces null return value. * Used for operations that doesn't have any output. */ - public static EndpointArgumentsBuilder NONE = new None(); + public final static EndpointArgumentsBuilder NONE = new None(); /** * Returns the 'uninitialized' value for the given type. @@ -113,6 +114,7 @@ public abstract class EndpointArgumentsBuilder { *

    * For primitive types, it's '0', and for reference types, it's null. */ + @SuppressWarnings("element-type-mismatch") public static Object getVMUninitializedValue(Type type) { // if this map returns null, that means the 'type' is a reference type, // in which case 'null' is the correct null value, so this code is correct. @@ -132,6 +134,70 @@ public abstract class EndpointArgumentsBuilder { m.put(double.class,(double)0); } + protected QName wrapperName; + + static final class WrappedPartBuilder { + private final XMLBridge bridge; + private final EndpointValueSetter setter; + + /** + * @param bridge + * specifies how the part is unmarshalled. + * @param setter + * specifies how the obtained value is returned to the endpoint. + */ + public WrappedPartBuilder(XMLBridge bridge, EndpointValueSetter setter) { + this.bridge = bridge; + this.setter = setter; + } + + void readRequest( Object[] args, XMLStreamReader r, AttachmentSet att) throws JAXBException { + Object obj = null; + AttachmentUnmarshallerImpl au = (att != null)?new AttachmentUnmarshallerImpl(att):null; + if (bridge instanceof RepeatedElementBridge) { + RepeatedElementBridge rbridge = (RepeatedElementBridge)bridge; + ArrayList list = new ArrayList(); + QName name = r.getName(); + while (r.getEventType()==XMLStreamReader.START_ELEMENT && name.equals(r.getName())) { + list.add(rbridge.unmarshal(r, au)); + XMLStreamReaderUtil.toNextTag(r, name); + } + obj = rbridge.collectionHandler().convert(list); + } else { + obj = bridge.unmarshal(r, au); + } + setter.put(obj,args); + } + } + + protected Map wrappedParts = null; + + protected void readWrappedRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException { + if (!msg.hasPayload()) { + throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element"); + } + XMLStreamReader reader = msg.readPayload(); + XMLStreamReaderUtil.verifyTag(reader,wrapperName); + reader.nextTag(); + while(reader.getEventType()==XMLStreamReader.START_ELEMENT) { + // TODO: QName has a performance issue + QName name = reader.getName(); + WrappedPartBuilder part = wrappedParts.get(name); + if(part==null) { + // no corresponding part found. ignore + XMLStreamReaderUtil.skipElement(reader); + reader.nextTag(); + } else { + part.readRequest(args,reader, msg.getAttachments()); + } + XMLStreamReaderUtil.toNextTag(reader, name); + } + + // we are done with the body + reader.close(); + XMLStreamReaderFactory.recycle(reader); + } + /** * {@link EndpointArgumentsBuilder} that sets the VM uninitialized value to the type. */ @@ -489,15 +555,14 @@ public abstract class EndpointArgumentsBuilder { private final PartBuilder[] parts; private final XMLBridge wrapper; - private final QName wrapperName; + private boolean dynamicWrapper; public DocLit(WrapperParameter wp, Mode skipMode) { wrapperName = wp.getName(); wrapper = wp.getXMLBridge(); Class wrapperType = (Class) wrapper.getTypeInfo().type; - + dynamicWrapper = WrapperComposite.class.equals(wrapperType); List parts = new ArrayList(); - List children = wp.getWrapperChildren(); for (ParameterImpl p : children) { if (p.getMode() == skipMode) { @@ -509,16 +574,23 @@ public abstract class EndpointArgumentsBuilder { */ QName name = p.getName(); try { - parts.add( new PartBuilder( - wp.getOwner().getBindingContext().getElementPropertyAccessor( - wrapperType, - name.getNamespaceURI(), - p.getName().getLocalPart()), - EndpointValueSetter.get(p) - )); + if (dynamicWrapper) { + if (wrappedParts == null) wrappedParts = new HashMap(); + XMLBridge xmlBridge = p.getInlinedRepeatedElementBridge(); + if (xmlBridge == null) xmlBridge = p.getXMLBridge(); + wrappedParts.put( p.getName(), new WrappedPartBuilder(xmlBridge, EndpointValueSetter.get(p))); + } else { + parts.add( new PartBuilder( + wp.getOwner().getBindingContext().getElementPropertyAccessor( + wrapperType, + name.getNamespaceURI(), + p.getName().getLocalPart()), + EndpointValueSetter.get(p) + ) ); // wrapper parameter itself always bind to body, and // so do all its children - assert p.getBinding()== ParameterBinding.BODY; + assert p.getBinding()== ParameterBinding.BODY; + } } catch (JAXBException e) { throw new WebServiceException( // TODO: i18n wrapperType+" do not have a property of the name "+name,e); @@ -529,30 +601,33 @@ public abstract class EndpointArgumentsBuilder { } public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException { - - if (parts.length>0) { - if (!msg.hasPayload()) { - throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element"); - } - XMLStreamReader reader = msg.readPayload(); - XMLStreamReaderUtil.verifyTag(reader, wrapperName); - Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ? - new AttachmentUnmarshallerImpl(msg.getAttachments()): null); - - try { - for (PartBuilder part : parts) { - part.readRequest(args,wrapperBean); - } - } catch (DatabindingException e) { - // this can happen when the set method throw a checked exception or something like that - throw new WebServiceException(e); // TODO:i18n - } - - // we are done with the body - reader.close(); - XMLStreamReaderFactory.recycle(reader); + if (dynamicWrapper) { + readWrappedRequest(msg, args); } else { - msg.consume(); + if (parts.length>0) { + if (!msg.hasPayload()) { + throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element"); + } + XMLStreamReader reader = msg.readPayload(); + XMLStreamReaderUtil.verifyTag(reader, wrapperName); + Object wrapperBean = wrapper.unmarshal(reader, (msg.getAttachments() != null) ? + new AttachmentUnmarshallerImpl(msg.getAttachments()): null); + + try { + for (PartBuilder part : parts) { + part.readRequest(args,wrapperBean); + } + } catch (DatabindingException e) { + // this can happen when the set method throw a checked exception or something like that + throw new WebServiceException(e); // TODO:i18n + } + + // we are done with the body + reader.close(); + XMLStreamReaderFactory.recycle(reader); + } else { + msg.consume(); + } } } @@ -590,20 +665,14 @@ public abstract class EndpointArgumentsBuilder { * and processes all such wrapped parts. */ public static final class RpcLit extends EndpointArgumentsBuilder { - /** - * {@link PartBuilder} keyed by the element name (inside the wrapper element.) - */ - private final Map parts = new HashMap(); - - private QName wrapperName; - public RpcLit(WrapperParameter wp) { assert wp.getTypeInfo().type== WrapperComposite.class; wrapperName = wp.getName(); + wrappedParts = new HashMap(); List children = wp.getWrapperChildren(); for (ParameterImpl p : children) { - parts.put( p.getName(), new PartBuilder( + wrappedParts.put( p.getName(), new WrappedPartBuilder( p.getXMLBridge(), EndpointValueSetter.get(p) )); // wrapper parameter itself always bind to body, and @@ -613,62 +682,7 @@ public abstract class EndpointArgumentsBuilder { } public void readRequest(Message msg, Object[] args) throws JAXBException, XMLStreamException { - if (!msg.hasPayload()) { - throw new WebServiceException("No payload. Expecting payload with "+wrapperName+" element"); - } - XMLStreamReader reader = msg.readPayload(); - XMLStreamReaderUtil.verifyTag(reader,wrapperName); - reader.nextTag(); - - while(reader.getEventType()==XMLStreamReader.START_ELEMENT) { - // TODO: QName has a performance issue - QName name = reader.getName(); - PartBuilder part = parts.get(name); - if(part==null) { - // no corresponding part found. ignore - XMLStreamReaderUtil.skipElement(reader); - reader.nextTag(); - } else { - part.readRequest(args,reader, msg.getAttachments()); - } - // skip any whitespace - if (reader.getEventType() != XMLStreamConstants.START_ELEMENT && - reader.getEventType() != XMLStreamConstants.END_ELEMENT) { - XMLStreamReaderUtil.nextElementContent(reader); - } - if(reader.getEventType() == XMLStreamConstants.END_ELEMENT && name.equals(reader.getName())) { - XMLStreamReaderUtil.nextElementContent(reader); - } - } - - // we are done with the body - reader.close(); - XMLStreamReaderFactory.recycle(reader); - } - - /** - * Unmarshals each wrapped part into a JAXB object and moves it - * to the expected place. - */ - static final class PartBuilder { - private final XMLBridge bridge; - private final EndpointValueSetter setter; - - /** - * @param bridge - * specifies how the part is unmarshalled. - * @param setter - * specifies how the obtained value is returned to the endpoint. - */ - public PartBuilder(XMLBridge bridge, EndpointValueSetter setter) { - this.bridge = bridge; - this.setter = setter; - } - - final void readRequest( Object[] args, XMLStreamReader r, AttachmentSet att) throws JAXBException { - Object obj = bridge.unmarshal(r, (att != null)?new AttachmentUnmarshallerImpl(att):null); - setter.put(obj,args); - } + readWrappedRequest(msg, args); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java index c44f183e0a7..ab652c8c785 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointResponseMessageBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -143,10 +143,20 @@ public abstract class EndpointResponseMessageBuilder { */ protected final ValueGetter[] getters; + /** + * How does each wrapped parameter binds to XML? + */ + protected XMLBridge[] parameterBridges; + + /** + * Used for error diagnostics. + */ + protected List children; + protected Wrapped(WrapperParameter wp, SOAPVersion soapVersion) { super(wp.getXMLBridge(), soapVersion); - List children = wp.getWrapperChildren(); + children = wp.getWrapperChildren(); indices = new int[children.size()]; getters = new ValueGetter[children.size()]; @@ -156,6 +166,32 @@ public abstract class EndpointResponseMessageBuilder { getters[i] = ValueGetter.get(p); } } + + /** + * Packs a bunch of arguments intoa {@link WrapperComposite}. + */ + WrapperComposite buildWrapperComposite(Object[] methodArgs, Object returnValue) { + WrapperComposite cs = new WrapperComposite(); + cs.bridges = parameterBridges; + cs.values = new Object[parameterBridges.length]; + + // fill in wrapped parameters from methodArgs + for( int i=indices.length-1; i>=0; i-- ) { + Object v; + if (indices[i] == -1) { + v = getters[i].get(returnValue); + } else { + v = getters[i].get(methodArgs[indices[i]]); + } + if(v==null) { + throw new WebServiceException("Method Parameter: "+ + children.get(i).getName() +" cannot be null. This is BP 1.1 R2211 violation."); + } + cs.values[i] = v; + } + + return cs; + } } /** @@ -174,6 +210,7 @@ public abstract class EndpointResponseMessageBuilder { * Wrapper bean. */ private final Class wrapper; + private boolean dynamicWrapper; /** * Needed to get wrapper instantiation method. @@ -186,21 +223,26 @@ public abstract class EndpointResponseMessageBuilder { public DocLit(WrapperParameter wp, SOAPVersion soapVersion) { super(wp, soapVersion); bindingContext = wp.getOwner().getBindingContext(); - wrapper = (Class)wp.getXMLBridge().getTypeInfo().type; - - List children = wp.getWrapperChildren(); - + dynamicWrapper = WrapperComposite.class.equals(wrapper); + children = wp.getWrapperChildren(); + parameterBridges = new XMLBridge[children.size()]; accessors = new PropertyAccessor[children.size()]; for( int i=0; i children; /** * Creates a {@link EndpointResponseMessageBuilder} from a {@link WrapperParameter}. @@ -269,8 +303,6 @@ public abstract class EndpointResponseMessageBuilder { // we'll use CompositeStructure to pack requests assert wp.getTypeInfo().type==WrapperComposite.class; - this.children = wp.getWrapperChildren(); - parameterBridges = new XMLBridge[children.size()]; for( int i=0; i=0; i-- ) { - Object v; - if (indices[i] == -1) { - v = getters[i].get(returnValue); - } else { - v = getters[i].get(methodArgs[indices[i]]); - } - if(v==null) { - throw new WebServiceException("Method Parameter: "+ - children.get(i).getName() +" cannot be null. This is BP 1.1 R2211 violation."); - } - cs.values[i] = v; - } - - return cs; + Object build(Object[] methodArgs, Object returnValue) { + return buildWrapperComposite(methodArgs, returnValue); } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java index 43ed5691add..4c91bb90275 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/EndpointValueSetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java index efb5f16c680..a7d3a3ac06b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/Invoker.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java index 365d18dc3bf..d0d2722983c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java index c8b13f5eac5..1efeeab5495 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/InvokerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java index c7cae35f51b..74120cf5134 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/MessageFiller.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java index ed76b0b2caa..29762107cae 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/SEIInvokerTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,10 +25,9 @@ package com.sun.xml.internal.ws.server.sei; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.istack.internal.NotNull; -import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.databinding.EndpointCallBridge; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.NextAction; @@ -36,13 +35,8 @@ import com.sun.xml.internal.ws.api.server.Invoker; import com.sun.xml.internal.ws.client.sei.MethodHandler; import com.sun.xml.internal.ws.model.AbstractSEIModelImpl; import com.sun.xml.internal.ws.server.InvokerTube; -import com.sun.xml.internal.ws.resources.ServerMessages; -import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; import com.sun.xml.internal.ws.wsdl.DispatchException; -import com.sun.xml.internal.org.jvnet.ws.databinding.JavaCallInfo; -import java.util.List; import java.lang.reflect.InvocationTargetException; -import java.text.MessageFormat; /** * This pipe is used to invoke SEI based endpoints. @@ -87,18 +81,18 @@ public class SEIInvokerTube extends InvokerTube { DispatchException e = (DispatchException)call.getException(); return doReturnWith(req.createServerResponse(e.fault, model.getPort(), null, binding)); } - Packet res = (Packet) model.getDatabinding().serializeResponse(call); + Packet res = (Packet) model.getDatabinding().serializeResponse(call); res = req.relateServerResponse(res, req.endpoint.getPort(), model, req.endpoint.getBinding()); assert res != null; return doReturnWith(res); } public @NotNull NextAction processResponse(@NotNull Packet response) { - throw new IllegalStateException("InovkerPipe's processResponse shouldn't be called."); + return doReturnWith(response); } public @NotNull NextAction processException(@NotNull Throwable t) { - throw new IllegalStateException("InovkerPipe's processException shouldn't be called."); + return doThrow(t); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java index 7e454ef82e7..370075a0c6c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/TieHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,11 +25,12 @@ package com.sun.xml.internal.ws.server.sei; +import com.oracle.webservices.internal.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.databinding.EndpointCallBridge; -import com.sun.xml.internal.ws.api.databinding.JavaCallInfo; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageContextFactory; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; @@ -57,7 +58,7 @@ import java.util.logging.Logger; *

    * This class mainly performs the following two tasks: *

      - *
    1. Takes a {@link Message] that represents a request, + *
    2. Takes a {@link Message} that represents a request, * and extracts the arguments (and updates {@link Holder}s.) *
    3. Accepts return value and {@link Holder} arguments for a Java method, * and creates {@link JAXBMessage} that represents a response message. @@ -90,8 +91,9 @@ final public class TieHandler implements EndpointCallBridge { // these objects together create a response message from method parameters private final EndpointResponseMessageBuilder bodyBuilder; private final MessageFiller[] outFillers; + protected MessageContextFactory packetFactory; - public TieHandler(JavaMethodImpl method, WSBinding binding) { + public TieHandler(JavaMethodImpl method, WSBinding binding, MessageContextFactory mcf) { this.soapVersion = binding.getSOAPVersion(); this.method = method.getMethod(); this.javaMethodModel = method; @@ -101,6 +103,7 @@ final public class TieHandler implements EndpointCallBridge { this.outFillers = fillers.toArray(new MessageFiller[fillers.size()]); this.isOneWay = method.getMEP().isOneWay(); this.noOfArgs = this.method.getParameterTypes().length; + packetFactory = mcf; } /** @@ -178,7 +181,7 @@ final public class TieHandler implements EndpointCallBridge { */ private EndpointResponseMessageBuilder createResponseMessageBuilder(List fillers) { - EndpointResponseMessageBuilder bodyBuilder = null; + EndpointResponseMessageBuilder tmpBodyBuilder = null; List rp = javaMethodModel.getResponseParameters(); for (ParameterImpl param : rp) { @@ -188,14 +191,14 @@ final public class TieHandler implements EndpointCallBridge { case BODY: if(param.isWrapperStyle()) { if(param.getParent().getBinding().isRpcLit()) { - bodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, + tmpBodyBuilder = new EndpointResponseMessageBuilder.RpcLit((WrapperParameter)param, soapVersion); } else { - bodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, + tmpBodyBuilder = new EndpointResponseMessageBuilder.DocLit((WrapperParameter)param, soapVersion); } } else { - bodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); + tmpBodyBuilder = new EndpointResponseMessageBuilder.Bare(param, soapVersion); } break; case HEADER: @@ -211,20 +214,20 @@ final public class TieHandler implements EndpointCallBridge { } } - if (bodyBuilder == null) { + if (tmpBodyBuilder == null) { // no parameter binds to body. we create an empty message switch(soapVersion) { case SOAP_11: - bodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; + tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP11; break; case SOAP_12: - bodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; + tmpBodyBuilder = EndpointResponseMessageBuilder.EMPTY_SOAP12; break; default: throw new AssertionError(); } } - return bodyBuilder; + return tmpBodyBuilder; } public Object[] readRequest(Message reqMsg) { @@ -241,7 +244,6 @@ final public class TieHandler implements EndpointCallBridge { public Message createResponse(JavaCallInfo call) { Message responseMessage; - Object ret = call.getReturnValue(); if (call.getException() == null) { responseMessage = isOneWay ? null : createResponseMessage(call.getParameters(), call.getReturnValue()); } else { @@ -310,21 +312,24 @@ final public class TieHandler implements EndpointCallBridge { private static final Logger LOGGER = Logger.getLogger(TieHandler.class.getName()); + @Override public JavaCallInfo deserializeRequest(Packet req) { - JavaCallInfo call = new JavaCallInfo(); + com.sun.xml.internal.ws.api.databinding.JavaCallInfo call = new com.sun.xml.internal.ws.api.databinding.JavaCallInfo(); call.setMethod(this.getMethod()); Object[] args = this.readRequest(req.getMessage()); call.setParameters(args); return call; } + @Override public Packet serializeResponse(JavaCallInfo call) { - Message msg = this.createResponse(call); - Packet response = new Packet(); - response.setMessage(msg); - return response; + Message msg = this.createResponse(call); + Packet p = (msg == null) ? (Packet)packetFactory.createContext() : (Packet)packetFactory.createContext(msg); + p.setState(Packet.State.ServerResponse); + return p; } + @Override public JavaMethod getOperationModel() { return javaMethodModel; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java index 23855d887ac..a3ed444cdfa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/server/sei/ValueGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java index 33329a91baf..5db1bc06fe3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/ProviderImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java index 9376406da3c..a7ed881f45d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -103,7 +103,7 @@ public interface BindingContext { * Creates a mini-marshaller/unmarshaller that can process a {@link TypeInfo}. * * @return - * null if the specified reference is not given to {@link BindingContext#newInstance}. + * null if the specified reference is not given to {@link BindingContext#newWrapperInstace(Class)}. * * @since 2.0 EA1 */ @@ -205,7 +205,7 @@ public interface BindingContext { * * @throws IllegalArgumentException * if the parameter is null or not a part of the {@link TypeInfo}s specified - * in the {@link BindingContext#newInstance} method. + * in the {@link BindingContext#newWrapperInstace(Class)} method. * * @return null * if the referenced type is an anonymous and therefore doesn't have a name. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java index 1b1bbb408cc..ce095000725 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingContextFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,10 +33,10 @@ import java.util.logging.Logger; import javax.xml.bind.JAXBContext; import javax.xml.bind.Marshaller; -import com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingModeFeature; +import com.oracle.webservices.internal.api.databinding.DatabindingModeFeature; import com.sun.xml.internal.ws.db.glassfish.JAXBRIContextFactory; -import com.sun.xml.internal.ws.policy.privateutil.ServiceConfigurationError; +import com.sun.xml.internal.ws.util.ServiceConfigurationError; import com.sun.xml.internal.ws.util.ServiceFinder; /** @@ -115,7 +115,7 @@ abstract public class BindingContextFactory { * @param databinding mode/flavor or the package name of the JAXBContext implementation. * @return */ - abstract protected boolean isFor(String str); + abstract protected boolean isFor(String databinding); /** * @deprecated - Does jaxws need this? diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java index 6145d7532fb..accb20fc736 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingHelper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java index 2a8200d2bc7..b30e61fd305 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/BindingInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java index 74b13f5a846..558a11aaec9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java index 380798fb914..b851c220e2e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/DatabindingProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,9 @@ package com.sun.xml.internal.ws.spi.db; import java.util.Map; -import com.sun.xml.internal.org.jvnet.ws.databinding.Databinding; +import com.oracle.webservices.internal.api.databinding.Databinding; +import com.oracle.webservices.internal.api.databinding.WSDLGenerator; + import com.sun.xml.internal.ws.api.databinding.DatabindingConfig; public interface DatabindingProvider { @@ -35,5 +37,5 @@ public interface DatabindingProvider { boolean isFor(String databindingMode); void init(Map properties); Databinding create(DatabindingConfig config); - Databinding.WSDLGenerator wsdlGen(DatabindingConfig config); + WSDLGenerator wsdlGen(DatabindingConfig config); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java index 0ff47951748..d61b26c7171 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java index 7c5c51d42ef..31a6c72c841 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/FieldSetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java index d180e3d87b4..4db4f12a268 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/JAXBWrapperAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -112,7 +113,6 @@ public class JAXBWrapperAccessor extends WrapperAccessor { QName qname = new QName(namespace, localName); if (field.getType().equals(JAXBElement.class)) { - Class elementDeclaredType = Object.class; if (field.getGenericType() instanceof ParameterizedType) { Type arg = ((ParameterizedType) field.getGenericType()) .getActualTypeArguments()[0]; @@ -161,7 +161,7 @@ public class JAXBWrapperAccessor extends WrapperAccessor { static protected List getAllFields(Class clz) { List list = new ArrayList(); while (!Object.class.equals(clz)) { - for (Field f : getDeclaredFields(clz)) list.add(f); + list.addAll(Arrays.asList(getDeclaredFields(clz))); clz = clz.getSuperclass(); } return list; @@ -171,6 +171,7 @@ public class JAXBWrapperAccessor extends WrapperAccessor { try { return (System.getSecurityManager() == null) ? clz .getDeclaredFields() : AccessController.doPrivileged(new PrivilegedExceptionAction() { + @Override public Field[] run() throws IllegalAccessException { return clz.getDeclaredFields(); } @@ -186,9 +187,7 @@ public class JAXBWrapperAccessor extends WrapperAccessor { if (!field.isAccessible()) { if (getMethod != null) { MethodGetter methodGetter = new MethodGetter(getMethod); - if (!methodGetter.getType().toString().equals(field.getType().toString())) { - methodGetter = null; - } else { + if (methodGetter.getType().toString().equals(field.getType().toString())) { return methodGetter; } } @@ -201,9 +200,7 @@ public class JAXBWrapperAccessor extends WrapperAccessor { if (!field.isAccessible()) { if (setter != null) { MethodSetter injection = new MethodSetter(setter); - if (!injection.getType().toString().equals(field.getType().toString())) { - injection = null; - } else { + if (injection.getType().toString().equals(field.getType().toString())) { return injection; } } @@ -217,6 +214,7 @@ public class JAXBWrapperAccessor extends WrapperAccessor { return elementDeclaredTypes.get(key); } + @Override public PropertyAccessor getPropertyAccessor(String ns, String name) { final QName n = new QName(ns, name); final PropertySetter setter = getPropertySetter(n); @@ -228,8 +226,9 @@ public class JAXBWrapperAccessor extends WrapperAccessor { final Class elementDeclaredType = isJAXBElement ? getElementDeclaredType(n) : null; return new PropertyAccessor() { + @Override public Object get(Object bean) throws DatabindingException { - Object val = null; + Object val; if (isJAXBElement) { JAXBElement jaxbElement = (JAXBElement) getter.get(bean); val = (jaxbElement == null) ? null : jaxbElement.getValue(); @@ -243,6 +242,7 @@ public class JAXBWrapperAccessor extends WrapperAccessor { return val; } + @Override public void set(Object bean, Object value) throws DatabindingException { if (isJAXBElement) { JAXBElement jaxbElement = new JAXBElement( diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java index fc14855c372..1759ebbb23c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java index fd2b653bbb8..f369143c49b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/MethodSetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java index 3dd19769b1d..e61660c05c0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/OldBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java index 8d5a6727b62..1161c816443 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java index d0a03576586..4546e46112d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java index 9e8d46527b8..8a23b27c2c0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertyGetterBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java index 5e2812d3a78..320500cddd1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java index cd5cdc57e2a..6035165799a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/PropertySetterBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java new file mode 100644 index 00000000000..4effdf614f0 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/RepeatedElementBridge.java @@ -0,0 +1,221 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.spi.db; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Collection; +import java.util.List; +import java.util.Set; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.NoSuchElementException; + +import javax.xml.bind.JAXBException; +import javax.xml.bind.attachment.AttachmentMarshaller; +import javax.xml.bind.attachment.AttachmentUnmarshaller; +import javax.xml.namespace.NamespaceContext; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; +import javax.xml.transform.Result; +import javax.xml.transform.Source; + +import org.w3c.dom.Node; +import org.xml.sax.ContentHandler; + +/** + * RepeatedElementBridge + * + * @author shih-chang.chen@oracle.com + */ +@SuppressWarnings({"rawtypes", "unchecked"}) +public class RepeatedElementBridge implements XMLBridge { + + XMLBridge delegate; + CollectionHandler collectionHandler; + + public RepeatedElementBridge(TypeInfo typeInfo, XMLBridge xb) { + delegate = xb; + collectionHandler = create(typeInfo); + } + + public CollectionHandler collectionHandler() { + return collectionHandler; + } + + @Override + public BindingContext context() { + return delegate.context(); + } + + @Override + public void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException { + delegate.marshal(object, output, am); + } + + @Override + public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { + delegate.marshal(object, output, nsContext, am); + } + + @Override + public void marshal(T object, Node output) throws JAXBException { + delegate.marshal(object, output); + } + + @Override + public void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { + delegate.marshal(object, contentHandler, am); + } + + @Override + public void marshal(T object, Result result) throws JAXBException { + delegate.marshal(object, result); + } + + @Override + public T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException { + return delegate.unmarshal(in, au); + } + + @Override + public T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException { + return delegate.unmarshal(in, au); + } + + @Override + public T unmarshal(InputStream in) throws JAXBException { + return delegate.unmarshal(in); + } + + @Override + public T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException { + return delegate.unmarshal(n, au); + } + + @Override + public TypeInfo getTypeInfo() { + return delegate.getTypeInfo(); + } + + @Override + public boolean supportOutputStream() { + return delegate.supportOutputStream(); + } + + static public interface CollectionHandler { + int getSize(Object c); + Iterator iterator(Object c); + Object convert(List list); + } + + static class BaseCollectionHandler implements CollectionHandler { + Class type; + BaseCollectionHandler(Class c) {type = c;} + @Override + public int getSize(Object c) { return ((Collection) c).size(); } + @Override + public Object convert(List list) { + try { + Object o = type.newInstance(); + ((Collection)o).addAll(list); + return o; + } catch (Exception e) { + e.printStackTrace(); + } + return list; + } + @Override + public Iterator iterator(Object c) {return ((Collection)c).iterator();} + } + + static final CollectionHandler ListHandler = new BaseCollectionHandler(List.class) { + @Override + public Object convert(List list) {return list;} + }; + + static final CollectionHandler HashSetHandler = new BaseCollectionHandler(HashSet.class) { + @Override + public Object convert(List list) { return new HashSet(list);} + }; + + static public CollectionHandler create(TypeInfo ti) { + Class javaClass = (Class) ti.type; + if (javaClass.isArray()) { + return new ArrayHandler((Class) ti.getItemType().type); + } else if (List.class.equals(javaClass) || Collection.class.equals(javaClass)) { + return ListHandler; + } else if (Set.class.equals(javaClass) || HashSet.class.equals(javaClass)) { + return HashSetHandler; + } else { + return new BaseCollectionHandler(javaClass); + } + } + + static class ArrayHandler implements CollectionHandler { + Class componentClass; + public ArrayHandler(Class component) { + componentClass = component; + } + @Override + public int getSize(Object c) { + return java.lang.reflect.Array.getLength(c); + } + @Override + public Object convert(List list) { + Object array = java.lang.reflect.Array.newInstance(componentClass, list.size()); + for (int i = 0; i < list.size(); i++) { + java.lang.reflect.Array.set(array, i, list.get(i)); + } + return array; + } + @Override + public Iterator iterator(final Object c) { + return new Iterator() { + int index = 0; + @Override + public boolean hasNext() { + if (c == null || java.lang.reflect.Array.getLength(c) == 0) { + return false; + } + return (index != java.lang.reflect.Array.getLength(c)); + } + @Override + public Object next() throws NoSuchElementException { + Object retVal = null; + try { + retVal = java.lang.reflect.Array.get(c, index++); + } catch (ArrayIndexOutOfBoundsException ex) { + throw new NoSuchElementException(); + } + return retVal; + } + @Override + public void remove() {} + }; + } + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java index 592e6cce011..f1f3ba0f52a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/TypeInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ package com.sun.xml.internal.ws.spi.db; import java.lang.annotation.Annotation; +import java.lang.reflect.GenericArrayType; import java.lang.reflect.Type; import java.util.Collection; import java.util.HashMap; @@ -117,8 +118,8 @@ public final class TypeInfo { public TypeInfo toItemType() { // if we are to reinstitute this check, check JAXB annotations only // assert annotations.length==0; // not designed to work with adapters. - - Type base = Navigator.REFLECTION.getBaseClass(type, Collection.class); + Type t = (genericType != null)? genericType : type; + Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class); if(base==null) return this; // not a collection @@ -170,4 +171,27 @@ public final class TypeInfo { return new StringBuilder("TypeInfo: Type = ").append(type) .append(", tag = ").append(tagName).toString(); } + + public TypeInfo getItemType() { +// System.out.println("????? TypeInfo " + type); + if (type instanceof Class && ((Class)type).isArray() && !byte[].class.equals(type)) { + Type componentType = ((Class)type).getComponentType(); + Type genericComponentType = null; + if (genericType!= null && genericType instanceof GenericArrayType) { + GenericArrayType arrayType = (GenericArrayType) type; + genericComponentType = arrayType.getGenericComponentType(); + componentType = arrayType.getGenericComponentType(); + } + TypeInfo ti =new TypeInfo(tagName, componentType, annotations); + if (genericComponentType != null) ti.setGenericType(genericComponentType); + return ti; + } +// if (type instanceof Class && java.util.Collection.class.isAssignableFrom((Class)type)) { + Type t = (genericType != null)? genericType : type; + Type base = Navigator.REFLECTION.getBaseClass(t, Collection.class); + if ( base != null) { + return new TypeInfo(tagName, Navigator.REFLECTION.getTypeArgument(base,0), annotations); + } + return null; + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java index 38df76315a4..77a6f69f88c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperAccessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java new file mode 100644 index 00000000000..2392638a480 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperBridge.java @@ -0,0 +1,213 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.spi.db; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Iterator; + +import javax.xml.bind.JAXBException; +import javax.xml.bind.attachment.AttachmentMarshaller; +import javax.xml.bind.attachment.AttachmentUnmarshaller; +import javax.xml.namespace.NamespaceContext; +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamReader; +import javax.xml.stream.XMLStreamWriter; +import javax.xml.transform.Result; +import javax.xml.transform.Source; + +import org.w3c.dom.Node; +import org.xml.sax.Attributes; +import org.xml.sax.ContentHandler; +import org.xml.sax.SAXException; + +//import com.sun.xml.internal.ws.spi.db.BindingContext; +//import com.sun.xml.internal.ws.spi.db.RepeatedElementBridge; +//import com.sun.xml.internal.ws.spi.db.XMLBridge; +//import com.sun.xml.internal.ws.spi.db.DatabindingException; +//import com.sun.xml.internal.ws.spi.db.TypeInfo; +//import com.sun.xml.internal.ws.spi.db.WrapperComposite; + +/** + * WrapperBridge handles RPC-Literal body and Document-Literal wrappers without static + * wrapper classes. + * + * @author shih-chang.chen@oracle.com + */ +public class WrapperBridge implements XMLBridge { + + BindingContext parent; + TypeInfo typeInfo; + static final String WrapperPrefix = "w"; + static final String WrapperPrefixColon = WrapperPrefix + ":"; + + public WrapperBridge(BindingContext p, TypeInfo ti) { + this.parent = p; + this.typeInfo = ti; + } + + @Override + public BindingContext context() { + return parent; + } + + @Override + public TypeInfo getTypeInfo() { + return typeInfo; + } + + @Override + public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException { + WrapperComposite w = (WrapperComposite) object; + Attributes att = new Attributes() { + @Override public int getLength() { return 0; } + @Override public String getURI(int index) { return null; } + @Override public String getLocalName(int index) { return null; } + @Override public String getQName(int index) { return null; } + @Override public String getType(int index) { return null; } + @Override public String getValue(int index) { return null; } + @Override public int getIndex(String uri, String localName) { return 0; } + @Override public int getIndex(String qName) { return 0; } + @Override public String getType(String uri, String localName) { return null; } + @Override public String getType(String qName) { return null; } + @Override public String getValue(String uri, String localName) { return null; } + @Override public String getValue(String qName) { return null; } + }; + try { + contentHandler.startPrefixMapping(WrapperPrefix, typeInfo.tagName.getNamespaceURI()); + contentHandler.startElement(typeInfo.tagName.getNamespaceURI(), typeInfo.tagName.getLocalPart(), WrapperPrefixColon + typeInfo.tagName.getLocalPart(), att); + } catch (SAXException e) { + throw new JAXBException(e); + } + if (w.bridges != null) for (int i = 0; i < w.bridges.length; i++) { + if (w.bridges[i] instanceof RepeatedElementBridge) { + RepeatedElementBridge rbridge = (RepeatedElementBridge) w.bridges[i]; + for (Iterator itr = rbridge.collectionHandler().iterator(w.values[i]); itr.hasNext();) { + rbridge.marshal(itr.next(), contentHandler, am); + } + } else { + w.bridges[i].marshal(w.values[i], contentHandler, am); + } + } + try { + contentHandler.endElement(typeInfo.tagName.getNamespaceURI(), typeInfo.tagName.getLocalPart(), null); + contentHandler.endPrefixMapping(WrapperPrefix); + } catch (SAXException e) { + throw new JAXBException(e); + } +// bridge.marshal(object, contentHandler, am); + } + + @Override + public void marshal(T object, Node output) throws JAXBException { + throw new UnsupportedOperationException(); +// bridge.marshal(object, output); +// bridge.marshal((T) convert(object), output); + } + + @Override + public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException { +// bridge.marshal((T) convert(object), output, nsContext, am); + } + + @Override + public final void marshal(T object, Result result) throws JAXBException { + throw new UnsupportedOperationException(); +// bridge.marshal(object, result); + } + + @Override + public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException { + WrapperComposite w = (WrapperComposite) object; + try { +// output.writeStartElement(typeInfo.tagName.getNamespaceURI(), typeInfo.tagName.getLocalPart()); +// System.out.println(typeInfo.tagName.getNamespaceURI()); + + //The prefix is to workaround an eclipselink bug + String prefix = output.getPrefix(typeInfo.tagName.getNamespaceURI()); + if (prefix == null) prefix = WrapperPrefix; + output.writeStartElement(prefix, typeInfo.tagName.getLocalPart(), typeInfo.tagName.getNamespaceURI()); + output.writeNamespace(prefix, typeInfo.tagName.getNamespaceURI()); + +// output.writeStartElement("", typeInfo.tagName.getLocalPart(), typeInfo.tagName.getNamespaceURI()); +// output.writeDefaultNamespace(typeInfo.tagName.getNamespaceURI()); +// System.out.println("======== " + output.getPrefix(typeInfo.tagName.getNamespaceURI())); +// System.out.println("======== " + output.getNamespaceContext().getPrefix(typeInfo.tagName.getNamespaceURI())); +// System.out.println("======== " + output.getNamespaceContext().getNamespaceURI("")); + } catch (XMLStreamException e) { + e.printStackTrace(); + throw new DatabindingException(e); + } + if (w.bridges != null) for (int i = 0; i < w.bridges.length; i++) { + if (w.bridges[i] instanceof RepeatedElementBridge) { + RepeatedElementBridge rbridge = (RepeatedElementBridge) w.bridges[i]; + for (Iterator itr = rbridge.collectionHandler().iterator(w.values[i]); itr.hasNext();) { + rbridge.marshal(itr.next(), output, am); + } + } else { + w.bridges[i].marshal(w.values[i], output, am); + } + } + try { + output.writeEndElement(); + } catch (XMLStreamException e) { + throw new DatabindingException(e); + } + } + + @Override + public final T unmarshal(InputStream in) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); +// return bridge.unmarshal(in); + } + + @Override + public final T unmarshal(Node n, AttachmentUnmarshaller au) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); +// return bridge.unmarshal(n, au); + } + + @Override + public final T unmarshal(Source in, AttachmentUnmarshaller au) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); +// return bridge.unmarshal(in, au); + } + + @Override + public final T unmarshal(XMLStreamReader in, AttachmentUnmarshaller au) throws JAXBException { + //EndpointArgumentsBuilder.RpcLit.readRequest + throw new UnsupportedOperationException(); +// return bridge.unmarshal(in, au); + } + + @Override + public boolean supportOutputStream() { + return false; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java index a79af6006eb..5c876708bc2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/WrapperComposite.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,7 +40,7 @@ package com.sun.xml.internal.ws.spi.db; * *

      * The binding of this class is always known to {@link BindingContext}, so it can be - * used without passing anything to {@link BindingContext#newInstance}. + * used without passing anything to {@link BindingContext#newWrapperInstace(Class)}. * This object can be only used for marshalling, not for unmarshalling. * * @author Kohsuke Kawaguchi diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java index 512ec6c2845..b7066016027 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/spi/db/XMLBridge.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java index 8af0e5f4f72..fddf4648c54 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/Attributes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java index 0b7839353be..79f5ad7fbad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/DOMStreamReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -70,12 +70,12 @@ import java.util.Iterator; * @author Santiago.PericasGeertsen@sun.com * @author Kohsuke Kawaguchi */ -public final class DOMStreamReader implements XMLStreamReader, NamespaceContext { +public class DOMStreamReader implements XMLStreamReader, NamespaceContext { /** * Current DOM node being traversed. */ - private Node _current; + protected Node _current; /** * Starting node of the subtree being traversed. @@ -96,7 +96,7 @@ public final class DOMStreamReader implements XMLStreamReader, NamespaceContext * but when a large binary data sent as base64 text, this could get very much * non-trivial. */ - private String wholeText; + protected String wholeText; /** * List of attributes extracted from _namedNodeMap. @@ -106,26 +106,26 @@ public final class DOMStreamReader implements XMLStreamReader, NamespaceContext /** * {@link Scope} buffer. */ - private Scope[] scopes = new Scope[8]; + protected Scope[] scopes = new Scope[8]; /** * Depth of the current element. The first element gets depth==0. * Also used as the index to {@link #scopes}. */ - private int depth = 0; + protected int depth = 0; /** * State of this reader. Any of the valid states defined in StAX' * XMLStreamConstants class. */ - int _state; + protected int _state; /** * Namespace declarations on one element. * * Instances are reused. */ - private static final class Scope { + protected static final class Scope { /** * Scope for the parent element. */ @@ -247,7 +247,7 @@ public final class DOMStreamReader implements XMLStreamReader, NamespaceContext * (which contains both ns decl and attributes in DOM) and split them * to attributes-proper and namespace decls. */ - private void splitAttributes() { + protected void splitAttributes() { // Clear attribute and namespace lists _currentAttributes.clear(); @@ -756,7 +756,7 @@ public final class DOMStreamReader implements XMLStreamReader, NamespaceContext } } - private int _next() throws XMLStreamException { + protected int _next() throws XMLStreamException { Node child; switch (_state) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java index 3a655872b1a..7625d9ae2bf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/MtomStreamWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java index daffb833ba8..8b565e85496 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java index ae8830302d6..5c4e387a8db 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/PrefixFactoryImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java index 7def2999f08..5dfdd84854d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/SourceReaderFactory.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java index 7e687334b73..4e36ea81b38 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/TidyXMLStreamReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java index ac126a7f7e7..1340d83d985 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLReaderException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.streaming; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** *

      XMLReaderException represents an exception that occurred while reading an diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java index 6fe116f3585..51aaa502aa2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.streaming; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** *

      XMLStream ReaderException represents an exception that occurred while reading an diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java index 811cdbb034d..95a85be340e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamReaderUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -94,6 +94,17 @@ public class XMLStreamReaderUtil { return state; } + public static void toNextTag(XMLStreamReader reader, QName name) { + // skip any whitespace + if (reader.getEventType() != XMLStreamConstants.START_ELEMENT && + reader.getEventType() != XMLStreamConstants.END_ELEMENT) { + XMLStreamReaderUtil.nextElementContent(reader); + } + if(reader.getEventType() == XMLStreamConstants.END_ELEMENT && name.equals(reader.getName())) { + XMLStreamReaderUtil.nextElementContent(reader); + } + } + /** * Moves next and read spaces from the reader as long as to the next element. * Comments are ignored diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java index f6e0f8e72f9..7c880d99e92 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.streaming; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** *

      XMLWriterException represents an exception that occurred while writing diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java index 1ab171d5a44..b72cb73d070 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/streaming/XMLStreamWriterUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java index acabb2068db..21b371858ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/DeferredTransportPipe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java index fb90d0612cf..b6044e6953f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/Headers.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,7 @@ package com.sun.xml.internal.ws.transport; +import java.io.Serializable; import java.util.Comparator; import java.util.LinkedList; import java.util.List; @@ -74,7 +75,7 @@ public class Headers extends TreeMap> { private static final InsensitiveComparator INSTANCE = new InsensitiveComparator(); // case-insensitive string comparison of HTTP header names. - private static final class InsensitiveComparator implements Comparator { + private static final class InsensitiveComparator implements Comparator, Serializable { public int compare(String o1, String o2) { if (o1 == null && o2 == null) return 0; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java index 9bbcd30c1cb..f6f85a4682c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/DeploymentDescriptorParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,15 +25,18 @@ package com.sun.xml.internal.ws.transport.http; +import com.oracle.webservices.internal.api.databinding.DatabindingModeFeature; +import com.oracle.webservices.internal.api.databinding.ExternalMetadataFeature; import com.sun.istack.internal.NotNull; import com.sun.xml.internal.ws.api.BindingID; import com.sun.xml.internal.ws.api.WSBinding; -import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; import com.sun.xml.internal.ws.api.server.Container; import com.sun.xml.internal.ws.api.server.SDDocumentSource; import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.binding.WebServiceFeatureList; + import com.sun.xml.internal.ws.handler.HandlerChainsModel; import com.sun.xml.internal.ws.resources.ServerMessages; import com.sun.xml.internal.ws.resources.WsservletMessages; @@ -45,8 +48,6 @@ import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; import com.sun.xml.internal.ws.util.HandlerAnnotationInfo; import com.sun.xml.internal.ws.util.exception.LocatableWebServiceException; import com.sun.xml.internal.ws.util.xml.XmlUtil; - -import com.sun.xml.internal.org.jvnet.ws.databinding.DatabindingModeFeature; import org.xml.sax.EntityResolver; import javax.xml.namespace.QName; @@ -54,6 +55,7 @@ import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.ws.WebServiceException; +import javax.xml.ws.WebServiceFeature; import javax.xml.ws.http.HTTPBinding; import javax.xml.ws.soap.MTOMFeature; import javax.xml.ws.soap.SOAPBinding; @@ -64,6 +66,7 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -74,13 +77,13 @@ import java.util.logging.Logger; /** * Parses {@code sun-jaxws.xml} into {@link WSEndpoint}. - * - *

      + *

      + *

      * Since {@code sun-jaxws.xml} captures more information than what {@link WSEndpoint} * represents (in particular URL pattern and name), this class * takes a parameterization 'A' so that the user of this parser can choose to * create another type that wraps {@link WSEndpoint}. - * + *

      * {@link HttpAdapter} and its derived type is used for this often, * but it can be anything. * @@ -88,6 +91,33 @@ import java.util.logging.Logger; * @author Kohsuke Kawaguchi */ public class DeploymentDescriptorParser { + + public static final String NS_RUNTIME = "http://java.sun.com/xml/ns/jax-ws/ri/runtime"; + public static final String JAXWS_WSDL_DD_DIR = "WEB-INF/wsdl"; + + public static final QName QNAME_ENDPOINTS = new QName(NS_RUNTIME, "endpoints"); + public static final QName QNAME_ENDPOINT = new QName(NS_RUNTIME, "endpoint"); + public static final QName QNAME_EXT_METADA = new QName(NS_RUNTIME, "external-metadata"); + + public static final String ATTR_FILE = "file"; + public static final String ATTR_RESOURCE = "resource"; + + public static final String ATTR_VERSION = "version"; + public static final String ATTR_NAME = "name"; + public static final String ATTR_IMPLEMENTATION = "implementation"; + public static final String ATTR_WSDL = "wsdl"; + public static final String ATTR_SERVICE = "service"; + public static final String ATTR_PORT = "port"; + public static final String ATTR_URL_PATTERN = "url-pattern"; + public static final String ATTR_ENABLE_MTOM = "enable-mtom"; + public static final String ATTR_MTOM_THRESHOLD_VALUE = "mtom-threshold-value"; + public static final String ATTR_BINDING = "binding"; + public static final String ATTR_DATABINDING = "databinding"; + + public static final List ATTRVALUE_SUPPORTED_VERSIONS = Arrays.asList("2.0", "2.1"); + + private static final Logger logger = Logger.getLogger(com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http"); + private final Container container; private final ClassLoader classLoader; private final ResourceLoader loader; @@ -102,27 +132,23 @@ public class DeploymentDescriptorParser { /** * WSDL/schema documents collected from /WEB-INF/wsdl. Keyed by the system ID. */ - private final Map docs = new HashMap(); + private final Map docs = new HashMap(); /** - * - * @param cl - * Used to load service implementations. - * @param loader - * Used to locate resources, in particular WSDL. - * @param container - * Optional {@link Container} that {@link WSEndpoint}s receive. - * @param adapterFactory - * Creates {@link HttpAdapter} (or its derived class.) + * @param cl Used to load service implementations. + * @param loader Used to locate resources, in particular WSDL. + * @param container Optional {@link Container} that {@link WSEndpoint}s receive. + * @param adapterFactory Creates {@link HttpAdapter} (or its derived class.) */ - public DeploymentDescriptorParser(ClassLoader cl, ResourceLoader loader, Container container, AdapterFactory adapterFactory) throws MalformedURLException { + public DeploymentDescriptorParser(ClassLoader cl, ResourceLoader loader, Container container, + AdapterFactory adapterFactory) throws MalformedURLException { classLoader = cl; this.loader = loader; this.container = container; this.adapterFactory = adapterFactory; collectDocs("/WEB-INF/wsdl/"); - logger.fine("war metadata="+docs); + logger.log(Level.FINE, "war metadata={0}", docs); } /** @@ -133,7 +159,7 @@ public class DeploymentDescriptorParser { XMLStreamReader reader = null; try { reader = new TidyXMLStreamReader( - XMLStreamReaderFactory.create(systemId,is,true), is); + XMLStreamReaderFactory.create(systemId, is, true), is); XMLStreamReaderUtil.nextElementContent(reader); return parseAdapters(reader); } finally { @@ -141,7 +167,7 @@ public class DeploymentDescriptorParser { try { reader.close(); } catch (XMLStreamException e) { - throw new ServerRtException("runtime.parser.xmlReader",e); + throw new ServerRtException("runtime.parser.xmlReader", e); } } try { @@ -173,12 +199,13 @@ public class DeploymentDescriptorParser { if (paths != null) { for (String path : paths) { if (path.endsWith("/")) { - if(path.endsWith("/CVS/") || path.endsWith("/.svn/")) + if (path.endsWith("/CVS/") || path.endsWith("/.svn/")) { continue; + } collectDocs(path); } else { URL res = loader.getResource(path); - docs.put(res.toString(),SDDocumentSource.create(res)); + docs.put(res.toString(), SDDocumentSource.create(res)); } } } @@ -194,92 +221,104 @@ public class DeploymentDescriptorParser { Attributes attrs = XMLStreamReaderUtil.getAttributes(reader); String version = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_VERSION); - if (!version.equals(ATTRVALUE_VERSION_1_0)) { - failWithLocalName("runtime.parser.invalidVersionNumber", - reader, version); + if (!ATTRVALUE_SUPPORTED_VERSIONS.contains(version)) { + failWithLocalName("runtime.parser.invalidVersionNumber", reader, version); } - while (XMLStreamReaderUtil.nextElementContent(reader) != - XMLStreamConstants.END_ELEMENT) if (reader.getName().equals(QNAME_ENDPOINT)) { + while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { - attrs = XMLStreamReaderUtil.getAttributes(reader); - String name = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_NAME); - if (!names.add(name)) { - logger.warning( - WsservletMessages.SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME(/*name*/)); + if (reader.getName().equals(QNAME_ENDPOINT)) { + attrs = XMLStreamReaderUtil.getAttributes(reader); + + String name = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_NAME); + if (!names.add(name)) { + logger.warning( + WsservletMessages.SERVLET_WARNING_DUPLICATE_ENDPOINT_NAME(/*name*/)); + } + + String implementationName = + getMandatoryNonEmptyAttribute(reader, attrs, ATTR_IMPLEMENTATION); + Class implementorClass = getImplementorClass(implementationName, reader); + + MetadataReader metadataReader = null; + ExternalMetadataFeature externalMetadataFeature = null; + + // parse subelements to instantiate externalMetadataReader, if necessary ... + XMLStreamReaderUtil.nextElementContent(reader); + if (reader.getEventType() != XMLStreamConstants.END_ELEMENT) { + externalMetadataFeature = configureExternalMetadataReader(reader); + if (externalMetadataFeature != null) { + metadataReader = externalMetadataFeature.getMetadataReader(implementorClass.getClassLoader(), false); + } + } + + QName serviceName = getQNameAttribute(attrs, ATTR_SERVICE); + if (serviceName == null) { + serviceName = EndpointFactory.getDefaultServiceName(implementorClass, metadataReader); + } + + QName portName = getQNameAttribute(attrs, ATTR_PORT); + if (portName == null) { + portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass, metadataReader); + } + + //get enable-mtom attribute value + String enable_mtom = getAttribute(attrs, ATTR_ENABLE_MTOM); + String mtomThreshold = getAttribute(attrs, ATTR_MTOM_THRESHOLD_VALUE); + String dbMode = getAttribute(attrs, ATTR_DATABINDING); + String bindingId = getAttribute(attrs, ATTR_BINDING); + if (bindingId != null) { + // Convert short-form tokens to API's binding ids + bindingId = getBindingIdForToken(bindingId); + } + WSBinding binding = createBinding(bindingId, implementorClass, enable_mtom, mtomThreshold, dbMode); + if (externalMetadataFeature != null) { + binding.getFeatures().mergeFeatures(new WebServiceFeature[]{externalMetadataFeature}, + true); + } + + String urlPattern = getMandatoryNonEmptyAttribute(reader, attrs, ATTR_URL_PATTERN); + + // TODO use 'docs' as the metadata. If wsdl is non-null it's the primary. + boolean handlersSetInDD = setHandlersAndRoles(binding, reader, serviceName, portName); + + EndpointFactory.verifyImplementorClass(implementorClass, metadataReader); + SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass, metadataReader); + + WSEndpoint endpoint = WSEndpoint.create( + implementorClass, !handlersSetInDD, + null, + serviceName, portName, container, binding, + primaryWSDL, docs.values(), createEntityResolver(), false + ); + adapters.add(adapterFactory.createAdapter(name, urlPattern, endpoint)); + } else { + failWithLocalName("runtime.parser.invalidElement", reader); } - - String implementationName = - getMandatoryNonEmptyAttribute(reader, attrs, ATTR_IMPLEMENTATION); - Class implementorClass = getImplementorClass(implementationName,reader); - EndpointFactory.verifyImplementorClass(implementorClass); - - SDDocumentSource primaryWSDL = getPrimaryWSDL(reader, attrs, implementorClass); - - QName serviceName = getQNameAttribute(attrs, ATTR_SERVICE); - if (serviceName == null) - serviceName = EndpointFactory.getDefaultServiceName(implementorClass); - - QName portName = getQNameAttribute(attrs, ATTR_PORT); - if (portName == null) - portName = EndpointFactory.getDefaultPortName(serviceName, implementorClass); - - //get enable-mtom attribute value - String enable_mtom = getAttribute(attrs, ATTR_ENABLE_MTOM); - String mtomThreshold = getAttribute(attrs, ATTR_MTOM_THRESHOLD_VALUE); - String dbMode = getAttribute(attrs, ATTR_DATABINDING); - String bindingId = getAttribute(attrs, ATTR_BINDING); - if (bindingId != null) - // Convert short-form tokens to API's binding ids - bindingId = getBindingIdForToken(bindingId); - WSBinding binding = createBinding(bindingId,implementorClass, - enable_mtom, mtomThreshold, dbMode); - String urlPattern = - getMandatoryNonEmptyAttribute(reader, attrs, ATTR_URL_PATTERN); - - - // TODO use 'docs' as the metadata. If wsdl is non-null it's the primary. - - boolean handlersSetInDD = setHandlersAndRoles(binding, reader, serviceName, portName); - - ensureNoContent(reader); - WSEndpoint endpoint = WSEndpoint.create( - implementorClass, !handlersSetInDD, - null, - serviceName, portName, container, binding, - primaryWSDL, docs.values(), createEntityResolver(),false - ); - adapters.add(adapterFactory.createAdapter(name, urlPattern, endpoint)); - } else { - failWithLocalName("runtime.parser.invalidElement", reader); } return adapters; } /** - * @param ddBindingId - * binding id explicitlyspecified in the DeploymentDescriptor or parameter - * @param implClass - * Endpoint Implementation class - * @param mtomEnabled - * represents mtom-enabled attribute in DD - * @param mtomThreshold - * threshold value specified in DD - * @return - * is returned with only MTOMFeature set resolving the various precendece rules + * @param ddBindingId binding id explicitlyspecified in the DeploymentDescriptor or parameter + * @param implClass Endpoint Implementation class + * @param mtomEnabled represents mtom-enabled attribute in DD + * @param mtomThreshold threshold value specified in DD + * @return is returned with only MTOMFeature set resolving the various precendece rules */ - private static WSBinding createBinding(String ddBindingId,Class implClass, - String mtomEnabled, String mtomThreshold, String dataBindingMode) { + private static WSBinding createBinding(String ddBindingId, Class implClass, + String mtomEnabled, String mtomThreshold, String dataBindingMode) { // Features specified through DD WebServiceFeatureList features; MTOMFeature mtomfeature = null; if (mtomEnabled != null) { - if (mtomThreshold != null) + if (mtomThreshold != null) { mtomfeature = new MTOMFeature(Boolean.valueOf(mtomEnabled), Integer.valueOf(mtomThreshold)); - else + } else { mtomfeature = new MTOMFeature(Boolean.valueOf(mtomEnabled)); + } } BindingID bindingID; @@ -287,7 +326,7 @@ public class DeploymentDescriptorParser { bindingID = BindingID.parse(ddBindingId); features = bindingID.createBuiltinFeatureList(); - if(checkMtomConflict(features.get(MTOMFeature.class),mtomfeature)) { + if (checkMtomConflict(features.get(MTOMFeature.class), mtomfeature)) { throw new ServerRtException(ServerMessages.DD_MTOM_CONFLICT(ddBindingId, mtomEnabled)); } } else { @@ -296,8 +335,9 @@ public class DeploymentDescriptorParser { // mtom through Feature annotation or DD takes precendece features = new WebServiceFeatureList(); - if(mtomfeature != null) - features.add(mtomfeature); // this wins over MTOM setting in bindingID + if (mtomfeature != null) { // this wins over MTOM setting in bindingID + features.add(mtomfeature); + } features.addAll(bindingID.createBuiltinFeatureList()); } @@ -309,7 +349,9 @@ public class DeploymentDescriptorParser { } private static boolean checkMtomConflict(MTOMFeature lhs, MTOMFeature rhs) { - if(lhs==null || rhs==null) return false; + if (lhs == null || rhs == null) { + return false; + } return lhs.isEnabled() ^ rhs.isEnabled(); } @@ -320,7 +362,6 @@ public class DeploymentDescriptorParser { * binding ids * * @param lexical binding attribute value from DD. Always not null - * * @return returns corresponding API's binding ID or the same lexical */ public static @NotNull String getBindingIdForToken(@NotNull String lexical) { @@ -340,8 +381,7 @@ public class DeploymentDescriptorParser { /** * Creates a new "Adapter". - * - *

      + *

      * Normally 'A' would be {@link HttpAdapter} or some derived class. * But the parser doesn't require that to be of any particular type. */ @@ -353,34 +393,31 @@ public class DeploymentDescriptorParser { * Checks the deployment descriptor or {@link @WebServiceProvider} annotation * to see if it points to any WSDL. If so, returns the {@link SDDocumentSource}. * - * @return - * The pointed WSDL, if any. Otherwise null. + * @return The pointed WSDL, if any. Otherwise null. */ - private SDDocumentSource getPrimaryWSDL(XMLStreamReader xsr, Attributes attrs, Class implementorClass) { + private SDDocumentSource getPrimaryWSDL(XMLStreamReader xsr, Attributes attrs, Class implementorClass, MetadataReader metadataReader) { String wsdlFile = getAttribute(attrs, ATTR_WSDL); if (wsdlFile == null) { - wsdlFile = EndpointFactory.getWsdlLocation(implementorClass); + wsdlFile = EndpointFactory.getWsdlLocation(implementorClass, metadataReader); } - if (wsdlFile!=null) { + if (wsdlFile != null) { if (!wsdlFile.startsWith(JAXWS_WSDL_DD_DIR)) { - logger.warning("Ignoring wrong wsdl="+wsdlFile+". It should start with " - +JAXWS_WSDL_DD_DIR - +". Going to generate and publish a new WSDL."); + logger.log(Level.WARNING, "Ignoring wrong wsdl={0}. It should start with {1}. Going to generate and publish a new WSDL.", new Object[]{wsdlFile, JAXWS_WSDL_DD_DIR}); return null; } URL wsdl; try { - wsdl = loader.getResource('/'+wsdlFile); + wsdl = loader.getResource('/' + wsdlFile); } catch (MalformedURLException e) { throw new LocatableWebServiceException( - ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), e, xsr ); + ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), e, xsr); } if (wsdl == null) { throw new LocatableWebServiceException( - ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr ); + ServerMessages.RUNTIME_PARSER_WSDL_NOT_FOUND(wsdlFile), xsr); } SDDocumentSource docInfo = docs.get(wsdl.toExternalForm()); assert docInfo != null; @@ -396,7 +433,7 @@ public class DeploymentDescriptorParser { private EntityResolver createEntityResolver() { try { return XmlUtil.createEntityResolver(loader.getCatalogFile()); - } catch(MalformedURLException e) { + } catch (MalformedURLException e) { throw new WebServiceException(e); } } @@ -422,9 +459,9 @@ public class DeploymentDescriptorParser { String value = getAttribute(attrs, name); if (value != null && value.equals("")) { failWithLocalName( - "runtime.parser.invalidAttributeValue", - reader, - name); + "runtime.parser.invalidAttributeValue", + reader, + name); } return value; } @@ -444,9 +481,9 @@ public class DeploymentDescriptorParser { failWithLocalName("runtime.parser.missing.attribute", reader, name); } else if (value.equals("")) { failWithLocalName( - "runtime.parser.invalidAttributeValue", - reader, - name); + "runtime.parser.invalidAttributeValue", + reader, + name); } return value; } @@ -454,25 +491,23 @@ public class DeploymentDescriptorParser { /** * Parses the handler and role information and sets it * on the {@link WSBinding}. + * * @return true if element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { - if (XMLStreamReaderUtil.nextElementContent(reader) == - XMLStreamConstants.END_ELEMENT || - !reader.getName().equals( - HandlerChainsModel.QNAME_HANDLER_CHAINS)) { - + if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || + !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( - reader, classLoader,serviceName, portName, binding); + reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { - ((SOAPBinding)binding).setRoles(handlerInfo.getRoles()); + ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past @@ -480,42 +515,67 @@ public class DeploymentDescriptorParser { return true; } - protected static void ensureNoContent(XMLStreamReader reader) { - if (reader.getEventType() != XMLStreamConstants.END_ELEMENT) { - fail("runtime.parser.unexpectedContent", reader); + protected ExternalMetadataFeature configureExternalMetadataReader(XMLStreamReader reader) { + + ExternalMetadataFeature.Builder featureBuilder = null; + while (QNAME_EXT_METADA.equals(reader.getName())) { + + if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) { + Attributes attrs = XMLStreamReaderUtil.getAttributes(reader); + String file = getAttribute(attrs, ATTR_FILE); + if (file != null) { + if (featureBuilder == null) { + featureBuilder = ExternalMetadataFeature.builder(); + } + featureBuilder.addFiles(new File(file)); + } + + String res = getAttribute(attrs, ATTR_RESOURCE); + if (res != null) { + if (featureBuilder == null) { + featureBuilder = ExternalMetadataFeature.builder(); + } + featureBuilder.addResources(res); + } + } + + XMLStreamReaderUtil.nextElementContent(reader); } + + return buildFeature(featureBuilder); + } + + private ExternalMetadataFeature buildFeature(ExternalMetadataFeature.Builder builder) { + return builder != null ? builder.build() : null; } protected static void fail(String key, XMLStreamReader reader) { - logger.log(Level.SEVERE, key + reader.getLocation().getLineNumber()); + logger.log(Level.SEVERE, "{0}{1}", new Object[]{key, reader.getLocation().getLineNumber()}); throw new ServerRtException( - key, - Integer.toString(reader.getLocation().getLineNumber())); + key, + Integer.toString(reader.getLocation().getLineNumber())); } protected static void failWithFullName(String key, XMLStreamReader reader) { throw new ServerRtException( - key, - reader.getLocation().getLineNumber(), - reader.getName()); + key, + reader.getLocation().getLineNumber(), + reader.getName()); } protected static void failWithLocalName(String key, XMLStreamReader reader) { throw new ServerRtException( - key, - reader.getLocation().getLineNumber(), - reader.getLocalName()); + key, + reader.getLocation().getLineNumber(), + reader.getLocalName()); } - protected static void failWithLocalName( - String key, - XMLStreamReader reader, - String arg) { + protected static void failWithLocalName(String key, XMLStreamReader reader, String arg) { throw new ServerRtException( - key, - reader.getLocation().getLineNumber(), - reader.getLocalName(), - arg); + key, + reader.getLocation().getLineNumber(), + reader.getLocalName(), + arg); } protected Class loadClass(String name) { @@ -524,8 +584,8 @@ public class DeploymentDescriptorParser { } catch (ClassNotFoundException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new ServerRtException( - "runtime.parser.classNotFound", - name); + "runtime.parser.classNotFound", + name); } } @@ -533,8 +593,7 @@ public class DeploymentDescriptorParser { /** * Loads the class of the given name. * - * @param xsr - * Used to report the source location information if there's any error. + * @param xsr Used to report the source location information if there's any error. */ private Class getImplementorClass(String name, XMLStreamReader xsr) { try { @@ -542,34 +601,8 @@ public class DeploymentDescriptorParser { } catch (ClassNotFoundException e) { logger.log(Level.SEVERE, e.getMessage(), e); throw new LocatableWebServiceException( - ServerMessages.RUNTIME_PARSER_CLASS_NOT_FOUND(name), e, xsr ); + ServerMessages.RUNTIME_PARSER_CLASS_NOT_FOUND(name), e, xsr); } } - public static final String NS_RUNTIME = - "http://java.sun.com/xml/ns/jax-ws/ri/runtime"; - - public static final String JAXWS_WSDL_DD_DIR = "WEB-INF/wsdl"; - - public static final QName QNAME_ENDPOINTS = - new QName(NS_RUNTIME, "endpoints"); - public static final QName QNAME_ENDPOINT = - new QName(NS_RUNTIME, "endpoint"); - - public static final String ATTR_VERSION = "version"; - public static final String ATTR_NAME = "name"; - public static final String ATTR_IMPLEMENTATION = "implementation"; - public static final String ATTR_WSDL = "wsdl"; - public static final String ATTR_SERVICE = "service"; - public static final String ATTR_PORT = "port"; - public static final String ATTR_URL_PATTERN = "url-pattern"; - public static final String ATTR_ENABLE_MTOM = "enable-mtom"; - public static final String ATTR_MTOM_THRESHOLD_VALUE = "mtom-threshold-value"; - public static final String ATTR_BINDING = "binding"; - public static final String ATTR_DATABINDING = "databinding"; - - public static final String ATTRVALUE_VERSION_1_0 = "2.0"; - private static final Logger logger = - Logger.getLogger( - com.sun.xml.internal.ws.util.Constants.LoggingDomain + ".server.http"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java index 5caf21232f2..8ea4fb0091d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,14 +25,15 @@ package com.sun.xml.internal.ws.transport.http; - +import com.oracle.webservices.internal.api.message.PropertySet; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.addressing.NonAnonymousResponseProcessor; +import com.sun.xml.internal.ws.api.addressing.AddressingVersion; +import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.Component; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.api.ha.HaInfo; -import com.sun.xml.internal.ws.api.ha.StickyFeature; import com.sun.xml.internal.ws.api.message.ExceptionHasMessage; import com.sun.xml.internal.ws.api.message.Message; import com.sun.xml.internal.ws.api.message.Packet; @@ -49,6 +50,7 @@ import com.sun.xml.internal.ws.api.server.ServiceDefinition; import com.sun.xml.internal.ws.api.server.TransportBackChannel; import com.sun.xml.internal.ws.api.server.WSEndpoint; import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate; +import com.sun.xml.internal.ws.fault.SOAPFaultBuilder; import com.sun.xml.internal.ws.resources.WsservletMessages; import com.sun.xml.internal.ws.server.UnsupportedMediaException; import com.sun.xml.internal.ws.util.ByteArrayBuffer; @@ -56,7 +58,6 @@ import com.sun.xml.internal.ws.util.Pool; import javax.xml.ws.Binding; import javax.xml.ws.WebServiceException; -import javax.xml.ws.WebServiceFeature; import javax.xml.ws.http.HTTPBinding; import java.io.ByteArrayOutputStream; @@ -71,6 +72,7 @@ import java.util.Map.Entry; import java.util.logging.Level; import java.util.logging.Logger; + /** * {@link Adapter} that receives messages in HTTP. * @@ -161,7 +163,7 @@ public class HttpAdapter extends Adapter { * * @param sdef service definition */ - public void initWSDLMap(ServiceDefinition sdef) { + public final void initWSDLMap(ServiceDefinition sdef) { this.serviceDefinition = sdef; if(sdef==null) { wsdls = Collections.emptyMap(); @@ -213,6 +215,7 @@ public class HttpAdapter extends Adapter { } } + @Override protected HttpToolkit createToolkit() { return new HttpToolkit(); } @@ -229,7 +232,7 @@ public class HttpAdapter extends Adapter { * *

      * To populate a request {@link Packet} with more info, - * define {@link PropertySet.Property properties} on + * define {@link com.oracle.webservices.internal.api.message.PropertySet.Property properties} on * {@link WSHTTPConnection}. * * @param connection to receive/send HTTP messages for web service endpoints @@ -256,8 +259,9 @@ public class HttpAdapter extends Adapter { // metadata query. let the interceptor run for (Component c : endpoint.getComponents()) { HttpMetadataPublisher spi = c.getSPI(HttpMetadataPublisher.class); - if (spi != null && spi.handleMetadataRequest(this, connection)) - return true; // handled + if (spi != null && spi.handleMetadataRequest(this, connection)) { + return true; + } // handled } if (isMetadataQuery(connection.getQueryString())) { @@ -317,7 +321,7 @@ public class HttpAdapter extends Adapter { packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); - + packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); @@ -333,20 +337,24 @@ public class HttpAdapter extends Adapter { } /** - * Some stacks may send non WS-I BP 1.2 conformant SoapAction. - * Make sure SOAPAction is quoted as {@link Packet#soapAction} expectsa quoted soapAction value. + * Some stacks may send non WS-I BP 1.2 conforming SoapAction. + * Make sure SOAPAction is quoted as {@link Packet#soapAction} expects quoted soapAction value. * * @param soapAction SoapAction HTTP Header * @return quoted SOAPAction value */ - private String fixQuotesAroundSoapAction(String soapAction) { + static public String fixQuotesAroundSoapAction(String soapAction) { if(soapAction != null && (!soapAction.startsWith("\"") || !soapAction.endsWith("\"")) ) { - LOGGER.info("Received WS-I BP non-conformant Unquoted SoapAction HTTP header: "+ soapAction); + if (LOGGER.isLoggable(Level.INFO)) { + LOGGER.log(Level.INFO, "Received WS-I BP non-conformant Unquoted SoapAction HTTP header: {0}", soapAction); + } String fixedSoapAction = soapAction; - if(!soapAction.startsWith("\"")) + if(!soapAction.startsWith("\"")) { fixedSoapAction = "\"" + fixedSoapAction; - if(!soapAction.endsWith("\"")) + } + if(!soapAction.endsWith("\"")) { fixedSoapAction = fixedSoapAction + "\""; + } return fixedSoapAction; } return soapAction; @@ -356,13 +364,40 @@ public class HttpAdapter extends Adapter { return NonAnonymousResponseProcessor.getDefault(); } + /** + * This method is added for the case of the sub-class wants to override the method to + * print details. E.g. convert soapfault as HTML msg for 403 error connstatus. + * @param os + */ + protected void writeClientError(int connStatus, @NotNull OutputStream os, @NotNull Packet packet) throws IOException { + //do nothing + } + + private boolean isClientErrorStatus(int connStatus) + { + return (connStatus == HttpURLConnection.HTTP_FORBIDDEN); // add more for future. + } + + private boolean isNonAnonymousUri(EndpointAddress addr){ + return (addr != null) && !addr.toString().equals(AddressingVersion.W3C.anonymousUri) && + !addr.toString().equals(AddressingVersion.MEMBER.anonymousUri); + } + private void encodePacket(@NotNull Packet packet, @NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { - if (packet.endpointAddress != null) { + if (isNonAnonymousUri(packet.endpointAddress) && packet.getMessage() != null) { + try { // Message is targeted to non-anonymous response endpoint. // After call to non-anonymous processor, typically, packet.getMessage() will be null // however, processors could use this pattern to modify the response sent on the back-channel, // e.g. send custom HTTP headers with the HTTP 202 - packet = getNonAnonymousResponseProcessor().process(packet); + packet = getNonAnonymousResponseProcessor().process(packet); + } catch (RuntimeException re) { + // if processing by NonAnonymousResponseProcessor fails, new SOAPFaultMessage is created to be sent + // to back-channel client + SOAPVersion soapVersion = packet.getBinding().getSOAPVersion(); + Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(soapVersion, null, re); + packet = packet.createServerResponse(faultMsg, packet.endpoint.getPort(), null, packet.endpoint.getBinding()); + } } if (con.isClosed()) { @@ -375,8 +410,9 @@ public class HttpAdapter extends Adapter { if (!con.isClosed()) { // set the response code if not already set // for example, 415 may have been set earlier for Unsupported Content-Type - if (con.getStatus() == 0) + if (con.getStatus() == 0) { con.setStatus(WSHTTPConnection.ONEWAY); + } // close the response channel now try { con.getOutput().close(); // no payload @@ -393,6 +429,13 @@ public class HttpAdapter extends Adapter { : HttpURLConnection.HTTP_OK); } + if (isClientErrorStatus(con.getStatus())) { + OutputStream os = con.getOutput(); + writeClientError(con.getStatus(), os, packet); + os.close(); + return; + } + ContentType contentType = codec.getStaticContentType(packet); if (contentType != null) { con.setContentTypeResponseHeader(contentType.getContentType()); @@ -502,6 +545,7 @@ public class HttpAdapter extends Adapter { } endpoint.process(request, new WSEndpoint.CompletionCallback() { + @Override public void onCompletion(@NotNull Packet response) { try { try { @@ -522,6 +566,7 @@ public class HttpAdapter extends Adapter { public static final CompletionCallback NO_OP_COMPLETION_CALLBACK = new CompletionCallback() { + @Override public void onCompletion() { //NO-OP } @@ -541,35 +586,37 @@ public class HttpAdapter extends Adapter { super.handle(con); } + @Override protected void encodePacket(WSHTTPConnection con, @NotNull Packet packet, @NotNull Codec codec) throws IOException { HttpAdapter.this.encodePacket(packet, con, codec); } - protected @Nullable String getAcceptableMimeTypes(WSHTTPConnection con) { + protected @Override @Nullable String getAcceptableMimeTypes(WSHTTPConnection con) { return null; } - protected @Nullable TransportBackChannel getTransportBackChannel(WSHTTPConnection con) { + protected @Override @Nullable TransportBackChannel getTransportBackChannel(WSHTTPConnection con) { return new Oneway(con); } - protected @NotNull + protected @Override @NotNull PropertySet getPropertySet(WSHTTPConnection con) { return con; } - protected @NotNull WebServiceContextDelegate getWebServiceContextDelegate(WSHTTPConnection con) { + protected @Override @NotNull WebServiceContextDelegate getWebServiceContextDelegate(WSHTTPConnection con) { return con.getWebServiceContextDelegate(); } } - final class Oneway implements TransportBackChannel { + static final class Oneway implements TransportBackChannel { WSHTTPConnection con; boolean closed; Oneway(WSHTTPConnection con) { this.con = con; } + @Override public void close() { if (!closed) { closed = true; @@ -687,7 +734,7 @@ public class HttpAdapter extends Adapter { } public PortAddressResolver getPortAddressResolver(String baseAddress) { - return owner.createPortAddressResolver(baseAddress); + return owner.createPortAddressResolver(baseAddress, endpoint.getImplementationClass()); } public DocumentAddressResolver getDocumentAddressResolver( @@ -695,6 +742,7 @@ public class HttpAdapter extends Adapter { final String address = portAddressResolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart()); assert address != null; return new DocumentAddressResolver() { + @Override public String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced) { // the map on endpoint should account for all SDDocument assert revWsdls.containsKey(referenced); @@ -785,7 +833,9 @@ public class HttpAdapter extends Adapter { * Generates the listing of all services. */ private void writeWebServicesHtmlPage(WSHTTPConnection con) throws IOException { - if (!publishStatusPage) return; + if (!publishStatusPage) { + return; + } // TODO: resurrect the ability to localize according to the current request. @@ -859,9 +909,13 @@ public class HttpAdapter extends Adapter { /** * Dumps what goes across HTTP transport. */ - public static boolean dump = false; + public static volatile boolean dump = false; - public static boolean publishStatusPage = true; + public static volatile boolean publishStatusPage = true; + + public static synchronized void setPublishStatus(boolean publish) { + publishStatusPage = publish; + } static { try { @@ -870,11 +924,14 @@ public class HttpAdapter extends Adapter { // OK to ignore this } try { - publishStatusPage = System.getProperty(HttpAdapter.class.getName()+".publishStatusPage").equals("true"); + setPublishStatus(System.getProperty(HttpAdapter.class.getName()+".publishStatusPage").equals("true")); } catch( Throwable t ) { // OK to ignore this } } + public static void setDump(boolean dumpMessages) { + HttpAdapter.dump = dumpMessages; + } private static final Logger LOGGER = Logger.getLogger(HttpAdapter.class.getName()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java index 310033b6489..e7c05d5af36 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpAdapterList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,6 +37,7 @@ import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.AbstractList; +import java.util.Map.Entry; /** * List of {@link HttpAdapter}s created together. @@ -58,12 +59,13 @@ public abstract class HttpAdapterList extends AbstractLis private final Map addressMap = new HashMap(); // TODO: documented because it's used by AS + @Override public T createAdapter(String name, String urlPattern, WSEndpoint endpoint) { T t = createHttpAdapter(name, urlPattern, endpoint); adapters.add(t); WSDLPort port = endpoint.getPort(); if (port != null) { - PortInfo portInfo = new PortInfo(port.getOwner().getName(),port.getName().getLocalPart()); + PortInfo portInfo = new PortInfo(port.getOwner().getName(),port.getName().getLocalPart(), endpoint.getImplementationClass()); addressMap.put(portInfo, getValidPath(urlPattern)); } return t; @@ -88,21 +90,36 @@ public abstract class HttpAdapterList extends AbstractLis /** * Creates a PortAddressResolver that maps portname to its address + * + * @param endpointImpl application endpoint Class that eventually serves the request. */ - public PortAddressResolver createPortAddressResolver(final String baseAddress) { + public PortAddressResolver createPortAddressResolver(final String baseAddress, final Class endpointImpl) { return new PortAddressResolver() { + @Override public String getAddressFor(@NotNull QName serviceName, @NotNull String portName) { - String urlPattern = addressMap.get(new PortInfo(serviceName,portName)); + String urlPattern = addressMap.get(new PortInfo(serviceName,portName, endpointImpl)); + if (urlPattern == null) { + //if a WSDL defines more ports, urlpattern is null (portName does not match endpointImpl) + //so fallback to the default behaviour where only serviceName/portName is checked + for (Entry e : addressMap.entrySet()) { + if (serviceName.equals(e.getKey().serviceName) && portName.equals(e.getKey().portName)) { + urlPattern = e.getValue(); + break; + } + } + } return (urlPattern == null) ? null : baseAddress+urlPattern; } }; } + @Override public T get(int index) { return adapters.get(index); } + @Override public int size() { return adapters.size(); } @@ -110,24 +127,30 @@ public abstract class HttpAdapterList extends AbstractLis private static class PortInfo { private final QName serviceName; private final String portName; + private final Class implClass; - PortInfo(@NotNull QName serviceName, @NotNull String portName) { + PortInfo(@NotNull QName serviceName, @NotNull String portName, Class implClass) { this.serviceName = serviceName; this.portName = portName; + this.implClass = implClass; } @Override public boolean equals(Object portInfo) { if (portInfo instanceof PortInfo) { PortInfo that = (PortInfo)portInfo; - return this.serviceName.equals(that.serviceName) && this.portName.equals(that.portName); + if (this.implClass == null) { + return this.serviceName.equals(that.serviceName) && this.portName.equals(that.portName) && that.implClass == null; + } + return this.serviceName.equals(that.serviceName) && this.portName.equals(that.portName) && this.implClass.equals(that.implClass); } return false; } @Override public int hashCode() { - return serviceName.hashCode()+portName.hashCode(); + int retVal = serviceName.hashCode()+portName.hashCode(); + return implClass != null ? retVal + implClass.hashCode() : retVal; } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java index 21a622b73f4..cb5272201d3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/HttpMetadataPublisher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java index 856039683fe..ec47f3a3e11 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/ResourceLoader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -66,7 +66,7 @@ public interface ResourceLoader { * null if the path is invalid. empty if the path didn't contain * any entry in it. * - * @see javax.servlet.http.ServletContext#getResourcePaths(String) + * @see javax.servlet.ServletContext#getResourcePaths(String) */ Set getResourcePaths(String path); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java index a80235ef49b..55ded5c735c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/WSHTTPConnection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,9 +25,10 @@ package com.sun.xml.internal.ws.transport.http; +import com.oracle.webservices.internal.api.message.BasePropertySet; +import com.oracle.webservices.internal.api.message.PropertySet; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.server.WebServiceContextDelegate; @@ -54,12 +55,12 @@ import java.util.Set; * *

      * This class extends {@link PropertySet} so that a transport can - * expose its properties to the appliation and pipes. (This object + * expose its properties to the application and pipes. (This object * will be added to {@link Packet#addSatellite(PropertySet)}.) * * @author Jitendra Kotamraju */ -public abstract class WSHTTPConnection extends PropertySet { +public abstract class WSHTTPConnection extends BasePropertySet { public static final int OK=200; public static final int ONEWAY=202; @@ -111,7 +112,7 @@ public abstract class WSHTTPConnection extends PropertySet { * the previously set value. If not, this method adds it. * *

      - * Note that this method and {@link #setResponseHeaders(Map<String,List<String>>)} + * Note that this method and {@link #setResponseHeaders(java.util.Map)} * may be invoked in any arbitrary order. * * @param value @@ -347,7 +348,7 @@ public abstract class WSHTTPConnection extends PropertySet { /** * Subclasses are expected to override * - * @return + * @return a {@link String} containing the protocol name and version number */ public String getProtocol() { return "HTTP/1.1"; @@ -357,7 +358,7 @@ public abstract class WSHTTPConnection extends PropertySet { * Subclasses are expected to override * * @since JAX-WS RI 2.2.2 - * @return + * @return value of given cookie */ public String getCookie(String name) { return null; @@ -374,8 +375,6 @@ public abstract class WSHTTPConnection extends PropertySet { /** * Subclasses are expected to override - * - * @return */ public void setContentLengthResponseHeader(int value) { } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java index 2ee0ae80006..813335c1d28 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpClientTransport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java index 37c8c44c0dc..318ba7a0ef5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpResponseProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,20 +25,22 @@ package com.sun.xml.internal.ws.transport.http.client; +import com.oracle.webservices.internal.api.message.BasePropertySet; +import com.oracle.webservices.internal.api.message.PropertySet; import com.sun.istack.internal.NotNull; -import com.sun.xml.internal.ws.api.PropertySet; import com.sun.xml.internal.ws.client.ResponseContext; import javax.xml.ws.handler.MessageContext; import java.util.List; import java.util.Map; + /** * Properties exposed from {@link HttpTransportPipe} for {@link ResponseContext}. * * @author Kohsuke Kawaguchi */ -final class HttpResponseProperties extends PropertySet { +final class HttpResponseProperties extends BasePropertySet { private final HttpClientTransport deferedCon; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java index 686c5d27a6a..048af965e93 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/client/HttpTransportPipe.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,36 +32,27 @@ import com.sun.xml.internal.ws.api.ha.StickyFeature; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.pipe.*; import com.sun.xml.internal.ws.api.pipe.helper.AbstractTubeImpl; +import com.sun.xml.internal.ws.client.ClientTransportException; import com.sun.xml.internal.ws.developer.HttpConfigFeature; +import com.sun.xml.internal.ws.resources.ClientMessages; import com.sun.xml.internal.ws.transport.Headers; import com.sun.xml.internal.ws.util.ByteArrayBuffer; -import com.sun.xml.internal.ws.client.ClientTransportException; -import com.sun.xml.internal.ws.resources.ClientMessages; import com.sun.xml.internal.ws.util.RuntimeVersion; import com.sun.xml.internal.ws.util.StreamUtils; import javax.xml.bind.DatatypeConverter; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; import javax.xml.ws.BindingProvider; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; -import javax.xml.ws.soap.SOAPBinding; import javax.xml.ws.handler.MessageContext; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintWriter; +import javax.xml.ws.soap.SOAPBinding; +import java.io.*; import java.net.CookieHandler; -import java.util.Collections; -import java.util.List; -import java.util.logging.Logger; -import java.util.logging.Level; -import java.util.Map; -import java.util.Map.Entry; import java.net.HttpURLConnection; +import java.util.*; +import java.util.Map.Entry; +import java.util.logging.Level; +import java.util.logging.Logger; /** * {@link Tube} that sends a request to a remote HTTP server. @@ -72,21 +63,28 @@ import java.net.HttpURLConnection; * @author Jitendra Kotamraju */ public class HttpTransportPipe extends AbstractTubeImpl { - private static final Logger LOGGER = Logger.getLogger(HttpTransportPipe.class.getName()); + + private static final List USER_AGENT = Collections.singletonList(RuntimeVersion.VERSION.toString()); + private static final Logger LOGGER = Logger.getLogger(HttpTransportPipe.class.getName()); + + /** + * Dumps what goes across HTTP transport. + */ + public static boolean dump; private final Codec codec; private final WSBinding binding; - private static final List USER_AGENT = Collections.singletonList(RuntimeVersion.VERSION.toString()); private final CookieHandler cookieJar; // shared object among the tubes private final boolean sticky; - // Need to use JAXB first to register DatatypeConverter static { + boolean b; try { - JAXBContext.newInstance().createUnmarshaller(); - } catch(JAXBException je) { - // Nothing much can be done. Intentionally left empty + b = Boolean.getBoolean(HttpTransportPipe.class.getName()+".dump"); + } catch( Throwable t ) { + b = false; } + dump = b; } public HttpTransportPipe(Codec codec, WSBinding binding) { @@ -120,14 +118,17 @@ public class HttpTransportPipe extends AbstractTubeImpl { cloner.add(that,this); } + @Override public NextAction processException(@NotNull Throwable t) { return doThrow(t); } + @Override public NextAction processRequest(@NotNull Packet request) { return doReturnWith(process(request)); } + @Override public NextAction processResponse(@NotNull Packet response) { return doReturnWith(response); } @@ -178,8 +179,9 @@ public class HttpTransportPipe extends AbstractTubeImpl { writeSOAPAction(reqHeaders, ct.getSOAPActionHeader()); } - if(dump || LOGGER.isLoggable(Level.FINER)) + if (dump || LOGGER.isLoggable(Level.FINER)) { dump(buf, "HTTP request", reqHeaders); + } buf.writeTo(con.getOutput()); } else { @@ -315,26 +317,50 @@ public class HttpTransportPipe extends AbstractTubeImpl { private void addCookies(Packet context, Map> reqHeaders) throws IOException { Boolean shouldMaintainSessionProperty = - (Boolean) context.invocationProperties.get(BindingProvider.SESSION_MAINTAIN_PROPERTY); + (Boolean) context.invocationProperties.get(BindingProvider.SESSION_MAINTAIN_PROPERTY); if (shouldMaintainSessionProperty != null && !shouldMaintainSessionProperty) { return; // explicitly turned off } if (sticky || (shouldMaintainSessionProperty != null && shouldMaintainSessionProperty)) { - Map> cookies = cookieJar.get(context.endpointAddress.getURI(),reqHeaders); - List cookieList = cookies.get("Cookie"); - if (cookieList != null && !cookieList.isEmpty()) { - reqHeaders.put("Cookie", cookieList); - } - cookieList = cookies.get("Cookie2"); - if (cookieList != null && !cookieList.isEmpty()) { - reqHeaders.put("Cookie2", cookieList); - } + Map> rememberedCookies = cookieJar.get(context.endpointAddress.getURI(), reqHeaders); + processCookieHeaders(reqHeaders, rememberedCookies, "Cookie"); + processCookieHeaders(reqHeaders, rememberedCookies, "Cookie2"); + } + } + + private void processCookieHeaders(Map> requestHeaders, Map> rememberedCookies, String cookieHeader) { + List jarCookies = rememberedCookies.get(cookieHeader); + if (jarCookies != null && !jarCookies.isEmpty()) { + List resultCookies = mergeUserCookies(jarCookies, requestHeaders.get(cookieHeader)); + requestHeaders.put(cookieHeader, resultCookies); + } + } + + private List mergeUserCookies(List rememberedCookies, List userCookies) { + + // nothing to merge + if (userCookies == null || userCookies.isEmpty()) { + return rememberedCookies; + } + + Map map = new HashMap(); + cookieListToMap(rememberedCookies, map); + cookieListToMap(userCookies, map); + + return new ArrayList(map.values()); + } + + private void cookieListToMap(List cookieList, Map targetMap) { + for(String cookie : cookieList) { + int index = cookie.indexOf("="); + String cookieName = cookie.substring(0, index); + targetMap.put(cookieName, cookie); } } private void recordCookies(Packet context, HttpClientTransport con) throws IOException { Boolean shouldMaintainSessionProperty = - (Boolean) context.invocationProperties.get(BindingProvider.SESSION_MAINTAIN_PROPERTY); + (Boolean) context.invocationProperties.get(BindingProvider.SESSION_MAINTAIN_PROPERTY); if (shouldMaintainSessionProperty != null && !shouldMaintainSessionProperty) { return; // explicitly turned off } @@ -348,7 +374,7 @@ public class HttpTransportPipe extends AbstractTubeImpl { if (user != null) { String pw = (String) context.invocationProperties.get(BindingProvider.PASSWORD_PROPERTY); if (pw != null) { - StringBuffer buf = new StringBuffer(user); + StringBuilder buf = new StringBuilder(user); buf.append(":"); buf.append(pw); String creds = DatatypeConverter.printBase64Binary(buf.toString().getBytes()); @@ -363,18 +389,22 @@ public class HttpTransportPipe extends AbstractTubeImpl { */ private void writeSOAPAction(Map> reqHeaders, String soapAction) { //dont write SOAPAction HTTP header for SOAP 1.2 messages. - if(SOAPVersion.SOAP_12.equals(binding.getSOAPVersion())) + if(SOAPVersion.SOAP_12.equals(binding.getSOAPVersion())) { return; - if (soapAction != null) + } + if (soapAction != null) { reqHeaders.put("SOAPAction", Collections.singletonList(soapAction)); - else + } else { reqHeaders.put("SOAPAction", Collections.singletonList("\"\"")); + } } + @Override public void preDestroy() { // nothing to do. Intentionally left empty. } + @Override public HttpTransportPipe copy(TubeCloner cloner) { return new HttpTransportPipe(this,cloner); } @@ -401,25 +431,11 @@ public class HttpTransportPipe extends AbstractTubeImpl { String msg = baos.toString(); if (dump) { - System.out.println(msg); + System.out.println(msg); } if (LOGGER.isLoggable(Level.FINER)) { - LOGGER.log(Level.FINER, msg); + LOGGER.log(Level.FINER, msg); } } - /** - * Dumps what goes across HTTP transport. - */ - public static boolean dump; - - static { - boolean b; - try { - b = Boolean.getBoolean(HttpTransportPipe.class.getName()+".dump"); - } catch( Throwable t ) { - b = false; - } - dump = b; - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java index a9ae5157d9a..dea289c8518 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/EndpointImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ import com.sun.xml.internal.stream.buffer.XMLStreamBufferResult; import com.sun.xml.internal.ws.api.Component; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.BindingID; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.binding.BindingImpl; import com.sun.xml.internal.ws.api.server.*; @@ -303,6 +304,7 @@ public class EndpointImpl extends Endpoint { throw new UnsupportedOperationException("Couldn't load light weight http server", e); } container = getContainer(); + MetadataReader metadataReader = EndpointFactory.getExternalMetadatReader(implClass, binding); WSEndpoint wse = WSEndpoint.create( implClass, true, invoker, @@ -310,7 +312,7 @@ public class EndpointImpl extends Endpoint { getProperty(QName.class, Endpoint.WSDL_PORT), container, binding, - getPrimaryWsdl(), + getPrimaryWsdl(metadataReader), buildDocList(), (EntityResolver) null, false @@ -360,10 +362,10 @@ public class EndpointImpl extends Endpoint { /** * Gets wsdl from @WebService or @WebServiceProvider */ - private @Nullable SDDocumentSource getPrimaryWsdl() { + private @Nullable SDDocumentSource getPrimaryWsdl(MetadataReader metadataReader) { // Takes care of @WebService, @WebServiceProvider's wsdlLocation - EndpointFactory.verifyImplementorClass(implClass); - String wsdlLocation = EndpointFactory.getWsdlLocation(implClass); + EndpointFactory.verifyImplementorClass(implClass, metadataReader); + String wsdlLocation = EndpointFactory.getWsdlLocation(implClass, metadataReader); if (wsdlLocation != null) { ClassLoader cl = implClass.getClassLoader(); URL url = cl.getResource(wsdlLocation); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java index de3c24d70b6..585970b9107 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/HttpEndpoint.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,6 @@ import com.sun.net.httpserver.HttpContext; import com.sun.xml.internal.ws.transport.http.HttpAdapter; import com.sun.xml.internal.ws.transport.http.HttpAdapterList; import com.sun.xml.internal.ws.server.ServerRtException; -import com.sun.xml.internal.ws.server.WSEndpointImpl; import com.sun.xml.internal.ws.resources.ServerMessages; import javax.xml.ws.EndpointReference; @@ -127,9 +126,8 @@ public final class HttpEndpoint extends com.sun.xml.internal.ws.api.server.HttpE } public T getEndpointReference(Class clazz, Element...referenceParameters) { - WSEndpointImpl endpointImpl = (WSEndpointImpl) adapter.getEndpoint(); String eprAddress = getEPRAddress(); - return clazz.cast(endpointImpl.getEndpointReference(clazz, eprAddress,eprAddress+"?wsdl", referenceParameters)); + return clazz.cast(adapter.getEndpoint().getEndpointReference(clazz, eprAddress,eprAddress+"?wsdl", referenceParameters)); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java index 9b5b17d4828..6d65294eff0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -91,19 +91,19 @@ final class PortableConnectionImpl extends WSHTTPConnection implements WebServic } @Override - public void setResponseHeader(String key, List value) { - httpExchange.getResponseHeaders().put(key, value); - } + public void setResponseHeader(String key, List value) { + httpExchange.getResponseHeaders().put(key, value); + } - @Override - public Set getRequestHeaderNames() { + @Override + public Set getRequestHeaderNames() { return httpExchange.getRequestHeaders().keySet(); - } + } - @Override - public List getRequestHeaderValues(String headerName) { - return httpExchange.getRequestHeaders().get(headerName); - } + @Override + public List getRequestHeaderValues(String headerName) { + return httpExchange.getRequestHeaders().get(headerName); + } @Override @Property({MessageContext.HTTP_RESPONSE_HEADERS,Packet.OUTBOUND_TRANSPORT_HEADERS}) @@ -127,11 +127,11 @@ final class PortableConnectionImpl extends WSHTTPConnection implements WebServic return status; } - public @NotNull InputStream getInput() throws IOException { + public @Override @NotNull InputStream getInput() throws IOException { return httpExchange.getRequestBody(); } - public @NotNull OutputStream getOutput() throws IOException { + public @Override @NotNull OutputStream getOutput() throws IOException { assert !outputWritten; outputWritten = true; @@ -139,23 +139,26 @@ final class PortableConnectionImpl extends WSHTTPConnection implements WebServic return httpExchange.getResponseBody(); } - public @NotNull WebServiceContextDelegate getWebServiceContextDelegate() { + public @Override @NotNull WebServiceContextDelegate getWebServiceContextDelegate() { return this; } + @Override public Principal getUserPrincipal(Packet request) { return httpExchange.getUserPrincipal(); } + @Override public boolean isUserInRole(Packet request, String role) { return httpExchange.isUserInRole(role); } - public @NotNull String getEPRAddress(Packet request, WSEndpoint endpoint) { - PortAddressResolver resolver = adapter.owner.createPortAddressResolver(getBaseAddress()); + public @Override @NotNull String getEPRAddress(Packet request, WSEndpoint endpoint) { + PortAddressResolver resolver = adapter.owner.createPortAddressResolver(getBaseAddress(), endpoint.getImplementationClass()); String address = resolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart()); - if(address==null) + if(address==null) { throw new WebServiceException(WsservletMessages.SERVLET_NO_ADDRESS_AVAILABLE(endpoint.getPortName())); + } return address; } @@ -174,12 +177,14 @@ final class PortableConnectionImpl extends WSHTTPConnection implements WebServic return httpExchange.getAttribute(MessageContext.SERVLET_REQUEST); } + @Override public String getWSDLAddress(@NotNull Packet request, @NotNull WSEndpoint endpoint) { String eprAddress = getEPRAddress(request,endpoint); - if(adapter.getEndpoint().getPort() != null) + if(adapter.getEndpoint().getPort() != null) { return eprAddress+"?wsdl"; - else + } else { return null; + } } @Override @@ -232,26 +237,27 @@ final class PortableConnectionImpl extends WSHTTPConnection implements WebServic httpExchange.addResponseHeader("Content-Length", ""+value); } - @Override - public String getRequestURI() { - return httpExchange.getRequestURI().toString(); - } + @Override + public String getRequestURI() { + return httpExchange.getRequestURI().toString(); + } - @Override - public String getRequestScheme() { - return httpExchange.getScheme(); - } + @Override + public String getRequestScheme() { + return httpExchange.getScheme(); + } - @Override - public String getServerName() { - return httpExchange.getLocalAddress().getHostName(); - } + @Override + public String getServerName() { + return httpExchange.getLocalAddress().getHostName(); + } - @Override - public int getServerPort() { - return httpExchange.getLocalAddress().getPort(); - } + @Override + public int getServerPort() { + return httpExchange.getLocalAddress().getPort(); + } + @Override protected PropertyMap getPropertyMap() { return model; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java index 1a074558289..000ac1dabe6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/PortableHttpHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import javax.xml.ws.spi.http.HttpHandler; import javax.xml.ws.spi.http.HttpExchange; import java.io.IOException; import java.util.concurrent.Executor; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -66,9 +67,12 @@ final class PortableHttpHandler extends HttpHandler { /** * Called by HttpServer when there is a matching request for the context */ + @Override public void handle(HttpExchange msg) { try { - logger.fine("Received HTTP request:"+msg.getRequestURI()); + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); + } if (executor != null) { // Use application's Executor to handle request. Application may // have set an executor using Endpoint.setExecutor(). @@ -76,16 +80,18 @@ final class PortableHttpHandler extends HttpHandler { } else { handleExchange(msg); } - } catch(Throwable e) { + } catch (Throwable e) { // Dont't propagate the exception otherwise it kills the httpserver - e.printStackTrace(); + logger.log(Level.SEVERE, null, e); } } public void handleExchange(HttpExchange msg) throws IOException { WSHTTPConnection con = new PortableConnectionImpl(adapter,msg); try { - logger.fine("Received HTTP request:"+msg.getRequestURI()); + if (logger.isLoggable(Level.FINE)) { + logger.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); + } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) || method.equals(PUT_METHOD) || method.equals(DELETE_METHOD)) { @@ -109,6 +115,8 @@ final class PortableHttpHandler extends HttpHandler { this.msg = msg; } + @Override + @SuppressWarnings("CallToThreadDumpStack") public void run() { try { handleExchange(msg); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java index f3c6524d177..fec08192cc3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,6 +35,7 @@ import com.sun.xml.internal.ws.transport.http.HttpAdapter; import javax.xml.ws.WebServiceException; import java.net.URI; import java.net.URISyntaxException; +import java.util.logging.Level; import java.util.logging.Logger; /** @@ -60,7 +61,8 @@ public final class ServerAdapter extends HttpAdapter implements BoundEndpoint { // registers itself with the container Module module = endpoint.getContainer().getSPI(Module.class); if(module==null) - LOGGER.warning("Container "+endpoint.getContainer()+" doesn't support "+Module.class); + LOGGER.log(Level.WARNING, "Container {0} doesn''t support {1}", + new Object[]{endpoint.getContainer(), Module.class}); else { module.getBoundEndpoints().add(this); } @@ -75,8 +77,8 @@ public final class ServerAdapter extends HttpAdapter implements BoundEndpoint { } - @NotNull - public URI getAddress() { + @Override + public @NotNull URI getAddress() { WebModule webModule = endpoint.getContainer().getSPI(WebModule.class); if(webModule==null) // this is really a bug in the container implementation @@ -85,6 +87,7 @@ public final class ServerAdapter extends HttpAdapter implements BoundEndpoint { return getAddress(webModule.getContextPath()); } + @Override public @NotNull URI getAddress(String baseAddress) { String adrs = baseAddress+getValidPath(); try { @@ -103,6 +106,7 @@ public final class ServerAdapter extends HttpAdapter implements BoundEndpoint { return urlPattern; } + @Override public String toString() { return super.toString()+"[name="+name+']'; } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java index 46de7265ad8..79e313e726a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerAdapterList.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java index 41425a26ddf..0f90cda181e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerConnectionImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -227,7 +227,7 @@ final class ServerConnectionImpl extends WSHTTPConnection implements WebServiceC public @NotNull String getEPRAddress(Packet request, WSEndpoint endpoint) { //return WSHttpHandler.getRequestAddress(httpExchange); - PortAddressResolver resolver = adapter.owner.createPortAddressResolver(getBaseAddress()); + PortAddressResolver resolver = adapter.owner.createPortAddressResolver(getBaseAddress(), endpoint.getImplementationClass()); String address = resolver.getAddressFor(endpoint.getServiceName(), endpoint.getPortName().getLocalPart()); if(address==null) throw new WebServiceException(WsservletMessages.SERVLET_NO_ADDRESS_AVAILABLE(endpoint.getPortName())); diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java index 8fc2c49bf31..80c7dc9b8c7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerContainer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,6 +48,9 @@ class ServerContainer extends Container { }; public T getSPI(Class spiType) { + T t = super.getSPI(spiType); + if (t != null) + return t; if (spiType == Module.class) { return spiType.cast(module); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java index 370cdf5914c..a16ec36bb75 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/ServerMgr.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java index b90645813e2..4653b237671 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/transport/http/server/WSHttpHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -72,7 +72,7 @@ final class WSHttpHandler implements HttpHandler { public void handle(HttpExchange msg) { try { if (fineTraceEnabled) { - LOGGER.fine("Received HTTP request:"+msg.getRequestURI()); + LOGGER.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } if (executor != null) { // Use application's Executor to handle request. Application may @@ -90,7 +90,7 @@ final class WSHttpHandler implements HttpHandler { WSHTTPConnection con = new ServerConnectionImpl(adapter,msg); try { if (fineTraceEnabled) { - LOGGER.fine("Received HTTP request:"+msg.getRequestURI()); + LOGGER.log(Level.FINE, "Received HTTP request:{0}", msg.getRequestURI()); } String method = msg.getRequestMethod(); if(method.equals(GET_METHOD) || method.equals(POST_METHOD) || method.equals(HEAD_METHOD) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java index 01a7903e549..18ee0389f24 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ASCIIUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,6 @@ package com.sun.xml.internal.ws.util; import java.io.InputStream; import java.io.IOException; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; import java.io.OutputStream; /** @@ -121,22 +119,6 @@ public class ASCIIUtility { return new String(theChars); } - public static byte[] getBytes(String s) { - char [] chars= s.toCharArray(); - int size = chars.length; - byte[] bytes = new byte[size]; - - for (int i = 0; i < size;) - bytes[i] = (byte) chars[i++]; - return bytes; - } - - public static byte[] getBytes(InputStream is) throws IOException { - ByteArrayBuffer bab = new ByteArrayBuffer(); - bab.write(is); - return bab.toByteArray(); - } - public static void copyStream(InputStream is, OutputStream out) throws IOException { int size = 1024; byte[] buf = new byte[size]; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java index 9ae70f7fc25..e85a23d90a7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayBuffer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java index 4f199bec431..0aa23ee0d68 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ByteArrayDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java index e62e123df30..376bcea57f7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/CompletedFuture.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java index 997dd74c7e5..7432a12e222 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Constants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java index bfeba7983b6..e5f8cb7c0ad 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/DOMUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,32 +25,25 @@ package com.sun.xml.internal.ws.util; -import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.xml.sax.SAXException; +import com.sun.istack.internal.NotNull; +import com.sun.istack.internal.Nullable; +import com.sun.xml.internal.ws.util.xml.XmlUtil; +import org.w3c.dom.*; +import javax.xml.XMLConstants; +import javax.xml.namespace.NamespaceContext; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.FactoryConfigurationError; import javax.xml.parsers.ParserConfigurationException; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; -import javax.xml.XMLConstants; -import javax.xml.namespace.NamespaceContext; -import java.io.IOException; -import java.io.InputStream; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import java.util.ArrayList; - -import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; /** - * @author: JAXWS Development Team + * @author JAXWS Development Team */ public class DOMUtil { @@ -63,7 +56,7 @@ public class DOMUtil { synchronized (DOMUtil.class) { if (db == null) { try { - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(); dbf.setNamespaceAware(true); db = dbf.newDocumentBuilder(); } catch (ParserConfigurationException e) { @@ -74,28 +67,6 @@ public class DOMUtil { } } - public static Node createDOMNode(InputStream inputStream) { - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - dbf.setNamespaceAware(true); - dbf.setValidating(false); - try { - DocumentBuilder builder = dbf.newDocumentBuilder(); - try { - return builder.parse(inputStream); - } catch (SAXException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } catch (IOException e) { - e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. - } - } catch (ParserConfigurationException pce) { - IllegalArgumentException iae = new IllegalArgumentException(pce.getMessage()); - iae.initCause(pce); - throw iae; - } - return null; - } - /** * Traverses a DOM node and writes out on a streaming writer. * @@ -112,6 +83,7 @@ public class DOMUtil { switch (child.getNodeType()) { case Node.PROCESSING_INSTRUCTION_NODE: writer.writeProcessingInstruction(child.getNodeValue()); + break; case Node.DOCUMENT_TYPE_NODE: break; case Node.CDATA_SECTION_NODE: @@ -126,6 +98,7 @@ public class DOMUtil { case Node.ELEMENT_NODE: serializeNode((Element) child, writer); break; + default: break; } } } @@ -222,8 +195,9 @@ public class DOMUtil { for (Node n = e.getFirstChild(); n != null; n = n.getNextSibling()) { if (n.getNodeType() == Node.ELEMENT_NODE) { Element c = (Element) n; - if (c.getLocalName().equals(local) && c.getNamespaceURI().equals(nsUri)) + if (c.getLocalName().equals(local) && c.getNamespaceURI().equals(nsUri)) { return c; + } } } return null; @@ -232,8 +206,11 @@ public class DOMUtil { private static @NotNull String fixNull(@Nullable String s) { - if (s == null) return ""; - else return s; + if (s == null) { + return ""; + } else { + return s; + } } /** diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java index 90c8f76bdfb..8745d549275 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetReflection.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java index 3a8eb2556e9..2c971e14f89 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/FastInfosetUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java index 100eec027f0..16ba6cae6ce 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java index 8d8ae533bf2..c777feae423 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/HandlerAnnotationProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,11 @@ package com.sun.xml.internal.ws.util; import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.api.databinding.MetadataReader; import com.sun.xml.internal.ws.api.server.AsyncProvider; import com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory; import com.sun.xml.internal.ws.handler.HandlerChainsModel; +import com.sun.xml.internal.ws.model.ReflectAnnotationReader; import com.sun.xml.internal.ws.server.EndpointFactory; import com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil; import com.sun.istack.internal.NotNull; @@ -89,14 +91,17 @@ public class HandlerAnnotationProcessor { public static HandlerAnnotationInfo buildHandlerInfo(@NotNull Class clazz, QName serviceName, QName portName, WSBinding binding) { + MetadataReader metadataReader = EndpointFactory.getExternalMetadatReader(clazz, binding); + if (metadataReader == null) { + metadataReader = new ReflectAnnotationReader(); + } + // clazz = checkClass(clazz); - HandlerChain handlerChain = - clazz.getAnnotation(HandlerChain.class); + HandlerChain handlerChain = metadataReader.getAnnotation(HandlerChain.class, clazz); if (handlerChain == null) { - clazz = getSEI(clazz); + clazz = getSEI(clazz, metadataReader); if (clazz != null) - handlerChain = - clazz.getAnnotation(HandlerChain.class); + handlerChain = metadataReader.getAnnotation(HandlerChain.class, clazz); if (handlerChain == null) return null; } @@ -160,7 +165,11 @@ public class HandlerAnnotationProcessor { } } - static Class getSEI(Class clazz) { + static Class getSEI(Class clazz, MetadataReader metadataReader) { + if (metadataReader == null) { + metadataReader = new ReflectAnnotationReader(); + } + if (Provider.class.isAssignableFrom(clazz) || AsyncProvider.class.isAssignableFrom(clazz)) { //No SEI for Provider Implementation return null; @@ -169,17 +178,17 @@ public class HandlerAnnotationProcessor { //No SEI for Service class return null; } - if (!clazz.isAnnotationPresent(WebService.class)) { - throw new UtilException("util.handler.no.webservice.annotation", - clazz.getCanonicalName()); - } - WebService webService = clazz.getAnnotation(WebService.class); + WebService webService = metadataReader.getAnnotation(WebService.class, clazz); + if (webService == null) { + throw new UtilException("util.handler.no.webservice.annotation", clazz.getCanonicalName()); + } String ei = webService.endpointInterface(); if (ei.length() > 0) { clazz = getClass(webService.endpointInterface()); - if (!clazz.isAnnotationPresent(WebService.class)) { + WebService ws = metadataReader.getAnnotation(WebService.class, clazz); + if (ws == null) { throw new UtilException("util.handler.endpoint.interface.no.webservice", webService.endpointInterface()); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java new file mode 100644 index 00000000000..3e055d2b379 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/InjectionPlan.java @@ -0,0 +1,233 @@ +/* + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package com.sun.xml.internal.ws.util; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.Callable; + +import javax.annotation.Resource; +import javax.xml.ws.WebServiceException; + +/** + * Encapsulates which field/method the injection is done, and performs the + * injection. + */ +public abstract class InjectionPlan { + /** + * Perform injection + * + * @param instance + * Instance + * @param resource + * Resource + */ + public abstract void inject(T instance, R resource); + + /** + * Perform injection, but resource is only generated if injection is + * necessary. + * + * @param instance + * @param resource + */ + public void inject(T instance, Callable resource) { + try { + inject(instance, resource.call()); + } catch(Exception e) { + throw new WebServiceException(e); + } + } + + /* + * Injects to a field. + */ + public static class FieldInjectionPlan extends + InjectionPlan { + private final Field field; + + public FieldInjectionPlan(Field field) { + this.field = field; + } + + public void inject(final T instance, final R resource) { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + try { + if (!field.isAccessible()) { + field.setAccessible(true); + } + field.set(instance, resource); + return null; + } catch (IllegalAccessException e) { + throw new WebServiceException(e); + } + } + }); + } + } + + /* + * Injects to a method. + */ + public static class MethodInjectionPlan extends + InjectionPlan { + private final Method method; + + public MethodInjectionPlan(Method method) { + this.method = method; + } + + public void inject(T instance, R resource) { + invokeMethod(method, instance, resource); + } + } + + /* + * Helper for invoking a method with elevated privilege. + */ + private static void invokeMethod(final Method method, final Object instance, final Object... args) { + if(method==null) return; + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + try { + if (!method.isAccessible()) { + method.setAccessible(true); + } + method.invoke(instance,args); + } catch (IllegalAccessException e) { + throw new WebServiceException(e); + } catch (InvocationTargetException e) { + throw new WebServiceException(e); + } + return null; + } + }); + } + + /* + * Combines multiple {@link InjectionPlan}s into one. + */ + private static class Compositor extends InjectionPlan { + private final Collection> children; + + public Compositor(Collection> children) { + this.children = children; + } + + public void inject(T instance, R res) { + for (InjectionPlan plan : children) + plan.inject(instance, res); + } + + public void inject(T instance, Callable resource) { + if (!children.isEmpty()) { + super.inject(instance, resource); + } + } + } + + /* + * Creates an {@link InjectionPlan} that injects the given resource type to the given class. + * + * @param isStatic + * Only look for static field/method + * + */ + public static + InjectionPlan buildInjectionPlan(Class clazz, Class resourceType, boolean isStatic) { + List> plan = new ArrayList>(); + + Class cl = clazz; + while(cl != Object.class) { + for(Field field: cl.getDeclaredFields()) { + Resource resource = field.getAnnotation(Resource.class); + if (resource != null) { + if(isInjectionPoint(resource, field.getType(), + "Incorrect type for field"+field.getName(), + resourceType)) { + + if(isStatic && !Modifier.isStatic(field.getModifiers())) + throw new WebServiceException("Static resource "+resourceType+" cannot be injected to non-static "+field); + + plan.add(new FieldInjectionPlan(field)); + } + } + } + cl = cl.getSuperclass(); + } + + cl = clazz; + while(cl != Object.class) { + for(Method method : cl.getDeclaredMethods()) { + Resource resource = method.getAnnotation(Resource.class); + if (resource != null) { + Class[] paramTypes = method.getParameterTypes(); + if (paramTypes.length != 1) + throw new WebServiceException("Incorrect no of arguments for method "+method); + if(isInjectionPoint(resource,paramTypes[0], + "Incorrect argument types for method"+method.getName(), + resourceType)) { + + if(isStatic && !Modifier.isStatic(method.getModifiers())) + throw new WebServiceException("Static resource "+resourceType+" cannot be injected to non-static "+method); + + plan.add(new MethodInjectionPlan(method)); + } + } + } + cl = cl.getSuperclass(); + } + + return new Compositor(plan); + } + + /* + * Returns true if the combination of {@link Resource} and the field/method type + * are consistent for {@link WebServiceContext} injection. + */ + private static boolean isInjectionPoint(Resource resource, Class fieldType, String errorMessage, Class resourceType ) { + Class t = resource.type(); + if (t.equals(Object.class)) { + return fieldType.equals(resourceType); + } else if (t.equals(resourceType)) { + if (fieldType.isAssignableFrom(resourceType)) { + return true; + } else { + // type compatibility error + throw new WebServiceException(errorMessage); + } + } + return false; + } +} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java index cde3dd34711..5505cf6341e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/JAXWSUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -92,7 +92,7 @@ public final class JAXWSUtils { private static String escapeSpace( String url ) { // URLEncoder didn't work. - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); for (int i = 0; i < url.length(); i++) { // TODO: not sure if this is the only character that needs to be escaped. if (url.charAt(i) == ' ') @@ -109,8 +109,8 @@ public final class JAXWSUtils { try { URL baseURL = new File(".").getCanonicalFile().toURL(); return new URL(baseURL, name).toExternalForm(); - } catch( IOException e ) { - ; // ignore + } catch( IOException e) { + //ignore } return name; } @@ -118,6 +118,7 @@ public final class JAXWSUtils { /** * Checks if the system ID is absolute. */ + @SuppressWarnings("ResultOfObjectAllocationIgnored") public static void checkAbsoluteness(String systemId) { // we need to be able to handle system IDs like "urn:foo", which java.net.URL can't process, // but OTOH we also need to be able to process system IDs like "file://a b c/def.xsd", @@ -125,10 +126,10 @@ public final class JAXWSUtils { // eventually we need a proper URI class that works for us. try { new URL(systemId); - } catch( MalformedURLException _ ) { + } catch( MalformedURLException mue) { try { new URI(systemId); - } catch (URISyntaxException e ) { + } catch (URISyntaxException e) { throw new IllegalArgumentException("system ID '"+systemId+"' isn't absolute",e); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java index 0c38ee52314..00d223a9a49 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/MetadataUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java index 5d2412f14fb..5b45480b229 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NamespaceSupport.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -82,7 +82,7 @@ import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants; * @author David Megginson * @author WS Development Team */ -public class NamespaceSupport { +public final class NamespaceSupport { /* added two new methods, slideContextUp() and slideContextDown() * needed to implement the revised streaming parser class (Parser2) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java index 82ee6ae950d..406f1af441a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseInputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java index 55f0b23e0fc..46d7fd2400a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/NoCloseOutputStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java index be71df8c638..3c6e544167f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Pool.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -114,6 +114,7 @@ public abstract class Pool { this.context = context; } + @Override protected javax.xml.bind.Marshaller create() { try { return context.createMarshaller(); @@ -134,6 +135,7 @@ public abstract class Pool { this.context = context; } + @Override protected javax.xml.bind.Unmarshaller create() { try { return context.createUnmarshaller(); @@ -155,8 +157,21 @@ public abstract class Pool { recycle(master); // we'll use master as a part of the pool, too. } + @Override protected Tube create() { return TubeCloner.clone(master); } + + /** + * + * @return master tubeline from pool + * @deprecated Expected to be used in rare cases where access to master + * tubeline is required and safe, such as Stub.close()." + */ + @Deprecated() + public final Tube takeMaster() { + return master; + } + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java index 38e6276ec75..42a62e1d559 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/QNameMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java index da9836e5f44..2e1b7a1fbd5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ReadAllStream.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -33,6 +33,8 @@ import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; +import java.util.logging.Level; +import java.util.logging.Logger; /** * Reads a input stream completely and creates a new stream @@ -48,6 +50,8 @@ public class ReadAllStream extends InputStream { private boolean readAll; private boolean closed; + private static final Logger LOGGER = Logger.getLogger(ReadAllStream.class.getName()); + public ReadAllStream() { memStream = new MemoryStream(); fileStream = new FileStream(); @@ -75,6 +79,7 @@ public class ReadAllStream extends InputStream { } } + @Override public int read() throws IOException { int ch = memStream.read(); if (ch == -1) { @@ -92,6 +97,7 @@ public class ReadAllStream extends InputStream { return len; } + @Override public void close() throws IOException { if (!closed) { memStream.close(); @@ -120,6 +126,7 @@ public class ReadAllStream extends InputStream { fin = new FileInputStream(tempFile); } + @Override public int read() throws IOException { return (fin != null) ? fin.read() : -1; } @@ -135,7 +142,10 @@ public class ReadAllStream extends InputStream { fin.close(); } if (tempFile != null) { - tempFile.delete(); + boolean success = tempFile.delete(); + if (!success) { + LOGGER.log(Level.INFO, "File {0} could not be deleted", tempFile); + } } } } @@ -168,12 +178,15 @@ public class ReadAllStream extends InputStream { byte[] buf = new byte[8192]; int read = fill(in, buf); total += read; - if (read != 0) + if (read != 0) { add(buf, read); - if (read != buf.length) - return true; // EOF - if (total > inMemory) - return false; // Reached in-memory size + } + if (read != buf.length) { + return true; + } // EOF + if (total > inMemory) { + return false; // Reached in-memory size + } } } @@ -186,6 +199,7 @@ public class ReadAllStream extends InputStream { return total; } + @Override public int read() throws IOException { if (!fetch()) { return -1; diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java index 8e31f7ed29c..4a7848bd126 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/RuntimeVersion.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java index 1518ce01be9..70d63c2b915 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceConfigurationError.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java index 160e1e7a2a3..519d8df5e7f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/ServiceFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,6 +47,8 @@ import java.util.List; import java.util.NoSuchElementException; import java.util.Set; import java.util.TreeSet; +import java.util.WeakHashMap; +import java.util.concurrent.ConcurrentHashMap; /** @@ -137,12 +139,24 @@ public final class ServiceFinder implements Iterable { private static final String prefix = "META-INF/services/"; + private static WeakHashMap> serviceNameCache + = new WeakHashMap>(); + private final Class serviceClass; private final @Nullable ClassLoader classLoader; private final @Nullable ComponentEx component; + private static class ServiceName { + final String className; + final URL config; + public ServiceName(String className, URL config) { + this.className = className; + this.config = config; + } + } + public static ServiceFinder find(@NotNull Class service, @Nullable ClassLoader loader, Component component) { - return new ServiceFinder(service,loader,component); + return new ServiceFinder(service, loader, component); } public static ServiceFinder find(@NotNull Class service, Component component) { @@ -204,6 +218,12 @@ public final class ServiceFinder implements Iterable { this.component = getComponentEx(component); } + private static ServiceName[] serviceClassNames(Class serviceClass, ClassLoader classLoader) { + ArrayList l = new ArrayList(); + for (Iterator it = new ServiceNameIterator(serviceClass,classLoader);it.hasNext();) l.add(it.next()); + return l.toArray(new ServiceName[l.size()]); + } + /** * Returns discovered objects incrementally. * @@ -395,8 +415,8 @@ public final class ServiceFinder implements Iterable { /** * Private inner class implementing fully-lazy provider lookup */ - private static class LazyIterator implements Iterator { - Class service; + private static class ServiceNameIterator implements Iterator { + Class service; @Nullable ClassLoader loader; Enumeration configs = null; Iterator pending = null; @@ -404,7 +424,7 @@ public final class ServiceFinder implements Iterable { String nextName = null; URL currentConfig = null; - private LazyIterator(Class service, ClassLoader loader) { + private ServiceNameIterator(Class service, ClassLoader loader) { this.service = service; this.loader = loader; } @@ -435,26 +455,69 @@ public final class ServiceFinder implements Iterable { return true; } - public T next() throws ServiceConfigurationError { + public ServiceName next() throws ServiceConfigurationError { if (!hasNext()) { throw new NoSuchElementException(); } String cn = nextName; nextName = null; - try { - return service.cast(Class.forName(cn, true, loader).newInstance()); - } catch (ClassNotFoundException x) { - fail(service, - "Provider " + cn + " is specified in "+currentConfig+" but not found"); - } catch (Exception x) { - fail(service, - "Provider " + cn + " is specified in "+currentConfig+"but could not be instantiated: " + x, x); - } - return null; /* This cannot happen */ + return new ServiceName(cn, currentConfig); } public void remove() { throw new UnsupportedOperationException(); } } + + private static class LazyIterator implements Iterator { + Class service; + @Nullable ClassLoader loader; + ServiceName[] names; + int index; + + private LazyIterator(Class service, ClassLoader loader) { + this.service = service; + this.loader = loader; + this.names = null; + index = 0; + } + + @Override + public boolean hasNext() { + if (names == null) { + ConcurrentHashMap nameMap = null; + synchronized(serviceNameCache){ nameMap = serviceNameCache.get(loader); } + names = (nameMap != null)? nameMap.get(service.getName()) : null; + if (names == null) { + names = serviceClassNames(service, loader); + if (nameMap == null) nameMap = new ConcurrentHashMap(); + nameMap.put(service.getName(), names); + synchronized(serviceNameCache){ serviceNameCache.put(loader,nameMap); } + } + } + return (index < names.length); + } + + @Override + public T next() { + if (!hasNext()) throw new NoSuchElementException(); + ServiceName sn = names[index++]; + String cn = sn.className; + URL currentConfig = sn.config; + try { + return service.cast(Class.forName(cn, true, loader).newInstance()); + } catch (ClassNotFoundException x) { + fail(service, "Provider " + cn + " is specified in "+currentConfig+" but not found"); + } catch (Exception x) { + fail(service, "Provider " + cn + " is specified in "+currentConfig+"but could not be instantiated: " + x, x); + } + return null; /* This cannot happen */ + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java index 45e916dab96..42e10a98fde 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StreamUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java index 9778f8d5c55..5b0f5b697a5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/StringUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java index 536e1938a74..af80942c1a2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/UtilException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,8 @@ package com.sun.xml.internal.ws.util; +import com.sun.istack.internal.localization.Localizable; import com.sun.xml.internal.ws.util.exception.JAXWSExceptionBase; -import com.sun.xml.internal.ws.util.localization.Localizable; /** * UtilException represents an exception that occurred while diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java index 9718d984925..2c7f44979df 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/Version.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java index 1804461f026..61e60ea7d1d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/VersionUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java index 40c1d1e5ab1..dd6e5e79f11 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/JAXWSExceptionBase.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,13 +25,16 @@ package com.sun.xml.internal.ws.util.exception; -import com.sun.xml.internal.ws.util.localization.*; - -import javax.xml.ws.WebServiceException; +import com.sun.istack.internal.localization.Localizable; +import com.sun.istack.internal.localization.LocalizableMessage; +import com.sun.istack.internal.localization.LocalizableMessageFactory; +import com.sun.istack.internal.localization.Localizer; +import com.sun.istack.internal.localization.NullLocalizable; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; +import javax.xml.ws.WebServiceException; /** * Represents a {@link WebServiceException} with @@ -53,7 +56,7 @@ public abstract class JAXWSExceptionBase */ protected JAXWSExceptionBase(String key, Object... args) { super(findNestedException(args)); - this.msg = new LocalizableImpl(key,fixNull(args),getDefaultResourceBundleName()); + this.msg = new LocalizableMessage(getDefaultResourceBundleName(), key, args); } @@ -61,11 +64,6 @@ public abstract class JAXWSExceptionBase this(new NullLocalizable(message)); } - private static Object[] fixNull(Object[] x) { - if(x==null) return new Object[0]; - else return x; - } - /** * Creates a new exception that wraps the specified exception. */ diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java index d9755382e3b..e0063b8b6a2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/exception/LocatableWebServiceException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizer.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizer.java deleted file mode 100644 index 4e897bbc3f6..00000000000 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/localization/Localizer.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.xml.internal.ws.util.localization; - -import java.text.MessageFormat; -import java.util.HashMap; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * Localizes the {@link Localizable} into a message - * by using a configured {@link Locale}. - * - * @author WS Development Team - */ -public class Localizer { - - private final Locale _locale; - private final HashMap _resourceBundles; - - public Localizer() { - this(Locale.getDefault()); - } - - public Localizer(Locale l) { - _locale = l; - _resourceBundles = new HashMap(); - } - - public Locale getLocale() { - return _locale; - } - - public String localize(Localizable l) { - String key = l.getKey(); - if (key == Localizable.NOT_LOCALIZABLE) { - // this message is not localizable - return (String) l.getArguments()[0]; - } - String bundlename = l.getResourceBundleName(); - - try { - ResourceBundle bundle = - (ResourceBundle) _resourceBundles.get(bundlename); - - if (bundle == null) { - try { - bundle = ResourceBundle.getBundle(bundlename, _locale); - } catch (MissingResourceException e) { - // work around a bug in the com.sun.enterprise.deployment.WebBundleArchivist: - // all files with an extension different from .class (hence all the .properties files) - // get copied to the top level directory instead of being in the package where they - // are defined - // so, since we can't find the bundle under its proper name, we look for it under - // the top-level package - - int i = bundlename.lastIndexOf('.'); - if (i != -1) { - String alternateBundleName = - bundlename.substring(i + 1); - try { - bundle = - ResourceBundle.getBundle( - alternateBundleName, - _locale); - } catch (MissingResourceException e2) { - // give up - return getDefaultMessage(l); - } - } - } - - _resourceBundles.put(bundlename, bundle); - } - - if (bundle == null) { - return getDefaultMessage(l); - } - - if (key == null) - key = "undefined"; - - String msg; - try { - msg = bundle.getString(key); - } catch (MissingResourceException e) { - // notice that this may throw a MissingResourceException of its own (caught below) - msg = bundle.getString("undefined"); - } - - // localize all arguments to the given localizable object - Object[] args = l.getArguments(); - for (int i = 0; i < args.length; ++i) { - if (args[i] instanceof Localizable) - args[i] = localize((Localizable) args[i]); - } - - String message = MessageFormat.format(msg, args); - return message; - - } catch (MissingResourceException e) { - return getDefaultMessage(l); - } - - } - - private String getDefaultMessage(Localizable l) { - String key = l.getKey(); - Object[] args = l.getArguments(); - StringBuilder sb = new StringBuilder(); - sb.append("[failed to localize] "); - sb.append(key); - if (args != null) { - sb.append('('); - for (int i = 0; i < args.length; ++i) { - if (i != 0) - sb.append(", "); - sb.append(String.valueOf(args[i])); - } - sb.append(')'); - } - return sb.toString(); - } - -} diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java index d2f47710a51..db51719df88 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/AbstractSchemaValidationTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -107,8 +107,9 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp private static class ValidationDocumentAddressResolver implements DocumentAddressResolver { @Nullable + @Override public String getRelativeAddressFor(@NotNull SDDocument current, @NotNull SDDocument referenced) { - LOGGER.fine("Current = "+current.getURL()+" resolved relative="+referenced.getURL()); + LOGGER.log(Level.FINE, "Current = {0} resolved relative={1}", new Object[]{current.getURL(), referenced.getURL()}); return referenced.getURL().toExternalForm(); } } @@ -175,6 +176,7 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp } } + @Override public SDDocument resolve(String systemId) { SDDocument sdi = docs.get(systemId); if (sdi == null) { @@ -190,8 +192,11 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp return sdi; } + @Override public LSInput resolveResource(String type, String namespaceURI, String publicId, final String systemId, final String baseURI) { - LOGGER.fine("type="+type+ " namespaceURI="+namespaceURI+" publicId="+publicId+" systemId="+systemId+" baseURI="+baseURI); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "type={0} namespaceURI={1} publicId={2} systemId={3} baseURI={4}", new Object[]{type, namespaceURI, publicId, systemId, baseURI}); + } try { final SDDocument doc; if (systemId == null) { @@ -205,14 +210,17 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp if (doc != null) { return new LSInput() { + @Override public Reader getCharacterStream() { return null; } + @Override public void setCharacterStream(Reader characterStream) { throw new UnsupportedOperationException(); } + @Override public InputStream getByteStream() { ByteArrayBuffer bab = new ByteArrayBuffer(); try { @@ -223,54 +231,67 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp return bab.newInputStream(); } + @Override public void setByteStream(InputStream byteStream) { throw new UnsupportedOperationException(); } + @Override public String getStringData() { return null; } + @Override public void setStringData(String stringData) { throw new UnsupportedOperationException(); } + @Override public String getSystemId() { return doc.getURL().toExternalForm(); } + @Override public void setSystemId(String systemId) { throw new UnsupportedOperationException(); } + @Override public String getPublicId() { return null; } + @Override public void setPublicId(String publicId) { throw new UnsupportedOperationException(); } + @Override public String getBaseURI() { return doc.getURL().toExternalForm(); } + @Override public void setBaseURI(String baseURI) { throw new UnsupportedOperationException(); } + @Override public String getEncoding() { return null; } + @Override public void setEncoding(String encoding) { throw new UnsupportedOperationException(); } + @Override public boolean getCertifiedText() { return false; } + @Override public void setCertifiedText(boolean certifiedText) { throw new UnsupportedOperationException(); } @@ -279,7 +300,9 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp } catch(Exception e) { LOGGER.log(Level.WARNING, "Exception in LSResourceResolver impl", e); } - LOGGER.fine("Don't know about systemId="+systemId+" baseURI="+baseURI); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Don''t know about systemId={0} baseURI={1}", new Object[]{systemId, baseURI}); + } return null; } @@ -325,7 +348,9 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp updateMultiSchemaForTns(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc.getURL().toExternalForm(), multiSchemaForTns); } } - LOGGER.fine("WSDL inlined schema fragment documents(these are used to create a pseudo schema) = "+ inlinedSchemas.keySet()); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "WSDL inlined schema fragment documents(these are used to create a pseudo schema) = {0}", inlinedSchemas.keySet()); + } for(DOMSource src: inlinedSchemas.values()) { String tns = getTargetNamespace(src); updateMultiSchemaForTns(tns, src.getSystemId(), multiSchemaForTns); @@ -393,8 +418,9 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp * Recursively visit ancestors and build up {@link org.xml.sax.helpers.NamespaceSupport} object. */ private void buildNamespaceSupport(NamespaceSupport nss, Node node) { - if(node==null || node.getNodeType()!=Node.ELEMENT_NODE) + if (node==null || node.getNodeType()!=Node.ELEMENT_NODE) { return; + } buildNamespaceSupport( nss, node.getParentNode() ); @@ -427,7 +453,9 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp for( int i=0; i\n"); } sb.append("\n"); - LOGGER.fine("Pseudo Schema for the same tns="+tns+"is "+sb); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Pseudo Schema for the same tns={0}is {1}", new Object[]{tns, sb}); + } // override getReader() so that the same source can be used multiple times return new StreamSource(pseudoSystemId) { @@ -495,7 +525,9 @@ public abstract class AbstractSchemaValidationTube extends AbstractFilterTubeImp sb.append("/>\n"); } sb.append(""); - LOGGER.fine("Master Pseudo Schema = "+sb); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, "Master Pseudo Schema = {0}", sb); + } // override getReader() so that the same source can be used multiple times return new StreamSource("file:x-jax-ws-master-doc") { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java index 05a3873587d..d3a31d71db0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/DumpTube.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java index c60afab8b5a..78b21981f7a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandalonePipeAssembler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java index 3b5a0871bc6..3e18097df2d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/pipe/StandaloneTubeAssembler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties index 7fb176d2f58..fd92f3f946a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties new file mode 100644 index 00000000000..fa39a7e6761 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_de.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = Keine Parser-Eingabequelle. +P-001 = Ung\u00FCltiges Zeichen am Ende des Dokuments, &#x{0}; +P-002 = Einblendung der Entity "&{0};" ist nicht wohlgeformt +P-003 = Vorzeitiges Ende der Eingabe +# {0} - F000-F009, F011, F021. +P-004 = Fehlende Leerstelle {0} +P-005 = Nur Leerstelle zul\u00E4ssig {0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = nach der Deklaration des Elementnamens + # Concatenated with P-004 (P-004 + F001) + F-001 = zwischen Attributname und Typ + # Concatenated with P-004 (P-004 + F002) + F-002 = nach dem Namen des NOTATION-Typs + # Concatenated with P-004 (P-004 + F003) + F-003 = zwischen Attributtyp und Standardwert + # Concatenated with P-004 (P-004 + F004) + F-004 = nach #FIXED + # Concatenated with P-004 (P-004 + F005) + F-005 = nach der " terminating declaration "%HTML.Version" +P-008 = Das n\u00E4chste Zeichen muss "{0}" {1} {2} sein + + # Concatenated with P-008 (P-008 + F020) + F-020 = als Abschlusszeichen f\u00FCr die Referenz auf die Entity + # Concatenated with P-008 (P-008 + F021) + F-021 = als Abschlusszeichen f\u00FCr die Referenz auf die Parameter-Entity + # Concatenated with P-008 (P-008 + F022) + F-022 = als Abschlusszeichen f\u00FCr den Kommentar + # Concatenated with P-008 (P-008 + F023) + F-023 = in der XML-Deklaration + # Concatenated with P-008 (P-008 + F024) + F-024 = als Abschlusszeichen f\u00FCr die interne DTD-Teilmenge + # Concatenated with P-008 (P-008 + F025) + F-025 = als Abschlusszeichen f\u00FCr die -Deklaration + # Concatenated with P-008 (P-008 + F026) + F-026 = nach dem Attributnamen + # Concatenated with P-008 (P-008 + F027) + F-027 = als Abschlusszeichen f\u00FCr das Element + # Concatenated with P-008 (P-008 + F028) + F-028 = als Anfangszeichen des Contentmodells f\u00FCr das Element + # Concatenated with P-008 (P-008 + F029) + F-029 = als Anfangszeichen f\u00FCr die Liste der Attribut-NOTATIONEN + # Concatenated with P-008 (P-008 + F030) + F-030 = als Anfangszeichen f\u00FCr die DTD-Teilmenge der Bedingung + # Concatenated with P-008 (P-008 + F031) + F-031 = als Abschlusszeichen f\u00FCr die -Deklaration + # Concatenated with P-008 (P-008 + F032) + F-032 = als Abschlusszeichen f\u00FCr die -Deklaration + +P-009 = Ung\u00FCltiges Zeichen oder ung\u00FCltige Entity-Referenzsyntax + +P-010 = Nur externe Parameter-Entitys d\u00FCrfen "%{0};" in Entity-Werten verwenden +P-011 = Ung\u00FCltige Syntax f\u00FCr Parameter-Entity-Referenz +P-012 = Verwenden Sie in Attributwerten "<" f\u00FCr "<" +P-013 = Ung\u00FCltige Referenz auf externe Entity "&{0};" im Attribut +P-014 = Referenz auf nicht definierte Entity "&{0};" +# {0} - F033-F035 +P-015 = F\u00FCr {0} wird ein Wert in Anf\u00FChrungszeichen erwartet + + # Concatenated with P-015 (P-015 + F033) + F-033 = PUBLIC-ID + # Concatenated with P-015 (P-015 + F034) + F-034 = SYSTEM-ID + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = Attributwert {0} + +P-016 = Ung\u00FCltiges Zeichen in PUBLIC-ID: "{0}" +P-017 = Entity-Ende beim Verarbeiten des Kommentars +P-018 = Ziel der Verarbeitungsanweisung fehlt +P-019 = XML-Deklaration darf nur am Anfang von Entitys stehen + +P-020 = Ung\u00FCltiges Ziel f\u00FCr Verarbeitungsanweisung: "{0}" +P-021 = Eingabeende in Verarbeitungsanweisung +P-022 = Ung\u00FCltiger Name f\u00FCr Verarbeitungsanweisung oder fehlende Leerstelle +P-023 = Ung\u00FCltiges Zeichen "&#x{0};" ({1}) am Ende der XML-Deklaration +P-024 = "{0}=..." erwartet +P-025 = XML-Version "{0}" muss deklariert werden +P-026 = Ung\u00FCltige XML-Versionszeichenfolge "{0}" +P-027 = XML-Version "{0}" wird erkannt, aber nicht "{1}" +P-028 = Interne DTD-Teilmenge darf keine "" als Abschluss f\u00FCr das auf Zeile {1} beginnende Element erwartet +P-035 = Entity-Ende nicht zul\u00E4ssig, ein End-Tag fehlt +P-036 = ">" muss -Deklaration abschlie\u00DFen und nicht "{1}" +P-037 = Sequence-Contentmodell darf nicht "{0}" enthalten +P-038 = Choice-Contentmodell darf nicht "{0}" enthalten +P-039 = Kein Contentmodell darf "{0}" enthalten + +P-040 = Rechte Klammer oder "{1}" in Contentmodell erforderlich und nicht "{0}" +P-041 = Rechte Klammer, "," oder "|" in Contentmodell erforderlich und nicht "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = Ung\u00FCltiges Modell mit gemischtem Content f\u00FCr "{0}", n\u00E4chstes Zeichen = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = Modell mit gemischtem Content f\u00FCr "{0}" muss mit ")*" und nicht mit "{1}" enden +P-044 = Eine Attributdeklaration oder ">" wird erwartet und nicht "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = Ung\u00FCltiger Typ (beginnt mit "{1}") f\u00FCr das Attribut "{0}" +P-046 = Schl\u00FCsselwort in bedingtem DTD-Abschnitt erforderlich +P-047 = Nicht abgeschlossener bedingter DTD-Abschnitt +P-048 = Nur INCLUDE und IGNORE sind zul\u00E4ssig und nicht "{0}" +P-049 = Ung\u00FCltige Dezimalzeichenreferenz + +P-050 = Ung\u00FCltige Hexadezimalzeichen-Referenz +P-051 = Ung\u00FCltiges XML-Zeichen &#x{0}; +P-052 = Interne Entity "&{0};" weist Zeichen nach dem Content auf +P-053 = Nicht geparste Entitys, wie "&{0};", d\u00FCrfen nicht einbezogen werden +P-054 = Urspr\u00FCngliche Entity-Definition f\u00FCr "&{0};" wird verwendet +P-055 = Relativer URI "{0}" kann nicht ohne einen Dokument-URI aufgel\u00F6st werden +P-056 = URI "{0}" hat eine Fragment-ID +P-057 = "?>" zum Abschluss der XML-Deklaration erforderlich +P-058 = Externe Entity "&{0};" weist Zeichen nach dem Content auf +P-059 = Externe Parameter-Entity "%{0};" weist Zeichen nach dem Markup auf + +P-060 = Ung\u00FCltiges Zeichen "{0}" im Codierungsnamen +P-061 = Deklarierte Codierung "{0}" stimmt nicht mit der tats\u00E4chlichen Codierung "{1}" \u00FCberein. Dies ist m\u00F6glicherweise kein Fehler +P-062 = Notation muss PUBLIC oder SYSTEM sein +P-063 = Erste Definition der Notation "{0}" wird verwendet +P-064 = Vorzeitiges Ende der Parameter-Entity "%{0};" +P-065 = Entity Resolver hat keine SYSTEM-ID angegeben. Dies kann sich auf relative URIs auswirken +# P-066 ... ID available +P-067 = Document Root-Element fehlt +P-068 = Notationsname ist erforderlich +P-069 = Einblendung der Entity "{0}" ist rekursiv + +P-070 = Fehlerhaftes Format des zweiten Teils des Surrogatpaares: &#x{0}; +P-071 = Ung\u00FCltiges XML-Zeichen: &#x{0}; +P-072 = Zeichendaten d\u00FCrfen nicht "]]>" enthalten +# Character data section starts with "" with text in between. No change needed. +P-073 = Dateiende (EOF) beim Parsen des -Deklaration verwendet +V-004 = Nicht deklarierte Notation "{0}" wird von einer -Deklaration verwendet +V-005 = Elementtyp "{0}" ist nicht deklariert +V-006 = Root-Elementtyp ist "{0}", wurde jedoch als "{1}" deklariert +V-007 = Attribut "{0}" ist f\u00FCr das Element "{1}" nicht deklariert +V-008 = Attribut "{0}" des Elements "{1}" darf nur den Wert "{2}" aufweisen +# {0} - probably attribute name. +V-009 = Attributwert f\u00FCr "{0}" ist #REQUIRED + +V-010 = Dies ist ein Standalone-Dokument. Daher darf das Attribut "{0}" keinen Standardwert aufweisen +V-011 = Dies ist ein Standalone-Dokument. Daher darf das Element "{0}" keine ignorierbaren Leerstellen aufweisen +V-012 = Element "{0}" wurde bereits deklariert +V-013 = Parameter-Entitys d\u00FCrfen keine partiellen Deklarationen enthalten +# {0} - element name +V-014 = Fehler bei der Parameter-Entity-Verschachtelung im Contentmodell f\u00FCr "{0}" +V-015 = Modell mit gemischtem Content wiederholt das Element "{0}" +V-016 = Dieses Element verf\u00FCgt bereits \u00FCber ein ID-Attribut, "{0}" +V-017 = ID-Attribut "{0}" darf nicht #FIXED sein +V-018 = ID-Attribut "{0}" darf keinen Standardwert aufweisen +V-019 = Dies ist ein Standalone-Dokument. Daher muss dieses Attribut vornormalisiert werden + +V-020 = Parameter-Entitys d\u00FCrfen keine partiellen bedingten DTD-Abschnitte enthalten +V-021 = Parameter-Entitys d\u00FCrfen keine partiellen Kommentare enthalten +V-022 = Referenz auf nicht definierte Parameter-Entity "%{0};" +V-023 = Dies ist ein Standalone-Dokument. Daher ist diese ignorierbare CDATA-Leerstelle nicht zul\u00E4ssig +V-024 = Kein Element hat ein ID-Attribut mit dem Wert "{0}" +V-025 = ID-Werte m\u00FCssen XML-Namen sein. "{0}" ist kein Name +V-026 = Ein anderes Element weist bereits ein ID-Attribut mit dem Wert "{0}" auf +V-027 = IDREF/IDREFS-Werte m\u00FCssen XML-Namen sein. "{0}" ist kein Name +V-028 = NMTOKEN/NMTOKENS-Werte m\u00FCssen XML-Namenstoken sein. "{0}" ist kein Namenstoken +V-029 = Der Wert "{0}" ist keiner der aufgez\u00E4hlten Werte f\u00FCr dieses Attribut + +V-030 = Attributwert "{0}" benennt keine Notation +V-031 = Attributwert "{0}" benennt keine nicht geparste Entity +V-032 = NMTOKENS-Attribute m\u00FCssen mindestens einen Wert aufweisen +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = EMPTY-Contentmodelle d\u00FCrfen keinen Content aufweisen +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = Element "{0}" l\u00E4sst keine weitere Eingabe zu. "{1}" ist nicht zul\u00E4ssig +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = Element "{0}" l\u00E4sst keinen Text zu +V-038 = Element "{0}" erfordert zus\u00E4tzliche Elemente +V-039 = IDREFS-Attribute m\u00FCssen mindestens einen Wert aufweisen + +V-040 = ENTITIES-Attribute m\u00FCssen mindestens einen Wert aufweisen diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties new file mode 100644 index 00000000000..b9d7e0ac5ca --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_es.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = No hay ning\u00FAn origen de entrada de analizador. +P-001 = Car\u00E1cter no v\u00E1lido al final del documento, &#x{0}; +P-002 = La expansi\u00F3n de la entidad "&{0};" no tiene un formato correcto +P-003 = Fin de entrada anticipado +# {0} - F000-F009, F011, F021. +P-004 = Falta espacio en blanco {0} +P-005 = S\u00F3lo se permite un espacio en blanco {0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = despu\u00E9s de la declaraci\u00F3n de nombre del elemento + # Concatenated with P-004 (P-004 + F001) + F-001 = entre el nombre de atributo y el tipo + # Concatenated with P-004 (P-004 + F002) + F-002 = despu\u00E9s del nombre de tipo NOTATION + # Concatenated with P-004 (P-004 + F003) + F-003 = entre el tipo de atributo y el valor por defecto + # Concatenated with P-004 (P-004 + F004) + F-004 = despu\u00E9s de #FIXED + # Concatenated with P-004 (P-004 + F005) + F-005 = despu\u00E9s de la declaraci\u00F3n " terminating declaration "%HTML.Version" +P-008 = El car\u00E1cter siguiente debe ser "{0}" {1} {2} + + # Concatenated with P-008 (P-008 + F020) + F-020 = terminando referencia a la entidad + # Concatenated with P-008 (P-008 + F021) + F-021 = terminando referencia a la entidad de par\u00E1metro + # Concatenated with P-008 (P-008 + F022) + F-022 = terminando comentario + # Concatenated with P-008 (P-008 + F023) + F-023 = en declaraci\u00F3n XML + # Concatenated with P-008 (P-008 + F024) + F-024 = terminando subjuego DTD interno + # Concatenated with P-008 (P-008 + F025) + F-025 = terminando declaraci\u00F3n + # Concatenated with P-008 (P-008 + F026) + F-026 = despu\u00E9s del nombre de atributo + # Concatenated with P-008 (P-008 + F027) + F-027 = terminando elemento + # Concatenated with P-008 (P-008 + F028) + F-028 = iniciando modelo de contenido para elemento + # Concatenated with P-008 (P-008 + F029) + F-029 = iniciando lista de atributos NOTATIONS + # Concatenated with P-008 (P-008 + F030) + F-030 = iniciando subjuego DTD de condiciones + # Concatenated with P-008 (P-008 + F031) + F-031 = terminando declaraci\u00F3n + # Concatenated with P-008 (P-008 + F032) + F-032 = terminando declaraci\u00F3n + +P-009 = Car\u00E1cter o sintaxis de referencia a entidad no v\u00E1lidos + +P-010 = S\u00F3lo las entidades de par\u00E1metros externos pueden utilizar "%{0};" en los valores de entidad +P-011 = Sintaxis de referencia de entidad del par\u00E1metro no v\u00E1lida +P-012 = Utilice "<" para "<" en valores de atributo +P-013 = Referencia no v\u00E1lida a la entidad externa "&{0};" en el atributo +P-014 = Referencia a una entidad no definida "&{0};" +# {0} - F033-F035 +P-015 = Se esperaba un valor entrecomillado para {0} + + # Concatenated with P-015 (P-015 + F033) + F-033 = Identificador PUBLIC + # Concatenated with P-015 (P-015 + F034) + F-034 = Identificador SYSTEM + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = valor de atributo {0} + +P-016 = Car\u00E1cter no v\u00E1lido en el identificador PUBLIC: "{0}" +P-017 = Fin de entidad al procesar el comentario +P-018 = Falta el destino de la instrucci\u00F3n de procesamiento +P-019 = La declaraci\u00F3n XML s\u00F3lo puede iniciar entidades + +P-020 = Destino de instrucci\u00F3n de procesamiento no v\u00E1lido: "{0}" +P-021 = Fin de entrada dentro de una instrucci\u00F3n de procesamiento +P-022 = Nombre de instrucci\u00F3n de procesamiento no v\u00E1lido o falta un espacio en blanco +P-023 = Car\u00E1cter no v\u00E1lido "&#x{0};" ({1}) al final de la declaraci\u00F3n XML +P-024 = Se esperaba "{0}=..." +P-025 = Se debe declarar la versi\u00F3n XML "{0}" +P-026 = Cadena de versi\u00F3n XML no v\u00E1lida "{0}". +P-027 = Se reconoce la versi\u00F3n XML "{0}", pero no "{1}" +P-028 = El subjuego DTD interno no debe tener construcciones "" para terminar el elemento que comienza en la l\u00EDnea {1} +P-035 = Fin de entidad no permitido; falta una etiqueta final +P-036 = La declaraci\u00F3n debe terminar con ">", no con "{1}" +P-037 = El modelo de contenido de secuencia no debe contener "{0}" +P-038 = El modelo de contenido de opciones no debe contener "{0}" +P-039 = Ning\u00FAn modelo de contenido puede contener "{0}" + +P-040 = Es necesario un par\u00E9ntesis derecho o "{1}" en el modelo de contenido, no "{0}" +P-041 = Es necesario un par\u00E9ntesis derecho, "," o "|" en el modelo de contenido, no "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = Modelo de contenido mixto no v\u00E1lido para "{0}"; siguiente car\u00E1cter = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = El modelo de contenido mixto para "{0}" debe terminar por ")*", no por "{1}" +P-044 = Se esperaba una declaraci\u00F3n de atributo o ">", no "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = Tipo no v\u00E1lido (empieza por "{1}") para el atributo "{0}" +P-046 = Se necesita una palabra clave en la secci\u00F3n DTD condicional +P-047 = Secci\u00F3n DTD condicional no terminada +P-048 = S\u00F3lo se permiten INCLUDE e IGNORE, pero no "{0}" +P-049 = Referencia de car\u00E1cter decimal no v\u00E1lida + +P-050 = Referencia de car\u00E1cter hexadecimal no v\u00E1lida +P-051 = Car\u00E1cter XML no v\u00E1lido &#x{0}; +P-052 = La entidad interna "&{0};" tiene caracteres despu\u00E9s del contenido +P-053 = No se deben incluir entidades no analizadas como "&{0};" +P-054 = Utilizando la definici\u00F3n de entidad original para "&{0};" +P-055 = URI relativo "{0}"; no se puede resolver sin un URI de documento +P-056 = El URI "{0}" tiene un identificador de fragmento +P-057 = Es necesario "?>" para terminar la declaraci\u00F3n XML +P-058 = La entidad externa "&{0};" tiene caracteres despu\u00E9s del contenido +P-059 = La entidad del par\u00E1metro externo "%{0};" tiene caracteres despu\u00E9s de la marca + +P-060 = Car\u00E1cter no v\u00E1lido "{0}" en el nombre de codificaci\u00F3n +P-061 = La codificaci\u00F3n declarada "{0}" no coincide con la real "{1}"; puede que no se trate de un error +P-062 = La notaci\u00F3n debe ser PUBLIC o SYSTEM +P-063 = Utilizando la primera definici\u00F3n de la notaci\u00F3n "{0}" +P-064 = Fin anticipado de la entidad del par\u00E1metro "%{0};" +P-065 = El sistema de resoluci\u00F3n de entidades no ha proporcionado el identificador SYSTEM; puede afectar a los URI relativos +# P-066 ... ID available +P-067 = Falta el elemento ra\u00EDz del documento +P-068 = Es necesario el nombre de la notaci\u00F3n +P-069 = La expansi\u00F3n de la entidad "{0}" es recursiva + +P-070 = Segunda parte con formato incorrecto en el par de sustituci\u00F3n: &#x{0}; +P-071 = Car\u00E1cter XML no v\u00E1lido: &#x{0}; +P-072 = Los datos de car\u00E1cter no pueden tener "]]>" +# Character data section starts with "" with text in between. No change needed. +P-073 = EOF al analizar la secci\u00F3n utiliza la notaci\u00F3n no declarada "{0}" +V-004 = La declaraci\u00F3n utiliza la notaci\u00F3n no declarada "{0}" +V-005 = El tipo de elemento "{0}" no est\u00E1 declarado +V-006 = El tipo de elemento ra\u00EDz es "{0}", pero se ha declarado como "{1}" +V-007 = El atributo "{0}" no est\u00E1 declarado para el elemento "{1}" +V-008 = El atributo "{0}" del elemento "{1}" s\u00F3lo debe tener el valor "{2}" +# {0} - probably attribute name. +V-009 = El valor de atributo para "{0}" es #REQUIRED + +V-010 = Este documento es aut\u00F3nomo, por lo que el atributo "{0}" no se debe definir por defecto +V-011 = Este documento es aut\u00F3nomo, por lo que el elemento "{0}" no debe tener un espacio en blanco que se pueda ignorar +V-012 = El elemento "{0}" ya estaba declarado +V-013 = Las entidades de par\u00E1metro no deben contener declaraciones parciales +# {0} - element name +V-014 = Error de anidaci\u00F3n de entidad de par\u00E1metro en el modelo de contenido para "{0}" +V-015 = El modelo de contenido mixto repite el elemento "{0}" +V-016 = Este elemento ya tiene un atributo de identificador "{0}" +V-017 = El atributo de identificador "{0}" no debe ser #FIXED +V-018 = El atributo de identificador "{0}" no se debe definir por defecto +V-019 = Este documento es aut\u00F3nomo; este atributo debe estar previamente normalizado + +V-020 = Las entidades de par\u00E1metro no deben contener secciones DTD condicionales parciales +V-021 = Las entidades de par\u00E1metro no deben contener comentarios parciales +V-022 = Referencia a una entidad de par\u00E1metro no definida "%{0};" +V-023 = Este documento es aut\u00F3nomo; est\u00E1 prohibido este espacio en blanco CDATA que se puede ignorar +V-024 = Ning\u00FAn elemento tiene un atributo de identificador con el valor "{0}" +V-025 = Los valores de identificador deben ser nombres XML; "{0}" no es un nombre +V-026 = Ya hay otro elemento con un atributo de identificador con el valor "{0}" +V-027 = Los valores de IDREF/IDREFS deben ser nombres XML; "{0}" no es un nombre +V-028 = Los valores de NMTOKEN/NMTOKENS deben ser tokens de nombre XML; "{0}" no lo es +V-029 = El valor "{0}" no es uno de los valores enumerados para este atributo + +V-030 = El valor de atributo "{0}" no especifica una notaci\u00F3n +V-031 = El valor de atributo "{0}" no especifica una entidad no analizada +V-032 = Los atributos de NMTOKENS deben tener al menos un valor +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = Los modelos de contenido vac\u00EDos no deben tener contenido +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = El elemento "{0}" no permite m\u00E1s entradas; "{1}" no est\u00E1 permitido +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = El elemento "{0}" no permite texto +V-038 = El elemento "{0}" necesita elementos adicionales +V-039 = Los atributos de IDREFS deben tener al menos un valor + +V-040 = Los atributos de ENTITIES deben tener al menos un valor diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties new file mode 100644 index 00000000000..dcb016a77b4 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_fr.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = Aucune source d'entr\u00E9e d'analyseur. +P-001 = Caract\u00E8re interdit \u00E0 la fin du document, &#x{0}; +P-002 = Le d\u00E9veloppement de l''entit\u00E9 "&{0};" est incorrect +P-003 = Fin d'entr\u00E9e pr\u00E9matur\u00E9e +# {0} - F000-F009, F011, F021. +P-004 = Caract\u00E8re non imprimable manquant {0} +P-005 = Un seul caract\u00E8re non imprimable autoris\u00E9 {0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = apr\u00E8s la d\u00E9claration de nom d'\u00E9l\u00E9ment + # Concatenated with P-004 (P-004 + F001) + F-001 = entre les nom et type d'attribut + # Concatenated with P-004 (P-004 + F002) + F-002 = apr\u00E8s le nom de type de NOTATION + # Concatenated with P-004 (P-004 + F003) + F-003 = entre le type d'attribut et la valeur par d\u00E9faut + # Concatenated with P-004 (P-004 + F004) + F-004 = apr\u00E8s #FIXED + # Concatenated with P-004 (P-004 + F005) + F-005 = apr\u00E8s la d\u00E9claration " terminating declaration "%HTML.Version" +P-008 = Le caract\u00E8re suivant doit \u00EAtre "{0}" {1} {2} + + # Concatenated with P-008 (P-008 + F020) + F-020 = fin de la r\u00E9f\u00E9rence \u00E0 l'entit\u00E9 + # Concatenated with P-008 (P-008 + F021) + F-021 = fin de la r\u00E9f\u00E9rence \u00E0 l'entit\u00E9 de param\u00E8tre + # Concatenated with P-008 (P-008 + F022) + F-022 = fin du commentaire + # Concatenated with P-008 (P-008 + F023) + F-023 = dans la d\u00E9claration XML + # Concatenated with P-008 (P-008 + F024) + F-024 = fin du sous-ensemble DTD interne + # Concatenated with P-008 (P-008 + F025) + F-025 = fin de la d\u00E9claration + # Concatenated with P-008 (P-008 + F026) + F-026 = apr\u00E8s le nom d'attribut + # Concatenated with P-008 (P-008 + F027) + F-027 = fin de l'\u00E9l\u00E9ment + # Concatenated with P-008 (P-008 + F028) + F-028 = d\u00E9marrage du mod\u00E8le de contenu pour l'\u00E9l\u00E9ment + # Concatenated with P-008 (P-008 + F029) + F-029 = d\u00E9but de la liste d'attributs NOTATIONS + # Concatenated with P-008 (P-008 + F030) + F-030 = d\u00E9but du sous-ensemble DTD de condition + # Concatenated with P-008 (P-008 + F031) + F-031 = fin de la d\u00E9claration + # Concatenated with P-008 (P-008 + F032) + F-032 = fin de la d\u00E9claration + +P-009 = Syntaxe de r\u00E9f\u00E9rence d'entit\u00E9 ou de caract\u00E8re interdite + +P-010 = Seules les entit\u00E9s de param\u00E8tre externes peuvent utiliser "%{0};" dans les valeurs d''entit\u00E9 +P-011 = Syntaxe de r\u00E9f\u00E9rence d'entit\u00E9 de param\u00E8tre interdite +P-012 = Utiliser "<" pour "<" dans les valeurs d'attribut +P-013 = R\u00E9f\u00E9rence \u00E0 l''entit\u00E9 externe "&{0};" dans l''attribut interdite +P-014 = R\u00E9f\u00E9rence \u00E0 l''entit\u00E9 non d\u00E9finie "&{0};" +# {0} - F033-F035 +P-015 = Valeur entre guillemets attendue pour {0} + + # Concatenated with P-015 (P-015 + F033) + F-033 = Identificateur PUBLIC + # Concatenated with P-015 (P-015 + F034) + F-034 = Identificateur SYSTEM + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = valeur d''attribut {0} + +P-016 = Caract\u00E8re interdit dans l''identificateur PUBLIC : "{0}" +P-017 = Fin de l'entit\u00E9 lors du traitement du commentaire +P-018 = La cible d'instruction de traitement est manquante +P-019 = Seules les entit\u00E9s peuvent commencer par une d\u00E9claration XML + +P-020 = Cible d''instruction de traitement interdite : "{0}" +P-021 = Fin d'entr\u00E9e dans l'instruction de traitement +P-022 = Nom d'instruction de traitement interdit ou caract\u00E8re non imprimable manquant +P-023 = Caract\u00E8re interdit "&#x{0};" ({1}) \u00E0 la fin de la d\u00E9claration XML +P-024 = Attendu : "{0}=..." +P-025 = La version XML "{0}" doit \u00EAtre d\u00E9clar\u00E9e +P-026 = Cha\u00EEne de version XML interdite "{0}" +P-027 = La version XML "{0}" est reconnue, mais pas "{1}" +P-028 = Un sous-ensemble DTD interne ne doit pas avoir de structures de code PL/SQL "" attendu pour terminer l''\u00E9l\u00E9ment commen\u00E7ant \u00E0 la ligne {1} +P-035 = Fin de l'entit\u00E9 non autoris\u00E9e ; une balise de fin est manquante +P-036 = ">" doit terminer la d\u00E9claration , mais pas "{1}" +P-037 = Le mod\u00E8le de contenu de s\u00E9quence ne doit pas contenir "{0}" +P-038 = Le mod\u00E8le de contenu d''option ne doit pas contenir "{0}" +P-039 = Aucun mod\u00E8le de contenu ne peut contenir "{0}" + +P-040 = Parenth\u00E8se fermante ou "{1}" requis dans le mod\u00E8le de contenu, mais pas "{0}" +P-041 = Parenth\u00E8se fermante, "," ou "|" requis dans le mod\u00E8le de contenu, mais pas "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = Mod\u00E8le de contenu mixte interdit pour "{0}", caract\u00E8re suivant = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = Le mod\u00E8le de contenu mixte pour "{0}" doit finir par ")*", mais pas "{1}" +P-044 = Une d\u00E9claration d''attribut ou le caract\u00E8re ">" est attendu, mais pas "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = Type interdit (commence par "{1}") pour l''attribut "{0}" +P-046 = Mot-cl\u00E9 requis dans la section DTD conditionnelle +P-047 = Section DTD conditionnelle non termin\u00E9e +P-048 = Seuls INCLUDE et IGNORE sont autoris\u00E9s, mais pas "{0}" +P-049 = R\u00E9f\u00E9rence de caract\u00E8re d\u00E9cimal interdite + +P-050 = R\u00E9f\u00E9rence de caract\u00E8re hexad\u00E9cimal interdite +P-051 = Caract\u00E8re XML &#x{0}; interdit +P-052 = L''entit\u00E9 interne "&{0};" inclut des caract\u00E8res apr\u00E8s le contenu +P-053 = Aucune entit\u00E9 non analys\u00E9e ("&{0};") ne doit \u00EAtre incluse +P-054 = Utilisation de la d\u00E9finition d''entit\u00E9 d''origine pour "&{0};" +P-055 = URI relatif "{0}" ; impossible de le r\u00E9soudre sans URI de document +P-056 = L''URI "{0}" a un ID de fragment +P-057 = "?>" requis pour terminer la d\u00E9claration XML +P-058 = L''entit\u00E9 externe "&{0};" inclut des caract\u00E8res apr\u00E8s le contenu +P-059 = L''entit\u00E9 de param\u00E8tre externe "%{0};" inclut des caract\u00E8res apr\u00E8s le balisage + +P-060 = Caract\u00E8re interdit "{0}" dans le nom d''encodage +P-061 = L''encodage d\u00E9clar\u00E9 "{0}" ne concorde pas avec l''encodage r\u00E9el "{1}"; il ne s''agit peut-\u00EAtre pas d''une erreur +P-062 = La notation doit \u00EAtre PUBLIC ou SYSTEM +P-063 = Utilisation de la premi\u00E8re d\u00E9finition de la notation "{0}" +P-064 = Fin pr\u00E9matur\u00E9e de l''entit\u00E9 de param\u00E8tre "%{0};" +P-065 = Le r\u00E9solveur d'entit\u00E9 n'a fourni aucun ID SYSTEM ; cela peut affecter les URI relatifs +# P-066 ... ID available +P-067 = L'\u00E9l\u00E9ment racine de document est manquant +P-068 = Le nom de notation est obligatoire +P-069 = Le d\u00E9veloppement de l''entit\u00E9 "{0}" est r\u00E9cursif + +P-070 = La deuxi\u00E8me partie de la paire de substitution est incorrecte : &#x{0}; +P-071 = Caract\u00E8re XML : &#x{0}; interdit +P-072 = Les donn\u00E9es de caract\u00E8re ne peuvent pas avoir "]]>" +# Character data section starts with "" with text in between. No change needed. +P-073 = EOF lors de l'analyse de la section +V-004 = La notation non d\u00E9clar\u00E9e "{0}" est utilis\u00E9e par une d\u00E9claration +V-005 = Le type d''\u00E9l\u00E9ment "{0}" n''est pas d\u00E9clar\u00E9 +V-006 = Le type d''\u00E9l\u00E9ment racine est "{0}", mais a \u00E9t\u00E9 d\u00E9clar\u00E9 comme \u00E9tant "{1}" +V-007 = L''attribut "{0}" n''est pas d\u00E9clar\u00E9 pour l''\u00E9l\u00E9ment "{1}" +V-008 = L''attribut "{0}" de l''\u00E9l\u00E9ment "{1}" doit avoir la valeur "{2}" uniquement +# {0} - probably attribute name. +V-009 = La valeur d''attribut pour "{0}" est #REQUIRED + +V-010 = Ce document est autonome ; l''attribut "{0}" ne doit donc pas \u00EAtre utilis\u00E9 par d\u00E9faut +V-011 = Ce document est autonome, l''\u00E9l\u00E9ment "{0}" ne doit donc pas avoir de caract\u00E8re non imprimable pouvant \u00EAtre ignor\u00E9 +V-012 = L''\u00E9l\u00E9ment ''{0}'' est d\u00E9j\u00E0 d\u00E9clar\u00E9 +V-013 = Les entit\u00E9s de param\u00E8tre ne doivent pas contenir de d\u00E9clarations partielles +# {0} - element name +V-014 = Erreur d''imbrication d''entit\u00E9 de param\u00E8tre dans le mod\u00E8le de contenu pour "{0}" +V-015 = Le mod\u00E8le de contenu mixte r\u00E9p\u00E8te l''\u00E9l\u00E9ment "{0}" +V-016 = Cet \u00E9l\u00E9ment a d\u00E9j\u00E0 un attribut d''ID, "{0}" +V-017 = L''attribut d''ID "{0}" ne doit pas \u00EAtre #FIXED +V-018 = L''attribut d''ID "{0}" ne doit pas \u00EAtre utilis\u00E9 par d\u00E9faut +V-019 = Ce document est autonome ; cet attribut doit \u00EAtre pr\u00E9normalis\u00E9 + +V-020 = Les entit\u00E9s de param\u00E8tre ne doivent pas contenir de sections DTD conditionnelles partielles +V-021 = Les entit\u00E9s de param\u00E8tre ne doivent pas contenir de commentaires partiels +V-022 = R\u00E9f\u00E9rence \u00E0 l''entit\u00E9 de param\u00E8tre non d\u00E9finie "%{0};" +V-023 = Ce document est autonome ; ce caract\u00E8re non imprimable CDATA pouvant \u00EAtre ignor\u00E9 est interdit +V-024 = Aucun \u00E9l\u00E9ment ne dispose d''un attribut d''ID dot\u00E9 de la valeur "{0}" +V-025 = Les valeurs d''ID doivent \u00EAtre des noms XML ; "{0}" n''en est pas un +V-026 = Un autre \u00E9l\u00E9ment a d\u00E9j\u00E0 un attribut d''ID dot\u00E9 de la valeur "{0}" +V-027 = Les valeurs IDREF/IDREFS doivent \u00EAtre des noms XML ; "{0}" n''en est pas un +V-028 = Les valeurs NMTOKEN/NMTOKENS doivent \u00EAtre des jetons de nom XML ; "{0}" n''en est pas un +V-029 = La valeur "{0}" n''est pas l''une des valeurs \u00E9num\u00E9r\u00E9es pour cet attribut + +V-030 = La valeur d''attribut "{0}" ne nomme pas une notation +V-031 = La valeur d''attribut "{0}" ne nomme pas une entit\u00E9 non analys\u00E9e +V-032 = Les attributs NMTOKENS doivent poss\u00E9der au moins une valeur +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = Les mod\u00E8les de contenu vides ne doivent pas poss\u00E9der de contenu +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = L''\u00E9l\u00E9ment "{0}" n''autorise aucune autre entr\u00E9e ; "{1}" n''est pas autoris\u00E9 +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = L''\u00E9l\u00E9ment "{0}" n''autorise aucun texte +V-038 = L''\u00E9l\u00E9ment "{0}" exige des \u00E9l\u00E9ments suppl\u00E9mentaires +V-039 = Les attributs IDREFS doivent poss\u00E9der au moins une valeur + +V-040 = Les attributs ENTITIES doivent poss\u00E9der au moins une valeur diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties new file mode 100644 index 00000000000..e741ae4dc2f --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_it.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = Nessuna origine di input del parser. +P-001 = Carattere non valido alla fine del documento, &#x{0}; +P-002 = Formato dell''espansione dell''entit\u00E0 "&{0};" non valido +P-003 = Fine prematura dell'input +# {0} - F000-F009, F011, F021. +P-004 = Spazio vuoto {0} mancante +P-005 = Solo spazio vuoto {0} consentito + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = dopo la dichiarazione del nome dell'elemento + # Concatenated with P-004 (P-004 + F001) + F-001 = tra il nome e il tipo di attributo + # Concatenated with P-004 (P-004 + F002) + F-002 = dopo il nome del tipo NOTATION + # Concatenated with P-004 (P-004 + F003) + F-003 = tra il tipo di attributo e il valore predefinito + # Concatenated with P-004 (P-004 + F004) + F-004 = dopo #FIXED + # Concatenated with P-004 (P-004 + F005) + F-005 = dopo la dichiarazione " terminating declaration "%HTML.Version" +P-008 = Il carattere successivo deve essere "{0}" {1} {2} + + # Concatenated with P-008 (P-008 + F020) + F-020 = termine del riferimento all'entit\u00E0 + # Concatenated with P-008 (P-008 + F021) + F-021 = termine del riferimento all'entit\u00E0 parametrica + # Concatenated with P-008 (P-008 + F022) + F-022 = termine del commento + # Concatenated with P-008 (P-008 + F023) + F-023 = nella dichiarazione XML + # Concatenated with P-008 (P-008 + F024) + F-024 = termine del subset DTD interno + # Concatenated with P-008 (P-008 + F025) + F-025 = termine della dichiarazione + # Concatenated with P-008 (P-008 + F026) + F-026 = dopo il nome dell'attributo + # Concatenated with P-008 (P-008 + F027) + F-027 = termine dell'elemento + # Concatenated with P-008 (P-008 + F028) + F-028 = avvio del modello di contenuto per l'elemento + # Concatenated with P-008 (P-008 + F029) + F-029 = avvio dell'elenco dell'attributo NOTATIONS + # Concatenated with P-008 (P-008 + F030) + F-030 = avvio del DTD della condizione + # Concatenated with P-008 (P-008 + F031) + F-031 = termine della dichiarazione + # Concatenated with P-008 (P-008 + F032) + F-032 = termine della dichiarazione + +P-009 = Sintassi del riferimento entit\u00E0 o del carattere non valida + +P-010 = Solo le entit\u00E0 parametriche esterne possono usare "%{0};" nei valori delle entit\u00E0 +P-011 = Sintassi del riferimento entit\u00E0 parametrica non valida +P-012 = Usare "<" per "<" nei valori degli attributi +P-013 = Riferimento non valido all''entit\u00E0 esterna "&{0};" nell''attributo +P-014 = Riferimento all''entit\u00E0 non definita "&{0};" +# {0} - F033-F035 +P-015 = Previsto valore tra virgolette per {0} + + # Concatenated with P-015 (P-015 + F033) + F-033 = Identificativo PUBLIC + # Concatenated with P-015 (P-015 + F034) + F-034 = Identificativo SYSTEM + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = valore attributo {0} + +P-016 = Carattere non valido nell''identificativo PUBLIC: "{0}" +P-017 = Fine dell'entit\u00E0 durante l'elaborazione del commento +P-018 = La destinazione delle istruzioni di elaborazione risulta mancante +P-019 = La dichiarazione XML pu\u00F2 solo iniziare le entit\u00E0 + +P-020 = Destinazione delle istruzioni di elaborazione non valida: "{0}" +P-021 = Fine dell'input all'interno dell'istruzione di elaborazione +P-022 = Nome dell'istruzione di elaborazione non valido oppure spazio vuoto mancante +P-023 = Carattere non valido "&#x{0};" ({1}) alla fine della dichiarazione XML +P-024 = Previsto "{0}=..." +P-025 = \u00C8 necessario dichiarare la versione XML "{0}" +P-026 = Stringa "{0}" della versione XML non valida +P-027 = La versione XML "{0}" \u00E8 riconosciuta, ma non "{1}" +P-028 = Il subset DTD interno non deve includere costrutti "" per terminare l''elemento che inizia alla riga {1} +P-035 = Fine dell'entit\u00E0 non consentita. Tag finale mancante +P-036 = ">" deve terminare la dichiarazione , non "{1}" +P-037 = Il modello di contenuto di sequenza non deve contenere "{0}" +P-038 = Il modello di contenuto di scelta non deve contenere "{0}" +P-039 = Nessun modello di contenuto pu\u00F2 contenere "{0}" + +P-040 = \u00C8 richiesta la parentesi di chiusura o "{1}" nel modello di contenuto, non "{0}" +P-041 = \u00C8 richiesta la parentesi di chiusura, "," o "|" nel modello di contenuto, non "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = Modello di contenuto misto non valido per "{0}", carattere successivo = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = Il modello di contenuto misto per "{0}" deve terminare con ")*", non con "{1}" +P-044 = \u00C8 prevista una dichiarazione di attributo o ">", ma non "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = Tipo non valido (inizia con "{1}") per l''attributo "{0}" +P-046 = Parola chiave richiesta nella sezione DTD condizionale +P-047 = Sezione DTD condizionale non completa +P-048 = Sono consentiti solo INCLUDE e IGNORE, non "{0}" +P-049 = Riferimento del carattere decimale non valido + +P-050 = Riferimento del carattere esadecimale non valido +P-051 = Carattere XML non valido &#x{0}; +P-052 = L''entit\u00E0 interna "&{0};" include caratteri dopo il contenuto +P-053 = Le entit\u00E0 non analizzate, ad esempio "&{0};", non devono essere incluse +P-054 = Uso della definizione di entit\u00E0 originale per "&{0};" +P-055 = Impossibile risolvere l''URI relativo "{0}" senza l''URI di un documento +P-056 = L''URI "{0}" include un ID frammento +P-057 = Richiesto "?>" per terminare la dichiarazione XML +P-058 = L''entit\u00E0 esterna "&{0};" include caratteri dopo il contenuto +P-059 = L''entit\u00E0 parametrica esterna "%{0};" include caratteri dopo il markup + +P-060 = Carattere "{0}" non valido nel nome di codifica +P-061 = La codifica dichiarata "{0}" non corrisponde a quella effettiva "{1}". Potrebbe non trattarsi di un errore +P-062 = La notazione deve essere PUBLIC o SYSTEM +P-063 = Viene usata la prima definizione della notazione "{0}" +P-064 = Fine prematura dell''entit\u00E0 parametrica "%{0};" +P-065 = Il resolver entit\u00E0 non ha fornito l'ID di sistema. Ci\u00F2 potrebbe interessare gli URI relativi. +# P-066 ... ID available +P-067 = Elemento radice documento mancante +P-068 = Nome notazione obbligatorio +P-069 = L''espansione dell''entit\u00E0 "{0}" \u00E8 ricorsiva + +P-070 = Formato non valido della seconda parte della coppia alternativa: &#x{0}; +P-071 = Carattere XML non valido: &#x{0}; +P-072 = I dati carattere non possono includere "]]>" +# Character data section starts with "" with text in between. No change needed. +P-073 = EOF durante l'analisi della sezione +V-004 = La notazione non dichiarata "{0}" \u00E8 usata da una dichiarazione +V-005 = Il tipo di elemento "{0}" non \u00E8 dichiarato +V-006 = Il tipo di elemento radice \u00E8 "{0}", ma \u00E8 stato dichiarato "{1}" +V-007 = L''attributo "{0}" non \u00E8 stato dichiarato per l''elemento "{1}" +V-008 = L''attributo "{0}" dell''elemento "{1}" deve solo includere il valore "{2}" +# {0} - probably attribute name. +V-009 = Il valore dell''attributo per "{0}" \u00E8 #REQUIRED + +V-010 = Il documento \u00E8 autonomo. L''attributo "{0}" non deve essere pertanto impostato su un valore predefinito. +V-011 = Il documento \u00E8 autonomo. L''elemento "{0}" non deve includere spazi vuoti ignorabili. +V-012 = L''elemento "{0}" \u00E8 gi\u00E0 stato dichiarato +V-013 = Le entit\u00E0 parametriche non devono contenere dichiarazioni parziali +# {0} - element name +V-014 = Errore di nidificazione delle entit\u00E0 parametriche nel modello di contenuto per "{0}" +V-015 = Il modello di contenuto misto ripete l''elemento "{0}" +V-016 = Questo elemento include gi\u00E0 un attributo ID "{0}" +V-017 = L''attributo ID "{0}" non deve essere #FIXED +V-018 = L''attributo ID "{0}" non deve essere impostato su un valore predefinito +V-019 = Questo documento \u00E8 autonomo. Questo attributo deve essere prenormalizzato. + +V-020 = Le entit\u00E0 parametriche non devono contenere sezioni DTD condizionali parziali +V-021 = Le entit\u00E0 parametriche non devono contenere commenti parziali +V-022 = Riferimento all''entit\u00E0 parametrica non definita "%{0};" +V-023 = Questo documento \u00E8 autonomo. Questo spazio vuoto CDATA ignorabile non \u00E8 consentito. +V-024 = Nessun elemento include un attributo ID con valore "{0}" +V-025 = I valori ID devono essere nomi XML. "{0}" non \u00E8 un nome. +V-026 = Un altro elemento include gi\u00E0 un attributo ID con valore "{0}" +V-027 = I valori IDREF/IDREFS devono essere nomi XML. "{0}" non \u00E8 un nome +V-028 = I valori NMTOKEN/NMTOKENS devono essere token nomi XML. "{0}" non \u00E8 tale. +V-029 = Il valore "{0}" \u00E8 uno dei valori enumerati per questo attributo + +V-030 = Il valore di attributo "{0}" non fa riferimento a una notazione +V-031 = Il valore di attributo "{0}" non fa riferimento a un''entit\u00E0 non analizzata +V-032 = Gli attributi NMTOKENS devono includere almeno un valore +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = I modelli di contenuto EMPTY non devono includere contenuti +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = L''elemento "{0}" non consente ulteriori input. "{1}" non \u00E8 consentito. +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = L''elemento "{0}" non consente l''inserimento di testo +V-038 = L''elemento "{0}" richiede elementi aggiuntivi +V-039 = Gli attributi IDREFS devono includere almeno un valore + +V-040 = Gli attributi ENTITIES devono includere almeno un valore diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties new file mode 100644 index 00000000000..bf3efc42c15 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ja.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = \u30D1\u30FC\u30B5\u30FC\u306E\u5165\u529B\u30BD\u30FC\u30B9\u304C\u3042\u308A\u307E\u305B\u3093\u3002 +P-001 = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u7D42\u308F\u308A\u306B\u4E0D\u6B63\u306A\u6587\u5B57\u3001&#x{0};\u304C\u3042\u308A\u307E\u3059 +P-002 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u306E\u62E1\u5F35\u304C\u9069\u5207\u306A\u5F62\u5F0F\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +P-003 = \u5165\u529B\u306E\u6700\u5F8C\u304C\u672A\u5B8C\u4E86\u3067\u3059 +# {0} - F000-F009, F011, F021. +P-004 = \u7A7A\u767D{0}\u304C\u3042\u308A\u307E\u305B\u3093 +P-005 = \u7A7A\u767D\u306E\u307F\u8A31\u53EF\u3055\u308C\u307E\u3059{0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = \u8981\u7D20\u540D\u306E\u5BA3\u8A00\u306E\u5F8C + # Concatenated with P-004 (P-004 + F001) + F-001 = \u5C5E\u6027\u540D\u3068\u30BF\u30A4\u30D7\u306E\u9593 + # Concatenated with P-004 (P-004 + F002) + F-002 = NOTATION\u30BF\u30A4\u30D7\u540D\u306E\u5F8C + # Concatenated with P-004 (P-004 + F003) + F-003 = \u5C5E\u6027\u306E\u30BF\u30A4\u30D7\u3068\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u306E\u9593 + # Concatenated with P-004 (P-004 + F004) + F-004 = #FIXED\u306E\u5F8C + # Concatenated with P-004 (P-004 + F005) + F-005 = " terminating declaration "%HTML.Version" +P-008 = \u6B21\u306E\u6587\u5B57\u306F"{0}" {1} {2}\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + + # Concatenated with P-008 (P-008 + F020) + F-020 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3078\u306E\u53C2\u7167\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F021) + F-021 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3078\u306E\u53C2\u7167\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F022) + F-022 = \u30B3\u30E1\u30F3\u30C8\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F023) + F-023 = XML\u5BA3\u8A00\u5185 + # Concatenated with P-008 (P-008 + F024) + F-024 = \u5185\u90E8DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F025) + F-025 = \u5BA3\u8A00\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F026) + F-026 = \u5C5E\u6027\u540D\u306E\u5F8C + # Concatenated with P-008 (P-008 + F027) + F-027 = \u8981\u7D20\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F028) + F-028 = \u8981\u7D20\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306E\u958B\u59CB + # Concatenated with P-008 (P-008 + F029) + F-029 = \u5C5E\u6027NOTATIONS\u306E\u30EA\u30B9\u30C8\u306E\u958B\u59CB + # Concatenated with P-008 (P-008 + F030) + F-030 = \u6761\u4EF6DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306E\u958B\u59CB + # Concatenated with P-008 (P-008 + F031) + F-031 = \u5BA3\u8A00\u306E\u7D42\u4E86 + # Concatenated with P-008 (P-008 + F032) + F-032 = \u5BA3\u8A00\u306E\u7D42\u4E86 + +P-009 = \u6587\u5B57\u307E\u305F\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u53C2\u7167\u306E\u69CB\u6587\u304C\u4E0D\u6B63\u3067\u3059 + +P-010 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5024\u306B"%{0};"\u3092\u4F7F\u7528\u3067\u304D\u308B\u306E\u306F\u3001\u5916\u90E8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u307F\u3067\u3059 +P-011 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u53C2\u7167\u306E\u69CB\u6587\u304C\u4E0D\u6B63\u3067\u3059 +P-012 = \u5C5E\u6027\u5024\u3067\u306F"<"\u3068\u3057\u3066"<"\u3092\u4F7F\u7528\u3057\u307E\u3059 +P-013 = \u5C5E\u6027\u306E\u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u3078\u306E\u53C2\u7167\u304C\u4E0D\u6B63\u3067\u3059 +P-014 = \u672A\u5B9A\u7FA9\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u3078\u306E\u53C2\u7167 +# {0} - F033-F035 +P-015 = {0}\u306B\u306F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u307E\u308C\u305F\u5024\u304C\u4E88\u671F\u3055\u308C\u307E\u3059 + + # Concatenated with P-015 (P-015 + F033) + F-033 = PUBLIC\u8B58\u5225\u5B50 + # Concatenated with P-015 (P-015 + F034) + F-034 = SYSTEM\u8B58\u5225\u5B50 + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = \u5C5E\u6027\u5024{0} + +P-016 = PUBLIC\u8B58\u5225\u5B50\u306B\u4E0D\u6B63\u306A\u6587\u5B57\u304C\u3042\u308A\u307E\u3059: "{0}" +P-017 = \u30B3\u30E1\u30F3\u30C8\u306E\u51E6\u7406\u4E2D\u306B\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u7D42\u7AEF\u306B\u5230\u9054\u3057\u307E\u3057\u305F +P-018 = \u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093 +P-019 = XML\u5BA3\u8A00\u3067\u306F\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u958B\u59CB\u306E\u307F\u53EF\u80FD\u3067\u3059 + +P-020 = \u51E6\u7406\u547D\u4EE4\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u4E0D\u6B63\u3067\u3059: "{0}" +P-021 = \u51E6\u7406\u547D\u4EE4\u5185\u306E\u5165\u529B\u306E\u6700\u5F8C +P-022 = \u51E6\u7406\u547D\u4EE4\u540D\u304C\u4E0D\u6B63\u3067\u3042\u308B\u304B\u3001\u7A7A\u767D\u304C\u6B20\u843D\u3057\u3066\u3044\u307E\u3059 +P-023 = XML\u5BA3\u8A00\u306E\u7D42\u308F\u308A\u306B\u4E0D\u6B63\u306A\u6587\u5B57"&#x{0};"({1})\u304C\u3042\u308A\u307E\u3059 +P-024 = "{0}=..."\u304C\u4E88\u671F\u3055\u308C\u307E\u3059 +P-025 = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u3092\u5BA3\u8A00\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +P-026 = XML\u30D0\u30FC\u30B8\u30E7\u30F3\u6587\u5B57\u5217"{0}"\u304C\u4E0D\u6B63\u3067\u3059 +P-027 = XML\u30D0\u30FC\u30B8\u30E7\u30F3"{0}"\u306F\u8A8D\u8B58\u3055\u308C\u307E\u3059\u304C\u3001"{1}"\u306F\u8A8D\u8B58\u3055\u308C\u307E\u305B\u3093 +P-028 = \u5185\u90E8DTD\u30B5\u30D6\u30BB\u30C3\u30C8\u306B\u306F""\u304C\u4E88\u671F\u3055\u308C\u307E\u3059 +P-035 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u7D42\u4E86\u3067\u304D\u307E\u305B\u3093\u3002\u7D42\u4E86\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093 +P-036 = \u5BA3\u8A00\u306F\u3001"{1}"\u3067\u306F\u306A\u304F\u3001">"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +P-037 = \u9806\u5E8F\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B"{0}"\u3092\u542B\u3081\u3089\u308C\u307E\u305B\u3093 +P-038 = \u9078\u629E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B"{0}"\u3092\u542B\u3081\u3089\u308C\u307E\u305B\u3093 +P-039 = \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B"{0}"\u3092\u542B\u3081\u3089\u308C\u307E\u305B\u3093 + +P-040 = \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u306F\u3001"{0}"\u3067\u306F\u306A\u304F\u3001\u53F3\u30AB\u30C3\u30B3\u307E\u305F\u306F"{1}"\u304C\u5FC5\u8981\u3067\u3059 +P-041 = \u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u306F\u3001"{0}"\u3067\u306F\u306A\u304F\u3001\u53F3\u30AB\u30C3\u30B3\u3001","\u3001\u307E\u305F\u306F"|"\u304C\u5FC5\u8981\u3067\u3059 +# {0} - element name, {1} - character as a hex number +P-042 = "{0}"\u306E\u8907\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u304C\u4E0D\u6B63\u3067\u3059\u3002\u6B21\u306E\u6587\u5B57= &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = "{0}"\u306E\u8907\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306F\u3001"{1}"\u3067\u306F\u306A\u304F\u3001")*"\u3067\u7D42\u4E86\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +P-044 = "{0}"\u3067\u306F\u306A\u304F\u3001\u5C5E\u6027\u306E\u5BA3\u8A00\u307E\u305F\u306F">"\u304C\u4E88\u671F\u3055\u308C\u307E\u3059 +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = \u5C5E\u6027"{0}"\u306E\u30BF\u30A4\u30D7("{1}"\u3067\u59CB\u307E\u308B)\u304C\u4E0D\u6B63\u3067\u3059 +P-046 = \u6761\u4EF6\u4ED8\u304DDTD\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u304C\u5FC5\u8981\u3067\u3059 +P-047 = \u6761\u4EF6\u4ED8\u304DDTD\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u7D42\u4E86\u3057\u3066\u3044\u307E\u305B\u3093 +P-048 = INCLUDE\u304A\u3088\u3073IGNORE\u306E\u307F\u304C\u8A31\u53EF\u3055\u308C\u3001"{0}"\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 +P-049 = \u4E0D\u6B63\u306A10\u9032\u6570\u306E\u53C2\u7167\u3067\u3059 + +P-050 = \u4E0D\u6B63\u306A16\u9032\u6570\u306E\u53C2\u7167\u3067\u3059 +P-051 = \u4E0D\u6B63\u306AXML\u6587\u5B57&#x{0}; +P-052 = \u5185\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5F8C\u306B\u6587\u5B57\u304C\u3042\u308A\u307E\u3059 +P-053 = "&{0};"\u306A\u3069\u306E\u672A\u89E3\u6790\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +P-054 = "&{0};"\u306E\u5143\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u5B9A\u7FA9\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 +P-055 = \u76F8\u5BFEURI "{0}"\u306F\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8URI\u306A\u3057\u3067\u306F\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093 +P-056 = URI "{0}"\u306B\u306F\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8ID\u304C\u3042\u308A\u307E\u3059 +P-057 = XML\u5BA3\u8A00\u3092\u7D42\u4E86\u3059\u308B\u306B\u306F"?>"\u304C\u5FC5\u8981\u3067\u3059 +P-058 = \u5916\u90E8\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"&{0};"\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5F8C\u306B\u6587\u5B57\u304C\u3042\u308A\u307E\u3059 +P-059 = \u5916\u90E8\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"%{0};"\u306B\u306F\u3001\u30DE\u30FC\u30AF\u30A2\u30C3\u30D7\u306E\u5F8C\u306B\u6587\u5B57\u304C\u3042\u308A\u307E\u3059 + +P-060 = \u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D\u306B\u4E0D\u6B63\u306A\u6587\u5B57"{0}"\u304C\u3042\u308A\u307E\u3059 +P-061 = \u5BA3\u8A00\u3055\u308C\u305F\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{0}"\u306F\u3001\u5B9F\u969B\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0"{1}"\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u3053\u308C\u306F\u30A8\u30E9\u30FC\u3067\u306F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +P-062 = \u8868\u8A18\u6CD5\u306F\u3001PUBLIC\u307E\u305F\u306FSYSTEM\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +P-063 = \u8868\u8A18\u6CD5"{0}"\u306E\u6700\u521D\u306E\u5B9A\u7FA9\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059 +P-064 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"%{0};"\u306E\u7D42\u7AEF\u304C\u672A\u5B8C\u4E86\u3067\u3059 +P-065 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u30FB\u30EA\u30BE\u30EB\u30D0\u304CSYSTEM ID\u3092\u63D0\u4F9B\u3057\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u76F8\u5BFEURI\u306B\u5F71\u97FF\u3092\u4E0E\u3048\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059 +# P-066 ... ID available +P-067 = \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30EB\u30FC\u30C8\u8981\u7D20\u304C\u3042\u308A\u307E\u305B\u3093 +P-068 = \u8868\u8A18\u540D\u306F\u5FC5\u9808\u3067\u3059 +P-069 = \u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"{0}"\u306E\u62E1\u5F35\u304C\u518D\u5E30\u7684\u3067\u3059 + +P-070 = \u30B5\u30ED\u30B2\u30FC\u30C8\u30FB\u30DA\u30A2\u306E\u5F8C\u90E8\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63\u3067\u3059: &#x{0}; +P-071 = \u4E0D\u6B63\u306AXML\u6587\u5B57: &#x{0}; +P-072 = \u6587\u5B57\u30C7\u30FC\u30BF\u3067\u306F"]]>"\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093 +# Character data section starts with "" with text in between. No change needed. +P-073 = \u5BA3\u8A00\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 +V-004 = \u5BA3\u8A00\u3055\u308C\u3066\u3044\u306A\u3044\u8868\u8A18\u6CD5"{0}"\u304C\u5BA3\u8A00\u3067\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059 +V-005 = \u8981\u7D20\u30BF\u30A4\u30D7"{0}"\u306F\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +V-006 = \u30EB\u30FC\u30C8\u8981\u7D20\u30BF\u30A4\u30D7\u306F"{0}"\u3067\u3059\u304C\u3001"{1}"\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u307E\u3057\u305F +V-007 = \u8981\u7D20"{1}"\u306E\u5C5E\u6027"{0}"\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093 +V-008 = \u8981\u7D20"{1}"\u306E\u5C5E\u6027"{0}"\u306E\u5024\u306F"{2}"\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 +# {0} - probably attribute name. +V-009 = "{0}"\u306E\u5C5E\u6027\u5024\u306F#REQUIRED\u3067\u3059 + +V-010 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3042\u308B\u305F\u3081\u3001\u5C5E\u6027"{0}"\u3092\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u3067\u304D\u307E\u305B\u3093 +V-011 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3042\u308B\u305F\u3081\u3001\u8981\u7D20"{0}"\u306B\u306F\u7121\u8996\u3067\u304D\u308B\u7A7A\u767D\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093 +V-012 = \u8981\u7D20"{0}"\u306F\u3059\u3067\u306B\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u3059 +V-013 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u5BA3\u8A00\u306E\u4E00\u90E8\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +# {0} - element name +V-014 = "{0}"\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306E\u30CD\u30B9\u30C8\u30FB\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059 +V-015 = \u8907\u5408\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u8981\u7D20"{0}"\u306E\u7E70\u8FD4\u3057\u304C\u3042\u308A\u307E\u3059 +V-016 = \u3053\u306E\u8981\u7D20\u306B\u306F\u3001ID\u5C5E\u6027"{0}"\u304C\u3059\u3067\u306B\u3042\u308A\u307E\u3059 +V-017 = ID\u5C5E\u6027"{0}"\u306F#FIXED\u306B\u3067\u304D\u307E\u305B\u3093 +V-018 = ID\u5C5E\u6027"{0}"\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u306B\u3067\u304D\u307E\u305B\u3093 +V-019 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3059\u3002\u3053\u306E\u5C5E\u6027\u306F\u3001\u4E8B\u524D\u306B\u6B63\u898F\u5316\u3057\u3066\u304A\u304F\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 + +V-020 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u6761\u4EF6\u4ED8\u304DDTD\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u4E00\u90E8\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +V-021 = \u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u306B\u30B3\u30E1\u30F3\u30C8\u306E\u4E00\u90E8\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093 +V-022 = \u672A\u5B9A\u7FA9\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FB\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3"%{0};"\u3078\u306E\u53C2\u7167 +V-023 = \u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3\u3067\u3059\u3002\u3053\u306E\u7121\u8996\u3067\u304D\u308BCDATA\u7A7A\u767D\u306F\u7981\u6B62\u3055\u308C\u3066\u3044\u307E\u3059 +V-024 = \u5024"{0}"\u306EID\u5C5E\u6027\u3092\u6301\u3064\u8981\u7D20\u304C\u3042\u308A\u307E\u305B\u3093 +V-025 = ID\u5024\u306F\u3001XML\u540D\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"{0}"\u306F\u540D\u524D\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +V-026 = \u5024"{0}"\u306EID\u5C5E\u6027\u3092\u6301\u3064\u5225\u306E\u8981\u7D20\u304C\u3059\u3067\u306B\u5B58\u5728\u3057\u307E\u3059 +V-027 = IDREF/IDREFS\u5024\u306F\u3001XML\u540D\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"{0}"\u306F\u540D\u524D\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +V-028 = NMTOKEN/NMTOKENS\u5024\u306F\u3001XML\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"{0}"\u306F\u540D\u524D\u30C8\u30FC\u30AF\u30F3\u3067\u306F\u3042\u308A\u307E\u305B\u3093 +V-029 = \u5024"{0}"\u306F\u3001\u3053\u306E\u5C5E\u6027\u306E\u5217\u6319\u5024\u306E1\u3064\u3067\u306F\u3042\u308A\u307E\u305B\u3093 + +V-030 = \u5C5E\u6027\u5024"{0}"\u306F\u3001\u8868\u8A18\u6CD5\u540D\u3092\u6307\u5B9A\u3057\u307E\u305B\u3093 +V-031 = \u5C5E\u6027\u5024"{0}"\u306F\u3001\u672A\u89E3\u6790\u306E\u30A8\u30F3\u30C6\u30A3\u30C6\u30A3\u540D\u3092\u6307\u5B9A\u3057\u307E\u305B\u3093 +V-032 = NMTOKENS\u5C5E\u6027\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059 +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = \u7A7A\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u30FB\u30E2\u30C7\u30EB\u306B\u306F\u3001\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093 +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = \u8981\u7D20"{0}"\u306F\u3001\u3053\u308C\u4EE5\u4E0A\u5165\u529B\u3067\u304D\u307E\u305B\u3093\u3002"{1}"\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093 +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = \u8981\u7D20"{0}"\u306F\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u8A31\u53EF\u3057\u307E\u305B\u3093 +V-038 = \u8981\u7D20"{0}"\u306B\u306F\u3001\u8FFD\u52A0\u306E\u8981\u7D20\u304C\u5FC5\u8981\u3067\u3059 +V-039 = IDREFS\u5C5E\u6027\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059 + +V-040 = ENTITIES\u5C5E\u6027\u306B\u306F\u3001\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u5024\u304C\u5FC5\u8981\u3067\u3059 diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties new file mode 100644 index 00000000000..740ab5760c2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_ko.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = \uAD6C\uBB38 \uBD84\uC11D\uAE30 \uC785\uB825 \uC18C\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4! +P-001 = \uBB38\uC11C \uB05D\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 &#x{0};\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +P-002 = "&{0};" \uC5D4\uD2F0\uD2F0 \uD655\uC7A5\uC758 \uD615\uC2DD\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-003 = \uC608\uC0C1\uCE58 \uC54A\uC740 \uC785\uB825\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. +# {0} - F000-F009, F011, F021. +P-004 = {0} \uACF5\uBC31\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-005 = \uACF5\uBC31\uB9CC {0}\uC744(\uB97C) \uD5C8\uC6A9\uD569\uB2C8\uB2E4. + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = \uC694\uC18C \uC774\uB984 \uC120\uC5B8 \uB2E4\uC74C + # Concatenated with P-004 (P-004 + F001) + F-001 = \uC18D\uC131 \uC774\uB984\uACFC \uC720\uD615 \uC0AC\uC774 + # Concatenated with P-004 (P-004 + F002) + F-002 = NOTATION \uC720\uD615 \uC774\uB984 \uB2E4\uC74C + # Concatenated with P-004 (P-004 + F003) + F-003 = \uC18D\uC131 \uC720\uD615\uACFC \uAE30\uBCF8\uAC12 \uC0AC\uC774 + # Concatenated with P-004 (P-004 + F004) + F-004 = #FIXED \uB2E4\uC74C + # Concatenated with P-004 (P-004 + F005) + F-005 = " terminating declaration "%HTML.Version" +P-008 = \uB2E4\uC74C \uBB38\uC790\uB294 "{0}" {1} {2}\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. + + # Concatenated with P-008 (P-008 + F020) + F-020 = \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F021) + F-021 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0 \uB300\uD55C \uCC38\uC870\uB97C \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F022) + F-022 = \uC8FC\uC11D\uC744 \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F023) + F-023 = XML \uC120\uC5B8\uC5D0\uC11C + # Concatenated with P-008 (P-008 + F024) + F-024 = \uB0B4\uBD80 DTD \uBD80\uBD84 \uC9D1\uD569\uC744 \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F025) + F-025 = \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F026) + F-026 = \uC18D\uC131 \uC774\uB984 \uB2E4\uC74C + # Concatenated with P-008 (P-008 + F027) + F-027 = \uC694\uC18C\uB97C \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F028) + F-028 = \uC694\uC18C\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20 \uBAA8\uB378\uC744 \uC2DC\uC791\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F029) + F-029 = \uC18D\uC131 NOTATION \uBAA9\uB85D\uC744 \uC2DC\uC791\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F030) + F-030 = \uC870\uAC74 DTD \uBD80\uBD84 \uC9D1\uD569\uC744 \uC2DC\uC791\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F031) + F-031 = \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB294 \uC911 + # Concatenated with P-008 (P-008 + F032) + F-032 = \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB294 \uC911 + +P-009 = \uBB38\uC790 \uB610\uB294 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uAD6C\uBB38\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +P-010 = \uC678\uBD80 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uB9CC \uC5D4\uD2F0\uD2F0 \uAC12\uC5D0 "%{0};"\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +P-011 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uCC38\uC870 \uAD6C\uBB38\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-012 = \uC18D\uC131\uAC12\uC5D0\uC11C "<"\uC5D0 \uB300\uD574 "<"\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624. +P-013 = \uC18D\uC131\uC5D0 \uC678\uBD80 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0 \uB300\uD55C \uC798\uBABB\uB41C \uCC38\uC870\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +P-014 = \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0 \uB300\uD55C \uCC38\uC870\uC785\uB2C8\uB2E4. +# {0} - F033-F035 +P-015 = {0}\uC5D0 \uB530\uC634\uD45C\uB97C \uC0AC\uC6A9\uD55C \uAC12\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. + + # Concatenated with P-015 (P-015 + F033) + F-033 = PUBLIC \uC2DD\uBCC4\uC790 + # Concatenated with P-015 (P-015 + F034) + F-034 = SYSTEM \uC2DD\uBCC4\uC790 + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = \uC18D\uC131\uAC12 {0} + +P-016 = PUBLIC \uC2DD\uBCC4\uC790\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790\uAC00 \uC788\uC74C: "{0}" +P-017 = \uC8FC\uC11D\uC744 \uCC98\uB9AC\uD558\uB294 \uB3D9\uC548 \uC5D4\uD2F0\uD2F0\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. +P-018 = \uC9C0\uCE68 \uCC98\uB9AC \uB300\uC0C1\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-019 = XML \uC120\uC5B8\uB9CC \uC5D4\uD2F0\uD2F0\uB97C \uC2DC\uC791\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. + +P-020 = \uC798\uBABB\uB41C \uC9C0\uCE68 \uCC98\uB9AC \uB300\uC0C1: "{0}" +P-021 = \uC9C0\uCE68 \uCC98\uB9AC \uC911 \uB0B4\uBD80 \uC785\uB825\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. +P-022 = \uC9C0\uCE68 \uCC98\uB9AC \uC774\uB984\uC744 \uC798\uBABB\uB418\uC5C8\uAC70\uB098 \uACF5\uBC31\uC774 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-023 = XML \uC120\uC5B8\uC758 \uB05D\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 "&#x{0};"({1})\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +P-024 = "{0}=..."\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +P-025 = XML \uBC84\uC804 "{0}"\uC774(\uAC00) \uC120\uC5B8\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +P-026 = XML \uBC84\uC804 \uBB38\uC790\uC5F4 "{0}"\uC774(\uAC00) \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-027 = XML \uBC84\uC804 "{0}"\uC740(\uB294) \uC778\uC2DD\uB418\uC5C8\uC9C0\uB9CC "{1}"\uC740(\uB294) \uC778\uC2DD\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +P-028 = \uB0B4\uBD80 DTD \uBD80\uBD84 \uC9D1\uD569\uC5D0\uB294 ""\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4. +P-035 = \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uC758 \uB05D\uC785\uB2C8\uB2E4. \uC885\uB8CC \uD0DC\uADF8\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-036 = ">"\uB294 "{1}"\uC774(\uAC00) \uC544\uB2CC \uC120\uC5B8\uC744 \uC885\uB8CC\uD574\uC57C \uD569\uB2C8\uB2E4. +P-037 = \uC2DC\uD000\uC2A4 \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +P-038 = \uC120\uD0DD \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +P-039 = "{0}"\uC744(\uB97C) \uD3EC\uD568\uD558\uB294 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. + +P-040 = \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uC544\uB2CC \uC624\uB978\uCABD \uAD04\uD638 \uB610\uB294 "{1}"\uC774(\uAC00) \uD544\uC694\uD569\uB2C8\uB2E4. +P-041 = \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 "{0}"\uC774(\uAC00) \uC544\uB2CC \uC624\uB978\uCABD \uAD04\uD638, "," \uB610\uB294 "|"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +# {0} - element name, {1} - character as a hex number +P-042 = "{0}"\uC5D0 \uB300\uD55C \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC74C \uBB38\uC790 = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = "{0}"\uC5D0 \uB300\uD55C \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378\uC740 "{1}"\uC774(\uAC00) \uC544\uB2CC ")*"\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4. +P-044 = "{0}"\uC774(\uAC00) \uC544\uB2CC \uC18D\uC131 \uC120\uC5B8 \uB610\uB294 ">"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = "{0}" \uC18D\uC131\uC5D0 \uB300\uD55C \uC720\uD615("{1}"(\uC73C)\uB85C \uC2DC\uC791)\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-046 = \uC870\uAC74 DTD \uC139\uC158\uC5D0 \uD0A4\uC6CC\uB4DC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +P-047 = \uC885\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC870\uAC74 DTD \uC139\uC158\uC785\uB2C8\uB2E4. +P-048 = "{0}"\uC774(\uAC00) \uC544\uB2CC INCLUDE \uBC0F IGNORE\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4. +P-049 = \uC2ED\uC9C4 \uBB38\uC790 \uCC38\uC870\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. + +P-050 = 16\uC9C4 \uBB38\uC790 \uCC38\uC870\uAC00 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-051 = \uC798\uBABB\uB41C XML \uBB38\uC790 &#x{0}; +P-052 = \uB0B4\uBD80 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0\uC11C \uCF58\uD150\uCE20 \uB2E4\uC74C\uC5D0 \uBB38\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +P-053 = "&{0};"\uACFC(\uC640) \uAC19\uC774 \uAD6C\uBB38\uC774 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uB294 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +P-054 = "&{0};"\uC5D0 \uB300\uD55C \uC6D0\uB798 \uC5D4\uD2F0\uD2F0 \uC815\uC758\uB97C \uC0AC\uC6A9\uD558\uB294 \uC911 +P-055 = \uC0C1\uB300 URI "{0}"\uC740(\uB294) \uBB38\uC11C URI \uC5C6\uC774 \uBD84\uC11D\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +P-056 = URI "{0}"\uC5D0 \uB2E8\uD3B8 ID\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +P-057 = XML \uC120\uC5B8\uC744 \uC885\uB8CC\uD558\uB824\uBA74 "?>"\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +P-058 = \uC678\uBD80 \uC5D4\uD2F0\uD2F0 "&{0};"\uC5D0\uC11C \uCF58\uD150\uCE20 \uB2E4\uC74C\uC5D0 \uBB38\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4. +P-059 = \uC678\uBD80 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "%{0};"\uC5D0\uC11C \uB9C8\uD06C\uC5C5 \uB2E4\uC74C\uC5D0 \uBB38\uC790\uAC00 \uC788\uC2B5\uB2C8\uB2E4. + +P-060 = \uC778\uCF54\uB529 \uC774\uB984\uC5D0 \uC798\uBABB\uB41C \uBB38\uC790 "{0}"\uC774(\uAC00) \uC788\uC2B5\uB2C8\uB2E4. +P-061 = \uC120\uC5B8\uB41C \uC778\uCF54\uB529 "{0}"\uC774(\uAC00) \uC2E4\uC81C \uC778\uCF54\uB529 "{1}"\uACFC(\uC640) \uC77C\uCE58\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC624\uB958\uAC00 \uC544\uB2D0 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +P-062 = \uD45C\uAE30\uBC95\uC740 PUBLIC \uB610\uB294 SYSTEM\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. +P-063 = "{0}" \uD45C\uAE30\uBC95\uC758 \uCCAB\uBC88\uC9F8 \uC815\uC758\uB97C \uC0AC\uC6A9\uD558\uB294 \uC911 +P-064 = \uC608\uC0C1\uCE58 \uC54A\uC740 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "%{0};"\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD588\uC2B5\uB2C8\uB2E4. +P-065 = \uC5D4\uD2F0\uD2F0 \uBD84\uC11D\uAE30\uAC00 SYSTEM ID\uB97C \uC81C\uACF5\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. \uC0C1\uB300 URI\uC5D0 \uC601\uD5A5\uC744 \uC904 \uC218 \uC788\uC2B5\uB2C8\uB2E4. +# P-066 ... ID available +P-067 = \uBB38\uC11C \uB8E8\uD2B8 \uC694\uC18C\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +P-068 = \uD45C\uAE30\uBC95 \uC774\uB984\uC774 \uD544\uC694\uD569\uB2C8\uB2E4. +P-069 = "{0}" \uC5D4\uD2F0\uD2F0\uC758 \uD655\uC7A5\uC740 \uC21C\uD658\uC801\uC785\uB2C8\uB2E4. + +P-070 = \uB300\uB9AC \uC30D\uC758 \uB450\uBC88\uC9F8 \uBD80\uBD84 \uD615\uC2DD\uC774 \uC798\uBABB\uB428: &#x{0}; +P-071 = \uC798\uBABB\uB41C XML \uBB38\uC790: &#x{0}; +P-072 = \uBB38\uC790 \uB370\uC774\uD130\uB294 "]]>"\uB97C \uD3EC\uD568\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +# Character data section starts with "" with text in between. No change needed. +P-073 = \uC120\uC5B8\uC5D0 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +V-004 = \uC120\uC5B8\uB418\uC9C0 \uC54A\uC740 \uD45C\uAE30\uBC95 "{0}"\uC774(\uAC00) \uC120\uC5B8\uC5D0 \uC0AC\uC6A9\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +V-005 = \uC694\uC18C \uC720\uD615 "{0}"\uC774(\uAC00) \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +V-006 = \uB8E8\uD2B8 \uC694\uC18C \uC720\uD615\uC774 "{0}"\uC774\uC9C0\uB9CC, "{1}"(\uC73C)\uB85C \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +V-007 = "{0}" \uC18D\uC131\uC774 "{1}" \uC694\uC18C\uC5D0 \uB300\uD574 \uC120\uC5B8\uB418\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4. +V-008 = "{1}" \uC694\uC18C\uC758 "{0}" \uC18D\uC131\uC5D0\uB294 "{2}" \uAC12\uB9CC \uC0AC\uC6A9\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# {0} - probably attribute name. +V-009 = "{0}"\uC5D0 \uB300\uD55C \uC18D\uC131\uAC12\uC740 #REQUIRED\uC785\uB2C8\uB2E4. + +V-010 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C "{0}" \uC18D\uC131\uC740 \uAE30\uBCF8\uAC12\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. +V-011 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C "{0}" \uC694\uC18C\uB294 \uBB34\uC2DC\uD560 \uC218 \uC788\uB294 \uACF5\uBC31\uC744 \uD3EC\uD568\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +V-012 = "{0}" \uC694\uC18C\uB294 \uC774\uBBF8 \uC120\uC5B8\uB418\uC5C8\uC2B5\uB2C8\uB2E4. +V-013 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uBD80\uBD84 \uC120\uC5B8\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +# {0} - element name +V-014 = "{0}"\uC5D0 \uB300\uD55C \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uC11C \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 \uC911\uCCA9 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. +V-015 = \uD63C\uD569 \uCF58\uD150\uCE20 \uBAA8\uB378\uC774 "{0}" \uC694\uC18C\uB97C \uBC18\uBCF5\uD569\uB2C8\uB2E4. +V-016 = \uC774 \uC694\uC18C\uC5D0 \uC774\uBBF8 ID \uC18D\uC131 "{0}"\uC774(\uAC00) \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4. +V-017 = ID \uC18D\uC131 "{0}"\uC740(\uB294) #FIXED\uAC00 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. +V-018 = ID \uC18D\uC131 "{0}"\uC740(\uB294) \uAE30\uBCF8\uAC12\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4. +V-019 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C \uC774 \uC18D\uC131\uC740 \uBBF8\uB9AC \uC815\uADDC\uD654\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +V-020 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uBD80\uBD84 \uC870\uAC74 DTD \uC139\uC158\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +V-021 = \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0\uC5D0\uB294 \uBD80\uBD84 \uC8FC\uC11D\uC774 \uD3EC\uD568\uB418\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. +V-022 = \uC815\uC758\uB418\uC9C0 \uC54A\uC740 \uB9E4\uAC1C\uBCC0\uC218 \uC5D4\uD2F0\uD2F0 "%{0};"\uC5D0 \uB300\uD55C \uCC38\uC870 +V-023 = \uC774 \uBB38\uC11C\uB294 \uB3C5\uB9BD\uD615\uC774\uBBC0\uB85C \uBB34\uC2DC\uD560 \uC218 \uC788\uB294 \uC774 CDATA \uACF5\uBC31\uC740 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. +V-024 = \uAC12\uC774 "{0}"\uC778 ID \uC18D\uC131\uC774 \uC788\uB294 \uC694\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. +V-025 = ID \uAC12\uC740 XML \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. "{0}"\uC740(\uB294) \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4. +V-026 = \uB2E4\uB978 \uC694\uC18C\uC5D0 \uAC12\uC774 "{0}"\uC778 ID \uC18D\uC131\uC774 \uC774\uBBF8 \uC788\uC2B5\uB2C8\uB2E4. +V-027 = IDREF/IDREFS \uAC12\uC740 XML \uC774\uB984\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. "{0}"\uC740(\uB294) \uC774\uB984\uC774 \uC544\uB2D9\uB2C8\uB2E4. +V-028 = NMTOKEN/NMTOKENS \uAC12\uC740 XML \uC774\uB984 \uD1A0\uD070\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4. "{0}"\uC740(\uB294) \uC774\uB984 \uD1A0\uD070\uC774 \uC544\uB2D9\uB2C8\uB2E4. +V-029 = "{0}" \uAC12\uC740 \uC774 \uC18D\uC131\uC5D0 \uB300\uD574 \uC5F4\uAC70\uB41C \uAC12 \uC911 \uD558\uB098\uAC00 \uC544\uB2D9\uB2C8\uB2E4. + +V-030 = \uC18D\uC131\uAC12 "{0}"\uC774(\uAC00) \uD45C\uAE30\uBC95\uC744 \uBA85\uBA85\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +V-031 = \uC18D\uC131\uAC12 "{0}"\uC774(\uAC00) \uAD6C\uBB38 \uBD84\uC11D\uB418\uC9C0 \uC54A\uC740 \uC5D4\uD2F0\uD2F0\uB97C \uBA85\uBA85\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +V-032 = NMTOKENS \uC18D\uC131\uC5D0\uB294 \uD558\uB098 \uC774\uC0C1\uC758 \uAC12\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = EMPTY \uCF58\uD150\uCE20 \uBAA8\uB378\uC5D0\uB294 \uCF58\uD150\uCE20\uAC00 \uC5C6\uC5B4\uC57C \uD569\uB2C8\uB2E4. +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = "{0}" \uC694\uC18C\uB294 \uB354 \uC774\uC0C1\uC758 \uC785\uB825\uC744 \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "{1}"\uC740(\uB294) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = "{0}" \uC694\uC18C\uB294 \uD14D\uC2A4\uD2B8\uB97C \uD5C8\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. +V-038 = "{0}" \uC694\uC18C\uC5D0\uB294 \uCD94\uAC00 \uC694\uC18C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. +V-039 = IDREFS \uC18D\uC131\uC5D0\uB294 \uD558\uB098 \uC774\uC0C1\uC758 \uAC12\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. + +V-040 = ENTITIES \uC18D\uC131\uC5D0\uB294 \uD558\uB098 \uC774\uC0C1\uC758 \uAC12\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4. diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties new file mode 100644 index 00000000000..05e9f49834a --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_pt_BR.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = N\u00E3o h\u00E1 origem da entrada do parser! +P-001 = Caractere inv\u00E1lido no final do documento, &#x{0}; +P-002 = A expans\u00E3o da entidade "&{0};" n\u00E3o est\u00E1 formatada corretamente +P-003 = Fim de entrada prematuro +# {0} - F000-F009, F011, F021. +P-004 = Espa\u00E7o em branco {0} n\u00E3o encontrado +P-005 = Somente espa\u00E7o em branco permitido {0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = ap\u00F3s a declara\u00E7\u00E3o do nome do elemento + # Concatenated with P-004 (P-004 + F001) + F-001 = entre o nome e o tipo do atributo + # Concatenated with P-004 (P-004 + F002) + F-002 = ap\u00F3s o nome do tipo de NOTATION + # Concatenated with P-004 (P-004 + F003) + F-003 = entre o tipo do atributo e o valor default + # Concatenated with P-004 (P-004 + F004) + F-004 = ap\u00F3s #FIXED + # Concatenated with P-004 (P-004 + F005) + F-005 = ap\u00F3s a declara\u00E7\u00E3o de " terminating declaration "%HTML.Version" +P-008 = O pr\u00F3ximo caractere deve ser "{0}" {1} {2} + + # Concatenated with P-008 (P-008 + F020) + F-020 = refer\u00EAncia final \u00E0 entidade + # Concatenated with P-008 (P-008 + F021) + F-021 = refer\u00EAncia final \u00E0 entidade do par\u00E2metro + # Concatenated with P-008 (P-008 + F022) + F-022 = coment\u00E1rio final + # Concatenated with P-008 (P-008 + F023) + F-023 = na Declara\u00E7\u00E3o XML + # Concatenated with P-008 (P-008 + F024) + F-024 = subconjunto DTD interno final + # Concatenated with P-008 (P-008 + F025) + F-025 = declara\u00E7\u00E3o final + # Concatenated with P-008 (P-008 + F026) + F-026 = ap\u00F3s o nome do atributo + # Concatenated with P-008 (P-008 + F027) + F-027 = elemento final + # Concatenated with P-008 (P-008 + F028) + F-028 = iniciando modelo de conte\u00FAdo para o elemento + # Concatenated with P-008 (P-008 + F029) + F-029 = iniciando lista de atributo NOTATIONS + # Concatenated with P-008 (P-008 + F030) + F-030 = subconjunto DTD de condi\u00E7\u00E3o inicial + # Concatenated with P-008 (P-008 + F031) + F-031 = declara\u00E7\u00E3o final + # Concatenated with P-008 (P-008 + F032) + F-032 = declara\u00E7\u00E3o final + +P-009 = Caractere ilegal ou sintaxe de refer\u00EAncia da entidade + +P-010 = Somente entidades do par\u00E2metro externo podem usar "%{0};" nos valores da entidade +P-011 = Sintaxe inv\u00E1lida de refer\u00EAncia da entidade do par\u00E2metro +P-012 = Use "<" para "<" nos valores de atributos +P-013 = Refer\u00EAncia inv\u00E1lida para a entidade externa "&{0};" no atributo +P-014 = Refer\u00EAncia \u00E0 entidade indefinida "&{0};" +# {0} - F033-F035 +P-015 = Esperando valor entre aspas para {0} + + # Concatenated with P-015 (P-015 + F033) + F-033 = Identificador PUBLIC + # Concatenated with P-015 (P-015 + F034) + F-034 = Identificador SYSTEM + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = valor do atributo {0} + +P-016 = Caractere inv\u00E1lido no identificador PUBLIC: "{0}" +P-017 = Final da entidade ao processar o coment\u00E1rio +P-018 = O destino da instru\u00E7\u00E3o de processamento n\u00E3o foi encontrado +P-019 = A declara\u00E7\u00E3o XML s\u00F3 pode come\u00E7ar entidades + +P-020 = Destino inv\u00E1lido da instru\u00E7\u00E3o de processamento: "{0}" +P-021 = Final da instru\u00E7\u00E3o de processamento de entrada interna +P-022 = Nome inv\u00E1lido da instru\u00E7\u00E3o de processamento ou espa\u00E7o em branco n\u00E3o encontrado +P-023 = Caractere inv\u00E1lido "&#x{0};" ({1}) no final da Declara\u00E7\u00E3o XML +P-024 = Esperava "{0}=..." +P-025 = A vers\u00E3o XML "{0}" deve ser declarada +P-026 = String inv\u00E1lida da vers\u00E3o XML "{0}" +P-027 = A vers\u00E3o XML "{0}" \u00E9 reconhecida, mas n\u00E3o "{1}" +P-028 = O subconjunto DTD interno n\u00E3o deve ter constru\u00E7\u00F5es "" esperado para encerrar o elemento que come\u00E7a na linha {1} +P-035 = Final da entidade n\u00E3o permitido; uma tag final n\u00E3o foi encontrada +P-036 = ">" deve encerrar a declara\u00E7\u00E3o , e n\u00E3o "{1}" +P-037 = O modelo de conte\u00FAdo da sequ\u00EAncia n\u00E3o deve conter "{0}" +P-038 = O modelo de conte\u00FAdo da op\u00E7\u00E3o n\u00E3o deve conter "{0}" +P-039 = Nenhum modelo de conte\u00FAdo deve conter "{0}" + +P-040 = \u00C9 necess\u00E1rio o par\u00EAntese direito ou "{1}" no modelo de conte\u00FAdo, e n\u00E3o "{0}" +P-041 = \u00C9 necess\u00E1rio o par\u00EAntese direito, "," ou "|" no modelo de conte\u00FAdo, e n\u00E3o "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = Modelo de conte\u00FAdo misto inv\u00E1lido para "{0}", o pr\u00F3ximo caractere = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = O modelo de conte\u00FAdo misto para "{0}" deve terminar com ")*", e n\u00E3o "{1}" +P-044 = Uma declara\u00E7\u00E3o de atributos ou ">" \u00E9 esperada, e n\u00E3o "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = Tipo inv\u00E1lido (come\u00E7a com "{1}") para o atributo "{0}" +P-046 = \u00C9 necess\u00E1rio a palavra-chave na se\u00E7\u00E3o DTD condicional +P-047 = Se\u00E7\u00E3o DTD condicional n\u00E3o encerrada +P-048 = Somente INCLUDE e IGNORE s\u00E3o permitidos, e n\u00E3o "{0}" +P-049 = Refer\u00EAncia inv\u00E1lida do caractere decimal + +P-050 = Refer\u00EAncia inv\u00E1lida do caractere hexadecimal +P-051 = Caractere XML inv\u00E1lido &#x{0}; +P-052 = A entidade interna "&{0};" tem caracteres ap\u00F3s o conte\u00FAdo +P-053 = Entidades sem parse como "&{0};" n\u00E3o devem ser inclu\u00EDdas +P-054 = Usando defini\u00E7\u00E3o de entidade original para "&{0};" +P-055 = O URI relativo "{0}"; n\u00E3o pode ser resolvido sem um URI do documento +P-056 = O URI "{0}" tem um ID de fragmento +P-057 = \u00C9 necess\u00E1rio "?>" para encerrar a declara\u00E7\u00E3o XML +P-058 = A entidade externa "&{0};" tem caracteres ap\u00F3s o conte\u00FAdo +P-059 = A entidade do par\u00E2metro externo "%{0};" tem caracteres ap\u00F3s a marca\u00E7\u00E3o + +P-060 = Caractere inv\u00E1lido "{0}" no nome da codifica\u00E7\u00E3o +P-061 = A codifica\u00E7\u00E3o declarada "{0}" n\u00E3o corresponde ao "{1}" real; isso pode n\u00E3o ser um erro +P-062 = A nota\u00E7\u00E3o deve ser PUBLIC ou SYSTEM +P-063 = Usando a primeira defini\u00E7\u00E3o da nota\u00E7\u00E3o "{0}" +P-064 = Final prematuro da entidade do par\u00E2metro "%{0};" +P-065 = O Resolvedor da Entidade n\u00E3o forneceu o id do SYSTEM; pode afetar URIs relativos +# P-066 ... ID available +P-067 = O elemento raiz do documento n\u00E3o foi encontrado +P-068 = Nome da nota\u00E7\u00E3o obrigat\u00F3rio +P-069 = A expans\u00E3o da entidade "{0}" \u00E9 recursiva + +P-070 = Segunda parte incorreta do par substituto: &#x{0}; +P-071 = Caractere XML inv\u00E1lido: &#x{0}; +P-072 = Os dados do caractere n\u00E3o podem ter "]]>" +# Character data section starts with "" with text in between. No change needed. +P-073 = EOF ao fazer parse da se\u00E7\u00E3o +V-004 = A nota\u00E7\u00E3o n\u00E3o declarada "{0}" \u00E9 usada por uma declara\u00E7\u00E3o +V-005 = O tipo do elemento "{0}" n\u00E3o \u00E9 declarado +V-006 = O tipo do elemento raiz \u00E9 "{0}", mas foi declarado como "{1}" +V-007 = O atributo "{0}" n\u00E3o \u00E9 declarado para o elemento "{1}" +V-008 = O atributo "{0}" do elemento "{1}" s\u00F3 pode ter o valor "{2}" +# {0} - probably attribute name. +V-009 = O valor do atributo de "{0}" \u00E9 #REQUIRED + +V-010 = Este documento \u00E9 independente, portanto, o atributo "{0}" n\u00E3o deve ser definido como default +V-011 = Este documento \u00E9 independente, portanto, o elemento "{0}" n\u00E3o deve ter espa\u00E7o em branco ignor\u00E1vel +V-012 = O elemento "{0}" j\u00E1 foi declarado +V-013 = As entidades do par\u00E2metro n\u00E3o devem conter declara\u00E7\u00F5es parciais +# {0} - element name +V-014 = Erro de aninhamento da entidade do par\u00E2metro no modelo de conte\u00FAdo para "{0}" +V-015 = O modelo de conte\u00FAdo misto repete o elemento "{0}" +V-016 = Este elemento j\u00E1 tem um atributo de ID, "{0}" +V-017 = O atributo de ID "{0}" n\u00E3o deve ser #FIXED +V-018 = O atributo de ID "{0}" n\u00E3o deve ser definido como default +V-019 = Este documento \u00E9 independente; este atributo precisa ser pr\u00E9-normalizado + +V-020 = As entidades do par\u00E2metro n\u00E3o devem conter se\u00E7\u00F5es DTD condicionais parciais +V-021 = As entidades do par\u00E2metro n\u00E3o devem conter coment\u00E1rios parciais +V-022 = Refer\u00EAncia \u00E0 entidade do par\u00E2metro indefinido "%{0};" +V-023 = Este documento \u00E9 independente; este espa\u00E7o em branco CDATA ignor\u00E1vel \u00E9 proibido +V-024 = Nenhum elemento tem um atributo de ID com o valor "{0}" +V-025 = Os valores do ID devem ser nomes XML; "{0}" n\u00E3o \u00E9 um nome +V-026 = Outro elemento j\u00E1 tem um atributo de ID com o valor "{0}" +V-027 = Os valores IDREF/IDREFS devem ser nomes XML; "{0}" n\u00E3o \u00E9 um nome +V-028 = Os valores NMTOKEN/NMTOKENS devem ser tokens de nomes XML; "{0}" n\u00E3o \u00E9 um token de nome +V-029 = O valor "{0}" n\u00E3o \u00E9 um dos valores enumerados para este atributo + +V-030 = O valor do atributo "{0}" n\u00E3o nomeia uma nota\u00E7\u00E3o +V-031 = O valor do atributo "{0}" n\u00E3o nomeia uma entidade sem parse +V-032 = Os atributos NMTOKENS devem ter pelo menos um valor +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = Os modelos de conte\u00FAdo vazios n\u00E3o devem ter conte\u00FAdo +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = O elemento "{0}" n\u00E3o permite mais inser\u00E7\u00F5es; "{1}" n\u00E3o \u00E9 permitido +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = O elemento "{0}" n\u00E3o permite texto +V-038 = O elemento "{0}" requer elementos adicionais +V-039 = Os atributos IDREFS devem ter pelo menos um valor + +V-040 = Os atributos ENTITIES devem ter pelo menos um valor diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties new file mode 100644 index 00000000000..eec09adcfb2 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_CN.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = \u65E0\u89E3\u6790\u5668\u8F93\u5165\u6E90! +P-001 = \u5728\u6587\u6863\u7ED3\u5C3E\u5B58\u5728\u975E\u6CD5\u5B57\u7B26, &#x{0}; +P-002 = \u5B9E\u4F53 "&{0};" \u7684\u6269\u5C55\u683C\u5F0F\u4E0D\u6B63\u786E +P-003 = \u8F93\u5165\u63D0\u524D\u7ED3\u675F +# {0} - F000-F009, F011, F021. +P-004 = \u7F3A\u5C11\u7A7A\u683C {0} +P-005 = \u4EC5\u5141\u8BB8\u7A7A\u683C{0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = \u5143\u7D20\u540D\u79F0\u58F0\u660E\u4E4B\u540E + # Concatenated with P-004 (P-004 + F001) + F-001 = \u4ECB\u4E8E\u5C5E\u6027\u540D\u79F0\u548C\u7C7B\u578B\u4E4B\u95F4 + # Concatenated with P-004 (P-004 + F002) + F-002 = NOTATION \u7C7B\u578B\u540D\u79F0\u4E4B\u540E + # Concatenated with P-004 (P-004 + F003) + F-003 = \u4ECB\u4E8E\u5C5E\u6027\u7C7B\u578B\u548C\u9ED8\u8BA4\u503C\u4E4B\u95F4 + # Concatenated with P-004 (P-004 + F004) + F-004 = \u5728 #FIXED \u4E4B\u540E + # Concatenated with P-004 (P-004 + F005) + F-005 = " terminating declaration "%HTML.Version" +P-008 = \u4E0B\u4E00\u4E2A\u5B57\u7B26\u5FC5\u987B\u4E3A "{0}" {1} {2} + + # Concatenated with P-008 (P-008 + F020) + F-020 = \u7EC8\u6B62\u5BF9\u5B9E\u4F53\u7684\u5F15\u7528 + # Concatenated with P-008 (P-008 + F021) + F-021 = \u7EC8\u6B62\u5BF9\u53C2\u6570\u5B9E\u4F53\u7684\u5F15\u7528 + # Concatenated with P-008 (P-008 + F022) + F-022 = \u7EC8\u6B62\u6CE8\u91CA + # Concatenated with P-008 (P-008 + F023) + F-023 = \u5728 XML \u58F0\u660E\u4E2D + # Concatenated with P-008 (P-008 + F024) + F-024 = \u7EC8\u6B62\u5185\u90E8 DTD \u5B50\u96C6 + # Concatenated with P-008 (P-008 + F025) + F-025 = \u7EC8\u6B62 \u58F0\u660E + # Concatenated with P-008 (P-008 + F026) + F-026 = \u5C5E\u6027\u540D\u79F0\u4E4B\u540E + # Concatenated with P-008 (P-008 + F027) + F-027 = \u7EC8\u6B62\u5143\u7D20 + # Concatenated with P-008 (P-008 + F028) + F-028 = \u542F\u52A8\u5143\u7D20\u7684\u5185\u5BB9\u6A21\u578B + # Concatenated with P-008 (P-008 + F029) + F-029 = \u542F\u52A8\u5C5E\u6027 NOTATIONS \u5217\u8868 + # Concatenated with P-008 (P-008 + F030) + F-030 = \u5F00\u59CB\u6761\u4EF6 DTD \u5B50\u96C6 + # Concatenated with P-008 (P-008 + F031) + F-031 = \u7EC8\u6B62 \u58F0\u660E + # Concatenated with P-008 (P-008 + F032) + F-032 = \u7EC8\u6B62 \u58F0\u660E + +P-009 = \u975E\u6CD5\u5B57\u7B26\u6216\u5B9E\u4F53\u5F15\u7528\u8BED\u6CD5 + +P-010 = \u53EA\u6709\u5916\u90E8\u53C2\u6570\u5B9E\u4F53\u624D\u80FD\u5728\u5B9E\u4F53\u503C\u4E2D\u4F7F\u7528 "%{0};" +P-011 = \u975E\u6CD5\u53C2\u6570\u5B9E\u4F53\u5F15\u7528\u8BED\u6CD5 +P-012 = \u5BF9\u4E8E\u5C5E\u6027\u503C\u4E2D\u7684 "<", \u8BF7\u4F7F\u7528 "<" +P-013 = \u975E\u6CD5\u5F15\u7528\u5C5E\u6027\u4E2D\u7684\u5916\u90E8\u5B9E\u4F53 "&{0};" +P-014 = \u5F15\u7528\u672A\u5B9A\u4E49\u7684\u5B9E\u4F53 "&{0};" +# {0} - F033-F035 +P-015 = \u5BF9\u4E8E{0}\u7684\u503C, \u5E94\u4F7F\u7528\u5F15\u53F7\u62EC\u8D77\u6765 + + # Concatenated with P-015 (P-015 + F033) + F-033 = PUBLIC \u6807\u8BC6\u7B26 + # Concatenated with P-015 (P-015 + F034) + F-034 = SYSTEM \u6807\u8BC6\u7B26 + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = \u5C5E\u6027\u503C{0} + +P-016 = PUBLIC \u6807\u8BC6\u7B26\u4E2D\u5B58\u5728\u975E\u6CD5\u5B57\u7B26: "{0}" +P-017 = \u5904\u7406\u6CE8\u91CA\u65F6\u9047\u5230\u5B9E\u4F53\u7ED3\u5C3E +P-018 = \u7F3A\u5C11\u5904\u7406\u6307\u4EE4\u76EE\u6807 +P-019 = XML \u58F0\u660E\u53EA\u80FD\u5F00\u59CB\u5B9E\u4F53 + +P-020 = \u975E\u6CD5\u5904\u7406\u6307\u4EE4\u76EE\u6807: "{0}" +P-021 = \u8F93\u5165\u7ED3\u5C3E\u5904\u4E8E\u5904\u7406\u6307\u4EE4\u5185 +P-022 = \u975E\u6CD5\u5904\u7406\u6307\u4EE4\u540D\u79F0, \u6216\u7F3A\u5C11\u7A7A\u683C +P-023 = \u5728 XML \u58F0\u660E\u7ED3\u5C3E\u5B58\u5728\u975E\u6CD5\u5B57\u7B26 "&#x{0};" ({1}) +P-024 = \u5E94\u4E3A "{0}=..." +P-025 = \u5E94\u58F0\u660E XML \u7248\u672C "{0}" +P-026 = \u975E\u6CD5 XML \u7248\u672C\u5B57\u7B26\u4E32 "{0}" +P-027 = \u5DF2\u8BC6\u522B XML \u7248\u672C "{0}", \u4F46\u65E0\u6CD5\u8BC6\u522B "{1}" +P-028 = \u5185\u90E8 DTD \u5B50\u96C6\u4E0D\u80FD\u62E5\u6709 "" \u6765\u7EC8\u6B62\u5728\u884C {1} \u5904\u5F00\u59CB\u7684\u5143\u7D20 +P-035 = \u4E0D\u5141\u8BB8\u5B9E\u4F53\u7ED3\u5C3E; \u7F3A\u5C11\u7ED3\u675F\u6807\u8BB0 +P-036 = ">" \u5FC5\u987B\u7EC8\u6B62 \u58F0\u660E, \u800C\u4E0D\u662F "{1}" +P-037 = \u5E8F\u5217\u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u5305\u542B "{0}" +P-038 = \u9009\u9879\u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u5305\u542B "{0}" +P-039 = \u4EFB\u4F55\u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u5305\u542B "{0}" + +P-040 = \u5728\u5185\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u53F7\u6216 "{1}", \u800C\u4E0D\u662F "{0}" +P-041 = \u5728\u5185\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u53F7, "," \u6216 "|", \u800C\u4E0D\u662F "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = "{0}" \u975E\u6CD5\u6DF7\u5408\u7684\u5185\u5BB9\u6A21\u578B, \u4E0B\u4E00\u4E2A\u5B57\u7B26 = &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = "{0}" \u6DF7\u5408\u7684\u5185\u5BB9\u6A21\u578B\u5FC5\u987B\u4EE5 ")*" \u7ED3\u675F, \u800C\u4E0D\u4EE5 "{1}" \u7ED3\u675F +P-044 = \u9700\u8981\u5C5E\u6027\u58F0\u660E\u6216 ">", \u800C\u4E0D\u662F "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = \u5C5E\u6027 "{0}" \u7684\u7C7B\u578B (\u4EE5 "{1}" \u5F00\u5934) \u975E\u6CD5 +P-046 = \u5728\u6761\u4EF6 DTD \u90E8\u5206\u9700\u8981\u5173\u952E\u5B57 +P-047 = \u672A\u7EC8\u6B62\u7684\u6761\u4EF6 DTD \u90E8\u5206 +P-048 = \u4EC5\u5141\u8BB8 INCLUDE \u548C IGNORE, \u4E0D\u5141\u8BB8 "{0}" +P-049 = \u975E\u6CD5\u5341\u8FDB\u5236\u5B57\u7B26\u5F15\u7528 + +P-050 = \u975E\u6CD5\u5341\u516D\u8FDB\u5236\u5B57\u7B26\u5F15\u7528 +P-051 = \u975E\u6CD5 XML \u5B57\u7B26 &#x{0}; +P-052 = \u5185\u90E8\u5B9E\u4F53 "&{0};" \u5728\u5185\u5BB9\u540E\u62E5\u6709\u5B57\u7B26 +P-053 = \u4E0D\u80FD\u5305\u542B\u672A\u89E3\u6790\u7684\u5B9E\u4F53, \u4F8B\u5982 "&{0};" +P-054 = \u4F7F\u7528 "&{0};" \u7684\u539F\u59CB\u5B9E\u4F53\u5B9A\u4E49 +P-055 = \u53EA\u6709\u7528\u6587\u6863 URI \u624D\u80FD\u89E3\u6790\u76F8\u5BF9 URI "{0}" +P-056 = URI "{0}" \u62E5\u6709\u4E00\u4E2A\u7247\u6BB5 ID +P-057 = \u9700\u8981 "?>" \u6765\u7EC8\u6B62 XML \u58F0\u660E +P-058 = \u5916\u90E8\u5B9E\u4F53 "&{0};" \u5728\u5185\u5BB9\u540E\u62E5\u6709\u5B57\u7B26 +P-059 = \u5916\u90E8\u53C2\u6570\u5B9E\u4F53 "%{0};" \u5728\u6807\u8BB0\u540E\u62E5\u6709\u5B57\u7B26 + +P-060 = \u7F16\u7801\u540D\u79F0\u4E2D\u5305\u542B\u975E\u6CD5\u5B57\u7B26 "{0}" +P-061 = \u58F0\u660E\u7684\u7F16\u7801 "{0}" \u4E0D\u4E0E\u5B9E\u9645\u7684\u7F16\u7801 "{1}" \u5339\u914D; \u8FD9\u53EF\u80FD\u4E0D\u662F\u9519\u8BEF +P-062 = \u6CE8\u91CA\u5FC5\u987B\u4E3A PUBLIC \u6216 SYSTEM +P-063 = \u6B63\u5728\u4F7F\u7528\u6CE8\u91CA "{0}" \u7684\u7B2C\u4E00\u4E2A\u5B9A\u4E49 +P-064 = \u53C2\u6570\u5B9E\u4F53 "%{0};" \u63D0\u524D\u7ED3\u675F +P-065 = \u5B9E\u4F53\u89E3\u6790\u5668\u6CA1\u6709\u63D0\u4F9B SYSTEM ID; \u53EF\u80FD\u4F1A\u5F71\u54CD\u76F8\u5BF9 URI +# P-066 ... ID available +P-067 = \u7F3A\u5C11\u6587\u6863\u6839\u5143\u7D20 +P-068 = \u9700\u8981\u6CE8\u91CA\u540D\u79F0 +P-069 = \u5B9E\u4F53 "{0}" \u7684\u6269\u5C55\u662F\u9012\u5F52\u7684 + +P-070 = \u4EE3\u7406\u5BF9\u7684\u7B2C\u4E8C\u90E8\u5206\u7684\u683C\u5F0F\u4E0D\u6B63\u786E: &#x{0}; +P-071 = \u975E\u6CD5 XML \u5B57\u7B26: &#x{0}; +P-072 = \u5B57\u7B26\u6570\u636E\u4E0D\u80FD\u62E5\u6709 "]]>" +# Character data section starts with "" with text in between. No change needed. +P-073 = \u89E3\u6790 \u58F0\u660E\u4F7F\u7528 +V-004 = \u672A\u58F0\u660E\u7684\u6CE8\u91CA "{0}" \u7531 \u58F0\u660E\u4F7F\u7528 +V-005 = \u5143\u7D20\u7C7B\u578B "{0}" \u672A\u58F0\u660E +V-006 = \u6839\u5143\u7D20\u7C7B\u578B\u4E3A "{0}", \u4F46\u58F0\u660E\u4E3A "{1}" +V-007 = \u4E0D\u4E3A\u5143\u7D20 "{1}" \u58F0\u660E\u5C5E\u6027 "{0}" +V-008 = \u5143\u7D20 "{1}" \u7684\u5C5E\u6027 "{0}" \u5FC5\u987B\u53EA\u62E5\u6709\u503C "{2}" +# {0} - probably attribute name. +V-009 = "{0}" \u7684\u5C5E\u6027\u503C\u4E3A #REQUIRED + +V-010 = \u6B64\u6587\u6863\u662F\u72EC\u7ACB\u7684, \u56E0\u6B64\u5C5E\u6027 "{0}" \u4E00\u5B9A\u4E0D\u8981\u8BBE\u7F6E\u4E3A\u9ED8\u8BA4\u503C +V-011 = \u6B64\u6587\u6863\u662F\u72EC\u7ACB\u7684, \u56E0\u6B64\u5143\u7D20 "{0}" \u4E00\u5B9A\u4E0D\u8981\u6709\u53EF\u5FFD\u7565\u7684\u7A7A\u683C +V-012 = \u5143\u7D20 "{0}" \u5DF2\u58F0\u660E +V-013 = \u53C2\u6570\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u90E8\u5206\u58F0\u660E +# {0} - element name +V-014 = "{0}" \u7684\u5185\u5BB9\u6A21\u578B\u4E2D\u7684\u53C2\u6570\u5B9E\u4F53\u5D4C\u5957\u9519\u8BEF +V-015 = \u6DF7\u5408\u5185\u5BB9\u6A21\u578B\u91CD\u590D\u5143\u7D20 "{0}" +V-016 = \u8BE5\u5143\u7D20\u5DF2\u62E5\u6709\u4E00\u4E2A ID \u5C5E\u6027 "{0}" +V-017 = ID \u5C5E\u6027 "{0}" \u4E0D\u80FD\u4E3A #FIXED +V-018 = ID \u5C5E\u6027 "{0}" \u4E0D\u80FD\u4E3A\u9ED8\u8BA4\u503C +V-019 = \u8BE5\u6587\u6863\u662F\u72EC\u7ACB\u7684; \u8BE5\u5C5E\u6027\u5FC5\u987B\u9884\u89C4\u8303\u5316 + +V-020 = \u53C2\u6570\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u90E8\u5206\u6761\u4EF6 DTD \u90E8\u5206 +V-021 = \u53C2\u6570\u5B9E\u4F53\u4E0D\u80FD\u5305\u542B\u90E8\u5206\u6CE8\u91CA +V-022 = \u5F15\u7528\u672A\u5B9A\u4E49\u7684\u53C2\u6570\u5B9E\u4F53 "%{0};" +V-023 = \u8BE5\u6587\u6863\u662F\u72EC\u7ACB\u7684; \u7981\u6B62\u53EF\u5FFD\u7565\u7684 CDATA \u7A7A\u683C +V-024 = \u4EFB\u4F55\u5143\u7D20\u90FD\u4E0D\u62E5\u6709\u503C\u4E3A "{0}" \u7684 ID \u5C5E\u6027 +V-025 = ID \u503C\u5FC5\u987B\u4E3A XML \u540D\u79F0; "{0}" \u4E0D\u662F\u4E00\u4E2A\u540D\u79F0 +V-026 = \u53E6\u4E00\u5143\u7D20\u5DF2\u62E5\u6709\u503C\u4E3A "{0}" \u7684 ID \u5C5E\u6027 +V-027 = IDREF/IDREFS \u503C\u5FC5\u987B\u4E3A XML \u540D\u79F0; "{0}" \u4E0D\u662F\u4E00\u4E2A\u540D\u79F0 +V-028 = NMTOKEN/NMTOKENS \u503C\u5FC5\u987B\u4E3A XML \u540D\u79F0\u6807\u8BB0; "{0}" \u4E0D\u662F\u540D\u79F0\u6807\u8BB0 +V-029 = \u503C "{0}" \u4E0D\u662F\u8BE5\u5C5E\u6027\u7684\u5176\u4E2D\u4E00\u4E2A\u679A\u4E3E\u503C + +V-030 = \u5C5E\u6027\u503C "{0}" \u4E0D\u547D\u540D\u6CE8\u91CA +V-031 = \u5C5E\u6027\u503C "{0}" \u4E0D\u547D\u540D\u672A\u89E3\u6790\u7684\u5B9E\u4F53 +V-032 = NMTOKENS \u5C5E\u6027\u5FC5\u987B\u62E5\u6709\u81F3\u5C11\u4E00\u4E2A\u503C +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = EMPTY \u5185\u5BB9\u6A21\u578B\u4E0D\u80FD\u62E5\u6709\u5185\u5BB9 +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8BB8\u8FDB\u4E00\u6B65\u8F93\u5165; \u4E0D\u5141\u8BB8 "{1}" +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8BB8\u6587\u672C +V-038 = \u5143\u7D20 "{0}" \u9700\u8981\u9644\u52A0\u5143\u7D20 +V-039 = IDREFS \u5C5E\u6027\u5FC5\u987B\u62E5\u6709\u81F3\u5C11\u4E00\u4E2A\u503C + +V-040 = ENTITIES \u5C5E\u6027\u5FC5\u987B\u62E5\u6709\u81F3\u5C11\u4E00\u4E2A\u503C diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties new file mode 100644 index 00000000000..66c36d5e3a5 --- /dev/null +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/resources/Messages_en_zh_TW.properties @@ -0,0 +1,284 @@ +# +# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# This code is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License version 2 only, as +# published by the Free Software Foundation. Oracle designates this +# particular file as subject to the "Classpath" exception as provided +# by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +# or visit www.oracle.com if you need additional information or have any +# questions. +# + +# +# English diagnostic messages (and fragments) for Sun's XML parser. +# +# P-NNN ... parser messages +# F-NNN ... message fragments (sometimes associated with more +# than one message, but usually just with one) +# V-NNN ... validation related messages +# +# Most messages can be produced in only one way. +# + + +# +# Generic parsing messages, not specific to validation +# +P-000 = \u7121\u5256\u6790\u5668\u8F38\u5165\u4F86\u6E90! +P-001 = \u6587\u4EF6\u7D50\u5C3E\u7684\u5B57\u5143\u7121\u6548, &#x{0}; +P-002 = \u5BE6\u9AD4 "&{0};" \u64F4\u5145\u7684\u683C\u5F0F\u4E0D\u6B63\u78BA +P-003 = \u8F38\u5165\u63D0\u524D\u7D50\u675F +# {0} - F000-F009, F011, F021. +P-004 = \u907A\u6F0F\u7A7A\u767D\u5B57\u5143 {0} +P-005 = \u53EA\u5141\u8A31\u7A7A\u767D\u5B57\u5143 {0} + + # + # unadorned "missing whitespace", with P-004 only + # + # Concatenated with P-004 (P-004 + F000) + F-000 = \u5143\u7D20\u540D\u7A31\u5BA3\u544A\u4E4B\u5F8C + # Concatenated with P-004 (P-004 + F001) + F-001 = \u5C6C\u6027\u540D\u7A31\u8207\u985E\u578B\u4E4B\u9593 + # Concatenated with P-004 (P-004 + F002) + F-002 = NOTATION \u985E\u578B\u540D\u7A31\u4E4B\u5F8C + # Concatenated with P-004 (P-004 + F003) + F-003 = \u5C6C\u6027\u985E\u578B\u8207\u9810\u8A2D\u503C\u4E4B\u9593 + # Concatenated with P-004 (P-004 + F004) + F-004 = #FIXED \u4E4B\u5F8C + # Concatenated with P-004 (P-004 + F005) + F-005 = " terminating declaration "%HTML.Version" +P-008 = \u4E0B\u4E00\u500B\u5B57\u5143\u5FC5\u9808\u70BA "{0}" {1} {2} + + # Concatenated with P-008 (P-008 + F020) + F-020 = \u6B63\u5728\u7D42\u6B62\u5BE6\u9AD4\u7684\u53C3\u7167 + # Concatenated with P-008 (P-008 + F021) + F-021 = \u6B63\u5728\u7D42\u6B62\u53C3\u6578\u5BE6\u9AD4\u7684\u53C3\u7167 + # Concatenated with P-008 (P-008 + F022) + F-022 = \u6B63\u5728\u7D42\u6B62\u8A3B\u89E3 + # Concatenated with P-008 (P-008 + F023) + F-023 = \u5728 XML \u5BA3\u544A\u4E2D + # Concatenated with P-008 (P-008 + F024) + F-024 = \u6B63\u5728\u7D42\u6B62\u5167\u90E8 DTD \u5B50\u96C6 + # Concatenated with P-008 (P-008 + F025) + F-025 = \u6B63\u5728\u7D42\u6B62 \u5BA3\u544A + # Concatenated with P-008 (P-008 + F026) + F-026 = \u5C6C\u6027\u540D\u7A31\u4E4B\u5F8C + # Concatenated with P-008 (P-008 + F027) + F-027 = \u6B63\u5728\u7D42\u6B62\u5143\u7D20 + # Concatenated with P-008 (P-008 + F028) + F-028 = \u6B63\u5728\u555F\u52D5\u5143\u7D20\u7684\u5167\u5BB9\u6A21\u578B + # Concatenated with P-008 (P-008 + F029) + F-029 = \u6B63\u5728\u555F\u52D5\u5C6C\u6027 NOTATIONS \u7684\u6E05\u55AE + # Concatenated with P-008 (P-008 + F030) + F-030 = \u6B63\u5728\u958B\u59CB\u689D\u4EF6 DTD \u5B50\u96C6 + # Concatenated with P-008 (P-008 + F031) + F-031 = \u6B63\u5728\u7D42\u6B62 \u5BA3\u544A + # Concatenated with P-008 (P-008 + F032) + F-032 = \u6B63\u5728\u7D42\u6B62 \u5BA3\u544A + +P-009 = \u7121\u6548\u7684\u5B57\u5143\u6216\u5BE6\u9AD4\u53C3\u7167\u8A9E\u6CD5 + +P-010 = \u53EA\u6709\u5916\u90E8\u53C3\u6578\u5BE6\u9AD4\u53EF\u5728\u5BE6\u9AD4\u503C\u4E2D\u4F7F\u7528 "%{0};" +P-011 = \u7121\u6548\u7684\u53C3\u6578\u5BE6\u9AD4\u53C3\u7167\u8A9E\u6CD5 +P-012 = \u5C6C\u6027\u503C\u4E2D\u8981\u4F7F\u7528 "<" \u505A\u70BA "<" +P-013 = \u5C6C\u6027\u4E2D\u5916\u90E8\u5BE6\u9AD4 "&{0};" \u7684\u53C3\u7167\u7121\u6548 +P-014 = \u672A\u5B9A\u7FA9\u5BE6\u9AD4 "&{0};" \u7684\u53C3\u7167 +# {0} - F033-F035 +P-015 = \u62EC\u4F4F\u7684\u503C\u61C9\u70BA {0} + + # Concatenated with P-015 (P-015 + F033) + F-033 = PUBLIC ID + # Concatenated with P-015 (P-015 + F034) + F-034 = SYSTEM ID + # {0} - attribute name. Concatenated with P-015 (P-015 + F033) + F-035 = \u5C6C\u6027\u503C {0} + +P-016 = PUBLIC ID "{0}" \u4E2D\u7684\u5B57\u5143\u7121\u6548 +P-017 = \u8655\u7406\u8A3B\u89E3\u6642\u5BE6\u9AD4\u7D50\u675F +P-018 = \u907A\u6F0F\u8655\u7406\u6307\u793A\u76EE\u6A19 +P-019 = XML \u5BA3\u544A\u53EF\u80FD\u53EA\u6703\u958B\u59CB\u5BE6\u9AD4 + +P-020 = \u7121\u6548\u7684\u8655\u7406\u6307\u793A\u76EE\u6A19: "{0}" +P-021 = \u8F38\u5165\u5728\u8655\u7406\u6307\u793A\u5167\u7D50\u675F +P-022 = \u8655\u7406\u6307\u793A\u540D\u7A31\u7121\u6548, \u6216\u907A\u6F0F\u7A7A\u767D\u5B57\u5143 +P-023 = XML \u5BA3\u544A\u7D50\u5C3E\u7684\u5B57\u5143 "&#x{0};" ({1}) \u7121\u6548 +P-024 = \u9810\u671F\u70BA "{0}=..." +P-025 = \u61C9\u5BA3\u544A XML \u7248\u672C "{0}" +P-026 = \u7121\u6548\u7684 XML \u7248\u672C\u5B57\u4E32 "{0}" +P-027 = \u8B58\u5225\u70BA XML \u7248\u672C "{0}", \u800C\u4E0D\u662F "{1}" +P-028 = \u5167\u90E8 DTD \u5B50\u96C6\u4E0D\u5F97\u6709 "" \u624D\u80FD\u7D42\u6B62\u7B2C {1} \u884C\u4E0A\u555F\u52D5\u7684\u5143\u7D20 +P-035 = \u4E0D\u5141\u8A31\u7D50\u675F\u5BE6\u9AD4; \u907A\u6F0F\u7D50\u675F\u6A19\u8A18 +P-036 = ">" \u5FC5\u9808\u7D42\u6B62 \u5BA3\u544A, \u800C\u4E0D\u662F "{1}" +P-037 = \u9806\u5E8F\u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u5305\u542B "{0}" +P-038 = \u9078\u64C7\u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u5305\u542B "{0}" +P-039 = \u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u5305\u542B "{0}" + +P-040 = \u5167\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u865F\u6216 "{1}", \u800C\u4E0D\u662F "{0}" +P-041 = \u5167\u5BB9\u6A21\u578B\u4E2D\u9700\u8981\u53F3\u62EC\u865F\u3001"," \u6216 "|", \u800C\u4E0D\u662F "{0}" +# {0} - element name, {1} - character as a hex number +P-042 = "{0}" \u7684\u6DF7\u5408\u5167\u5BB9\u6A21\u578B\u7121\u6548, \u4E0B\u4E00\u500B\u5B57\u5143\u70BA &#x{1}; +# {0} - element name, {1} - character e.g.: Mixed content model for "doc" must end with ")*", not "*". +P-043 = "{0}" \u7684\u6DF7\u5408\u5167\u5BB9\u6A21\u578B\u5FC5\u9808\u4EE5 ")*" \u7D50\u675F, \u800C\u4E0D\u662F "{1}" +P-044 = \u61C9\u70BA\u5C6C\u6027\u5BA3\u544A\u6216 ">", \u800C\u4E0D\u662F "{0}" +# {0} - attribute name, {1} - character e.g.: Illegal type (starts with "p") for attribute "xml:space" +P-045 = \u5C6C\u6027 "{0}" \u7684\u985E\u578B (\u4EE5 "{1}" \u958B\u982D) \u7121\u6548 +P-046 = \u689D\u4EF6 DTD \u5340\u6BB5\u9700\u8981\u95DC\u9375\u5B57 +P-047 = \u672A\u7D42\u6B62\u7684\u689D\u4EF6 DTD \u5340\u6BB5 +P-048 = \u53EA\u5141\u8A31 INCLUDE \u8207 IGNORE, \u800C\u4E0D\u662F "{0}" +P-049 = \u7121\u6548\u7684\u5341\u9032\u4F4D\u5B57\u5143\u53C3\u7167 + +P-050 = \u7121\u6548\u7684\u5341\u516D\u9032\u4F4D\u5B57\u5143\u53C3\u7167 +P-051 = \u4E0D\u5408\u6CD5\u7684 XML \u5B57\u5143 &#x{0}; +P-052 = \u5167\u90E8\u5BE6\u9AD4 "&{0};" \u6709\u5B57\u5143\u5728\u5167\u5BB9\u4E4B\u5F8C +P-053 = \u4E0D\u5F97\u5305\u542B\u5982 "&{0};" \u7B49\u7684\u672A\u5256\u6790\u5BE6\u9AD4 +P-054 = \u4F7F\u7528 "&{0};" \u7684\u539F\u59CB\u5BE6\u9AD4\u5B9A\u7FA9 +P-055 = \u6C92\u6709\u6587\u4EF6 URI \u7121\u6CD5\u89E3\u6790\u76F8\u5C0D URI "{0}"; +P-056 = URI "{0}" \u6709\u7247\u6BB5 ID +P-057 = \u9700\u8981 "?>" \u4EE5\u7D42\u6B62 XML \u5BA3\u544A +P-058 = \u5916\u90E8\u5BE6\u9AD4 "&{0};" \u6709\u5B57\u5143\u5728\u5167\u5BB9\u4E4B\u5F8C +P-059 = \u5916\u90E8\u53C3\u6578\u5BE6\u9AD4 "%{0};" \u6709\u5B57\u5143\u5728\u6A19\u8A18\u4E4B\u5F8C + +P-060 = \u7DE8\u78BC\u540D\u7A31\u4E2D\u7684\u5B57\u5143 "{0}" \u7121\u6548 +P-061 = \u5BA3\u544A\u7684\u7DE8\u78BC "{0}" \u8207\u5BE6\u969B\u7684\u4E00\u500B\u7DE8\u78BC\u4E0D\u76F8\u7B26 "{1}"; \u9019\u53EF\u80FD\u4E0D\u662F\u4E00\u500B\u932F\u8AA4 +P-062 = \u6A19\u8A18\u5FC5\u9808\u70BA PUBLIC \u6216 SYSTEM +P-063 = \u4F7F\u7528\u6A19\u8A18\u7684 "{0}" \u7684\u7B2C\u4E00\u500B\u5B9A\u7FA9 +P-064 = \u53C3\u6578\u5BE6\u9AD4 "%{0};" \u63D0\u524D\u7D50\u675F +P-065 = \u5BE6\u9AD4\u89E3\u6790\u7A0B\u5F0F\u672A\u63D0\u4F9B SYSTEM ID; \u53EF\u80FD\u6703\u5F71\u97FF\u76F8\u5C0D URI +# P-066 ... ID available +P-067 = \u907A\u6F0F\u6587\u4EF6\u6839\u5143\u7D20 +P-068 = \u9700\u8981\u6A19\u8A18\u540D\u7A31 +P-069 = \u5BE6\u9AD4 "{0}" \u7684\u64F4\u5145\u70BA\u905E\u8FF4\u5F0F + +P-070 = \u4EE3\u7406\u5B57\u7D44 &#x{0}; \u7B2C\u4E8C\u90E8\u4EFD\u7684\u683C\u5F0F\u4E0D\u6B63\u78BA +P-071 = \u7121\u6548\u7684 XML \u5B57\u5143: &#x{0}; +P-072 = \u5B57\u5143\u8CC7\u6599\u4E0D\u5F97\u6709 "]]>" +# Character data section starts with "" with text in between. No change needed. +P-073 = \u5256\u6790 \u5BA3\u544A\u4F7F\u7528 +V-004 = \u672A\u5BA3\u544A\u7684\u6A19\u8A18 "{0}" \u662F\u7531 \u5BA3\u544A\u4F7F\u7528 +V-005 = \u672A\u5BA3\u544A\u5143\u7D20\u985E\u578B "{0}" +V-006 = \u6839\u5143\u7D20\u985E\u578B\u70BA "{0}", \u4F46\u5BA3\u544A\u70BA "{1}" +V-007 = \u672A\u5BA3\u544A\u5143\u7D20 "{1}" \u7684\u5C6C\u6027 "{0}" +V-008 = \u5143\u7D20 "{1}" \u7684\u5C6C\u6027 "{0}" \u5FC5\u9808\u53EA\u6709\u503C "{2}" +# {0} - probably attribute name. +V-009 = "{0}" \u7684\u5C6C\u6027\u503C\u70BA #REQUIRED + +V-010 = \u6B64\u6587\u4EF6\u662F\u7368\u7ACB\u7684, \u56E0\u6B64\u4E0D\u80FD\u9810\u8A2D\u5C6C\u6027 "{0}" +V-011 = \u6B64\u6587\u4EF6\u662F\u7368\u7ACB\u7684, \u56E0\u6B64\u5143\u7D20 "{0}" \u4E0D\u5F97\u5305\u542B\u53EF\u5FFD\u7565\u7684\u7A7A\u767D\u5B57\u5143 +V-012 = \u5DF2\u5BA3\u544A\u5143\u7D20 "{0}" +V-013 = \u53C3\u6578\u5BE6\u9AD4\u4E0D\u5F97\u5305\u542B\u90E8\u4EFD\u5BA3\u544A +# {0} - element name +V-014 = "{0}" \u7684\u5167\u5BB9\u6A21\u578B\u4E2D\u6709\u53C3\u6578\u5BE6\u9AD4\u5DE2\u72C0\u932F\u8AA4 +V-015 = \u6DF7\u5408\u5167\u5BB9\u6A21\u578B\u91CD\u8907\u4E86\u5143\u7D20 "{0}" +V-016 = \u6B64\u5143\u7D20\u5DF2\u6709 ID \u5C6C\u6027 "{0}" +V-017 = ID \u5C6C\u6027 "{0}" \u4E0D\u5F97\u70BA #FIXED +V-018 = ID \u5C6C\u6027 "{0}" \u4E0D\u5F97\u8A2D\u5B9A\u9810\u8A2D\u503C +V-019 = \u6B64\u70BA\u7368\u7ACB\u6587\u4EF6; \u6B64\u5C6C\u6027\u9700\u8981\u9810\u5148\u6A19\u6E96\u5316 + +V-020 = \u53C3\u6578\u5BE6\u9AD4\u4E0D\u5F97\u5305\u542B\u90E8\u4EFD\u689D\u4EF6 DTD \u5340\u6BB5 +V-021 = \u53C3\u6578\u5BE6\u9AD4\u4E0D\u5F97\u5305\u542B\u90E8\u4EFD\u8A3B\u89E3 +V-022 = \u672A\u5B9A\u7FA9\u53C3\u6578\u5BE6\u9AD4 "%{0};" \u7684\u53C3\u7167 +V-023 = \u6B64\u70BA\u7368\u7ACB\u6587\u4EF6; \u7981\u6B62\u6B64\u7A2E\u53EF\u5FFD\u7565\u7684 CDATA \u7A7A\u767D\u5B57\u5143 +V-024 = \u6C92\u6709 ID \u5C6C\u6027\u503C\u70BA "{0}" \u7684\u5143\u7D20 +V-025 = ID \u503C\u5FC5\u9808\u70BA XML \u540D\u7A31; "{0}" \u4E0D\u662F\u540D\u7A31 +V-026 = \u5DF2\u6709\u5176\u4ED6\u5143\u7D20\u7684 ID \u5C6C\u6027\u503C\u70BA "{0}" +V-027 = IDREF/IDREFS \u503C\u5FC5\u9808\u70BA XML \u540D\u7A31; "{0}" \u4E0D\u662F\u540D\u7A31 +V-028 = NMTOKEN/NMTOKENS \u503C\u5FC5\u9808\u70BA XML \u540D\u7A31\u8A18\u865F; "{0}" \u4E0D\u662F\u8A18\u865F +V-029 = \u503C "{0}" \u4E0D\u662F\u6B64\u5C6C\u6027\u7684\u5176\u4E2D\u4E00\u500B\u5217\u8209\u503C + +V-030 = \u5C6C\u6027\u503C "{0}" \u4E0D\u6703\u547D\u540D\u6A19\u8A18 +V-031 = \u5C6C\u6027\u503C "{0}" \u4E0D\u6703\u547D\u540D\u672A\u5256\u6790\u7684\u5BE6\u9AD4 +V-032 = NMTOKENS \u5C6C\u6027\u5FC5\u9808\u81F3\u5C11\u6709\u4E00\u500B\u503C +# Empty content model is a special type of XML element. I'd leave the message in English as is (also libraries from outside of Oracle use this exact message) but the word EMPTY can be translated. +V-033 = EMPTY \u5167\u5BB9\u6A21\u578B\u4E0D\u5F97\u6709\u4EFB\u4F55\u5167\u5BB9 +# Usage not found. TODO Remove +#V-034 = Element "{0}" does not allow "{1}" -- {2} +# {0} - xml element name, {1} - xml element name e.g. Element "servlet-mapping" allows no further input; "url-pattern" is not allowed. +V-035 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8A31\u5176\u4ED6\u8F38\u5165; \u4E0D\u5141\u8A31 "{1}" +# Usage not found. TODO Remove +#V-036 = Element "{0}" does not allow "{1}" here +V-037 = \u5143\u7D20 "{0}" \u4E0D\u5141\u8A31\u6587\u5B57 +V-038 = \u5143\u7D20 "{0}" \u9700\u8981\u5176\u4ED6\u5143\u7D20 +V-039 = IDREFS \u5C6C\u6027\u5FC5\u9808\u81F3\u5C11\u6709\u4E00\u500B\u503C + +V-040 = ENTITIES \u5C6C\u6027\u5FC5\u9808\u81F3\u5C11\u6709\u4E00\u500B\u503C diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties index f1e9f4acbf0..0917dd67ad6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/version.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -23,8 +23,7 @@ # questions. # -build-id=b09 - build-version=JAX-WS RI 2.2.7-b09 - major-version=2.2.7 - svn-revision=12895 - svn-url=https://svn.java.net/svn/jax-ws~sources/branches/jaxws22/jaxws-ri +build-id=2.2.9-b13941 +build-version=JAX-WS RI 2.2.9-b13941 +major-version=2.2.9 +svn-revision=unknown diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java index 26c7284b7e5..37b52c0176e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/CDATA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java index 395e1a60932..85a722183f1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/ContentHandlerToXMLStreamWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java index 135d601a873..fe14ae23d02 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/DummyLocation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java index 0fd770de0d3..d39b6180366 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NamedNodeMapIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java index 3349a42b294..4d816decdd3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/NodeListIterator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java index e2a4958705c..a7e6a31d335 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXResult.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java index 29f760f4f20..d3a3293cead 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/StAXSource.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,7 +41,7 @@ import javax.xml.transform.sax.SAXSource; * A JAXP {@link javax.xml.transform.Source} implementation that wraps * the specified {@link javax.xml.stream.XMLStreamReader} or * {@link javax.xml.stream.XMLEventReader} for use by applications that - * expext a {@link javax.xml.transform.Source}. + * expect a {@link javax.xml.transform.Source}. * *

      * The fact that StAXSource derives from SAXSource is an implementation @@ -66,7 +66,7 @@ import javax.xml.transform.sax.SAXSource; XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileReader(args[0])); Source staxSource = new StAXSource(reader); - // createa StreamResult + // create a StreamResult Result streamResult = new StreamResult(System.out); // run the transform @@ -87,16 +87,19 @@ public class StAXSource extends SAXSource { // SAX allows ContentHandler to be changed during the parsing, // but JAXB doesn't. So this repeater will sit between those // two components. - private XMLFilterImpl repeater = new XMLFilterImpl(); + private final XMLFilterImpl repeater = new XMLFilterImpl(); // this object will pretend as an XMLReader. // no matter what parameter is specified to the parse method, // it will just read from the StAX reader. private final XMLReader pseudoParser = new XMLReader() { + + @Override public boolean getFeature(String name) throws SAXNotRecognizedException { throw new SAXNotRecognizedException(name); } + @Override public void setFeature(String name, boolean value) throws SAXNotRecognizedException { // Should support these two features according to XMLReader javadoc. if (name.equals("http://xml.org/sax/features/namespaces") && value) { @@ -108,6 +111,7 @@ public class StAXSource extends SAXSource { } } + @Override public Object getProperty(String name) throws SAXNotRecognizedException { if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) { return lexicalHandler; @@ -115,6 +119,7 @@ public class StAXSource extends SAXSource { throw new SAXNotRecognizedException(name); } + @Override public void setProperty(String name, Object value) throws SAXNotRecognizedException { if( "http://xml.org/sax/properties/lexical-handler".equals(name) ) { this.lexicalHandler = (LexicalHandler)value; @@ -127,40 +132,55 @@ public class StAXSource extends SAXSource { // we will store this value but never use it by ourselves. private EntityResolver entityResolver; + + @Override public void setEntityResolver(EntityResolver resolver) { this.entityResolver = resolver; } + + @Override public EntityResolver getEntityResolver() { return entityResolver; } private DTDHandler dtdHandler; + + @Override public void setDTDHandler(DTDHandler handler) { this.dtdHandler = handler; } + @Override public DTDHandler getDTDHandler() { return dtdHandler; } + @Override public void setContentHandler(ContentHandler handler) { repeater.setContentHandler(handler); } + + @Override public ContentHandler getContentHandler() { return repeater.getContentHandler(); } private ErrorHandler errorHandler; + + @Override public void setErrorHandler(ErrorHandler handler) { this.errorHandler = handler; } + @Override public ErrorHandler getErrorHandler() { return errorHandler; } + @Override public void parse(InputSource input) throws SAXException { parse(); } + @Override public void parse(String systemId) throws SAXException { parse(); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java index 5b680031ace..af55800c2f9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java index 63968044cb8..7a2abce1811 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamReaderToXMLStreamWriter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,12 +25,20 @@ package com.sun.xml.internal.ws.util.xml; +import java.io.IOException; + +import javax.xml.bind.attachment.AttachmentMarshaller; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import javax.xml.XMLConstants; +import com.sun.xml.internal.ws.streaming.MtomStreamWriter; +import com.sun.xml.internal.org.jvnet.staxex.Base64Data; +import com.sun.xml.internal.org.jvnet.staxex.XMLStreamReaderEx; +import com.sun.xml.internal.org.jvnet.staxex.XMLStreamWriterEx; + /** * Reads a sub-tree from {@link XMLStreamReader} and writes to {@link XMLStreamWriter} * as-is. @@ -50,6 +58,10 @@ public class XMLStreamReaderToXMLStreamWriter { private char[] buf; + boolean optimizeBase64Data = false; + + AttachmentMarshaller mtomAttachmentMarshaller; + /** * Reads one subtree and writes it out. * @@ -62,6 +74,11 @@ public class XMLStreamReaderToXMLStreamWriter { this.in = in; this.out = out; + optimizeBase64Data = (in instanceof XMLStreamReaderEx); + + if (out instanceof XMLStreamWriterEx && out instanceof MtomStreamWriter) { + mtomAttachmentMarshaller = ((MtomStreamWriter) out).getAttachmentMarshaller(); + } // remembers the nest level of elements to know when we are done. int depth=0; @@ -136,9 +153,29 @@ public class XMLStreamReaderToXMLStreamWriter { protected void handleCharacters() throws XMLStreamException { - for (int start=0,read=buf.length; read == buf.length; start+=buf.length) { - read = in.getTextCharacters(start, buf, 0, buf.length); - out.writeCharacters(buf, 0, read); + + CharSequence c = null; + + if (optimizeBase64Data) { + c = ((XMLStreamReaderEx)in).getPCDATA(); + } + + if ((c != null) && (c instanceof Base64Data)) { + if (mtomAttachmentMarshaller != null) { + Base64Data b64d = (Base64Data) c; + ((XMLStreamWriterEx)out).writeBinary(b64d.getDataHandler()); + } else { + try { + ((Base64Data)c).writeTo(out); + } catch (IOException e) { + throw new XMLStreamException(e); + } + } + } else { + for (int start=0,read=buf.length; read == buf.length; start+=buf.length) { + read = in.getTextCharacters(start, buf, 0, buf.length); + out.writeCharacters(buf, 0, read); + } } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java index 6f9f02dd998..f4c7b6c2d75 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XMLStreamWriterFilter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java index 065f0e25471..eb358b30d27 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/util/xml/XmlUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,16 +37,14 @@ import org.w3c.dom.EntityReference; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.Text; -import org.xml.sax.EntityResolver; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.XMLReader; -import org.xml.sax.InputSource; +import org.xml.sax.*; +import javax.xml.XMLConstants; import javax.xml.namespace.QName; +import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; +import javax.xml.stream.XMLInputFactory; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; @@ -57,6 +55,8 @@ import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamSource; import javax.xml.ws.WebServiceException; +import javax.xml.xpath.XPathFactory; +import javax.xml.xpath.XPathFactoryConfigurationException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; @@ -67,6 +67,8 @@ import java.util.Enumeration; import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; /** * @author WS Development Team @@ -75,6 +77,15 @@ public class XmlUtil { private final static String LEXICAL_HANDLER_PROPERTY = "http://xml.org/sax/properties/lexical-handler"; + private static final Logger LOGGER = Logger.getLogger(XmlUtil.class.getName()); + + private static boolean globalSecureXmlProcessingEnabled; + + static { + String disableSecureXmlProcessing = System.getProperty("disableSecureXmlProcessing"); + globalSecureXmlProcessingEnabled = disableSecureXmlProcessing == null || !Boolean.valueOf(disableSecureXmlProcessing); + } + public static String getPrefix(String s) { int i = s.indexOf(':'); if (i == -1) @@ -163,7 +174,7 @@ public class XmlUtil { } public static String getTextForNode(Node node) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); NodeList children = node.getChildNodes(); if (children.getLength() == 0) @@ -199,9 +210,9 @@ public class XmlUtil { } } - static final TransformerFactory transformerFactory = TransformerFactory.newInstance(); + static final TransformerFactory transformerFactory = newTransformerFactory(); - static final SAXParserFactory saxParserFactory = SAXParserFactory.newInstance(); + static final SAXParserFactory saxParserFactory = newSAXParserFactory(true); static { saxParserFactory.setNamespaceAware(true); @@ -326,15 +337,81 @@ public class XmlUtil { * {@link ErrorHandler} that always treat the error as fatal. */ public static final ErrorHandler DRACONIAN_ERROR_HANDLER = new ErrorHandler() { + @Override public void warning(SAXParseException exception) { } + @Override public void error(SAXParseException exception) throws SAXException { throw exception; } + @Override public void fatalError(SAXParseException exception) throws SAXException { throw exception; } }; + + public static DocumentBuilderFactory newDocumentBuilderFactory() { + return newDocumentBuilderFactory(true); + } + + public static DocumentBuilderFactory newDocumentBuilderFactory(boolean secureXmlProcessing) { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + try { + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessing)); + } catch (ParserConfigurationException e) { + LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } ); + } + return factory; + } + + public static TransformerFactory newTransformerFactory(boolean secureXmlProcessingEnabled) { + TransformerFactory factory = TransformerFactory.newInstance(); + try { + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled)); + } catch (TransformerConfigurationException e) { + LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); + } + return factory; + } + + public static TransformerFactory newTransformerFactory() { + return newTransformerFactory(true); + } + + public static SAXParserFactory newSAXParserFactory(boolean secureXmlProcessingEnabled) { + SAXParserFactory factory = SAXParserFactory.newInstance(); + try { + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled)); + } catch (Exception e) { + LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[]{factory.getClass().getName()}); + } + return factory; + } + + public static XPathFactory newXPathFactory(boolean secureXmlProcessingEnabled) { + XPathFactory factory = XPathFactory.newInstance(); + try { + factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, checkGlobalOverride(secureXmlProcessingEnabled)); + } catch (XPathFactoryConfigurationException e) { + LOGGER.log(Level.WARNING, "Factory [{}] doesn't support secure xml processing!", new Object[] { factory.getClass().getName() } ); + } + return factory; + } + + public static XMLInputFactory newXMLInputFactory(boolean secureXmlProcessingEnabled) { + XMLInputFactory factory = XMLInputFactory.newInstance(); + if (checkGlobalOverride(secureXmlProcessingEnabled)) { + // TODO-Miran: are those apppropriate defaults? + factory.setProperty(XMLInputFactory.SUPPORT_DTD, false); + factory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false); + } + return factory; + } + + private static boolean checkGlobalOverride(boolean localSecureXmlProcessingEnabled) { + return globalSecureXmlProcessingEnabled && localSecureXmlProcessingEnabled; + } + } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java index 9742f66ed99..1c13367b16f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,11 +29,13 @@ import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.addressing.AddressingVersion; -import com.sun.xml.internal.ws.api.message.HeaderList; +import com.sun.xml.internal.ws.api.message.AddressingUtils; import com.sun.xml.internal.ws.api.message.Message; +import com.sun.xml.internal.ws.api.message.MessageHeaders; import com.sun.xml.internal.ws.api.message.Messages; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.model.AbstractSEIModelImpl; @@ -61,8 +63,8 @@ import java.util.logging.Logger; final class ActionBasedOperationFinder extends WSDLOperationFinder { private static final Logger LOGGER = Logger.getLogger(ActionBasedOperationFinder.class.getName()); - private final Map uniqueOpSignatureMap; - private final Map actionMap; + private final Map uniqueOpSignatureMap; + private final Map actionMap; private final @NotNull AddressingVersion av; @@ -71,8 +73,8 @@ final class ActionBasedOperationFinder extends WSDLOperationFinder { assert binding.getAddressingVersion() != null; // this dispatcher can be only used when addressing is on. av = binding.getAddressingVersion(); - uniqueOpSignatureMap = new HashMap(); - actionMap = new HashMap(); + uniqueOpSignatureMap = new HashMap(); + actionMap = new HashMap(); if (seiModel != null) { for (JavaMethodImpl m : ((AbstractSEIModelImpl) seiModel).getJavaMethods()) { @@ -94,8 +96,8 @@ final class ActionBasedOperationFinder extends WSDLOperationFinder { LOGGER.warning(AddressingMessages.NON_UNIQUE_OPERATION_SIGNATURE( uniqueOpSignatureMap.get(opSignature),m.getOperationQName(),action,payloadName)); } - uniqueOpSignatureMap.put(opSignature, m.getOperationQName()); - actionMap.put(action,m.getOperationQName()); + uniqueOpSignatureMap.put(opSignature, wsdlOperationMapping(m)); + actionMap.put(action,wsdlOperationMapping(m)); } } } else { @@ -111,24 +113,28 @@ final class ActionBasedOperationFinder extends WSDLOperationFinder { uniqueOpSignatureMap.get(opSignature),wsdlOp.getName(),action,payloadName)); } - uniqueOpSignatureMap.put(opSignature, wsdlOp.getName()); - actionMap.put(action,wsdlOp.getName()); + uniqueOpSignatureMap.put(opSignature, wsdlOperationMapping(wsdlOp)); + actionMap.put(action,wsdlOperationMapping(wsdlOp)); } } } - /** - * - * @param request Request Packet that is used to find the associated WSDLOperation - * @return WSDL operation Qname. - * return null if WS-Addressing is not engaged. - * @throws DispatchException with WSA defined fault message when it cannot find an associated WSDL operation. - * - */ - @Override - public QName getWSDLOperationQName(Packet request) throws DispatchException { - HeaderList hl = request.getMessage().getHeaders(); - String action = hl.getAction(av, binding.getSOAPVersion()); +// /** +// * +// * @param request Request Packet that is used to find the associated WSDLOperation +// * @return WSDL operation Qname. +// * return null if WS-Addressing is not engaged. +// * @throws DispatchException with WSA defined fault message when it cannot find an associated WSDL operation. +// * +// */ +// @Override +// public QName getWSDLOperationQName(Packet request) throws DispatchException { +// return getWSDLOperationMapping(request).getWSDLBoundOperation().getName(); +// } + + public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException { + MessageHeaders hl = request.getMessage().getHeaders(); + String action = AddressingUtils.getAction(hl, av, binding.getSOAPVersion()); if (action == null) // Addressing is not enagaged, return null to use other ways to dispatch. @@ -146,16 +152,16 @@ final class ActionBasedOperationFinder extends WSDLOperationFinder { payloadName = new QName(nsUri, localPart); } - QName opName = uniqueOpSignatureMap.get(new ActionBasedOperationSignature(action, payloadName)); - if (opName != null) - return opName; + WSDLOperationMapping opMapping = uniqueOpSignatureMap.get(new ActionBasedOperationSignature(action, payloadName)); + if (opMapping != null) + return opMapping; //Seems like in Wstrust STS wsdls, the payload does not match what is specified in the wsdl leading to incorrect // wsdl operation resolution. Use just wsa:Action to dispatch as a last resort. //try just with wsa:Action - opName = actionMap.get(action); - if (opName != null) - return opName; + opMapping = actionMap.get(action); + if (opMapping != null) + return opMapping; // invalid action header Message result = Messages.create(action, av, binding.getSOAPVersion()); @@ -163,6 +169,4 @@ final class ActionBasedOperationFinder extends WSDLOperationFinder { throw new DispatchException(result); } - - } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java index 0ce3f227795..3647911c740 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/ActionBasedOperationSignature.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java index ca3be1dd5d9..d5a9101d338 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/DispatchException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java index c43f83e1acf..ac34abbd501 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/OperationDispatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.message.Packet; import com.sun.xml.internal.ws.api.message.Message; @@ -65,15 +66,20 @@ public class OperationDispatcher { } /** - * + * @deprecated use getWSDLOperationMapping(Packet request) * @param request Packet * @return QName of the wsdl operation. * @throws DispatchException if a unique operartion cannot be associated with this packet. */ public @NotNull QName getWSDLOperationQName(Packet request) throws DispatchException { - QName opName; + WSDLOperationMapping m = getWSDLOperationMapping(request); + return m != null ? m.getOperationName() : null; + } + + public @NotNull WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException { + WSDLOperationMapping opName; for(WSDLOperationFinder finder: opFinders) { - opName = finder.getWSDLOperationQName(request); + opName = finder.getWSDLOperationMapping(request); if(opName != null) return opName; } @@ -85,6 +91,5 @@ public class OperationDispatcher { Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage( binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient); throw new DispatchException(faultMsg); - } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java index edcf68c05ec..d246ed060ac 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/PayloadQNameBasedOperationFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,7 @@ package com.sun.xml.internal.ws.wsdl; import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.message.Message; @@ -62,7 +63,7 @@ final class PayloadQNameBasedOperationFinder extends WSDLOperationFinder { public static final String EMPTY_PAYLOAD_NSURI = ""; public static final QName EMPTY_PAYLOAD = new QName(EMPTY_PAYLOAD_NSURI, EMPTY_PAYLOAD_LOCAL); - private final QNameMap methodHandlers = new QNameMap(); + private final QNameMap methodHandlers = new QNameMap(); private final QNameMap> unique = new QNameMap>(); @@ -98,7 +99,7 @@ final class PayloadQNameBasedOperationFinder extends WSDLOperationFinder { // Set up method handlers only for unique QNames. So that dispatching // happens consistently for a method if (unique.get(name).size() == 1) { - methodHandlers.put(name, m.getOperationQName()); + methodHandlers.put(name, wsdlOperationMapping(m)); } } } else { @@ -106,7 +107,7 @@ final class PayloadQNameBasedOperationFinder extends WSDLOperationFinder { QName name = wsdlOp.getReqPayloadName(); if (name == null) name = EMPTY_PAYLOAD; - methodHandlers.put(name, wsdlOp.getName()); + methodHandlers.put(name, wsdlOperationMapping(wsdlOp)); } } } @@ -119,7 +120,9 @@ final class PayloadQNameBasedOperationFinder extends WSDLOperationFinder { * @throws DispatchException if the payload itself is incorrect, this happens when the payload is not accepted by * any operation in the port. */ - public QName getWSDLOperationQName(Packet request) throws DispatchException{ +// public QName getWSDLOperationQName(Packet request) throws DispatchException{ + + public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException { Message message = request.getMessage(); String localPart = message.getPayloadLocalPart(); String nsUri; @@ -131,7 +134,7 @@ final class PayloadQNameBasedOperationFinder extends WSDLOperationFinder { if(nsUri == null) nsUri = EMPTY_PAYLOAD_NSURI; } - QName op = methodHandlers.get(nsUri, localPart); + WSDLOperationMapping op = methodHandlers.get(nsUri, localPart); // Check if payload itself is correct. Usually it is, so let us check last if (op == null && !unique.containsKey(nsUri,localPart)) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java index 08d380a3dad..5008a52a3bf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SDDocumentResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java index 2bcfde9705c..8a4082fdf78 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/SOAPActionBasedOperationFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import com.sun.istack.internal.Nullable; import com.sun.xml.internal.ws.api.WSBinding; import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.message.Packet; @@ -49,11 +50,11 @@ import java.util.Map; * @author Jitendra Kotamraju */ final class SOAPActionBasedOperationFinder extends WSDLOperationFinder { - private final Map methodHandlers; + private final Map methodHandlers; public SOAPActionBasedOperationFinder(WSDLPort wsdlModel, WSBinding binding, @Nullable SEIModel seiModel) { super(wsdlModel,binding,seiModel); - methodHandlers = new HashMap(); + methodHandlers = new HashMap(); // Find if any SOAPAction repeat for operations Map unique = new HashMap(); @@ -73,18 +74,19 @@ final class SOAPActionBasedOperationFinder extends WSDLOperationFinder { // Set up method handlers only for unique SOAPAction values so // that dispatching happens consistently for a method if (unique.get(soapAction) == 1) { - methodHandlers.put('"' + soapAction + '"', m.getOperationQName()); + methodHandlers.put('"' + soapAction + '"', wsdlOperationMapping(m)); } } } else { for(WSDLBoundOperation wsdlOp: wsdlModel.getBinding().getBindingOperations()) { - methodHandlers.put(wsdlOp.getSOAPAction(),wsdlOp.getName()); + methodHandlers.put(wsdlOp.getSOAPAction(), wsdlOperationMapping(wsdlOp)); } } } - public QName getWSDLOperationQName(Packet request) { +// public QName getWSDLOperationQName(Packet request) { + public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException { return request.soapAction == null ? null : methodHandlers.get(request.soapAction); } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java index a207c5a2084..16677c73c96 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/WSDLOperationFinder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,9 +26,13 @@ package com.sun.xml.internal.ws.wsdl; import com.sun.xml.internal.ws.api.message.Packet; +import com.sun.xml.internal.ws.api.model.wsdl.WSDLBoundOperation; import com.sun.xml.internal.ws.api.model.wsdl.WSDLPort; +import com.sun.xml.internal.ws.api.model.JavaMethod; import com.sun.xml.internal.ws.api.model.SEIModel; +import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; import com.sun.xml.internal.ws.api.WSBinding; +import com.sun.xml.internal.ws.model.JavaMethodImpl; import com.sun.istack.internal.NotNull; import com.sun.istack.internal.Nullable; @@ -38,7 +42,7 @@ import javax.xml.namespace.QName; * Extensions if this class will be used for dispatching the request message to the correct endpoint method by * identifying the wsdl operation associated with the request. * - * @See OperationDispatcher + * @see OperationDispatcher * * @author Rama Pulavarthi */ @@ -59,10 +63,51 @@ public abstract class WSDLOperationFinder { * In such case, other OperationFinders are queried to resolve a WSDL operation. * It should throw an instance of DispatchException if it finds incorrect information in the packet. * + * @deprecated use getWSDLOperationMapping(Packet request) + * * @param request Request Packet that is used to find the associated WSDLOperation * @return QName of the WSDL Operation that this request correponds to. * null when it cannot find a unique operation to dispatch to. * @throws DispatchException When the information in the Packet is invalid */ - public abstract QName getWSDLOperationQName(Packet request) throws DispatchException; + public QName getWSDLOperationQName(Packet request) throws DispatchException { + WSDLOperationMapping m = getWSDLOperationMapping(request); + return m != null ? m.getOperationName() : null; + } + + public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException { + return null; + } + + protected WSDLOperationMapping wsdlOperationMapping(JavaMethodImpl j) { + return new WSDLOperationMappingImpl(j.getOperation(), j); + } + + protected WSDLOperationMapping wsdlOperationMapping(WSDLBoundOperation o) { + return new WSDLOperationMappingImpl(o, null); + } + + static class WSDLOperationMappingImpl implements WSDLOperationMapping { + private WSDLBoundOperation wsdlOperation; + private JavaMethod javaMethod; + private QName operationName; + + WSDLOperationMappingImpl(WSDLBoundOperation wsdlOperation, JavaMethodImpl javaMethod) { + this.wsdlOperation = wsdlOperation; + this.javaMethod = javaMethod; + operationName = (javaMethod != null) ? javaMethod.getOperationQName() : wsdlOperation.getName(); + } + + public WSDLBoundOperation getWSDLBoundOperation() { + return wsdlOperation; + } + + public JavaMethod getJavaMethod() { + return javaMethod; + } + + public QName getOperationName() { + return operationName; + } + } } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java index 2049823839c..e715003bd4a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/DelegatingParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java index 676cd3a2c9f..e762275f4d8 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/EntityResolverWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java index 5cda292fa95..b9d4ee0ff4c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ErrorHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java index 07d90dd7854..4c0b14126f4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/FoolProofParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java index 88b4d814d12..17bb0e1c3b0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/InaccessibleWSDLException.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,7 +34,7 @@ import java.util.List; * A list of {@link InaccessibleWSDLException} wrapped in one exception. * *

      - * This exception is used to report all the errors during WSDL parsing from {@link RuntimeWSDLParser#parse(java.net.URL, org.xml.sax.EntityResolver, boolean, com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension[])} + * This exception is used to report all the errors during WSDL parsing from {@link RuntimeWSDLParser#parse(java.net.URL, javax.xml.transform.Source, org.xml.sax.EntityResolver, boolean, com.sun.xml.internal.ws.api.server.Container, com.sun.xml.internal.ws.api.wsdl.parser.WSDLParserExtension[])} * * @author Vivek Pandey */ diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java index 7c1149e9df3..474934d5a5e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MIMEConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,13 +29,13 @@ import javax.xml.namespace.QName; interface MIMEConstants { + // namespace URIs - public static String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; + static final String NS_WSDL_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"; // QNames - public static QName QNAME_CONTENT = new QName(NS_WSDL_MIME, "content"); - public static QName QNAME_MULTIPART_RELATED = - new QName(NS_WSDL_MIME, "multipartRelated"); - public static QName QNAME_PART = new QName(NS_WSDL_MIME, "part"); - public static QName QNAME_MIME_XML = new QName(NS_WSDL_MIME, "mimeXml"); + static final QName QNAME_CONTENT = new QName(NS_WSDL_MIME, "content"); + static final QName QNAME_MULTIPART_RELATED = new QName(NS_WSDL_MIME, "multipartRelated"); + static final QName QNAME_PART = new QName(NS_WSDL_MIME, "part"); + static final QName QNAME_MIME_XML = new QName(NS_WSDL_MIME, "mimeXml"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java index 8308ec93637..fc57f89d289 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MemberSubmissionAddressingWSDLParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java index 0a560522787..bcc4065b264 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/MexEntityResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java index d5725449e0e..d5dcc755522 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/ParserUtil.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java index 49187f4d36e..ddaf8d695e7 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/RuntimeWSDLParser.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -32,6 +32,7 @@ import com.sun.xml.internal.stream.buffer.XMLStreamBuffer; import com.sun.xml.internal.stream.buffer.XMLStreamBufferMark; import com.sun.xml.internal.stream.buffer.stax.StreamReaderBufferCreator; import com.sun.xml.internal.ws.api.BindingID; +import com.sun.xml.internal.ws.api.BindingIDFactory; import com.sun.xml.internal.ws.api.SOAPVersion; import com.sun.xml.internal.ws.api.EndpointAddress; import com.sun.xml.internal.ws.api.WSDLLocator; @@ -100,6 +101,7 @@ public class RuntimeWSDLParser { private final XMLEntityResolver resolver; private final PolicyResolver policyResolver; + /** * The {@link WSDLParserExtension}. Always non-null. */ @@ -224,10 +226,6 @@ public class RuntimeWSDLParser { return wsdlParser.wsdlDoc; } - private static WSDLModelImpl tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException { - return tryWithMex(wsdlParser, wsdlLoc, resolver, isClientSide, container, e, Service.class, policyResolver, extensions); - } - private static WSDLModelImpl tryWithMex(@NotNull RuntimeWSDLParser wsdlParser, @NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Throwable e, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension... extensions) throws SAXException, XMLStreamException { ArrayList exceptions = new ArrayList(); try { @@ -246,10 +244,6 @@ public class RuntimeWSDLParser { throw new InaccessibleWSDLException(exceptions); } - private WSDLModelImpl parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException { - return parseUsingMex(wsdlLoc, resolver, isClientSide, container, Service.class, policyResolver, extensions); - } - private WSDLModelImpl parseUsingMex(@NotNull URL wsdlLoc, @NotNull EntityResolver resolver, boolean isClientSide, Container container, Class serviceClass, PolicyResolver policyResolver, WSDLParserExtension[] extensions) throws IOException, SAXException, XMLStreamException, URISyntaxException { //try MEX MetaDataResolver mdResolver = null; @@ -347,10 +341,6 @@ public class RuntimeWSDLParser { this.extensionFacade = new WSDLParserExtensionFacade(this.extensions.toArray(new WSDLParserExtension[0])); } - private Parser resolveWSDL(@Nullable URL wsdlLoc, @NotNull Source wsdlSource) throws IOException, SAXException, XMLStreamException { - return resolveWSDL(wsdlLoc, wsdlSource, Service.class); - } - private Parser resolveWSDL(@Nullable URL wsdlLoc, @NotNull Source wsdlSource, Class serviceClass) throws IOException, SAXException, XMLStreamException { String systemId = wsdlSource.getSystemId(); @@ -369,22 +359,22 @@ public class RuntimeWSDLParser { } } } - if(parser == null){ - //If a WSDL source is provided that is known to be readable, then - //prioritize that over the URL - this avoids going over the network - //an additional time if a valid WSDL Source is provided - Deva Sagar 09/20/2011 - if (wsdlSource != null && isKnownReadableSource(wsdlSource)) { + if (parser == null) { + //If a WSDL source is provided that is known to be readable, then + //prioritize that over the URL - this avoids going over the network + //an additional time if a valid WSDL Source is provided - Deva Sagar 09/20/2011 + if (isKnownReadableSource(wsdlSource)) { parser = new Parser(wsdlLoc, createReader(wsdlSource)); - } else if (wsdlLoc != null) { - parser = new Parser(wsdlLoc, createReader(wsdlLoc, serviceClass)); - } + } else if (wsdlLoc != null) { + parser = new Parser(wsdlLoc, createReader(wsdlLoc, serviceClass)); + } - //parser could still be null if isKnownReadableSource returns - //false and wsdlLoc is also null. Fall back to using Source based - //parser since Source is not null - if (parser == null) { - parser = new Parser(wsdlLoc, createReader(wsdlSource)); - } + //parser could still be null if isKnownReadableSource returns + //false and wsdlLoc is also null. Fall back to using Source based + //parser since Source is not null + if (parser == null) { + parser = new Parser(wsdlLoc, createReader(wsdlSource)); + } } return parser; } @@ -568,7 +558,9 @@ public class RuntimeWSDLParser { while (XMLStreamReaderUtil.nextElementContent(reader) != XMLStreamConstants.END_ELEMENT) { QName name = reader.getName(); if (WSDLConstants.NS_SOAP_BINDING.equals(name)) { - binding.setBindingId(BindingID.SOAP11_HTTP); + String transport = reader.getAttributeValue(null, WSDLConstants.ATTR_TRANSPORT); + binding.setBindingId(createBindingId(transport, SOAPVersion.SOAP_11)); + String style = reader.getAttributeValue(null, "style"); if ((style != null) && (style.equals("rpc"))) { @@ -578,7 +570,9 @@ public class RuntimeWSDLParser { } goToEnd(reader); } else if (WSDLConstants.NS_SOAP12_BINDING.equals(name)) { - binding.setBindingId(BindingID.SOAP12_HTTP); + String transport = reader.getAttributeValue(null, WSDLConstants.ATTR_TRANSPORT); + binding.setBindingId(createBindingId(transport, SOAPVersion.SOAP_12)); + String style = reader.getAttributeValue(null, "style"); if ((style != null) && (style.equals("rpc"))) { binding.setStyle(Style.RPC); @@ -594,6 +588,18 @@ public class RuntimeWSDLParser { } } + private static BindingID createBindingId(String transport, SOAPVersion soapVersion) { + if (!transport.equals(SOAPConstants.URI_SOAP_TRANSPORT_HTTP)) { + for( BindingIDFactory f : ServiceFinder.find(BindingIDFactory.class) ) { + BindingID bindingId = f.create(transport, soapVersion); + if(bindingId!=null) { + return bindingId; + } + } + } + return soapVersion.equals(SOAPVersion.SOAP_11)?BindingID.SOAP11_HTTP:BindingID.SOAP12_HTTP; + } + private void parseBindingOperation(XMLStreamReader reader, WSDLBoundPortTypeImpl binding) { String bindingOpName = ParserUtil.getMandatoryNonEmptyAttribute(reader, "name"); @@ -913,7 +919,7 @@ public class RuntimeWSDLParser { QName descName = reader.getAttributeName(i); if (descName.getLocalPart().equals("element")) kind = WSDLDescriptorKind.ELEMENT; - else if (descName.getLocalPart().equals("TYPE")) + else if (descName.getLocalPart().equals("type")) kind = WSDLDescriptorKind.TYPE; if (descName.getLocalPart().equals("element") || descName.getLocalPart().equals("type")) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java index 379b4caf5ff..9451d8e1767 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/SOAPConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java index 8fba5330769..f1ccd79b427 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingMetadataWSDLParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java index 651ae0f62dd..f7de58d7a12 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/W3CAddressingWSDLParserExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java index 362c4c8a003..89149c49af2 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLConstants.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,49 +35,45 @@ import javax.xml.namespace.QName; */ public interface WSDLConstants { // namespace URIs - public static final String PREFIX_NS_WSDL = "wsdl"; - public static final String NS_XMLNS = "http://www.w3.org/2001/XMLSchema"; - public static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/"; - public static final String NS_SOAP11_HTTP_BINDING = "http://schemas.xmlsoap.org/soap/http"; + static final String PREFIX_NS_WSDL = "wsdl"; + static final String NS_XMLNS = "http://www.w3.org/2001/XMLSchema"; + static final String NS_WSDL = "http://schemas.xmlsoap.org/wsdl/"; + static final String NS_SOAP11_HTTP_BINDING = "http://schemas.xmlsoap.org/soap/http"; - public static final QName QNAME_SCHEMA = new QName(NS_XMLNS, "schema"); + static final QName QNAME_SCHEMA = new QName(NS_XMLNS, "schema"); // QNames - public static final QName QNAME_BINDING = new QName(NS_WSDL, "binding"); - public static final QName QNAME_DEFINITIONS = new QName(NS_WSDL, "definitions"); - public static final QName QNAME_DOCUMENTATION = new QName(NS_WSDL, "documentation"); - public static final QName NS_SOAP_BINDING_ADDRESS = new QName("http://schemas.xmlsoap.org/wsdl/soap/", - "address"); - public static final QName NS_SOAP_BINDING = new QName("http://schemas.xmlsoap.org/wsdl/soap/", - "binding"); - public static final QName NS_SOAP12_BINDING = new QName("http://schemas.xmlsoap.org/wsdl/soap12/", - "binding"); - public static final QName NS_SOAP12_BINDING_ADDRESS = new QName("http://schemas.xmlsoap.org/wsdl/soap12/", - "address"); + static final QName QNAME_BINDING = new QName(NS_WSDL, "binding"); + static final QName QNAME_DEFINITIONS = new QName(NS_WSDL, "definitions"); + static final QName QNAME_DOCUMENTATION = new QName(NS_WSDL, "documentation"); + static final QName NS_SOAP_BINDING_ADDRESS = new QName("http://schemas.xmlsoap.org/wsdl/soap/", "address"); + static final QName NS_SOAP_BINDING = new QName("http://schemas.xmlsoap.org/wsdl/soap/", "binding"); + static final QName NS_SOAP12_BINDING = new QName("http://schemas.xmlsoap.org/wsdl/soap12/", "binding"); + static final QName NS_SOAP12_BINDING_ADDRESS = new QName("http://schemas.xmlsoap.org/wsdl/soap12/", "address"); - //public static final QName QNAME_FAULT = new QName(NS_WSDL, "fault"); - public static final QName QNAME_IMPORT = new QName(NS_WSDL, "import"); + //static final QName QNAME_FAULT = new QName(NS_WSDL, "fault"); + static final QName QNAME_IMPORT = new QName(NS_WSDL, "import"); - //public static final QName QNAME_INPUT = new QName(NS_WSDL, "input"); - public static final QName QNAME_MESSAGE = new QName(NS_WSDL, "message"); - public static final QName QNAME_PART = new QName(NS_WSDL, "part"); - public static final QName QNAME_OPERATION = new QName(NS_WSDL, "operation"); - public static final QName QNAME_INPUT = new QName(NS_WSDL, "input"); - public static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output"); + //static final QName QNAME_INPUT = new QName(NS_WSDL, "input"); + static final QName QNAME_MESSAGE = new QName(NS_WSDL, "message"); + static final QName QNAME_PART = new QName(NS_WSDL, "part"); + static final QName QNAME_OPERATION = new QName(NS_WSDL, "operation"); + static final QName QNAME_INPUT = new QName(NS_WSDL, "input"); + static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output"); - //public static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output"); - //public static final QName QNAME_PART = new QName(NS_WSDL, "part"); - public static final QName QNAME_PORT = new QName(NS_WSDL, "port"); - public static final QName QNAME_ADDRESS = new QName(NS_WSDL, "address"); - public static final QName QNAME_PORT_TYPE = new QName(NS_WSDL, "portType"); - public static final QName QNAME_FAULT = new QName(NS_WSDL, "fault"); - public static final QName QNAME_SERVICE = new QName(NS_WSDL, "service"); - public static final QName QNAME_TYPES = new QName(NS_WSDL, "types"); + //static final QName QNAME_OUTPUT = new QName(NS_WSDL, "output"); + //static final QName QNAME_PART = new QName(NS_WSDL, "part"); + static final QName QNAME_PORT = new QName(NS_WSDL, "port"); + static final QName QNAME_ADDRESS = new QName(NS_WSDL, "address"); + static final QName QNAME_PORT_TYPE = new QName(NS_WSDL, "portType"); + static final QName QNAME_FAULT = new QName(NS_WSDL, "fault"); + static final QName QNAME_SERVICE = new QName(NS_WSDL, "service"); + static final QName QNAME_TYPES = new QName(NS_WSDL, "types"); - public static final String ATTR_TRANSPORT = "transport"; - public static final String ATTR_LOCATION = "location"; - public static final String ATTR_NAME = "name"; - public static final String ATTR_TNS = "targetNamespace"; + static final String ATTR_TRANSPORT = "transport"; + static final String ATTR_LOCATION = "location"; + static final String ATTR_NAME = "name"; + static final String ATTR_TNS = "targetNamespace"; - //public static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_WSDL, "arrayType"); + //static final QName QNAME_ATTR_ARRAY_TYPE = new QName(NS_WSDL, "arrayType"); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java index f006399824c..a8b2550e867 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionContextImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java index c16d7b2d94c..d55bf52761c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/parser/WSDLParserExtensionFacade.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java index ea6cfec9d16..7c65dca1b44 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/DocumentLocationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java index 8f4eda8d302..bad5a68124c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/TXWContentHandler.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -64,7 +64,10 @@ public class TXWContentHandler implements ContentHandler { for(int i = 0; i < atts.getLength(); i++) { String auri = atts.getURI(i); if ("http://www.w3.org/2000/xmlns/".equals(auri)) { - txw._namespace(atts.getValue(i),atts.getLocalName(i)); + if ("xmlns".equals(atts.getLocalName(i))) + txw._namespace(atts.getValue(i), ""); + else + txw._namespace(atts.getValue(i),atts.getLocalName(i)); } else { if ("schemaLocation".equals(atts.getLocalName(i)) && "".equals(atts.getValue(i))) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java index da26ae473f4..2ca83677c30 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/UsingAddressing.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java index 68e4c1a35da..43d495bb00f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingMetadataWSDLGeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java index ab66b0950e4..f57ec72b612 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/W3CAddressingWSDLGeneratorExtension.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,7 +69,10 @@ public class W3CAddressingWSDLGeneratorExtension extends WSDLGeneratorExtension if (a != null && !a.input().equals("")) { addAttribute(input, a.input()); } else { - if (method.getBinding().getSOAPAction().equals("")) { + + String soapAction = method.getBinding().getSOAPAction(); + // in SOAP 1.2 soapAction is optional ... + if (soapAction == null || soapAction.equals("")) { //hack: generate default action for interop with .Net3.0 when soapAction is non-empty String defaultAction = getDefaultAction(method); addAttribute(input, defaultAction); @@ -143,7 +146,7 @@ public class W3CAddressingWSDLGeneratorExtension extends WSDLGeneratorExtension public void addBindingExtension(TypedXmlWriter binding) { if (!enabled) return; - UsingAddressing ua = binding._element(AddressingVersion.W3C.wsdlExtensionTag, UsingAddressing.class); + binding._element(AddressingVersion.W3C.wsdlExtensionTag, UsingAddressing.class); /* Do not generate wsdl:required=true if(required) { diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java index 417f9c9016f..8dc3a356bf0 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGenerator.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,6 +28,8 @@ package com.sun.xml.internal.ws.wsdl.writer; import static com.sun.xml.internal.bind.v2.schemagen.Util.*; +import com.oracle.webservices.internal.api.databinding.WSDLResolver; + import com.sun.xml.internal.txw2.TXW; import com.sun.xml.internal.txw2.TypedXmlWriter; import com.sun.xml.internal.txw2.output.ResultFactory; @@ -48,6 +50,7 @@ import com.sun.xml.internal.ws.model.CheckedExceptionImpl; import com.sun.xml.internal.ws.model.JavaMethodImpl; import com.sun.xml.internal.ws.model.ParameterImpl; import com.sun.xml.internal.ws.model.WrapperParameter; +import com.sun.xml.internal.ws.util.xml.XmlUtil; import com.sun.xml.internal.ws.wsdl.parser.SOAPConstants; import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants; import com.sun.xml.internal.ws.wsdl.writer.document.Binding; @@ -68,11 +71,18 @@ import com.sun.xml.internal.ws.wsdl.writer.document.soap.BodyType; import com.sun.xml.internal.ws.wsdl.writer.document.soap.Header; import com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPAddress; import com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPFault; +import com.sun.xml.internal.ws.wsdl.writer.document.xsd.Schema; import com.sun.xml.internal.ws.spi.db.BindingContext; import com.sun.xml.internal.ws.spi.db.BindingHelper; +import com.sun.xml.internal.ws.spi.db.TypeInfo; +import com.sun.xml.internal.ws.spi.db.WrapperComposite; import com.sun.xml.internal.ws.util.RuntimeVersion; import com.sun.xml.internal.ws.policy.jaxws.PolicyWSDLGeneratorExtension; import com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants; +import com.sun.xml.internal.bind.v2.schemagen.xmlschema.Element; +import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ComplexType; +import com.sun.xml.internal.bind.v2.schemagen.xmlschema.ExplicitGroup; +import com.sun.xml.internal.bind.v2.schemagen.xmlschema.LocalElement; import javax.jws.soap.SOAPBinding.Style; import javax.jws.soap.SOAPBinding.Use; @@ -95,6 +105,7 @@ import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -198,6 +209,7 @@ public class WSDLGenerator { private final Class implType; private boolean inlineSchemas; // TODO + private final boolean disableSecureXmlProcessing; /** * Creates the WSDLGenerator @@ -209,6 +221,22 @@ public class WSDLGenerator { */ public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, Class implType, boolean inlineSchemas, WSDLGeneratorExtension... extensions) { + this(model, wsdlResolver, binding, container, implType, inlineSchemas, false, extensions); + } + + /** + * Creates the WSDLGenerator + * @param model The {@link AbstractSEIModelImpl} used to generate the WSDL + * @param wsdlResolver The {@link WSDLResolver} to use resovle names while generating the WSDL + * @param binding specifies which {@link javax.xml.ws.BindingType} to generate + * @param disableSecureXmlProcessing specifies whether to disable the secure xml processing feature + * @param extensions an array {@link WSDLGeneratorExtension} that will + * be invoked to generate WSDL extensions + */ + public WSDLGenerator(AbstractSEIModelImpl model, WSDLResolver wsdlResolver, WSBinding binding, Container container, + Class implType, boolean inlineSchemas, boolean disableSecureXmlProcessing, + WSDLGeneratorExtension... extensions) { + this.model = model; resolver = new JAXWSOutputSchemaResolver(); this.wsdlResolver = wsdlResolver; @@ -217,6 +245,7 @@ public class WSDLGenerator { this.implType = implType; extensionHandlers = new ArrayList(); this.inlineSchemas = inlineSchemas; + this.disableSecureXmlProcessing = disableSecureXmlProcessing; // register handlers for default extensions register(new W3CAddressingWSDLGeneratorExtension()); @@ -306,48 +335,59 @@ public class WSDLGenerator { this.serializer = serializer; } + @Override public void startDocument() { serializer.startDocument(); comment(new StringBuilder(VERSION_COMMENT)); text(new StringBuilder("\n")); } + @Override public void beginStartTag(String uri, String localName, String prefix) { serializer.beginStartTag(uri, localName, prefix); } + @Override public void writeAttribute(String uri, String localName, String prefix, StringBuilder value) { serializer.writeAttribute(uri, localName, prefix, value); } + @Override public void writeXmlns(String prefix, String uri) { serializer.writeXmlns(prefix, uri); } + @Override public void endStartTag(String uri, String localName, String prefix) { serializer.endStartTag(uri, localName, prefix); } + @Override public void endTag() { serializer.endTag(); } + @Override public void text(StringBuilder text) { serializer.text(text); } + @Override public void cdata(StringBuilder text) { serializer.cdata(text); } + @Override public void comment(StringBuilder comment) { serializer.comment(comment); } + @Override public void endDocument() { serializer.endDocument(); } + @Override public void flush() { serializer.flush(); } @@ -419,12 +459,11 @@ public class WSDLGenerator { model.getBindingContext().generateSchema(resolver); } catch (IOException e) { // TODO locallize and wrap this - e.printStackTrace(); throw new WebServiceException(e.getMessage()); } } if (resolver.nonGlassfishSchemas != null) { - TransformerFactory tf = TransformerFactory.newInstance(); + TransformerFactory tf = XmlUtil.newTransformerFactory(!disableSecureXmlProcessing); try { Transformer t = tf.newTransformer(); for (DOMResult xsd : resolver.nonGlassfishSchemas) { @@ -433,13 +472,69 @@ public class WSDLGenerator { t.transform(new DOMSource(doc.getDocumentElement()), sax); } } catch (TransformerConfigurationException e) { - e.printStackTrace(); throw new WebServiceException(e.getMessage(), e); } catch (TransformerException e) { - e.printStackTrace(); throw new WebServiceException(e.getMessage(), e); } } + generateWrappers(); + } + + void generateWrappers() { + List wrappers = new ArrayList(); + for (JavaMethodImpl method : model.getJavaMethods()) { + if(method.getBinding().isRpcLit()) continue; + for (ParameterImpl p : method.getRequestParameters()) { + if (p instanceof WrapperParameter) { + if (WrapperComposite.class.equals((((WrapperParameter)p).getTypeInfo().type))) { + wrappers.add((WrapperParameter)p); + } + } + } + for (ParameterImpl p : method.getResponseParameters()) { + if (p instanceof WrapperParameter) { + if (WrapperComposite.class.equals((((WrapperParameter)p).getTypeInfo().type))) { + wrappers.add((WrapperParameter)p); + } + } + } + } + if (wrappers.isEmpty()) return; + HashMap xsds = new HashMap(); + for(WrapperParameter wp : wrappers) { + String tns = wp.getName().getNamespaceURI(); + Schema xsd = xsds.get(tns); + if (xsd == null) { + xsd = types.schema(); + xsd.targetNamespace(tns); + xsds.put(tns, xsd); + } + Element e = xsd._element(Element.class); + e._attribute("name", wp.getName().getLocalPart()); + e.type(wp.getName()); + ComplexType ct = xsd._element(ComplexType.class); + ct._attribute("name", wp.getName().getLocalPart()); + ExplicitGroup sq = ct.sequence(); + for (ParameterImpl p : wp.getWrapperChildren() ) { + if (p.getBinding().isBody()) { + LocalElement le = sq.element(); + le._attribute("name", p.getName().getLocalPart()); + TypeInfo typeInfo = p.getItemType(); + boolean repeatedElement = false; + if (typeInfo == null) { + typeInfo = p.getTypeInfo(); + } else { + repeatedElement = true; + } + QName type = model.getBindingContext().getTypeName(typeInfo); + le.type(type); + if (repeatedElement) { + le.minOccurs(0); + le.maxOccurs("unbounded"); + } + } + } + } } /** @@ -484,15 +579,8 @@ public class WSDLGenerator { } } if (method.getMEP() != MEP.ONE_WAY) { -// message = portDefinitions.message().name(method.getOperation().getName().getLocalPart()+RESPONSE); message = portDefinitions.message().name(method.getResponseMessageName()); extension.addOutputMessageExtension(message, method); - if (unwrappable) { - for (ParameterImpl param : method.getResponseParameters()) { - if (isHeaderParameter(param)) - unwrappable = false; - } - } for (ParameterImpl param : method.getResponseParameters()) { if (isDoclit) { @@ -548,6 +636,8 @@ public class WSDLGenerator { case ONE_WAY: generateInputMessage(operation, method); break; + default: + break; } // faults for (CheckedExceptionImpl exception : method.getCheckedExceptions()) { @@ -601,7 +691,7 @@ public class WSDLGenerator { */ protected void generateRpcParameterOrder(Operation operation, JavaMethodImpl method) { String partName; - StringBuffer paramOrder = new StringBuffer(); + StringBuilder paramOrder = new StringBuilder(); Set partNames = new HashSet(); List sortedParams = sortMethodParameters(method); int i = 0; @@ -629,10 +719,10 @@ public class WSDLGenerator { */ protected void generateDocumentParameterOrder(Operation operation, JavaMethodImpl method) { String partName; - StringBuffer paramOrder = new StringBuffer(); + StringBuilder paramOrder = new StringBuilder(); Set partNames = new HashSet(); List sortedParams = sortMethodParameters(method); - boolean isWrapperStyle = isWrapperStyle(method); +// boolean isWrapperStyle = isWrapperStyle(method); int i = 0; for (ParameterImpl parameter : sortedParams) { // System.out.println("param: "+parameter.getIndex()+" name: "+parameter.getName().getLocalPart()); @@ -697,7 +787,7 @@ public class WSDLGenerator { paramSet.addAll(method.getResponseParameters()); } Iterator params = paramSet.iterator(); - if (paramSet.size() == 0) + if (paramSet.isEmpty()) return sortedParams; ParameterImpl param = params.next(); sortedParams.add(param); @@ -744,23 +834,23 @@ public class WSDLGenerator { * Generates the Binding section of the WSDL */ protected void generateBinding() { - Binding binding = serviceDefinitions.binding().name(model.getBoundPortTypeName().getLocalPart()); - extension.addBindingExtension(binding); - binding.type(model.getPortTypeName()); + Binding newBinding = serviceDefinitions.binding().name(model.getBoundPortTypeName().getLocalPart()); + extension.addBindingExtension(newBinding); + newBinding.type(model.getPortTypeName()); boolean first = true; for (JavaMethodImpl method : model.getJavaMethods()) { if (first) { SOAPBinding sBinding = method.getBinding(); SOAPVersion soapVersion = sBinding.getSOAPVersion(); if (soapVersion == SOAPVersion.SOAP_12) { - com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = binding.soap12Binding(); + com.sun.xml.internal.ws.wsdl.writer.document.soap12.SOAPBinding soapBinding = newBinding.soap12Binding(); soapBinding.transport(this.binding.getBindingId().getTransport()); if (sBinding.getStyle().equals(Style.DOCUMENT)) soapBinding.style(DOCUMENT); else soapBinding.style(RPC); } else { - com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = binding.soapBinding(); + com.sun.xml.internal.ws.wsdl.writer.document.soap.SOAPBinding soapBinding = newBinding.soapBinding(); soapBinding.transport(this.binding.getBindingId().getTransport()); if (sBinding.getStyle().equals(Style.DOCUMENT)) soapBinding.style(DOCUMENT); @@ -770,9 +860,9 @@ public class WSDLGenerator { first = false; } if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12) - generateSOAP12BindingOperation(method, binding); + generateSOAP12BindingOperation(method, newBinding); else - generateBindingOperation(method, binding); + generateBindingOperation(method, newBinding); } } @@ -798,7 +888,7 @@ public class WSDLGenerator { if (bodyParams.size() > 0) { ParameterImpl param = bodyParams.iterator().next(); if (isRpc) { - StringBuffer parts = new StringBuffer(); + StringBuilder parts = new StringBuilder(); int i = 0; for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) { if (i++ > 0) @@ -823,34 +913,33 @@ public class WSDLGenerator { } if (method.getMEP() != MEP.ONE_WAY) { - boolean unwrappable = headerParams.size() == 0; // output bodyParams.clear(); headerParams.clear(); splitParameters(bodyParams, headerParams, method.getResponseParameters()); - unwrappable = unwrappable ? headerParams.size() == 0 : unwrappable; TypedXmlWriter output = operation.output(); extension.addBindingOperationOutputExtension(output, method); body = output._element(Body.class); body.use(LITERAL); if (headerParams.size() > 0) { - String parts = ""; + StringBuilder parts = new StringBuilder(); if (bodyParams.size() > 0) { ParameterImpl param = bodyParams.iterator().hasNext() ? bodyParams.iterator().next() : null; if (param != null) { if (isRpc) { int i = 0; for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) { - if (i++ > 0) - parts += " "; - parts += parameter.getPartName(); + if (i++ > 0) { + parts.append(" "); + } + parts.append(parameter.getPartName()); } } else { - parts = param.getPartName(); + parts = new StringBuilder(param.getPartName()); } } } - body.parts(parts); + body.parts(parts.toString()); QName responseMessage = new QName(targetNamespace, method.getResponseMessageName()); generateSOAPHeaders(output, headerParams, responseMessage); } @@ -892,7 +981,7 @@ public class WSDLGenerator { if (bodyParams.size() > 0) { ParameterImpl param = bodyParams.iterator().next(); if (isRpc) { - StringBuffer parts = new StringBuffer(); + StringBuilder parts = new StringBuilder(); int i = 0; for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) { if (i++ > 0) @@ -918,11 +1007,9 @@ public class WSDLGenerator { if (method.getMEP() != MEP.ONE_WAY) { // output - boolean unwrappable = headerParams.size() == 0; bodyParams.clear(); headerParams.clear(); splitParameters(bodyParams, headerParams, method.getResponseParameters()); - unwrappable = unwrappable ? headerParams.size() == 0 : unwrappable; TypedXmlWriter output = operation.output(); extension.addBindingOperationOutputExtension(output, method); body = output._element(com.sun.xml.internal.ws.wsdl.writer.document.soap12.Body.class); @@ -931,14 +1018,15 @@ public class WSDLGenerator { if (bodyParams.size() > 0) { ParameterImpl param = bodyParams.iterator().next(); if (isRpc) { - String parts = ""; + StringBuilder parts = new StringBuilder(); int i = 0; for (ParameterImpl parameter : ((WrapperParameter) param).getWrapperChildren()) { - if (i++ > 0) - parts += " "; - parts += parameter.getPartName(); + if (i++ > 0) { + parts.append(" "); + } + parts.append(parameter.getPartName()); } - body.parts(parts); + body.parts(parts.toString()); } else { body.parts(param.getPartName()); } @@ -1003,7 +1091,7 @@ public class WSDLGenerator { Port port = service.port().name(portQName.getLocalPart()); port.binding(model.getBoundPortTypeName()); extension.addPortExtension(port); - if (model.getJavaMethods().size() == 0) + if (model.getJavaMethods().isEmpty()) return; if (this.binding.getBindingId().getSOAPVersion() == SOAPVersion.SOAP_12) { @@ -1133,7 +1221,7 @@ public class WSDLGenerator { if (relPath == null) return uri; // recursion found no commonality in the two uris at all - StringBuffer relUri = new StringBuffer(); + StringBuilder relUri = new StringBuilder(); relUri.append(relPath); if (theUri.getQuery() != null) relUri.append('?').append(theUri.getQuery()); @@ -1172,6 +1260,7 @@ public class WSDLGenerator { * @return the {@link Result} for JAXB to generate the schema into * @throws java.io.IOException thrown if on IO error occurs */ + @Override public Result createOutput(String namespaceUri, String suggestedFileName) throws IOException { return inlineSchemas ? ((nonGlassfishSchemas != null) ? nonGlassfishSchemaResult(namespaceUri, suggestedFileName) : createInlineSchema(namespaceUri, suggestedFileName)) diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java index 6f0694138b7..ce6a1c49b9b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLGeneratorExtensionFacade.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java index 12d3699ae6b..8e3e5f2f91d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLPatcher.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -30,6 +30,7 @@ import com.sun.xml.internal.ws.api.server.PortAddressResolver; import com.sun.xml.internal.ws.util.xml.XMLStreamReaderToXMLStreamWriter; import com.sun.xml.internal.ws.wsdl.parser.WSDLConstants; import com.sun.xml.internal.ws.addressing.W3CAddressingConstants; +import com.sun.xml.internal.ws.addressing.v200408.MemberSubmissionAddressingConstants; import com.sun.istack.internal.Nullable; import javax.xml.namespace.QName; @@ -158,11 +159,13 @@ public final class WSDLPatcher extends XMLStreamReaderToXMLStreamWriter { if (value != null) { portName = new QName(targetNamespace,value); } - } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)) { + } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME) + || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) { if (serviceName != null && portName != null) { inEpr = true; } - } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)) { + } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME) + || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) { if (inEpr) { inEprAddress = true; } @@ -177,12 +180,14 @@ public final class WSDLPatcher extends XMLStreamReaderToXMLStreamWriter { serviceName = null; } else if (name.equals(WSDLConstants.QNAME_PORT)) { portName = null; - } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME)) { + } else if (name.equals(W3CAddressingConstants.WSA_EPR_QNAME) + || name.equals(MemberSubmissionAddressingConstants.WSA_EPR_QNAME)) { if (inEpr) { inEpr = false; } - } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME)) { - if (inEprAddress) { + } else if (name.equals(W3CAddressingConstants.WSA_ADDRESS_QNAME) + || name.equals(MemberSubmissionAddressingConstants.WSA_ADDRESS_QNAME)) { + if (inEprAddress) { String value = getAddressLocation(); if (value != null) { logger.fine("Fixing EPR Address for service:"+serviceName+ " port:"+portName diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java index 79fa6f0b8c4..843681c779a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/WSDLResolver.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,52 +25,10 @@ package com.sun.xml.internal.ws.wsdl.writer; -import com.sun.istack.internal.NotNull; -import com.sun.istack.internal.Nullable; -import javax.xml.transform.Result; -import javax.xml.ws.Holder; - - /** - * WSDLResolver is used by WSDLGenerator while generating WSDL and its associated - * documents. It is used to control what documents need to be generated and what - * documents need to be picked from metadata. If endpont's document metadata - * already contains some documents, their systemids may be used for wsdl:import, - * and schema:import. The suggested filenames are relative urls(for e.g: EchoSchema1.xsd) - * The Result object systemids are also relative urls(for e.g: AbsWsdl.wsdl). + * @deprecated Use com.oracle.webservices.internal.api.databinding.WSDLResolver directly * - * @author Jitendra Kotamraju */ -public interface WSDLResolver { - /** - * Create a Result object into which concrete WSDL is to be generated. - * - * @return Result for the concrete WSDL - */ - public @NotNull Result getWSDL(@NotNull String suggestedFilename); - - /** - * Create a Result object into which abstract WSDL is to be generated. If the the - * abstract WSDL is already in metadata, it is not generated. - * - * Update filename if the suggested filename need to be changed in wsdl:import. - * This needs to be done if the metadata contains abstract WSDL, and that systemid - * needs to be reflected in concrete WSDL's wsdl:import - * - * @return null if abstract WSDL need not be generated - */ - public @Nullable Result getAbstractWSDL(@NotNull Holder filename); - - /** - * Create a Result object into which schema doc is to be generated. Typically if - * there is a schema doc for namespace in metadata, then it is not generated. - * - * Update filename if the suggested filename need to be changed in xsd:import. This - * needs to be done if the metadata contains the document, and that systemid - * needs to be reflected in some other document's xsd:import - * - * @return null if schema need not be generated - */ - public @Nullable Result getSchemaOutput(@NotNull String namespace, @NotNull Holder filename); +public interface WSDLResolver extends com.oracle.webservices.internal.api.databinding.WSDLResolver { } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java index d193772ea8a..ca9a4e1b4e5 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Binding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java index bbb5e0d61ad..97080a3670a 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/BindingOperationType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java index 71837d68b84..1487158ebfc 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Definitions.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java index abeaa9faf96..b4b979f9fde 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Documented.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java index edc607b671c..173d675ba18 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Fault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java index 241e46e111b..3be28e55ae4 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/FaultType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java index 4608045e7f4..6ba1199e09b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Import.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java index 5b6fc0598a2..09dfa260956 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Message.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java index 32ca5be9b4c..239712d3c90 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/OpenAtts.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java index adae8a08fdc..a3a13739313 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Operation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java index 4cbcbe6cd14..ed1f2e5a427 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/ParamType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java index 862832d76ad..d3db2c5b35b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Part.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java index 7517418e822..0792cfb1817 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Port.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java index c6cf5f01cc3..270fe2df627 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/PortType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java index cf77c0f64c8..fb649c1c2aa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Service.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java index a54a72bc55f..5460a921f2e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/StartWithExtensionsType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java index 6230eadb3f1..7e311ac6843 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/Types.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java index dc9f9db9997..ed650fdd787 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Address.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java index 319cc8387f5..3c7a12adabf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Binding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java index d384d5d0517..19644956e50 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/Operation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java index 866cbbdf802..cb7a3f0c7c1 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/http/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java index b9fb8bd5dfc..51daf4ba178 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java index 9ade5ad51d8..f6c1a02303e 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Body.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java index 8c7ccb2ea4c..5f96b50b273 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/BodyType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java index 74241faccf0..dfebcc2ccd6 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/Header.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java index f5bab188658..5d0a1d0e66f 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/HeaderFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java index bf82955977c..a1fbb78c75b 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java index 8130fbcb67e..5554026394d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java index 7377c5aa709..434f8f8923c 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java index 532ced944da..a0ce1b221f3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/SOAPOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java index 2d44785bb2c..d837c383b71 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java index d8f54f3c6c6..47f71756912 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Body.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java index 1831b6d3566..3be46479ad3 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/BodyType.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java index db812975af5..fd03ced5abb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/Header.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java index 124fdf727bb..2e64b708d8d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java index 98fc16b8bb1..ab80acc52fb 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPAddress.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java index 886156bc3a7..3ad8bc72dfa 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPBinding.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java index 223ed41d349..da3f0377ddf 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPFault.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java index fcbcc7ab6b6..717bb76ce16 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/SOAPOperation.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java index f28929aa676..b6d5c9365e9 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/soap12/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java index 5138fc88dd5..5e8db221a26 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Import.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java index 4e28e968ea2..739ffc28040 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/Schema.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,7 +28,6 @@ package com.sun.xml.internal.ws.wsdl.writer.document.xsd; import com.sun.xml.internal.txw2.TypedXmlWriter; import com.sun.xml.internal.txw2.annotation.XmlAttribute; import com.sun.xml.internal.txw2.annotation.XmlElement; -import com.sun.xml.internal.ws.wsdl.writer.document.Documented; import com.sun.xml.internal.ws.wsdl.writer.document.*; /** @@ -43,4 +42,7 @@ public interface Schema @XmlElement("import") public Import _import(); + + @XmlAttribute + public com.sun.xml.internal.ws.wsdl.writer.document.xsd.Schema targetNamespace(String value); } diff --git a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java index 5214d4b6365..a804e8d546d 100644 --- a/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java +++ b/jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/wsdl/writer/document/xsd/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java b/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java index 440d86c5ef6..f9d34e4a398 100644 --- a/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java +++ b/jaxws/src/share/jaxws_classes/javax/annotation/Generated.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -34,14 +34,14 @@ import static java.lang.annotation.RetentionPolicy.*; * in a single file. When used, the value element must have the name of the * code generator. The recommended convention is to use the fully qualified * name of the code generator in the value field . - * For example: com.company.package.classname. + *

      For example: com.company.package.classname. * The date element is used to indicate the date the source was generated. * The date element must follow the ISO 8601 standard. For example the date * element would have the following value 2001-07-04T12:08:56.235-0700 * which represents 2001-07-04 12:08:56 local time in the U.S. Pacific - * Time time zone. - * The comment element is a place holder for any comments that the code - * generator may want to include in the generated code. + * Time time zone.

      + *

      The comment element is a place holder for any comments that the code + * generator may want to include in the generated code.

      * * @since Common Annotations 1.0 */ diff --git a/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java b/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java index af4366f6952..7478d2adc87 100644 --- a/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java +++ b/jaxws/src/share/jaxws_classes/javax/annotation/PostConstruct.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -38,19 +38,19 @@ import static java.lang.annotation.RetentionPolicy.*; * if the class does not request any resources to be injected. Only one * method can be annotated with this annotation. The method on which the * PostConstruct annotation is applied MUST fulfill all of the following - * criteria - -- The method MUST NOT have any parameters except in the case of EJB - * interceptors in which case it takes an InvocationC ontext object as - * defined by the EJB specification. - * - The return type of the method MUST be void. - * - The method MUST NOT throw a checked exception. - * - The method on which PostConstruct is applied MAY be public, protected, - * package private or private. - * - The method MUST NOT be static except for the application client. - * - The method MAY be final. - * - If the method throws an unchecked exception the class MUST NOT be put into + * criteria:
        + *
      • The method MUST NOT have any parameters except in the case of EJB + * interceptors in which case it takes an InvocationContext object as + * defined by the EJB specification.
      • + *
      • The return type of the method MUST be void.
      • + *
      • The method MUST NOT throw a checked exception.
      • + *
      • The method on which PostConstruct is applied MAY be public, protected, + * package private or private.
      • + *
      • The method MUST NOT be static except for the application client.
      • + *
      • The method MAY be final.
      • + *
      • If the method throws an unchecked exception the class MUST NOT be put into * service except in the case of EJBs where the EJB can handle exceptions and - * even recover from them. + * even recover from them.
      * @since Common Annotations 1.0 * @see javax.annotation.PreDestroy * @see javax.annotation.Resource diff --git a/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java b/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java index b71859e3630..1c5c4df6e47 100644 --- a/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java +++ b/jaxws/src/share/jaxws_classes/javax/annotation/PreDestroy.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -37,18 +37,18 @@ import static java.lang.annotation.RetentionPolicy.*; * supported by all container managed objects that support PostConstruct * except the application client container in Java EE 5. The method on which * the PreDestroy annotation is applied MUST fulfill all of the following - * criteria - - * - The method MUST NOT have any parameters except in the case of EJB + * criteria:

      + * + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_LOCAL_DATE; static { ISO_LOCAL_DATE = new DateTimeFormatterBuilder() - .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) - .appendLiteral('-') - .appendValue(MONTH_OF_YEAR, 2) - .appendLiteral('-') - .appendValue(DAY_OF_MONTH, 2) - .toFormatter(); + .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) + .appendLiteral('-') + .appendValue(MONTH_OF_YEAR, 2) + .appendLiteral('-') + .appendValue(DAY_OF_MONTH, 2) + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date with an offset, - * such as '2011-12-03+01:00'. + * The ISO date formatter that formats or parses a date with an + * offset, such as '2011-12-03+01:00'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset date format. @@ -444,20 +665,24 @@ public final class DateTimeFormatter { *

    4. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_OFFSET_DATE; static { ISO_OFFSET_DATE = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .append(ISO_LOCAL_DATE) - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .append(ISO_LOCAL_DATE) + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date with the + * The ISO date formatter that formats or parses a date with the * offset if available, such as '2011-12-03' or '2011-12-03+01:00'. *

      * This returns an immutable formatter capable of formatting and parsing @@ -469,25 +694,29 @@ public final class DateTimeFormatter { *

    5. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * *

      * As this formatter has an optional element, it may be necessary to parse using * {@link DateTimeFormatter#parseBest}. + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_DATE; static { ISO_DATE = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .append(ISO_LOCAL_DATE) - .optionalStart() - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .append(ISO_LOCAL_DATE) + .optionalStart() + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO time formatter that formats or parses a time without an offset, - * such as '10:15' or '10:15:30'. + * The ISO time formatter that formats or parses a time without an + * offset, such as '10:15' or '10:15:30'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended local time format. @@ -506,26 +735,29 @@ public final class DateTimeFormatter { *

    6. A decimal point *
    7. One to nine digits for the {@link ChronoField#NANO_OF_SECOND nano-of-second}. * As many digits will be output as required. - *

      + * + *

      + * The returned formatter has no override chronology or zone. + * It uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_LOCAL_TIME; static { ISO_LOCAL_TIME = new DateTimeFormatterBuilder() - .appendValue(HOUR_OF_DAY, 2) - .appendLiteral(':') - .appendValue(MINUTE_OF_HOUR, 2) - .optionalStart() - .appendLiteral(':') - .appendValue(SECOND_OF_MINUTE, 2) - .optionalStart() - .appendFraction(NANO_OF_SECOND, 0, 9, true) - .toFormatter(); + .appendValue(HOUR_OF_DAY, 2) + .appendLiteral(':') + .appendValue(MINUTE_OF_HOUR, 2) + .optionalStart() + .appendLiteral(':') + .appendValue(SECOND_OF_MINUTE, 2) + .optionalStart() + .appendFraction(NANO_OF_SECOND, 0, 9, true) + .toFormatter(ResolverStyle.STRICT, null); } //----------------------------------------------------------------------- /** - * Returns the ISO time formatter that formats or parses a time with an offset, - * such as '10:15+01:00' or '10:15:30+01:00'. + * The ISO time formatter that formats or parses a time with an + * offset, such as '10:15+01:00' or '10:15:30+01:00'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset time format. @@ -535,20 +767,23 @@ public final class DateTimeFormatter { *

    8. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * + *

      + * The returned formatter has no override chronology or zone. + * It uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_OFFSET_TIME; static { ISO_OFFSET_TIME = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .append(ISO_LOCAL_TIME) - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .append(ISO_LOCAL_TIME) + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, null); } //----------------------------------------------------------------------- /** - * Returns the ISO time formatter that formats or parses a time, with the + * The ISO time formatter that formats or parses a time, with the * offset if available, such as '10:15', '10:15:30' or '10:15:30+01:00'. *

      * This returns an immutable formatter capable of formatting and parsing @@ -560,25 +795,28 @@ public final class DateTimeFormatter { *

    9. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * *

      * As this formatter has an optional element, it may be necessary to parse using * {@link DateTimeFormatter#parseBest}. + *

      + * The returned formatter has no override chronology or zone. + * It uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_TIME; static { ISO_TIME = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .append(ISO_LOCAL_TIME) - .optionalStart() - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .append(ISO_LOCAL_TIME) + .optionalStart() + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, null); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date-time - * without an offset, such as '2011-12-03T10:15:30'. + * The ISO date-time formatter that formats or parses a date-time without + * an offset, such as '2011-12-03T10:15:30'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset date-time format. @@ -587,22 +825,26 @@ public final class DateTimeFormatter { *

    10. The {@link #ISO_LOCAL_DATE} *
    11. The letter 'T'. Parsing is case insensitive. *
    12. The {@link #ISO_LOCAL_TIME} - *

      + * + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_LOCAL_DATE_TIME; static { ISO_LOCAL_DATE_TIME = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .append(ISO_LOCAL_DATE) - .appendLiteral('T') - .append(ISO_LOCAL_TIME) - .toFormatter(); + .parseCaseInsensitive() + .append(ISO_LOCAL_DATE) + .appendLiteral('T') + .append(ISO_LOCAL_TIME) + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date-time - * with an offset, such as '2011-12-03T10:15:30+01:00'. + * The ISO date-time formatter that formats or parses a date-time with an + * offset, such as '2011-12-03T10:15:30+01:00'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 extended offset date-time format. @@ -612,25 +854,30 @@ public final class DateTimeFormatter { *

    13. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_OFFSET_DATE_TIME; static { ISO_OFFSET_DATE_TIME = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .append(ISO_LOCAL_DATE_TIME) - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .append(ISO_LOCAL_DATE_TIME) + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date-time with + * The ISO-like date-time formatter that formats or parses a date-time with * offset and zone, such as '2011-12-03T10:15:30+01:00[Europe/Paris]'. *

      * This returns an immutable formatter capable of formatting and parsing * a format that extends the ISO-8601 extended offset date-time format * to add the time-zone. + * The section in square brackets is not part of the ISO-8601 standard. * The format consists of: *

        *
      • The {@link #ISO_OFFSET_DATE_TIME} @@ -639,28 +886,33 @@ public final class DateTimeFormatter { *
      • The {@link ZoneId#getId() zone ID}. This is not part of the ISO-8601 standard. * Parsing is case sensitive. *
      • A close square bracket ']'. - *

      + * + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_ZONED_DATE_TIME; static { ISO_ZONED_DATE_TIME = new DateTimeFormatterBuilder() - .append(ISO_OFFSET_DATE_TIME) - .optionalStart() - .appendLiteral('[') - .parseCaseSensitive() - .appendZoneRegionId() - .appendLiteral(']') - .toFormatter(); + .append(ISO_OFFSET_DATE_TIME) + .optionalStart() + .appendLiteral('[') + .parseCaseSensitive() + .appendZoneRegionId() + .appendLiteral(']') + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date-time - * with the offset and zone if available, such as '2011-12-03T10:15:30', + * The ISO-like date-time formatter that formats or parses a date-time with + * the offset and zone if available, such as '2011-12-03T10:15:30', * '2011-12-03T10:15:30+01:00' or '2011-12-03T10:15:30+01:00[Europe/Paris]'. *

      * This returns an immutable formatter capable of formatting and parsing - * the ISO-8601 extended offset date-time format. + * the ISO-8601 extended local or offset date-time format, as well as the + * extended non-ISO form specifying the time-zone. * The format consists of: *

        *
      • The {@link #ISO_LOCAL_DATE_TIME} @@ -672,28 +924,32 @@ public final class DateTimeFormatter { *
      • The {@link ZoneId#getId() zone ID}. This is not part of the ISO-8601 standard. * Parsing is case sensitive. *
      • A close square bracket ']'. - *

      + * *

      * As this formatter has an optional element, it may be necessary to parse using * {@link DateTimeFormatter#parseBest}. + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_DATE_TIME; static { ISO_DATE_TIME = new DateTimeFormatterBuilder() - .append(ISO_LOCAL_DATE_TIME) - .optionalStart() - .appendOffsetId() - .optionalStart() - .appendLiteral('[') - .parseCaseSensitive() - .appendZoneRegionId() - .appendLiteral(']') - .toFormatter(); + .append(ISO_LOCAL_DATE_TIME) + .optionalStart() + .appendOffsetId() + .optionalStart() + .appendLiteral('[') + .parseCaseSensitive() + .appendZoneRegionId() + .appendLiteral(']') + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses the ordinal date + * The ISO date formatter that formats or parses the ordinal date * without an offset, such as '2012-337'. *

      * This returns an immutable formatter capable of formatting and parsing @@ -710,26 +966,30 @@ public final class DateTimeFormatter { *

    14. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * *

      * As this formatter has an optional element, it may be necessary to parse using * {@link DateTimeFormatter#parseBest}. + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_ORDINAL_DATE; static { ISO_ORDINAL_DATE = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) - .appendLiteral('-') - .appendValue(DAY_OF_YEAR, 3) - .optionalStart() - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD) + .appendLiteral('-') + .appendValue(DAY_OF_YEAR, 3) + .optionalStart() + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses the week-based date + * The ISO date formatter that formats or parses the week-based date * without an offset, such as '2012-W48-6'. *

      * This returns an immutable formatter capable of formatting and parsing @@ -750,50 +1010,67 @@ public final class DateTimeFormatter { *

    15. The {@link ZoneOffset#getId() offset ID}. If the offset has seconds then * they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * *

      * As this formatter has an optional element, it may be necessary to parse using * {@link DateTimeFormatter#parseBest}. + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_WEEK_DATE; static { ISO_WEEK_DATE = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .appendValue(IsoFields.WEEK_BASED_YEAR, 4, 10, SignStyle.EXCEEDS_PAD) - .appendLiteral("-W") - .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 2) - .appendLiteral('-') - .appendValue(DAY_OF_WEEK, 1) - .optionalStart() - .appendOffsetId() - .toFormatter(); + .parseCaseInsensitive() + .appendValue(IsoFields.WEEK_BASED_YEAR, 4, 10, SignStyle.EXCEEDS_PAD) + .appendLiteral("-W") + .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR, 2) + .appendLiteral('-') + .appendValue(DAY_OF_WEEK, 1) + .optionalStart() + .appendOffsetId() + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- /** - * Returns the ISO instant formatter that formats or parses an instant in UTC. + * The ISO instant formatter that formats or parses an instant in UTC, + * such as '2011-12-03T10:15:30Z'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 instant format. + *

      + * This is a special case formatter intended to allow a human readable form + * of an {@link java.time.Instant}. The {@code Instant} class is designed to + * only represent a point in time and internally stores a value in nanoseconds + * from a fixed epoch of 1970-01-01Z. As such, an {@code Instant} cannot be + * formatted as a date or time without providing some form of time-zone. + * This formatter allows the {@code Instant} to be formatted, by providing + * a suitable conversion using {@code ZoneOffset.UTC}. + *

      * The format consists of: *

        *
      • The {@link #ISO_OFFSET_DATE_TIME} where the instant is converted from * {@link ChronoField#INSTANT_SECONDS} and {@link ChronoField#NANO_OF_SECOND} * using the {@code UTC} offset. Parsing is case insensitive. - *

      + * + *

      + * The returned formatter has no override chronology or zone. + * It uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter ISO_INSTANT; static { ISO_INSTANT = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .appendInstant() - .toFormatter(); + .parseCaseInsensitive() + .appendInstant() + .toFormatter(ResolverStyle.STRICT, null); } //----------------------------------------------------------------------- /** - * Returns the ISO date formatter that formats or parses a date without an offset, - * such as '20111203'. + * The ISO date formatter that formats or parses a date without an + * offset, such as '20111203'. *

      * This returns an immutable formatter capable of formatting and parsing * the ISO-8601 basic local date format. @@ -809,21 +1086,25 @@ public final class DateTimeFormatter { *

    16. The {@link ZoneOffset#getId() offset ID} without colons. If the offset has * seconds then they will be handled even though this is not part of the ISO-8601 standard. * Parsing is case insensitive. - *

      + * *

      * As this formatter has an optional element, it may be necessary to parse using * {@link DateTimeFormatter#parseBest}. + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#STRICT STRICT} resolver style. */ public static final DateTimeFormatter BASIC_ISO_DATE; static { BASIC_ISO_DATE = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .appendValue(YEAR, 4) - .appendValue(MONTH_OF_YEAR, 2) - .appendValue(DAY_OF_MONTH, 2) - .optionalStart() - .appendOffset("+HHMMss", "Z") - .toFormatter(); + .parseCaseInsensitive() + .appendValue(YEAR, 4) + .appendValue(MONTH_OF_YEAR, 2) + .appendValue(DAY_OF_MONTH, 2) + .optionalStart() + .appendOffset("+HHMMss", "Z") + .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE); } //----------------------------------------------------------------------- @@ -862,9 +1143,13 @@ public final class DateTimeFormatter { *

    17. A space *
    18. The {@link ZoneOffset#getId() offset ID} without colons or seconds. * An offset of zero uses "GMT". North American zone names and military zone names are not handled. - *

      + * *

      * Parsing is case insensitive. + *

      + * The returned formatter has a chronology of ISO set to ensure dates in + * other calendar systems are correctly converted. + * It has no override zone and uses the {@link ResolverStyle#SMART SMART} resolver style. */ public static final DateTimeFormatter RFC_1123_DATE_TIME; static { @@ -892,28 +1177,28 @@ public final class DateTimeFormatter { moy.put(11L, "Nov"); moy.put(12L, "Dec"); RFC_1123_DATE_TIME = new DateTimeFormatterBuilder() - .parseCaseInsensitive() - .parseLenient() - .optionalStart() - .appendText(DAY_OF_WEEK, dow) - .appendLiteral(", ") - .optionalEnd() - .appendValue(DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE) - .appendLiteral(' ') - .appendText(MONTH_OF_YEAR, moy) - .appendLiteral(' ') - .appendValue(YEAR, 4) // 2 digit year not handled - .appendLiteral(' ') - .appendValue(HOUR_OF_DAY, 2) - .appendLiteral(':') - .appendValue(MINUTE_OF_HOUR, 2) - .optionalStart() - .appendLiteral(':') - .appendValue(SECOND_OF_MINUTE, 2) - .optionalEnd() - .appendLiteral(' ') - .appendOffset("+HHMM", "GMT") // should handle UT/Z/EST/EDT/CST/CDT/MST/MDT/PST/MDT - .toFormatter(); + .parseCaseInsensitive() + .parseLenient() + .optionalStart() + .appendText(DAY_OF_WEEK, dow) + .appendLiteral(", ") + .optionalEnd() + .appendValue(DAY_OF_MONTH, 1, 2, SignStyle.NOT_NEGATIVE) + .appendLiteral(' ') + .appendText(MONTH_OF_YEAR, moy) + .appendLiteral(' ') + .appendValue(YEAR, 4) // 2 digit year not handled + .appendLiteral(' ') + .appendValue(HOUR_OF_DAY, 2) + .appendLiteral(':') + .appendValue(MINUTE_OF_HOUR, 2) + .optionalStart() + .appendLiteral(':') + .appendValue(SECOND_OF_MINUTE, 2) + .optionalEnd() + .appendLiteral(' ') + .appendOffset("+HHMM", "GMT") // should handle UT/Z/EST/EDT/CST/CDT/MST/MDT/PST/MDT + .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); } /** @@ -922,14 +1207,20 @@ public final class DateTimeFormatter { * @param printerParser the printer/parser to use, not null * @param locale the locale to use, not null * @param symbols the symbols to use, not null + * @param resolverStyle the resolver style to use, not null + * @param resolverFields the fields to use during resolving, null for all fields * @param chrono the chronology to use, null for no override * @param zone the zone to use, null for no override */ - DateTimeFormatter(CompositePrinterParser printerParser, Locale locale, - DateTimeFormatSymbols symbols, Chronology chrono, ZoneId zone) { + DateTimeFormatter(CompositePrinterParser printerParser, + Locale locale, DateTimeFormatSymbols symbols, + ResolverStyle resolverStyle, Set resolverFields, + Chronology chrono, ZoneId zone) { this.printerParser = Objects.requireNonNull(printerParser, "printerParser"); + this.resolverFields = resolverFields; this.locale = Objects.requireNonNull(locale, "locale"); this.symbols = Objects.requireNonNull(symbols, "symbols"); + this.resolverStyle = Objects.requireNonNull(resolverStyle, "resolverStyle"); this.chrono = chrono; this.zone = zone; } @@ -962,7 +1253,7 @@ public final class DateTimeFormatter { if (this.locale.equals(locale)) { return this; } - return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone); + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone); } //----------------------------------------------------------------------- @@ -987,7 +1278,7 @@ public final class DateTimeFormatter { if (this.symbols.equals(symbols)) { return this; } - return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone); + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone); } //----------------------------------------------------------------------- @@ -998,7 +1289,7 @@ public final class DateTimeFormatter { * By default, a formatter has no override chronology, returning null. * See {@link #withChronology(Chronology)} for more details on overriding. * - * @return the chronology of this formatter, null if no override + * @return the override chronology of this formatter, null if no override */ public Chronology getChronology() { return chrono; @@ -1013,26 +1304,35 @@ public final class DateTimeFormatter { *

      * If an override is added, then any date that is formatted or parsed will be affected. *

      - * When formatting, if the {@code Temporal} object contains a date then it will + * When formatting, if the temporal object contains a date, then it will * be converted to a date in the override chronology. - * Any time or zone will be retained unless overridden. - * The converted result will behave in a manner equivalent to an implementation - * of {@code ChronoLocalDate},{@code ChronoLocalDateTime} or {@code ChronoZonedDateTime}. + * Whether the temporal contains a date is determined by querying the + * {@link ChronoField#EPOCH_DAY EPOCH_DAY} field. + * Any time or zone will be retained unaltered unless overridden. *

      - * When parsing, the override chronology will be used to interpret the - * {@link java.time.temporal.ChronoField fields} into a date unless the - * formatter directly parses a valid chronology. + * If the temporal object does not contain a date, but does contain one + * or more {@code ChronoField} date fields, then a {@code DateTimeException} + * is thrown. In all other cases, the override chronology is added to the temporal, + * replacing any previous chronology, but without changing the date/time. + *

      + * When parsing, there are two distinct cases to consider. + * If a chronology has been parsed directly from the text, perhaps because + * {@link DateTimeFormatterBuilder#appendChronologyId()} was used, then + * this override chronology has no effect. + * If no zone has been parsed, then this override chronology will be used + * to interpret the {@code ChronoField} values into a date according to the + * date resolving rules of the chronology. *

      * This instance is immutable and unaffected by this method call. * - * @param chrono the new chronology, not null + * @param chrono the new chronology, null if no override * @return a formatter based on this formatter with the requested override chronology, not null */ public DateTimeFormatter withChronology(Chronology chrono) { if (Objects.equals(this.chrono, chrono)) { return this; } - return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone); + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone); } //----------------------------------------------------------------------- @@ -1043,7 +1343,7 @@ public final class DateTimeFormatter { * By default, a formatter has no override zone, returning null. * See {@link #withZone(ZoneId)} for more details on overriding. * - * @return the chronology of this formatter, null if no override + * @return the override zone of this formatter, null if no override */ public ZoneId getZone() { return zone; @@ -1058,28 +1358,192 @@ public final class DateTimeFormatter { *

      * If an override is added, then any instant that is formatted or parsed will be affected. *

      - * When formatting, if the {@code Temporal} object contains an instant then it will + * When formatting, if the temporal object contains an instant, then it will * be converted to a zoned date-time using the override zone. + * Whether the temporal is an instant is determined by querying the + * {@link ChronoField#INSTANT_SECONDS INSTANT_SECONDS} field. * If the input has a chronology then it will be retained unless overridden. * If the input does not have a chronology, such as {@code Instant}, then * the ISO chronology will be used. - * The converted result will behave in a manner equivalent to an implementation - * of {@code ChronoZonedDateTime}. *

      - * When parsing, the override zone will be used to interpret the - * {@link java.time.temporal.ChronoField fields} into an instant unless the - * formatter directly parses a valid zone. + * If the temporal object does not contain an instant, but does contain + * an offset then an additional check is made. If the normalized override + * zone is an offset that differs from the offset of the temporal, then + * a {@code DateTimeException} is thrown. In all other cases, the override + * zone is added to the temporal, replacing any previous zone, but without + * changing the date/time. + *

      + * When parsing, there are two distinct cases to consider. + * If a zone has been parsed directly from the text, perhaps because + * {@link DateTimeFormatterBuilder#appendZoneId()} was used, then + * this override zone has no effect. + * If no zone has been parsed, then this override zone will be included in + * the result of the parse where it can be used to build instants and date-times. *

      * This instance is immutable and unaffected by this method call. * - * @param zone the new override zone, not null + * @param zone the new override zone, null if no override * @return a formatter based on this formatter with the requested override zone, not null */ public DateTimeFormatter withZone(ZoneId zone) { if (Objects.equals(this.zone, zone)) { return this; } - return new DateTimeFormatter(printerParser, locale, symbols, chrono, zone); + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone); + } + + //----------------------------------------------------------------------- + /** + * Gets the resolver style to use during parsing. + *

      + * This returns the resolver style, used during the second phase of parsing + * when fields are resolved into dates and times. + * By default, a formatter has the {@link ResolverStyle#SMART SMART} resolver style. + * See {@link #withResolverStyle(ResolverStyle)} for more details. + * + * @return the resolver style of this formatter, not null + */ + public ResolverStyle getResolverStyle() { + return resolverStyle; + } + + /** + * Returns a copy of this formatter with a new resolver style. + *

      + * This returns a formatter with similar state to this formatter but + * with the resolver style set. By default, a formatter has the + * {@link ResolverStyle#SMART SMART} resolver style. + *

      + * Changing the resolver style only has an effect during parsing. + * Parsing a text string occurs in two phases. + * Phase 1 is a basic text parse according to the fields added to the builder. + * Phase 2 resolves the parsed field-value pairs into date and/or time objects. + * The resolver style is used to control how phase 2, resolving, happens. + * See {@code ResolverStyle} for more information on the options available. + *

      + * This instance is immutable and unaffected by this method call. + * + * @param resolverStyle the new resolver style, not null + * @return a formatter based on this formatter with the requested resolver style, not null + */ + public DateTimeFormatter withResolverStyle(ResolverStyle resolverStyle) { + Objects.requireNonNull(resolverStyle, "resolverStyle"); + if (Objects.equals(this.resolverStyle, resolverStyle)) { + return this; + } + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone); + } + + //----------------------------------------------------------------------- + /** + * Gets the resolver fields to use during parsing. + *

      + * This returns the resolver fields, used during the second phase of parsing + * when fields are resolved into dates and times. + * By default, a formatter has no resolver fields, and thus returns null. + * See {@link #withResolverFields(Set)} for more details. + * + * @return the immutable set of resolver fields of this formatter, null if no fields + */ + public Set getResolverFields() { + return resolverFields; + } + + /** + * Returns a copy of this formatter with a new set of resolver fields. + *

      + * This returns a formatter with similar state to this formatter but with + * the resolver fields set. By default, a formatter has no resolver fields. + *

      + * Changing the resolver fields only has an effect during parsing. + * Parsing a text string occurs in two phases. + * Phase 1 is a basic text parse according to the fields added to the builder. + * Phase 2 resolves the parsed field-value pairs into date and/or time objects. + * The resolver fields are used to filter the field-value pairs between phase 1 and 2. + *

      + * This can be used to select between two or more ways that a date or time might + * be resolved. For example, if the formatter consists of year, month, day-of-month + * and day-of-year, then there are two ways to resolve a date. + * Calling this method with the arguments {@link ChronoField#YEAR YEAR} and + * {@link ChronoField#DAY_OF_YEAR DAY_OF_YEAR} will ensure that the date is + * resolved using the year and day-of-year, effectively meaning that the month + * and day-of-month are ignored during the resolving phase. + *

      + * In a similar manner, this method can be used to ignore secondary fields that + * would otherwise be cross-checked. For example, if the formatter consists of year, + * month, day-of-month and day-of-week, then there is only one way to resolve a + * date, but the parsed value for day-of-week will be cross-checked against the + * resolved date. Calling this method with the arguments {@link ChronoField#YEAR YEAR}, + * {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and + * {@link ChronoField#DAY_OF_MONTH DAY_OF_MONTH} will ensure that the date is + * resolved correctly, but without any cross-check for the day-of-week. + *

      + * In implementation terms, this method behaves as follows. The result of the + * parsing phase can be considered to be a map of field to value. The behavior + * of this method is to cause that map to be filtered between phase 1 and 2, + * removing all fields other than those specified as arguments to this method. + *

      + * This instance is immutable and unaffected by this method call. + * + * @param resolverFields the new set of resolver fields, null if no fields + * @return a formatter based on this formatter with the requested resolver style, not null + */ + public DateTimeFormatter withResolverFields(TemporalField... resolverFields) { + Objects.requireNonNull(resolverFields, "resolverFields"); + Set fields = new HashSet<>(Arrays.asList(resolverFields)); + if (Objects.equals(this.resolverFields, fields)) { + return this; + } + fields = Collections.unmodifiableSet(fields); + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, fields, chrono, zone); + } + + /** + * Returns a copy of this formatter with a new set of resolver fields. + *

      + * This returns a formatter with similar state to this formatter but with + * the resolver fields set. By default, a formatter has no resolver fields. + *

      + * Changing the resolver fields only has an effect during parsing. + * Parsing a text string occurs in two phases. + * Phase 1 is a basic text parse according to the fields added to the builder. + * Phase 2 resolves the parsed field-value pairs into date and/or time objects. + * The resolver fields are used to filter the field-value pairs between phase 1 and 2. + *

      + * This can be used to select between two or more ways that a date or time might + * be resolved. For example, if the formatter consists of year, month, day-of-month + * and day-of-year, then there are two ways to resolve a date. + * Calling this method with the arguments {@link ChronoField#YEAR YEAR} and + * {@link ChronoField#DAY_OF_YEAR DAY_OF_YEAR} will ensure that the date is + * resolved using the year and day-of-year, effectively meaning that the month + * and day-of-month are ignored during the resolving phase. + *

      + * In a similar manner, this method can be used to ignore secondary fields that + * would otherwise be cross-checked. For example, if the formatter consists of year, + * month, day-of-month and day-of-week, then there is only one way to resolve a + * date, but the parsed value for day-of-week will be cross-checked against the + * resolved date. Calling this method with the arguments {@link ChronoField#YEAR YEAR}, + * {@link ChronoField#MONTH_OF_YEAR MONTH_OF_YEAR} and + * {@link ChronoField#DAY_OF_MONTH DAY_OF_MONTH} will ensure that the date is + * resolved correctly, but without any cross-check for the day-of-week. + *

      + * In implementation terms, this method behaves as follows. The result of the + * parsing phase can be considered to be a map of field to value. The behavior + * of this method is to cause that map to be filtered between phase 1 and 2, + * removing all fields other than those specified as arguments to this method. + *

      + * This instance is immutable and unaffected by this method call. + * + * @param resolverFields the new set of resolver fields, null if no fields + * @return a formatter based on this formatter with the requested resolver style, not null + */ + public DateTimeFormatter withResolverFields(Set resolverFields) { + Objects.requireNonNull(resolverFields, "resolverFields"); + if (Objects.equals(this.resolverFields, resolverFields)) { + return this; + } + resolverFields = Collections.unmodifiableSet(new HashSet<>(resolverFields)); + return new DateTimeFormatter(printerParser, locale, symbols, resolverStyle, resolverFields, chrono, zone); } //----------------------------------------------------------------------- @@ -1151,7 +1615,7 @@ public final class DateTimeFormatter { public TemporalAccessor parse(CharSequence text) { Objects.requireNonNull(text, "text"); try { - return parseToBuilder(text, null).resolve(); + return parseResolved0(text, null); } catch (DateTimeParseException ex) { throw ex; } catch (RuntimeException ex) { @@ -1193,7 +1657,7 @@ public final class DateTimeFormatter { Objects.requireNonNull(text, "text"); Objects.requireNonNull(position, "position"); try { - return parseToBuilder(text, position).resolve(); + return parseResolved0(text, position); } catch (DateTimeParseException | IndexOutOfBoundsException ex) { throw ex; } catch (RuntimeException ex) { @@ -1225,8 +1689,7 @@ public final class DateTimeFormatter { Objects.requireNonNull(text, "text"); Objects.requireNonNull(query, "query"); try { - DateTimeBuilder builder = parseToBuilder(text, null).resolve(); - return builder.query(query); + return parseResolved0(text, null).query(query); } catch (DateTimeParseException ex) { throw ex; } catch (RuntimeException ex) { @@ -1238,7 +1701,7 @@ public final class DateTimeFormatter { * Fully parses the text producing an object of one of the specified types. *

      * This parse method is convenient for use when the parser can handle optional elements. - * For example, a pattern of 'yyyy-MM-dd HH.mm[Z]]' can be fully parsed to a {@code ZonedDateTime}, + * For example, a pattern of 'uuuu-MM-dd HH.mm[ VV]' can be fully parsed to a {@code ZonedDateTime}, * or partially parsed to a {@code LocalDateTime}. * The queries must be specified in order, starting from the best matching full-parse option * and ending with the worst matching minimal parse option. @@ -1272,10 +1735,10 @@ public final class DateTimeFormatter { throw new IllegalArgumentException("At least two queries must be specified"); } try { - DateTimeBuilder builder = parseToBuilder(text, null).resolve(); + TemporalAccessor resolved = parseResolved0(text, null); for (TemporalQuery query : queries) { try { - return (TemporalAccessor) builder.query(query); + return (TemporalAccessor) resolved.query(query); } catch (RuntimeException ex) { // continue } @@ -1289,7 +1752,7 @@ public final class DateTimeFormatter { } private DateTimeParseException createError(CharSequence text, RuntimeException ex) { - String abbr = ""; + String abbr; if (text.length() > 64) { abbr = text.subSequence(0, 64).toString() + "..."; } else { @@ -1300,23 +1763,23 @@ public final class DateTimeFormatter { //----------------------------------------------------------------------- /** - * Parses the text to a builder. + * Parses and resolves the specified text. *

      - * This parses to a {@code DateTimeBuilder} ensuring that the text is fully parsed. - * This method throws {@link DateTimeParseException} if unable to parse, or - * some other {@code DateTimeException} if another date/time problem occurs. + * This parses to a {@code TemporalAccessor} ensuring that the text is fully parsed. * * @param text the text to parse, not null * @param position the position to parse from, updated with length parsed * and the index of any error, null if parsing whole string - * @return the engine representing the result of the parse, not null + * @return the resolved result of the parse, not null * @throws DateTimeParseException if the parse fails + * @throws DateTimeException if an error occurs while resolving the date or time + * @throws IndexOutOfBoundsException if the position is invalid */ - private DateTimeBuilder parseToBuilder(final CharSequence text, final ParsePosition position) { + private TemporalAccessor parseResolved0(final CharSequence text, final ParsePosition position) { ParsePosition pos = (position != null ? position : new ParsePosition(0)); - DateTimeParseContext result = parseUnresolved0(text, pos); - if (result == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length())) { - String abbr = ""; + Parsed unresolved = parseUnresolved0(text, pos); + if (unresolved == null || pos.getErrorIndex() >= 0 || (position == null && pos.getIndex() < text.length())) { + String abbr; if (text.length() > 64) { abbr = text.subSequence(0, 64).toString() + "..."; } else { @@ -1330,7 +1793,7 @@ public final class DateTimeFormatter { pos.getIndex(), text, pos.getIndex()); } } - return result.resolveFields().toBuilder(); + return unresolved.resolve(resolverStyle, resolverFields); } /** @@ -1376,7 +1839,7 @@ public final class DateTimeFormatter { return parseUnresolved0(text, position); } - private DateTimeParseContext parseUnresolved0(CharSequence text, ParsePosition position) { + private Parsed parseUnresolved0(CharSequence text, ParsePosition position) { Objects.requireNonNull(text, "text"); Objects.requireNonNull(position, "position"); DateTimeParseContext context = new DateTimeParseContext(this); @@ -1387,7 +1850,7 @@ public final class DateTimeFormatter { return null; } position.setIndex(pos); // errorIndex not updated from input - return context; + return context.toParsed(); } //----------------------------------------------------------------------- @@ -1496,7 +1959,7 @@ public final class DateTimeFormatter { Objects.requireNonNull(text, "text"); try { if (parseType == null) { - return formatter.parseToBuilder(text, null).resolve(); + return formatter.parseResolved0(text, null); } return formatter.parse(text, parseType); } catch (DateTimeParseException ex) { @@ -1508,7 +1971,7 @@ public final class DateTimeFormatter { @Override public Object parseObject(String text, ParsePosition pos) { Objects.requireNonNull(text, "text"); - DateTimeParseContext unresolved; + Parsed unresolved; try { unresolved = formatter.parseUnresolved0(text, pos); } catch (IndexOutOfBoundsException ex) { @@ -1524,11 +1987,11 @@ public final class DateTimeFormatter { return null; } try { - DateTimeBuilder builder = unresolved.resolveFields().toBuilder().resolve(); + TemporalAccessor resolved = unresolved.resolve(formatter.resolverStyle, formatter.resolverFields); if (parseType == null) { - return builder; + return resolved; } - return builder.query(parseType); + return resolved.query(parseType); } catch (RuntimeException ex) { pos.setErrorIndex(0); return null; diff --git a/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java b/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java index e413d4b1e64..d209f5c8baf 100644 --- a/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java +++ b/jdk/src/share/classes/java/time/format/DateTimeFormatterBuilder.java @@ -83,11 +83,9 @@ import java.time.ZoneId; import java.time.ZoneOffset; import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; -import java.time.chrono.JapaneseChronology; import java.time.format.DateTimeTextProvider.LocaleStore; import java.time.temporal.ChronoField; import java.time.temporal.IsoFields; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; @@ -111,7 +109,10 @@ import java.util.Objects; import java.util.Set; import java.util.TimeZone; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import sun.util.locale.provider.LocaleProviderAdapter; +import sun.util.locale.provider.LocaleResources; import sun.util.locale.provider.TimeZoneNameUtility; /** @@ -129,6 +130,8 @@ import sun.util.locale.provider.TimeZoneNameUtility; *

    19. OffsetId/Offset - the {@linkplain ZoneOffset zone offset}
    20. *
    21. ZoneId - the {@linkplain ZoneId time-zone} id
    22. *
    23. ZoneText - the name of the time-zone
    24. + *
    25. ChronologyId - the {@linkplain Chronology chronology} id
    26. + *
    27. ChronologyText - the name of the chronology
    28. *
    29. Literal - a text literal
    30. *
    31. Nested and Optional - formats can be nested or made optional
    32. *
    33. Other - the printer and parser interfaces can be used to add user supplied formatting
    34. @@ -150,7 +153,7 @@ public final class DateTimeFormatterBuilder { * Query for a time-zone that is region-only. */ private static final TemporalQuery QUERY_REGION_ONLY = (temporal) -> { - ZoneId zone = temporal.query(Queries.zoneId()); + ZoneId zone = temporal.query(TemporalQuery.zoneId()); return (zone != null && zone instanceof ZoneOffset == false ? zone : null); }; @@ -286,6 +289,40 @@ public final class DateTimeFormatterBuilder { return this; } + //----------------------------------------------------------------------- + /** + * Appends a default value for a field to the formatter for use in parsing. + *

      + * This appends an instruction to the builder to inject a default value + * into the parsed result. This is especially useful in conjunction with + * optional parts of the formatter. + *

      + * For example, consider a formatter that parses the year, followed by + * an optional month, with a further optional day-of-month. Using such a + * formatter would require the calling code to check whether a full date, + * year-month or just a year had been parsed. This method can be used to + * default the month and day-of-month to a sensible value, such as the + * first of the month, allowing the calling code to always get a date. + *

      + * During formatting, this method has no effect. + *

      + * During parsing, the current state of the parse is inspected. + * If the specified field has no associated value, because it has not been + * parsed successfully at that point, then the specified value is injected + * into the parse result. Injection is immediate, thus the field-value pair + * will be visible to any subsequent elements in the formatter. + * As such, this method is normally called at the end of the builder. + * + * @param field the field to default the value of, not null + * @param value the value to default the field to + * @return this, for chaining, not null + */ + public DateTimeFormatterBuilder parseDefaulting(TemporalField field, long value) { + Objects.requireNonNull(field, "field"); + appendInternal(new DefaultValueParser(field, value)); + return this; + } + //----------------------------------------------------------------------- /** * Appends the value of a date-time field to the formatter using a normal @@ -655,7 +692,7 @@ public final class DateTimeFormatterBuilder { * This appends an instruction to format/parse the offset ID to the builder. *

      * During formatting, the offset is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#offset()}. + * to querying the temporal with {@link TemporalQuery#offset()}. * It will be printed using the format defined below. * If the offset cannot be obtained then an exception is thrown unless the * section of the formatter is optional. @@ -692,6 +729,44 @@ public final class DateTimeFormatterBuilder { return this; } + /** + * Appends the localized zone offset, such as 'GMT+01:00', to the formatter. + *

      + * This appends a localized zone offset to the builder, the format of the + * localized offset is controlled by the specified {@link FormatStyle style} + * to this method: + *

        + *
      • {@link TextStyle#FULL full} - formats with localized offset text, such + * as 'GMT, 2-digit hour and minute field, optional second field if non-zero, + * and colon. + *
      • {@link TextStyle#SHORT short} - formats with localized offset text, + * such as 'GMT, hour without leading zero, optional 2-digit minute and + * second if non-zero, and colon. + *

      + *

      + * During formatting, the offset is obtained using a mechanism equivalent + * to querying the temporal with {@link TemporalQuery#offset()}. + * If the offset cannot be obtained then an exception is thrown unless the + * section of the formatter is optional. + *

      + * During parsing, the offset is parsed using the format defined above. + * If the offset cannot be parsed then an exception is thrown unless the + * section of the formatter is optional. + *

      + * @param style the format style to use, not null + * @return this, for chaining, not null + * @throws IllegalArgumentException if style is neither {@link TextStyle#FULL + * full} nor {@link TextStyle#SHORT short} + */ + public DateTimeFormatterBuilder appendLocalizedOffset(TextStyle style) { + Objects.requireNonNull(style, "style"); + if (style != TextStyle.FULL && style != TextStyle.SHORT) { + throw new IllegalArgumentException("Style must be either full or short"); + } + appendInternal(new LocalizedOffsetIdPrinterParser(style)); + return this; + } + //----------------------------------------------------------------------- /** * Appends the time-zone ID, such as 'Europe/Paris' or '+02:00', to the formatter. @@ -702,7 +777,7 @@ public final class DateTimeFormatterBuilder { * for use with this method, see {@link #appendZoneOrOffsetId()}. *

      * During formatting, the zone is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#zoneId()}. + * to querying the temporal with {@link TemporalQuery#zoneId()}. * It will be printed using the result of {@link ZoneId#getId()}. * If the zone cannot be obtained then an exception is thrown unless the * section of the formatter is optional. @@ -725,25 +800,25 @@ public final class DateTimeFormatterBuilder { *

      * For example, the following will parse: *

      -     *   "Europe/London"           -> ZoneId.of("Europe/London")
      -     *   "Z"                       -> ZoneOffset.UTC
      -     *   "UT"                      -> ZoneOffset.UTC
      -     *   "UTC"                     -> ZoneOffset.UTC
      -     *   "GMT"                     -> ZoneOffset.UTC
      -     *   "UT0"                     -> ZoneOffset.UTC
      -     *   "UTC0"                    -> ZoneOffset.UTC
      -     *   "GMT0"                    -> ZoneOffset.UTC
      -     *   "+01:30"                  -> ZoneOffset.of("+01:30")
      -     *   "UT+01:30"                -> ZoneOffset.of("+01:30")
      -     *   "UTC+01:30"               -> ZoneOffset.of("+01:30")
      -     *   "GMT+01:30"               -> ZoneOffset.of("+01:30")
      +     *   "Europe/London"           -- ZoneId.of("Europe/London")
      +     *   "Z"                       -- ZoneOffset.UTC
      +     *   "UT"                      -- ZoneOffset.UTC
      +     *   "UTC"                     -- ZoneOffset.UTC
      +     *   "GMT"                     -- ZoneOffset.UTC
      +     *   "UT0"                     -- ZoneOffset.UTC
      +     *   "UTC0"                    -- ZoneOffset.UTC
      +     *   "GMT0"                    -- ZoneOffset.UTC
      +     *   "+01:30"                  -- ZoneOffset.of("+01:30")
      +     *   "UT+01:30"                -- ZoneOffset.of("+01:30")
      +     *   "UTC+01:30"               -- ZoneOffset.of("+01:30")
      +     *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
            * 
      * * @return this, for chaining, not null * @see #appendZoneRegionId() */ public DateTimeFormatterBuilder appendZoneId() { - appendInternal(new ZoneIdPrinterParser(Queries.zoneId(), "ZoneId()")); + appendInternal(new ZoneIdPrinterParser(TemporalQuery.zoneId(), "ZoneId()")); return this; } @@ -755,7 +830,7 @@ public final class DateTimeFormatterBuilder { * only if it is a region-based ID. *

      * During formatting, the zone is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#zoneId()}. + * to querying the temporal with {@link TemporalQuery#zoneId()}. * If the zone is a {@code ZoneOffset} or it cannot be obtained then * an exception is thrown unless the section of the formatter is optional. * If the zone is not an offset, then the zone will be printed using @@ -779,18 +854,18 @@ public final class DateTimeFormatterBuilder { *

      * For example, the following will parse: *

      -     *   "Europe/London"           -> ZoneId.of("Europe/London")
      -     *   "Z"                       -> ZoneOffset.UTC
      -     *   "UT"                      -> ZoneOffset.UTC
      -     *   "UTC"                     -> ZoneOffset.UTC
      -     *   "GMT"                     -> ZoneOffset.UTC
      -     *   "UT0"                     -> ZoneOffset.UTC
      -     *   "UTC0"                    -> ZoneOffset.UTC
      -     *   "GMT0"                    -> ZoneOffset.UTC
      -     *   "+01:30"                  -> ZoneOffset.of("+01:30")
      -     *   "UT+01:30"                -> ZoneOffset.of("+01:30")
      -     *   "UTC+01:30"               -> ZoneOffset.of("+01:30")
      -     *   "GMT+01:30"               -> ZoneOffset.of("+01:30")
      +     *   "Europe/London"           -- ZoneId.of("Europe/London")
      +     *   "Z"                       -- ZoneOffset.UTC
      +     *   "UT"                      -- ZoneOffset.UTC
      +     *   "UTC"                     -- ZoneOffset.UTC
      +     *   "GMT"                     -- ZoneOffset.UTC
      +     *   "UT0"                     -- ZoneOffset.UTC
      +     *   "UTC0"                    -- ZoneOffset.UTC
      +     *   "GMT0"                    -- ZoneOffset.UTC
      +     *   "+01:30"                  -- ZoneOffset.of("+01:30")
      +     *   "UT+01:30"                -- ZoneOffset.of("+01:30")
      +     *   "UTC+01:30"               -- ZoneOffset.of("+01:30")
      +     *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
            * 
      *

      * Note that this method is is identical to {@code appendZoneId()} except @@ -817,7 +892,7 @@ public final class DateTimeFormatterBuilder { * then attempts to find an offset, such as that on {@code OffsetDateTime}. *

      * During formatting, the zone is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#zone()}. + * to querying the temporal with {@link TemporalQuery#zone()}. * It will be printed using the result of {@link ZoneId#getId()}. * If the zone cannot be obtained then an exception is thrown unless the * section of the formatter is optional. @@ -840,18 +915,18 @@ public final class DateTimeFormatterBuilder { *

      * For example, the following will parse: *

      -     *   "Europe/London"           -> ZoneId.of("Europe/London")
      -     *   "Z"                       -> ZoneOffset.UTC
      -     *   "UT"                      -> ZoneOffset.UTC
      -     *   "UTC"                     -> ZoneOffset.UTC
      -     *   "GMT"                     -> ZoneOffset.UTC
      -     *   "UT0"                     -> ZoneOffset.UTC
      -     *   "UTC0"                    -> ZoneOffset.UTC
      -     *   "GMT0"                    -> ZoneOffset.UTC
      -     *   "+01:30"                  -> ZoneOffset.of("+01:30")
      -     *   "UT+01:30"                -> ZoneOffset.of("+01:30")
      -     *   "UTC+01:30"               -> ZoneOffset.of("+01:30")
      -     *   "GMT+01:30"               -> ZoneOffset.of("+01:30")
      +     *   "Europe/London"           -- ZoneId.of("Europe/London")
      +     *   "Z"                       -- ZoneOffset.UTC
      +     *   "UT"                      -- ZoneOffset.UTC
      +     *   "UTC"                     -- ZoneOffset.UTC
      +     *   "GMT"                     -- ZoneOffset.UTC
      +     *   "UT0"                     -- ZoneOffset.UTC
      +     *   "UTC0"                    -- ZoneOffset.UTC
      +     *   "GMT0"                    -- ZoneOffset.UTC
      +     *   "+01:30"                  -- ZoneOffset.of("+01:30")
      +     *   "UT+01:30"                -- ZoneOffset.of("+01:30")
      +     *   "UTC+01:30"               -- ZoneOffset.of("+01:30")
      +     *   "GMT+01:30"               -- ZoneOffset.of("+01:30")
            * 
      *

      * Note that this method is is identical to {@code appendZoneId()} except @@ -861,7 +936,7 @@ public final class DateTimeFormatterBuilder { * @see #appendZoneId() */ public DateTimeFormatterBuilder appendZoneOrOffsetId() { - appendInternal(new ZoneIdPrinterParser(Queries.zone(), "ZoneOrOffsetId()")); + appendInternal(new ZoneIdPrinterParser(TemporalQuery.zone(), "ZoneOrOffsetId()")); return this; } @@ -872,7 +947,7 @@ public final class DateTimeFormatterBuilder { * the builder. *

      * During formatting, the zone is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#zoneId()}. + * to querying the temporal with {@link TemporalQuery#zoneId()}. * If the zone is a {@code ZoneOffset} it will be printed using the * result of {@link ZoneOffset#getId()}. * If the zone is not an offset, the textual name will be looked up @@ -908,7 +983,7 @@ public final class DateTimeFormatterBuilder { * the builder. *

      * During formatting, the zone is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#zoneId()}. + * to querying the temporal with {@link TemporalQuery#zoneId()}. * If the zone is a {@code ZoneOffset} it will be printed using the * result of {@link ZoneOffset#getId()}. * If the zone is not an offset, the textual name will be looked up @@ -951,7 +1026,7 @@ public final class DateTimeFormatterBuilder { * This appends an instruction to format/parse the chronology ID to the builder. *

      * During formatting, the chronology is obtained using a mechanism equivalent - * to querying the temporal with {@link Queries#chronology()}. + * to querying the temporal with {@link TemporalQuery#chronology()}. * It will be printed using the result of {@link Chronology#getId()}. * If the chronology cannot be obtained then an exception is thrown unless the * section of the formatter is optional. @@ -1098,24 +1173,25 @@ public final class DateTimeFormatterBuilder { * Appends the elements defined by the specified pattern to the builder. *

      * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. - * The characters '{' and '}' are reserved for future use. + * The characters '#', '{' and '}' are reserved for future use. * The characters '[' and ']' indicate optional patterns. * The following pattern letters are defined: *

            *  Symbol  Meaning                     Presentation      Examples
            *  ------  -------                     ------------      -------
      -     *   G       era                         text              A; AD; Anno Domini
      -     *   y       year                        year              2004; 04
      +     *   G       era                         text              AD; Anno Domini; A
      +     *   u       year                        year              2004; 04
      +     *   y       year-of-era                 year              2004; 04
            *   D       day-of-year                 number            189
      -     *   M       month-of-year               number/text       7; 07; Jul; July; J
      +     *   M/L     month-of-year               number/text       7; 07; Jul; July; J
            *   d       day-of-month                number            10
            *
      -     *   Q       quarter-of-year             number/text       3; 03; Q3
      +     *   Q/q     quarter-of-year             number/text       3; 03; Q3; 3rd quarter
            *   Y       week-based-year             year              1996; 96
      -     *   w       week-of-year                number            27
      -     *   W       week-of-month               number            27
      -     *   e       localized day-of-week       number            2; Tue; Tuesday; T
      -     *   E       day-of-week                 number/text       2; Tue; Tuesday; T
      +     *   w       week-of-week-based-year     number            27
      +     *   W       week-of-month               number            4
      +     *   E       day-of-week                 text              Tue; Tuesday; T
      +     *   e/c     localized day-of-week       number/text       2; 02; Tue; Tuesday; T
            *   F       week-of-month               number            3
            *
            *   a       am-pm-of-day                text              PM
      @@ -1133,6 +1209,7 @@ public final class DateTimeFormatterBuilder {
            *
            *   V       time-zone ID                zone-id           America/Los_Angeles; Z; -08:30
            *   z       time-zone name              zone-name         Pacific Standard Time; PST
      +     *   O       localized zone-offset       offset-O          GMT+8; GMT+08:00; UTC-08:00;
            *   X       zone-offset 'Z' for zero    offset-X          Z; -08; -0830; -08:30; -083015; -08:30:15;
            *   x       zone-offset                 offset-x          +0000; -08; -0830; -08:30; -083015; -08:30:15;
            *   Z       zone-offset                 offset-Z          +0000; -0800; -08:00;
      @@ -1143,116 +1220,169 @@ public final class DateTimeFormatterBuilder {
            *   ''      single quote                literal           '
            *   [       optional section start
            *   ]       optional section end
      -     *   {}      reserved for future use
      +     *   #       reserved for future use
      +     *   {       reserved for future use
      +     *   }       reserved for future use
            * 
      *

      * The count of pattern letters determine the format. + * See DateTimeFormatter for a user-focused description of the patterns. + * The following tables define how the pattern letters map to the builder. *

      - * Text: The text style is determined based on the number of pattern letters used. - * Less than 4 pattern letters will use the {@link TextStyle#SHORT short form}. - * Exactly 4 pattern letters will use the {@link TextStyle#FULL full form}. - * Exactly 5 pattern letters will use the {@link TextStyle#NARROW narrow form}. - *

      - * Number: If the count of letters is one, then the value is printed using the minimum number - * of digits and without padding as per {@link #appendValue(java.time.temporal.TemporalField)}. Otherwise, the - * count of digits is used as the width of the output field as per {@link #appendValue(java.time.temporal.TemporalField, int)}. - *

      - * Number/Text: If the count of pattern letters is 3 or greater, use the Text rules above. - * Otherwise use the Number rules above. - *

      - * Fraction: Outputs the nano-of-second field as a fraction-of-second. - * The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9. - * If it is less than 9, then the nano-of-second value is truncated, with only the most - * significant digits being output. - * When parsing in strict mode, the number of parsed digits must match the count of pattern letters. - * When parsing in lenient mode, the number of parsed digits must be at least the count of pattern - * letters, up to 9 digits. - *

      - * Year: The count of letters determines the minimum field width below which padding is used. - * If the count of letters is two, then a {@link #appendValueReduced reduced} two digit form is used. - * For formatting, this outputs the rightmost two digits. For parsing, this will parse using the - * base value of 2000, resulting in a year within the range 2000 to 2099 inclusive. - * If the count of letters is less than four (but not two), then the sign is only output for negative - * years as per {@link SignStyle#NORMAL}. - * Otherwise, the sign is output if the pad width is exceeded, as per {@link SignStyle#EXCEEDS_PAD} - *

      - * ZoneId: This outputs the time-zone ID, such as 'Europe/Paris'. - * If the count of letters is two, then the time-zone ID is output. - * Any other count of letters throws {@code IllegalArgumentException}. + * Date fields: Pattern letters to output a date. *

      -     *  Pattern     Equivalent builder methods
      -     *   VV          appendZoneId()
      +     *  Pattern  Count  Equivalent builder methods
      +     *  -------  -----  --------------------------
      +     *    G       1      appendText(ChronoField.ERA, TextStyle.SHORT)
      +     *    GG      2      appendText(ChronoField.ERA, TextStyle.SHORT)
      +     *    GGG     3      appendText(ChronoField.ERA, TextStyle.SHORT)
      +     *    GGGG    4      appendText(ChronoField.ERA, TextStyle.FULL)
      +     *    GGGGG   5      appendText(ChronoField.ERA, TextStyle.NARROW)
      +     *
      +     *    u       1      appendValue(ChronoField.YEAR, 1, 19, SignStyle.NORMAL);
      +     *    uu      2      appendValueReduced(ChronoField.YEAR, 2, 2000);
      +     *    uuu     3      appendValue(ChronoField.YEAR, 3, 19, SignStyle.NORMAL);
      +     *    u..u    4..n   appendValue(ChronoField.YEAR, n, 19, SignStyle.EXCEEDS_PAD);
      +     *    y       1      appendValue(ChronoField.YEAR_OF_ERA, 1, 19, SignStyle.NORMAL);
      +     *    yy      2      appendValueReduced(ChronoField.YEAR_OF_ERA, 2, 2000);
      +     *    yyy     3      appendValue(ChronoField.YEAR_OF_ERA, 3, 19, SignStyle.NORMAL);
      +     *    y..y    4..n   appendValue(ChronoField.YEAR_OF_ERA, n, 19, SignStyle.EXCEEDS_PAD);
      +     *    Y       1      append special localized WeekFields element for numeric week-based-year
      +     *    YY      2      append special localized WeekFields element for reduced numeric week-based-year 2 digits;
      +     *    YYY     3      append special localized WeekFields element for numeric week-based-year (3, 19, SignStyle.NORMAL);
      +     *    Y..Y    4..n   append special localized WeekFields element for numeric week-based-year (n, 19, SignStyle.EXCEEDS_PAD);
      +     *
      +     *    Q       1      appendValue(IsoFields.QUARTER_OF_YEAR);
      +     *    QQ      2      appendValue(IsoFields.QUARTER_OF_YEAR, 2);
      +     *    QQQ     3      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.SHORT)
      +     *    QQQQ    4      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.FULL)
      +     *    QQQQQ   5      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.NARROW)
      +     *    q       1      appendValue(IsoFields.QUARTER_OF_YEAR);
      +     *    qq      2      appendValue(IsoFields.QUARTER_OF_YEAR, 2);
      +     *    qqq     3      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.SHORT_STANDALONE)
      +     *    qqqq    4      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.FULL_STANDALONE)
      +     *    qqqqq   5      appendText(IsoFields.QUARTER_OF_YEAR, TextStyle.NARROW_STANDALONE)
      +     *
      +     *    M       1      appendValue(ChronoField.MONTH_OF_YEAR);
      +     *    MM      2      appendValue(ChronoField.MONTH_OF_YEAR, 2);
      +     *    MMM     3      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.SHORT)
      +     *    MMMM    4      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.FULL)
      +     *    MMMMM   5      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.NARROW)
      +     *    L       1      appendValue(ChronoField.MONTH_OF_YEAR);
      +     *    LL      2      appendValue(ChronoField.MONTH_OF_YEAR, 2);
      +     *    LLL     3      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE)
      +     *    LLLL    4      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.FULL_STANDALONE)
      +     *    LLLLL   5      appendText(ChronoField.MONTH_OF_YEAR, TextStyle.NARROW_STANDALONE)
      +     *
      +     *    w       1      append special localized WeekFields element for numeric week-of-year
      +     *    ww      1      append special localized WeekFields element for numeric week-of-year, zero-padded
      +     *    W       1      append special localized WeekFields element for numeric week-of-month
      +     *    d       1      appendValue(ChronoField.DAY_OF_MONTH)
      +     *    dd      2      appendValue(ChronoField.DAY_OF_MONTH, 2)
      +     *    D       1      appendValue(ChronoField.DAY_OF_YEAR)
      +     *    DD      2      appendValue(ChronoField.DAY_OF_YEAR, 2)
      +     *    DDD     3      appendValue(ChronoField.DAY_OF_YEAR, 3)
      +     *    F       1      appendValue(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH)
      +     *    E       1      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
      +     *    EE      2      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
      +     *    EEE     3      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
      +     *    EEEE    4      appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL)
      +     *    EEEEE   5      appendText(ChronoField.DAY_OF_WEEK, TextStyle.NARROW)
      +     *    e       1      append special localized WeekFields element for numeric day-of-week
      +     *    ee      2      append special localized WeekFields element for numeric day-of-week, zero-padded
      +     *    eee     3      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT)
      +     *    eeee    4      appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL)
      +     *    eeeee   5      appendText(ChronoField.DAY_OF_WEEK, TextStyle.NARROW)
      +     *    c       1      append special localized WeekFields element for numeric day-of-week
      +     *    ccc     3      appendText(ChronoField.DAY_OF_WEEK, TextStyle.SHORT_STANDALONE)
      +     *    cccc    4      appendText(ChronoField.DAY_OF_WEEK, TextStyle.FULL_STANDALONE)
      +     *    ccccc   5      appendText(ChronoField.DAY_OF_WEEK, TextStyle.NARROW_STANDALONE)
            * 
      *

      - * Zone names: This outputs the display name of the time-zone ID. - * If the count of letters is one, two or three, then the short name is output. - * If the count of letters is four, then the full name is output. - * Five or more letters throws {@code IllegalArgumentException}. + * Time fields: Pattern letters to output a time. *

      -     *  Pattern     Equivalent builder methods
      -     *   z           appendZoneText(TextStyle.SHORT)
      -     *   zz          appendZoneText(TextStyle.SHORT)
      -     *   zzz         appendZoneText(TextStyle.SHORT)
      -     *   zzzz        appendZoneText(TextStyle.FULL)
      +     *  Pattern  Count  Equivalent builder methods
      +     *  -------  -----  --------------------------
      +     *    a       1      appendText(ChronoField.AMPM_OF_DAY, TextStyle.SHORT)
      +     *    h       1      appendValue(ChronoField.CLOCK_HOUR_OF_AMPM)
      +     *    hh      2      appendValue(ChronoField.CLOCK_HOUR_OF_AMPM, 2)
      +     *    H       1      appendValue(ChronoField.HOUR_OF_DAY)
      +     *    HH      2      appendValue(ChronoField.HOUR_OF_DAY, 2)
      +     *    k       1      appendValue(ChronoField.CLOCK_HOUR_OF_DAY)
      +     *    kk      2      appendValue(ChronoField.CLOCK_HOUR_OF_DAY, 2)
      +     *    K       1      appendValue(ChronoField.HOUR_OF_AMPM)
      +     *    KK      2      appendValue(ChronoField.HOUR_OF_AMPM, 2)
      +     *    m       1      appendValue(ChronoField.MINUTE_OF_HOUR)
      +     *    mm      2      appendValue(ChronoField.MINUTE_OF_HOUR, 2)
      +     *    s       1      appendValue(ChronoField.SECOND_OF_MINUTE)
      +     *    ss      2      appendValue(ChronoField.SECOND_OF_MINUTE, 2)
      +     *
      +     *    S..S    1..n   appendFraction(ChronoField.NANO_OF_SECOND, n, n, false)
      +     *    A       1      appendValue(ChronoField.MILLI_OF_DAY)
      +     *    A..A    2..n   appendValue(ChronoField.MILLI_OF_DAY, n)
      +     *    n       1      appendValue(ChronoField.NANO_OF_SECOND)
      +     *    n..n    2..n   appendValue(ChronoField.NANO_OF_SECOND, n)
      +     *    N       1      appendValue(ChronoField.NANO_OF_DAY)
      +     *    N..N    2..n   appendValue(ChronoField.NANO_OF_DAY, n)
            * 
      *

      - * Offset X and x: This formats the offset based on the number of pattern letters. - * One letter outputs just the hour', such as '+01', unless the minute is non-zero - * in which case the minute is also output, such as '+0130'. - * Two letters outputs the hour and minute, without a colon, such as '+0130'. - * Three letters outputs the hour and minute, with a colon, such as '+01:30'. - * Four letters outputs the hour and minute and optional second, without a colon, such as '+013015'. - * Five letters outputs the hour and minute and optional second, with a colon, such as '+01:30:15'. - * Six or more letters throws {@code IllegalArgumentException}. - * Pattern letter 'X' (upper case) will output 'Z' when the offset to be output would be zero, - * whereas pattern letter 'x' (lower case) will output '+00', '+0000', or '+00:00'. + * Zone ID: Pattern letters to output {@code ZoneId}. *

      -     *  Pattern     Equivalent builder methods
      -     *   X           appendOffset("+HHmm","Z")
      -     *   XX          appendOffset("+HHMM","Z")
      -     *   XXX         appendOffset("+HH:MM","Z")
      -     *   XXXX        appendOffset("+HHMMss","Z")
      -     *   XXXXX       appendOffset("+HH:MM:ss","Z")
      -     *   x           appendOffset("+HHmm","+00")
      -     *   xx          appendOffset("+HHMM","+0000")
      -     *   xxx         appendOffset("+HH:MM","+00:00")
      -     *   xxxx        appendOffset("+HHMMss","+0000")
      -     *   xxxxx       appendOffset("+HH:MM:ss","+00:00")
      +     *  Pattern  Count  Equivalent builder methods
      +     *  -------  -----  --------------------------
      +     *    VV      2      appendZoneId()
      +     *    z       1      appendZoneText(TextStyle.SHORT)
      +     *    zz      2      appendZoneText(TextStyle.SHORT)
      +     *    zzz     3      appendZoneText(TextStyle.SHORT)
      +     *    zzzz    4      appendZoneText(TextStyle.FULL)
            * 
      *

      - * Offset Z: This formats the offset based on the number of pattern letters. - * One, two or three letters outputs the hour and minute, without a colon, such as '+0130'. - * Four or more letters throws {@code IllegalArgumentException}. - * The output will be '+0000' when the offset is zero. + * Zone offset: Pattern letters to output {@code ZoneOffset}. *

      -     *  Pattern     Equivalent builder methods
      -     *   Z           appendOffset("+HHMM","+0000")
      -     *   ZZ          appendOffset("+HHMM","+0000")
      -     *   ZZZ         appendOffset("+HHMM","+0000")
      +     *  Pattern  Count  Equivalent builder methods
      +     *  -------  -----  --------------------------
      +     *    O       1      appendLocalizedOffsetPrefixed(TextStyle.SHORT);
      +     *    OOOO    4      appendLocalizedOffsetPrefixed(TextStyle.FULL);
      +     *    X       1      appendOffset("+HHmm","Z")
      +     *    XX      2      appendOffset("+HHMM","Z")
      +     *    XXX     3      appendOffset("+HH:MM","Z")
      +     *    XXXX    4      appendOffset("+HHMMss","Z")
      +     *    XXXXX   5      appendOffset("+HH:MM:ss","Z")
      +     *    x       1      appendOffset("+HHmm","+00")
      +     *    xx      2      appendOffset("+HHMM","+0000")
      +     *    xxx     3      appendOffset("+HH:MM","+00:00")
      +     *    xxxx    4      appendOffset("+HHMMss","+0000")
      +     *    xxxxx   5      appendOffset("+HH:MM:ss","+00:00")
      +     *    Z       1      appendOffset("+HHMM","+0000")
      +     *    ZZ      2      appendOffset("+HHMM","+0000")
      +     *    ZZZ     3      appendOffset("+HHMM","+0000")
      +     *    ZZZZ    4      appendLocalizedOffset(TextStyle.FULL);
      +     *    ZZZZZ   5      appendOffset("+HH:MM:ss","Z")
            * 
      *

      - * Optional section: The optional section markers work exactly like calling {@link #optionalStart()} - * and {@link #optionalEnd()}. + * Modifiers: Pattern letters that modify the rest of the pattern: + *

      +     *  Pattern  Count  Equivalent builder methods
      +     *  -------  -----  --------------------------
      +     *    [       1      optionalStart()
      +     *    ]       1      optionalEnd()
      +     *    p..p    1..n   padNext(n)
      +     * 
      *

      - * Pad modifier: Modifies the pattern that immediately follows to be padded with spaces. - * The pad width is determined by the number of pattern letters. - * This is the same as calling {@link #padNext(int)}. - *

      - * For example, 'ppH' outputs the hour-of-day padded on the left with spaces to a width of 2. - *

      - * Any unrecognized letter is an error. - * Any non-letter character, other than '[', ']', '{', '}' and the single quote will be output directly. - * Despite this, it is recommended to use single quotes around all characters that you want to - * output directly to ensure that future changes do not break your application. + * Any sequence of letters not specified above, unrecognized letter or + * reserved character will throw an exception. + * Future versions may add to the set of patterns. + * It is recommended to use single quotes around all characters that you want + * to output directly to ensure that future changes do not break your application. *

      * Note that the pattern string is similar, but not identical, to * {@link java.text.SimpleDateFormat SimpleDateFormat}. * The pattern string is also similar, but not identical, to that defined by the * Unicode Common Locale Data Repository (CLDR/LDML). - * Pattern letters 'E' and 'u' are merged, which changes the meaning of "E" and "EE" to be numeric. - * Pattern letters 'X' is aligned with Unicode CLDR/LDML, which affects pattern 'X'. - * Pattern letter 'y' and 'Y' parse years of two digits and more than 4 digits differently. - * Pattern letters 'n', 'A', 'N', 'I' and 'p' are added. + * Pattern letters 'X' and 'u' are aligned with Unicode CLDR/LDML. + * By contrast, {@code SimpleDateFormat} uses 'u' for the numeric day of week. + * Pattern letters 'y' and 'Y' parse years of two digits and more than 4 digits differently. + * Pattern letters 'n', 'A', 'N', and 'p' are added. * Number types will reject large numbers. * * @param pattern the pattern to add, not null @@ -1308,10 +1438,23 @@ public final class DateTimeFormatterBuilder { } appendZoneId(); } else if (cur == 'Z') { - if (count > 3) { + if (count < 4) { + appendOffset("+HHMM", "+0000"); + } else if (count == 4) { + appendLocalizedOffset(TextStyle.FULL); + } else if (count == 5) { + appendOffset("+HH:MM:ss","Z"); + } else { throw new IllegalArgumentException("Too many pattern letters: " + cur); } - appendOffset("+HHMM", "+0000"); + } else if (cur == 'O') { + if (count == 1) { + appendLocalizedOffset(TextStyle.SHORT); + } else if (count == 4) { + appendLocalizedOffset(TextStyle.FULL); + } else { + throw new IllegalArgumentException("Pattern letter count must be 1 or 4: " + cur); + } } else if (cur == 'X') { if (count > 5) { throw new IllegalArgumentException("Too many pattern letters: " + cur); @@ -1323,18 +1466,21 @@ public final class DateTimeFormatterBuilder { } String zero = (count == 1 ? "+00" : (count % 2 == 0 ? "+0000" : "+00:00")); appendOffset(OffsetIdPrinterParser.PATTERNS[count + (count == 1 ? 0 : 1)], zero); - } else if (cur == 'w' || cur == 'e') { + } else if (cur == 'W') { // Fields defined by Locale if (count > 1) { throw new IllegalArgumentException("Too many pattern letters: " + cur); } appendInternal(new WeekBasedFieldPrinterParser(cur, count)); - } else if (cur == 'W') { + } else if (cur == 'w') { // Fields defined by Locale if (count > 2) { throw new IllegalArgumentException("Too many pattern letters: " + cur); } appendInternal(new WeekBasedFieldPrinterParser(cur, count)); + } else if (cur == 'Y') { + // Fields defined by Locale + appendInternal(new WeekBasedFieldPrinterParser(cur, count)); } else { throw new IllegalArgumentException("Unknown pattern letter: " + cur); } @@ -1371,7 +1517,7 @@ public final class DateTimeFormatterBuilder { } optionalEnd(); - } else if (cur == '{' || cur == '}') { + } else if (cur == '{' || cur == '}' || cur == '#') { throw new IllegalArgumentException("Pattern includes reserved character: '" + cur + "'"); } else { appendLiteral(cur); @@ -1379,10 +1525,12 @@ public final class DateTimeFormatterBuilder { } } + @SuppressWarnings("fallthrough") private void parseField(char cur, int count, TemporalField field) { + boolean standalone = false; switch (cur) { + case 'u': case 'y': - case 'Y': if (count == 2) { appendValueReduced(field, 2, 2000); } else if (count < 4) { @@ -1391,31 +1539,55 @@ public final class DateTimeFormatterBuilder { appendValue(field, count, 19, SignStyle.EXCEEDS_PAD); } break; + case 'c': + if (count == 2) { + throw new IllegalArgumentException("Invalid pattern \"cc\""); + } + /*fallthrough*/ + case 'L': + case 'q': + standalone = true; + /*fallthrough*/ case 'M': case 'Q': case 'E': + case 'e': switch (count) { case 1: - appendValue(field); - break; case 2: - appendValue(field, 2); + if (cur == 'c' || cur == 'e') { + appendInternal(new WeekBasedFieldPrinterParser(cur, count)); + } else if (cur == 'E') { + appendText(field, TextStyle.SHORT); + } else { + if (count == 1) { + appendValue(field); + } else { + appendValue(field, 2); + } + } break; case 3: - appendText(field, TextStyle.SHORT); + appendText(field, standalone ? TextStyle.SHORT_STANDALONE : TextStyle.SHORT); break; case 4: - appendText(field, TextStyle.FULL); + appendText(field, standalone ? TextStyle.FULL_STANDALONE : TextStyle.FULL); break; case 5: - appendText(field, TextStyle.NARROW); + appendText(field, standalone ? TextStyle.NARROW_STANDALONE : TextStyle.NARROW); break; default: throw new IllegalArgumentException("Too many pattern letters: " + cur); } break; - case 'G': case 'a': + if (count == 1) { + appendText(field, TextStyle.SHORT); + } else { + throw new IllegalArgumentException("Too many pattern letters: " + cur); + } + break; + case 'G': switch (count) { case 1: case 2: @@ -1435,6 +1607,37 @@ public final class DateTimeFormatterBuilder { case 'S': appendFraction(NANO_OF_SECOND, count, count, false); break; + case 'F': + if (count == 1) { + appendValue(field); + } else { + throw new IllegalArgumentException("Too many pattern letters: " + cur); + } + break; + case 'd': + case 'h': + case 'H': + case 'k': + case 'K': + case 'm': + case 's': + if (count == 1) { + appendValue(field); + } else if (count == 2) { + appendValue(field, count); + } else { + throw new IllegalArgumentException("Too many pattern letters: " + cur); + } + break; + case 'D': + if (count == 1) { + appendValue(field); + } else if (count <= 3) { + appendValue(field, count); + } else { + throw new IllegalArgumentException("Too many pattern letters: " + cur); + } + break; default: if (count == 1) { appendValue(field); @@ -1448,44 +1651,43 @@ public final class DateTimeFormatterBuilder { /** Map of letters to fields. */ private static final Map FIELD_MAP = new HashMap<>(); static { - FIELD_MAP.put('G', ChronoField.ERA); // Java, LDML (different to both for 1/2 chars) - FIELD_MAP.put('y', ChronoField.YEAR); // LDML - // FIELD_MAP.put('y', ChronoField.YEAR_OF_ERA); // Java, LDML // TODO redefine from above - // FIELD_MAP.put('u', ChronoField.YEAR); // LDML // TODO - // FIELD_MAP.put('Y', IsoFields.WEEK_BASED_YEAR); // Java7, LDML (needs localized week number) // TODO + // SDF = SimpleDateFormat + FIELD_MAP.put('G', ChronoField.ERA); // SDF, LDML (different to both for 1/2 chars) + FIELD_MAP.put('y', ChronoField.YEAR_OF_ERA); // SDF, LDML + FIELD_MAP.put('u', ChronoField.YEAR); // LDML (different in SDF) FIELD_MAP.put('Q', IsoFields.QUARTER_OF_YEAR); // LDML (removed quarter from 310) - FIELD_MAP.put('M', ChronoField.MONTH_OF_YEAR); // Java, LDML - // FIELD_MAP.put('w', WeekFields.weekOfYear()); // Java, LDML (needs localized week number) - // FIELD_MAP.put('W', WeekFields.weekOfMonth()); // Java, LDML (needs localized week number) - FIELD_MAP.put('D', ChronoField.DAY_OF_YEAR); // Java, LDML - FIELD_MAP.put('d', ChronoField.DAY_OF_MONTH); // Java, LDML - FIELD_MAP.put('F', ChronoField.ALIGNED_WEEK_OF_MONTH); // Java, LDML - FIELD_MAP.put('E', ChronoField.DAY_OF_WEEK); // Java, LDML (different to both for 1/2 chars) - // FIELD_MAP.put('e', WeekFields.dayOfWeek()); // LDML (needs localized week number) - FIELD_MAP.put('a', ChronoField.AMPM_OF_DAY); // Java, LDML - FIELD_MAP.put('H', ChronoField.HOUR_OF_DAY); // Java, LDML - FIELD_MAP.put('k', ChronoField.CLOCK_HOUR_OF_DAY); // Java, LDML - FIELD_MAP.put('K', ChronoField.HOUR_OF_AMPM); // Java, LDML - FIELD_MAP.put('h', ChronoField.CLOCK_HOUR_OF_AMPM); // Java, LDML - FIELD_MAP.put('m', ChronoField.MINUTE_OF_HOUR); // Java, LDML - FIELD_MAP.put('s', ChronoField.SECOND_OF_MINUTE); // Java, LDML - FIELD_MAP.put('S', ChronoField.NANO_OF_SECOND); // LDML (Java uses milli-of-second number) + FIELD_MAP.put('q', IsoFields.QUARTER_OF_YEAR); // LDML (stand-alone) + FIELD_MAP.put('M', ChronoField.MONTH_OF_YEAR); // SDF, LDML + FIELD_MAP.put('L', ChronoField.MONTH_OF_YEAR); // SDF, LDML (stand-alone) + FIELD_MAP.put('D', ChronoField.DAY_OF_YEAR); // SDF, LDML + FIELD_MAP.put('d', ChronoField.DAY_OF_MONTH); // SDF, LDML + FIELD_MAP.put('F', ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH); // SDF, LDML + FIELD_MAP.put('E', ChronoField.DAY_OF_WEEK); // SDF, LDML (different to both for 1/2 chars) + FIELD_MAP.put('c', ChronoField.DAY_OF_WEEK); // LDML (stand-alone) + FIELD_MAP.put('e', ChronoField.DAY_OF_WEEK); // LDML (needs localized week number) + FIELD_MAP.put('a', ChronoField.AMPM_OF_DAY); // SDF, LDML + FIELD_MAP.put('H', ChronoField.HOUR_OF_DAY); // SDF, LDML + FIELD_MAP.put('k', ChronoField.CLOCK_HOUR_OF_DAY); // SDF, LDML + FIELD_MAP.put('K', ChronoField.HOUR_OF_AMPM); // SDF, LDML + FIELD_MAP.put('h', ChronoField.CLOCK_HOUR_OF_AMPM); // SDF, LDML + FIELD_MAP.put('m', ChronoField.MINUTE_OF_HOUR); // SDF, LDML + FIELD_MAP.put('s', ChronoField.SECOND_OF_MINUTE); // SDF, LDML + FIELD_MAP.put('S', ChronoField.NANO_OF_SECOND); // LDML (SDF uses milli-of-second number) FIELD_MAP.put('A', ChronoField.MILLI_OF_DAY); // LDML FIELD_MAP.put('n', ChronoField.NANO_OF_SECOND); // 310 (proposed for LDML) FIELD_MAP.put('N', ChronoField.NANO_OF_DAY); // 310 (proposed for LDML) // 310 - z - time-zone names, matches LDML and SimpleDateFormat 1 to 4 // 310 - Z - matches SimpleDateFormat and LDML - // 310 - V - time-zone id, matches proposed LDML + // 310 - V - time-zone id, matches LDML // 310 - p - prefix for padding - // 310 - X - matches proposed LDML, almost matches JavaSDF for 1, exact match 2&3, extended 4&5 - // 310 - x - matches proposed LDML - // Java - u - clashes with LDML, go with LDML (year-proleptic) here + // 310 - X - matches LDML, almost matches SDF for 1, exact match 2&3, extended 4&5 + // 310 - x - matches LDML + // 310 - w, W, and Y are localized forms matching LDML // LDML - U - cycle year name, not supported by 310 yet // LDML - l - deprecated // LDML - j - not relevant // LDML - g - modified-julian-day // LDML - v,V - extended time-zone names - // LDML - q/c/L - standalone quarter/day-of-week/month } //----------------------------------------------------------------------- @@ -1632,10 +1834,12 @@ public final class DateTimeFormatterBuilder { //----------------------------------------------------------------------- /** - * Completes this builder by creating the DateTimeFormatter using the default locale. + * Completes this builder by creating the {@code DateTimeFormatter} + * using the default locale. *

      - * This will create a formatter with the {@link Locale#getDefault(Locale.Category) default FORMAT locale}. + * This will create a formatter with the {@linkplain Locale#getDefault(Locale.Category) default FORMAT locale}. * Numbers will be printed and parsed using the standard non-localized set of symbols. + * The resolver style will be {@link ResolverStyle#SMART SMART}. *

      * Calling this method will end any open optional sections by repeatedly * calling {@link #optionalEnd()} before creating the formatter. @@ -1650,10 +1854,12 @@ public final class DateTimeFormatterBuilder { } /** - * Completes this builder by creating the DateTimeFormatter using the specified locale. + * Completes this builder by creating the {@code DateTimeFormatter} + * using the specified locale. *

      * This will create a formatter with the specified locale. * Numbers will be printed and parsed using the standard non-localized set of symbols. + * The resolver style will be {@link ResolverStyle#SMART SMART}. *

      * Calling this method will end any open optional sections by repeatedly * calling {@link #optionalEnd()} before creating the formatter. @@ -1665,12 +1871,35 @@ public final class DateTimeFormatterBuilder { * @return the created formatter, not null */ public DateTimeFormatter toFormatter(Locale locale) { + return toFormatter(locale, ResolverStyle.SMART, null); + } + + /** + * Completes this builder by creating the formatter. + * This uses the default locale. + * + * @param resolverStyle the resolver style to use, not null + * @return the created formatter, not null + */ + DateTimeFormatter toFormatter(ResolverStyle resolverStyle, Chronology chrono) { + return toFormatter(Locale.getDefault(Locale.Category.FORMAT), resolverStyle, chrono); + } + + /** + * Completes this builder by creating the formatter. + * + * @param locale the locale to use for formatting, not null + * @param chrono the chronology to use, may be null + * @return the created formatter, not null + */ + private DateTimeFormatter toFormatter(Locale locale, ResolverStyle resolverStyle, Chronology chrono) { Objects.requireNonNull(locale, "locale"); while (active.parent != null) { optionalEnd(); } CompositePrinterParser pp = new CompositePrinterParser(printerParsers, false); - return new DateTimeFormatter(pp, locale, DateTimeFormatSymbols.STANDARD, null, null); + return new DateTimeFormatter(pp, locale, DateTimeFormatSymbols.STANDARD, + resolverStyle, null, chrono, null); } //----------------------------------------------------------------------- @@ -1940,6 +2169,31 @@ public final class DateTimeFormatterBuilder { } } + //----------------------------------------------------------------------- + /** + * Defaults a value into the parse if not currently present. + */ + static class DefaultValueParser implements DateTimePrinterParser { + private final TemporalField field; + private final long value; + + DefaultValueParser(TemporalField field, long value) { + this.field = field; + this.value = value; + } + + public boolean format(DateTimePrintContext context, StringBuilder buf) { + return true; + } + + public int parse(DateTimeParseContext context, CharSequence text, int position) { + if (context.getParsed(field) == null) { + context.setParsedField(field, value, position, position); + } + return position; + } + } + //----------------------------------------------------------------------- /** * Prints or parses a character literal. @@ -2104,13 +2358,7 @@ public final class DateTimeFormatterBuilder { @Override public boolean format(DateTimePrintContext context, StringBuilder buf) { - Chronology chrono = context.getTemporal().query(Queries.chronology()); - Long valueLong; - if (chrono == JapaneseChronology.INSTANCE && field == ChronoField.YEAR) { - valueLong = context.getValue(ChronoField.YEAR_OF_ERA); - } else { - valueLong = context.getValue(field); - } + Long valueLong = context.getValue(field); if (valueLong == null) { return false; } @@ -2281,14 +2529,7 @@ public final class DateTimeFormatterBuilder { * @return the new position */ int setValue(DateTimeParseContext context, long value, int errorPos, int successPos) { - TemporalField f = field; - if (field == ChronoField.YEAR) { - Chronology chrono = context.getEffectiveChronology(); - if (chrono == JapaneseChronology.INSTANCE) { - f = ChronoField.YEAR_OF_ERA; - } - } - return context.setParsedField(f, value, errorPos, successPos); + return context.setParsedField(field, value, errorPos, successPos); } @Override @@ -2570,7 +2811,7 @@ public final class DateTimeFormatterBuilder { return false; } String text; - Chronology chrono = context.getTemporal().query(Queries.chronology()); + Chronology chrono = context.getTemporal().query(TemporalQuery.chronology()); if (chrono == null || chrono == IsoChronology.INSTANCE) { text = provider.getText(field, value, textStyle, context.getLocale()); } else { @@ -2885,6 +3126,167 @@ public final class DateTimeFormatterBuilder { } } + //----------------------------------------------------------------------- + /** + * Prints or parses an offset ID. + */ + static final class LocalizedOffsetIdPrinterParser implements DateTimePrinterParser { + private final TextStyle style; + + /** + * Constructor. + * + * @param style the style, not null + */ + LocalizedOffsetIdPrinterParser(TextStyle style) { + this.style = style; + } + + private static StringBuilder appendHMS(StringBuilder buf, int t) { + return buf.append((char)(t / 10 + '0')) + .append((char)(t % 10 + '0')); + } + + @Override + public boolean format(DateTimePrintContext context, StringBuilder buf) { + Long offsetSecs = context.getValue(OFFSET_SECONDS); + if (offsetSecs == null) { + return false; + } + String gmtText = "GMT"; // TODO: get localized version of 'GMT' + if (gmtText != null) { + buf.append(gmtText); + } + int totalSecs = Math.toIntExact(offsetSecs); + if (totalSecs != 0) { + int absHours = Math.abs((totalSecs / 3600) % 100); // anything larger than 99 silently dropped + int absMinutes = Math.abs((totalSecs / 60) % 60); + int absSeconds = Math.abs(totalSecs % 60); + buf.append(totalSecs < 0 ? "-" : "+"); + if (style == TextStyle.FULL) { + appendHMS(buf, absHours); + buf.append(':'); + appendHMS(buf, absMinutes); + if (absSeconds != 0) { + buf.append(':'); + appendHMS(buf, absSeconds); + } + } else { + if (absHours >= 10) { + buf.append((char)(absHours / 10 + '0')); + } + buf.append((char)(absHours % 10 + '0')); + if (absMinutes != 0 || absSeconds != 0) { + buf.append(':'); + appendHMS(buf, absMinutes); + if (absSeconds != 0) { + buf.append(':'); + appendHMS(buf, absSeconds); + } + } + } + } + return true; + } + + int getDigit(CharSequence text, int position) { + char c = text.charAt(position); + if (c < '0' || c > '9') { + return -1; + } + return c - '0'; + } + + @Override + public int parse(DateTimeParseContext context, CharSequence text, int position) { + int pos = position; + int end = pos + text.length(); + String gmtText = "GMT"; // TODO: get localized version of 'GMT' + if (gmtText != null) { + if (!context.subSequenceEquals(text, pos, gmtText, 0, gmtText.length())) { + return ~position; + } + pos += gmtText.length(); + } + // parse normal plus/minus offset + int negative = 0; + if (pos == end) { + return context.setParsedField(OFFSET_SECONDS, 0, position, pos); + } + char sign = text.charAt(pos); // IOOBE if invalid position + if (sign == '+') { + negative = 1; + } else if (sign == '-') { + negative = -1; + } else { + return context.setParsedField(OFFSET_SECONDS, 0, position, pos); + } + pos++; + int h = 0; + int m = 0; + int s = 0; + if (style == TextStyle.FULL) { + int h1 = getDigit(text, pos++); + int h2 = getDigit(text, pos++); + if (h1 < 0 || h2 < 0 || text.charAt(pos++) != ':') { + return ~position; + } + h = h1 * 10 + h2; + int m1 = getDigit(text, pos++); + int m2 = getDigit(text, pos++); + if (m1 < 0 || m2 < 0) { + return ~position; + } + m = m1 * 10 + m2; + if (pos + 2 < end && text.charAt(pos) == ':') { + int s1 = getDigit(text, pos + 1); + int s2 = getDigit(text, pos + 2); + if (s1 >= 0 && s2 >= 0) { + s = s1 * 10 + s2; + pos += 3; + } + } + } else { + h = getDigit(text, pos++); + if (h < 0) { + return ~position; + } + if (pos < end) { + int h2 = getDigit(text, pos); + if (h2 >=0) { + h = h * 10 + h2; + pos++; + } + if (pos + 2 < end && text.charAt(pos) == ':') { + if (pos + 2 < end && text.charAt(pos) == ':') { + int m1 = getDigit(text, pos + 1); + int m2 = getDigit(text, pos + 2); + if (m1 >= 0 && m2 >= 0) { + m = m1 * 10 + m2; + pos += 3; + if (pos + 2 < end && text.charAt(pos) == ':') { + int s1 = getDigit(text, pos + 1); + int s2 = getDigit(text, pos + 2); + if (s1 >= 0 && s2 >= 0) { + s = s1 * 10 + s2; + pos += 3; + } + } + } + } + } + } + } + long offsetSecs = negative * (h * 3600L + m * 60L + s); + return context.setParsedField(OFFSET_SECONDS, offsetSecs, position, pos); + } + + @Override + public String toString() { + return "LocalizedOffset(" + style + ")"; + } + } + //----------------------------------------------------------------------- /** * Prints or parses a zone ID. @@ -2898,7 +3300,7 @@ public final class DateTimeFormatterBuilder { private Set preferredZones; ZoneTextPrinterParser(TextStyle textStyle, Set preferredZones) { - super(Queries.zone(), "ZoneText(" + textStyle + ")"); + super(TemporalQuery.zone(), "ZoneText(" + textStyle + ")"); this.textStyle = Objects.requireNonNull(textStyle, "textStyle"); if (preferredZones != null && preferredZones.size() != 0) { this.preferredZones = new HashSet<>(); @@ -2929,12 +3331,12 @@ public final class DateTimeFormatterBuilder { } names = Arrays.copyOfRange(names, 0, 7); names[5] = - TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.LONG,locale); + TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.LONG, locale); if (names[5] == null) { names[5] = names[0]; // use the id } names[6] = - TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.SHORT,locale); + TimeZoneNameUtility.retrieveGenericDisplayName(id, TimeZone.SHORT, locale); if (names[6] == null) { names[6] = names[0]; } @@ -2946,16 +3348,16 @@ public final class DateTimeFormatterBuilder { } switch (type) { case STD: - return names[textStyle.ordinal() + 1]; + return names[textStyle.zoneNameStyleIndex() + 1]; case DST: - return names[textStyle.ordinal() + 3]; + return names[textStyle.zoneNameStyleIndex() + 3]; } - return names[textStyle.ordinal() + 5]; + return names[textStyle.zoneNameStyleIndex() + 5]; } @Override public boolean format(DateTimePrintContext context, StringBuilder buf) { - ZoneId zone = context.getValue(Queries.zoneId()); + ZoneId zone = context.getValue(TemporalQuery.zoneId()); if (zone == null) { return false; } @@ -3507,14 +3909,14 @@ public final class DateTimeFormatterBuilder { @Override public boolean format(DateTimePrintContext context, StringBuilder buf) { - Chronology chrono = context.getValue(Queries.chronology()); + Chronology chrono = context.getValue(TemporalQuery.chronology()); if (chrono == null) { return false; } if (textStyle == null) { buf.append(chrono.getId()); } else { - buf.append(chrono.getId()); // TODO: Use symbols + buf.append(getChronologyName(chrono, context.getLocale())); } return true; } @@ -3529,11 +3931,16 @@ public final class DateTimeFormatterBuilder { Chronology bestMatch = null; int matchLen = -1; for (Chronology chrono : chronos) { - String id = chrono.getId(); - int idLen = id.length(); - if (idLen > matchLen && context.subSequenceEquals(text, position, id, 0, idLen)) { + String name; + if (textStyle == null) { + name = chrono.getId(); + } else { + name = getChronologyName(chrono, context.getLocale()); + } + int nameLen = name.length(); + if (nameLen > matchLen && context.subSequenceEquals(text, position, name, 0, nameLen)) { bestMatch = chrono; - matchLen = idLen; + matchLen = nameLen; } } if (bestMatch == null) { @@ -3542,6 +3949,22 @@ public final class DateTimeFormatterBuilder { context.setParsed(bestMatch); return position + matchLen; } + + /** + * Returns the chronology name of the given chrono in the given locale + * if available, or the chronology Id otherwise. The regular ResourceBundle + * search path is used for looking up the chronology name. + * + * @param chrono the chronology, not null + * @param locale the locale, not null + * @return the chronology name of chrono in locale, or the id if no name is available + * @throws NullPointerException if chrono or locale is null + */ + private String getChronologyName(Chronology chrono, Locale locale) { + String key = "calendarname." + chrono.getCalendarType(); + String name = DateTimeTextProvider.getLocalizedResource(key, locale); + return name != null ? name : chrono.getId(); + } } //----------------------------------------------------------------------- @@ -3549,6 +3972,9 @@ public final class DateTimeFormatterBuilder { * Prints or parses a localized pattern. */ static final class LocalizedPrinterParser implements DateTimePrinterParser { + /** Cache of formatters. */ + private static final ConcurrentMap FORMATTER_CACHE = new ConcurrentHashMap<>(16, 0.75f, 2); + private final FormatStyle dateStyle; private final FormatStyle timeStyle; @@ -3578,6 +4004,9 @@ public final class DateTimeFormatterBuilder { /** * Gets the formatter to use. + *

      + * The formatter will be the most appropriate to use for the date and time style in the locale. + * For example, some locales will use the month name while others will use the number. * * @param locale the locale to use, not null * @param chrono the chronology to use, not null @@ -3585,8 +4014,32 @@ public final class DateTimeFormatterBuilder { * @throws IllegalArgumentException if the formatter cannot be found */ private DateTimeFormatter formatter(Locale locale, Chronology chrono) { - return DateTimeFormatStyleProvider.getInstance() - .getFormatter(dateStyle, timeStyle, chrono, locale); + String key = chrono.getId() + '|' + locale.toString() + '|' + dateStyle + timeStyle; + DateTimeFormatter formatter = FORMATTER_CACHE.get(key); + if (formatter == null) { + LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased().getLocaleResources(locale); + String pattern = lr.getJavaTimeDateTimePattern( + convertStyle(timeStyle), convertStyle(dateStyle), chrono.getCalendarType()); + formatter = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale); + DateTimeFormatter old = FORMATTER_CACHE.putIfAbsent(key, formatter); + if (old != null) { + formatter = old; + } + } + return formatter; + } + + /** + * Converts the given FormatStyle to the java.text.DateFormat style. + * + * @param style the FormatStyle style + * @return the int style, or -1 if style is null, indicating unrequired + */ + private int convertStyle(FormatStyle style) { + if (style == null) { + return -1; + } + return style.ordinal(); // indices happen to align } @Override @@ -3596,7 +4049,6 @@ public final class DateTimeFormatterBuilder { } } - //----------------------------------------------------------------------- /** * Prints or parses a localized pattern from a localized field. @@ -3641,14 +4093,23 @@ public final class DateTimeFormatterBuilder { WeekFields weekDef = WeekFields.of(locale); TemporalField field = null; switch (chr) { + case 'Y': + field = weekDef.weekBasedYear(); + if (count == 2) { + return new ReducedPrinterParser(field, 2, 2000); + } else { + return new NumberPrinterParser(field, count, 19, + (count < 4) ? SignStyle.NORMAL : SignStyle.EXCEEDS_PAD, -1); + } case 'e': + case 'c': field = weekDef.dayOfWeek(); break; case 'w': - field = weekDef.weekOfMonth(); + field = weekDef.weekOfWeekBasedYear(); break; case 'W': - field = weekDef.weekOfYear(); + field = weekDef.weekOfMonth(); break; default: throw new IllegalStateException("unreachable"); @@ -3658,11 +4119,41 @@ public final class DateTimeFormatterBuilder { @Override public String toString() { - return String.format("WeekBased(%c%d)", chr, count); + StringBuilder sb = new StringBuilder(30); + sb.append("Localized("); + if (chr == 'Y') { + if (count == 1) { + sb.append("WeekBasedYear"); + } else if (count == 2) { + sb.append("ReducedValue(WeekBasedYear,2,2000)"); + } else { + sb.append("WeekBasedYear,").append(count).append(",") + .append(19).append(",") + .append((count < 4) ? SignStyle.NORMAL : SignStyle.EXCEEDS_PAD); + } + } else { + switch (chr) { + case 'c': + case 'e': + sb.append("DayOfWeek"); + break; + case 'w': + sb.append("WeekOfWeekBasedYear"); + break; + case 'W': + sb.append("WeekOfMonth"); + break; + default: + break; + } + sb.append(","); + sb.append(count); + } + sb.append(")"); + return sb.toString(); } } - //------------------------------------------------------------------------- /** * Length comparator. @@ -3673,5 +4164,4 @@ public final class DateTimeFormatterBuilder { return str1.length() == str2.length() ? str1.compareTo(str2) : str1.length() - str2.length(); } }; - } diff --git a/jdk/src/share/classes/java/time/format/DateTimeParseContext.java b/jdk/src/share/classes/java/time/format/DateTimeParseContext.java index 62f80dba377..f2e3ff3a300 100644 --- a/jdk/src/share/classes/java/time/format/DateTimeParseContext.java +++ b/jdk/src/share/classes/java/time/format/DateTimeParseContext.java @@ -61,19 +61,12 @@ */ package java.time.format; -import java.time.DateTimeException; import java.time.ZoneId; import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; -import java.time.temporal.ChronoField; -import java.time.temporal.Queries; -import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; -import java.time.temporal.TemporalQuery; import java.util.ArrayList; -import java.util.HashMap; import java.util.Locale; -import java.util.Map; import java.util.Objects; /** @@ -83,8 +76,8 @@ import java.util.Objects; * It has the ability to store and retrieve the parsed values and manage optional segments. * It also provides key information to the parsing methods. *

      - * Once parsing is complete, the {@link #toBuilder()} is typically used - * to obtain a builder that can combine the separate parsed fields into meaningful values. + * Once parsing is complete, the {@link #toParsed()} is used to obtain the data. + * It contains a method to resolve the separate parsed fields into meaningful values. * *

      Specification for implementors

      * This class is a mutable context intended for use from a single thread. @@ -93,7 +86,7 @@ import java.util.Objects; * * @since 1.8 */ -final class DateTimeParseContext implements TemporalAccessor { +final class DateTimeParseContext { /** * The formatter, not null. @@ -306,6 +299,17 @@ final class DateTimeParseContext implements TemporalAccessor { return parsed.get(parsed.size() - 1); } + /** + * Gets the result of the parse. + * + * @return the result of the parse, not null + */ + Parsed toParsed() { + Parsed parsed = currentParsed(); + parsed.effectiveChrono = getEffectiveChronology(); + return parsed; + } + //----------------------------------------------------------------------- /** * Gets the first value that was parsed for the specified field. @@ -366,111 +370,6 @@ final class DateTimeParseContext implements TemporalAccessor { currentParsed().zone = zone; } - //----------------------------------------------------------------------- - /** - * Returns a {@code DateTimeBuilder} that can be used to interpret - * the results of the parse. - *

      - * This method is typically used once parsing is complete to obtain the parsed data. - * Parsing will typically result in separate fields, such as year, month and day. - * The returned builder can be used to combine the parsed data into meaningful - * objects such as {@code LocalDate}, potentially applying complex processing - * to handle invalid parsed data. - * - * @return a new builder with the results of the parse, not null - */ - DateTimeBuilder toBuilder() { - Parsed parsed = currentParsed(); - DateTimeBuilder builder = new DateTimeBuilder(); - for (Map.Entry fv : parsed.fieldValues.entrySet()) { - builder.addFieldValue(fv.getKey(), fv.getValue()); - } - builder.addObject(getEffectiveChronology()); - if (parsed.zone != null) { - builder.addObject(parsed.zone); - } - return builder; - } - - /** - * Resolves the fields in this context. - * - * @return this, for method chaining - * @throws DateTimeException if resolving one field results in a value for - * another field that is in conflict - */ - DateTimeParseContext resolveFields() { - Parsed data = currentParsed(); - outer: - while (true) { - for (Map.Entry entry : data.fieldValues.entrySet()) { - TemporalField targetField = entry.getKey(); - Map changes = targetField.resolve(this, entry.getValue()); - if (changes != null) { - resolveMakeChanges(data, targetField, changes); - data.fieldValues.remove(targetField); // helps avoid infinite loops - continue outer; // have to restart to avoid concurrent modification - } - } - break; - } - return this; - } - - private void resolveMakeChanges(Parsed data, TemporalField targetField, Map changes) { - for (Map.Entry change : changes.entrySet()) { - TemporalField changeField = change.getKey(); - Long changeValue = change.getValue(); - Objects.requireNonNull(changeField, "changeField"); - if (changeValue != null) { - Long old = currentParsed().fieldValues.put(changeField, changeValue); - if (old != null && old.longValue() != changeValue.longValue()) { - throw new DateTimeException("Conflict found: " + changeField + " " + old + - " differs from " + changeField + " " + changeValue + - " while resolving " + targetField); - } - } else { - data.fieldValues.remove(changeField); - } - } - } - - //----------------------------------------------------------------------- - // TemporalAccessor methods - // should only to be used once parsing is complete - @Override - public boolean isSupported(TemporalField field) { - if (currentParsed().fieldValues.containsKey(field)) { - return true; - } - return (field instanceof ChronoField == false) && field.isSupportedBy(this); - } - - @Override - public long getLong(TemporalField field) { - Long value = currentParsed().fieldValues.get(field); - if (value != null) { - return value; - } - if (field instanceof ChronoField) { - throw new DateTimeException("Unsupported field: " + field.getName()); - } - return field.getFrom(this); - } - - @SuppressWarnings("unchecked") - @Override - public R query(TemporalQuery query) { - if (query == Queries.chronology()) { - return (R) currentParsed().chrono; - } else if (query == Queries.zoneId()) { - return (R) currentParsed().zone; - } else if (query == Queries.precision()) { - return null; - } - return query.queryFrom(this); - } - //----------------------------------------------------------------------- /** * Returns a string version of the context for debugging. @@ -482,27 +381,4 @@ final class DateTimeParseContext implements TemporalAccessor { return currentParsed().toString(); } - //----------------------------------------------------------------------- - /** - * Temporary store of parsed data. - */ - private static final class Parsed { - Chronology chrono = null; - ZoneId zone = null; - final Map fieldValues = new HashMap<>(); - private Parsed() { - } - protected Parsed copy() { - Parsed cloned = new Parsed(); - cloned.chrono = this.chrono; - cloned.zone = this.zone; - cloned.fieldValues.putAll(this.fieldValues); - return cloned; - } - @Override - public String toString() { - return fieldValues.toString() + "," + chrono + "," + zone; - } - } - } diff --git a/jdk/src/share/classes/java/time/format/DateTimePrintContext.java b/jdk/src/share/classes/java/time/format/DateTimePrintContext.java index 060d8dd8890..8124fc85c98 100644 --- a/jdk/src/share/classes/java/time/format/DateTimePrintContext.java +++ b/jdk/src/share/classes/java/time/format/DateTimePrintContext.java @@ -63,14 +63,16 @@ package java.time.format; import static java.time.temporal.ChronoField.EPOCH_DAY; import static java.time.temporal.ChronoField.INSTANT_SECONDS; +import static java.time.temporal.ChronoField.OFFSET_SECONDS; import java.time.DateTimeException; import java.time.Instant; import java.time.ZoneId; -import java.time.chrono.Chronology; -import java.time.temporal.ChronoField; +import java.time.ZoneOffset; import java.time.chrono.ChronoLocalDate; -import java.time.temporal.Queries; +import java.time.chrono.Chronology; +import java.time.chrono.IsoChronology; +import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; @@ -118,20 +120,20 @@ final class DateTimePrintContext { } private static TemporalAccessor adjust(final TemporalAccessor temporal, DateTimeFormatter formatter) { - // normal case first + // normal case first (early return is an optimization) Chronology overrideChrono = formatter.getChronology(); ZoneId overrideZone = formatter.getZone(); if (overrideChrono == null && overrideZone == null) { return temporal; } - // ensure minimal change - Chronology temporalChrono = Chronology.from(temporal); // default to ISO, handles Instant - ZoneId temporalZone = temporal.query(Queries.zone()); // zone then offset, handles OffsetDateTime - if (temporal.isSupported(EPOCH_DAY) == false || Objects.equals(overrideChrono, temporalChrono)) { + // ensure minimal change (early return is an optimization) + Chronology temporalChrono = temporal.query(TemporalQuery.chronology()); + ZoneId temporalZone = temporal.query(TemporalQuery.zoneId()); + if (Objects.equals(overrideChrono, temporalChrono)) { overrideChrono = null; } - if (temporal.isSupported(INSTANT_SECONDS) == false || Objects.equals(overrideZone, temporalZone)) { + if (Objects.equals(overrideZone, temporalZone)) { overrideZone = null; } if (overrideChrono == null && overrideZone == null) { @@ -139,53 +141,83 @@ final class DateTimePrintContext { } // make adjustment - if (overrideChrono != null && overrideZone != null) { - return overrideChrono.zonedDateTime(Instant.from(temporal), overrideZone); - } else if (overrideZone != null) { - return temporalChrono.zonedDateTime(Instant.from(temporal), overrideZone); - } else { // overrideChrono != null - // need class here to handle non-standard cases - final ChronoLocalDate date = overrideChrono.date(temporal); - return new TemporalAccessor() { - @Override - public boolean isSupported(TemporalField field) { - return temporal.isSupported(field); - } - @Override - public ValueRange range(TemporalField field) { - if (field instanceof ChronoField) { - if (((ChronoField) field).isDateField()) { - return date.range(field); - } else { - return temporal.range(field); - } - } - return field.rangeRefinedBy(this); - } - @Override - public long getLong(TemporalField field) { - if (field instanceof ChronoField) { - if (((ChronoField) field).isDateField()) { - return date.getLong(field); - } else { - return temporal.getLong(field); - } - } - return field.getFrom(this); - } - @SuppressWarnings("unchecked") - @Override - public R query(TemporalQuery query) { - if (query == Queries.chronology()) { - return (R) date.getChronology(); - } - if (query == Queries.zoneId() || query == Queries.precision()) { - return temporal.query(query); - } - return query.queryFrom(this); - } - }; + final Chronology effectiveChrono = (overrideChrono != null ? overrideChrono : temporalChrono); + if (overrideZone != null) { + // if have zone and instant, calculation is simple, defaulting chrono if necessary + if (temporal.isSupported(INSTANT_SECONDS)) { + Chronology chrono = (effectiveChrono != null ? effectiveChrono : IsoChronology.INSTANCE); + return chrono.zonedDateTime(Instant.from(temporal), overrideZone); + } + // block changing zone on OffsetTime, and similar problem cases + if (overrideZone.normalized() instanceof ZoneOffset && temporal.isSupported(OFFSET_SECONDS) && + temporal.get(OFFSET_SECONDS) != overrideZone.getRules().getOffset(Instant.EPOCH).getTotalSeconds()) { + throw new DateTimeException("Unable to apply override zone '" + overrideZone + + "' because the temporal object being formatted has a different offset but" + + " does not represent an instant: " + temporal); + } } + final ZoneId effectiveZone = (overrideZone != null ? overrideZone : temporalZone); + final ChronoLocalDate effectiveDate; + if (overrideChrono != null) { + if (temporal.isSupported(EPOCH_DAY)) { + effectiveDate = effectiveChrono.date(temporal); + } else { + // check for date fields other than epoch-day, ignoring case of converting null to ISO + if (!(overrideChrono == IsoChronology.INSTANCE && temporalChrono == null)) { + for (ChronoField f : ChronoField.values()) { + if (f.isDateBased() && temporal.isSupported(f)) { + throw new DateTimeException("Unable to apply override chronology '" + overrideChrono + + "' because the temporal object being formatted contains date fields but" + + " does not represent a whole date: " + temporal); + } + } + } + effectiveDate = null; + } + } else { + effectiveDate = null; + } + + // combine available data + // this is a non-standard temporal that is almost a pure delegate + // this better handles map-like underlying temporal instances + return new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + if (effectiveDate != null && field.isDateBased()) { + return effectiveDate.isSupported(field); + } + return temporal.isSupported(field); + } + @Override + public ValueRange range(TemporalField field) { + if (effectiveDate != null && field.isDateBased()) { + return effectiveDate.range(field); + } + return temporal.range(field); + } + @Override + public long getLong(TemporalField field) { + if (effectiveDate != null && field.isDateBased()) { + return effectiveDate.getLong(field); + } + return temporal.getLong(field); + } + @SuppressWarnings("unchecked") + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.chronology()) { + return (R) effectiveChrono; + } + if (query == TemporalQuery.zoneId()) { + return (R) effectiveZone; + } + if (query == TemporalQuery.precision()) { + return temporal.query(query); + } + return query.queryFrom(this); + } + }; } //----------------------------------------------------------------------- diff --git a/jdk/src/share/classes/java/time/format/DateTimeTextProvider.java b/jdk/src/share/classes/java/time/format/DateTimeTextProvider.java index 5127f0c80b5..7262c5b3341 100644 --- a/jdk/src/share/classes/java/time/format/DateTimeTextProvider.java +++ b/jdk/src/share/classes/java/time/format/DateTimeTextProvider.java @@ -70,6 +70,7 @@ import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; import java.time.chrono.JapaneseChronology; import java.time.temporal.ChronoField; +import java.time.temporal.IsoFields; import java.time.temporal.TemporalField; import java.util.AbstractMap.SimpleImmutableEntry; import java.util.ArrayList; @@ -82,10 +83,13 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; +import java.util.ResourceBundle; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import sun.util.locale.provider.CalendarDataUtility; +import sun.util.locale.provider.LocaleProviderAdapter; +import sun.util.locale.provider.LocaleResources; /** * A provider to obtain the textual form of a date-time field. @@ -141,15 +145,6 @@ class DateTimeTextProvider { return null; } - private static int toStyle(TextStyle style) { - if (style == TextStyle.FULL) { - return Calendar.LONG_FORMAT; - } else if (style == TextStyle.SHORT) { - return Calendar.SHORT_FORMAT; - } - return Calendar.NARROW_STANDALONE; - } - /** * Gets the text for the specified chrono, field, locale and style * for the purpose of formatting. @@ -158,7 +153,7 @@ class DateTimeTextProvider { * The null return value should be used if there is no applicable text, or * if the text would be a numeric representation of the value. * - * @param chrono the Chronology to get text for, not null + * @param chrono the Chronology to get text for, not null * @param field the field to get text for, not null * @param value the field value to get text for, not null * @param style the style to get text for, not null @@ -200,8 +195,8 @@ class DateTimeTextProvider { } else { return null; } - return CalendarDataUtility.retrieveCldrFieldValueName( - chrono.getCalendarType(), fieldIndex, fieldValue, toStyle(style), locale); + return CalendarDataUtility.retrieveJavaTimeFieldValueName( + chrono.getCalendarType(), fieldIndex, fieldValue, style.toCalendarStyle(), locale); } /** @@ -238,7 +233,7 @@ class DateTimeTextProvider { * if the text would be a numeric representation of the value. * Text can only be parsed if all the values for that field-style-locale combination are unique. * - * @param chrono the Chronology to get text for, not null + * @param chrono the Chronology to get text for, not null * @param field the field to get text for, not null * @param style the style to get text for, null for all parsable text * @param locale the locale to get text for, not null @@ -270,17 +265,17 @@ class DateTimeTextProvider { return null; } - Map map = CalendarDataUtility.retrieveCldrFieldValueNames( - chrono.getCalendarType(), fieldIndex, toStyle(style), locale); + int calendarStyle = (style == null) ? Calendar.ALL_STYLES : style.toCalendarStyle(); + Map map = CalendarDataUtility.retrieveJavaTimeFieldValueNames( + chrono.getCalendarType(), fieldIndex, calendarStyle, locale); if (map == null) { return null; } - List> list = new ArrayList<>(map.size()); switch (fieldIndex) { case Calendar.ERA: - for (String key : map.keySet()) { - int era = map.get(key); + for (Map.Entry entry : map.entrySet()) { + int era = entry.getValue(); if (chrono == JapaneseChronology.INSTANCE) { if (era == 0) { era = -999; @@ -288,22 +283,22 @@ class DateTimeTextProvider { era -= 2; } } - list.add(createEntry(key, (long) era)); + list.add(createEntry(entry.getKey(), (long)era)); } break; case Calendar.MONTH: - for (String key : map.keySet()) { - list.add(createEntry(key, (long)(map.get(key) + 1))); + for (Map.Entry entry : map.entrySet()) { + list.add(createEntry(entry.getKey(), (long)(entry.getValue() + 1))); } break; case Calendar.DAY_OF_WEEK: - for (String key : map.keySet()) { - list.add(createEntry(key, (long)toWeekDay(map.get(key)))); + for (Map.Entry entry : map.entrySet()) { + list.add(createEntry(entry.getKey(), (long)toWeekDay(entry.getValue()))); } break; default: - for (String key : map.keySet()) { - list.add(createEntry(key, (long)map.get(key))); + for (Map.Entry entry : map.entrySet()) { + list.add(createEntry(entry.getKey(), (long)entry.getValue())); } break; } @@ -333,11 +328,47 @@ class DateTimeTextProvider { Map> styleMap = new HashMap<>(); if (field == ERA) { for (TextStyle textStyle : TextStyle.values()) { + if (textStyle.isStandalone()) { + // Stand-alone isn't applicable to era names. + continue; + } + Map displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames( + "gregory", Calendar.ERA, textStyle.toCalendarStyle(), locale); + if (displayNames != null) { + Map map = new HashMap<>(); + for (Entry entry : displayNames.entrySet()) { + map.put((long) entry.getValue(), entry.getKey()); + } + if (!map.isEmpty()) { + styleMap.put(textStyle, map); + } + } + } + return new LocaleStore(styleMap); + } + + if (field == MONTH_OF_YEAR) { + for (TextStyle textStyle : TextStyle.values()) { + Map displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames( + "gregory", Calendar.MONTH, textStyle.toCalendarStyle(), locale); Map map = new HashMap<>(); - for (Entry entry : - CalendarDataUtility.retrieveCldrFieldValueNames( - "gregory", Calendar.ERA, toStyle(textStyle), locale).entrySet()) { - map.put((long) entry.getValue(), entry.getKey()); + if (displayNames != null) { + for (Entry entry : displayNames.entrySet()) { + map.put((long) (entry.getValue() + 1), entry.getKey()); + } + + } else { + // Narrow names may have duplicated names, such as "J" for January, Jun, July. + // Get names one by one in that case. + for (int month = Calendar.JANUARY; month <= Calendar.DECEMBER; month++) { + String name; + name = CalendarDataUtility.retrieveJavaTimeFieldValueName( + "gregory", Calendar.MONTH, month, textStyle.toCalendarStyle(), locale); + if (name == null) { + break; + } + map.put((long) (month + 1), name); + } } if (!map.isEmpty()) { styleMap.put(textStyle, map); @@ -346,72 +377,77 @@ class DateTimeTextProvider { return new LocaleStore(styleMap); } - if (field == MONTH_OF_YEAR) { - Map map = new HashMap<>(); - for (Entry entry : - CalendarDataUtility.retrieveCldrFieldValueNames( - "gregory", Calendar.MONTH, Calendar.LONG_FORMAT, locale).entrySet()) { - map.put((long) (entry.getValue() + 1), entry.getKey()); - } - styleMap.put(TextStyle.FULL, map); + if (field == DAY_OF_WEEK) { + for (TextStyle textStyle : TextStyle.values()) { + Map displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames( + "gregory", Calendar.DAY_OF_WEEK, textStyle.toCalendarStyle(), locale); + Map map = new HashMap<>(); + if (displayNames != null) { + for (Entry entry : displayNames.entrySet()) { + map.put((long)toWeekDay(entry.getValue()), entry.getKey()); + } - map = new HashMap<>(); - for (Entry entry : - CalendarDataUtility.retrieveCldrFieldValueNames( - "gregory", Calendar.MONTH, Calendar.SHORT_FORMAT, locale).entrySet()) { - map.put((long) (entry.getValue() + 1), entry.getKey()); - } - styleMap.put(TextStyle.SHORT, map); - - map = new HashMap<>(); - for (int month = Calendar.JANUARY; month <= Calendar.DECEMBER; month++) { - String name; - name = CalendarDataUtility.retrieveCldrFieldValueName( - "gregory", Calendar.MONTH, month, Calendar.NARROW_STANDALONE, locale); - if (name != null) { - map.put((long)(month + 1), name); + } else { + // Narrow names may have duplicated names, such as "S" for Sunday and Saturday. + // Get names one by one in that case. + for (int wday = Calendar.SUNDAY; wday <= Calendar.SATURDAY; wday++) { + String name; + name = CalendarDataUtility.retrieveJavaTimeFieldValueName( + "gregory", Calendar.DAY_OF_WEEK, wday, textStyle.toCalendarStyle(), locale); + if (name == null) { + break; + } + map.put((long)toWeekDay(wday), name); + } + } + if (!map.isEmpty()) { + styleMap.put(textStyle, map); } } - if (!map.isEmpty()) { - styleMap.put(TextStyle.NARROW, map); - } - return new LocaleStore(styleMap); - } - - if (field == DAY_OF_WEEK) { - Map map = new HashMap<>(); - for (Entry entry : - CalendarDataUtility.retrieveCldrFieldValueNames( - "gregory", Calendar.DAY_OF_WEEK, Calendar.LONG_FORMAT, locale).entrySet()) { - map.put((long)toWeekDay(entry.getValue()), entry.getKey()); - } - styleMap.put(TextStyle.FULL, map); - map = new HashMap<>(); - for (Entry entry : - CalendarDataUtility.retrieveCldrFieldValueNames( - "gregory", Calendar.DAY_OF_WEEK, Calendar.SHORT_FORMAT, locale).entrySet()) { - map.put((long) toWeekDay(entry.getValue()), entry.getKey()); - } - styleMap.put(TextStyle.SHORT, map); - map = new HashMap<>(); - for (int wday = Calendar.SUNDAY; wday <= Calendar.SATURDAY; wday++) { - map.put((long) toWeekDay(wday), - CalendarDataUtility.retrieveCldrFieldValueName( - "gregory", Calendar.DAY_OF_WEEK, wday, Calendar.NARROW_FORMAT, locale)); - } - styleMap.put(TextStyle.NARROW, map); return new LocaleStore(styleMap); } if (field == AMPM_OF_DAY) { - Map map = new HashMap<>(); - for (Entry entry : - CalendarDataUtility.retrieveCldrFieldValueNames( - "gregory", Calendar.AM_PM, Calendar.LONG_FORMAT, locale).entrySet()) { - map.put((long) entry.getValue(), entry.getKey()); + for (TextStyle textStyle : TextStyle.values()) { + if (textStyle.isStandalone()) { + // Stand-alone isn't applicable to AM/PM. + continue; + } + Map displayNames = CalendarDataUtility.retrieveJavaTimeFieldValueNames( + "gregory", Calendar.AM_PM, textStyle.toCalendarStyle(), locale); + if (displayNames != null) { + Map map = new HashMap<>(); + for (Entry entry : displayNames.entrySet()) { + map.put((long) entry.getValue(), entry.getKey()); + } + if (!map.isEmpty()) { + styleMap.put(textStyle, map); + } + } + } + return new LocaleStore(styleMap); + } + + if (field == IsoFields.QUARTER_OF_YEAR) { + // The order of keys must correspond to the TextStyle.values() order. + final String[] keys = { + "QuarterNames", + "standalone.QuarterNames", + "QuarterAbbreviations", + "standalone.QuarterAbbreviations", + "QuarterNarrows", + "standalone.QuarterNarrows", + }; + for (int i = 0; i < keys.length; i++) { + String[] names = getLocalizedResource(keys[i], locale); + if (names != null) { + Map map = new HashMap<>(); + for (int q = 0; q < names.length; q++) { + map.put((long) (q + 1), names[q]); + } + styleMap.put(TextStyle.values()[i], map); + } } - styleMap.put(TextStyle.FULL, map); - styleMap.put(TextStyle.SHORT, map); // re-use, as we don't have different data return new LocaleStore(styleMap); } @@ -429,6 +465,23 @@ class DateTimeTextProvider { return new SimpleImmutableEntry<>(text, field); } + /** + * Returns the localized resource of the given key and locale, or null + * if no localized resource is available. + * + * @param key the key of the localized resource, not null + * @param locale the locale, not null + * @return the localized resource, or null if not available + * @throws NullPointerException if key or locale is null + */ + @SuppressWarnings("unchecked") + static T getLocalizedResource(String key, Locale locale) { + LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased() + .getLocaleResources(locale); + ResourceBundle rb = lr.getJavaTimeFormatData(); + return rb.containsKey(key) ? (T) rb.getObject(key) : null; + } + /** * Stores the text for a single locale. *

      @@ -457,9 +510,9 @@ class DateTimeTextProvider { this.valueTextMap = valueTextMap; Map>> map = new HashMap<>(); List> allList = new ArrayList<>(); - for (TextStyle style : valueTextMap.keySet()) { + for (Map.Entry> vtmEntry : valueTextMap.entrySet()) { Map> reverse = new HashMap<>(); - for (Map.Entry entry : valueTextMap.get(style).entrySet()) { + for (Map.Entry entry : vtmEntry.getValue().entrySet()) { if (reverse.put(entry.getValue(), createEntry(entry.getValue(), entry.getKey())) != null) { // TODO: BUG: this has no effect continue; // not parsable, try next style @@ -467,7 +520,7 @@ class DateTimeTextProvider { } List> list = new ArrayList<>(reverse.values()); Collections.sort(list, COMPARATOR); - map.put(style, list); + map.put(vtmEntry.getKey(), list); allList.addAll(list); map.put(null, allList); } diff --git a/jdk/src/share/classes/java/time/format/Parsed.java b/jdk/src/share/classes/java/time/format/Parsed.java new file mode 100644 index 00000000000..a35fab1b9d8 --- /dev/null +++ b/jdk/src/share/classes/java/time/format/Parsed.java @@ -0,0 +1,482 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Copyright (c) 2008-2013, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package java.time.format; + +import static java.time.temporal.ChronoField.AMPM_OF_DAY; +import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; +import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; +import static java.time.temporal.ChronoField.HOUR_OF_AMPM; +import static java.time.temporal.ChronoField.HOUR_OF_DAY; +import static java.time.temporal.ChronoField.MICRO_OF_DAY; +import static java.time.temporal.ChronoField.MICRO_OF_SECOND; +import static java.time.temporal.ChronoField.MILLI_OF_DAY; +import static java.time.temporal.ChronoField.MILLI_OF_SECOND; +import static java.time.temporal.ChronoField.MINUTE_OF_DAY; +import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; +import static java.time.temporal.ChronoField.NANO_OF_DAY; +import static java.time.temporal.ChronoField.NANO_OF_SECOND; +import static java.time.temporal.ChronoField.SECOND_OF_DAY; +import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; + +import java.time.DateTimeException; +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; +import java.time.temporal.ChronoField; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQuery; +import java.time.temporal.UnsupportedTemporalTypeException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.Set; + +/** + * A store of parsed data. + *

      + * This class is used during parsing to collect the data. Part of the parsing process + * involves handling optional blocks and multiple copies of the data get created to + * support the necessary backtracking. + *

      + * Once parsing is completed, this class can be used as the resultant {@code TemporalAccessor}. + * In most cases, it is only exposed once the fields have been resolved. + * + *

      Specification for implementors

      + * This class is a mutable context intended for use from a single thread. + * Usage of the class is thread-safe within standard parsing as a new instance of this class + * is automatically created for each parse and parsing is single-threaded + * + * @since 1.8 + */ +final class Parsed implements TemporalAccessor { + // some fields are accessed using package scope from DateTimeParseContext + + /** + * The parsed fields. + */ + final Map fieldValues = new HashMap<>(); + /** + * The parsed zone. + */ + ZoneId zone; + /** + * The parsed chronology. + */ + Chronology chrono; + /** + * The effective chronology. + */ + Chronology effectiveChrono; + /** + * The resolver style to use. + */ + private ResolverStyle resolverStyle; + /** + * The resolved date. + */ + private ChronoLocalDate date; + /** + * The resolved time. + */ + private LocalTime time; + + /** + * Creates an instance. + */ + Parsed() { + } + + /** + * Creates a copy. + */ + Parsed copy() { + // only copy fields used in parsing stage + Parsed cloned = new Parsed(); + cloned.fieldValues.putAll(this.fieldValues); + cloned.zone = this.zone; + cloned.chrono = this.chrono; + return cloned; + } + + //----------------------------------------------------------------------- + @Override + public boolean isSupported(TemporalField field) { + if (fieldValues.containsKey(field) || + (date != null && date.isSupported(field)) || + (time != null && time.isSupported(field))) { + return true; + } + return field != null && (field instanceof ChronoField == false) && field.isSupportedBy(this); + } + + @Override + public long getLong(TemporalField field) { + Objects.requireNonNull(field, "field"); + Long value = fieldValues.get(field); + if (value != null) { + return value; + } + if (date != null && date.isSupported(field)) { + return date.getLong(field); + } + if (time != null && time.isSupported(field)) { + return time.getLong(field); + } + if (field instanceof ChronoField) { + throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); + } + return field.getFrom(this); + } + + @SuppressWarnings("unchecked") + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.zoneId()) { + return (R) zone; + } else if (query == TemporalQuery.chronology()) { + return (R) chrono; + } else if (query == TemporalQuery.localDate()) { + return (R) (date != null ? LocalDate.from(date) : null); + } else if (query == TemporalQuery.localTime()) { + return (R) time; + } else if (query == TemporalQuery.zone() || query == TemporalQuery.offset()) { + return query.queryFrom(this); + } else if (query == TemporalQuery.precision()) { + return null; // not a complete date/time + } + // inline TemporalAccessor.super.query(query) as an optimization + // non-JDK classes are not permitted to make this optimization + return query.queryFrom(this); + } + + //----------------------------------------------------------------------- + /** + * Resolves the fields in this context. + * + * @param resolverStyle the resolver style, not null + * @param resolverFields the fields to use for resolving, null for all fields + * @return this, for method chaining + * @throws DateTimeException if resolving one field results in a value for + * another field that is in conflict + */ + TemporalAccessor resolve(ResolverStyle resolverStyle, Set resolverFields) { + if (resolverFields != null) { + fieldValues.keySet().retainAll(resolverFields); + } + this.resolverStyle = resolverStyle; + chrono = effectiveChrono; + resolveFields(); + resolveTimeLenient(); + crossCheck(); + return this; + } + + //----------------------------------------------------------------------- + private void resolveFields() { + // resolve ChronoField + resolveDateFields(); + resolveTimeFields(); + + // if any other fields, handle them + // any lenient date resolution should return epoch-day + if (fieldValues.size() > 0) { + boolean changed = false; + outer: + while (true) { + for (Map.Entry entry : fieldValues.entrySet()) { + TemporalField targetField = entry.getKey(); + Map changes = targetField.resolve(this, entry.getValue(), resolverStyle); + if (changes != null) { + changed = true; + resolveFieldsMakeChanges(targetField, changes); + fieldValues.remove(targetField); // helps avoid infinite loops + continue outer; // have to restart to avoid concurrent modification + } + } + break; + } + // if something changed then have to redo ChronoField resolve + if (changed) { + resolveDateFields(); + resolveTimeFields(); + } + } + } + + private void resolveFieldsMakeChanges(TemporalField targetField, Map changes) { + for (Map.Entry change : changes.entrySet()) { + TemporalField changeField = change.getKey(); + Long changeValue = change.getValue(); + Objects.requireNonNull(changeField, "changeField"); + if (changeValue != null) { + updateCheckConflict(targetField, changeField, changeValue); + } else { + fieldValues.remove(changeField); + } + } + } + + private void updateCheckConflict(TemporalField targetField, TemporalField changeField, Long changeValue) { + Long old = fieldValues.put(changeField, changeValue); + if (old != null && old.longValue() != changeValue.longValue()) { + throw new DateTimeException("Conflict found: " + changeField + " " + old + + " differs from " + changeField + " " + changeValue + + " while resolving " + targetField); + } + } + + //----------------------------------------------------------------------- + private void resolveDateFields() { + updateCheckConflict(chrono.resolveDate(fieldValues, resolverStyle)); + } + + private void updateCheckConflict(ChronoLocalDate cld) { + if (date != null) { + if (cld != null && date.equals(cld) == false) { + throw new DateTimeException("Conflict found: Fields resolved to two different dates: " + date + " " + cld); + } + } else { + date = cld; + } + } + + //----------------------------------------------------------------------- + private void resolveTimeFields() { + // simplify fields + if (fieldValues.containsKey(CLOCK_HOUR_OF_DAY)) { + long ch = fieldValues.remove(CLOCK_HOUR_OF_DAY); + updateCheckConflict(CLOCK_HOUR_OF_DAY, HOUR_OF_DAY, ch == 24 ? 0 : ch); + } + if (fieldValues.containsKey(CLOCK_HOUR_OF_AMPM)) { + long ch = fieldValues.remove(CLOCK_HOUR_OF_AMPM); + updateCheckConflict(CLOCK_HOUR_OF_AMPM, HOUR_OF_AMPM, ch == 12 ? 0 : ch); + } + if (fieldValues.containsKey(AMPM_OF_DAY) && fieldValues.containsKey(HOUR_OF_AMPM)) { + long ap = fieldValues.remove(AMPM_OF_DAY); + long hap = fieldValues.remove(HOUR_OF_AMPM); + updateCheckConflict(AMPM_OF_DAY, HOUR_OF_DAY, ap * 12 + hap); + } + if (fieldValues.containsKey(MICRO_OF_DAY)) { + long cod = fieldValues.remove(MICRO_OF_DAY); + updateCheckConflict(MICRO_OF_DAY, SECOND_OF_DAY, cod / 1_000_000L); + updateCheckConflict(MICRO_OF_DAY, MICRO_OF_SECOND, cod % 1_000_000L); + } + if (fieldValues.containsKey(MILLI_OF_DAY)) { + long lod = fieldValues.remove(MILLI_OF_DAY); + updateCheckConflict(MILLI_OF_DAY, SECOND_OF_DAY, lod / 1_000); + updateCheckConflict(MILLI_OF_DAY, MILLI_OF_SECOND, lod % 1_000); + } + if (fieldValues.containsKey(SECOND_OF_DAY)) { + long sod = fieldValues.remove(SECOND_OF_DAY); + updateCheckConflict(SECOND_OF_DAY, HOUR_OF_DAY, sod / 3600); + updateCheckConflict(SECOND_OF_DAY, MINUTE_OF_HOUR, (sod / 60) % 60); + updateCheckConflict(SECOND_OF_DAY, SECOND_OF_MINUTE, sod % 60); + } + if (fieldValues.containsKey(MINUTE_OF_DAY)) { + long mod = fieldValues.remove(MINUTE_OF_DAY); + updateCheckConflict(MINUTE_OF_DAY, HOUR_OF_DAY, mod / 60); + updateCheckConflict(MINUTE_OF_DAY, MINUTE_OF_HOUR, mod % 60); + } + + // combine partial second fields strictly, leaving lenient expansion to later + if (fieldValues.containsKey(NANO_OF_SECOND)) { + long nos = fieldValues.get(NANO_OF_SECOND); + if (fieldValues.containsKey(MICRO_OF_SECOND)) { + long cos = fieldValues.remove(MICRO_OF_SECOND); + nos = cos * 1000 + (nos % 1000); + updateCheckConflict(MICRO_OF_SECOND, NANO_OF_SECOND, nos); + } + if (fieldValues.containsKey(MILLI_OF_SECOND)) { + long los = fieldValues.remove(MILLI_OF_SECOND); + updateCheckConflict(MILLI_OF_SECOND, NANO_OF_SECOND, los * 1_000_000L + (nos % 1_000_000L)); + } + } + + // convert to time if possible + if (fieldValues.containsKey(NANO_OF_DAY)) { + long nod = fieldValues.remove(NANO_OF_DAY); + updateCheckConflict(LocalTime.ofNanoOfDay(nod)); + } + if (fieldValues.containsKey(HOUR_OF_DAY) && fieldValues.containsKey(MINUTE_OF_HOUR) && + fieldValues.containsKey(SECOND_OF_MINUTE) && fieldValues.containsKey(NANO_OF_SECOND)) { + int hodVal = HOUR_OF_DAY.checkValidIntValue(fieldValues.remove(HOUR_OF_DAY)); + int mohVal = MINUTE_OF_HOUR.checkValidIntValue(fieldValues.remove(MINUTE_OF_HOUR)); + int somVal = SECOND_OF_MINUTE.checkValidIntValue(fieldValues.remove(SECOND_OF_MINUTE)); + int nosVal = NANO_OF_SECOND.checkValidIntValue(fieldValues.remove(NANO_OF_SECOND)); + updateCheckConflict(LocalTime.of(hodVal, mohVal, somVal, nosVal)); + } + } + + private void resolveTimeLenient() { + // leniently create a time from incomplete information + // done after everything else as it creates information from nothing + // which would break updateCheckConflict(field) + + if (time == null) { + // can only get here if NANO_OF_SECOND not present + if (fieldValues.containsKey(MILLI_OF_SECOND)) { + long los = fieldValues.remove(MILLI_OF_SECOND); + if (fieldValues.containsKey(MICRO_OF_SECOND)) { + // merge milli-of-second and micro-of-second for better error message + long cos = los * 1_000 + (fieldValues.get(MICRO_OF_SECOND) % 1_000); + updateCheckConflict(MILLI_OF_SECOND, MICRO_OF_SECOND, cos); + fieldValues.remove(MICRO_OF_SECOND); + fieldValues.put(NANO_OF_SECOND, cos * 1_000L); + } else { + // convert milli-of-second to nano-of-second + fieldValues.put(NANO_OF_SECOND, los * 1_000_000L); + } + } else if (fieldValues.containsKey(MICRO_OF_SECOND)) { + // convert micro-of-second to nano-of-second + long cos = fieldValues.remove(MICRO_OF_SECOND); + fieldValues.put(NANO_OF_SECOND, cos * 1_000L); + } + } + + // merge hour/minute/second/nano leniently + Long hod = fieldValues.get(HOUR_OF_DAY); + if (hod != null) { + int hodVal = HOUR_OF_DAY.checkValidIntValue(hod); + Long moh = fieldValues.get(MINUTE_OF_HOUR); + Long som = fieldValues.get(SECOND_OF_MINUTE); + Long nos = fieldValues.get(NANO_OF_SECOND); + + // check for invalid combinations that cannot be defaulted + if (time == null) { + if ((moh == null && (som != null || nos != null)) || + (moh != null && som == null && nos != null)) { + return; + } + } + + // default as necessary and build time + int mohVal = (moh != null ? MINUTE_OF_HOUR.checkValidIntValue(moh) : (time != null ? time.getMinute() : 0)); + int somVal = (som != null ? SECOND_OF_MINUTE.checkValidIntValue(som) : (time != null ? time.getSecond() : 0)); + int nosVal = (nos != null ? NANO_OF_SECOND.checkValidIntValue(nos) : (time != null ? time.getNano() : 0)); + updateCheckConflict(LocalTime.of(hodVal, mohVal, somVal, nosVal)); + fieldValues.remove(HOUR_OF_DAY); + fieldValues.remove(MINUTE_OF_HOUR); + fieldValues.remove(SECOND_OF_MINUTE); + fieldValues.remove(NANO_OF_SECOND); + } + } + + private void updateCheckConflict(LocalTime lt) { + if (time != null) { + if (lt != null && time.equals(lt) == false) { + throw new DateTimeException("Conflict found: Fields resolved to two different times: " + time + " " + lt); + } + } else { + time = lt; + } + } + + //----------------------------------------------------------------------- + private void crossCheck() { + // only cross-check date, time and date-time + // avoid object creation if possible + if (date != null) { + crossCheck(date); + } + if (time != null) { + crossCheck(time); + if (date != null && fieldValues.size() > 0) { + crossCheck(date.atTime(time)); + } + } + } + + private void crossCheck(TemporalAccessor target) { + for (Iterator> it = fieldValues.entrySet().iterator(); it.hasNext(); ) { + Entry entry = it.next(); + TemporalField field = entry.getKey(); + long val1; + try { + val1 = target.getLong(field); + } catch (RuntimeException ex) { + continue; + } + long val2 = entry.getValue(); + if (val1 != val2) { + throw new DateTimeException("Conflict found: Field " + field + " " + val1 + + " differs from " + field + " " + val2 + " derived from " + target); + } + it.remove(); + } + } + + //----------------------------------------------------------------------- + @Override + public String toString() { + String str = fieldValues.toString() + "," + chrono + "," + zone; + if (date != null || time != null) { + str += " resolved to " + date + "," + time; + } + return str; + } + +} diff --git a/jdk/src/share/classes/java/time/format/ResolverStyle.java b/jdk/src/share/classes/java/time/format/ResolverStyle.java new file mode 100644 index 00000000000..b53b827ab8d --- /dev/null +++ b/jdk/src/share/classes/java/time/format/ResolverStyle.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Copyright (c) 2008-2013, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package java.time.format; + +/** + * Enumeration of different ways to resolve dates and times. + *

      + * Parsing a text string occurs in two phases. + * Phase 1 is a basic text parse according to the fields added to the builder. + * Phase 2 resolves the parsed field-value pairs into date and/or time objects. + * This style is used to control how phase 2, resolving, happens. + * + *

      Specification for implementors

      + * This is an immutable and thread-safe enum. + * + * @since 1.8 + */ +public enum ResolverStyle { + + /** + * Style to resolve dates and times strictly. + *

      + * Using strict resolution will ensure that all parsed values are within + * the outer range of valid values for the field. Individual fields may + * be further processed for strictness. + *

      + * For example, resolving year-month and day-of-month in the ISO calendar + * system using strict mode will ensure that the day-of-month is valid + * for the year-month, rejecting invalid values. + */ + STRICT, + /** + * Style to resolve dates and times in a smart, or intelligent, manner. + *

      + * Using smart resolution will perform the sensible default for each + * field, which may be the same as strict, the same as lenient, or a third + * behavior. Individual fields will interpret this differently. + *

      + * For example, resolving year-month and day-of-month in the ISO calendar + * system using smart mode will ensure that the day-of-month is valid + * for the year-month, rejecting invalid values, with the exception that + * February 29th in a year other than a leap year will be converted to + * February 28th. + */ + SMART, + /** + * Style to resolve dates and times leniently. + *

      + * Using lenient resolution will resolve the values in an appropriate + * lenient manner. Individual fields will interpret this differently. + *

      + * For example, lenient mode allows the month in the ISO calendar system + * to be outside the range 1 to 12. + */ + LENIENT; + +} diff --git a/jdk/src/share/classes/java/time/format/TextStyle.java b/jdk/src/share/classes/java/time/format/TextStyle.java index 3f8c0875afe..dbc2c27f0d0 100644 --- a/jdk/src/share/classes/java/time/format/TextStyle.java +++ b/jdk/src/share/classes/java/time/format/TextStyle.java @@ -61,33 +61,115 @@ */ package java.time.format; +import java.util.Calendar; + /** - * Enumeration of the style of text output to use. + * Enumeration of the style of text formatting and parsing. *

      - * This defines the "size" of the text to be output. + * Text styles define three sizes for the formatted text - 'full', 'short' and 'narrow'. + * Each of these three sizes is available in both 'standard' and 'stand-alone' variations. + *

      + * The difference between the three sizes is obvious in most languages. + * For example, in English the 'full' month is 'January', the 'short' month is 'Jan' + * and the 'narrow' month is 'J'. Note that the narrow size is often not unique. + * For example, 'January', 'June' and 'July' all have the 'narrow' text 'J'. + *

      + * The difference between the 'standard' and 'stand-alone' forms is trickier to describe + * as there is no difference in English. However, in other languages there is a difference + * in the word used when the text is used alone, as opposed to in a complete date. + * For example, the word used for a month when used alone in a date picker is different + * to the word used for month in association with a day and year in a date. * *

      Specification for implementors

      * This is immutable and thread-safe enum. - * - * @since 1.8 */ public enum TextStyle { // ordered from large to small + // ordered so that bit 0 of the ordinal indicates stand-alone. /** * Full text, typically the full description. * For example, day-of-week Monday might output "Monday". */ - FULL, + FULL(Calendar.LONG_FORMAT, 0), + /** + * Full text for stand-alone use, typically the full description. + * For example, day-of-week Monday might output "Monday". + */ + FULL_STANDALONE(Calendar.LONG_STANDALONE, 0), /** * Short text, typically an abbreviation. * For example, day-of-week Monday might output "Mon". */ - SHORT, + SHORT(Calendar.SHORT_FORMAT, 1), + /** + * Short text for stand-alone use, typically an abbreviation. + * For example, day-of-week Monday might output "Mon". + */ + SHORT_STANDALONE(Calendar.SHORT_STANDALONE, 1), /** * Narrow text, typically a single letter. * For example, day-of-week Monday might output "M". */ - NARROW; + NARROW(Calendar.NARROW_FORMAT, 1), + /** + * Narrow text for stand-alone use, typically a single letter. + * For example, day-of-week Monday might output "M". + */ + NARROW_STANDALONE(Calendar.NARROW_STANDALONE, 1); + private final int calendarStyle; + private final int zoneNameStyleIndex; + + private TextStyle(int calendarStyle, int zoneNameStyleIndex) { + this.calendarStyle = calendarStyle; + this.zoneNameStyleIndex = zoneNameStyleIndex; + } + + /** + * Returns true if the Style is a stand-alone style. + * @return true if the style is a stand-alone style. + */ + public boolean isStandalone() { + return (ordinal() & 1) == 1; + } + + /** + * Returns the stand-alone style with the same size. + * @return the stand-alone style with the same size + */ + public TextStyle asStandalone() { + return TextStyle.values()[ordinal() | 1]; + } + + /** + * Returns the normal style with the same size. + * + * @return the normal style with the same size + */ + public TextStyle asNormal() { + return TextStyle.values()[ordinal() & ~1]; + } + + /** + * Returns the {@code Calendar} style corresponding to this {@code TextStyle}. + * + * @return the corresponding {@code Calendar} style + */ + int toCalendarStyle() { + return calendarStyle; + } + + /** + * Returns the relative index value to an element of the {@link + * java.text.DateFormatSymbols#getZoneStrings() DateFormatSymbols.getZoneStrings()} + * value, 0 for long names and 1 for short names (abbreviations). Note that these values + * do not correspond to the {@link java.util.TimeZone#LONG} and {@link + * java.util.TimeZone#SHORT} values. + * + * @return the relative index value to time zone names array + */ + int zoneNameStyleIndex() { + return zoneNameStyleIndex; + } } diff --git a/jdk/src/share/classes/java/time/temporal/ChronoField.java b/jdk/src/share/classes/java/time/temporal/ChronoField.java index 2a421157a5e..0fdeb2273d5 100644 --- a/jdk/src/share/classes/java/time/temporal/ChronoField.java +++ b/jdk/src/share/classes/java/time/temporal/ChronoField.java @@ -76,6 +76,11 @@ import java.time.Year; import java.time.ZoneOffset; import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; +import java.util.Locale; +import java.util.Objects; +import java.util.ResourceBundle; +import sun.util.locale.provider.LocaleProviderAdapter; +import sun.util.locale.provider.LocaleResources; /** * A standard set of fields. @@ -187,7 +192,7 @@ public enum ChronoField implements TemporalField { * This counts the second within the minute, from 0 to 59. * This field has the same meaning for all calendar systems. */ - SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59)), + SECOND_OF_MINUTE("SecondOfMinute", SECONDS, MINUTES, ValueRange.of(0, 59), "second"), /** * The second-of-day. *

      @@ -201,7 +206,7 @@ public enum ChronoField implements TemporalField { * This counts the minute within the hour, from 0 to 59. * This field has the same meaning for all calendar systems. */ - MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59)), + MINUTE_OF_HOUR("MinuteOfHour", MINUTES, HOURS, ValueRange.of(0, 59), "minute"), /** * The minute-of-day. *

      @@ -232,7 +237,7 @@ public enum ChronoField implements TemporalField { * This is the hour that would be observed on a standard 24-hour digital clock. * This field has the same meaning for all calendar systems. */ - HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23)), + HOUR_OF_DAY("HourOfDay", HOURS, DAYS, ValueRange.of(0, 23), "hour"), /** * The clock-hour-of-day. *

      @@ -247,7 +252,7 @@ public enum ChronoField implements TemporalField { * This counts the AM/PM within the day, from 0 (AM) to 1 (PM). * This field has the same meaning for all calendar systems. */ - AMPM_OF_DAY("AmPmOfDay", HALF_DAYS, DAYS, ValueRange.of(0, 1)), + AMPM_OF_DAY("AmPmOfDay", HALF_DAYS, DAYS, ValueRange.of(0, 1), "dayperiod"), /** * The day-of-week, such as Tuesday. *

      @@ -263,7 +268,7 @@ public enum ChronoField implements TemporalField { * if they have a similar concept of named or numbered days within a period similar * to a week. It is recommended that the numbering starts from 1. */ - DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7)), + DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7), "weekday"), /** * The aligned day-of-week within a month. *

      @@ -312,7 +317,7 @@ public enum ChronoField implements TemporalField { * day-of-month values for users of the calendar system. * Normally, this is a count of days from 1 to the length of the month. */ - DAY_OF_MONTH("DayOfMonth", DAYS, MONTHS, ValueRange.of(1, 28, 31)), + DAY_OF_MONTH("DayOfMonth", DAYS, MONTHS, ValueRange.of(1, 28, 31), "day"), /** * The day-of-year. *

      @@ -377,17 +382,27 @@ public enum ChronoField implements TemporalField { * month-of-year values for users of the calendar system. * Normally, this is a count of months starting from 1. */ - MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12)), + MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12), "month"), /** - * The epoch-month based on the Java epoch of 1970-01-01. + * The proleptic-month based, counting months sequentially from year 0. *

      - * This field is the sequential count of months where January 1970 (ISO) is zero. + * This field is the sequential count of months where the first month + * in proleptic-year zero has the value zero. + * Later months have increasingly larger values. + * Earlier months have increasingly small values. + * There are no gaps or breaks in the sequence of months. * Note that this uses the local time-line, ignoring offset and time-zone. *

      - * Non-ISO calendar systems should also implement this field to represent a sequential - * count of months. It is recommended to define zero as the month of 1970-01-01 (ISO). + * In the default ISO calendar system, June 2012 would have the value + * {@code (2012 * 12 + 6 - 1)}. This field is primarily for internal use. + *

      + * Non-ISO calendar systems must implement this field as per the definition above. + * It is just a simple zero-based count of elapsed months from the start of proleptic-year 0. + * All calendar systems with a full proleptic-year definition will have a year zero. + * If the calendar system has a minimum year that excludes year zero, then one must + * be extrapolated in order for this method to be defined. */ - EPOCH_MONTH("EpochMonth", MONTHS, FOREVER, ValueRange.of((Year.MIN_VALUE - 1970L) * 12, (Year.MAX_VALUE - 1970L) * 12L - 1L)), + PROLEPTIC_MONTH("ProlepticMonth", MONTHS, FOREVER, ValueRange.of(Year.MIN_VALUE * 12L, Year.MAX_VALUE * 12L + 11)), /** * The year within the era. *

      @@ -446,7 +461,7 @@ public enum ChronoField implements TemporalField { * defined with any appropriate value, although defining it to be the same as ISO may be * the best option. */ - YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE)), + YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE), "year"), /** * The era. *

      @@ -463,7 +478,7 @@ public enum ChronoField implements TemporalField { * Earlier eras must have sequentially smaller values. * Later eras must have sequentially larger values, */ - ERA("Era", ERAS, FOREVER, ValueRange.of(0, 1)), + ERA("Era", ERAS, FOREVER, ValueRange.of(0, 1), "era"), /** * The instant epoch-seconds. *

      @@ -499,12 +514,23 @@ public enum ChronoField implements TemporalField { private final TemporalUnit baseUnit; private final TemporalUnit rangeUnit; private final ValueRange range; + private final String displayNameKey; private ChronoField(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit, ValueRange range) { this.name = name; this.baseUnit = baseUnit; this.rangeUnit = rangeUnit; this.range = range; + this.displayNameKey = null; + } + + private ChronoField(String name, TemporalUnit baseUnit, TemporalUnit rangeUnit, + ValueRange range, String displayNameKey) { + this.name = name; + this.baseUnit = baseUnit; + this.rangeUnit = rangeUnit; + this.range = range; + this.displayNameKey = displayNameKey; } //----------------------------------------------------------------------- @@ -513,6 +539,20 @@ public enum ChronoField implements TemporalField { return name; } + @Override + public String getDisplayName(Locale locale) { + Objects.requireNonNull(locale, "locale"); + if (displayNameKey == null) { + return getName(); + } + + LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased() + .getLocaleResources(locale); + ResourceBundle rb = lr.getJavaTimeFormatData(); + String key = "field." + displayNameKey; + return rb.containsKey(key) ? rb.getString(key) : getName(); + } + @Override public TemporalUnit getBaseUnit() { return baseUnit; @@ -548,19 +588,25 @@ public enum ChronoField implements TemporalField { //----------------------------------------------------------------------- /** * Checks if this field represents a component of a date. + *

      + * Fields from day-of-week to era are date-based. * * @return true if it is a component of a date */ - public boolean isDateField() { + @Override + public boolean isDateBased() { return ordinal() >= DAY_OF_WEEK.ordinal() && ordinal() <= ERA.ordinal(); } /** * Checks if this field represents a component of a time. + *

      + * Fields from nano-of-second to am-pm-of-day are time-based. * * @return true if it is a component of a time */ - public boolean isTimeField() { + @Override + public boolean isTimeBased() { return ordinal() < DAY_OF_WEEK.ordinal(); } diff --git a/jdk/src/share/classes/java/time/temporal/ChronoUnit.java b/jdk/src/share/classes/java/time/temporal/ChronoUnit.java index 0551858ffe8..03c5310312d 100644 --- a/jdk/src/share/classes/java/time/temporal/ChronoUnit.java +++ b/jdk/src/share/classes/java/time/temporal/ChronoUnit.java @@ -178,7 +178,7 @@ public enum ChronoUnit implements TemporalUnit { * Unit that represents the concept of an era. * The ISO calendar system doesn't have eras thus it is impossible to add * an era to a date or date-time. - * The estimated duration of the era is artificially defined as {@code 1,000,00,000 Years}. + * The estimated duration of the era is artificially defined as {@code 1,000,000,000 Years}. *

      * When used with other calendar systems there are no restrictions on the unit. */ diff --git a/jdk/src/share/classes/java/time/temporal/IsoFields.java b/jdk/src/share/classes/java/time/temporal/IsoFields.java index 5e03c1c12e1..851685a3132 100644 --- a/jdk/src/share/classes/java/time/temporal/IsoFields.java +++ b/jdk/src/share/classes/java/time/temporal/IsoFields.java @@ -69,13 +69,19 @@ import static java.time.temporal.ChronoUnit.MONTHS; import static java.time.temporal.ChronoUnit.WEEKS; import static java.time.temporal.ChronoUnit.YEARS; -import java.time.DateTimeException; import java.time.Duration; import java.time.LocalDate; import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; +import java.time.format.ResolverStyle; import java.util.HashMap; +import java.util.Locale; import java.util.Map; +import java.util.Objects; +import java.util.ResourceBundle; + +import sun.util.locale.provider.LocaleProviderAdapter; +import sun.util.locale.provider.LocaleResources; /** * Fields and units specific to the ISO-8601 calendar system, @@ -162,6 +168,27 @@ public final class IsoFields { * value from 1 to 92. If the quarter has less than 92 days, then day 92, and * potentially day 91, is in the following quarter. *

      + * In the resolving phase of parsing, a date can be created from a year, + * quarter-of-year and day-of-quarter. + *

      + * In {@linkplain ResolverStyle#STRICT strict mode}, all three fields are + * validated against their range of valid values. The day-of-quarter field + * is validated from 1 to 90, 91 or 92 depending on the year and quarter. + *

      + * In {@linkplain ResolverStyle#SMART smart mode}, all three fields are + * validated against their range of valid values. The day-of-quarter field is + * validated between 1 and 92, ignoring the actual range based on the year and quarter. + * If the day-of-quarter exceeds the actual range by one day, then the resulting date + * is one day later. If the day-of-quarter exceeds the actual range by two days, + * then the resulting date is two days later. + *

      + * In {@linkplain ResolverStyle#LENIENT lenient mode}, only the year is validated + * against the range of valid values. The resulting date is calculated equivalent to + * the following three stage approach. First, create a date on the first of January + * in the requested year. Then take the quarter-of-year, subtract one, and add the + * amount in quarters to the date. Finally, take the day-of-quarter, subtract one, + * and add the amount in days to the date. + *

      * This unit is an immutable and thread-safe singleton. */ public static final TemporalField DAY_OF_QUARTER = Field.DAY_OF_QUARTER; @@ -171,7 +198,11 @@ public final class IsoFields { * This field allows the quarter-of-year value to be queried and set. * The quarter-of-year has values from 1 to 4. *

      - * The day-of-quarter can only be calculated if the month-of-year is available. + * The quarter-of-year can only be calculated if the month-of-year is available. + *

      + * In the resolving phase of parsing, a date can be created from a year, + * quarter-of-year and day-of-quarter. + * See {@link #DAY_OF_QUARTER} for details. *

      * This unit is an immutable and thread-safe singleton. */ @@ -180,6 +211,28 @@ public final class IsoFields { * The field that represents the week-of-week-based-year. *

      * This field allows the week of the week-based-year value to be queried and set. + * The week-of-week-based-year has values from 1 to 52, or 53 if the + * week-based-year has 53 weeks. + *

      + * In the resolving phase of parsing, a date can be created from a + * week-based-year, week-of-week-based-year and day-of-week. + *

      + * In {@linkplain ResolverStyle#STRICT strict mode}, all three fields are + * validated against their range of valid values. The week-of-week-based-year + * field is validated from 1 to 52 or 53 depending on the week-based-year. + *

      + * In {@linkplain ResolverStyle#SMART smart mode}, all three fields are + * validated against their range of valid values. The week-of-week-based-year + * field is validated between 1 and 53, ignoring the week-based-year. + * If the week-of-week-based-year is 53, but the week-based-year only has + * 52 weeks, then the resulting date is in week 1 of the following week-based-year. + *

      + * In {@linkplain ResolverStyle#LENIENT lenient mode}, only the week-based-year + * is validated against the range of valid values. If the day-of-week is outside + * the range 1 to 7, then the resulting date is adjusted by a suitable number of + * weeks to reduce the day-of-week to the range 1 to 7. If the week-of-week-based-year + * value is outside the range 1 to 52, then any excess weeks are added or subtracted + * from the resulting date. *

      * This unit is an immutable and thread-safe singleton. */ @@ -189,6 +242,12 @@ public final class IsoFields { *

      * This field allows the week-based-year value to be queried and set. *

      + * The field has a range that matches {@link LocalDate#MAX} and {@link LocalDate#MIN}. + *

      + * In the resolving phase of parsing, a date can be created from a + * week-based-year, week-of-week-based-year and day-of-week. + * See {@link #WEEK_OF_WEEK_BASED_YEAR} for details. + *

      * This unit is an immutable and thread-safe singleton. */ public static final TemporalField WEEK_BASED_YEAR = Field.WEEK_BASED_YEAR; @@ -253,7 +312,7 @@ public final class IsoFields { @Override public ValueRange rangeRefinedBy(TemporalAccessor temporal) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: DayOfQuarter"); + throw new UnsupportedTemporalTypeException("Unsupported field: DayOfQuarter"); } long qoy = temporal.getLong(QUARTER_OF_YEAR); if (qoy == 1) { @@ -269,7 +328,7 @@ public final class IsoFields { @Override public long getFrom(TemporalAccessor temporal) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: DayOfQuarter"); + throw new UnsupportedTemporalTypeException("Unsupported field: DayOfQuarter"); } int doy = temporal.get(DAY_OF_YEAR); int moy = temporal.get(MONTH_OF_YEAR); @@ -285,16 +344,29 @@ public final class IsoFields { return (R) temporal.with(DAY_OF_YEAR, temporal.getLong(DAY_OF_YEAR) + (newValue - curValue)); } @Override - public Map resolve(TemporalAccessor temporal, long value) { - if ((temporal.isSupported(YEAR) && temporal.isSupported(DAY_OF_QUARTER)) == false) { + public Map resolve(TemporalAccessor temporal, long doq, ResolverStyle resolverStyle) { + if ((temporal.isSupported(YEAR) && temporal.isSupported(QUARTER_OF_YEAR)) == false) { return null; } - int y = temporal.get(YEAR); - int qoy = temporal.get(QUARTER_OF_YEAR); - range().checkValidValue(value, this); // leniently check from 1 to 92 TODO: check - LocalDate date = LocalDate.of(y, ((qoy - 1) * 3) + 1, 1).plusDays(value - 1); + int y = temporal.get(YEAR); // validated + LocalDate date; + if (resolverStyle == ResolverStyle.LENIENT) { + long qoy = temporal.getLong(QUARTER_OF_YEAR); // unvalidated + date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoy, 1), 3)); + } else { + int qoy = temporal.get(QUARTER_OF_YEAR); // validated + date = LocalDate.of(y, ((qoy - 1) * 3) + 1, 1); + if (doq < 1 || doq > 90) { + if (resolverStyle == ResolverStyle.STRICT) { + rangeRefinedBy(date).checkValidValue(doq, this); // only allow exact range + } else { // SMART + range().checkValidValue(doq, this); // allow 1-92 rolling into next quarter + } + } + } + long epochDay = Math.addExact(date.toEpochDay(), Math.subtractExact(doq, 1)); Map result = new HashMap<>(4, 1.0f); - result.put(EPOCH_DAY, date.toEpochDay()); + result.put(EPOCH_DAY, epochDay); result.put(YEAR, null); result.put(QUARTER_OF_YEAR, null); return result; @@ -324,7 +396,7 @@ public final class IsoFields { @Override public long getFrom(TemporalAccessor temporal) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: QuarterOfYear"); + throw new UnsupportedTemporalTypeException("Unsupported field: QuarterOfYear"); } long moy = temporal.getLong(MONTH_OF_YEAR); return ((moy + 2) / 3); @@ -343,6 +415,16 @@ public final class IsoFields { public String getName() { return "WeekOfWeekBasedYear"; } + + @Override + public String getDisplayName(Locale locale) { + Objects.requireNonNull(locale, "locale"); + LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased() + .getLocaleResources(locale); + ResourceBundle rb = lr.getJavaTimeFormatData(); + return rb.containsKey("field.week") ? rb.getString("field.week") : getName(); + } + @Override public TemporalUnit getBaseUnit() { return WEEKS; @@ -362,14 +444,14 @@ public final class IsoFields { @Override public ValueRange rangeRefinedBy(TemporalAccessor temporal) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: WeekOfWeekBasedYear"); + throw new UnsupportedTemporalTypeException("Unsupported field: WeekOfWeekBasedYear"); } return getWeekRange(LocalDate.from(temporal)); } @Override public long getFrom(TemporalAccessor temporal) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: WeekOfWeekBasedYear"); + throw new UnsupportedTemporalTypeException("Unsupported field: WeekOfWeekBasedYear"); } return getWeek(LocalDate.from(temporal)); } @@ -381,14 +463,33 @@ public final class IsoFields { return (R) temporal.plus(Math.subtractExact(newValue, getFrom(temporal)), WEEKS); } @Override - public Map resolve(TemporalAccessor temporal, long value) { + public Map resolve(TemporalAccessor temporal, long wowby, ResolverStyle resolverStyle) { if ((temporal.isSupported(WEEK_BASED_YEAR) && temporal.isSupported(DAY_OF_WEEK)) == false) { return null; } - int wby = temporal.get(WEEK_BASED_YEAR); - int dow = temporal.get(DAY_OF_WEEK); - range().checkValidValue(value, this); // lenient range - LocalDate date = LocalDate.of(wby, 1, 4).plusWeeks(value - 1).with(DAY_OF_WEEK, dow); + int wby = temporal.get(WEEK_BASED_YEAR); // validated + LocalDate date = LocalDate.of(wby, 1, 4); + if (resolverStyle == ResolverStyle.LENIENT) { + long dow = temporal.getLong(DAY_OF_WEEK); // unvalidated + if (dow > 7) { + date = date.plusWeeks((dow - 1) / 7); + dow = ((dow - 1) % 7) + 1; + } else if (dow < 1) { + date = date.plusWeeks(Math.subtractExact(dow, 7) / 7); + dow = ((dow + 6) % 7) + 1; + } + date = date.plusWeeks(Math.subtractExact(wowby, 1)).with(DAY_OF_WEEK, dow); + } else { + int dow = temporal.get(DAY_OF_WEEK); // validated + if (wowby < 1 || wowby > 52) { + if (resolverStyle == ResolverStyle.STRICT) { + getWeekRange(date).checkValidValue(wowby, this); // only allow exact range + } else { // SMART + range().checkValidValue(wowby, this); // allow 1-53 rolling into next year + } + } + date = date.plusWeeks(wowby - 1).with(DAY_OF_WEEK, dow); + } Map result = new HashMap<>(2, 1.0f); result.put(EPOCH_DAY, date.toEpochDay()); result.put(WEEK_BASED_YEAR, null); @@ -420,7 +521,7 @@ public final class IsoFields { @Override public long getFrom(TemporalAccessor temporal) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: WeekBasedYear"); + throw new UnsupportedTemporalTypeException("Unsupported field: WeekBasedYear"); } return getWeekBasedYear(LocalDate.from(temporal)); } @@ -428,7 +529,7 @@ public final class IsoFields { @Override public R adjustInto(R temporal, long newValue) { if (isSupportedBy(temporal) == false) { - throw new DateTimeException("Unsupported field: WeekBasedYear"); + throw new UnsupportedTemporalTypeException("Unsupported field: WeekBasedYear"); } int newVal = range().checkValidIntValue(newValue, WEEK_BASED_YEAR); // strict check LocalDate date = LocalDate.from(temporal); @@ -438,6 +539,11 @@ public final class IsoFields { } }; + @Override + public boolean isDateBased() { + return true; + } + @Override public ValueRange rangeRefinedBy(TemporalAccessor temporal) { return range(); diff --git a/jdk/src/share/classes/java/time/temporal/JulianFields.java b/jdk/src/share/classes/java/time/temporal/JulianFields.java index d0a9d871fc3..72956cec79a 100644 --- a/jdk/src/share/classes/java/time/temporal/JulianFields.java +++ b/jdk/src/share/classes/java/time/temporal/JulianFields.java @@ -66,6 +66,7 @@ import static java.time.temporal.ChronoUnit.DAYS; import static java.time.temporal.ChronoUnit.FOREVER; import java.time.DateTimeException; +import java.time.format.ResolverStyle; import java.util.Collections; import java.util.Map; @@ -106,7 +107,12 @@ public final class JulianFields { * When 'JULIAN_DAY.adjustInto()' is applied to a date-time, the time of day portion remains unaltered. * 'JULIAN_DAY.adjustInto()' and 'JULIAN_DAY.getFrom()' only apply to {@code Temporal} objects that * can be converted into {@link ChronoField#EPOCH_DAY}. - * A {@link DateTimeException} is thrown for any other type of object. + * An {@link UnsupportedTemporalTypeException} is thrown for any other type of object. + *

      + * In the resolving phase of parsing, a date can be created from a Julian Day field. + * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode} + * the Julian Day value is validated against the range of valid values. + * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs. *

      *

      Astronomical and Scientific Notes

      * The standard astronomical definition uses a fraction to indicate the time-of-day, @@ -147,10 +153,15 @@ public final class JulianFields { * When 'MODIFIED_JULIAN_DAY.adjustInto()' is applied to a date-time, the time of day portion remains unaltered. * 'MODIFIED_JULIAN_DAY.adjustInto()' and 'MODIFIED_JULIAN_DAY.getFrom()' only apply to {@code Temporal} objects * that can be converted into {@link ChronoField#EPOCH_DAY}. - * A {@link DateTimeException} is thrown for any other type of object. + * An {@link UnsupportedTemporalTypeException} is thrown for any other type of object. *

      * This implementation is an integer version of MJD with the decimal part rounded to floor. *

      + * In the resolving phase of parsing, a date can be created from a Modified Julian Day field. + * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode} + * the Modified Julian Day value is validated against the range of valid values. + * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs. + *

      *

      Astronomical and Scientific Notes

      *
            *  | ISO date          | Modified Julian Day |      Decimal MJD |
      @@ -180,7 +191,12 @@ public final class JulianFields {
            * When 'RATA_DIE.adjustInto()' is applied to a date-time, the time of day portion remains unaltered.
            * 'RATA_DIE.adjustInto()' and 'RATA_DIE.getFrom()' only apply to {@code Temporal} objects
            * that can be converted into {@link ChronoField#EPOCH_DAY}.
      -     * A {@link DateTimeException} is thrown for any other type of object.
      +     * An {@link UnsupportedTemporalTypeException} is thrown for any other type of object.
      +     * 

      + * In the resolving phase of parsing, a date can be created from a Rata Die field. + * In {@linkplain ResolverStyle#STRICT strict mode} and {@linkplain ResolverStyle#SMART smart mode} + * the Rata Die value is validated against the range of valid values. + * In {@linkplain ResolverStyle#LENIENT lenient mode} no validation occurs. */ public static final TemporalField RATA_DIE = Field.RATA_DIE; @@ -231,6 +247,11 @@ public final class JulianFields { return rangeUnit; } + @Override + public boolean isDateBased() { + return true; + } + @Override public ValueRange range() { return range; @@ -266,8 +287,15 @@ public final class JulianFields { //----------------------------------------------------------------------- @Override - public Map resolve(TemporalAccessor temporal, long value) { - return Collections.singletonMap(EPOCH_DAY, Math.subtractExact(value, offset)); + public Map resolve(TemporalAccessor temporal, long value, ResolverStyle resolverStyle) { + long epochDay; + if (resolverStyle == ResolverStyle.LENIENT) { + epochDay = Math.subtractExact(value, offset); + } else { + range().checkValidValue(value, this); + epochDay = value - offset; + } + return Collections.singletonMap(EPOCH_DAY, epochDay); } //----------------------------------------------------------------------- diff --git a/jdk/src/share/classes/java/time/temporal/Queries.java b/jdk/src/share/classes/java/time/temporal/Queries.java deleted file mode 100644 index a4c0a420fe2..00000000000 --- a/jdk/src/share/classes/java/time/temporal/Queries.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of JSR-310 nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package java.time.temporal; - -import static java.time.temporal.ChronoField.EPOCH_DAY; -import static java.time.temporal.ChronoField.NANO_OF_DAY; -import static java.time.temporal.ChronoField.OFFSET_SECONDS; - -import java.time.LocalDate; -import java.time.LocalTime; -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.ZoneOffset; -import java.time.ZonedDateTime; -import java.time.chrono.Chronology; - -/** - * Common implementations of {@code TemporalQuery}. - *

      - * This class provides common implementations of {@link TemporalQuery}. - * These queries are primarily used as optimizations, allowing the internals - * of other objects to be extracted effectively. Note that application code - * can also use the {@code from(TemporalAccessor)} method on most temporal - * objects as a method reference matching the query interface, such as - * {@code LocalDate::from} and {@code ZoneId::from}. - *

      - * There are two equivalent ways of using a {@code TemporalQuery}. - * The first is to invoke the method on the interface directly. - * The second is to use {@link TemporalAccessor#query(TemporalQuery)}: - *

      - *   // these two lines are equivalent, but the second approach is recommended
      - *   dateTime = query.queryFrom(dateTime);
      - *   dateTime = dateTime.query(query);
      - * 
      - * It is recommended to use the second approach, {@code query(TemporalQuery)}, - * as it is a lot clearer to read in code. - * - *

      Specification for implementors

      - * This is a thread-safe utility class. - * All returned adjusters are immutable and thread-safe. - * - * @since 1.8 - */ -public final class Queries { - // note that it is vital that each method supplies a constant, not a - // calculated value, as they will be checked for using == - // it is also vital that each constant is different (due to the == checking) - // as such, alterations to use lambdas must be done with extreme care - - /** - * Private constructor since this is a utility class. - */ - private Queries() { - } - - //----------------------------------------------------------------------- - // special constants should be used to extract information from a TemporalAccessor - // that cannot be derived in other ways - // Javadoc added here, so as to pretend they are more normal than they really are - - /** - * A strict query for the {@code ZoneId}. - *

      - * This queries a {@code TemporalAccessor} for the zone. - * The zone is only returned if the date-time conceptually contains a {@code ZoneId}. - * It will not be returned if the date-time only conceptually has an {@code ZoneOffset}. - * Thus a {@link ZonedDateTime} will return the result of {@code getZone()}, - * but an {@link OffsetDateTime} will return null. - *

      - * In most cases, applications should use {@link #ZONE} as this query is too strict. - *

      - * The result from JDK classes implementing {@code TemporalAccessor} is as follows:
      - * {@code LocalDate} returns null
      - * {@code LocalTime} returns null
      - * {@code LocalDateTime} returns null
      - * {@code ZonedDateTime} returns the associated zone
      - * {@code OffsetTime} returns null
      - * {@code OffsetDateTime} returns null
      - * {@code ChronoLocalDate} returns null
      - * {@code ChronoLocalDateTime} returns null
      - * {@code ChronoZonedDateTime} returns the associated zone
      - * {@code Era} returns null
      - * {@code DayOfWeek} returns null
      - * {@code Month} returns null
      - * {@code Year} returns null
      - * {@code YearMonth} returns null
      - * {@code MonthDay} returns null
      - * {@code ZoneOffset} returns null
      - * {@code Instant} returns null
      - * - * @return a query that can obtain the zone ID of a temporal, not null - */ - public static final TemporalQuery zoneId() { - return ZONE_ID; - } - static final TemporalQuery ZONE_ID = (temporal) -> { - return temporal.query(ZONE_ID); - }; - - /** - * A query for the {@code Chronology}. - *

      - * This queries a {@code TemporalAccessor} for the chronology. - * If the target {@code TemporalAccessor} represents a date, or part of a date, - * then it should return the chronology that the date is expressed in. - * As a result of this definition, objects only representing time, such as - * {@code LocalTime}, will return null. - *

      - * The result from JDK classes implementing {@code TemporalAccessor} is as follows:
      - * {@code LocalDate} returns {@code IsoChronology.INSTANCE}
      - * {@code LocalTime} returns null (does not represent a date)
      - * {@code LocalDateTime} returns {@code IsoChronology.INSTANCE}
      - * {@code ZonedDateTime} returns {@code IsoChronology.INSTANCE}
      - * {@code OffsetTime} returns null (does not represent a date)
      - * {@code OffsetDateTime} returns {@code IsoChronology.INSTANCE}
      - * {@code ChronoLocalDate} returns the associated chronology
      - * {@code ChronoLocalDateTime} returns the associated chronology
      - * {@code ChronoZonedDateTime} returns the associated chronology
      - * {@code Era} returns the associated chronology
      - * {@code DayOfWeek} returns null (shared across chronologies)
      - * {@code Month} returns {@code IsoChronology.INSTANCE}
      - * {@code Year} returns {@code IsoChronology.INSTANCE}
      - * {@code YearMonth} returns {@code IsoChronology.INSTANCE}
      - * {@code MonthDay} returns null {@code IsoChronology.INSTANCE}
      - * {@code ZoneOffset} returns null (does not represent a date)
      - * {@code Instant} returns null (does not represent a date)
      - *

      - * The method {@link Chronology#from(TemporalAccessor)} can be used as a - * {@code TemporalQuery} via a method reference, {@code Chronology::from}. - * That method is equivalent to this query, except that it throws an - * exception if a chronology cannot be obtained. - * - * @return a query that can obtain the chronology of a temporal, not null - */ - public static final TemporalQuery chronology() { - return CHRONO; - } - static final TemporalQuery CHRONO = (temporal) -> { - return temporal.query(CHRONO); - }; - - /** - * A query for the smallest supported unit. - *

      - * This queries a {@code TemporalAccessor} for the time precision. - * If the target {@code TemporalAccessor} represents a consistent or complete date-time, - * date or time then this must return the smallest precision actually supported. - * Note that fields such as {@code NANO_OF_DAY} and {@code NANO_OF_SECOND} - * are defined to always return ignoring the precision, thus this is the only - * way to find the actual smallest supported unit. - * For example, were {@code GregorianCalendar} to implement {@code TemporalAccessor} - * it would return a precision of {@code MILLIS}. - *

      - * The result from JDK classes implementing {@code TemporalAccessor} is as follows:
      - * {@code LocalDate} returns {@code DAYS}
      - * {@code LocalTime} returns {@code NANOS}
      - * {@code LocalDateTime} returns {@code NANOS}
      - * {@code ZonedDateTime} returns {@code NANOS}
      - * {@code OffsetTime} returns {@code NANOS}
      - * {@code OffsetDateTime} returns {@code NANOS}
      - * {@code ChronoLocalDate} returns {@code DAYS}
      - * {@code ChronoLocalDateTime} returns {@code NANOS}
      - * {@code ChronoZonedDateTime} returns {@code NANOS}
      - * {@code Era} returns {@code ERAS}
      - * {@code DayOfWeek} returns {@code DAYS}
      - * {@code Month} returns {@code MONTHS}
      - * {@code Year} returns {@code YEARS}
      - * {@code YearMonth} returns {@code MONTHS}
      - * {@code MonthDay} returns null (does not represent a complete date or time)
      - * {@code ZoneOffset} returns null (does not represent a date or time)
      - * {@code Instant} returns {@code NANOS}
      - * - * @return a query that can obtain the precision of a temporal, not null - */ - public static final TemporalQuery precision() { - return PRECISION; - } - static final TemporalQuery PRECISION = (temporal) -> { - return temporal.query(PRECISION); - }; - - //----------------------------------------------------------------------- - // non-special constants are standard queries that derive information from other information - /** - * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}. - *

      - * This queries a {@code TemporalAccessor} for the zone. - * It first tries to obtain the zone, using {@link #zoneId()}. - * If that is not found it tries to obtain the {@link #offset()}. - * Thus a {@link ZonedDateTime} will return the result of {@code getZone()}, - * while an {@link OffsetDateTime} will return the result of {@code getOffset()}. - *

      - * In most cases, applications should use this query rather than {@code #zoneId()}. - *

      - * The method {@link ZoneId#from(TemporalAccessor)} can be used as a - * {@code TemporalQuery} via a method reference, {@code ZoneId::from}. - * That method is equivalent to this query, except that it throws an - * exception if a zone cannot be obtained. - * - * @return a query that can obtain the zone ID or offset of a temporal, not null - */ - public static final TemporalQuery zone() { - return ZONE; - } - static final TemporalQuery ZONE = (temporal) -> { - ZoneId zone = temporal.query(ZONE_ID); - return (zone != null ? zone : temporal.query(OFFSET)); - }; - - /** - * A query for {@code ZoneOffset} returning null if not found. - *

      - * This returns a {@code TemporalQuery} that can be used to query a temporal - * object for the offset. The query will return null if the temporal - * object cannot supply an offset. - *

      - * The query implementation examines the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} - * field and uses it to create a {@code ZoneOffset}. - *

      - * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a - * {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}. - * This query and {@code ZoneOffset::from} will return the same result if the - * temporal object contains an offset. If the temporal object does not contain - * an offset, then the method reference will throw an exception, whereas this - * query will return null. - * - * @return a query that can obtain the offset of a temporal, not null - */ - public static final TemporalQuery offset() { - return OFFSET; - } - static final TemporalQuery OFFSET = (temporal) -> { - if (temporal.isSupported(OFFSET_SECONDS)) { - return ZoneOffset.ofTotalSeconds(temporal.get(OFFSET_SECONDS)); - } - return null; - }; - - /** - * A query for {@code LocalDate} returning null if not found. - *

      - * This returns a {@code TemporalQuery} that can be used to query a temporal - * object for the local date. The query will return null if the temporal - * object cannot supply a local date. - *

      - * The query implementation examines the {@link ChronoField#EPOCH_DAY EPOCH_DAY} - * field and uses it to create a {@code LocalDate}. - *

      - * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a - * {@code TemporalQuery} via a method reference, {@code LocalDate::from}. - * This query and {@code LocalDate::from} will return the same result if the - * temporal object contains a date. If the temporal object does not contain - * a date, then the method reference will throw an exception, whereas this - * query will return null. - * - * @return a query that can obtain the date of a temporal, not null - */ - public static final TemporalQuery localDate() { - return LOCAL_DATE; - } - static final TemporalQuery LOCAL_DATE = (temporal) -> { - if (temporal.isSupported(EPOCH_DAY)) { - return LocalDate.ofEpochDay(temporal.getLong(EPOCH_DAY)); - } - return null; - }; - - /** - * A query for {@code LocalTime} returning null if not found. - *

      - * This returns a {@code TemporalQuery} that can be used to query a temporal - * object for the local time. The query will return null if the temporal - * object cannot supply a local time. - *

      - * The query implementation examines the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY} - * field and uses it to create a {@code LocalTime}. - *

      - * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a - * {@code TemporalQuery} via a method reference, {@code LocalTime::from}. - * This query and {@code LocalTime::from} will return the same result if the - * temporal object contains a time. If the temporal object does not contain - * a time, then the method reference will throw an exception, whereas this - * query will return null. - * - * @return a query that can obtain the time of a temporal, not null - */ - public static final TemporalQuery localTime() { - return LOCAL_TIME; - } - static final TemporalQuery LOCAL_TIME = (temporal) -> { - if (temporal.isSupported(NANO_OF_DAY)) { - return LocalTime.ofNanoOfDay(temporal.getLong(NANO_OF_DAY)); - } - return null; - }; - -} diff --git a/jdk/src/share/classes/java/time/temporal/Temporal.java b/jdk/src/share/classes/java/time/temporal/Temporal.java index 3eeed90b096..7cbc49fa176 100644 --- a/jdk/src/share/classes/java/time/temporal/Temporal.java +++ b/jdk/src/share/classes/java/time/temporal/Temporal.java @@ -83,7 +83,7 @@ import java.time.ZoneId; * Two pieces of date/time information cannot be represented by numbers, * the {@linkplain java.time.chrono.Chronology chronology} and the {@linkplain ZoneId time-zone}. * These can be accessed via {@link #query(TemporalQuery) queries} using - * the static methods defined on {@link Queries}. + * the static methods defined on {@link TemporalQuery}. *

      * This interface is a framework-level interface that should not be widely * used in application code. Instead, applications should create and pass @@ -134,7 +134,7 @@ public interface Temporal extends TemporalAccessor { * This adjusts this date-time according to the rules of the specified adjuster. * A simple adjuster might simply set the one of the fields, such as the year field. * A more complex adjuster might set the date to the last day of the month. - * A selection of common adjustments is provided in {@link Adjusters}. + * A selection of common adjustments is provided in {@link TemporalAdjuster}. * These include finding the "last day of the month" and "next Wednesday". * The adjuster is responsible for handling special cases, such as the varying * lengths of month and leap years. @@ -161,7 +161,7 @@ public interface Temporal extends TemporalAccessor { * @throws DateTimeException if unable to make the adjustment * @throws ArithmeticException if numeric overflow occurs */ - public default Temporal with(TemporalAdjuster adjuster) { + default Temporal with(TemporalAdjuster adjuster) { return adjuster.adjustInto(this); } @@ -180,7 +180,7 @@ public interface Temporal extends TemporalAccessor { *

      Specification for implementors

      * Implementations must check and handle all fields defined in {@link ChronoField}. * If the field is supported, then the adjustment must be performed. - * If unsupported, then a {@code DateTimeException} must be thrown. + * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown. *

      * If the field is not a {@code ChronoField}, then the result of this method * is obtained by invoking {@code TemporalField.adjustInto(Temporal, long)} @@ -194,6 +194,7 @@ public interface Temporal extends TemporalAccessor { * @param newValue the new value of the field in the result * @return an object of the same type with the specified field set, not null * @throws DateTimeException if the field cannot be set + * @throws UnsupportedTemporalTypeException if the field is not supported * @throws ArithmeticException if numeric overflow occurs */ Temporal with(TemporalField field, long newValue); @@ -210,7 +211,6 @@ public interface Temporal extends TemporalAccessor { *

            *  date = date.plus(period);                      // add a Period instance
            *  date = date.plus(duration);                    // add a Duration instance
      -     *  date = date.plus(MONTHS.between(start, end));  // static import of MONTHS field
            *  date = date.plus(workingDays(6));              // example user-written workingDays method
            * 
      *

      @@ -232,7 +232,7 @@ public interface Temporal extends TemporalAccessor { * @throws DateTimeException if the addition cannot be made * @throws ArithmeticException if numeric overflow occurs */ - public default Temporal plus(TemporalAmount amount) { + default Temporal plus(TemporalAmount amount) { return amount.addTo(this); } @@ -255,7 +255,7 @@ public interface Temporal extends TemporalAccessor { *

      Specification for implementors

      * Implementations must check and handle all units defined in {@link ChronoUnit}. * If the unit is supported, then the addition must be performed. - * If unsupported, then a {@code DateTimeException} must be thrown. + * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown. *

      * If the unit is not a {@code ChronoUnit}, then the result of this method * is obtained by invoking {@code TemporalUnit.addTo(Temporal, long)} @@ -269,6 +269,7 @@ public interface Temporal extends TemporalAccessor { * @param unit the unit of the period to add, not null * @return an object of the same type with the specified period added, not null * @throws DateTimeException if the unit cannot be added + * @throws UnsupportedTemporalTypeException if the unit is not supported * @throws ArithmeticException if numeric overflow occurs */ Temporal plus(long amountToAdd, TemporalUnit unit); @@ -285,7 +286,6 @@ public interface Temporal extends TemporalAccessor { *

            *  date = date.minus(period);                      // subtract a Period instance
            *  date = date.minus(duration);                    // subtract a Duration instance
      -     *  date = date.minus(MONTHS.between(start, end));  // static import of MONTHS field
            *  date = date.minus(workingDays(6));              // example user-written workingDays method
            * 
      *

      @@ -307,7 +307,7 @@ public interface Temporal extends TemporalAccessor { * @throws DateTimeException if the subtraction cannot be made * @throws ArithmeticException if numeric overflow occurs */ - public default Temporal minus(TemporalAmount amount) { + default Temporal minus(TemporalAmount amount) { return amount.subtractFrom(this); } @@ -344,9 +344,10 @@ public interface Temporal extends TemporalAccessor { * @param unit the unit of the period to subtract, not null * @return an object of the same type with the specified period subtracted, not null * @throws DateTimeException if the unit cannot be subtracted + * @throws UnsupportedTemporalTypeException if the unit is not supported * @throws ArithmeticException if numeric overflow occurs */ - public default Temporal minus(long amountToSubtract, TemporalUnit unit) { + default Temporal minus(long amountToSubtract, TemporalUnit unit) { return (amountToSubtract == Long.MIN_VALUE ? plus(Long.MAX_VALUE, unit).plus(1, unit) : plus(-amountToSubtract, unit)); } @@ -388,7 +389,7 @@ public interface Temporal extends TemporalAccessor { * Implementations must begin by checking to ensure that the input temporal * object is of the same observable type as the implementation. * They must then perform the calculation for all instances of {@link ChronoUnit}. - * A {@code DateTimeException} must be thrown for {@code ChronoUnit} + * An {@code UnsupportedTemporalTypeException} must be thrown for {@code ChronoUnit} * instances that are unsupported. *

      * If the unit is not a {@code ChronoUnit}, then the result of this method @@ -401,7 +402,7 @@ public interface Temporal extends TemporalAccessor { * // check input temporal is the same type as this class * if (unit instanceof ChronoUnit) { * // if unit is supported, then calculate and return result - * // else throw DateTimeException for unsupported units + * // else throw UnsupportedTemporalTypeException for unsupported units * } * return unit.between(this, endTemporal); *

      @@ -414,6 +415,7 @@ public interface Temporal extends TemporalAccessor { * the unit; positive if the specified object is later than this one, negative if * it is earlier than this one * @throws DateTimeException if the period cannot be calculated + * @throws UnsupportedTemporalTypeException if the unit is not supported * @throws ArithmeticException if numeric overflow occurs */ long periodUntil(Temporal endTemporal, TemporalUnit unit); diff --git a/jdk/src/share/classes/java/time/temporal/TemporalAccessor.java b/jdk/src/share/classes/java/time/temporal/TemporalAccessor.java index cd09573c7d8..3f4a571e477 100644 --- a/jdk/src/share/classes/java/time/temporal/TemporalAccessor.java +++ b/jdk/src/share/classes/java/time/temporal/TemporalAccessor.java @@ -63,6 +63,7 @@ package java.time.temporal; import java.time.DateTimeException; import java.time.ZoneId; +import java.util.Objects; /** * Framework-level interface defining read-only access to a temporal object, @@ -80,8 +81,8 @@ import java.time.ZoneId; *

      * Two pieces of date/time information cannot be represented by numbers, * the {@linkplain java.time.chrono.Chronology chronology} and the {@linkplain ZoneId time-zone}. - * These can be accessed via {@link #query(TemporalQuery) queries} using - * the static methods defined on {@link Queries}. + * These can be accessed via {@linkplain #query(TemporalQuery) queries} using + * the static methods defined on {@link TemporalQuery}. *

      * A sub-interface, {@link Temporal}, extends this definition to one that also * supports adjustment and manipulation on more complete temporal objects. @@ -139,7 +140,7 @@ public interface TemporalAccessor { *

      Specification for implementors

      * Implementations must check and handle all fields defined in {@link ChronoField}. * If the field is supported, then the range of the field must be returned. - * If unsupported, then a {@code DateTimeException} must be thrown. + * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown. *

      * If the field is not a {@code ChronoField}, then the result of this method * is obtained by invoking {@code TemporalField.rangeRefinedBy(TemporalAccessorl)} @@ -153,7 +154,7 @@ public interface TemporalAccessor { * if (isSupported(field)) { * return field.range(); * } - * throw new DateTimeException("Unsupported field: " + field.getName()); + * throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); * } * return field.rangeRefinedBy(this); * @@ -161,14 +162,16 @@ public interface TemporalAccessor { * @param field the field to query the range for, not null * @return the range of valid values for the field, not null * @throws DateTimeException if the range for the field cannot be obtained + * @throws UnsupportedTemporalTypeException if the field is not supported */ - public default ValueRange range(TemporalField field) { + default ValueRange range(TemporalField field) { if (field instanceof ChronoField) { if (isSupported(field)) { return field.range(); } - throw new DateTimeException("Unsupported field: " + field.getName()); + throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); } + Objects.requireNonNull(field, "field"); return field.rangeRefinedBy(this); } @@ -184,28 +187,40 @@ public interface TemporalAccessor { * Implementations must check and handle all fields defined in {@link ChronoField}. * If the field is supported and has an {@code int} range, then the value of * the field must be returned. - * If unsupported, then a {@code DateTimeException} must be thrown. + * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown. *

      * If the field is not a {@code ChronoField}, then the result of this method * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)} * passing {@code this} as the argument. *

      - * Implementations must not alter either this object. + * Implementations must not alter this object. *

      * The default implementation must behave equivalent to this code: *

      -     *  return range(field).checkValidIntValue(getLong(field), field);
      +     *  if (range(field).isIntValue()) {
      +     *    return range(field).checkValidIntValue(getLong(field), field);
      +     *  }
      +     *  throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead");
            * 
      * * @param field the field to get, not null * @return the value for the field, within the valid range of values - * @throws DateTimeException if a value for the field cannot be obtained - * @throws DateTimeException if the range of valid values for the field exceeds an {@code int} - * @throws DateTimeException if the value is outside the range of valid values for the field + * @throws DateTimeException if a value for the field cannot be obtained or + * the value is outside the range of valid values for the field + * @throws UnsupportedTemporalTypeException if the field is not supported or + * the range of values exceeds an {@code int} * @throws ArithmeticException if numeric overflow occurs */ - public default int get(TemporalField field) { - return range(field).checkValidIntValue(getLong(field), field); + default int get(TemporalField field) { + ValueRange range = range(field); + if (range.isIntValue() == false) { + throw new UnsupportedTemporalTypeException("Invalid field " + field + " + for get() method, use getLong() instead"); + } + long value = getLong(field); + if (range.isValidValue(value) == false) { + throw new DateTimeException("Invalid value for " + field + " (valid values " + range + "): " + value); + } + return (int) value; } /** @@ -219,7 +234,7 @@ public interface TemporalAccessor { *

      Specification for implementors

      * Implementations must check and handle all fields defined in {@link ChronoField}. * If the field is supported, then the value of the field must be returned. - * If unsupported, then a {@code DateTimeException} must be thrown. + * If unsupported, then an {@code UnsupportedTemporalTypeException} must be thrown. *

      * If the field is not a {@code ChronoField}, then the result of this method * is obtained by invoking {@code TemporalField.getFrom(TemporalAccessor)} @@ -230,6 +245,7 @@ public interface TemporalAccessor { * @param field the field to get, not null * @return the value for the field * @throws DateTimeException if a value for the field cannot be obtained + * @throws UnsupportedTemporalTypeException if the field is not supported * @throws ArithmeticException if numeric overflow occurs */ long getLong(TemporalField field); @@ -247,13 +263,13 @@ public interface TemporalAccessor { *

      * The most common query implementations are method references, such as * {@code LocalDate::from} and {@code ZoneId::from}. - * Further implementations are on {@link Queries}. - * Queries may also be defined by applications. + * Additional implementations are provided as static methods on {@link TemporalQuery}. * *

      Specification for implementors

      * The default implementation must behave equivalent to this code: *
      -     *  if (query == Queries.zoneId() || query == Queries.chronology() || query == Queries.precision()) {
      +     *  if (query == TemporalQuery.zoneId() ||
      +     *        query == TemporalQuery.chronology() || query == TemporalQuery.precision()) {
            *    return null;
            *  }
            *  return query.queryFrom(this);
      @@ -270,7 +286,7 @@ public interface TemporalAccessor {
            * For example, an application-defined {@code HourMin} class storing the hour
            * and minute must override this method as follows:
            * 
      -     *  if (query == Queries.precision()) {
      +     *  if (query == TemporalQuery.precision()) {
            *    return MINUTES;
            *  }
            *  return TemporalAccessor.super.query(query);
      @@ -282,8 +298,8 @@ public interface TemporalAccessor {
            * @throws DateTimeException if unable to query
            * @throws ArithmeticException if numeric overflow occurs
            */
      -    public default  R query(TemporalQuery query) {
      -        if (query == Queries.zoneId() || query == Queries.chronology() || query == Queries.precision()) {
      +    default  R query(TemporalQuery query) {
      +        if (query == TemporalQuery.zoneId() || query == TemporalQuery.chronology() || query == TemporalQuery.precision()) {
                   return null;
               }
               return query.queryFrom(this);
      diff --git a/jdk/src/share/classes/java/time/temporal/TemporalAdjuster.java b/jdk/src/share/classes/java/time/temporal/TemporalAdjuster.java
      index 2b808b6795b..0cd44a363d2 100644
      --- a/jdk/src/share/classes/java/time/temporal/TemporalAdjuster.java
      +++ b/jdk/src/share/classes/java/time/temporal/TemporalAdjuster.java
      @@ -62,6 +62,9 @@
       package java.time.temporal;
       
       import java.time.DateTimeException;
      +import java.time.DayOfWeek;
      +import java.time.LocalDate;
      +import java.util.function.UnaryOperator;
       
       /**
        * Strategy for adjusting a temporal object.
      @@ -83,13 +86,22 @@ import java.time.DateTimeException;
        * It is recommended to use the second approach, {@code with(TemporalAdjuster)},
        * as it is a lot clearer to read in code.
        * 

      - * See {@link Adjusters} for a standard set of adjusters, including finding the - * last day of the month. - * Adjusters may also be defined by applications. + * This class also contains a standard set of adjusters, available as static methods. + * These include: + *

        + *
      • finding the first or last day of the month + *
      • finding the first day of next month + *
      • finding the first or last day of the year + *
      • finding the first day of next year + *
      • finding the first or last day-of-week within a month, such as "first Wednesday in June" + *
      • finding the next or previous day-of-week, such as "next Thursday" + *
      * *

      Specification for implementors

      * This interface places no restrictions on the mutability of implementations, * however immutability is strongly recommended. + *

      + * All the implementations supplied by the static methods on this interface are immutable. * * @since 1.8 */ @@ -128,7 +140,7 @@ public interface TemporalAdjuster { *

      * The input temporal object may be in a calendar system other than ISO. * Implementations may choose to document compatibility with other calendar systems, - * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}. + * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}. *

      * This method may be called from multiple threads in parallel. * It must be thread-safe when invoked. @@ -140,4 +152,311 @@ public interface TemporalAdjuster { */ Temporal adjustInto(Temporal temporal); + //----------------------------------------------------------------------- + /** + * Obtains a {@code TemporalAdjuster} that wraps a date adjuster. + *

      + * The {@code TemporalAdjuster} is based on the low level {@code Temporal} interface. + * This method allows an adjustment from {@code LocalDate} to {@code LocalDate} + * to be wrapped to match the temporal-based interface. + * This is provided for convenience to make user-written adjusters simpler. + *

      + * In general, user-written adjusters should be static constants: + *

      +     *  static TemporalAdjuster TWO_DAYS_LATER = TemporalAdjuster.ofDateAdjuster(
      +     *    date -> date.plusDays(2));
      +     * 
      + * + * @param dateBasedAdjuster the date-based adjuster, not null + * @return the temporal adjuster wrapping on the date adjuster, not null + */ + static TemporalAdjuster ofDateAdjuster(UnaryOperator dateBasedAdjuster) { + return TemporalAdjusters.ofDateAdjuster(dateBasedAdjuster); + } + + //----------------------------------------------------------------------- + /** + * Returns the "first day of month" adjuster, which returns a new date set to + * the first day of the current month. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 will return 2011-01-01.
      + * The input 2011-02-15 will return 2011-02-01. + *

      + * The behavior is suitable for use with most calendar systems. + * It is equivalent to: + *

      +     *  temporal.with(DAY_OF_MONTH, 1);
      +     * 
      + * + * @return the first day-of-month adjuster, not null + */ + static TemporalAdjuster firstDayOfMonth() { + return TemporalAdjusters.firstDayOfMonth(); + } + + /** + * Returns the "last day of month" adjuster, which returns a new date set to + * the last day of the current month. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 will return 2011-01-31.
      + * The input 2011-02-15 will return 2011-02-28.
      + * The input 2012-02-15 will return 2012-02-29 (leap year).
      + * The input 2011-04-15 will return 2011-04-30. + *

      + * The behavior is suitable for use with most calendar systems. + * It is equivalent to: + *

      +     *  long lastDay = temporal.range(DAY_OF_MONTH).getMaximum();
      +     *  temporal.with(DAY_OF_MONTH, lastDay);
      +     * 
      + * + * @return the last day-of-month adjuster, not null + */ + static TemporalAdjuster lastDayOfMonth() { + return TemporalAdjusters.lastDayOfMonth(); + } + + /** + * Returns the "first day of next month" adjuster, which returns a new date set to + * the first day of the next month. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 will return 2011-02-01.
      + * The input 2011-02-15 will return 2011-03-01. + *

      + * The behavior is suitable for use with most calendar systems. + * It is equivalent to: + *

      +     *  temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
      +     * 
      + * + * @return the first day of next month adjuster, not null + */ + static TemporalAdjuster firstDayOfNextMonth() { + return TemporalAdjusters.firstDayOfNextMonth(); + } + + //----------------------------------------------------------------------- + /** + * Returns the "first day of year" adjuster, which returns a new date set to + * the first day of the current year. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 will return 2011-01-01.
      + * The input 2011-02-15 will return 2011-01-01.
      + *

      + * The behavior is suitable for use with most calendar systems. + * It is equivalent to: + *

      +     *  temporal.with(DAY_OF_YEAR, 1);
      +     * 
      + * + * @return the first day-of-year adjuster, not null + */ + static TemporalAdjuster firstDayOfYear() { + return TemporalAdjusters.firstDayOfYear(); + } + + /** + * Returns the "last day of year" adjuster, which returns a new date set to + * the last day of the current year. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 will return 2011-12-31.
      + * The input 2011-02-15 will return 2011-12-31.
      + *

      + * The behavior is suitable for use with most calendar systems. + * It is equivalent to: + *

      +     *  long lastDay = temporal.range(DAY_OF_YEAR).getMaximum();
      +     *  temporal.with(DAY_OF_YEAR, lastDay);
      +     * 
      + * + * @return the last day-of-year adjuster, not null + */ + static TemporalAdjuster lastDayOfYear() { + return TemporalAdjusters.lastDayOfYear(); + } + + /** + * Returns the "first day of next year" adjuster, which returns a new date set to + * the first day of the next year. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 will return 2012-01-01. + *

      + * The behavior is suitable for use with most calendar systems. + * It is equivalent to: + *

      +     *  temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS);
      +     * 
      + * + * @return the first day of next month adjuster, not null + */ + static TemporalAdjuster firstDayOfNextYear() { + return TemporalAdjusters.firstDayOfNextYear(); + } + + //----------------------------------------------------------------------- + /** + * Returns the first in month adjuster, which returns a new date + * in the same month with the first matching day-of-week. + * This is used for expressions like 'first Tuesday in March'. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-12-15 for (MONDAY) will return 2011-12-05.
      + * The input 2011-12-15 for (FRIDAY) will return 2011-12-02.
      + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields + * and the {@code DAYS} unit, and assumes a seven day week. + * + * @param dayOfWeek the day-of-week, not null + * @return the first in month adjuster, not null + */ + static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) { + return TemporalAdjuster.dayOfWeekInMonth(1, dayOfWeek); + } + + /** + * Returns the last in month adjuster, which returns a new date + * in the same month with the last matching day-of-week. + * This is used for expressions like 'last Tuesday in March'. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-12-15 for (MONDAY) will return 2011-12-26.
      + * The input 2011-12-15 for (FRIDAY) will return 2011-12-30.
      + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields + * and the {@code DAYS} unit, and assumes a seven day week. + * + * @param dayOfWeek the day-of-week, not null + * @return the first in month adjuster, not null + */ + static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) { + return TemporalAdjuster.dayOfWeekInMonth(-1, dayOfWeek); + } + + /** + * Returns the day-of-week in month adjuster, which returns a new date + * in the same month with the ordinal day-of-week. + * This is used for expressions like the 'second Tuesday in March'. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-12-15 for (1,TUESDAY) will return 2011-12-06.
      + * The input 2011-12-15 for (2,TUESDAY) will return 2011-12-13.
      + * The input 2011-12-15 for (3,TUESDAY) will return 2011-12-20.
      + * The input 2011-12-15 for (4,TUESDAY) will return 2011-12-27.
      + * The input 2011-12-15 for (5,TUESDAY) will return 2012-01-03.
      + * The input 2011-12-15 for (-1,TUESDAY) will return 2011-12-27 (last in month).
      + * The input 2011-12-15 for (-4,TUESDAY) will return 2011-12-06 (3 weeks before last in month).
      + * The input 2011-12-15 for (-5,TUESDAY) will return 2011-11-29 (4 weeks before last in month).
      + * The input 2011-12-15 for (0,TUESDAY) will return 2011-11-29 (last in previous month).
      + *

      + * For a positive or zero ordinal, the algorithm is equivalent to finding the first + * day-of-week that matches within the month and then adding a number of weeks to it. + * For a negative ordinal, the algorithm is equivalent to finding the last + * day-of-week that matches within the month and then subtracting a number of weeks to it. + * The ordinal number of weeks is not validated and is interpreted leniently + * according to this algorithm. This definition means that an ordinal of zero finds + * the last matching day-of-week in the previous month. + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields + * and the {@code DAYS} unit, and assumes a seven day week. + * + * @param ordinal the week within the month, unbounded but typically from -5 to 5 + * @param dayOfWeek the day-of-week, not null + * @return the day-of-week in month adjuster, not null + */ + static TemporalAdjuster dayOfWeekInMonth(final int ordinal, DayOfWeek dayOfWeek) { + return TemporalAdjusters.dayOfWeekInMonth(ordinal, dayOfWeek); + } + + //----------------------------------------------------------------------- + /** + * Returns the next day-of-week adjuster, which adjusts the date to the + * first occurrence of the specified day-of-week after the date being adjusted. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).
      + * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).
      + * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-22 (seven days later). + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit, + * and assumes a seven day week. + * + * @param dayOfWeek the day-of-week to move the date to, not null + * @return the next day-of-week adjuster, not null + */ + static TemporalAdjuster next(DayOfWeek dayOfWeek) { + return TemporalAdjusters.next(dayOfWeek); + } + + /** + * Returns the next-or-same day-of-week adjuster, which adjusts the date to the + * first occurrence of the specified day-of-week after the date being adjusted + * unless it is already on that day in which case the same object is returned. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-17 (two days later).
      + * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-19 (four days later).
      + * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input). + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit, + * and assumes a seven day week. + * + * @param dayOfWeek the day-of-week to check for or move the date to, not null + * @return the next-or-same day-of-week adjuster, not null + */ + static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) { + return TemporalAdjusters.nextOrSame(dayOfWeek); + } + + /** + * Returns the previous day-of-week adjuster, which adjusts the date to the + * first occurrence of the specified day-of-week before the date being adjusted. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).
      + * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).
      + * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-08 (seven days earlier). + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit, + * and assumes a seven day week. + * + * @param dayOfWeek the day-of-week to move the date to, not null + * @return the previous day-of-week adjuster, not null + */ + static TemporalAdjuster previous(DayOfWeek dayOfWeek) { + return TemporalAdjusters.previous(dayOfWeek); + } + + /** + * Returns the previous-or-same day-of-week adjuster, which adjusts the date to the + * first occurrence of the specified day-of-week before the date being adjusted + * unless it is already on that day in which case the same object is returned. + *

      + * The ISO calendar system behaves as follows:
      + * The input 2011-01-15 (a Saturday) for parameter (MONDAY) will return 2011-01-10 (five days earlier).
      + * The input 2011-01-15 (a Saturday) for parameter (WEDNESDAY) will return 2011-01-12 (three days earlier).
      + * The input 2011-01-15 (a Saturday) for parameter (SATURDAY) will return 2011-01-15 (same as input). + *

      + * The behavior is suitable for use with most calendar systems. + * It uses the {@code DAY_OF_WEEK} field and the {@code DAYS} unit, + * and assumes a seven day week. + * + * @param dayOfWeek the day-of-week to check for or move the date to, not null + * @return the previous-or-same day-of-week adjuster, not null + */ + static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) { + return TemporalAdjusters.previousOrSame(dayOfWeek); + } + } diff --git a/jdk/src/share/classes/java/time/temporal/Adjusters.java b/jdk/src/share/classes/java/time/temporal/TemporalAdjusters.java similarity index 70% rename from jdk/src/share/classes/java/time/temporal/Adjusters.java rename to jdk/src/share/classes/java/time/temporal/TemporalAdjusters.java index 45ccfd1a9f5..293485363a4 100644 --- a/jdk/src/share/classes/java/time/temporal/Adjusters.java +++ b/jdk/src/share/classes/java/time/temporal/TemporalAdjusters.java @@ -29,7 +29,7 @@ * However, the following notice accompanied the original version of this * file: * - * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos + * Copyright (c) 2012-2013, Stephen Colebourne & Michael Nascimento Santos * * All rights reserved. * @@ -69,45 +69,46 @@ import static java.time.temporal.ChronoUnit.MONTHS; import static java.time.temporal.ChronoUnit.YEARS; import java.time.DayOfWeek; +import java.time.LocalDate; import java.util.Objects; +import java.util.function.UnaryOperator; /** - * Common implementations of {@code TemporalAdjuster}. - *

      - * This class provides common implementations of {@link TemporalAdjuster}. - * They are especially useful to document the intent of business logic and - * often link well to requirements. - * For example, these two pieces of code do the same thing, but the second - * one is clearer (assuming that there is a static import of this class): - *

      - *  // direct manipulation
      - *  date.withDayOfMonth(1).plusMonths(1).minusDays(1);
      - *  // use of an adjuster from this class
      - *  date.with(lastDayOfMonth());
      - * 
      - * There are two equivalent ways of using a {@code TemporalAdjuster}. - * The first is to invoke the method on the interface directly. - * The second is to use {@link Temporal#with(TemporalAdjuster)}: - *
      - *   // these two lines are equivalent, but the second approach is recommended
      - *   dateTime = adjuster.adjustInto(dateTime);
      - *   dateTime = dateTime.with(adjuster);
      - * 
      - * It is recommended to use the second approach, {@code with(TemporalAdjuster)}, - * as it is a lot clearer to read in code. - * - *

      Specification for implementors

      - * This is a thread-safe utility class. - * All returned adjusters are immutable and thread-safe. + * Implementations of the static methods in {@code TemporalAdjuster} * * @since 1.8 */ -public final class Adjusters { +final class TemporalAdjusters { + // work around compiler bug not allowing lambdas in static methods + private TemporalAdjusters() { + } + + //----------------------------------------------------------------------- /** - * Private constructor since this is a utility class. + * Obtains a {@code TemporalAdjuster} that wraps a date adjuster. + *

      + * The {@code TemporalAdjuster} is based on the low level {@code Temporal} interface. + * This method allows an adjustment from {@code LocalDate} to {@code LocalDate} + * to be wrapped to match the temporal-based interface. + * This is provided for convenience to make user-written adjusters simpler. + *

      + * In general, user-written adjusters should be static constants: + *

      +     *  public static TemporalAdjuster TWO_DAYS_LATER = TemporalAdjuster.ofDateAdjuster(
      +     *    date -> date.plusDays(2));
      +     * 
      + * + * @param dateBasedAdjuster the date-based adjuster, not null + * @return the temporal adjuster wrapping on the date adjuster, not null */ - private Adjusters() { + static TemporalAdjuster ofDateAdjuster(UnaryOperator dateBasedAdjuster) { + Objects.requireNonNull(dateBasedAdjuster, "dateBasedAdjuster"); + return (temporal) -> { + LocalDate input = LocalDate.from(temporal); + LocalDate output = dateBasedAdjuster.apply(input); + return temporal.with(output); + }; } //----------------------------------------------------------------------- @@ -127,8 +128,8 @@ public final class Adjusters { * * @return the first day-of-month adjuster, not null */ - public static TemporalAdjuster firstDayOfMonth() { - return Impl.FIRST_DAY_OF_MONTH; + static TemporalAdjuster firstDayOfMonth() { + return (temporal) -> temporal.with(DAY_OF_MONTH, 1); } /** @@ -150,8 +151,8 @@ public final class Adjusters { * * @return the last day-of-month adjuster, not null */ - public static TemporalAdjuster lastDayOfMonth() { - return Impl.LAST_DAY_OF_MONTH; + static TemporalAdjuster lastDayOfMonth() { + return (temporal) -> temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum()); } /** @@ -170,8 +171,8 @@ public final class Adjusters { * * @return the first day of next month adjuster, not null */ - public static TemporalAdjuster firstDayOfNextMonth() { - return Impl.FIRST_DAY_OF_NEXT_MONTH; + static TemporalAdjuster firstDayOfNextMonth() { + return (temporal) -> temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS); } //----------------------------------------------------------------------- @@ -191,8 +192,8 @@ public final class Adjusters { * * @return the first day-of-year adjuster, not null */ - public static TemporalAdjuster firstDayOfYear() { - return Impl.FIRST_DAY_OF_YEAR; + static TemporalAdjuster firstDayOfYear() { + return (temporal) -> temporal.with(DAY_OF_YEAR, 1); } /** @@ -212,8 +213,8 @@ public final class Adjusters { * * @return the last day-of-year adjuster, not null */ - public static TemporalAdjuster lastDayOfYear() { - return Impl.LAST_DAY_OF_YEAR; + static TemporalAdjuster lastDayOfYear() { + return (temporal) -> temporal.with(DAY_OF_YEAR, temporal.range(DAY_OF_YEAR).getMaximum()); } /** @@ -231,44 +232,8 @@ public final class Adjusters { * * @return the first day of next month adjuster, not null */ - public static TemporalAdjuster firstDayOfNextYear() { - return Impl.FIRST_DAY_OF_NEXT_YEAR; - } - - //----------------------------------------------------------------------- - /** - * Enum implementing the adjusters. - */ - private static class Impl implements TemporalAdjuster { - /** First day of month adjuster. */ - private static final Impl FIRST_DAY_OF_MONTH = new Impl(0); - /** Last day of month adjuster. */ - private static final Impl LAST_DAY_OF_MONTH = new Impl(1); - /** First day of next month adjuster. */ - private static final Impl FIRST_DAY_OF_NEXT_MONTH = new Impl(2); - /** First day of year adjuster. */ - private static final Impl FIRST_DAY_OF_YEAR = new Impl(3); - /** Last day of year adjuster. */ - private static final Impl LAST_DAY_OF_YEAR = new Impl(4); - /** First day of next month adjuster. */ - private static final Impl FIRST_DAY_OF_NEXT_YEAR = new Impl(5); - /** The ordinal. */ - private final int ordinal; - private Impl(int ordinal) { - this.ordinal = ordinal; - } - @Override - public Temporal adjustInto(Temporal temporal) { - switch (ordinal) { - case 0: return temporal.with(DAY_OF_MONTH, 1); - case 1: return temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum()); - case 2: return temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS); - case 3: return temporal.with(DAY_OF_YEAR, 1); - case 4: return temporal.with(DAY_OF_YEAR, temporal.range(DAY_OF_YEAR).getMaximum()); - case 5: return temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS); - } - throw new IllegalStateException("Unreachable"); - } + static TemporalAdjuster firstDayOfNextYear() { + return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS); } //----------------------------------------------------------------------- @@ -288,9 +253,8 @@ public final class Adjusters { * @param dayOfWeek the day-of-week, not null * @return the first in month adjuster, not null */ - public static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) { - Objects.requireNonNull(dayOfWeek, "dayOfWeek"); - return new DayOfWeekInMonth(1, dayOfWeek); + static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) { + return TemporalAdjusters.dayOfWeekInMonth(1, dayOfWeek); } /** @@ -309,9 +273,8 @@ public final class Adjusters { * @param dayOfWeek the day-of-week, not null * @return the first in month adjuster, not null */ - public static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) { - Objects.requireNonNull(dayOfWeek, "dayOfWeek"); - return new DayOfWeekInMonth(-1, dayOfWeek); + static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) { + return TemporalAdjusters.dayOfWeekInMonth(-1, dayOfWeek); } /** @@ -342,46 +305,30 @@ public final class Adjusters { * It uses the {@code DAY_OF_WEEK} and {@code DAY_OF_MONTH} fields * and the {@code DAYS} unit, and assumes a seven day week. * - * @param ordinal the week within the month, unbound but typically from -5 to 5 + * @param ordinal the week within the month, unbounded but typically from -5 to 5 * @param dayOfWeek the day-of-week, not null * @return the day-of-week in month adjuster, not null - * @throws IllegalArgumentException if the ordinal is invalid */ - public static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) { + static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) { Objects.requireNonNull(dayOfWeek, "dayOfWeek"); - return new DayOfWeekInMonth(ordinal, dayOfWeek); - } - - /** - * Class implementing day-of-week in month adjuster. - */ - private static final class DayOfWeekInMonth implements TemporalAdjuster { - /** The ordinal. */ - private final int ordinal; - /** The day-of-week value, from 1 to 7. */ - private final int dowValue; - - private DayOfWeekInMonth(int ordinal, DayOfWeek dow) { - super(); - this.ordinal = ordinal; - this.dowValue = dow.getValue(); - } - @Override - public Temporal adjustInto(Temporal temporal) { - if (ordinal >= 0) { + int dowValue = dayOfWeek.getValue(); + if (ordinal >= 0) { + return (temporal) -> { Temporal temp = temporal.with(DAY_OF_MONTH, 1); int curDow = temp.get(DAY_OF_WEEK); int dowDiff = (dowValue - curDow + 7) % 7; dowDiff += (ordinal - 1L) * 7L; // safe from overflow return temp.plus(dowDiff, DAYS); - } else { + }; + } else { + return (temporal) -> { Temporal temp = temporal.with(DAY_OF_MONTH, temporal.range(DAY_OF_MONTH).getMaximum()); int curDow = temp.get(DAY_OF_WEEK); int daysDiff = dowValue - curDow; daysDiff = (daysDiff == 0 ? 0 : (daysDiff > 0 ? daysDiff - 7 : daysDiff)); daysDiff -= (-ordinal - 1L) * 7L; // safe from overflow return temp.plus(daysDiff, DAYS); - } + }; } } @@ -402,8 +349,13 @@ public final class Adjusters { * @param dayOfWeek the day-of-week to move the date to, not null * @return the next day-of-week adjuster, not null */ - public static TemporalAdjuster next(DayOfWeek dayOfWeek) { - return new RelativeDayOfWeek(2, dayOfWeek); + static TemporalAdjuster next(DayOfWeek dayOfWeek) { + int dowValue = dayOfWeek.getValue(); + return (temporal) -> { + int calDow = temporal.get(DAY_OF_WEEK); + int daysDiff = calDow - dowValue; + return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); + }; } /** @@ -423,8 +375,16 @@ public final class Adjusters { * @param dayOfWeek the day-of-week to check for or move the date to, not null * @return the next-or-same day-of-week adjuster, not null */ - public static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) { - return new RelativeDayOfWeek(0, dayOfWeek); + static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) { + int dowValue = dayOfWeek.getValue(); + return (temporal) -> { + int calDow = temporal.get(DAY_OF_WEEK); + if (calDow == dowValue) { + return temporal; + } + int daysDiff = calDow - dowValue; + return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); + }; } /** @@ -443,8 +403,13 @@ public final class Adjusters { * @param dayOfWeek the day-of-week to move the date to, not null * @return the previous day-of-week adjuster, not null */ - public static TemporalAdjuster previous(DayOfWeek dayOfWeek) { - return new RelativeDayOfWeek(3, dayOfWeek); + static TemporalAdjuster previous(DayOfWeek dayOfWeek) { + int dowValue = dayOfWeek.getValue(); + return (temporal) -> { + int calDow = temporal.get(DAY_OF_WEEK); + int daysDiff = dowValue - calDow; + return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); + }; } /** @@ -464,39 +429,16 @@ public final class Adjusters { * @param dayOfWeek the day-of-week to check for or move the date to, not null * @return the previous-or-same day-of-week adjuster, not null */ - public static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) { - return new RelativeDayOfWeek(1, dayOfWeek); - } - - /** - * Implementation of next, previous or current day-of-week. - */ - private static final class RelativeDayOfWeek implements TemporalAdjuster { - /** Whether the current date is a valid answer. */ - private final int relative; - /** The day-of-week value, from 1 to 7. */ - private final int dowValue; - - private RelativeDayOfWeek(int relative, DayOfWeek dayOfWeek) { - Objects.requireNonNull(dayOfWeek, "dayOfWeek"); - this.relative = relative; - this.dowValue = dayOfWeek.getValue(); - } - - @Override - public Temporal adjustInto(Temporal temporal) { + static TemporalAdjuster previousOrSame(DayOfWeek dayOfWeek) { + int dowValue = dayOfWeek.getValue(); + return (temporal) -> { int calDow = temporal.get(DAY_OF_WEEK); - if (relative < 2 && calDow == dowValue) { + if (calDow == dowValue) { return temporal; } - if ((relative & 1) == 0) { - int daysDiff = calDow - dowValue; - return temporal.plus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); - } else { - int daysDiff = dowValue - calDow; - return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); - } - } + int daysDiff = dowValue - calDow; + return temporal.minus(daysDiff >= 0 ? 7 - daysDiff : -daysDiff, DAYS); + }; } } diff --git a/jdk/src/share/classes/java/time/temporal/TemporalAmount.java b/jdk/src/share/classes/java/time/temporal/TemporalAmount.java index 6fa4e47a36f..a264ebaa604 100644 --- a/jdk/src/share/classes/java/time/temporal/TemporalAmount.java +++ b/jdk/src/share/classes/java/time/temporal/TemporalAmount.java @@ -75,7 +75,7 @@ import java.util.List; * to any specific point on the time-line. *

      * The amount can be thought of as a {@code Map} of {@link TemporalUnit} to - * {@code long}, exposed via {@link #getUnits()}and {@link #get(TemporalUnit)}. + * {@code long}, exposed via {@link #getUnits()} and {@link #get(TemporalUnit)}. * A simple case might have a single unit-value pair, such as "6 hours". * A more complex case may have multiple unit-value pairs, such as * "7 years, 3 months and 5 days". @@ -111,9 +111,10 @@ public interface TemporalAmount { * * @param unit the {@code TemporalUnit} for which to return the value * @return the long value of the unit - * @throws DateTimeException if the {@code unit} is not supported + * @throws DateTimeException if a value for the unit cannot be obtained + * @throws UnsupportedTemporalTypeException if the {@code unit} is not supported */ - public long get(TemporalUnit unit); + long get(TemporalUnit unit); /** * Returns the list of units uniquely defining the value of this TemporalAmount. @@ -130,7 +131,7 @@ public interface TemporalAmount { * * @return the List of {@code TemporalUnits}; not null */ - public List getUnits(); + List getUnits(); /** * Adds to the specified temporal object. @@ -162,7 +163,7 @@ public interface TemporalAmount { *

      * The input temporal object may be in a calendar system other than ISO. * Implementations may choose to document compatibility with other calendar systems, - * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}. + * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}. *

      * This method may be called from multiple threads in parallel. * It must be thread-safe when invoked. @@ -172,7 +173,7 @@ public interface TemporalAmount { * @throws DateTimeException if unable to add * @throws ArithmeticException if numeric overflow occurs */ - public Temporal addTo(Temporal temporal); + Temporal addTo(Temporal temporal); /** * Subtracts this object from the specified temporal object. @@ -204,7 +205,7 @@ public interface TemporalAmount { *

      * The input temporal object may be in a calendar system other than ISO. * Implementations may choose to document compatibility with other calendar systems, - * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}. + * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}. *

      * This method may be called from multiple threads in parallel. * It must be thread-safe when invoked. @@ -214,5 +215,5 @@ public interface TemporalAmount { * @throws DateTimeException if unable to subtract * @throws ArithmeticException if numeric overflow occurs */ - public Temporal subtractFrom(Temporal temporal); + Temporal subtractFrom(Temporal temporal); } diff --git a/jdk/src/share/classes/java/time/temporal/TemporalField.java b/jdk/src/share/classes/java/time/temporal/TemporalField.java index c456f56e866..81992b4fb2f 100644 --- a/jdk/src/share/classes/java/time/temporal/TemporalField.java +++ b/jdk/src/share/classes/java/time/temporal/TemporalField.java @@ -62,8 +62,10 @@ package java.time.temporal; import java.time.DateTimeException; -import java.util.Comparator; +import java.time.format.ResolverStyle; +import java.util.Locale; import java.util.Map; +import java.util.Objects; /** * A field of date-time, such as month-of-year or hour-of-minute. @@ -88,7 +90,7 @@ import java.util.Map; * * @since 1.8 */ -public interface TemporalField extends Comparator { +public interface TemporalField { /** * Gets a descriptive name for the field. @@ -101,6 +103,21 @@ public interface TemporalField extends Comparator { */ String getName(); + /** + * Gets the display name for the field in the requested locale. + *

      + * If there is no display name for the locale the value of {@code getName} + * is returned. + * + * @param locale the locale to use, not null + * @return the display name for the locale or the value of {@code getName}, + * not null + */ + default String getDisplayName(Locale locale) { + Objects.requireNonNull(locale, "local"); + return getName(); + } + /** * Gets the unit that the field is measured in. *

      @@ -126,28 +143,6 @@ public interface TemporalField extends Comparator { */ TemporalUnit getRangeUnit(); - //----------------------------------------------------------------------- - /** - * Compares the value of this field in two temporal objects. - *

      - * All fields implement {@link Comparator} on {@link TemporalAccessor}. - * This allows a list of date-times to be compared using the value of a field. - * For example, you could sort a list of arbitrary temporal objects by the value of - * the month-of-year field - {@code Collections.sort(list, MONTH_OF_YEAR)} - *

      - * The default implementation must behave equivalent to this code: - *

      -     *  return Long.compare(temporal1.getLong(this), temporal2.getLong(this));
      -     * 
      - * - * @param temporal1 the first temporal object to compare, not null - * @param temporal2 the second temporal object to compare, not null - * @throws DateTimeException if unable to obtain the value for this field - */ - public default int compare(TemporalAccessor temporal1, TemporalAccessor temporal2) { - return Long.compare(temporal1.getLong(this), temporal2.getLong(this)); - } - /** * Gets the range of valid values for the field. *

      @@ -163,6 +158,35 @@ public interface TemporalField extends Comparator { */ ValueRange range(); + //----------------------------------------------------------------------- + /** + * Checks if this field represents a component of a date. + *

      + * A field is date-based if it can be derived from + * {@link ChronoField#EPOCH_DAY EPOCH_DAY}. + *

      + * The default implementation must return false. + * + * @return true if this field is a component of a date + */ + default boolean isDateBased() { + return false; + } + + /** + * Checks if this field represents a component of a time. + *

      + * A field is time-based if it can be derived from + * {@link ChronoField#NANO_OF_DAY NANO_OF_DAY}. + *

      + * The default implementation must return false. + * + * @return true if this field is a component of a time + */ + default boolean isTimeBased() { + return false; + } + //----------------------------------------------------------------------- /** * Checks if this field is supported by the temporal object. @@ -213,11 +237,12 @@ public interface TemporalField extends Comparator { *

      * Implementations should perform any queries or calculations using the fields * available in {@link ChronoField}. - * If the field is not supported a {@code DateTimeException} must be thrown. + * If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown. * * @param temporal the temporal object used to refine the result, not null * @return the range of valid values for this field, not null * @throws DateTimeException if the range for the field cannot be obtained + * @throws UnsupportedTemporalTypeException if the field is not supported by the temporal */ ValueRange rangeRefinedBy(TemporalAccessor temporal); @@ -240,11 +265,12 @@ public interface TemporalField extends Comparator { *

      * Implementations should perform any queries or calculations using the fields * available in {@link ChronoField}. - * If the field is not supported a {@code DateTimeException} must be thrown. + * If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown. * * @param temporal the temporal object to query, not null * @return the value of this field, not null * @throws DateTimeException if a value for the field cannot be obtained + * @throws UnsupportedTemporalTypeException if the field is not supported by the temporal * @throws ArithmeticException if numeric overflow occurs */ long getFrom(TemporalAccessor temporal); @@ -276,7 +302,7 @@ public interface TemporalField extends Comparator { *

      * Implementations should perform any queries or calculations using the fields * available in {@link ChronoField}. - * If the field is not supported a {@code DateTimeException} must be thrown. + * If the field is not supported an {@code UnsupportedTemporalTypeException} must be thrown. *

      * Implementations must not alter the specified temporal object. * Instead, an adjusted copy of the original must be returned. @@ -287,6 +313,7 @@ public interface TemporalField extends Comparator { * @param newValue the new value of the field * @return the adjusted temporal object, not null * @throws DateTimeException if the field cannot be set + * @throws UnsupportedTemporalTypeException if the field is not supported by the temporal * @throws ArithmeticException if numeric overflow occurs */ R adjustInto(R temporal, long newValue); @@ -314,17 +341,22 @@ public interface TemporalField extends Comparator { * If the result is non-null, this field will be removed from the temporal. * This field should not be added to the result map. *

      + * The {@link ResolverStyle} should be used by implementations to determine + * how to perform the resolve. + *

      * The default implementation must return null. * * @param temporal the temporal to resolve, not null * @param value the value of this field + * @param resolverStyle the requested type of resolve, not null * @return a map of fields to update in the temporal, with a mapping to null * indicating a deletion. The whole map must be null if no resolving occurred * @throws DateTimeException if resolving results in an error. This must not be thrown * by querying a field on the temporal without first checking if it is supported * @throws ArithmeticException if numeric overflow occurs */ - public default Map resolve(TemporalAccessor temporal, long value) { + default Map resolve( + TemporalAccessor temporal, long value, ResolverStyle resolverStyle) { return null; } diff --git a/jdk/src/share/classes/java/time/temporal/TemporalQueries.java b/jdk/src/share/classes/java/time/temporal/TemporalQueries.java new file mode 100644 index 00000000000..f7c95add925 --- /dev/null +++ b/jdk/src/share/classes/java/time/temporal/TemporalQueries.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package java.time.temporal; + +import static java.time.temporal.ChronoField.EPOCH_DAY; +import static java.time.temporal.ChronoField.NANO_OF_DAY; +import static java.time.temporal.ChronoField.OFFSET_SECONDS; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.chrono.Chronology; + +/** + * Common implementations of {@code TemporalQuery}. + *

      + * This class provides common implementations of {@link TemporalQuery}. + * These are defined here as they must be constants, and the definition + * of lambdas does not guarantee that. By assigning them once here, + * they become 'normal' Java constants. + * + * @since 1.8 + */ +final class TemporalQueries { + // note that it is vital that each method supplies a constant, not a + // calculated value, as they will be checked for using == + // it is also vital that each constant is different (due to the == checking) + // as such, alterations to this code must be done with care + + /** + * Private constructor since this is a utility class. + */ + private TemporalQueries() { + } + + //----------------------------------------------------------------------- + /** + * A strict query for the {@code ZoneId}. + */ + static final TemporalQuery ZONE_ID = (temporal) -> { + return temporal.query(ZONE_ID); + }; + + /** + * A query for the {@code Chronology}. + */ + static final TemporalQuery CHRONO = (temporal) -> { + return temporal.query(CHRONO); + }; + + /** + * A query for the smallest supported unit. + */ + static final TemporalQuery PRECISION = (temporal) -> { + return temporal.query(PRECISION); + }; + + //----------------------------------------------------------------------- + /** + * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}. + */ + static final TemporalQuery ZONE = (temporal) -> { + ZoneId zone = temporal.query(ZONE_ID); + return (zone != null ? zone : temporal.query(OFFSET)); + }; + + /** + * A query for {@code ZoneOffset} returning null if not found. + */ + static final TemporalQuery OFFSET = (temporal) -> { + if (temporal.isSupported(OFFSET_SECONDS)) { + return ZoneOffset.ofTotalSeconds(temporal.get(OFFSET_SECONDS)); + } + return null; + }; + + /** + * A query for {@code LocalDate} returning null if not found. + */ + static final TemporalQuery LOCAL_DATE = (temporal) -> { + if (temporal.isSupported(EPOCH_DAY)) { + return LocalDate.ofEpochDay(temporal.getLong(EPOCH_DAY)); + } + return null; + }; + + /** + * A query for {@code LocalTime} returning null if not found. + */ + static final TemporalQuery LOCAL_TIME = (temporal) -> { + if (temporal.isSupported(NANO_OF_DAY)) { + return LocalTime.ofNanoOfDay(temporal.getLong(NANO_OF_DAY)); + } + return null; + }; + +} diff --git a/jdk/src/share/classes/java/time/temporal/TemporalQuery.java b/jdk/src/share/classes/java/time/temporal/TemporalQuery.java index 40b3943e740..599377847aa 100644 --- a/jdk/src/share/classes/java/time/temporal/TemporalQuery.java +++ b/jdk/src/share/classes/java/time/temporal/TemporalQuery.java @@ -62,6 +62,11 @@ package java.time.temporal; import java.time.DateTimeException; +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.chrono.Chronology; /** * Strategy for querying a temporal object. @@ -89,8 +94,7 @@ import java.time.DateTimeException; *

      * The most common implementations are method references, such as * {@code LocalDate::from} and {@code ZoneId::from}. - * Further implementations are on {@link Queries}. - * Queries may also be defined by applications. + * Additional common implementations are provided on this interface as static methods. * *

      Specification for implementors

      * This interface places no restrictions on the mutability of implementations, @@ -129,7 +133,7 @@ public interface TemporalQuery { *

      * The input temporal object may be in a calendar system other than ISO. * Implementations may choose to document compatibility with other calendar systems, - * or reject non-ISO temporal objects by {@link Queries#chronology() querying the chronology}. + * or reject non-ISO temporal objects by {@link TemporalQuery#chronology() querying the chronology}. *

      * This method may be called from multiple threads in parallel. * It must be thread-safe when invoked. @@ -141,4 +145,214 @@ public interface TemporalQuery { */ R queryFrom(TemporalAccessor temporal); + //----------------------------------------------------------------------- + // special constants should be used to extract information from a TemporalAccessor + // that cannot be derived in other ways + // Javadoc added here, so as to pretend they are more normal than they really are + + /** + * A strict query for the {@code ZoneId}. + *

      + * This queries a {@code TemporalAccessor} for the zone. + * The zone is only returned if the date-time conceptually contains a {@code ZoneId}. + * It will not be returned if the date-time only conceptually has an {@code ZoneOffset}. + * Thus a {@link java.time.ZonedDateTime} will return the result of {@code getZone()}, + * but an {@link java.time.OffsetDateTime} will return null. + *

      + * In most cases, applications should use {@link #zone()} as this query is too strict. + *

      + * The result from JDK classes implementing {@code TemporalAccessor} is as follows:
      + * {@code LocalDate} returns null
      + * {@code LocalTime} returns null
      + * {@code LocalDateTime} returns null
      + * {@code ZonedDateTime} returns the associated zone
      + * {@code OffsetTime} returns null
      + * {@code OffsetDateTime} returns null
      + * {@code ChronoLocalDate} returns null
      + * {@code ChronoLocalDateTime} returns null
      + * {@code ChronoZonedDateTime} returns the associated zone
      + * {@code Era} returns null
      + * {@code DayOfWeek} returns null
      + * {@code Month} returns null
      + * {@code Year} returns null
      + * {@code YearMonth} returns null
      + * {@code MonthDay} returns null
      + * {@code ZoneOffset} returns null
      + * {@code Instant} returns null
      + * + * @return a query that can obtain the zone ID of a temporal, not null + */ + static TemporalQuery zoneId() { + return TemporalQueries.ZONE_ID; + } + + /** + * A query for the {@code Chronology}. + *

      + * This queries a {@code TemporalAccessor} for the chronology. + * If the target {@code TemporalAccessor} represents a date, or part of a date, + * then it should return the chronology that the date is expressed in. + * As a result of this definition, objects only representing time, such as + * {@code LocalTime}, will return null. + *

      + * The result from JDK classes implementing {@code TemporalAccessor} is as follows:
      + * {@code LocalDate} returns {@code IsoChronology.INSTANCE}
      + * {@code LocalTime} returns null (does not represent a date)
      + * {@code LocalDateTime} returns {@code IsoChronology.INSTANCE}
      + * {@code ZonedDateTime} returns {@code IsoChronology.INSTANCE}
      + * {@code OffsetTime} returns null (does not represent a date)
      + * {@code OffsetDateTime} returns {@code IsoChronology.INSTANCE}
      + * {@code ChronoLocalDate} returns the associated chronology
      + * {@code ChronoLocalDateTime} returns the associated chronology
      + * {@code ChronoZonedDateTime} returns the associated chronology
      + * {@code Era} returns the associated chronology
      + * {@code DayOfWeek} returns null (shared across chronologies)
      + * {@code Month} returns {@code IsoChronology.INSTANCE}
      + * {@code Year} returns {@code IsoChronology.INSTANCE}
      + * {@code YearMonth} returns {@code IsoChronology.INSTANCE}
      + * {@code MonthDay} returns null {@code IsoChronology.INSTANCE}
      + * {@code ZoneOffset} returns null (does not represent a date)
      + * {@code Instant} returns null (does not represent a date)
      + *

      + * The method {@link java.time.chrono.Chronology#from(TemporalAccessor)} can be used as a + * {@code TemporalQuery} via a method reference, {@code Chronology::from}. + * That method is equivalent to this query, except that it throws an + * exception if a chronology cannot be obtained. + * + * @return a query that can obtain the chronology of a temporal, not null + */ + static TemporalQuery chronology() { + return TemporalQueries.CHRONO; + } + + /** + * A query for the smallest supported unit. + *

      + * This queries a {@code TemporalAccessor} for the time precision. + * If the target {@code TemporalAccessor} represents a consistent or complete date-time, + * date or time then this must return the smallest precision actually supported. + * Note that fields such as {@code NANO_OF_DAY} and {@code NANO_OF_SECOND} + * are defined to always return ignoring the precision, thus this is the only + * way to find the actual smallest supported unit. + * For example, were {@code GregorianCalendar} to implement {@code TemporalAccessor} + * it would return a precision of {@code MILLIS}. + *

      + * The result from JDK classes implementing {@code TemporalAccessor} is as follows:
      + * {@code LocalDate} returns {@code DAYS}
      + * {@code LocalTime} returns {@code NANOS}
      + * {@code LocalDateTime} returns {@code NANOS}
      + * {@code ZonedDateTime} returns {@code NANOS}
      + * {@code OffsetTime} returns {@code NANOS}
      + * {@code OffsetDateTime} returns {@code NANOS}
      + * {@code ChronoLocalDate} returns {@code DAYS}
      + * {@code ChronoLocalDateTime} returns {@code NANOS}
      + * {@code ChronoZonedDateTime} returns {@code NANOS}
      + * {@code Era} returns {@code ERAS}
      + * {@code DayOfWeek} returns {@code DAYS}
      + * {@code Month} returns {@code MONTHS}
      + * {@code Year} returns {@code YEARS}
      + * {@code YearMonth} returns {@code MONTHS}
      + * {@code MonthDay} returns null (does not represent a complete date or time)
      + * {@code ZoneOffset} returns null (does not represent a date or time)
      + * {@code Instant} returns {@code NANOS}
      + * + * @return a query that can obtain the precision of a temporal, not null + */ + static TemporalQuery precision() { + return TemporalQueries.PRECISION; + } + + //----------------------------------------------------------------------- + // non-special constants are standard queries that derive information from other information + /** + * A lenient query for the {@code ZoneId}, falling back to the {@code ZoneOffset}. + *

      + * This queries a {@code TemporalAccessor} for the zone. + * It first tries to obtain the zone, using {@link #zoneId()}. + * If that is not found it tries to obtain the {@link #offset()}. + * Thus a {@link java.time.ZonedDateTime} will return the result of {@code getZone()}, + * while an {@link java.time.OffsetDateTime} will return the result of {@code getOffset()}. + *

      + * In most cases, applications should use this query rather than {@code #zoneId()}. + *

      + * The method {@link ZoneId#from(TemporalAccessor)} can be used as a + * {@code TemporalQuery} via a method reference, {@code ZoneId::from}. + * That method is equivalent to this query, except that it throws an + * exception if a zone cannot be obtained. + * + * @return a query that can obtain the zone ID or offset of a temporal, not null + */ + static TemporalQuery zone() { + return TemporalQueries.ZONE; + } + + /** + * A query for {@code ZoneOffset} returning null if not found. + *

      + * This returns a {@code TemporalQuery} that can be used to query a temporal + * object for the offset. The query will return null if the temporal + * object cannot supply an offset. + *

      + * The query implementation examines the {@link ChronoField#OFFSET_SECONDS OFFSET_SECONDS} + * field and uses it to create a {@code ZoneOffset}. + *

      + * The method {@link java.time.ZoneOffset#from(TemporalAccessor)} can be used as a + * {@code TemporalQuery} via a method reference, {@code ZoneOffset::from}. + * This query and {@code ZoneOffset::from} will return the same result if the + * temporal object contains an offset. If the temporal object does not contain + * an offset, then the method reference will throw an exception, whereas this + * query will return null. + * + * @return a query that can obtain the offset of a temporal, not null + */ + static TemporalQuery offset() { + return TemporalQueries.OFFSET; + } + + /** + * A query for {@code LocalDate} returning null if not found. + *

      + * This returns a {@code TemporalQuery} that can be used to query a temporal + * object for the local date. The query will return null if the temporal + * object cannot supply a local date. + *

      + * The query implementation examines the {@link ChronoField#EPOCH_DAY EPOCH_DAY} + * field and uses it to create a {@code LocalDate}. + *

      + * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a + * {@code TemporalQuery} via a method reference, {@code LocalDate::from}. + * This query and {@code LocalDate::from} will return the same result if the + * temporal object contains a date. If the temporal object does not contain + * a date, then the method reference will throw an exception, whereas this + * query will return null. + * + * @return a query that can obtain the date of a temporal, not null + */ + static TemporalQuery localDate() { + return TemporalQueries.LOCAL_DATE; + } + + /** + * A query for {@code LocalTime} returning null if not found. + *

      + * This returns a {@code TemporalQuery} that can be used to query a temporal + * object for the local time. The query will return null if the temporal + * object cannot supply a local time. + *

      + * The query implementation examines the {@link ChronoField#NANO_OF_DAY NANO_OF_DAY} + * field and uses it to create a {@code LocalTime}. + *

      + * The method {@link ZoneOffset#from(TemporalAccessor)} can be used as a + * {@code TemporalQuery} via a method reference, {@code LocalTime::from}. + * This query and {@code LocalTime::from} will return the same result if the + * temporal object contains a time. If the temporal object does not contain + * a time, then the method reference will throw an exception, whereas this + * query will return null. + * + * @return a query that can obtain the time of a temporal, not null + */ + static TemporalQuery localTime() { + return TemporalQueries.LOCAL_TIME; + } + } diff --git a/jdk/src/share/classes/java/time/temporal/TemporalUnit.java b/jdk/src/share/classes/java/time/temporal/TemporalUnit.java index 2f117fc2f16..86e3ba86137 100644 --- a/jdk/src/share/classes/java/time/temporal/TemporalUnit.java +++ b/jdk/src/share/classes/java/time/temporal/TemporalUnit.java @@ -143,10 +143,12 @@ public interface TemporalUnit { * @param temporal the temporal object to check, not null * @return true if the unit is supported */ - public default boolean isSupportedBy(Temporal temporal) { + default boolean isSupportedBy(Temporal temporal) { try { temporal.plus(1, this); return true; + } catch (UnsupportedTemporalTypeException ex) { + return false; } catch (RuntimeException ex) { try { temporal.plus(-1, this); @@ -178,7 +180,7 @@ public interface TemporalUnit { *

      * Implementations should perform any queries or calculations using the units * available in {@link ChronoUnit} or the fields available in {@link ChronoField}. - * If the unit is not supported a {@code DateTimeException} must be thrown. + * If the unit is not supported an {@code UnsupportedTemporalTypeException} must be thrown. *

      * Implementations must not alter the specified temporal object. * Instead, an adjusted copy of the original must be returned. @@ -189,6 +191,7 @@ public interface TemporalUnit { * @param amount the amount of this unit to add, positive or negative * @return the adjusted temporal object, not null * @throws DateTimeException if the period cannot be added + * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal */ R addTo(R temporal, long amount); @@ -214,8 +217,8 @@ public interface TemporalUnit { * The second is to use {@link Temporal#periodUntil(Temporal, TemporalUnit)}: *

            *   // these two lines are equivalent
      -     *   temporal = thisUnit.between(start, end);
      -     *   temporal = start.periodUntil(end, thisUnit);
      +     *   between = thisUnit.between(start, end);
      +     *   between = start.periodUntil(end, thisUnit);
            * 
      * The choice should be made based on which makes the code more readable. *

      @@ -229,14 +232,15 @@ public interface TemporalUnit { *

      * Implementations should perform any queries or calculations using the units * available in {@link ChronoUnit} or the fields available in {@link ChronoField}. - * If the unit is not supported a {@code DateTimeException} must be thrown. + * If the unit is not supported an {@code UnsupportedTemporalTypeException} must be thrown. * Implementations must not alter the specified temporal objects. * * @param temporal1 the base temporal object, not null * @param temporal2 the other temporal object, not null - * @return the period between datetime1 and datetime2 in terms of this unit; - * positive if datetime2 is later than datetime1, negative if earlier + * @return the period between temporal1 and temporal2 in terms of this unit; + * positive if temporal2 is later than temporal1, negative if earlier * @throws DateTimeException if the period cannot be calculated + * @throws UnsupportedTemporalTypeException if the unit is not supported by the temporal * @throws ArithmeticException if numeric overflow occurs */ long between(Temporal temporal1, Temporal temporal2); diff --git a/jdk/src/share/classes/java/time/temporal/UnsupportedTemporalTypeException.java b/jdk/src/share/classes/java/time/temporal/UnsupportedTemporalTypeException.java new file mode 100644 index 00000000000..4b47b0afcf1 --- /dev/null +++ b/jdk/src/share/classes/java/time/temporal/UnsupportedTemporalTypeException.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package java.time.temporal; + +import java.time.DateTimeException; + +/** + * UnsupportedTemporalTypeException indicates that a ChronoField or ChronoUnit is + * not supported for a Temporal class. + * + *

      Specification for implementors

      + * This class is intended for use in a single thread. + * + * @since 1.8 + */ +public class UnsupportedTemporalTypeException extends DateTimeException { + + /** + * Serialization version. + */ + private static final long serialVersionUID = -6158898438688206006L; + + /** + * Constructs a new UnsupportedTemporalTypeException with the specified message. + * + * @param message the message to use for this exception, may be null + */ + public UnsupportedTemporalTypeException(String message) { + super(message); + } + + /** + * Constructs a new UnsupportedTemporalTypeException with the specified message and cause. + * + * @param message the message to use for this exception, may be null + * @param cause the cause of the exception, may be null + */ + public UnsupportedTemporalTypeException(String message, Throwable cause) { + super(message, cause); + } + +} diff --git a/jdk/src/share/classes/java/time/temporal/ValueRange.java b/jdk/src/share/classes/java/time/temporal/ValueRange.java index cd47f256d4d..d6e3a525c70 100644 --- a/jdk/src/share/classes/java/time/temporal/ValueRange.java +++ b/jdk/src/share/classes/java/time/temporal/ValueRange.java @@ -305,11 +305,7 @@ public final class ValueRange implements Serializable { */ public long checkValidValue(long value, TemporalField field) { if (isValidValue(value) == false) { - if (field != null) { - throw new DateTimeException("Invalid value for " + field.getName() + " (valid values " + this + "): " + value); - } else { - throw new DateTimeException("Invalid value (valid values " + this + "): " + value); - } + throw new DateTimeException(genInvalidFieldMessage(field, value)); } return value; } @@ -328,11 +324,19 @@ public final class ValueRange implements Serializable { */ public int checkValidIntValue(long value, TemporalField field) { if (isValidIntValue(value) == false) { - throw new DateTimeException("Invalid int value for " + field.getName() + ": " + value); + throw new DateTimeException(genInvalidFieldMessage(field, value)); } return (int) value; } + private String genInvalidFieldMessage(TemporalField field, long value) { + if (field != null) { + return "Invalid value for " + field.getName() + " (valid values " + this + "): " + value; + } else { + return "Invalid value (valid values " + this + "): " + value; + } + } + //----------------------------------------------------------------------- /** * Checks if this range is equal to another range. diff --git a/jdk/src/share/classes/java/time/temporal/WeekFields.java b/jdk/src/share/classes/java/time/temporal/WeekFields.java index b9d7c15f30e..29a1e1bf8fb 100644 --- a/jdk/src/share/classes/java/time/temporal/WeekFields.java +++ b/jdk/src/share/classes/java/time/temporal/WeekFields.java @@ -68,6 +68,7 @@ import static java.time.temporal.ChronoField.EPOCH_DAY; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoUnit.DAYS; +import static java.time.temporal.ChronoUnit.FOREVER; import static java.time.temporal.ChronoUnit.MONTHS; import static java.time.temporal.ChronoUnit.WEEKS; import static java.time.temporal.ChronoUnit.YEARS; @@ -77,14 +78,18 @@ import java.io.Serializable; import java.time.DayOfWeek; import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; +import java.time.format.ResolverStyle; import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Objects; +import java.util.ResourceBundle; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import sun.util.locale.provider.CalendarDataUtility; +import sun.util.locale.provider.LocaleProviderAdapter; +import sun.util.locale.provider.LocaleResources; /** * Localized definitions of the day-of-week, week-of-month and week-of-year fields. @@ -93,8 +98,9 @@ import sun.util.locale.provider.CalendarDataUtility; * other aspects of a week. This class represents the definition of the week, for the * purpose of providing {@link TemporalField} instances. *

      - * WeekFields provides three fields, - * {@link #dayOfWeek()}, {@link #weekOfMonth()}, and {@link #weekOfYear()} + * WeekFields provides five fields, + * {@link #dayOfWeek()}, {@link #weekOfMonth()}, {@link #weekOfYear()}, + * {@link #weekOfWeekBasedYear()}, and {@link #weekBasedYear()} * that provide access to the values from any {@linkplain Temporal temporal object}. *

      * The computations for day-of-week, week-of-month, and week-of-year are based @@ -110,7 +116,7 @@ import sun.util.locale.provider.CalendarDataUtility; *

    35. The first day-of-week. * For example, the ISO-8601 standard considers Monday to be the first day-of-week. *
    36. The minimal number of days in the first week. - * For example, the ISO-08601 standard counts the first week as needing at least 4 days. + * For example, the ISO-8601 standard counts the first week as needing at least 4 days. *

      * Together these two values allow a year or month to be divided into weeks. *

      @@ -134,14 +140,37 @@ import sun.util.locale.provider.CalendarDataUtility; * 2009-01-05Monday * Week 2 of January 2009Week 1 of January 2009 * - *

      + * *

      Week of Year

      * One field is used: week-of-year. * The calculation ensures that weeks never overlap a year boundary. * The year is divided into periods where each period starts on the defined first day-of-week. * The earliest period is referred to as week 0 if it has less than the minimal number of days * and week 1 if it has at least the minimal number of days. - *

      + * + *

      Week Based Year

      + * Two fields are used for week-based-year, one for the + * {@link #weekOfWeekBasedYear() week-of-week-based-year} and one for + * {@link #weekBasedYear() week-based-year}. In a week-based-year, each week + * belongs to only a single year. Week 1 of a year is the first week that + * starts on the first day-of-week and has at least the minimum number of days. + * The first and last weeks of a year may contain days from the + * previous calendar year or next calendar year respectively. + * + * + * + * + * + * + * + * + * + * + * + * + * + *
      Examples of WeekFields for week-based-year
      DateDay-of-weekFirst day: Monday
      Minimal days: 4
      First day: Monday
      Minimal days: 5
      2008-12-31WednesdayWeek 1 of 2009Week 53 of 2008
      2009-01-01ThursdayWeek 1 of 2009Week 53 of 2008
      2009-01-04SundayWeek 1 of 2009Week 53 of 2008
      2009-01-05MondayWeek 2 of 2009Week 1 of 2009
      + *

      Specification for implementors

      * This class is immutable and thread-safe. * * @since 1.8 @@ -171,18 +200,40 @@ public final class WeekFields implements Serializable { * Note that the first week may start in the previous calendar year. * Note also that the first few days of a calendar year may be in the * week-based-year corresponding to the previous calendar year. + *

      + * This field is an immutable and thread-safe singleton. */ public static final WeekFields ISO = new WeekFields(DayOfWeek.MONDAY, 4); /** - * The common definition of a week that starts on Sunday. + * The common definition of a week that starts on Sunday and the first week + * has a minimum of 1 day. *

      * Defined as starting on Sunday and with a minimum of 1 day in the month. * This week definition is in use in the US and other European countries. - * + *

      + * This field is an immutable and thread-safe singleton. */ public static final WeekFields SUNDAY_START = WeekFields.of(DayOfWeek.SUNDAY, 1); + /** + * The unit that represents week-based-years for the purpose of addition and subtraction. + *

      + * This allows a number of week-based-years to be added to, or subtracted from, a date. + * The unit is equal to either 52 or 53 weeks. + * The estimated duration of a week-based-year is the same as that of a standard ISO + * year at {@code 365.2425 Days}. + *

      + * The rules for addition add the number of week-based-years to the existing value + * for the week-based-year field retaining the week-of-week-based-year + * and day-of-week, unless the week number it too large for the target year. + * In that case, the week is set to the last week of the year + * with the same day-of-week. + *

      + * This field is an immutable and thread-safe singleton. + */ + public static final TemporalUnit WEEK_BASED_YEARS = IsoFields.WEEK_BASED_YEARS; + /** * Serialization version. */ @@ -212,6 +263,24 @@ public final class WeekFields implements Serializable { */ private transient final TemporalField weekOfYear = ComputedDayOfField.ofWeekOfYearField(this); + /** + * The field that represents the week-of-week-based-year. + *

      + * This field allows the week of the week-based-year value to be queried and set. + *

      + * This unit is an immutable and thread-safe singleton. + */ + private transient final TemporalField weekOfWeekBasedYear = ComputedDayOfField.ofWeekOfWeekBasedYearField(this); + + /** + * The field that represents the week-based-year. + *

      + * This field allows the week-based-year value to be queried and set. + *

      + * This unit is an immutable and thread-safe singleton. + */ + private transient final TemporalField weekBasedYear = ComputedDayOfField.ofWeekBasedYearField(this); + /** * Obtains an instance of {@code WeekFields} appropriate for a locale. *

      @@ -341,7 +410,7 @@ public final class WeekFields implements Serializable { * Returns a field to access the week of month, * computed based on this WeekFields. *

      - * This represents concept of the count of weeks within the month where weeks + * This represents the concept of the count of weeks within the month where weeks * start on a fixed day-of-week, such as Monday. * This field is typically used with {@link WeekFields#dayOfWeek()}. *

      @@ -367,12 +436,12 @@ public final class WeekFields implements Serializable { * Returns a field to access the week of year, * computed based on this WeekFields. *

      - * This represents concept of the count of weeks within the year where weeks + * This represents the concept of the count of weeks within the year where weeks * start on a fixed day-of-week, such as Monday. * This field is typically used with {@link WeekFields#dayOfWeek()}. *

      * Week one(1) is the week starting on the {@link WeekFields#getFirstDayOfWeek} - * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the month. + * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the year. * Thus, week one may start up to {@code minDays} days before the start of the year. * If the first week starts after the start of the year then the period before is week zero (0). *

      @@ -390,7 +459,59 @@ public final class WeekFields implements Serializable { } /** - * Checks if these rules are equal to the specified rules. + * Returns a field to access the week of a week-based-year, + * computed based on this WeekFields. + *

      + * This represents the concept of the count of weeks within the year where weeks + * start on a fixed day-of-week, such as Monday and each week belongs to exactly one year. + * This field is typically used with {@link WeekFields#dayOfWeek()} and + * {@link WeekFields#weekBasedYear()}. + *

      + * Week one(1) is the week starting on the {@link WeekFields#getFirstDayOfWeek} + * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the year. + * If the first week starts after the start of the year then the period before + * is in the last week of the previous year. + *

      + * For example:
      + * - if the 1st day of the year is a Monday, week one starts on the 1st
      + * - if the 2nd day of the year is a Monday, week one starts on the 2nd and + * the 1st is in the last week of the previous year
      + * - if the 4th day of the year is a Monday, week one starts on the 4th and + * the 1st to 3rd is in the last week of the previous year
      + * - if the 5th day of the year is a Monday, week two starts on the 5th and + * the 1st to 4th is in week one
      + *

      + * This field can be used with any calendar system. + * @return a TemporalField to access the week of week-based-year, not null + */ + public TemporalField weekOfWeekBasedYear() { + return weekOfWeekBasedYear; + } + + /** + * Returns a field to access the year of a week-based-year, + * computed based on this WeekFields. + *

      + * This represents the concept of the year where weeks start on a fixed day-of-week, + * such as Monday and each week belongs to exactly one year. + * This field is typically used with {@link WeekFields#dayOfWeek()} and + * {@link WeekFields#weekOfWeekBasedYear()}. + *

      + * Week one(1) is the week starting on the {@link WeekFields#getFirstDayOfWeek} + * where there are at least {@link WeekFields#getMinimalDaysInFirstWeek()} days in the year. + * Thus, week one may start before the start of the year. + * If the first week starts after the start of the year then the period before + * is in the last week of the previous year. + *

      + * This field can be used with any calendar system. + * @return a TemporalField to access the year of week-based-year, not null + */ + public TemporalField weekBasedYear() { + return weekBasedYear; + } + + /** + * Checks if this WeekFields is equal to the specified object. *

      * The comparison is based on the entire state of the rules, which is * the first day-of-week and minimal days. @@ -469,6 +590,49 @@ public final class WeekFields implements Serializable { static ComputedDayOfField ofWeekOfYearField(WeekFields weekDef) { return new ComputedDayOfField("WeekOfYear", weekDef, WEEKS, YEARS, WEEK_OF_YEAR_RANGE); } + + /** + * Returns a field to access the week of week-based-year, + * computed based on a WeekFields. + * @see WeekFields#weekOfWeekBasedYear() + */ + static ComputedDayOfField ofWeekOfWeekBasedYearField(WeekFields weekDef) { + return new ComputedDayOfField("WeekOfWeekBasedYear", weekDef, WEEKS, IsoFields.WEEK_BASED_YEARS, WEEK_OF_YEAR_RANGE); + } + + /** + * Returns a field to access the week of week-based-year, + * computed based on a WeekFields. + * @see WeekFields#weekBasedYear() + */ + static ComputedDayOfField ofWeekBasedYearField(WeekFields weekDef) { + return new ComputedDayOfField("WeekBasedYear", weekDef, IsoFields.WEEK_BASED_YEARS, FOREVER, ChronoField.YEAR.range()); + } + + /** + * Return a new week-based-year date of the Chronology, year, week-of-year, + * and dow of week. + * @param chrono The chronology of the new date + * @param yowby the year of the week-based-year + * @param wowby the week of the week-based-year + * @param dow the day of the week + * @return a ChronoLocalDate for the requested year, week of year, and day of week + */ + private ChronoLocalDate ofWeekBasedYear(Chronology chrono, + int yowby, int wowby, int dow) { + ChronoLocalDate date = chrono.date(yowby, 1, 1); + int ldow = localizedDayOfWeek(date); + int offset = startOfWeekOffset(1, ldow); + + // Clamp the week of year to keep it in the same year + int yearLen = date.lengthOfYear(); + int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek()); + wowby = Math.min(wowby, newYearWeek - 1); + + int days = -offset + (dow - 1) + (wowby - 1) * 7; + return date.plus(days, DAYS); + } + private final String name; private final WeekFields weekDef; private final TemporalUnit baseUnit; @@ -489,44 +653,109 @@ public final class WeekFields implements Serializable { @Override public long getFrom(TemporalAccessor temporal) { - // Offset the ISO DOW by the start of this week - int sow = weekDef.getFirstDayOfWeek().getValue(); - int dow = localizedDayOfWeek(temporal, sow); - if (rangeUnit == WEEKS) { // day-of-week - return dow; + return localizedDayOfWeek(temporal); } else if (rangeUnit == MONTHS) { // week-of-month - return localizedWeekOfMonth(temporal, dow); + return localizedWeekOfMonth(temporal); } else if (rangeUnit == YEARS) { // week-of-year - return localizedWeekOfYear(temporal, dow); + return localizedWeekOfYear(temporal); + } else if (rangeUnit == WEEK_BASED_YEARS) { + return localizedWeekOfWeekBasedYear(temporal); + } else if (rangeUnit == FOREVER) { + return localizedWeekBasedYear(temporal); } else { - throw new IllegalStateException("unreachable"); + throw new IllegalStateException("unreachable, rangeUnit: " + rangeUnit + ", this: " + this); } } - private int localizedDayOfWeek(TemporalAccessor temporal, int sow) { + private int localizedDayOfWeek(TemporalAccessor temporal) { + int sow = weekDef.getFirstDayOfWeek().getValue(); int isoDow = temporal.get(DAY_OF_WEEK); return Math.floorMod(isoDow - sow, 7) + 1; } - private long localizedWeekOfMonth(TemporalAccessor temporal, int dow) { + private long localizedWeekOfMonth(TemporalAccessor temporal) { + int dow = localizedDayOfWeek(temporal); int dom = temporal.get(DAY_OF_MONTH); int offset = startOfWeekOffset(dom, dow); return computeWeek(offset, dom); } - private long localizedWeekOfYear(TemporalAccessor temporal, int dow) { + private long localizedWeekOfYear(TemporalAccessor temporal) { + int dow = localizedDayOfWeek(temporal); int doy = temporal.get(DAY_OF_YEAR); int offset = startOfWeekOffset(doy, dow); return computeWeek(offset, doy); } + /** + * Returns the year of week-based-year for the temporal. + * The year can be the previous year, the current year, or the next year. + * @param temporal a date of any chronology, not null + * @return the year of week-based-year for the date + */ + private int localizedWeekBasedYear(TemporalAccessor temporal) { + int dow = localizedDayOfWeek(temporal); + int year = temporal.get(YEAR); + int doy = temporal.get(DAY_OF_YEAR); + int offset = startOfWeekOffset(doy, dow); + int week = computeWeek(offset, doy); + if (week == 0) { + // Day is in end of week of previous year; return the previous year + return year - 1; + } else { + // If getting close to end of year, use higher precision logic + // Check if date of year is in partial week associated with next year + ValueRange dayRange = temporal.range(DAY_OF_YEAR); + int yearLen = (int)dayRange.getMaximum(); + int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek()); + if (week >= newYearWeek) { + return year + 1; + } + } + return year; + } + + /** + * Returns the week of week-based-year for the temporal. + * The week can be part of the previous year, the current year, + * or the next year depending on the week start and minimum number + * of days. + * @param temporal a date of any chronology + * @return the week of the year + * @see #localizedWeekBasedYear(java.time.temporal.TemporalAccessor) + */ + private int localizedWeekOfWeekBasedYear(TemporalAccessor temporal) { + int dow = localizedDayOfWeek(temporal); + int doy = temporal.get(DAY_OF_YEAR); + int offset = startOfWeekOffset(doy, dow); + int week = computeWeek(offset, doy); + if (week == 0) { + // Day is in end of week of previous year + // Recompute from the last day of the previous year + ChronoLocalDate date = Chronology.from(temporal).date(temporal); + date = date.minus(doy, DAYS); // Back down into previous year + return localizedWeekOfWeekBasedYear(date); + } else if (week > 50) { + // If getting close to end of year, use higher precision logic + // Check if date of year is in partial week associated with next year + ValueRange dayRange = temporal.range(DAY_OF_YEAR); + int yearLen = (int)dayRange.getMaximum(); + int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek()); + if (week >= newYearWeek) { + // Overlaps with week of following year; reduce to week in following year + week = week - newYearWeek + 1; + } + } + return week; + } + /** * Returns an offset to align week start with a day of month or day of year. * - * @param day the day; 1 through infinity - * @param dow the day of the week of that day; 1 through 7 - * @return an offset in days to align a day with the start of the first 'full' week + * @param day the day; 1 through infinity + * @param dow the day of the week of that day; 1 through 7 + * @return an offset in days to align a day with the start of the first 'full' week */ private int startOfWeekOffset(int day, int dow) { // offset of first day corresponding to the day of week in first 7 days (zero origin) @@ -560,54 +789,81 @@ public final class WeekFields implements Serializable { if (newVal == currentVal) { return temporal; } - // Compute the difference and add that using the base using of the field - return (R) temporal.plus(newVal - currentVal, baseUnit); + + if (rangeUnit == FOREVER) { // replace year of WeekBasedYear + // Create a new date object with the same chronology, + // the desired year and the same week and dow. + int idow = temporal.get(weekDef.dayOfWeek); + int wowby = temporal.get(weekDef.weekOfWeekBasedYear); + return (R) ofWeekBasedYear(Chronology.from(temporal), (int)newValue, wowby, idow); + } else { + // Compute the difference and add that using the base unit of the field + return (R) temporal.plus(newVal - currentVal, baseUnit); + } } @Override - public Map resolve(TemporalAccessor temporal, long value) { + public Map resolve(TemporalAccessor temporal, long value, ResolverStyle resolverStyle) { int newValue = range.checkValidIntValue(value, this); int sow = weekDef.getFirstDayOfWeek().getValue(); if (rangeUnit == WEEKS) { // day-of-week int isoDow = Math.floorMod((sow - 1) + (newValue - 1), 7) + 1; return Collections.singletonMap(DAY_OF_WEEK, (long) isoDow); } - if ((temporal.isSupported(YEAR) && temporal.isSupported(DAY_OF_WEEK)) == false) { + if (temporal.isSupported(DAY_OF_WEEK) == false) { return null; } - int dow = localizedDayOfWeek(temporal, sow); - int year = temporal.get(YEAR); Chronology chrono = Chronology.from(temporal); // defaults to ISO - if (rangeUnit == MONTHS) { // week-of-month - if (temporal.isSupported(MONTH_OF_YEAR) == false) { - return null; + int dow = localizedDayOfWeek(temporal); + if (temporal.isSupported(YEAR)) { + int year = temporal.get(YEAR); + if (rangeUnit == MONTHS) { // week-of-month + if (temporal.isSupported(MONTH_OF_YEAR) == false) { + return null; + } + int month = temporal.get(ChronoField.MONTH_OF_YEAR); + @SuppressWarnings("rawtypes") + ChronoLocalDate date = chrono.date(year, month, 1); + int dateDow = localizedDayOfWeek(date); + long weeks = newValue - localizedWeekOfMonth(date); + int days = dow - dateDow; + date = date.plus(weeks * 7 + days, DAYS); + Map result = new HashMap<>(4, 1.0f); + result.put(EPOCH_DAY, date.toEpochDay()); + result.put(YEAR, null); + result.put(MONTH_OF_YEAR, null); + result.put(DAY_OF_WEEK, null); + return result; + } else if (rangeUnit == YEARS) { // week-of-year + @SuppressWarnings("rawtypes") + ChronoLocalDate date = chrono.date(year, 1, 1); + int dateDow = localizedDayOfWeek(date); + long weeks = newValue - localizedWeekOfYear(date); + int days = dow - dateDow; + date = date.plus(weeks * 7 + days, DAYS); + Map result = new HashMap<>(4, 1.0f); + result.put(EPOCH_DAY, date.toEpochDay()); + result.put(YEAR, null); + result.put(DAY_OF_WEEK, null); + return result; + } + } else if (rangeUnit == WEEK_BASED_YEARS || rangeUnit == FOREVER) { + if (temporal.isSupported(weekDef.weekBasedYear) && + temporal.isSupported(weekDef.weekOfWeekBasedYear)) { + // week-of-week-based-year and year-of-week-based-year + int yowby = temporal.get(weekDef.weekBasedYear); + int wowby = temporal.get(weekDef.weekOfWeekBasedYear); + ChronoLocalDate date = ofWeekBasedYear(Chronology.from(temporal), yowby, wowby, dow); + + Map result = new HashMap<>(4, 1.0f); + result.put(EPOCH_DAY, date.toEpochDay()); + result.put(DAY_OF_WEEK, null); + result.put(weekDef.weekOfWeekBasedYear, null); + result.put(weekDef.weekBasedYear, null); + return result; } - int month = temporal.get(ChronoField.MONTH_OF_YEAR); - ChronoLocalDate date = chrono.date(year, month, 1); - int dateDow = localizedDayOfWeek(date, sow); - long weeks = newValue - localizedWeekOfMonth(date, dateDow); - int days = dow - dateDow; - date = date.plus(weeks * 7 + days, DAYS); - Map result = new HashMap<>(4, 1.0f); - result.put(EPOCH_DAY, date.toEpochDay()); - result.put(YEAR, null); - result.put(MONTH_OF_YEAR, null); - result.put(DAY_OF_WEEK, null); - return result; - } else if (rangeUnit == YEARS) { // week-of-year - ChronoLocalDate date = chrono.date(year, 1, 1); - int dateDow = localizedDayOfWeek(date, sow); - long weeks = newValue - localizedWeekOfYear(date, dateDow); - int days = dow - dateDow; - date = date.plus(weeks * 7 + days, DAYS); - Map result = new HashMap<>(4, 1.0f); - result.put(EPOCH_DAY, date.toEpochDay()); - result.put(YEAR, null); - result.put(DAY_OF_WEEK, null); - return result; - } else { - throw new IllegalStateException("unreachable"); } + return null; } //----------------------------------------------------------------------- @@ -616,6 +872,18 @@ public final class WeekFields implements Serializable { return name; } + @Override + public String getDisplayName(Locale locale) { + Objects.requireNonNull(locale, "locale"); + if (rangeUnit == YEARS) { // only have values for week-of-year + LocaleResources lr = LocaleProviderAdapter.getResourceBundleBased() + .getLocaleResources(locale); + ResourceBundle rb = lr.getJavaTimeFormatData(); + return rb.containsKey("field.week") ? rb.getString("field.week") : getName(); + } + return getName(); + } + @Override public TemporalUnit getBaseUnit() { return baseUnit; @@ -626,6 +894,11 @@ public final class WeekFields implements Serializable { return rangeUnit; } + @Override + public boolean isDateBased() { + return true; + } + @Override public ValueRange range() { return range; @@ -641,6 +914,10 @@ public final class WeekFields implements Serializable { return temporal.isSupported(DAY_OF_MONTH); } else if (rangeUnit == YEARS) { // week-of-year return temporal.isSupported(DAY_OF_YEAR); + } else if (rangeUnit == WEEK_BASED_YEARS) { + return temporal.isSupported(DAY_OF_YEAR); + } else if (rangeUnit == FOREVER) { + return temporal.isSupported(YEAR); } } return false; @@ -650,27 +927,68 @@ public final class WeekFields implements Serializable { public ValueRange rangeRefinedBy(TemporalAccessor temporal) { if (rangeUnit == ChronoUnit.WEEKS) { // day-of-week return range; - } - - TemporalField field = null; - if (rangeUnit == MONTHS) { // week-of-month - field = DAY_OF_MONTH; + } else if (rangeUnit == MONTHS) { // week-of-month + return rangeByWeek(temporal, DAY_OF_MONTH); } else if (rangeUnit == YEARS) { // week-of-year - field = DAY_OF_YEAR; + return rangeByWeek(temporal, DAY_OF_YEAR); + } else if (rangeUnit == WEEK_BASED_YEARS) { + return rangeWeekOfWeekBasedYear(temporal); + } else if (rangeUnit == FOREVER) { + return YEAR.range(); } else { - throw new IllegalStateException("unreachable"); + throw new IllegalStateException("unreachable, rangeUnit: " + rangeUnit + ", this: " + this); } + } - // Offset the ISO DOW by the start of this week - int sow = weekDef.getFirstDayOfWeek().getValue(); - int dow = localizedDayOfWeek(temporal, sow); - + /** + * Map the field range to a week range + * @param temporal the temporal + * @param field the field to get the range of + * @return the ValueRange with the range adjusted to weeks. + */ + private ValueRange rangeByWeek(TemporalAccessor temporal, TemporalField field) { + int dow = localizedDayOfWeek(temporal); int offset = startOfWeekOffset(temporal.get(field), dow); ValueRange fieldRange = temporal.range(field); return ValueRange.of(computeWeek(offset, (int) fieldRange.getMinimum()), computeWeek(offset, (int) fieldRange.getMaximum())); } + /** + * Map the field range to a week range of a week year. + * @param temporal the temporal + * @param field the field to get the range of + * @return the ValueRange with the range adjusted to weeks. + */ + private ValueRange rangeWeekOfWeekBasedYear(TemporalAccessor temporal) { + if (!temporal.isSupported(DAY_OF_YEAR)) { + return WEEK_OF_YEAR_RANGE; + } + int dow = localizedDayOfWeek(temporal); + int doy = temporal.get(DAY_OF_YEAR); + int offset = startOfWeekOffset(doy, dow); + int week = computeWeek(offset, doy); + if (week == 0) { + // Day is in end of week of previous year + // Recompute from the last day of the previous year + ChronoLocalDate date = Chronology.from(temporal).date(temporal); + date = date.minus(doy + 7, DAYS); // Back down into previous year + return rangeWeekOfWeekBasedYear(date); + } + // Check if day of year is in partial week associated with next year + ValueRange dayRange = temporal.range(DAY_OF_YEAR); + int yearLen = (int)dayRange.getMaximum(); + int newYearWeek = computeWeek(offset, yearLen + weekDef.getMinimalDaysInFirstWeek()); + + if (week >= newYearWeek) { + // Overlaps with weeks of following year; recompute from a week in following year + ChronoLocalDate date = Chronology.from(temporal).date(temporal); + date = date.plus(yearLen - doy + 1 + 7, ChronoUnit.DAYS); + return rangeWeekOfWeekBasedYear(date); + } + return ValueRange.of(1, newYearWeek-1); + } + //----------------------------------------------------------------------- @Override public String toString() { diff --git a/jdk/src/share/classes/java/time/temporal/package-info.java b/jdk/src/share/classes/java/time/temporal/package-info.java index d769120f4fd..fe4d3f891b6 100644 --- a/jdk/src/share/classes/java/time/temporal/package-info.java +++ b/jdk/src/share/classes/java/time/temporal/package-info.java @@ -112,9 +112,9 @@ * such as the "last day of the month", or "next Wednesday". * These are modeled as functions that adjust a base date-time. * The functions implement {@link java.time.temporal.TemporalAdjuster} and operate on {@code Temporal}. - * A set of common functions are provided in {@link java.time.temporal.Adjusters}. + * A set of common functions are provided in {@code TemporalAdjuster}. * For example, to find the first occurrence of a day-of-week after a given date, use - * {@link java.time.temporal.Adjusters#next(DayOfWeek)}, such as + * {@link java.time.temporal.TemporalAdjuster#next(DayOfWeek)}, such as * {@code date.with(next(MONDAY))}. * Applications can also define adjusters by implementing {@code TemporalAdjuster}. *

      @@ -127,7 +127,7 @@ * The most common implementations of the query interface are method references. * The {@code from(TemporalAccessor)} methods on major classes can all be used, such as * {@code LocalDate::from} or {@code Month::from}. - * Further implementations are provided in {@link java.time.temporal.Queries}. + * Further implementations are provided in {@code TemporalQuery} as static methods. * Applications can also define queries by implementing {@code TemporalQuery}. *

      * diff --git a/jdk/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java b/jdk/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java index 22f6ffddd24..b40fe987bab 100644 --- a/jdk/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java +++ b/jdk/src/share/classes/java/time/zone/TzdbZoneRulesProvider.java @@ -64,6 +64,7 @@ package java.time.zone; import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.io.StreamCorruptedException; import java.util.Arrays; @@ -75,7 +76,6 @@ import java.util.Objects; import java.util.Set; import java.util.TreeMap; import java.util.concurrent.ConcurrentHashMap; -import java.util.zip.ZipFile; /** * Loads time-zone rules for 'TZDB'. @@ -106,10 +106,8 @@ final class TzdbZoneRulesProvider extends ZoneRulesProvider { public TzdbZoneRulesProvider() { try { String libDir = System.getProperty("java.home") + File.separator + "lib"; - File tzdbJar = new File(libDir, "tzdb.jar"); - try (ZipFile zf = new ZipFile(tzdbJar); - DataInputStream dis = new DataInputStream( - zf.getInputStream(zf.getEntry("TZDB.dat")))) { + try (DataInputStream dis = new DataInputStream( + new FileInputStream(new File(libDir, "tzdb.dat")))) { load(dis); } } catch (Exception ex) { diff --git a/jdk/src/share/classes/java/time/zone/ZoneOffsetTransition.java b/jdk/src/share/classes/java/time/zone/ZoneOffsetTransition.java index 6d080aba27d..1b5810b0594 100644 --- a/jdk/src/share/classes/java/time/zone/ZoneOffsetTransition.java +++ b/jdk/src/share/classes/java/time/zone/ZoneOffsetTransition.java @@ -321,7 +321,7 @@ public final class ZoneOffsetTransition } /** - * Does this transition represent a gap in the local time-line. + * Does this transition represent an overlap in the local time-line. *

      * Overlaps occur where there are local date-times that exist twice. * An example would be when the offset changes from {@code +02:00} to {@code +01:00}. diff --git a/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java b/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java index 5275d18417b..bb1b79fb332 100644 --- a/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java +++ b/jdk/src/share/classes/java/time/zone/ZoneOffsetTransitionRule.java @@ -61,8 +61,8 @@ */ package java.time.zone; -import static java.time.temporal.Adjusters.nextOrSame; -import static java.time.temporal.Adjusters.previousOrSame; +import static java.time.temporal.TemporalAdjuster.nextOrSame; +import static java.time.temporal.TemporalAdjuster.previousOrSame; import java.io.DataInput; import java.io.DataOutput; diff --git a/jdk/src/share/classes/java/time/zone/ZoneRulesProvider.java b/jdk/src/share/classes/java/time/zone/ZoneRulesProvider.java index d3e906d3937..5c88e3ea0cb 100644 --- a/jdk/src/share/classes/java/time/zone/ZoneRulesProvider.java +++ b/jdk/src/share/classes/java/time/zone/ZoneRulesProvider.java @@ -141,7 +141,7 @@ public abstract class ZoneRulesProvider { // if the property java.time.zone.DefaultZoneRulesProvider is // set then its value is the class name of the default provider final List loaded = new ArrayList<>(); - AccessController.doPrivileged(new PrivilegedAction() { + AccessController.doPrivileged(new PrivilegedAction() { public Object run() { String prop = System.getProperty("java.time.zone.DefaultZoneRulesProvider"); if (prop != null) { diff --git a/jdk/src/share/classes/java/util/Formatter.java b/jdk/src/share/classes/java/util/Formatter.java index 65a6f0b3634..52e9a4a511f 100644 --- a/jdk/src/share/classes/java/util/Formatter.java +++ b/jdk/src/share/classes/java/util/Formatter.java @@ -56,7 +56,7 @@ import java.time.ZoneId; import java.time.ZoneOffset; import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; -import java.time.temporal.Queries; +import java.time.temporal.TemporalQuery; import sun.misc.DoubleConsts; import sun.misc.FormattedFloatingDecimal; @@ -4160,7 +4160,7 @@ public final class Formatter implements Closeable, Flushable { break; } case DateTime.ZONE: { // 'Z' (symbol) - ZoneId zid = t.query(Queries.zone()); + ZoneId zid = t.query(TemporalQuery.zone()); if (zid == null) { throw new IllegalFormatConversionException(c, t.getClass()); } diff --git a/jdk/src/share/classes/java/util/GregorianCalendar.java b/jdk/src/share/classes/java/util/GregorianCalendar.java index 96501286e75..1f818ed6f64 100644 --- a/jdk/src/share/classes/java/util/GregorianCalendar.java +++ b/jdk/src/share/classes/java/util/GregorianCalendar.java @@ -45,7 +45,7 @@ import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.chrono.IsoChronology; import java.time.temporal.ChronoField; -import java.time.temporal.Queries; +import java.time.temporal.TemporalQuery; import sun.util.calendar.BaseCalendar; import sun.util.calendar.CalendarDate; import sun.util.calendar.CalendarSystem; diff --git a/jdk/src/share/classes/java/util/TimeZone.java b/jdk/src/share/classes/java/util/TimeZone.java index cc8fe5dc356..b49d8d210ef 100644 --- a/jdk/src/share/classes/java/util/TimeZone.java +++ b/jdk/src/share/classes/java/util/TimeZone.java @@ -559,7 +559,7 @@ abstract public class TimeZone implements Serializable, Cloneable { * @since 1.8 */ public ZoneId toZoneId() { - return ZoneId.of(getID(), ZoneId.OLD_IDS_POST_2005); + return ZoneId.of(getID(), ZoneId.SHORT_IDS); } private static TimeZone getTimeZone(String ID, boolean fallback) { diff --git a/jdk/src/share/classes/sun/text/resources/FormatData.java b/jdk/src/share/classes/sun/text/resources/FormatData.java index 76576336846..960249a8752 100644 --- a/jdk/src/share/classes/sun/text/resources/FormatData.java +++ b/jdk/src/share/classes/sun/text/resources/FormatData.java @@ -79,9 +79,9 @@ package sun.text.resources; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData extends ListResourceBundle { +public class FormatData extends ParallelListResourceBundle { /** * Overrides ListResourceBundle */ @@ -117,12 +117,6 @@ public class FormatData extends ListResourceBundle { "Heisei", }; - // Minguo era strings - final String[] rocEras ={ - "Before R.O.C.", - "R.O.C.", - }; - return new Object[][] { { "MonthNames", new String[] { @@ -158,6 +152,23 @@ public class FormatData extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "Sunday", // Sunday @@ -205,13 +216,7 @@ public class FormatData extends ListResourceBundle { }, { "Eras", julianEras }, - { "cldr.long.Eras", - new String[] { - "Before Christ", - "Anno Domini" - } - }, - { "cldr.short.Eras", + { "short.Eras", julianEras }, { "narrow.Eras", new String[] { @@ -230,10 +235,6 @@ public class FormatData extends ListResourceBundle { }, { "japanese.Eras", japaneseEras }, - { "cldr.japanese.long.Eras", - japaneseEras }, - { "cldr.japanese.short.Eras", - japaneseEras }, { "japanese.short.Eras", japaneseEraAbbrs }, @@ -822,14 +823,6 @@ public class FormatData extends ListResourceBundle { "H:mm", // short time pattern } }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, G y MMMM dd", - "G y MMMM d", - "G y MMM d", - "GGGGG yyyy-MM-dd", - } - }, { "buddhist.DatePatterns", new String[] { "EEEE d MMMM G yyyy", // full date pattern @@ -851,14 +844,6 @@ public class FormatData extends ListResourceBundle { "h:mm a", // short time pattern } }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, G y MMMM dd", - "G y MMMM d", - "G y MMM d", - "GGGGG yy-MM-dd", - } - }, { "japanese.DatePatterns", new String[] { "GGGG yyyy MMMM d (EEEE)", // full date pattern @@ -872,99 +857,7 @@ public class FormatData extends ListResourceBundle { "{1} {0}" // date-time pattern } }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, G y MMMM dd", - "G y MMMM d", - "G y MMM d", - "GGGGG yyy-MM-dd", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, GGGG y MMMM dd", - "GGGG y MMMM d", - "GGGG y MMM d", - "G yyy-MM-dd", - } - }, - { "islamic.MonthNames", - new String[] { - "Muharram", - "Safar", - "Rabi\u02bb I", - "Rabi\u02bb II", - "Jumada I", - "Jumada II", - "Rajab", - "Sha\u02bbban", - "Ramadan", - "Shawwal", - "Dhu\u02bbl-Qi\u02bbdah", - "Dhu\u02bbl-Hijjah", - "", - } - }, - { "islamic.MonthAbbreviations", - new String[] { - "Muh.", - "Saf.", - "Rab. I", - "Rab. II", - "Jum. I", - "Jum. II", - "Raj.", - "Sha.", - "Ram.", - "Shaw.", - "Dhu\u02bbl-Q.", - "Dhu\u02bbl-H.", - "", - } - }, - { "islamic.Eras", - new String[] { - "", - "AH", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, MMMM d, y G", - "MMMM d, y G", - "MMM d, y G", - "M/d/yy G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, MMMM d, y GGGG", - "MMMM d, y GGGG", - "MMM d, y GGGG", - "M/d/yy GGGG", - } - }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "calendarname.islamic-civil", "Islamic-Civil Calendar" }, - { "calendarname.islamicc", "Islamic-Civil Calendar" }, - { "calendarname.islamic", "Islamic Calendar" }, - { "calendarname.japanese", "Japanese Calendar" }, - { "calendarname.gregorian", "Gregorian Calendar" }, - { "calendarname.gregory", "Gregorian Calendar" }, - { "calendarname.roc", "Minguo Calendar" }, - { "calendarname.buddhist", "Buddhist Calendar" }, - { "field.era", "Era" }, - { "field.year", "Year" }, - { "field.month", "Month" }, - { "field.week", "Week" }, - { "field.weekday", "Day of the Week" }, - { "field.dayperiod", "Dayperiod" }, - { "field.hour", "Hour" }, - { "field.minute", "Minute" }, - { "field.second", "Second" }, - { "field.zone", "Zone" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/JavaTimeSupplementary.java b/jdk/src/share/classes/sun/text/resources/JavaTimeSupplementary.java new file mode 100644 index 00000000000..b67164be1cc --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/JavaTimeSupplementary.java @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Buddhist Calendar" }, + { "calendarname.gregorian", + "Gregorian Calendar" }, + { "calendarname.gregory", + "Gregorian Calendar" }, + { "calendarname.islamic", + "Islamic Calendar" }, + { "calendarname.islamic-civil", + "Islamic-Civil Calendar" }, + { "calendarname.islamicc", + "Islamic-Civil Calendar" }, + { "calendarname.japanese", + "Japanese Calendar" }, + { "calendarname.roc", + "Minguo Calendar" }, + { "field.dayperiod", + "Dayperiod" }, + { "field.era", + "Era" }, + { "field.hour", + "Hour" }, + { "field.minute", + "Minute" }, + { "field.month", + "Month" }, + { "field.second", + "Second" }, + { "field.week", + "Week" }, + { "field.weekday", + "Day of the Week" }, + { "field.year", + "Year" }, + { "field.zone", + "Zone" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, MMMM d, y GGGG", + "MMMM d, y GGGG", + "MMM d, y GGGG", + "M/d/yy GGGG", + } + }, + { "islamic.Eras", + new String[] { + "", + "AH", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "Muh.", + "Saf.", + "Rab. I", + "Rab. II", + "Jum. I", + "Jum. II", + "Raj.", + "Sha.", + "Ram.", + "Shaw.", + "Dhu\u02bbl-Q.", + "Dhu\u02bbl-H.", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "Muharram", + "Safar", + "Rabi\u02bb I", + "Rabi\u02bb II", + "Jumada I", + "Jumada II", + "Rajab", + "Sha\u02bbban", + "Ramadan", + "Shawwal", + "Dhu\u02bbl-Qi\u02bbdah", + "Dhu\u02bbl-Hijjah", + "", + } + }, + { "islamic.MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "AH", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, G y MMMM dd", + "G y MMMM d", + "G y MMM d", + "GGGGG yyyy-MM-dd", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "B.E.", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, MMMM d, y G", + "MMMM d, y G", + "MMM d, y G", + "M/d/yy G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "G y MMMM d (EEEE)", + "G y MMMM d", + "G y MMM d", + "GGGGGy.MM.dd", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "", + "Meiji", + "Taisho", + "Showa", + "Heisei", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "", + "Meiji", + "Taisho", + "Showa", + "Heisei", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, G y MMMM dd", + "G y MMMM d", + "G y MMM d", + "GGGGG yyy-MM-dd", + } + }, + { "java.time.short.Eras", + new String[] { + "BC", + "AD", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, GGGG y MMMM dd", + "GGGG y MMMM d", + "GGGG y MMM d", + "G yyy-MM-dd", + } + }, + { "roc.Eras", + new String[] { + "Before R.O.C.", + "R.O.C.", + } + }, + { "roc.short.Eras", + new String[] { + "Before R.O.C.", + "R.O.C.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar.java b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar.java index b50abe12538..3be4cd39e6f 100644 --- a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar.java +++ b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar.java @@ -79,11 +79,11 @@ package sun.text.resources.ar; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ar extends ListResourceBundle { +public class FormatData_ar extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -126,6 +126,23 @@ public class FormatData_ar extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u064a", + "\u0641", + "\u0645", + "\u0623", + "\u0648", + "\u0646", + "\u0644", + "\u063a", + "\u0633", + "\u0643", + "\u0628", + "\u062f", + "", + } + }, { "DayNames", new String[] { "\u0627\u0644\u0623\u062d\u062f", // Sunday @@ -148,6 +165,17 @@ public class FormatData_ar extends ListResourceBundle { "\u0633" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "\u0627\u0644\u0623\u062d\u062f", + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646", + "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621", + "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", + "\u0627\u0644\u062e\u0645\u064a\u0633", + "\u0627\u0644\u062c\u0645\u0639\u0629", + "\u0627\u0644\u0633\u0628\u062a", + } + }, { "DayNarrows", new String[] { "\u062d", @@ -171,6 +199,42 @@ public class FormatData_ar extends ListResourceBundle { "\u0645" } }, + { "short.Eras", + new String[] { + "\u0642.\u0645", + "\u0645", + } + }, + { "japanese.Eras", + new String[] { + "\u0645", + "\u0645\u064a\u062c\u064a", + "\u062a\u064a\u0634\u0648", + "\u0634\u0648\u0648\u0627", + "\u0647\u064a\u0633\u064a", + } + }, + { "japanese.short.Eras", + new String[] { + "\u0645", + "\u0645\u064a\u062c\u064a", + "\u062a\u064a\u0634\u0648", + "\u0634\u0648\u0648\u0627", + "\u0647\u064a\u0633\u064a", + } + }, + { "buddhist.Eras", + new String[] { + "BC", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a", + } + }, + { "buddhist.short.Eras", + new String[] { + "BC", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a", + } + }, { "NumberPatterns", new String[] { "#,##0.###;#,##0.###-", // decimal pattern @@ -200,114 +264,6 @@ public class FormatData_ar extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE\u060c d MMMM\u060c y G", - "d MMMM\u060c y G", - "dd\u200f/MM\u200f/y G", - "d\u200f/M\u200f/y G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE\u060c d MMMM\u060c y G", - "d MMMM\u060c y G", - "dd\u200f/MM\u200f/y G", - "d\u200f/M\u200f/y G", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE\u060c d MMMM\u060c y G", - "d MMMM\u060c y G", - "dd\u200f/MM\u200f/y G", - "d\u200f/M\u200f/y G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE\u060c d MMMM\u060c y GGGG", - "d MMMM\u060c y GGGG", - "dd\u200f/MM\u200f/y GGGG", - "d\u200f/M\u200f/y GGGG", - } - }, - { "islamic.MonthNames", - new String[] { - "\u0645\u062d\u0631\u0645", - "\u0635\u0641\u0631", - "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644", - "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631", - "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649", - "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629", - "\u0631\u062c\u0628", - "\u0634\u0639\u0628\u0627\u0646", - "\u0631\u0645\u0636\u0627\u0646", - "\u0634\u0648\u0627\u0644", - "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629", - "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629", - "", - } - }, - { "islamic.MonthAbbreviations", - new String[] { - "\u0645\u062d\u0631\u0645", - "\u0635\u0641\u0631", - "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644", - "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631", - "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649", - "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629", - "\u0631\u062c\u0628", - "\u0634\u0639\u0628\u0627\u0646", - "\u0631\u0645\u0636\u0627\u0646", - "\u0634\u0648\u0627\u0644", - "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629", - "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629", - "", - } - }, - { "islamic.Eras", - new String[] { - "", - "\u0647\u0640", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE\u060c d MMMM y", - "d MMMM y", - "d MMM\u060c y G", - "d\u200f/M\u200f/yyyy", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE\u060c d MMMM y", - "d MMMM y", - "d MMM\u060c y GGGG", - "d\u200f/M\u200f/yyyy", - } - }, - { "calendarname.islamic-civil", "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" }, - { "calendarname.islamicc", "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" }, - { "calendarname.islamic", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a" }, - { "calendarname.japanese", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u064a\u0627\u0628\u0627\u0646\u064a" }, - { "calendarname.gregorian", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" }, - { "calendarname.gregory", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" }, - { "calendarname.roc", "\u062a\u0642\u0648\u064a\u0645 \u0645\u064a\u0646\u062c\u0648" }, - { "calendarname.buddhist", "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a" }, - { "field.era", "\u0627\u0644\u0639\u0635\u0631" }, - { "field.year", "\u0627\u0644\u0633\u0646\u0629" }, - { "field.month", "\u0627\u0644\u0634\u0647\u0631" }, - { "field.week", "\u0627\u0644\u0623\u0633\u0628\u0648\u0639" }, - { "field.weekday", "\u0627\u0644\u064a\u0648\u0645" }, - { "field.dayperiod", "\u0635/\u0645" }, - { "field.hour", "\u0627\u0644\u0633\u0627\u0639\u0627\u062a" }, - { "field.minute", "\u0627\u0644\u062f\u0642\u0627\u0626\u0642" }, - { "field.second", "\u0627\u0644\u062b\u0648\u0627\u0646\u064a" }, - { "field.zone", "\u0627\u0644\u062a\u0648\u0642\u064a\u062a" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_JO.java b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_JO.java index 660a4c6d795..32676d3ae86 100644 --- a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_JO.java +++ b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_JO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,11 @@ package sun.text.resources.ar; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ar_JO extends ListResourceBundle { +public class FormatData_ar_JO extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_LB.java b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_LB.java index 73ecf991cfd..da510b23a1c 100644 --- a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_LB.java +++ b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_LB.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,11 @@ package sun.text.resources.ar; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ar_LB extends ListResourceBundle { +public class FormatData_ar_LB extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_SY.java b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_SY.java index 052b6e3c6c9..c2fec882cbd 100644 --- a/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_SY.java +++ b/jdk/src/share/classes/sun/text/resources/ar/FormatData_ar_SY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,11 @@ package sun.text.resources.ar; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ar_SY extends ListResourceBundle { +public class FormatData_ar_SY extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ar/JavaTimeSupplementary_ar.java b/jdk/src/share/classes/sun/text/resources/ar/JavaTimeSupplementary_ar.java new file mode 100644 index 00000000000..9f261e6e1ee --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ar/JavaTimeSupplementary_ar.java @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ar; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ar extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterNames", + new String[] { + "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644", + "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a", + "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b", + "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639", + } + }, + { "QuarterNarrows", + new String[] { + "\u0661", + "\u0662", + "\u0663", + "\u0664", + } + }, + { "calendarname.buddhist", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a" }, + { "calendarname.gregorian", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" }, + { "calendarname.gregory", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a" }, + { "calendarname.islamic", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a" }, + { "calendarname.islamic-civil", + "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" }, + { "calendarname.islamicc", + "\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a" }, + { "calendarname.japanese", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u064a\u0627\u0628\u0627\u0646\u064a" }, + { "calendarname.roc", + "\u062a\u0642\u0648\u064a\u0645 \u0645\u064a\u0646\u062c\u0648" }, + { "field.dayperiod", + "\u0635/\u0645" }, + { "field.era", + "\u0627\u0644\u0639\u0635\u0631" }, + { "field.hour", + "\u0627\u0644\u0633\u0627\u0639\u0627\u062a" }, + { "field.minute", + "\u0627\u0644\u062f\u0642\u0627\u0626\u0642" }, + { "field.month", + "\u0627\u0644\u0634\u0647\u0631" }, + { "field.second", + "\u0627\u0644\u062b\u0648\u0627\u0646\u064a" }, + { "field.week", + "\u0627\u0644\u0623\u0633\u0628\u0648\u0639" }, + { "field.weekday", + "\u0627\u0644\u064a\u0648\u0645" }, + { "field.year", + "\u0627\u0644\u0633\u0646\u0629" }, + { "field.zone", + "\u0627\u0644\u062a\u0648\u0642\u064a\u062a" }, + { "islamic.DatePatterns", + new String[] { + "EEEE\u060c d MMMM y", + "d MMMM y", + "d MMM\u060c y GGGG", + "d\u200f/M\u200f/yyyy", + } + }, + { "islamic.Eras", + new String[] { + "", + "\u0647\u0640", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "\u0645\u062d\u0631\u0645", + "\u0635\u0641\u0631", + "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644", + "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631", + "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649", + "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629", + "\u0631\u062c\u0628", + "\u0634\u0639\u0628\u0627\u0646", + "\u0631\u0645\u0636\u0627\u0646", + "\u0634\u0648\u0627\u0644", + "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629", + "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "\u0645\u062d\u0631\u0645", + "\u0635\u0641\u0631", + "\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644", + "\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631", + "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649", + "\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629", + "\u0631\u062c\u0628", + "\u0634\u0639\u0628\u0627\u0646", + "\u0631\u0645\u0636\u0627\u0646", + "\u0634\u0648\u0627\u0644", + "\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629", + "\u0630\u0648 \u0627\u0644\u062d\u062c\u0629", + "", + } + }, + { "islamic.MonthNarrows", + new String[] { + "\u0661", + "\u0662", + "\u0663", + "\u0664", + "\u0665", + "\u0666", + "\u0667", + "\u0668", + "\u0669", + "\u0661\u0660", + "\u0661\u0661", + "\u0661\u0662", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "\u0647\u0640", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE\u060c d MMMM\u060c y G", + "d MMMM\u060c y G", + "dd\u200f/MM\u200f/y G", + "d\u200f/M\u200f/y G", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE\u060c d MMMM y", + "d MMMM y", + "d MMM\u060c y G", + "d\u200f/M\u200f/yyyy", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE\u060c d MMMM\u060c y G", + "d MMMM\u060c y G", + "dd\u200f/MM\u200f/y G", + "d\u200f/M\u200f/y G", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u0645", + "\u0645\u064a\u062c\u064a", + "\u062a\u064a\u0634\u0648", + "\u0634\u0648\u0648\u0627", + "\u0647\u064a\u0633\u064a", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u0645", + "\u0645\u064a\u062c\u064a", + "\u062a\u064a\u0634\u0648", + "\u0634\u0648\u0648\u0627", + "\u0647\u064a\u0633\u064a", + } + }, + { "java.time.long.Eras", + new String[] { + "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f", + "\u0645\u064a\u0644\u0627\u062f\u064a", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE\u060c d MMMM\u060c y G", + "d MMMM\u060c y G", + "dd\u200f/MM\u200f/y G", + "d\u200f/M\u200f/y G", + } + }, + { "java.time.short.Eras", + new String[] { + "\u0642.\u0645", + "\u0645", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE\u060c d MMMM\u060c y GGGG", + "d MMMM\u060c y GGGG", + "dd\u200f/MM\u200f/y GGGG", + "d\u200f/M\u200f/y GGGG", + } + }, + { "roc.Eras", + new String[] { + "Before R.O.C.", + "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a", + } + }, + { "roc.short.Eras", + new String[] { + "Before R.O.C.", + "\u062c\u0645\u0647\u0648\u0631\u064a\u0629 \u0627\u0644\u0635\u064a", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/be/FormatData_be.java b/jdk/src/share/classes/sun/text/resources/be/FormatData_be.java index 84c15394658..bed17d2f4f1 100644 --- a/jdk/src/share/classes/sun/text/resources/be/FormatData_be.java +++ b/jdk/src/share/classes/sun/text/resources/be/FormatData_be.java @@ -79,11 +79,11 @@ package sun.text.resources.be; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_be extends ListResourceBundle { +public class FormatData_be extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -177,6 +177,12 @@ public class FormatData_be extends ListResourceBundle { "\u043d.\u0435." } }, + { "short.Eras", + new String[] { + "\u0434\u0430 \u043d.\u044d.", + "\u043d.\u044d.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -214,29 +220,6 @@ public class FormatData_be extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, d MMMM y G", - "d MMMM y G", - "d MMM y G", - "d.M.yy", - } - }, - { "calendarname.islamic-civil", "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "calendarname.islamicc", "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "calendarname.islamic", "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "calendarname.buddhist", "\u0431\u0443\u0434\u044b\u0441\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "calendarname.japanese", "\u044f\u043f\u043e\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "calendarname.gregorian", "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "calendarname.gregory", "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, - { "field.era", "\u044d\u0440\u0430" }, - { "field.year", "\u0433\u043e\u0434" }, - { "field.month", "\u043c\u0435\u0441\u044f\u0446" }, - { "field.week", "\u0442\u044b\u0434\u0437\u0435\u043d\u044c" }, - { "field.weekday", "\u0434\u0437\u0435\u043d\u044c \u0442\u044b\u0434\u043d\u044f" }, - { "field.hour", "\u0433\u0430\u0434\u0437\u0456\u043d\u0430" }, - { "field.minute", "\u0445\u0432\u0456\u043b\u0456\u043d\u0430" }, - { "field.second", "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/be/FormatData_be_BY.java b/jdk/src/share/classes/sun/text/resources/be/FormatData_be_BY.java index b9b4463e99a..803f5699907 100644 --- a/jdk/src/share/classes/sun/text/resources/be/FormatData_be_BY.java +++ b/jdk/src/share/classes/sun/text/resources/be/FormatData_be_BY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.be; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_be_BY extends ListResourceBundle { +public class FormatData_be_BY extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/be/JavaTimeSupplementary_be.java b/jdk/src/share/classes/sun/text/resources/be/JavaTimeSupplementary_be.java new file mode 100644 index 00000000000..baa42ca6aa4 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/be/JavaTimeSupplementary_be.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.be; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_be extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1-\u0448\u044b \u043a\u0432.", + "2-\u0433\u0456 \u043a\u0432.", + "3-\u0446\u0456 \u043a\u0432.", + "4-\u0442\u044b \u043a\u0432.", + } + }, + { "QuarterNames", + new String[] { + "1-\u0448\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "2-\u0433\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "3-\u0446\u0456 \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "4-\u0442\u044b \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + } + }, + { "calendarname.buddhist", + "\u0431\u0443\u0434\u044b\u0441\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "calendarname.gregorian", + "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "calendarname.gregory", + "\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic", + "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic-civil", + "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "calendarname.islamicc", + "\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "calendarname.japanese", + "\u044f\u043f\u043e\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440" }, + { "field.dayperiod", + "\u0414\u041f/\u041f\u041f" }, + { "field.era", + "\u044d\u0440\u0430" }, + { "field.hour", + "\u0433\u0430\u0434\u0437\u0456\u043d\u0430" }, + { "field.minute", + "\u0445\u0432\u0456\u043b\u0456\u043d\u0430" }, + { "field.month", + "\u043c\u0435\u0441\u044f\u0446" }, + { "field.second", + "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" }, + { "field.week", + "\u0442\u044b\u0434\u0437\u0435\u043d\u044c" }, + { "field.weekday", + "\u0434\u0437\u0435\u043d\u044c \u0442\u044b\u0434\u043d\u044f" }, + { "field.year", + "\u0433\u043e\u0434" }, + { "field.zone", + "Zone" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "d MMM y G", + "d.M.yy", + } + }, + { "java.time.short.Eras", + new String[] { + "\u0434\u0430 \u043d.\u0435.", + "\u043d.\u0435.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg.java b/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg.java index 2d9ec8da0de..b97e2746277 100644 --- a/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg.java +++ b/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg.java @@ -79,11 +79,11 @@ package sun.text.resources.bg; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_bg extends ListResourceBundle { +public class FormatData_bg extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -121,6 +121,23 @@ public class FormatData_bg extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u044f", + "\u0444", + "\u043c", + "\u0430", + "\u043c", + "\u044e", + "\u044e", + "\u0430", + "\u0441", + "\u043e", + "\u043d", + "\u0434", + "", + } + }, { "DayNames", new String[] { "\u041d\u0435\u0434\u0435\u043b\u044f", // Sunday @@ -160,6 +177,12 @@ public class FormatData_bg extends ListResourceBundle { "\u043d.\u0435." } }, + { "short.Eras", + new String[] { + "\u043f\u0440. \u043d. \u0435.", + "\u043e\u0442 \u043d. \u0435.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -197,41 +220,6 @@ public class FormatData_bg extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "islamic.MonthNames", - new String[] { - "\u043c\u0443\u0445\u0430\u0440\u0430\u043c", - "\u0441\u0430\u0444\u0430\u0440", - "\u0440\u0430\u0431\u0438-1", - "\u0440\u0430\u0431\u0438-2", - "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-1", - "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-2", - "\u0440\u0430\u0434\u0436\u0430\u0431", - "\u0448\u0430\u0431\u0430\u043d", - "\u0440\u0430\u043c\u0430\u0437\u0430\u043d", - "\u0428\u0430\u0432\u0430\u043b", - "\u0414\u0445\u0443\u043b-\u041a\u0430\u0430\u0434\u0430", - "\u0414\u0445\u0443\u043b-\u0445\u0438\u0434\u0436\u0430", - "", - } - }, - { "calendarname.islamic-civil", "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamicc", "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamic", "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.japanese", "\u042f\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregorian", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregory", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.roc", "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u0442\u0430\u0439" }, - { "calendarname.buddhist", "\u0411\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "field.era", "\u0435\u0440\u0430" }, - { "field.year", "\u0433\u043e\u0434\u0438\u043d\u0430" }, - { "field.month", "\u043c\u0435\u0441\u0435\u0446" }, - { "field.week", "\u0441\u0435\u0434\u043c\u0438\u0446\u0430" }, - { "field.weekday", "\u0414\u0435\u043d \u043e\u0442 \u0441\u0435\u0434\u043c\u0438\u0446\u0430\u0442\u0430" }, - { "field.dayperiod", "\u0434\u0435\u043d" }, - { "field.hour", "\u0447\u0430\u0441" }, - { "field.minute", "\u043c\u0438\u043d\u0443\u0442\u0430" }, - { "field.second", "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" }, - { "field.zone", "\u0437\u043e\u043d\u0430" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg_BG.java b/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg_BG.java index 72bcc7b775b..7ea06d3a472 100644 --- a/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg_BG.java +++ b/jdk/src/share/classes/sun/text/resources/bg/FormatData_bg_BG.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.bg; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_bg_BG extends ListResourceBundle { +public class FormatData_bg_BG extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/bg/JavaTimeSupplementary_bg.java b/jdk/src/share/classes/sun/text/resources/bg/JavaTimeSupplementary_bg.java new file mode 100644 index 00000000000..b3ac5969154 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/bg/JavaTimeSupplementary_bg.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.bg; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_bg extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "I \u0442\u0440\u0438\u043c.", + "II \u0442\u0440\u0438\u043c.", + "III \u0442\u0440\u0438\u043c.", + "IV \u0442\u0440\u0438\u043c.", + } + }, + { "QuarterNames", + new String[] { + "1-\u0432\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435", + "2-\u0440\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435", + "3-\u0442\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435", + "4-\u0442\u043e \u0442\u0440\u0438\u043c\u0435\u0441\u0435\u0447\u0438\u0435", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u0411\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregorian", + "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregory", + "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic", + "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic-civil", + "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamicc", + "\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.japanese", + "\u042f\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.roc", + "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u0442\u0430\u0439" }, + { "field.dayperiod", + "\u0434\u0435\u043d" }, + { "field.era", + "\u0435\u0440\u0430" }, + { "field.hour", + "\u0447\u0430\u0441" }, + { "field.minute", + "\u043c\u0438\u043d\u0443\u0442\u0430" }, + { "field.month", + "\u043c\u0435\u0441\u0435\u0446" }, + { "field.second", + "\u0441\u0435\u043a\u0443\u043d\u0434\u0430" }, + { "field.week", + "\u0441\u0435\u0434\u043c\u0438\u0446\u0430" }, + { "field.weekday", + "\u0414\u0435\u043d \u043e\u0442 \u0441\u0435\u0434\u043c\u0438\u0446\u0430\u0442\u0430" }, + { "field.year", + "\u0433\u043e\u0434\u0438\u043d\u0430" }, + { "field.zone", + "\u0437\u043e\u043d\u0430" }, + { "islamic.MonthNames", + new String[] { + "\u043c\u0443\u0445\u0430\u0440\u0430\u043c", + "\u0441\u0430\u0444\u0430\u0440", + "\u0440\u0430\u0431\u0438-1", + "\u0440\u0430\u0431\u0438-2", + "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-1", + "\u0434\u0436\u0443\u043c\u0430\u0434\u0430-2", + "\u0440\u0430\u0434\u0436\u0430\u0431", + "\u0448\u0430\u0431\u0430\u043d", + "\u0440\u0430\u043c\u0430\u0437\u0430\u043d", + "\u0428\u0430\u0432\u0430\u043b", + "\u0414\u0445\u0443\u043b-\u041a\u0430\u0430\u0434\u0430", + "\u0414\u0445\u0443\u043b-\u0445\u0438\u0434\u0436\u0430", + "", + } + }, + { "java.time.long.Eras", + new String[] { + "\u043f\u0440.\u0425\u0440.", + "\u0441\u043b.\u0425\u0440.", + } + }, + { "java.time.short.Eras", + new String[] { + "\u043f\u0440.\u043d.\u0435.", + "\u043d.\u0435.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca.java b/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca.java index 10522d5e22c..153b907e377 100644 --- a/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca.java +++ b/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca.java @@ -79,11 +79,11 @@ package sun.text.resources.ca; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ca extends ListResourceBundle { +public class FormatData_ca extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -104,6 +104,23 @@ public class FormatData_ca extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "G", + "F", + "M", + "A", + "M", + "J", + "G", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "standalone.MonthNames", new String[] { "gener", // january @@ -183,6 +200,17 @@ public class FormatData_ca extends ListResourceBundle { "dissabte" // Saturday } }, + { "standalone.DayNames", + new String[] { + "Diumenge", + "Dilluns", + "Dimarts", + "Dimecres", + "Dijous", + "Divendres", + "Dissabte", + } + }, { "DayAbbreviations", new String[] { "dg.", // abb Sunday @@ -194,6 +222,17 @@ public class FormatData_ca extends ListResourceBundle { "ds." // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "dg", + "dl", + "dt", + "dc", + "dj", + "dv", + "ds", + } + }, { "DayNarrows", new String[] { "G", @@ -216,6 +255,12 @@ public class FormatData_ca extends ListResourceBundle { "s", } }, + { "short.Eras", + new String[] { + "aC", + "dC", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -253,24 +298,6 @@ public class FormatData_ca extends ListResourceBundle { } }, { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" }, - { "calendarname.islamic-civil", "calendari civil isl\u00e0mic" }, - { "calendarname.islamicc", "calendari civil isl\u00e0mic" }, - { "calendarname.roc", "calendari de la Rep\u00fablica de Xina" }, - { "calendarname.islamic", "calendari musulm\u00e0" }, - { "calendarname.buddhist", "calendari budista" }, - { "calendarname.japanese", "calendari japon\u00e8s" }, - { "calendarname.gregorian", "calendari gregori\u00e0" }, - { "calendarname.gregory", "calendari gregori\u00e0" }, - { "field.era", "era" }, - { "field.year", "any" }, - { "field.month", "mes" }, - { "field.week", "setmana" }, - { "field.weekday", "dia de la setmana" }, - { "field.dayperiod", "a.m./p.m." }, - { "field.hour", "hora" }, - { "field.minute", "minut" }, - { "field.second", "segon" }, - { "field.zone", "zona" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca_ES.java b/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca_ES.java index c3bd646f044..8571094b519 100644 --- a/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca_ES.java +++ b/jdk/src/share/classes/sun/text/resources/ca/FormatData_ca_ES.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.ca; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ca_ES extends ListResourceBundle { +public class FormatData_ca_ES extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ca/JavaTimeSupplementary_ca.java b/jdk/src/share/classes/sun/text/resources/ca/JavaTimeSupplementary_ca.java new file mode 100644 index 00000000000..cd991360b07 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ca/JavaTimeSupplementary_ca.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ca; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ca extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1T", + "2T", + "3T", + "4T", + } + }, + { "QuarterNames", + new String[] { + "1r trimestre", + "2n trimestre", + "3r trimestre", + "4t trimestre", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "calendari budista" }, + { "calendarname.gregorian", + "calendari gregori\u00e0" }, + { "calendarname.gregory", + "calendari gregori\u00e0" }, + { "calendarname.islamic", + "calendari musulm\u00e0" }, + { "calendarname.islamic-civil", + "calendari civil isl\u00e0mic" }, + { "calendarname.islamicc", + "calendari civil isl\u00e0mic" }, + { "calendarname.japanese", + "calendari japon\u00e8s" }, + { "calendarname.roc", + "calendari de la Rep\u00fablica de Xina" }, + { "field.dayperiod", + "a.m./p.m." }, + { "field.era", + "era" }, + { "field.hour", + "hora" }, + { "field.minute", + "minut" }, + { "field.month", + "mes" }, + { "field.second", + "segon" }, + { "field.week", + "setmana" }, + { "field.weekday", + "dia de la setmana" }, + { "field.year", + "any" }, + { "field.zone", + "zona" }, + { "java.time.short.Eras", + new String[] { + "aC", + "dC", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs.java b/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs.java index cb2d780cb82..19ab68d18cd 100644 --- a/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs.java +++ b/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs.java @@ -79,11 +79,11 @@ package sun.text.resources.cs; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_cs extends ListResourceBundle { +public class FormatData_cs extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -155,6 +155,40 @@ public class FormatData_cs extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "l", + "\u00fa", + "b", + "d", + "k", + "\u010d", + "\u010d", + "s", + "z", + "\u0159", + "l", + "p", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "l", + "\u00fa", + "b", + "d", + "k", + "\u010d", + "\u010d", + "s", + "z", + "\u0159", + "l", + "p", + "", + } + }, { "DayNames", new String[] { "Ned\u011ble", // Sunday @@ -166,6 +200,17 @@ public class FormatData_cs extends ListResourceBundle { "Sobota" // Saturday } }, + { "standalone.DayNames", + new String[] { + "ned\u011ble", + "pond\u011bl\u00ed", + "\u00fater\u00fd", + "st\u0159eda", + "\u010dtvrtek", + "p\u00e1tek", + "sobota", + } + }, { "DayAbbreviations", new String[] { "Ne", // abb Sunday @@ -177,6 +222,17 @@ public class FormatData_cs extends ListResourceBundle { "So" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "ne", + "po", + "\u00fat", + "st", + "\u010dt", + "p\u00e1", + "so", + } + }, { "DayNarrows", new String[] { "N", @@ -188,6 +244,17 @@ public class FormatData_cs extends ListResourceBundle { "S", } }, + { "standalone.DayNarrows", + new String[] { + "N", + "P", + "\u00da", + "S", + "\u010c", + "P", + "S", + } + }, { "AmPmMarkers", new String[] { "dop.", // am marker @@ -200,6 +267,18 @@ public class FormatData_cs extends ListResourceBundle { "po Kr." } }, + { "short.Eras", + new String[] { + "p\u0159. n. l.", + "n. l.", + } + }, + { "narrow.Eras", + new String[] { + "p\u0159.n.l.", + "n. l.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -237,22 +316,6 @@ public class FormatData_cs extends ListResourceBundle { } }, { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" }, - { "calendarname.islamic-civil", "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" }, - { "calendarname.islamicc", "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" }, - { "calendarname.islamic", "Muslimsk\u00fd kalend\u00e1\u0159" }, - { "calendarname.buddhist", "Buddhistick\u00fd kalend\u00e1\u0159" }, - { "calendarname.japanese", "Japonsk\u00fd kalend\u00e1\u0159" }, - { "calendarname.gregorian", "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" }, - { "calendarname.gregory", "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" }, - { "field.year", "Rok" }, - { "field.month", "M\u011bs\u00edc" }, - { "field.week", "T\u00fdden" }, - { "field.weekday", "Den v t\u00fddnu" }, - { "field.dayperiod", "AM/PM" }, - { "field.hour", "Hodina" }, - { "field.minute", "Minuta" }, - { "field.second", "Sekunda" }, - { "field.zone", "\u010casov\u00e9 p\u00e1smo" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs_CZ.java b/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs_CZ.java index f8619e40fb5..cf6b34a02e1 100644 --- a/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs_CZ.java +++ b/jdk/src/share/classes/sun/text/resources/cs/FormatData_cs_CZ.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.cs; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_cs_CZ extends ListResourceBundle { +public class FormatData_cs_CZ extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/cs/JavaTimeSupplementary_cs.java b/jdk/src/share/classes/sun/text/resources/cs/JavaTimeSupplementary_cs.java new file mode 100644 index 00000000000..7636eb489d8 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/cs/JavaTimeSupplementary_cs.java @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.cs; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_cs extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "1. \u010dtvrtlet\u00ed", + "2. \u010dtvrtlet\u00ed", + "3. \u010dtvrtlet\u00ed", + "4. \u010dtvrtlet\u00ed", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Buddhistick\u00fd kalend\u00e1\u0159" }, + { "calendarname.gregorian", + "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" }, + { "calendarname.gregory", + "Gregori\u00e1nsk\u00fd kalend\u00e1\u0159" }, + { "calendarname.islamic", + "Muslimsk\u00fd kalend\u00e1\u0159" }, + { "calendarname.islamic-civil", + "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" }, + { "calendarname.islamicc", + "Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159" }, + { "calendarname.japanese", + "Japonsk\u00fd kalend\u00e1\u0159" }, + { "calendarname.roc", + "Kalend\u00e1\u0159 \u010c\u00ednsk\u00e9 republiky" }, + { "field.dayperiod", + "AM/PM" }, + { "field.era", + "Letopo\u010det" }, + { "field.hour", + "Hodina" }, + { "field.minute", + "Minuta" }, + { "field.month", + "M\u011bs\u00edc" }, + { "field.second", + "Sekunda" }, + { "field.week", + "T\u00fdden" }, + { "field.weekday", + "Den v t\u00fddnu" }, + { "field.year", + "Rok" }, + { "field.zone", + "\u010casov\u00e9 p\u00e1smo" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d. MMMM y G", + "d. MMMM y G", + "d. M. y G", + "dd.MM.yy GGGGG", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. M. y G", + "dd.MM.yy GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "p\u0159. n. l.", + "n. l.", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d. MMMM y G", + "d. MMMM y G", + "d. M. y G", + "dd.MM.yy GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "p\u0159.Kr.", + "po Kr.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. M. y GGGG", + "dd.MM.yy G", + } + }, + { "roc.Eras", + new String[] { + "P\u0159ed R. O. C.", + "", + } + }, + { "roc.short.Eras", + new String[] { + "P\u0159ed R. O. C.", + "", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/da/FormatData_da.java b/jdk/src/share/classes/sun/text/resources/da/FormatData_da.java index 295a5aaddf6..13efb6f3df9 100644 --- a/jdk/src/share/classes/sun/text/resources/da/FormatData_da.java +++ b/jdk/src/share/classes/sun/text/resources/da/FormatData_da.java @@ -79,11 +79,11 @@ package sun.text.resources.da; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_da extends ListResourceBundle { +public class FormatData_da extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -121,6 +121,23 @@ public class FormatData_da extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "standalone.MonthAbbreviations", new String[] { "jan", // abb january @@ -186,6 +203,18 @@ public class FormatData_da extends ListResourceBundle { "\ufffd" // NaN } }, + { "Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, + { "short.Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, { "TimePatterns", new String[] { "HH:mm:ss z", // full time pattern @@ -208,64 +237,6 @@ public class FormatData_da extends ListResourceBundle { } }, { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d/M/y GGGGG", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d/M/y GGGGG", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d. MMMM y GGGG", - "d. MMMM y GGGG", - "d. MMM y GGGG", - "d/M/y G", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d/M/y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d. MMMM y GGGG", - "d. MMMM y GGGG", - "d. MMM y GGGG", - "d/M/y GGGG", - } - }, - { "calendarname.islamic-civil", "verdslig islamisk kalender" }, - { "calendarname.islamicc", "verdslig islamisk kalender" }, - { "calendarname.roc", "kalender for Republikken Kina" }, - { "calendarname.islamic", "islamisk kalender" }, - { "calendarname.buddhist", "buddhistisk kalender" }, - { "calendarname.japanese", "japansk kalender" }, - { "calendarname.gregorian", "gregoriansk kalender" }, - { "calendarname.gregory", "gregoriansk kalender" }, - { "field.era", "\u00e6ra" }, - { "field.year", "\u00e5r" }, - { "field.month", "m\u00e5ned" }, - { "field.week", "uge" }, - { "field.weekday", "ugedag" }, - { "field.dayperiod", "dagtid" }, - { "field.hour", "time" }, - { "field.minute", "minut" }, - { "field.second", "sekund" }, - { "field.zone", "tidszone" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/da/FormatData_da_DK.java b/jdk/src/share/classes/sun/text/resources/da/FormatData_da_DK.java index c8c9b27702a..1565a5f9b3c 100644 --- a/jdk/src/share/classes/sun/text/resources/da/FormatData_da_DK.java +++ b/jdk/src/share/classes/sun/text/resources/da/FormatData_da_DK.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.da; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_da_DK extends ListResourceBundle { +public class FormatData_da_DK extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/da/JavaTimeSupplementary_da.java b/jdk/src/share/classes/sun/text/resources/da/JavaTimeSupplementary_da.java new file mode 100644 index 00000000000..bc88aae782e --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/da/JavaTimeSupplementary_da.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.da; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_da extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "1. kvartal", + "2. kvartal", + "3. kvartal", + "4. kvartal", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "buddhistisk kalender" }, + { "calendarname.gregorian", + "gregoriansk kalender" }, + { "calendarname.gregory", + "gregoriansk kalender" }, + { "calendarname.islamic", + "islamisk kalender" }, + { "calendarname.islamic-civil", + "verdslig islamisk kalender" }, + { "calendarname.islamicc", + "verdslig islamisk kalender" }, + { "calendarname.japanese", + "japansk kalender" }, + { "calendarname.roc", + "kalender for Republikken Kina" }, + { "field.dayperiod", + "dagtid" }, + { "field.era", + "\u00e6ra" }, + { "field.hour", + "time" }, + { "field.minute", + "minut" }, + { "field.month", + "m\u00e5ned" }, + { "field.second", + "sekund" }, + { "field.week", + "uge" }, + { "field.weekday", + "ugedag" }, + { "field.year", + "\u00e5r" }, + { "field.zone", + "tidszone" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. MMM y GGGG", + "d/M/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d/M/yyyy", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d/M/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d/M/y GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d/M/y GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. MMM y GGGG", + "d/M/y G", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/de/FormatData_de.java b/jdk/src/share/classes/sun/text/resources/de/FormatData_de.java index e8a6c924831..435a79742d2 100644 --- a/jdk/src/share/classes/sun/text/resources/de/FormatData_de.java +++ b/jdk/src/share/classes/sun/text/resources/de/FormatData_de.java @@ -79,11 +79,11 @@ package sun.text.resources.de; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_de extends ListResourceBundle { +public class FormatData_de extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -121,6 +121,23 @@ public class FormatData_de extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "standalone.MonthAbbreviations", new String[] { "Jan", // abb january @@ -160,6 +177,17 @@ public class FormatData_de extends ListResourceBundle { "Sa" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "So", + "Mo", + "Di", + "Mi", + "Do", + "Fr", + "Sa", + } + }, { "DayNarrows", new String[] { "S", @@ -177,6 +205,12 @@ public class FormatData_de extends ListResourceBundle { "n. Chr." } }, + { "short.Eras", + new String[] { + "v. Chr.", + "n. Chr.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -214,72 +248,6 @@ public class FormatData_de extends ListResourceBundle { } }, { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d.M.yyyy", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d.M.y GGGGG", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d.M.y GGGGG", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d. MMMM y GGGG", - "d. MMMM y GGGG", - "d. MMM y GGGG", - "d.M.y G", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE d. MMMM y G", - "d. MMMM y G", - "d. MMM y G", - "d.M.y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d. MMMM y GGGG", - "d. MMMM y GGGG", - "d. MMM y GGGG", - "d.M.y GGGG", - } - }, - { "calendarname.islamic-civil", "B\u00fcrgerlicher islamischer Kalender" }, - { "calendarname.islamicc", "B\u00fcrgerlicher islamischer Kalender" }, - { "calendarname.roc", "Kalender der Republik China" }, - { "calendarname.islamic", "Islamischer Kalender" }, - { "calendarname.buddhist", "Buddhistischer Kalender" }, - { "calendarname.japanese", "Japanischer Kalender" }, - { "calendarname.gregorian", "Gregorianischer Kalender" }, - { "calendarname.gregory", "Gregorianischer Kalender" }, - { "field.era", "Epoche" }, - { "field.year", "Jahr" }, - { "field.month", "Monat" }, - { "field.week", "Woche" }, - { "field.weekday", "Wochentag" }, - { "field.dayperiod", "Tagesh\u00e4lfte" }, - { "field.hour", "Stunde" }, - { "field.minute", "Minute" }, - { "field.second", "Sekunde" }, - { "field.zone", "Zone" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_AT.java b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_AT.java index aed48ffe786..e842ffffbfa 100644 --- a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_AT.java +++ b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_AT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.de; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_de_AT extends ListResourceBundle { +public class FormatData_de_AT extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_CH.java b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_CH.java index 8229b7e9b93..ac153156fd0 100644 --- a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_CH.java +++ b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_CH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.de; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_de_CH extends ListResourceBundle { +public class FormatData_de_CH extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_DE.java b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_DE.java index b1f53b44b0e..a0ad8f06943 100644 --- a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_DE.java +++ b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_DE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -43,11 +43,11 @@ package sun.text.resources.de; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_de_DE extends ListResourceBundle { +public class FormatData_de_DE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_LU.java b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_LU.java index 02f99b14d79..13ea4f824e8 100644 --- a/jdk/src/share/classes/sun/text/resources/de/FormatData_de_LU.java +++ b/jdk/src/share/classes/sun/text/resources/de/FormatData_de_LU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.de; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_de_LU extends ListResourceBundle { +public class FormatData_de_LU extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/de/JavaTimeSupplementary_de.java b/jdk/src/share/classes/sun/text/resources/de/JavaTimeSupplementary_de.java new file mode 100644 index 00000000000..b5c64df02dd --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/de/JavaTimeSupplementary_de.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.de; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_de extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "1. Quartal", + "2. Quartal", + "3. Quartal", + "4. Quartal", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Buddhistischer Kalender" }, + { "calendarname.gregorian", + "Gregorianischer Kalender" }, + { "calendarname.gregory", + "Gregorianischer Kalender" }, + { "calendarname.islamic", + "Islamischer Kalender" }, + { "calendarname.islamic-civil", + "B\u00fcrgerlicher islamischer Kalender" }, + { "calendarname.islamicc", + "B\u00fcrgerlicher islamischer Kalender" }, + { "calendarname.japanese", + "Japanischer Kalender" }, + { "calendarname.roc", + "Kalender der Republik China" }, + { "field.dayperiod", + "Tagesh\u00e4lfte" }, + { "field.era", + "Epoche" }, + { "field.hour", + "Stunde" }, + { "field.minute", + "Minute" }, + { "field.month", + "Monat" }, + { "field.second", + "Sekunde" }, + { "field.week", + "Woche" }, + { "field.weekday", + "Wochentag" }, + { "field.year", + "Jahr" }, + { "field.zone", + "Zone" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. MMM y GGGG", + "d.M.y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M.yyyy", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M.y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M.y GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "v. Chr.", + "n. Chr.", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M.y GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "v. Chr.", + "n. Chr.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. MMM y GGGG", + "d.M.y G", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/el/FormatData_el.java b/jdk/src/share/classes/sun/text/resources/el/FormatData_el.java index 398bbdd8e51..430d0e99a19 100644 --- a/jdk/src/share/classes/sun/text/resources/el/FormatData_el.java +++ b/jdk/src/share/classes/sun/text/resources/el/FormatData_el.java @@ -79,11 +79,11 @@ package sun.text.resources.el; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_el extends ListResourceBundle { +public class FormatData_el extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -143,6 +143,57 @@ public class FormatData_el extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "\u0399\u03b1\u03bd", + "\u03a6\u03b5\u03b2", + "\u039c\u03ac\u03c1", + "\u0391\u03c0\u03c1", + "\u039c\u03ac\u03b9", + "\u0399\u03bf\u03cd\u03bd", + "\u0399\u03bf\u03cd\u03bb", + "\u0391\u03c5\u03b3", + "\u03a3\u03b5\u03c0", + "\u039f\u03ba\u03c4", + "\u039d\u03bf\u03ad", + "\u0394\u03b5\u03ba", + "", + } + }, + { "MonthNarrows", + new String[] { + "\u0399", + "\u03a6", + "\u039c", + "\u0391", + "\u039c", + "\u0399", + "\u0399", + "\u0391", + "\u03a3", + "\u039f", + "\u039d", + "\u0394", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "\u0399", + "\u03a6", + "\u039c", + "\u0391", + "\u039c", + "\u0399", + "\u0399", + "\u0391", + "\u03a3", + "\u039f", + "\u039d", + "\u0394", + "", + } + }, { "DayNames", new String[] { "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", // Sunday @@ -154,6 +205,17 @@ public class FormatData_el extends ListResourceBundle { "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf" // Saturday } }, + { "standalone.DayNames", + new String[] { + "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae", + "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1", + "\u03a4\u03c1\u03af\u03c4\u03b7", + "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7", + "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7", + "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae", + "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf", + } + }, { "DayAbbreviations", new String[] { "\u039a\u03c5\u03c1", // abb Sunday @@ -165,6 +227,17 @@ public class FormatData_el extends ListResourceBundle { "\u03a3\u03b1\u03b2" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "\u039a\u03c5\u03c1", + "\u0394\u03b5\u03c5", + "\u03a4\u03c1\u03af", + "\u03a4\u03b5\u03c4", + "\u03a0\u03ad\u03bc", + "\u03a0\u03b1\u03c1", + "\u03a3\u03ac\u03b2", + } + }, { "DayNarrows", new String[] { "\u039a", @@ -176,6 +249,23 @@ public class FormatData_el extends ListResourceBundle { "\u03a3", } }, + { "standalone.DayNarrows", + new String[] { + "\u039a", + "\u0394", + "\u03a4", + "\u03a4", + "\u03a0", + "\u03a0", + "\u03a3", + } + }, + { "short.Eras", + new String[] { + "\u03c0.\u03a7.", + "\u03bc.\u03a7.", + } + }, { "AmPmMarkers", new String[] { "\u03c0\u03bc", // am marker @@ -219,58 +309,6 @@ public class FormatData_el extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, d MMMM, y G", - "d MMMM, y G", - "d MMM, y G", - "d/M/yyyy", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, d MMMM, y G", - "d MMMM, y G", - "d MMM, y G", - "d/M/yy", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d MMMM, y G", - "d MMMM, y G", - "d MMM, y G", - "d/M/y G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d MMMM, y GGGG", - "d MMMM, y GGGG", - "d MMM, y GGGG", - "d/M/y GGGG", - } - }, - { "calendarname.islamic-civil", "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "calendarname.islamicc", "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "calendarname.islamic", "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "calendarname.japanese", "\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "calendarname.gregorian", "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "calendarname.gregory", "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "calendarname.roc", "\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf \u03c4\u03b7\u03c2 \u0394\u03b7\u03bc\u03bf\u03ba\u03c1\u03b1\u03c4\u03af\u03b1\u03c2 \u03c4\u03b7\u03c2 \u039a\u03af\u03bd\u03b1\u03c2" }, - { "calendarname.buddhist", "\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, - { "field.era", "\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2" }, - { "field.year", "\u0388\u03c4\u03bf\u03c2" }, - { "field.month", "\u039c\u03ae\u03bd\u03b1\u03c2" }, - { "field.week", "\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1" }, - { "field.weekday", "\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2" }, - { "field.dayperiod", "\u03c0.\u03bc./\u03bc.\u03bc." }, - { "field.hour", "\u038f\u03c1\u03b1" }, - { "field.minute", "\u039b\u03b5\u03c0\u03c4\u03cc" }, - { "field.second", "\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf" }, - { "field.zone", "\u0396\u03ce\u03bd\u03b7" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/el/FormatData_el_CY.java b/jdk/src/share/classes/sun/text/resources/el/FormatData_el_CY.java index 9835e129518..364ffa8b602 100644 --- a/jdk/src/share/classes/sun/text/resources/el/FormatData_el_CY.java +++ b/jdk/src/share/classes/sun/text/resources/el/FormatData_el_CY.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.el; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_el_CY extends ListResourceBundle { +public class FormatData_el_CY extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", diff --git a/jdk/src/share/classes/sun/text/resources/el/FormatData_el_GR.java b/jdk/src/share/classes/sun/text/resources/el/FormatData_el_GR.java index 2ea3cbee9a7..af8bb882aee 100644 --- a/jdk/src/share/classes/sun/text/resources/el/FormatData_el_GR.java +++ b/jdk/src/share/classes/sun/text/resources/el/FormatData_el_GR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.el; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_el_GR extends ListResourceBundle { +public class FormatData_el_GR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/el/JavaTimeSupplementary_el.java b/jdk/src/share/classes/sun/text/resources/el/JavaTimeSupplementary_el.java new file mode 100644 index 00000000000..2b798c0a98b --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/el/JavaTimeSupplementary_el.java @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.el; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_el extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "\u03a41", + "\u03a42", + "\u03a43", + "\u03a44", + } + }, + { "QuarterNames", + new String[] { + "1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf", + "2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf", + "3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf", + "4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.gregorian", + "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.gregory", + "\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.islamic", + "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.islamic-civil", + "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.islamicc", + "\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.japanese", + "\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf" }, + { "calendarname.roc", + "\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf \u03c4\u03b7\u03c2 \u0394\u03b7\u03bc\u03bf\u03ba\u03c1\u03b1\u03c4\u03af\u03b1\u03c2 \u03c4\u03b7\u03c2 \u039a\u03af\u03bd\u03b1\u03c2" }, + { "field.dayperiod", + "\u03c0.\u03bc./\u03bc.\u03bc." }, + { "field.era", + "\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2" }, + { "field.hour", + "\u038f\u03c1\u03b1" }, + { "field.minute", + "\u039b\u03b5\u03c0\u03c4\u03cc" }, + { "field.month", + "\u039c\u03ae\u03bd\u03b1\u03c2" }, + { "field.second", + "\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf" }, + { "field.week", + "\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1" }, + { "field.weekday", + "\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2" }, + { "field.year", + "\u0388\u03c4\u03bf\u03c2" }, + { "field.zone", + "\u0396\u03ce\u03bd\u03b7" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM, y G", + "d/M/yyyy", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM, y G", + "d/M/yy", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM, y G", + "d/M/y G", + } + }, + { "java.time.short.Eras", + new String[] { + "\u03c0.\u03a7.", + "\u03bc.\u03a7.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d MMMM, y GGGG", + "d MMMM, y GGGG", + "d MMM, y GGGG", + "d/M/y GGGG", + } + }, + { "roc.Eras", + new String[] { + "\u03a0\u03c1\u03b9\u03bd R.O.C.", + "R.O.C.", + } + }, + { "roc.short.Eras", + new String[] { + "\u03a0\u03c1\u03b9\u03bd R.O.C.", + "R.O.C.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en.java index 881753051df..d51c9f3ce5b 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en extends ListResourceBundle { +public class FormatData_en extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { // This locale inherits almost everything from the root default locale. However, diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_AU.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_AU.java index bfebc8e6cca..e0d8802ac85 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_AU.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_AU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_AU extends ListResourceBundle { +public class FormatData_en_AU extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_CA.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_CA.java index eb06b7d926a..e94ed48ea0a 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_CA.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_CA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_CA extends ListResourceBundle { +public class FormatData_en_CA extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_GB.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_GB.java index 3360d08f8f6..4666fc955ff 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_GB.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_GB.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_GB extends ListResourceBundle { +public class FormatData_en_GB extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IE.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IE.java index b2734e31358..bef5bde72c3 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IE.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_IE extends ListResourceBundle { +public class FormatData_en_IE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IN.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IN.java index 99aeb4c8977..4bc7ea9f784 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IN.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_IN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -31,16 +31,16 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; /** * The locale elements for English in India. * */ -public class FormatData_en_IN extends ListResourceBundle { +public class FormatData_en_IN extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_MT.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_MT.java index aeb413b2e38..55c353a7034 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_MT.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_MT.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_MT extends ListResourceBundle { +public class FormatData_en_MT extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "NumberPatterns", diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_NZ.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_NZ.java index 6fbfd5ec870..c7e4bc5fcec 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_NZ.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_NZ.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_NZ extends ListResourceBundle { +public class FormatData_en_NZ extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_PH.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_PH.java index 5e6b4796611..2f0b90bcfd4 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_PH.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_PH.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_PH extends ListResourceBundle { +public class FormatData_en_PH extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "NumberPatterns", diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_SG.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_SG.java index 35b85bce33f..c46c7652eca 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_SG.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_SG.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_SG extends ListResourceBundle { +public class FormatData_en_SG extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "NumberPatterns", diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_US.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_US.java index 6c8f6527bd3..b4dceac5041 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_US.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_US.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_US extends ListResourceBundle { +public class FormatData_en_US extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_ZA.java b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_ZA.java index 73620eaf1a8..b6298db6f0c 100644 --- a/jdk/src/share/classes/sun/text/resources/en/FormatData_en_ZA.java +++ b/jdk/src/share/classes/sun/text/resources/en/FormatData_en_ZA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.en; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_en_ZA extends ListResourceBundle { +public class FormatData_en_ZA extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en.java b/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en.java new file mode 100644 index 00000000000..e7650b3e701 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.en; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_en extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "1st quarter", + "2nd quarter", + "3rd quarter", + "4th quarter", + } + }, + { "calendarname.buddhist", + "Buddhist Calendar" }, + { "calendarname.gregorian", + "Gregorian Calendar" }, + { "calendarname.gregory", + "Gregorian Calendar" }, + { "calendarname.islamic", + "Islamic Calendar" }, + { "calendarname.islamic-civil", + "Islamic-Civil Calendar" }, + { "calendarname.islamicc", + "Islamic-Civil Calendar" }, + { "calendarname.japanese", + "Japanese Calendar" }, + { "calendarname.roc", + "Minguo Calendar" }, + { "field.dayperiod", + "AM/PM" }, + { "field.era", + "Era" }, + { "field.hour", + "Hour" }, + { "field.minute", + "Minute" }, + { "field.month", + "Month" }, + { "field.second", + "Second" }, + { "field.week", + "Week" }, + { "field.weekday", + "Day of the Week" }, + { "field.year", + "Year" }, + { "field.zone", + "Time Zone" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, MMMM d, y GGGG", + "MMMM d, y GGGG", + "MMM d, y GGGG", + "M/d/yy GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, MMMM d, y G", + "MMMM d, y G", + "MMM d, y G", + "M/d/yy GGGGG", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, MMMM d, y G", + "MMMM d, y G", + "MMM d, y G", + "M/d/yy G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, MMMM d, y G", + "MMMM d, y G", + "MMM d, y G", + "M/d/yy GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "Before Christ", + "Anno Domini", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, MMMM d, y G", + "MMMM d, y G", + "MMM d, y G", + "M/d/yy GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "BC", + "AD", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, MMMM d, y GGGG", + "MMMM d, y GGGG", + "MMM d, y GGGG", + "M/d/yy G", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_GB.java b/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_GB.java new file mode 100644 index 00000000000..231c2ccde08 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_GB.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.en; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_en_GB extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "islamic.DatePatterns", + new String[] { + "EEEE, d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM y GGGG", + "dd/MM/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd/MM/y G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd/MM/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd/MM/y GGGGG", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd/MM/y GGGGG", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM y GGGG", + "dd/MM/y G", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_SG.java b/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_SG.java new file mode 100644 index 00000000000..e413fc0a20d --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/en/JavaTimeSupplementary_en_SG.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.en; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_en_SG extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM, y G", + "d/M/yy GGGGG", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM, y G", + "d/M/yy GGGGG", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM, y G", + "d/M/yy GGGGG", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d MMMM, y GGGG", + "d MMMM, y GGGG", + "d MMM, y GGGG", + "d/M/yy G", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es.java index 7ea5b998221..abb1607282b 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es.java @@ -76,11 +76,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es extends ListResourceBundle { +public class FormatData_es extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_es extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "E", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "domingo", // Sunday @@ -151,6 +168,18 @@ public class FormatData_es extends ListResourceBundle { "S", } }, + { "Eras", + new String[] { + "antes de Cristo", + "anno D\u00f3mini", + } + }, + { "short.Eras", + new String[] { + "a.C.", + "d.C.", + } + }, { "NumberPatterns", new String[] { "#,##0.###;-#,##0.###", // decimal pattern @@ -195,72 +224,6 @@ public class FormatData_es extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y G", - "d 'de' MMMM 'de' y G", - "dd/MM/y G", - "dd/MM/y G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y G", - "d 'de' MMMM 'de' y G", - "dd/MM/y G", - "dd/MM/y GGGGG", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y G", - "d 'de' MMMM 'de' y G", - "dd/MM/y G", - "dd/MM/y GGGGG", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y GGGG", - "d 'de' MMMM 'de' y GGGG", - "dd/MM/y GGGG", - "dd/MM/y G", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y G", - "d 'de' MMMM 'de' y G", - "dd/MM/y G", - "dd/MM/y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y GGGG", - "d 'de' MMMM 'de' y GGGG", - "dd/MM/y GGGG", - "dd/MM/y GGGG", - } - }, - { "calendarname.islamic-civil", "calendario civil isl\u00e1mico" }, - { "calendarname.islamicc", "calendario civil isl\u00e1mico" }, - { "calendarname.islamic", "calendario isl\u00e1mico" }, - { "calendarname.japanese", "calendario japon\u00e9s" }, - { "calendarname.gregorian", "calendario gregoriano" }, - { "calendarname.gregory", "calendario gregoriano" }, - { "calendarname.roc", "calendario de la Rep\u00fablica de China" }, - { "calendarname.buddhist", "calendario budista" }, - { "field.era", "era" }, - { "field.year", "a\u00f1o" }, - { "field.month", "mes" }, - { "field.week", "semana" }, - { "field.weekday", "d\u00eda de la semana" }, - { "field.dayperiod", "periodo del d\u00eda" }, - { "field.hour", "hora" }, - { "field.minute", "minuto" }, - { "field.second", "segundo" }, - { "field.zone", "zona" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_AR.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_AR.java index 9a29d322709..cdebbc30bb0 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_AR.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_AR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_AR extends ListResourceBundle { +public class FormatData_es_AR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_BO.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_BO.java index bef286bc178..a6777a954a1 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_BO.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_BO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_BO extends ListResourceBundle { +public class FormatData_es_BO extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CL.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CL.java index 37fe4dfe5be..87805df3a97 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CL.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_CL extends ListResourceBundle { +public class FormatData_es_CL extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CO.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CO.java index 2c12d0cefeb..ff5ab5b367f 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CO.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_CO extends ListResourceBundle { +public class FormatData_es_CO extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CR.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CR.java index 2cac9a2354d..b33b68561d1 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CR.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_CR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_CR extends ListResourceBundle { +public class FormatData_es_CR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_DO.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_DO.java index 7ce3269676c..c8f1345b29d 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_DO.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_DO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_DO extends ListResourceBundle { +public class FormatData_es_DO extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_EC.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_EC.java index c17e649a96d..a5283df03f8 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_EC.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_EC.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_EC extends ListResourceBundle { +public class FormatData_es_EC extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_ES.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_ES.java index 06d4b30c164..15ad162b56e 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_ES.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_ES.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_ES extends ListResourceBundle { +public class FormatData_es_ES extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_GT.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_GT.java index dafe2846bf5..8e868b3f280 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_GT.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_GT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_GT extends ListResourceBundle { +public class FormatData_es_GT extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_HN.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_HN.java index 667eceb844b..3ddb5fca48d 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_HN.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_HN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_HN extends ListResourceBundle { +public class FormatData_es_HN extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_MX.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_MX.java index c63084dd4b1..19864b4c173 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_MX.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_MX.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_MX extends ListResourceBundle { +public class FormatData_es_MX extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_NI.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_NI.java index 3d210e6646d..f11f80de1cd 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_NI.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_NI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_NI extends ListResourceBundle { +public class FormatData_es_NI extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PA.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PA.java index 51e67086562..c149ba9f254 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PA.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_PA extends ListResourceBundle { +public class FormatData_es_PA extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PE.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PE.java index 2913a43d443..afa72f032eb 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PE.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_PE extends ListResourceBundle { +public class FormatData_es_PE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PR.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PR.java index 7440f2e5abc..f15271f83a4 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PR.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_PR extends ListResourceBundle { +public class FormatData_es_PR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PY.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PY.java index 7ab5dce4ed2..8b9b3bf595c 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PY.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_PY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_PY extends ListResourceBundle { +public class FormatData_es_PY extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_SV.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_SV.java index 9d9e946e704..ae98bf88ddf 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_SV.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_SV.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_SV extends ListResourceBundle { +public class FormatData_es_SV extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_US.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_US.java index fb8d11d5cc5..339d3adc755 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_US.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_US.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_US extends ListResourceBundle { +public class FormatData_es_US extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "AmPmMarkers", diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_UY.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_UY.java index 919245567f7..c2a4e7b1ce4 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_UY.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_UY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_UY extends ListResourceBundle { +public class FormatData_es_UY extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_VE.java b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_VE.java index 4bfececf2ed..507cc83cbaf 100644 --- a/jdk/src/share/classes/sun/text/resources/es/FormatData_es_VE.java +++ b/jdk/src/share/classes/sun/text/resources/es/FormatData_es_VE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.es; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_es_VE extends ListResourceBundle { +public class FormatData_es_VE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/es/JavaTimeSupplementary_es.java b/jdk/src/share/classes/sun/text/resources/es/JavaTimeSupplementary_es.java new file mode 100644 index 00000000000..002cb91e3f5 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/es/JavaTimeSupplementary_es.java @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.es; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_es extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "T1", + "T2", + "T3", + "T4", + } + }, + { "QuarterNames", + new String[] { + "1er trimestre", + "2\u00ba trimestre", + "3er trimestre", + "4\u00ba trimestre", + } + }, + { "QuarterNarrows", + new String[] { + "1T", + "2T", + "3T", + "4T", + } + }, + { "calendarname.buddhist", + "calendario budista" }, + { "calendarname.gregorian", + "calendario gregoriano" }, + { "calendarname.gregory", + "calendario gregoriano" }, + { "calendarname.islamic", + "calendario isl\u00e1mico" }, + { "calendarname.islamic-civil", + "calendario civil isl\u00e1mico" }, + { "calendarname.islamicc", + "calendario civil isl\u00e1mico" }, + { "calendarname.japanese", + "calendario japon\u00e9s" }, + { "calendarname.roc", + "calendario de la Rep\u00fablica de China" }, + { "field.dayperiod", + "periodo del d\u00eda" }, + { "field.era", + "era" }, + { "field.hour", + "hora" }, + { "field.minute", + "minuto" }, + { "field.month", + "mes" }, + { "field.second", + "segundo" }, + { "field.week", + "semana" }, + { "field.weekday", + "d\u00eda de la semana" }, + { "field.year", + "a\u00f1o" }, + { "field.zone", + "zona" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y GGGG", + "d 'de' MMMM 'de' y GGGG", + "dd/MM/y GGGG", + "dd/MM/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/y G", + "dd/MM/y G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/y G", + "dd/MM/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/y G", + "dd/MM/y GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "antes de Cristo", + "anno D\u00f3mini", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/y G", + "dd/MM/y GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "antes de Cristo", + "anno D\u00f3mini", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y GGGG", + "d 'de' MMMM 'de' y GGGG", + "dd/MM/y GGGG", + "dd/MM/y G", + } + }, + { "roc.Eras", + new String[] { + "antes de R.O.C.", + "", + } + }, + { "roc.short.Eras", + new String[] { + "antes de R.O.C.", + "", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/et/FormatData_et.java b/jdk/src/share/classes/sun/text/resources/et/FormatData_et.java index a68a22fc464..b7f70d02377 100644 --- a/jdk/src/share/classes/sun/text/resources/et/FormatData_et.java +++ b/jdk/src/share/classes/sun/text/resources/et/FormatData_et.java @@ -76,11 +76,11 @@ package sun.text.resources.et; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_et extends ListResourceBundle { +public class FormatData_et extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_et extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "V", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "p\u00fchap\u00e4ev", // Sunday @@ -157,6 +174,12 @@ public class FormatData_et extends ListResourceBundle { "m.a.j." } }, + { "short.Eras", + new String[] { + "e.m.a.", + "m.a.j.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -193,25 +216,6 @@ public class FormatData_et extends ListResourceBundle { "{1} {0}" // date-time pattern } }, - { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "calendarname.islamic-civil", "islami ilmalik kalender" }, - { "calendarname.islamicc", "islami ilmalik kalender" }, - { "calendarname.roc", "Hiina Vabariigi kalender" }, - { "calendarname.islamic", "islamikalender" }, - { "calendarname.buddhist", "budistlik kalender" }, - { "calendarname.japanese", "Jaapani kalender" }, - { "calendarname.gregorian", "Gregoriuse kalender" }, - { "calendarname.gregory", "Gregoriuse kalender" }, - { "field.era", "ajastu" }, - { "field.year", "aasta" }, - { "field.month", "kuu" }, - { "field.week", "n\u00e4dal" }, - { "field.weekday", "n\u00e4dalap\u00e4ev" }, - { "field.dayperiod", "enne/p\u00e4rast l\u00f5unat" }, - { "field.hour", "tund" }, - { "field.minute", "minut" }, - { "field.second", "sekund" }, - { "field.zone", "v\u00f6\u00f6nd" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/et/FormatData_et_EE.java b/jdk/src/share/classes/sun/text/resources/et/FormatData_et_EE.java index 602c92a5681..d6bffb985e3 100644 --- a/jdk/src/share/classes/sun/text/resources/et/FormatData_et_EE.java +++ b/jdk/src/share/classes/sun/text/resources/et/FormatData_et_EE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.et; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_et_EE extends ListResourceBundle { +public class FormatData_et_EE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/et/JavaTimeSupplementary_et.java b/jdk/src/share/classes/sun/text/resources/et/JavaTimeSupplementary_et.java new file mode 100644 index 00000000000..2c28fdb3a62 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/et/JavaTimeSupplementary_et.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.et; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_et extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "1. kvartal", + "2. kvartal", + "3. kvartal", + "4. kvartal", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "budistlik kalender" }, + { "calendarname.gregorian", + "Gregoriuse kalender" }, + { "calendarname.gregory", + "Gregoriuse kalender" }, + { "calendarname.islamic", + "islamikalender" }, + { "calendarname.islamic-civil", + "islami ilmalik kalender" }, + { "calendarname.islamicc", + "islami ilmalik kalender" }, + { "calendarname.japanese", + "Jaapani kalender" }, + { "calendarname.roc", + "Hiina Vabariigi kalender" }, + { "field.dayperiod", + "enne/p\u00e4rast l\u00f5unat" }, + { "field.era", + "ajastu" }, + { "field.hour", + "tund" }, + { "field.minute", + "minut" }, + { "field.month", + "kuu" }, + { "field.second", + "sekund" }, + { "field.week", + "n\u00e4dal" }, + { "field.weekday", + "n\u00e4dalap\u00e4ev" }, + { "field.year", + "aasta" }, + { "field.zone", + "v\u00f6\u00f6nd" }, + { "java.time.long.Eras", + new String[] { + "enne meie aega", + "meie aja j\u00e4rgi", + } + }, + { "java.time.short.Eras", + new String[] { + "e.m.a.", + "m.a.j.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi.java b/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi.java index a7b77a7e425..f80df887abf 100644 --- a/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi.java +++ b/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi.java @@ -76,11 +76,11 @@ package sun.text.resources.fi; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fi extends ListResourceBundle { +public class FormatData_fi extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -152,6 +152,23 @@ public class FormatData_fi extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "T", + "H", + "M", + "H", + "T", + "K", + "H", + "E", + "S", + "L", + "M", + "J", + "", + } + }, { "standalone.MonthNarrows", new String[] { "T", @@ -169,6 +186,24 @@ public class FormatData_fi extends ListResourceBundle { "", } }, + { "long.Eras", + new String[] { + "ennen Kristuksen syntym\u00e4\u00e4", + "j\u00e4lkeen Kristuksen syntym\u00e4n", + } + }, + { "Eras", + new String[] { + "eKr.", + "jKr.", + } + }, + { "narrow.Eras", + new String[] { + "eK", + "jK", + } + }, { "DayNames", new String[] { "sunnuntai", // Sunday @@ -180,6 +215,17 @@ public class FormatData_fi extends ListResourceBundle { "lauantai" // Saturday } }, + { "standalone.DayNames", + new String[] { + "sunnuntai", + "maanantai", + "tiistai", + "keskiviikko", + "torstai", + "perjantai", + "lauantai", + } + }, { "DayAbbreviations", new String[] { "su", // abb Sunday @@ -191,6 +237,17 @@ public class FormatData_fi extends ListResourceBundle { "la" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "su", + "ma", + "ti", + "ke", + "to", + "pe", + "la", + } + }, { "DayNarrows", new String[] { "S", @@ -236,14 +293,6 @@ public class FormatData_fi extends ListResourceBundle { "H:mm", // short time pattern } }, - { "cldr.DatePatterns", - new String[] { - "cccc, d. MMMM y", - "d. MMMM y", - "d.M.yyyy", - "d.M.yyyy", - } - }, { "DatePatterns", new String[] { "d. MMMM'ta 'yyyy", // full date pattern @@ -270,89 +319,6 @@ public class FormatData_fi extends ListResourceBundle { "ip.", } }, - { "cldr.buddhist.DatePatterns", - new String[] { - "cccc d. MMMM y G", - "d. MMMM y G", - "d.M.y G", - "d.M.y G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "cccc d. MMMM y G", - "d. MMMM y G", - "d.M.y G", - "d.M.y G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "cccc d. MMMM y G", - "d. MMMM y G", - "d.M.y G", - "d.M.y G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d. MMMM y GGGG", - "d. MMMM y GGGG", - "d.M.y GGGG", - "d.M.y GGGG", - } - }, - { "islamic.MonthNames", - new String[] { - "muharram", - "safar", - "rabi\u2019 al-awwal", - "rabi\u2019 al-akhir", - "d\u017eumada-l-ula", - "d\u017eumada-l-akhira", - "rad\u017eab", - "\u0161a\u2019ban", - "ramadan", - "\u0161awwal", - "dhu-l-qa\u2019da", - "dhu-l-hidd\u017ea", - "", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "cccc d. MMMM y G", - "d. MMMM y G", - "d.M.y G", - "d.M.y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d. MMMM y GGGG", - "d. MMMM y GGGG", - "d.M.y GGGG", - "d.M.y GGGG", - } - }, - { "calendarname.islamic-civil", "islamilainen siviilikalenteri" }, - { "calendarname.islamicc", "islamilainen siviilikalenteri" }, - { "calendarname.islamic", "islamilainen kalenteri" }, - { "calendarname.japanese", "japanilainen kalenteri" }, - { "calendarname.gregorian", "gregoriaaninen kalenteri" }, - { "calendarname.gregory", "gregoriaaninen kalenteri" }, - { "calendarname.roc", "Kiinan tasavallan kalenteri" }, - { "calendarname.buddhist", "buddhalainen kalenteri" }, - { "field.era", "aikakausi" }, - { "field.year", "vuosi" }, - { "field.month", "kuukausi" }, - { "field.week", "viikko" }, - { "field.weekday", "viikonp\u00e4iv\u00e4" }, - { "field.dayperiod", "vuorokaudenaika" }, - { "field.hour", "tunti" }, - { "field.minute", "minuutti" }, - { "field.second", "sekunti" }, - { "field.zone", "aikavy\u00f6hyke" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi_FI.java b/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi_FI.java index 335644d8885..ad2be2ca6e9 100644 --- a/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi_FI.java +++ b/jdk/src/share/classes/sun/text/resources/fi/FormatData_fi_FI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.fi; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fi_FI extends ListResourceBundle { +public class FormatData_fi_FI extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/fi/JavaTimeSupplementary_fi.java b/jdk/src/share/classes/sun/text/resources/fi/JavaTimeSupplementary_fi.java new file mode 100644 index 00000000000..e55d5950759 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/fi/JavaTimeSupplementary_fi.java @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.fi; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_fi extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1. nelj.", + "2. nelj.", + "3. nelj.", + "4. nelj.", + } + }, + { "QuarterNames", + new String[] { + "1. nelj\u00e4nnes", + "2. nelj\u00e4nnes", + "3. nelj\u00e4nnes", + "4. nelj\u00e4nnes", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "buddhalainen kalenteri" }, + { "calendarname.gregorian", + "gregoriaaninen kalenteri" }, + { "calendarname.gregory", + "gregoriaaninen kalenteri" }, + { "calendarname.islamic", + "islamilainen kalenteri" }, + { "calendarname.islamic-civil", + "islamilainen siviilikalenteri" }, + { "calendarname.islamicc", + "islamilainen siviilikalenteri" }, + { "calendarname.japanese", + "japanilainen kalenteri" }, + { "calendarname.roc", + "Kiinan tasavallan kalenteri" }, + { "field.dayperiod", + "vuorokaudenaika" }, + { "field.era", + "aikakausi" }, + { "field.hour", + "tunti" }, + { "field.minute", + "minuutti" }, + { "field.month", + "kuukausi" }, + { "field.second", + "sekunti" }, + { "field.week", + "viikko" }, + { "field.weekday", + "viikonp\u00e4iv\u00e4" }, + { "field.year", + "vuosi" }, + { "field.zone", + "aikavy\u00f6hyke" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d.M.y GGGG", + "d.M.y GGGG", + } + }, + { "islamic.MonthNames", + new String[] { + "muharram", + "safar", + "rabi\u2019 al-awwal", + "rabi\u2019 al-akhir", + "d\u017eumada-l-ula", + "d\u017eumada-l-akhira", + "rad\u017eab", + "\u0161a\u2019ban", + "ramadan", + "\u0161awwal", + "dhu-l-qa\u2019da", + "dhu-l-hidd\u017ea", + "", + } + }, + { "java.time.DatePatterns", + new String[] { + "cccc, d. MMMM y", + "d. MMMM y", + "d.M.yyyy", + "d.M.yyyy", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "cccc d. MMMM y G", + "d. MMMM y G", + "d.M.y G", + "d.M.y G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "cccc d. MMMM y G", + "d. MMMM y G", + "d.M.y G", + "d.M.y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "cccc d. MMMM y G", + "d. MMMM y G", + "d.M.y G", + "d.M.y G", + } + }, + { "java.time.long.Eras", + new String[] { + "ennen Kristuksen syntym\u00e4\u00e4", + "j\u00e4lkeen Kristuksen syntym\u00e4n", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "cccc d. MMMM y G", + "d. MMMM y G", + "d.M.y G", + "d.M.y G", + } + }, + { "java.time.short.Eras", + new String[] { + "eKr.", + "jKr.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d.M.y GGGG", + "d.M.y GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr.java b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr.java index ec3493700b7..7feee171002 100644 --- a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr.java +++ b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr.java @@ -76,11 +76,11 @@ package sun.text.resources.fr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fr extends ListResourceBundle { +public class FormatData_fr extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_fr extends ListResourceBundle { "" // abb mo month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "dimanche", // Sunday @@ -140,6 +157,17 @@ public class FormatData_fr extends ListResourceBundle { "sam." // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "dim.", + "lun.", + "mar.", + "mer.", + "jeu.", + "ven.", + "sam.", + } + }, { "DayNarrows", new String[] { "D", @@ -157,6 +185,30 @@ public class FormatData_fr extends ListResourceBundle { "ap. J.-C." } }, + { "short.Eras", + new String[] { + "av. J.-C.", + "ap. J.-C.", + } + }, + { "buddhist.Eras", + new String[] { + "BC", + "\u00e8re bouddhiste", + } + }, + { "buddhist.short.Eras", + new String[] { + "BC", + "\u00e8re b.", + } + }, + { "buddhist.narrow.Eras", + new String[] { + "BC", + "E.B.", + } + }, { "NumberPatterns", new String[] { "#,##0.###;-#,##0.###", // decimal pattern @@ -201,112 +253,6 @@ public class FormatData_fr extends ListResourceBundle { } }, { "DateTimePatternChars", "GaMjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM, y G", - "d/M/yyyy", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM, y G", - "d/M/y GGGGG", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM, y G", - "d/M/y GGGGG", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "d MMMM y GGGG", - "d MMM, y GGGG", - "d/M/y G", - } - }, - { "islamic.MonthNames", - new String[] { - "Mouharram", - "Safar", - "Rabi\u02bb-oul-Aououal", - "Rabi\u02bb-out-Tani", - "Djoumada-l-Oula", - "Djoumada-t-Tania", - "Radjab", - "Cha\u02bbban", - "Ramadan", - "Chaououal", - "Dou-l-Qa\u02bbda", - "Dou-l-Hidjja", - "", - } - }, - { "islamic.MonthAbbreviations", - new String[] { - "Mouh.", - "Saf.", - "Rabi\u02bb-oul-A.", - "Rabi\u02bb-out-T.", - "Djoum.-l-O.", - "Djoum.-t-T.", - "Radj.", - "Cha.", - "Ram.", - "Chaou.", - "Dou-l-Q.", - "Dou-l-H.", - "", - } - }, - { "islamic.Eras", - new String[] { - "", - "AH", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM, y G", - "d/M/y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "d MMMM y GGGG", - "d MMM, y GGGG", - "d/M/y GGGG", - } - }, - { "calendarname.islamic-civil", "Calendrier civil musulman" }, - { "calendarname.islamicc", "Calendrier civil musulman" }, - { "calendarname.islamic", "Calendrier musulman" }, - { "calendarname.japanese", "Calendrier japonais" }, - { "calendarname.gregorian", "Calendrier gr\u00e9gorien" }, - { "calendarname.gregory", "Calendrier gr\u00e9gorien" }, - { "calendarname.roc", "Calendrier r\u00e9publicain chinois" }, - { "calendarname.buddhist", "Calendrier bouddhiste" }, - { "field.era", "\u00e8re" }, - { "field.year", "ann\u00e9e" }, - { "field.month", "mois" }, - { "field.week", "semaine" }, - { "field.weekday", "jour de la semaine" }, - { "field.dayperiod", "cadran" }, - { "field.hour", "heure" }, - { "field.minute", "minute" }, - { "field.second", "seconde" }, - { "field.zone", "fuseau horaire" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_BE.java b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_BE.java index ce21b2c6750..8e7a542c9d1 100644 --- a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_BE.java +++ b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_BE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.fr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fr_BE extends ListResourceBundle { +public class FormatData_fr_BE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CA.java b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CA.java index be4e105832b..dd99afcfa88 100644 --- a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CA.java +++ b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.fr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fr_CA extends ListResourceBundle { +public class FormatData_fr_CA extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CH.java b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CH.java index ca5397eb0d8..f8cdcf1d85c 100644 --- a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CH.java +++ b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_CH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.fr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fr_CH extends ListResourceBundle { +public class FormatData_fr_CH extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_FR.java b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_FR.java index b9e43b559b6..09a8794d4ab 100644 --- a/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_FR.java +++ b/jdk/src/share/classes/sun/text/resources/fr/FormatData_fr_FR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.fr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_fr_FR extends ListResourceBundle { +public class FormatData_fr_FR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/fr/JavaTimeSupplementary_fr.java b/jdk/src/share/classes/sun/text/resources/fr/JavaTimeSupplementary_fr.java new file mode 100644 index 00000000000..bc7c9d7fa1d --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/fr/JavaTimeSupplementary_fr.java @@ -0,0 +1,264 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.fr; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_fr extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "T1", + "T2", + "T3", + "T4", + } + }, + { "QuarterNames", + new String[] { + "1er trimestre", + "2e trimestre", + "3e trimestre", + "4e trimestre", + } + }, + { "QuarterNarrows", + new String[] { + "T1", + "T2", + "T3", + "T4", + } + }, + { "calendarname.buddhist", + "Calendrier bouddhiste" }, + { "calendarname.gregorian", + "Calendrier gr\u00e9gorien" }, + { "calendarname.gregory", + "Calendrier gr\u00e9gorien" }, + { "calendarname.islamic", + "Calendrier musulman" }, + { "calendarname.islamic-civil", + "Calendrier civil musulman" }, + { "calendarname.islamicc", + "Calendrier civil musulman" }, + { "calendarname.japanese", + "Calendrier japonais" }, + { "calendarname.roc", + "Calendrier r\u00e9publicain chinois" }, + { "field.dayperiod", + "cadran" }, + { "field.era", + "\u00e8re" }, + { "field.hour", + "heure" }, + { "field.minute", + "minute" }, + { "field.month", + "mois" }, + { "field.second", + "seconde" }, + { "field.week", + "semaine" }, + { "field.weekday", + "jour de la semaine" }, + { "field.year", + "ann\u00e9e" }, + { "field.zone", + "fuseau horaire" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM, y GGGG", + "d/M/y GGGG", + } + }, + { "islamic.Eras", + new String[] { + "", + "AH", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "Mouh.", + "Saf.", + "Rabi\u02bb-oul-A.", + "Rabi\u02bb-out-T.", + "Djoum.-l-O.", + "Djoum.-t-T.", + "Radj.", + "Cha.", + "Ram.", + "Chaou.", + "Dou-l-Q.", + "Dou-l-H.", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "Mouharram", + "Safar", + "Rabi\u02bb-oul-Aououal", + "Rabi\u02bb-out-Tani", + "Djoumada-l-Oula", + "Djoumada-t-Tania", + "Radjab", + "Cha\u02bbban", + "Ramadan", + "Chaououal", + "Dou-l-Qa\u02bbda", + "Dou-l-Hidjja", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "AH", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM, y G", + "d/M/yyyy", + } + }, + { "java.time.buddhist.long.Eras", + new String[] { + "BC", + "\u00e8re bouddhiste", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "\u00e8re bouddhiste", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM, y G", + "d/M/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM, y G", + "d/M/y GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "avant J\u00e9sus-Christ", + "apr\u00e8s J\u00e9sus-Christ", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM, y G", + "d/M/y GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "BC", + "ap. J.-C.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM, y GGGG", + "d/M/y G", + } + }, + { "roc.Eras", + new String[] { + "avant RdC", + "RdC", + } + }, + { "roc.short.Eras", + new String[] { + "avant RdC", + "RdC", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga.java b/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga.java index f778affdbc2..fea8a7d1e1b 100644 --- a/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga.java +++ b/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.ga; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ga extends ListResourceBundle { +public class FormatData_ga extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", @@ -81,6 +100,23 @@ public class FormatData_ga extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "E", + "F", + "M", + "A", + "B", + "M", + "I", + "L", + "M", + "D", + "S", + "N", + "", + } + }, { "DayNames", new String[] { "D\u00e9 Domhnaigh", @@ -115,6 +151,12 @@ public class FormatData_ga extends ListResourceBundle { "AD", } }, + { "short.Eras", + new String[] { + "RC", + "AD", + } + }, { "NumberPatterns", new String[] { "#,##0.###", diff --git a/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga_IE.java b/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga_IE.java index 2109c0dabfa..993f6fa5b42 100644 --- a/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga_IE.java +++ b/jdk/src/share/classes/sun/text/resources/ga/FormatData_ga_IE.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.ga; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ga_IE extends ListResourceBundle { +public class FormatData_ga_IE extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "NumberPatterns", diff --git a/jdk/src/share/classes/sun/text/resources/ga/JavaTimeSupplementary_ga.java b/jdk/src/share/classes/sun/text/resources/ga/JavaTimeSupplementary_ga.java new file mode 100644 index 00000000000..931b60b14a9 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ga/JavaTimeSupplementary_ga.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ga; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ga extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "R1", + "R2", + "R3", + "R4", + } + }, + { "QuarterNames", + new String[] { + "1\u00fa r\u00e1ithe", + "2\u00fa r\u00e1ithe", + "3\u00fa r\u00e1ithe", + "4\u00fa r\u00e1ithe", + } + }, + { "java.time.short.Eras", + new String[] { + "RC", + "AD", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/hi/FormatData_hi_IN.java b/jdk/src/share/classes/sun/text/resources/hi/FormatData_hi_IN.java index 61711a0e322..97b5c0c8d60 100644 --- a/jdk/src/share/classes/sun/text/resources/hi/FormatData_hi_IN.java +++ b/jdk/src/share/classes/sun/text/resources/hi/FormatData_hi_IN.java @@ -67,15 +67,15 @@ package sun.text.resources.hi; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; /** * The locale elements for Hindi. * */ -public class FormatData_hi_IN extends ListResourceBundle { +public class FormatData_hi_IN extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -113,6 +113,23 @@ public class FormatData_hi_IN extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u091c", + "\u092b\u093c", + "\u092e\u093e", + "\u0905", + "\u092e", + "\u091c\u0942", + "\u091c\u0941", + "\u0905", + "\u0938\u093f", + "\u0905", + "\u0928", + "\u0926\u093f", + "", + } + }, { "DayNames", new String[] { "\u0930\u0935\u093f\u0935\u093e\u0930", // Sunday @@ -158,6 +175,12 @@ public class FormatData_hi_IN extends ListResourceBundle { "\u0938\u0928" } }, + { "short.Eras", + new String[] { + "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928", + } + }, { "NumberElements", new String[] { ".", // decimal separator @@ -195,24 +218,6 @@ public class FormatData_hi_IN extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "calendarname.islamic-civil", "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.islamicc", "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.roc", "\u091a\u0940\u0928\u0940 \u0917\u0923\u0924\u0902\u0924\u094d\u0930 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.islamic", "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.buddhist", "\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.japanese", "\u091c\u093e\u092a\u093e\u0928\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.gregorian", "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "calendarname.gregory", "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, - { "field.era", "\u092f\u0941\u0917" }, - { "field.year", "\u0935\u0930\u094d\u0937" }, - { "field.month", "\u092e\u093e\u0938" }, - { "field.week", "\u0938\u092a\u094d\u0924\u093e\u0939" }, - { "field.weekday", "\u0938\u092a\u094d\u0924\u093e\u0939 \u0915\u093e \u0926\u093f\u0928" }, - { "field.dayperiod", "\u0938\u092e\u092f \u0905\u0935\u0927\u093f" }, - { "field.hour", "\u0918\u0902\u091f\u093e" }, - { "field.minute", "\u092e\u093f\u0928\u091f" }, - { "field.second", "\u0938\u0947\u0915\u0947\u0902\u0921" }, - { "field.zone", "\u0915\u094d\u0937\u0947\u0924\u094d\u0930" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/hi/JavaTimeSupplementary_hi_IN.java b/jdk/src/share/classes/sun/text/resources/hi/JavaTimeSupplementary_hi_IN.java new file mode 100644 index 00000000000..e59acabd337 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/hi/JavaTimeSupplementary_hi_IN.java @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.hi; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_hi_IN extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterNames", + new String[] { + "\u0924\u093f\u092e\u093e\u0939\u0940", + "\u0926\u0942\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940", + "\u0924\u0940\u0938\u0930\u0940 \u0924\u093f\u092e\u093e\u0939\u0940", + "\u091a\u094c\u0925\u0940 \u0924\u093f\u092e\u093e\u0939\u0940", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.gregorian", + "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.gregory", + "\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.islamic", + "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.islamic-civil", + "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.islamicc", + "\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.japanese", + "\u091c\u093e\u092a\u093e\u0928\u0940 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "calendarname.roc", + "\u091a\u0940\u0928\u0940 \u0917\u0923\u0924\u0902\u0924\u094d\u0930 \u092a\u0902\u091a\u093e\u0902\u0917" }, + { "field.dayperiod", + "\u0938\u092e\u092f \u0905\u0935\u0927\u093f" }, + { "field.era", + "\u092f\u0941\u0917" }, + { "field.hour", + "\u0918\u0902\u091f\u093e" }, + { "field.minute", + "\u092e\u093f\u0928\u091f" }, + { "field.month", + "\u092e\u093e\u0938" }, + { "field.second", + "\u0938\u0947\u0915\u0947\u0902\u0921" }, + { "field.week", + "\u0938\u092a\u094d\u0924\u093e\u0939" }, + { "field.weekday", + "\u0938\u092a\u094d\u0924\u093e\u0939 \u0915\u093e \u0926\u093f\u0928" }, + { "field.year", + "\u0935\u0930\u094d\u0937" }, + { "field.zone", + "\u0915\u094d\u0937\u0947\u0924\u094d\u0930" }, + { "islamic.MonthNames", + new String[] { + "\u092e\u0941\u0939\u0930\u094d\u0930\u092e", + "\u0938\u092b\u0930", + "\u0930\u093e\u092c\u0940 \u092a\u094d\u0930\u0925\u092e", + "\u0930\u093e\u092c\u0940 \u0926\u094d\u0935\u093f\u0924\u0940\u092f", + "\u091c\u0941\u092e\u094d\u0921\u093e \u092a\u094d\u0930\u0925\u092e", + "\u091c\u0941\u092e\u094d\u0921\u093e \u0926\u094d\u0935\u093f\u0924\u0940\u092f", + "\u0930\u091c\u092c", + "\u0936\u093e\u0935\u0928", + "\u0930\u092e\u091c\u093e\u0928", + "\u0936\u0935\u094d\u0935\u094d\u0932", + "Dhu\u02bbl-Qi\u02bbdah", + "Dhu\u02bbl-Hijjah", + "", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u0938\u0928", + "\u092e\u0947\u091c\u0940", + "\u0924\u093e\u0908\u0936\u094b", + "\u0936\u094b\u0935\u093e", + "\u0939\u0947\u0908\u0938\u0947\u0908", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u0938\u0928", + "\u092e\u0947\u091c\u0940", + "\u0924\u093e\u0908\u0936\u094b", + "\u0936\u094b\u0935\u093e", + "\u0939\u0947\u0908\u0938\u0947\u0908", + } + }, + { "java.time.short.Eras", + new String[] { + "\u0908\u0938\u093e\u092a\u0942\u0930\u094d\u0935", + "\u0938\u0928", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr.java b/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr.java index 8d3a64d5c0c..cd50304a62f 100644 --- a/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr.java +++ b/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr.java @@ -76,11 +76,11 @@ package sun.text.resources.hr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_hr extends ListResourceBundle { +public class FormatData_hr extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -157,6 +157,23 @@ public class FormatData_hr extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "9.", + "10.", + "11.", + "12.", + "", + } + }, { "standalone.MonthNarrows", new String[] { "1.", @@ -185,6 +202,17 @@ public class FormatData_hr extends ListResourceBundle { "subota" // Saturday } }, + { "standalone.DayNames", + new String[] { + "nedjelja", + "ponedjeljak", + "utorak", + "srijeda", + "\u010detvrtak", + "petak", + "subota", + } + }, { "DayAbbreviations", new String[] { "ned", // abb Sunday @@ -196,6 +224,17 @@ public class FormatData_hr extends ListResourceBundle { "sub" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "ned", + "pon", + "uto", + "sri", + "\u010det", + "pet", + "sub", + } + }, { "DayNarrows", new String[] { "N", @@ -218,6 +257,18 @@ public class FormatData_hr extends ListResourceBundle { "s", } }, + { "Eras", + new String[] { + "Prije Krista", + "Poslije Krista", + } + }, + { "short.Eras", + new String[] { + "p. n. e.", + "A. D.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -255,58 +306,6 @@ public class FormatData_hr extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, d. MMMM y. G", - "d. MMMM y. G", - "d. M. y. G", - "d.M.y.", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, d. MMMM y. G", - "d. MMMM y. G", - "d. M. y. G", - "d.M.y. G", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d. MMMM y. G", - "d. MMMM y. G", - "d. M. y. G", - "d.M.y. G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d. MMMM y. GGGG", - "d. MMMM y. GGGG", - "d. M. y. GGGG", - "d.M.y. GGGG", - } - }, - { "calendarname.islamic-civil", "islamski civilni kalendar" }, - { "calendarname.islamicc", "islamski civilni kalendar" }, - { "calendarname.roc", "kalendar Republike Kine" }, - { "calendarname.islamic", "islamski kalendar" }, - { "calendarname.buddhist", "budisti\u010dki kalendar" }, - { "calendarname.japanese", "japanski kalendar" }, - { "calendarname.gregorian", "gregorijanski kalendar" }, - { "calendarname.gregory", "gregorijanski kalendar" }, - { "field.era", "era" }, - { "field.year", "godina" }, - { "field.month", "mjesec" }, - { "field.week", "tjedan" }, - { "field.weekday", "dan u tjednu" }, - { "field.dayperiod", "dio dana" }, - { "field.hour", "sat" }, - { "field.minute", "minuta" }, - { "field.second", "sekunda" }, - { "field.zone", "zona" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr_HR.java b/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr_HR.java index b99f1c4b467..5060f64cfb3 100644 --- a/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr_HR.java +++ b/jdk/src/share/classes/sun/text/resources/hr/FormatData_hr_HR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.hr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_hr_HR extends ListResourceBundle { +public class FormatData_hr_HR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/hr/JavaTimeSupplementary_hr.java b/jdk/src/share/classes/sun/text/resources/hr/JavaTimeSupplementary_hr.java new file mode 100644 index 00000000000..cd090390523 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/hr/JavaTimeSupplementary_hr.java @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.hr; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_hr extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1kv", + "2kv", + "3kv", + "4kv", + } + }, + { "QuarterNames", + new String[] { + "1. kvartal", + "2. kvartal", + "3. kvartal", + "4. kvartal", + } + }, + { "QuarterNarrows", + new String[] { + "1.", + "2.", + "3.", + "4.", + } + }, + { "calendarname.buddhist", + "budisti\u010dki kalendar" }, + { "calendarname.gregorian", + "gregorijanski kalendar" }, + { "calendarname.gregory", + "gregorijanski kalendar" }, + { "calendarname.islamic", + "islamski kalendar" }, + { "calendarname.islamic-civil", + "islamski civilni kalendar" }, + { "calendarname.islamicc", + "islamski civilni kalendar" }, + { "calendarname.japanese", + "japanski kalendar" }, + { "calendarname.roc", + "kalendar Republike Kine" }, + { "field.dayperiod", + "dio dana" }, + { "field.era", + "era" }, + { "field.hour", + "sat" }, + { "field.minute", + "minuta" }, + { "field.month", + "mjesec" }, + { "field.second", + "sekunda" }, + { "field.week", + "tjedan" }, + { "field.weekday", + "dan u tjednu" }, + { "field.year", + "godina" }, + { "field.zone", + "zona" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d. MMMM y. G", + "d. MMMM y. G", + "d. M. y. G", + "d.M.y.", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d. MMMM y. G", + "d. MMMM y. G", + "d. M. y. G", + "d.M.y. G", + } + }, + { "java.time.long.Eras", + new String[] { + "Prije Krista", + "Poslije Krista", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d. MMMM y. G", + "d. MMMM y. G", + "d. M. y. G", + "d.M.y. G", + } + }, + { "java.time.short.Eras", + new String[] { + "Prije Krista", + "Poslije Krista", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d. MMMM y. GGGG", + "d. MMMM y. GGGG", + "d. M. y. GGGG", + "d.M.y. GGGG", + } + }, + { "roc.Eras", + new String[] { + "prije R.O.C.", + "R.O.C.", + } + }, + { "roc.short.Eras", + new String[] { + "prije R.O.C.", + "R.O.C.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu.java b/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu.java index 8d2f4d8adb4..d5e53685114 100644 --- a/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu.java +++ b/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu.java @@ -76,11 +76,11 @@ package sun.text.resources.hu; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_hu extends ListResourceBundle { +public class FormatData_hu extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -101,6 +101,23 @@ public class FormatData_hu extends ListResourceBundle { "" // month 13 if applicable } }, + { "standalone.MonthNames", + new String[] { + "janu\u00e1r", + "febru\u00e1r", + "m\u00e1rcius", + "\u00e1prilis", + "m\u00e1jus", + "j\u00fanius", + "j\u00falius", + "augusztus", + "szeptember", + "okt\u00f3ber", + "november", + "december", + "", + } + }, { "MonthAbbreviations", new String[] { "jan.", // abb january @@ -118,6 +135,57 @@ public class FormatData_hu extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "jan.", + "febr.", + "m\u00e1rc.", + "\u00e1pr.", + "m\u00e1j.", + "j\u00fan.", + "j\u00fal.", + "aug.", + "szept.", + "okt.", + "nov.", + "dec.", + "", + } + }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "\u00c1", + "M", + "J", + "J", + "A", + "Sz", + "O", + "N", + "D", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "J", + "F", + "M", + "\u00c1", + "M", + "J", + "J", + "A", + "Sz", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "vas\u00e1rnap", // Sunday @@ -129,6 +197,17 @@ public class FormatData_hu extends ListResourceBundle { "szombat" // Saturday } }, + { "standalone.DayNames", + new String[] { + "vas\u00e1rnap", + "h\u00e9tf\u0151", + "kedd", + "szerda", + "cs\u00fct\u00f6rt\u00f6k", + "p\u00e9ntek", + "szombat", + } + }, { "DayAbbreviations", new String[] { "V", // abb Sunday @@ -140,6 +219,17 @@ public class FormatData_hu extends ListResourceBundle { "Szo" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "V", + "H", + "K", + "Sze", + "Cs", + "P", + "Szo", + } + }, { "DayNarrows", new String[] { "V", @@ -151,6 +241,17 @@ public class FormatData_hu extends ListResourceBundle { "Sz", } }, + { "standalone.DayNarrows", + new String[] { + "V", + "H", + "K", + "Sz", + "Cs", + "P", + "Sz", + } + }, { "AmPmMarkers", new String[] { "DE", // am marker @@ -163,6 +264,12 @@ public class FormatData_hu extends ListResourceBundle { "i.u." } }, + { "short.Eras", + new String[] { + "i. e.", + "i. sz.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -200,47 +307,18 @@ public class FormatData_hu extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "islamic.MonthNames", + { "buddhist.Eras", new String[] { - "Moharrem", - "Safar", - "R\u00e9bi el avvel", - "R\u00e9bi el accher", - "Dsem\u00e1di el avvel", - "Dsem\u00e1di el accher", - "Redseb", - "Sab\u00e1n", - "Ramad\u00e1n", - "Sevv\u00e1l", - "Ds\u00fcl kade", - "Ds\u00fcl hedse", - "", + "BC", + "BK", } }, - { "islamic.Eras", + { "buddhist.short.Eras", new String[] { - "", - "MF", + "BC", + "BK", } }, - { "calendarname.islamic-civil", "iszl\u00e1m civil napt\u00e1r" }, - { "calendarname.islamicc", "iszl\u00e1m civil napt\u00e1r" }, - { "calendarname.islamic", "iszl\u00e1m napt\u00e1r" }, - { "calendarname.japanese", "jap\u00e1n napt\u00e1r" }, - { "calendarname.gregorian", "Gergely-napt\u00e1r" }, - { "calendarname.gregory", "Gergely-napt\u00e1r" }, - { "calendarname.roc", "K\u00ednai k\u00f6zt\u00e1rsas\u00e1gi napt\u00e1r" }, - { "calendarname.buddhist", "buddhista napt\u00e1r" }, - { "field.era", "\u00e9ra" }, - { "field.year", "\u00e9v" }, - { "field.month", "h\u00f3nap" }, - { "field.week", "h\u00e9t" }, - { "field.weekday", "h\u00e9t napja" }, - { "field.dayperiod", "napszak" }, - { "field.hour", "\u00f3ra" }, - { "field.minute", "perc" }, - { "field.second", "m\u00e1sodperc" }, - { "field.zone", "z\u00f3na" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu_HU.java b/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu_HU.java index 5786409e24a..aff72bf3b81 100644 --- a/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu_HU.java +++ b/jdk/src/share/classes/sun/text/resources/hu/FormatData_hu_HU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.hu; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_hu_HU extends ListResourceBundle { +public class FormatData_hu_HU extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/hu/JavaTimeSupplementary_hu.java b/jdk/src/share/classes/sun/text/resources/hu/JavaTimeSupplementary_hu.java new file mode 100644 index 00000000000..78845bf290b --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/hu/JavaTimeSupplementary_hu.java @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.hu; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_hu extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "N1", + "N2", + "N3", + "N4", + } + }, + { "QuarterNames", + new String[] { + "I. negyed\u00e9v", + "II. negyed\u00e9v", + "III. negyed\u00e9v", + "IV. negyed\u00e9v", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "buddhista napt\u00e1r" }, + { "calendarname.gregorian", + "Gergely-napt\u00e1r" }, + { "calendarname.gregory", + "Gergely-napt\u00e1r" }, + { "calendarname.islamic", + "iszl\u00e1m napt\u00e1r" }, + { "calendarname.islamic-civil", + "iszl\u00e1m civil napt\u00e1r" }, + { "calendarname.islamicc", + "iszl\u00e1m civil napt\u00e1r" }, + { "calendarname.japanese", + "jap\u00e1n napt\u00e1r" }, + { "calendarname.roc", + "K\u00ednai k\u00f6zt\u00e1rsas\u00e1gi napt\u00e1r" }, + { "field.dayperiod", + "napszak" }, + { "field.era", + "\u00e9ra" }, + { "field.hour", + "\u00f3ra" }, + { "field.minute", + "perc" }, + { "field.month", + "h\u00f3nap" }, + { "field.second", + "m\u00e1sodperc" }, + { "field.week", + "h\u00e9t" }, + { "field.weekday", + "h\u00e9t napja" }, + { "field.year", + "\u00e9v" }, + { "field.zone", + "z\u00f3na" }, + { "islamic.DatePatterns", + new String[] { + "y. MMMM d., EEEE", + "y. MMMM d.", + "yyyy.MM.dd.", + "yyyy.MM.dd.", + } + }, + { "islamic.Eras", + new String[] { + "", + "MF", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "Muh.", + "Saf.", + "Rab. I", + "Rab. II", + "Jum. I", + "Jum. II", + "Raj.", + "Sha.", + "Ram.", + "Shaw.", + "Ds\u00fcl-Q.", + "Ds\u00fcl-H.", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "Moharrem", + "Safar", + "R\u00e9bi el avvel", + "R\u00e9bi el accher", + "Dsem\u00e1di el avvel", + "Dsem\u00e1di el accher", + "Redseb", + "Sab\u00e1n", + "Ramad\u00e1n", + "Sevv\u00e1l", + "Ds\u00fcl kade", + "Ds\u00fcl hedse", + "", + } + }, + { "islamic.MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "MF", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "BK", + } + }, + { "java.time.long.Eras", + new String[] { + "id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt", + "id\u0151sz\u00e1m\u00edt\u00e1sunk szerint", + } + }, + { "java.time.short.Eras", + new String[] { + "i.e.", + "i.u.", + } + }, + { "roc.Eras", + new String[] { + "R.O.C. el\u0151tt", + "", + } + }, + { "roc.short.Eras", + new String[] { + "R.O.C. el\u0151tt", + "", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/in/FormatData_in.java b/jdk/src/share/classes/sun/text/resources/in/FormatData_in.java index b99a9502702..4eb35408d76 100644 --- a/jdk/src/share/classes/sun/text/resources/in/FormatData_in.java +++ b/jdk/src/share/classes/sun/text/resources/in/FormatData_in.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.in; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_in extends ListResourceBundle { +public class FormatData_in extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", diff --git a/jdk/src/share/classes/sun/text/resources/in/FormatData_in_ID.java b/jdk/src/share/classes/sun/text/resources/in/FormatData_in_ID.java index c72751009aa..f7e28a9ee3c 100644 --- a/jdk/src/share/classes/sun/text/resources/in/FormatData_in_ID.java +++ b/jdk/src/share/classes/sun/text/resources/in/FormatData_in_ID.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.in; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_in_ID extends ListResourceBundle { +public class FormatData_in_ID extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "TimePatterns", diff --git a/jdk/src/share/classes/sun/text/resources/is/FormatData_is.java b/jdk/src/share/classes/sun/text/resources/is/FormatData_is.java index b9324a7bf5a..ffb2cb0bb47 100644 --- a/jdk/src/share/classes/sun/text/resources/is/FormatData_is.java +++ b/jdk/src/share/classes/sun/text/resources/is/FormatData_is.java @@ -76,11 +76,11 @@ package sun.text.resources.is; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_is extends ListResourceBundle { +public class FormatData_is extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_is extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "\u00c1", + "L", + "O", + "N", + "D", + "", + } + }, { "standalone.MonthNarrows", new String[] { "j", @@ -216,13 +233,6 @@ public class FormatData_is extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "calendarname.islamic-civil", "\u00cdslamskt borgaradagatal" }, - { "calendarname.islamicc", "\u00cdslamskt borgaradagatal" }, - { "calendarname.islamic", "\u00cdslamskt dagatal" }, - { "calendarname.buddhist", "B\u00fadd\u00edskt dagatal" }, - { "calendarname.japanese", "Japanskt dagatal" }, - { "calendarname.gregorian", "Gregor\u00edskt dagatal" }, - { "calendarname.gregory", "Gregor\u00edskt dagatal" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/is/FormatData_is_IS.java b/jdk/src/share/classes/sun/text/resources/is/FormatData_is_IS.java index af9be46e9d1..dd82870c7c0 100644 --- a/jdk/src/share/classes/sun/text/resources/is/FormatData_is_IS.java +++ b/jdk/src/share/classes/sun/text/resources/is/FormatData_is_IS.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.is; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_is_IS extends ListResourceBundle { +public class FormatData_is_IS extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/is/JavaTimeSupplementary_is.java b/jdk/src/share/classes/sun/text/resources/is/JavaTimeSupplementary_is.java new file mode 100644 index 00000000000..bc2c3272737 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/is/JavaTimeSupplementary_is.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.is; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_is extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "F1", + "F2", + "F3", + "F4", + } + }, + { "QuarterNames", + new String[] { + "1st fj\u00f3r\u00f0ungur", + "2nd fj\u00f3r\u00f0ungur", + "3rd fj\u00f3r\u00f0ungur", + "4th fj\u00f3r\u00f0ungur", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "B\u00fadd\u00edskt dagatal" }, + { "calendarname.gregorian", + "Gregor\u00edskt dagatal" }, + { "calendarname.gregory", + "Gregor\u00edskt dagatal" }, + { "calendarname.islamic", + "\u00cdslamskt dagatal" }, + { "calendarname.islamic-civil", + "\u00cdslamskt borgaradagatal" }, + { "calendarname.islamicc", + "\u00cdslamskt borgaradagatal" }, + { "calendarname.japanese", + "Japanskt dagatal" }, + { "calendarname.roc", + "k\u00ednverskt dagatal" }, + { "field.dayperiod", + "f.h./e.h." }, + { "field.era", + "t\u00edmabil" }, + { "field.hour", + "klukkustund" }, + { "field.minute", + "m\u00edn\u00fata" }, + { "field.month", + "m\u00e1nu\u00f0ur" }, + { "field.second", + "sek\u00fanda" }, + { "field.week", + "vika" }, + { "field.weekday", + "vikudagur" }, + { "field.year", + "\u00e1r" }, + { "field.zone", + "sv\u00e6\u00f0i" }, + { "java.time.short.Eras", + new String[] { + "fyrir Krist", + "eftir Krist", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/it/FormatData_it.java b/jdk/src/share/classes/sun/text/resources/it/FormatData_it.java index e3ca1d05fb3..4c75a09bed6 100644 --- a/jdk/src/share/classes/sun/text/resources/it/FormatData_it.java +++ b/jdk/src/share/classes/sun/text/resources/it/FormatData_it.java @@ -76,11 +76,11 @@ package sun.text.resources.it; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_it extends ListResourceBundle { +public class FormatData_it extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -135,6 +135,40 @@ public class FormatData_it extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "G", + "F", + "M", + "A", + "M", + "G", + "L", + "A", + "S", + "O", + "N", + "D", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "G", + "F", + "M", + "A", + "M", + "G", + "L", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "domenica", // Sunday @@ -146,6 +180,17 @@ public class FormatData_it extends ListResourceBundle { "sabato" // Saturday } }, + { "standalone.DayNames", + new String[] { + "Domenica", + "Luned\u00ec", + "Marted\u00ec", + "Mercoled\u00ec", + "Gioved\u00ec", + "Venerd\u00ec", + "Sabato", + } + }, { "DayAbbreviations", new String[] { "dom", // abb Sunday @@ -174,6 +219,12 @@ public class FormatData_it extends ListResourceBundle { "dopo Cristo" } }, + { "short.Eras", + new String[] { + "aC", + "dC", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -211,71 +262,6 @@ public class FormatData_it extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "dd MMMM y G", - "dd/MMM/y G", - "dd/MM/y G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "dd MMMM y G", - "dd/MMM/y G", - "dd/MM/y G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "dd MMMM y G", - "dd/MMM/y G", - "dd/MM/y G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "dd MMMM y GGGG", - "dd/MMM/y GGGG", - "dd/MM/y GGGG", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "dd MMMM y G", - "dd/MMM/y G", - "dd/MM/y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "dd MMMM y GGGG", - "dd/MMM/y GGGG", - "dd/MM/y GGGG", - } - }, - { "calendarname.islamic-civil", "calendario civile islamico" }, - { "calendarname.islamicc", "calendario civile islamico" }, - { "calendarname.islamic", "calendario islamico" }, - { "calendarname.buddhist", "calendario buddista" }, - { "calendarname.japanese", "calendario giapponese" }, - { "calendarname.gregorian", "calendario gregoriano" }, - { "calendarname.gregory", "calendario gregoriano" }, - { "field.era", "era" }, - { "field.year", "anno" }, - { "field.month", "mese" }, - { "field.week", "settimana" }, - { "field.weekday", "giorno della settimana" }, - { "field.dayperiod", "periodo del giorno" }, - { "field.hour", "ora" }, - { "field.minute", "minuto" }, - { "field.second", "secondo" }, - { "field.zone", "zona" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/it/FormatData_it_CH.java b/jdk/src/share/classes/sun/text/resources/it/FormatData_it_CH.java index 1858e245adc..def550612f5 100644 --- a/jdk/src/share/classes/sun/text/resources/it/FormatData_it_CH.java +++ b/jdk/src/share/classes/sun/text/resources/it/FormatData_it_CH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.it; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_it_CH extends ListResourceBundle { +public class FormatData_it_CH extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/it/FormatData_it_IT.java b/jdk/src/share/classes/sun/text/resources/it/FormatData_it_IT.java index 254ae81f125..5a9e54f80f3 100644 --- a/jdk/src/share/classes/sun/text/resources/it/FormatData_it_IT.java +++ b/jdk/src/share/classes/sun/text/resources/it/FormatData_it_IT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.it; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_it_IT extends ListResourceBundle { +public class FormatData_it_IT extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/it/JavaTimeSupplementary_it.java b/jdk/src/share/classes/sun/text/resources/it/JavaTimeSupplementary_it.java new file mode 100644 index 00000000000..692b3d70cde --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/it/JavaTimeSupplementary_it.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.it; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_it extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "T1", + "T2", + "T3", + "T4", + } + }, + { "QuarterNames", + new String[] { + "1o trimestre", + "2o trimestre", + "3o trimestre", + "4o trimestre", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "calendario buddista" }, + { "calendarname.gregorian", + "calendario gregoriano" }, + { "calendarname.gregory", + "calendario gregoriano" }, + { "calendarname.islamic", + "calendario islamico" }, + { "calendarname.islamic-civil", + "calendario civile islamico" }, + { "calendarname.islamicc", + "calendario civile islamico" }, + { "calendarname.japanese", + "calendario giapponese" }, + { "calendarname.roc", + "Calendario Minguo" }, + { "field.dayperiod", + "periodo del giorno" }, + { "field.era", + "era" }, + { "field.hour", + "ora" }, + { "field.minute", + "minuto" }, + { "field.month", + "mese" }, + { "field.second", + "secondo" }, + { "field.week", + "settimana" }, + { "field.weekday", + "giorno della settimana" }, + { "field.year", + "anno" }, + { "field.zone", + "zona" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "dd MMMM y GGGG", + "dd/MMM/y GGGG", + "dd/MM/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "dd MMMM y G", + "dd/MMM/y G", + "dd/MM/y G", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "EB", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "dd MMMM y G", + "dd/MMM/y G", + "dd/MM/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "dd MMMM y G", + "dd/MMM/y G", + "dd/MM/y G", + } + }, + { "java.time.long.Eras", + new String[] { + "a.C.", + "d.C", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "dd MMMM y G", + "dd/MMM/y G", + "dd/MM/y G", + } + }, + { "java.time.short.Eras", + new String[] { + "BC", + "dopo Cristo", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "dd MMMM y GGGG", + "dd/MMM/y GGGG", + "dd/MM/y GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw.java b/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw.java index 61d82fbcaaf..4e52da31e05 100644 --- a/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw.java +++ b/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw.java @@ -76,11 +76,11 @@ package sun.text.resources.iw; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_iw extends ListResourceBundle { +public class FormatData_iw extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -135,6 +135,23 @@ public class FormatData_iw extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, { "DayNames", new String[] { "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df", // Sunday @@ -185,6 +202,12 @@ public class FormatData_iw extends ListResourceBundle { "\u05dc\u05e4\u05e1\u05d4\"\u05e0" } }, + { "short.Eras", + new String[] { + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1", + "\u05dc\u05e1\u05d4\u05f4\u05e0", + } + }, { "TimePatterns", new String[] { "HH:mm:ss z", // full time pattern @@ -207,46 +230,6 @@ public class FormatData_iw extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "islamic.MonthNames", - new String[] { - "\u05de\u05d5\u05d7\u05e8\u05dd", - "\u05e1\u05e4\u05e8", - "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc", - "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9", - "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc", - "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9", - "\u05e8\u05d2\u05f3\u05d0\u05d1", - "\u05e9\u05e2\u05d1\u05d0\u05df", - "\u05e8\u05d0\u05de\u05d3\u05df", - "\u05e9\u05d5\u05d5\u05d0\u05dc", - "\u05d6\u05d5 \u05d0\u05dc-QI'DAH", - "\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4", - "", - } - }, - { "islamic.Eras", - new String[] { - "", - "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4", - } - }, - { "calendarname.islamic-civil", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" }, - { "calendarname.islamicc", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" }, - { "calendarname.islamic", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9" }, - { "calendarname.buddhist", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" }, - { "calendarname.japanese", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9" }, - { "calendarname.gregorian", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" }, - { "calendarname.gregory", "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" }, - { "field.era", "\u05ea\u05e7\u05d5\u05e4\u05d4" }, - { "field.year", "\u05e9\u05e0\u05d4" }, - { "field.month", "\u05d7\u05d5\u05d3\u05e9" }, - { "field.week", "\u05e9\u05d1\u05d5\u05e2" }, - { "field.weekday", "\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2" }, - { "field.dayperiod", "\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6" }, - { "field.hour", "\u05e9\u05e2\u05d4" }, - { "field.minute", "\u05d3\u05e7\u05d4" }, - { "field.second", "\u05e9\u05e0\u05d9\u05d9\u05d4" }, - { "field.zone", "\u05d0\u05d6\u05d5\u05e8" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw_IL.java b/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw_IL.java index 21e72ef9b4e..4605023d4f3 100644 --- a/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw_IL.java +++ b/jdk/src/share/classes/sun/text/resources/iw/FormatData_iw_IL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.iw; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_iw_IL extends ListResourceBundle { +public class FormatData_iw_IL extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw.java b/jdk/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw.java new file mode 100644 index 00000000000..ef18ac9f211 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw.java @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.iw; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_iw extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterNames", + new String[] { + "\u05e8\u05d1\u05e2\u05d5\u05df 1", + "\u05e8\u05d1\u05e2\u05d5\u05df 2", + "\u05e8\u05d1\u05e2\u05d5\u05df 3", + "\u05e8\u05d1\u05e2\u05d5\u05df 4", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" }, + { "calendarname.gregorian", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" }, + { "calendarname.gregory", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" }, + { "calendarname.islamic", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9" }, + { "calendarname.islamic-civil", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" }, + { "calendarname.islamicc", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" }, + { "calendarname.japanese", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9" }, + { "calendarname.roc", + "\u05dc\u05d5\u05d7 \u05d4\u05e9\u05e0\u05d4 \u05d4\u05e1\u05d9\u05e0\u05d9 Minguo" }, + { "field.dayperiod", + "\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6" }, + { "field.era", + "\u05ea\u05e7\u05d5\u05e4\u05d4" }, + { "field.hour", + "\u05e9\u05e2\u05d4" }, + { "field.minute", + "\u05d3\u05e7\u05d4" }, + { "field.month", + "\u05d7\u05d5\u05d3\u05e9" }, + { "field.second", + "\u05e9\u05e0\u05d9\u05d9\u05d4" }, + { "field.week", + "\u05e9\u05d1\u05d5\u05e2" }, + { "field.weekday", + "\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2" }, + { "field.year", + "\u05e9\u05e0\u05d4" }, + { "field.zone", + "\u05d0\u05d6\u05d5\u05e8" }, + { "islamic.Eras", + new String[] { + "", + "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4", + } + }, + { "islamic.MonthNames", + new String[] { + "\u05de\u05d5\u05d7\u05e8\u05dd", + "\u05e1\u05e4\u05e8", + "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc", + "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9", + "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc", + "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9", + "\u05e8\u05d2\u05f3\u05d0\u05d1", + "\u05e9\u05e2\u05d1\u05d0\u05df", + "\u05e8\u05d0\u05de\u05d3\u05df", + "\u05e9\u05d5\u05d5\u05d0\u05dc", + "\u05d6\u05d5 \u05d0\u05dc-QI'DAH", + "\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4", + } + }, + { "java.time.long.Eras", + new String[] { + "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4", + } + }, + { "java.time.short.Eras", + new String[] { + "\u05dc\u05e1\u05d4\"\u05e0", + "\u05dc\u05e4\u05e1\u05d4\"\u05e0", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw_IL.java b/jdk/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw_IL.java new file mode 100644 index 00000000000..bf6543fed3e --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/iw/JavaTimeSupplementary_iw_IL.java @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.iw; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_iw_IL extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterNames", + new String[] { + "\u05e8\u05d1\u05e2\u05d5\u05df 1", + "\u05e8\u05d1\u05e2\u05d5\u05df 2", + "\u05e8\u05d1\u05e2\u05d5\u05df 3", + "\u05e8\u05d1\u05e2\u05d5\u05df 4", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9" }, + { "calendarname.gregorian", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" }, + { "calendarname.gregory", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9" }, + { "calendarname.islamic", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9" }, + { "calendarname.islamic-civil", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" }, + { "calendarname.islamicc", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9" }, + { "calendarname.japanese", + "\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9" }, + { "calendarname.roc", + "\u05dc\u05d5\u05d7 \u05d4\u05e9\u05e0\u05d4 \u05d4\u05e1\u05d9\u05e0\u05d9 Minguo" }, + { "field.dayperiod", + "\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6" }, + { "field.era", + "\u05ea\u05e7\u05d5\u05e4\u05d4" }, + { "field.hour", + "\u05e9\u05e2\u05d4" }, + { "field.minute", + "\u05d3\u05e7\u05d4" }, + { "field.month", + "\u05d7\u05d5\u05d3\u05e9" }, + { "field.second", + "\u05e9\u05e0\u05d9\u05d9\u05d4" }, + { "field.week", + "\u05e9\u05d1\u05d5\u05e2" }, + { "field.weekday", + "\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2" }, + { "field.year", + "\u05e9\u05e0\u05d4" }, + { "field.zone", + "\u05d0\u05d6\u05d5\u05e8" }, + { "islamic.Eras", + new String[] { + "", + "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4", + } + }, + { "islamic.MonthNames", + new String[] { + "\u05de\u05d5\u05d7\u05e8\u05dd", + "\u05e1\u05e4\u05e8", + "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc", + "\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9", + "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc", + "\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9", + "\u05e8\u05d2\u05f3\u05d0\u05d1", + "\u05e9\u05e2\u05d1\u05d0\u05df", + "\u05e8\u05d0\u05de\u05d3\u05df", + "\u05e9\u05d5\u05d5\u05d0\u05dc", + "\u05d6\u05d5 \u05d0\u05dc-QI'DAH", + "\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4", + } + }, + { "java.time.long.Eras", + new String[] { + "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4", + "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4", + } + }, + { "java.time.short.Eras", + new String[] { + "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1", + "\u05dc\u05e1\u05d4\u05f4\u05e0", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja.java b/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja.java index 53eba9df55d..591cd35cb49 100644 --- a/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja.java +++ b/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja.java @@ -76,11 +76,11 @@ package sun.text.resources.ja; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ja extends ListResourceBundle { +public class FormatData_ja extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -182,16 +182,7 @@ public class FormatData_ja extends ListResourceBundle { "\u4ecf\u66a6", // Butsureki } }, - { "cldr.buddhist.DatePatterns", - new String[] { - "GGGGy\u5e74M\u6708d\u65e5EEEE", - "GGGGy\u5e74M\u6708d\u65e5", - "Gy/MM/dd", - "Gy/MM/dd", - } - }, { "japanese.Eras", japaneseEras }, - { "cldr.japanese.short.Eras", japaneseEras }, { "japanese.FirstYear", new String[] { // first year name "\u5143", // "Gan"-nen @@ -233,14 +224,6 @@ public class FormatData_ja extends ListResourceBundle { "{1} {0}" // date-time pattern } }, - { "cldr.japanese.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy\u5e74M\u6708d\u65e5", - "Gyy/MM/dd", - } - }, { "japanese.DatePatterns", new String[] { "GGGGyyyy'\u5e74'M'\u6708'd'\u65e5'", // full date pattern @@ -263,42 +246,6 @@ public class FormatData_ja extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy/MM/dd", - "Gy/MM/dd", - } - }, - { "roc.DatePatterns", - new String[] { - "GGGGy\u5e74M\u6708d\u65e5EEEE", - "GGGGy\u5e74M\u6708d\u65e5", - "GGGGy/MM/dd", - "GGGGy/MM/dd", - } - }, - { "calendarname.islamic-civil", "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" }, - { "calendarname.islamicc", "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" }, - { "calendarname.islamic", "\u30a4\u30b9\u30e9\u30e0\u66a6" }, - { "calendarname.japanese", "\u548c\u66a6" }, - { "calendarname.gregorian", "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" }, - { "calendarname.gregory", "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" }, - { "calendarname.roc", "\u4e2d\u83ef\u6c11\u56fd\u66a6" }, - { "calendarname.buddhist", "\u30bf\u30a4\u4ecf\u6559\u66a6" }, - { "field.era", "\u6642\u4ee3" }, - { "field.year", "\u5e74" }, - { "field.month", "\u6708" }, - { "field.week", "\u9031" }, - { "field.weekday", "\u66dc\u65e5" }, - { "field.dayperiod", "\u5348\u524d/\u5348\u5f8c" }, - { "field.hour", "\u6642" }, - { "field.minute", "\u5206" }, - { "field.second", "\u79d2" }, - { "field.zone", "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja_JP.java b/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja_JP.java index a7d2622d1f4..19875a2cd7d 100644 --- a/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja_JP.java +++ b/jdk/src/share/classes/sun/text/resources/ja/FormatData_ja_JP.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.ja; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ja_JP extends ListResourceBundle { +public class FormatData_ja_JP extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ja/JavaTimeSupplementary_ja.java b/jdk/src/share/classes/sun/text/resources/ja/JavaTimeSupplementary_ja.java new file mode 100644 index 00000000000..851c1d8918f --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ja/JavaTimeSupplementary_ja.java @@ -0,0 +1,254 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ja; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ja extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "\u7b2c1\u56db\u534a\u671f", + "\u7b2c2\u56db\u534a\u671f", + "\u7b2c3\u56db\u534a\u671f", + "\u7b2c4\u56db\u534a\u671f", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u30bf\u30a4\u4ecf\u6559\u66a6" }, + { "calendarname.gregorian", + "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" }, + { "calendarname.gregory", + "\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6]" }, + { "calendarname.islamic", + "\u30a4\u30b9\u30e9\u30e0\u66a6" }, + { "calendarname.islamic-civil", + "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" }, + { "calendarname.islamicc", + "\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6" }, + { "calendarname.japanese", + "\u548c\u66a6" }, + { "calendarname.roc", + "\u4e2d\u83ef\u6c11\u56fd\u66a6" }, + { "field.dayperiod", + "\u5348\u524d/\u5348\u5f8c" }, + { "field.era", + "\u6642\u4ee3" }, + { "field.hour", + "\u6642" }, + { "field.minute", + "\u5206" }, + { "field.month", + "\u6708" }, + { "field.second", + "\u79d2" }, + { "field.week", + "\u9031" }, + { "field.weekday", + "\u66dc\u65e5" }, + { "field.year", + "\u5e74" }, + { "field.zone", + "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3" }, + { "islamic.MonthAbbreviations", + new String[] { + "\u30e0\u30cf\u30c3\u30e9\u30e0", + "\u30b5\u30d5\u30a2\u30eb", + "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb", + "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc", + "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb", + "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc", + "\u30e9\u30b8\u30e3\u30d6", + "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3", + "\u30e9\u30de\u30c0\u30fc\u30f3", + "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb", + "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0", + "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "\u30e0\u30cf\u30c3\u30e9\u30e0", + "\u30b5\u30d5\u30a2\u30eb", + "\u30e9\u30d3\u30fc\u30fb\u30a6\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb", + "\u30e9\u30d3\u30fc\u30fb\u30a6\u30c3\u30fb\u30b5\u30fc\u30cb\u30fc", + "\u30b8\u30e5\u30de\u30fc\u30c0\u30eb\u30fb\u30a2\u30a6\u30ef\u30eb", + "\u30b8\u30e5\u30de\u30fc\u30c0\u30c3\u30b5\u30fc\u30cb\u30fc", + "\u30e9\u30b8\u30e3\u30d6", + "\u30b7\u30e3\u30a2\u30d0\u30fc\u30f3", + "\u30e9\u30de\u30c0\u30fc\u30f3", + "\u30b7\u30e3\u30a6\u30ef\u30fc\u30eb", + "\u30ba\u30eb\u30fb\u30ab\u30a4\u30c0", + "\u30ba\u30eb\u30fb\u30d2\u30c3\u30b8\u30e3", + "", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "Gy/MM/dd", + "Gy/MM/dd", + } + }, + { "java.time.buddhist.long.Eras", + new String[] { + "BC", + "\u4ecf\u66a6", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "\u7d00\u5143\u524d", + "\u4ecf\u66a6", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "Gy'\u5e74'M'\u6708'd'\u65e5'", + "GGGGGy.MM.dd", + "GGGGGy.MM.dd", + "GGGGGy.MM.dd", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u897f\u66a6", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u897f\u66a6", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, + { "java.time.long.Eras", + new String[] { + "\u7d00\u5143\u524d", + "\u897f\u66a6", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy/MM/dd", + "Gy/MM/dd", + } + }, + { "java.time.short.Eras", + new String[] { + "\u7d00\u5143\u524d", + "\u897f\u66a6", + } + }, + { "roc.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy/MM/dd", + "GGGGy/MM/dd", + } + }, + { "roc.Eras", + new String[] { + "\u6c11\u56fd\u524d", + "\u6c11\u56fd", + } + }, + { "roc.short.Eras", + new String[] { + "\u6c11\u56fd\u524d", + "\u6c11\u56fd", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko.java b/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko.java index 15872b2ede5..4483ad2e948 100644 --- a/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko.java +++ b/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko.java @@ -76,11 +76,11 @@ package sun.text.resources.ko; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ko extends ListResourceBundle { +public class FormatData_ko extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -123,6 +123,23 @@ public class FormatData_ko extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "1\uc6d4", + "2\uc6d4", + "3\uc6d4", + "4\uc6d4", + "5\uc6d4", + "6\uc6d4", + "7\uc6d4", + "8\uc6d4", + "9\uc6d4", + "10\uc6d4", + "11\uc6d4", + "12\uc6d4", + "", + } + }, { "DayNames", new String[] { "\uc77c\uc694\uc77c", // Sunday @@ -156,6 +173,27 @@ public class FormatData_ko extends ListResourceBundle { "\ud1a0", } }, + { "Eras", + new String[] { + "\uae30\uc6d0\uc804", + "\uc11c\uae30", + } + }, + { "buddhist.Eras", + new String[] { + "BC", + "\ubd88\uae30", + } + }, + { "japanese.Eras", + new String[] { + "\uc11c\uae30", + "\uba54\uc774\uc9c0", + "\ub2e4\uc774\uc1fc", + "\uc1fc\uc640", + "\ud5e4\uc774\uc138\uc774", + } + }, { "AmPmMarkers", new String[] { "\uc624\uc804", // am marker @@ -183,34 +221,7 @@ public class FormatData_ko extends ListResourceBundle { "{1} {0}" // date-time pattern } }, - { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "G y\ub144 M\uc6d4 d\uc77c EEEE", - "G y\ub144 M\uc6d4 d\uc77c", - "G y. M. d", - "G y. M. d", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "G y\ub144 M\uc6d4 d\uc77c EEEE", - "G y\ub144 M\uc6d4 d\uc77c", - "G y. M. d", - "G y. M. d", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "G y\ub144 M\uc6d4 d\uc77c EEEE", - "G y\ub144 M\uc6d4 d\uc77c", - "G y. M. d", - "G y. M. d", - } - }, - { "roc.DatePatterns", + { "buddhist.DatePatterns", new String[] { "GGGG y\ub144 M\uc6d4 d\uc77c EEEE", "GGGG y\ub144 M\uc6d4 d\uc77c", @@ -218,24 +229,15 @@ public class FormatData_ko extends ListResourceBundle { "GGGG y. M. d", } }, - { "calendarname.islamic-civil", "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" }, - { "calendarname.islamicc", "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" }, - { "calendarname.islamic", "\uc774\uc2ac\ub78c\ub825" }, - { "calendarname.japanese", "\uc77c\ubcf8\ub825" }, - { "calendarname.gregorian", "\ud0dc\uc591\ub825" }, - { "calendarname.gregory", "\ud0dc\uc591\ub825" }, - { "calendarname.roc", "\ub300\ub9cc\ub825" }, - { "calendarname.buddhist", "\ubd88\uad50\ub825" }, - { "field.era", "\uc5f0\ud638" }, - { "field.year", "\ub144" }, - { "field.month", "\uc6d4" }, - { "field.week", "\uc8fc" }, - { "field.weekday", "\uc694\uc77c" }, - { "field.dayperiod", "\uc624\uc804/\uc624\ud6c4" }, - { "field.hour", "\uc2dc" }, - { "field.minute", "\ubd84" }, - { "field.second", "\ucd08" }, - { "field.zone", "\uc2dc\uac04\ub300" }, + { "japanese.DatePatterns", + new String[] { + "GGGG y\ub144 M\uc6d4 d\uc77c EEEE", + "GGGG y\ub144 M\uc6d4 d\uc77c", + "GGGG y. M. d", + "GGGG y. M. d", + } + }, + { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko_KR.java b/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko_KR.java index 4108fec6640..809f58466ba 100644 --- a/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko_KR.java +++ b/jdk/src/share/classes/sun/text/resources/ko/FormatData_ko_KR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.ko; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ko_KR extends ListResourceBundle { +public class FormatData_ko_KR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ko/JavaTimeSupplementary_ko.java b/jdk/src/share/classes/sun/text/resources/ko/JavaTimeSupplementary_ko.java new file mode 100644 index 00000000000..7435b6d7213 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ko/JavaTimeSupplementary_ko.java @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ko; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ko extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1\ubd84\uae30", + "2\ubd84\uae30", + "3\ubd84\uae30", + "4\ubd84\uae30", + } + }, + { "QuarterNames", + new String[] { + "\uc81c 1/4\ubd84\uae30", + "\uc81c 2/4\ubd84\uae30", + "\uc81c 3/4\ubd84\uae30", + "\uc81c 4/4\ubd84\uae30", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\ubd88\uad50\ub825" }, + { "calendarname.gregorian", + "\ud0dc\uc591\ub825" }, + { "calendarname.gregory", + "\ud0dc\uc591\ub825" }, + { "calendarname.islamic", + "\uc774\uc2ac\ub78c\ub825" }, + { "calendarname.islamic-civil", + "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" }, + { "calendarname.islamicc", + "\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825" }, + { "calendarname.japanese", + "\uc77c\ubcf8\ub825" }, + { "calendarname.roc", + "\ub300\ub9cc\ub825" }, + { "field.dayperiod", + "\uc624\uc804/\uc624\ud6c4" }, + { "field.era", + "\uc5f0\ud638" }, + { "field.hour", + "\uc2dc" }, + { "field.minute", + "\ubd84" }, + { "field.month", + "\uc6d4" }, + { "field.second", + "\ucd08" }, + { "field.week", + "\uc8fc" }, + { "field.weekday", + "\uc694\uc77c" }, + { "field.year", + "\ub144" }, + { "field.zone", + "\uc2dc\uac04\ub300" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "G y\ub144 M\uc6d4 d\uc77c EEEE", + "G y\ub144 M\uc6d4 d\uc77c", + "G y. M. d", + "G y. M. d", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "\ubd88\uae30", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "G y\ub144 M\uc6d4 d\uc77c EEEE", + "G y\ub144 M\uc6d4 d\uc77c", + "G y. M. d", + "G y. M. d", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\uc11c\uae30", + "\uba54\uc774\uc9c0", + "\ub2e4\uc774\uc1fc", + "\uc1fc\uc640", + "\ud5e4\uc774\uc138\uc774", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\uc11c\uae30", + "\uba54\uc774\uc9c0", + "\ub2e4\uc774\uc1fc", + "\uc1fc\uc640", + "\ud5e4\uc774\uc138\uc774", + } + }, + { "java.time.long.Eras", + new String[] { + "\uc11c\ub825\uae30\uc6d0\uc804", + "\uc11c\ub825\uae30\uc6d0", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "G y\ub144 M\uc6d4 d\uc77c EEEE", + "G y\ub144 M\uc6d4 d\uc77c", + "G y. M. d", + "G y. M. d", + } + }, + { "java.time.short.Eras", + new String[] { + "\uae30\uc6d0\uc804", + "\uc11c\uae30", + } + }, + { "roc.DatePatterns", + new String[] { + "GGGG y\ub144 M\uc6d4 d\uc77c EEEE", + "GGGG y\ub144 M\uc6d4 d\uc77c", + "GGGG y. M. d", + "GGGG y. M. d", + } + }, + { "roc.Eras", + new String[] { + "\uc911\ud654\ubbfc\uad6d\uc804", + "\uc911\ud654\ubbfc\uad6d", + } + }, + { "roc.short.Eras", + new String[] { + "\uc911\ud654\ubbfc\uad6d\uc804", + "\uc911\ud654\ubbfc\uad6d", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt.java b/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt.java index 90b740cd2e0..20a61db41e3 100644 --- a/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt.java +++ b/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt.java @@ -76,11 +76,11 @@ package sun.text.resources.lt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_lt extends ListResourceBundle { +public class FormatData_lt extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -135,6 +135,40 @@ public class FormatData_lt extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "Saus.", + "Vas.", + "Kov.", + "Bal.", + "Geg.", + "Bir.", + "Liep.", + "Rugp.", + "Rugs.", + "Spal.", + "Lapkr.", + "Gruod.", + "", + } + }, + { "MonthNarrows", + new String[] { + "S", + "V", + "K", + "B", + "G", + "B", + "L", + "R", + "R", + "S", + "L", + "G", + "", + } + }, { "standalone.MonthNarrows", new String[] { "S", @@ -163,6 +197,17 @@ public class FormatData_lt extends ListResourceBundle { "\u0160e\u0161tadienis" // Saturday } }, + { "standalone.DayNames", + new String[] { + "sekmadienis", + "pirmadienis", + "antradienis", + "tre\u010diadienis", + "ketvirtadienis", + "penktadienis", + "\u0161e\u0161tadienis", + } + }, { "DayAbbreviations", new String[] { "Sk", // abb Sunday @@ -174,6 +219,17 @@ public class FormatData_lt extends ListResourceBundle { "\u0160t" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "Sk", + "Pr", + "An", + "Tr", + "Kt", + "Pn", + "\u0160t", + } + }, { "DayNarrows", new String[] { "S", @@ -202,6 +258,12 @@ public class FormatData_lt extends ListResourceBundle { "po.Kr." } }, + { "short.Eras", + new String[] { + "pr. Kr.", + "po Kr.", + } + }, { "NumberElements", new String[] { ",", // decimal separator @@ -239,32 +301,6 @@ public class FormatData_lt extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "y G, MMMM d, EEEE", - "G y MMMM d", - "G y MMM d", - "GGGGG yyyy-MM-dd", - } - }, - { "calendarname.islamic-civil", "Pilietinis islamo kalendorius" }, - { "calendarname.islamicc", "Pilietinis islamo kalendorius" }, - { "calendarname.islamic", "Islamo kalendorius" }, - { "calendarname.japanese", "Japon\u0173 kalendorius" }, - { "calendarname.gregorian", "Grigaliaus kalendorius" }, - { "calendarname.gregory", "Grigaliaus kalendorius" }, - { "calendarname.roc", "Kinijos Respublikos kalendorius" }, - { "calendarname.buddhist", "Budist\u0173 kalendorius" }, - { "field.era", "era" }, - { "field.year", "metai" }, - { "field.month", "m\u0117nuo" }, - { "field.week", "savait\u0117" }, - { "field.weekday", "savait\u0117s diena" }, - { "field.dayperiod", "dienos metas" }, - { "field.hour", "valanda" }, - { "field.minute", "minut\u0117" }, - { "field.second", "sekund\u0117" }, - { "field.zone", "laiko juosta" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt_LT.java b/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt_LT.java index a30db3fdc20..5127cac5032 100644 --- a/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt_LT.java +++ b/jdk/src/share/classes/sun/text/resources/lt/FormatData_lt_LT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.lt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_lt_LT extends ListResourceBundle { +public class FormatData_lt_LT extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/lt/JavaTimeSupplementary_lt.java b/jdk/src/share/classes/sun/text/resources/lt/JavaTimeSupplementary_lt.java new file mode 100644 index 00000000000..bebc6b13c37 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/lt/JavaTimeSupplementary_lt.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.lt; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_lt extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "I k.", + "II k.", + "III k.", + "IV ketv.", + } + }, + { "QuarterNames", + new String[] { + "I ketvirtis", + "II ketvirtis", + "III ketvirtis", + "IV ketvirtis", + } + }, + { "QuarterNarrows", + new String[] { + "I", + "II", + "3", + "IV", + } + }, + { "calendarname.buddhist", + "Budist\u0173 kalendorius" }, + { "calendarname.gregorian", + "Grigaliaus kalendorius" }, + { "calendarname.gregory", + "Grigaliaus kalendorius" }, + { "calendarname.islamic", + "Islamo kalendorius" }, + { "calendarname.islamic-civil", + "Pilietinis islamo kalendorius" }, + { "calendarname.islamicc", + "Pilietinis islamo kalendorius" }, + { "calendarname.japanese", + "Japon\u0173 kalendorius" }, + { "calendarname.roc", + "Kinijos Respublikos kalendorius" }, + { "field.dayperiod", + "dienos metas" }, + { "field.era", + "era" }, + { "field.hour", + "valanda" }, + { "field.minute", + "minut\u0117" }, + { "field.month", + "m\u0117nuo" }, + { "field.second", + "sekund\u0117" }, + { "field.week", + "savait\u0117" }, + { "field.weekday", + "savait\u0117s diena" }, + { "field.year", + "metai" }, + { "field.zone", + "laiko juosta" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "y G, MMMM d, EEEE", + "G y MMMM d", + "G y MMM d", + "GGGGG yyyy-MM-dd", + } + }, + { "java.time.long.Eras", + new String[] { + "prie\u0161 Krist\u0173", + "po Kristaus", + } + }, + { "java.time.short.Eras", + new String[] { + "pr.Kr.", + "po.Kr.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv.java b/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv.java index 208257a7638..fbba0219f58 100644 --- a/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv.java +++ b/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv.java @@ -76,11 +76,11 @@ package sun.text.resources.lv; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_lv extends ListResourceBundle { +public class FormatData_lv extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -135,6 +135,23 @@ public class FormatData_lv extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "sv\u0113tdiena", // Sunday @@ -211,41 +228,6 @@ public class FormatData_lv extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "islamic.MonthNames", - new String[] { - "muharams", - "safars", - "1. rab\u012b", - "2. rab\u012b", - "1. d\u017eum\u0101d\u0101", - "2. d\u017eum\u0101d\u0101", - "rad\u017eabs", - "\u0161abans", - "ramad\u0101ns", - "\u0161auvals", - "du al-kid\u0101", - "du al-hid\u017e\u0101", - "", - } - }, - { "calendarname.islamic-civil", "isl\u0101ma pilso\u0146u kalend\u0101rs" }, - { "calendarname.islamicc", "isl\u0101ma pilso\u0146u kalend\u0101rs" }, - { "calendarname.islamic", "isl\u0101ma kalend\u0101rs" }, - { "calendarname.japanese", "jap\u0101\u0146u kalend\u0101rs" }, - { "calendarname.gregorian", "Gregora kalend\u0101rs" }, - { "calendarname.gregory", "Gregora kalend\u0101rs" }, - { "calendarname.roc", "\u0136\u012bnas Republikas kalend\u0101rs" }, - { "calendarname.buddhist", "budistu kalend\u0101rs" }, - { "field.era", "\u0113ra" }, - { "field.year", "Gads" }, - { "field.month", "M\u0113nesis" }, - { "field.week", "Ned\u0113\u013ca" }, - { "field.weekday", "Ned\u0113\u013cas diena" }, - { "field.dayperiod", "Dayperiod" }, - { "field.hour", "Stundas" }, - { "field.minute", "Min\u016btes" }, - { "field.second", "Sekundes" }, - { "field.zone", "Josla" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv_LV.java b/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv_LV.java index f9940bb39c4..bffe5b8cd3e 100644 --- a/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv_LV.java +++ b/jdk/src/share/classes/sun/text/resources/lv/FormatData_lv_LV.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.lv; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_lv_LV extends ListResourceBundle { +public class FormatData_lv_LV extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/lv/JavaTimeSupplementary_lv.java b/jdk/src/share/classes/sun/text/resources/lv/JavaTimeSupplementary_lv.java new file mode 100644 index 00000000000..f721b73553b --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/lv/JavaTimeSupplementary_lv.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.lv; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_lv extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "C1", + "C2", + "C3", + "C4", + } + }, + { "QuarterNames", + new String[] { + "1. ceturksnis", + "2. ceturksnis", + "3. ceturksnis", + "4. ceturksnis", + } + }, + { "QuarterNarrows", + new String[] { + "1.", + "2.", + "3.", + "4.", + } + }, + { "calendarname.buddhist", + "budistu kalend\u0101rs" }, + { "calendarname.gregorian", + "Gregora kalend\u0101rs" }, + { "calendarname.gregory", + "Gregora kalend\u0101rs" }, + { "calendarname.islamic", + "isl\u0101ma kalend\u0101rs" }, + { "calendarname.islamic-civil", + "isl\u0101ma pilso\u0146u kalend\u0101rs" }, + { "calendarname.islamicc", + "isl\u0101ma pilso\u0146u kalend\u0101rs" }, + { "calendarname.japanese", + "jap\u0101\u0146u kalend\u0101rs" }, + { "calendarname.roc", + "\u0136\u012bnas Republikas kalend\u0101rs" }, + { "field.dayperiod", + "Dayperiod" }, + { "field.era", + "\u0113ra" }, + { "field.hour", + "Stundas" }, + { "field.minute", + "Min\u016btes" }, + { "field.month", + "M\u0113nesis" }, + { "field.second", + "Sekundes" }, + { "field.week", + "Ned\u0113\u013ca" }, + { "field.weekday", + "Ned\u0113\u013cas diena" }, + { "field.year", + "Gads" }, + { "field.zone", + "Josla" }, + { "islamic.MonthNames", + new String[] { + "muharams", + "safars", + "1. rab\u012b", + "2. rab\u012b", + "1. d\u017eum\u0101d\u0101", + "2. d\u017eum\u0101d\u0101", + "rad\u017eabs", + "\u0161abans", + "ramad\u0101ns", + "\u0161auvals", + "du al-kid\u0101", + "du al-hid\u017e\u0101", + "", + } + }, + { "java.time.long.Eras", + new String[] { + "pirms m\u016bsu \u0113ras", + "m\u016bsu \u0113r\u0101", + } + }, + { "java.time.short.Eras", + new String[] { + "pm\u0113", + "m\u0113", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk.java b/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk.java index 1c7b8e0d9d4..cb2d06df46c 100644 --- a/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk.java +++ b/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk.java @@ -76,11 +76,11 @@ package sun.text.resources.mk; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_mk extends ListResourceBundle { +public class FormatData_mk extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_mk extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u0458", + "\u0444", + "\u043c", + "\u0430", + "\u043c", + "\u0458", + "\u0458", + "\u0430", + "\u0441", + "\u043e", + "\u043d", + "\u0434", + "", + } + }, { "DayNames", new String[] { "\u043d\u0435\u0434\u0435\u043b\u0430", // Sunday @@ -194,24 +211,6 @@ public class FormatData_mk extends ListResourceBundle { } }, { "DateTimePatternChars", "GuMtkHmsSEDFwWahKzZ" }, - { "calendarname.islamic-civil", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamicc", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.roc", "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u043d\u0430" }, - { "calendarname.islamic", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.buddhist", "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.japanese", "\u0408\u0430\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregorian", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregory", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "field.era", "\u0415\u0440\u0430" }, - { "field.year", "\u0433\u043e\u0434\u0438\u043d\u0430" }, - { "field.month", "\u041c\u0435\u0441\u0435\u0446" }, - { "field.week", "\u041d\u0435\u0434\u0435\u043b\u0430" }, - { "field.weekday", "\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430" }, - { "field.dayperiod", "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435" }, - { "field.hour", "\u0427\u0430\u0441" }, - { "field.minute", "\u041c\u0438\u043d\u0443\u0442\u0430" }, - { "field.second", "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" }, - { "field.zone", "\u0437\u043e\u043d\u0430" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk_MK.java b/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk_MK.java index c6a281764f8..a27812beea6 100644 --- a/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk_MK.java +++ b/jdk/src/share/classes/sun/text/resources/mk/FormatData_mk_MK.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.mk; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_mk_MK extends ListResourceBundle { +public class FormatData_mk_MK extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/mk/JavaTimeSupplementary_mk.java b/jdk/src/share/classes/sun/text/resources/mk/JavaTimeSupplementary_mk.java new file mode 100644 index 00000000000..b70bf87e435 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/mk/JavaTimeSupplementary_mk.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.mk; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_mk extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + "\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + "\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + "\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + } + }, + { "calendarname.buddhist", + "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregorian", + "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregory", + "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic-civil", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamicc", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.japanese", + "\u0408\u0430\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.roc", + "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u043d\u0430" }, + { "field.dayperiod", + "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435" }, + { "field.era", + "\u0415\u0440\u0430" }, + { "field.hour", + "\u0427\u0430\u0441" }, + { "field.minute", + "\u041c\u0438\u043d\u0443\u0442\u0430" }, + { "field.month", + "\u041c\u0435\u0441\u0435\u0446" }, + { "field.second", + "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" }, + { "field.week", + "\u041d\u0435\u0434\u0435\u043b\u0430" }, + { "field.weekday", + "\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430" }, + { "field.year", + "\u0433\u043e\u0434\u0438\u043d\u0430" }, + { "field.zone", + "\u0437\u043e\u043d\u0430" }, + { "java.time.short.Eras", + new String[] { + "\u043f\u0440.\u043d.\u0435.", + "\u0430\u0435.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms.java b/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms.java index 78d0cb03dc6..4470069d9c6 100644 --- a/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms.java +++ b/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms.java @@ -40,9 +40,9 @@ package sun.text.resources.ms; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ms extends ListResourceBundle { +public class FormatData_ms extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", @@ -79,6 +79,40 @@ public class FormatData_ms extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "O", + "S", + "O", + "N", + "D", + "", + } + }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "O", + "S", + "O", + "N", + "D", + "", + } + }, { "standalone.MonthNarrows", new String[] { "J", @@ -189,71 +223,6 @@ public class FormatData_ms extends ListResourceBundle { "{1} {0}", } }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, d MMMM y G", - "d MMMM y G", - "dd/MM/y G", - "d/MM/y G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, d MMMM y G", - "d MMMM y G", - "dd/MM/y G", - "d/MM/y G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d MMMM y G", - "d MMMM y G", - "dd/MM/y G", - "d/MM/y G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d MMMM y GGGG", - "d MMMM y GGGG", - "dd/MM/y GGGG", - "d/MM/y GGGG", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, d MMMM y G", - "d MMMM y G", - "dd/MM/y G", - "d/MM/y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, d MMMM y GGGG", - "d MMMM y GGGG", - "dd/MM/y GGGG", - "d/MM/y GGGG", - } - }, - { "calendarname.islamic-civil", "Kalendar Sivil Islam" }, - { "calendarname.islamicc", "Kalendar Sivil Islam" }, - { "calendarname.islamic", "Kalendar Islam" }, - { "calendarname.buddhist", "Kalendar Buddha" }, - { "calendarname.japanese", "Kalendar Jepun" }, - { "calendarname.roc", "Kalendar Minguo" }, - { "calendarname.gregorian", "Kalendar Gregory" }, - { "calendarname.gregory", "Kalendar Gregory" }, - { "field.year", "Tahun" }, - { "field.month", "Bulan" }, - { "field.week", "Minggu" }, - { "field.weekday", "Hari dalam Minggu" }, - { "field.dayperiod", "PG/PTG" }, - { "field.hour", "Jam" }, - { "field.minute", "Minit" }, - { "field.second", "Kedua" }, - { "field.zone", "Zon Waktu" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms_MY.java b/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms_MY.java index 27a9b6fd9d8..0a6181e3395 100644 --- a/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms_MY.java +++ b/jdk/src/share/classes/sun/text/resources/ms/FormatData_ms_MY.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.ms; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ms_MY extends ListResourceBundle { +public class FormatData_ms_MY extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "NumberPatterns", diff --git a/jdk/src/share/classes/sun/text/resources/ms/JavaTimeSupplementary_ms.java b/jdk/src/share/classes/sun/text/resources/ms/JavaTimeSupplementary_ms.java new file mode 100644 index 00000000000..85b3f18e8ba --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ms/JavaTimeSupplementary_ms.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ms; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ms extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Suku 1", + "Suku Ke-2", + "Suku Ke-3", + "Suku Ke-4", + } + }, + { "QuarterNames", + new String[] { + "Suku pertama", + "Suku Ke-2", + "Suku Ke-3", + "Suku Ke-4", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Kalendar Buddha" }, + { "calendarname.gregorian", + "Kalendar Gregory" }, + { "calendarname.gregory", + "Kalendar Gregory" }, + { "calendarname.islamic", + "Kalendar Islam" }, + { "calendarname.islamic-civil", + "Kalendar Sivil Islam" }, + { "calendarname.islamicc", + "Kalendar Sivil Islam" }, + { "calendarname.japanese", + "Kalendar Jepun" }, + { "calendarname.roc", + "Kalendar Minguo" }, + { "field.dayperiod", + "PG/PTG" }, + { "field.hour", + "Jam" }, + { "field.minute", + "Minit" }, + { "field.month", + "Bulan" }, + { "field.second", + "Kedua" }, + { "field.week", + "Minggu" }, + { "field.weekday", + "Hari dalam Minggu" }, + { "field.year", + "Tahun" }, + { "field.zone", + "Zon Waktu" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, d MMMM y GGGG", + "d MMMM y GGGG", + "dd/MM/y GGGG", + "d/MM/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "dd/MM/y G", + "d/MM/y G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "dd/MM/y G", + "d/MM/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "dd/MM/y G", + "d/MM/y G", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d MMMM y G", + "dd/MM/y G", + "d/MM/y G", + } + }, + { "java.time.short.Eras", + new String[] { + "BCE", + "CE", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d MMMM y GGGG", + "d MMMM y GGGG", + "dd/MM/y GGGG", + "d/MM/y GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt.java b/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt.java index c702b6cdc9e..056762fff14 100644 --- a/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt.java +++ b/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt.java @@ -40,9 +40,9 @@ package sun.text.resources.mt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_mt extends ListResourceBundle { +public class FormatData_mt extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", @@ -79,6 +79,23 @@ public class FormatData_mt extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "\u0120", + "L", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "Il-\u0126add", @@ -167,22 +184,6 @@ public class FormatData_mt extends ListResourceBundle { "{1} {0}", } }, - { "calendarname.islamic-civil", "Kalendarju Islamiku-\u010aivili" }, - { "calendarname.islamicc", "Kalendarju Islamiku-\u010aivili" }, - { "calendarname.islamic", "Kalendarju Islamiku" }, - { "calendarname.buddhist", "Kalendarju Buddist" }, - { "calendarname.japanese", "Kalendarju \u0120appuni\u017c" }, - { "calendarname.gregorian", "Kalendarju Gregorjan" }, - { "calendarname.gregory", "Kalendarju Gregorjan" }, - { "field.era", "Epoka" }, - { "field.year", "Sena" }, - { "field.month", "Xahar" }, - { "field.week", "\u0120img\u0127a" }, - { "field.weekday", "Jum tal-\u0120img\u0127a" }, - { "field.hour", "Sieg\u0127a" }, - { "field.minute", "Minuta" }, - { "field.second", "Sekonda" }, - { "field.zone", "\u017bona" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt_MT.java b/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt_MT.java index 0671cf2f89b..d060d5cd638 100644 --- a/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt_MT.java +++ b/jdk/src/share/classes/sun/text/resources/mt/FormatData_mt_MT.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.mt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_mt_MT extends ListResourceBundle { +public class FormatData_mt_MT extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "NumberPatterns", diff --git a/jdk/src/share/classes/sun/text/resources/mt/JavaTimeSupplementary_mt.java b/jdk/src/share/classes/sun/text/resources/mt/JavaTimeSupplementary_mt.java new file mode 100644 index 00000000000..2e895e7e7fc --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/mt/JavaTimeSupplementary_mt.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.mt; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_mt extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "calendarname.buddhist", + "Kalendarju Buddist" }, + { "calendarname.gregorian", + "Kalendarju Gregorjan" }, + { "calendarname.gregory", + "Kalendarju Gregorjan" }, + { "calendarname.islamic", + "Kalendarju Islamiku" }, + { "calendarname.islamic-civil", + "Kalendarju Islamiku-\u010aivili" }, + { "calendarname.islamicc", + "Kalendarju Islamiku-\u010aivili" }, + { "calendarname.japanese", + "Kalendarju \u0120appuni\u017c" }, + { "field.era", + "Epoka" }, + { "field.hour", + "Sieg\u0127a" }, + { "field.minute", + "Minuta" }, + { "field.month", + "Xahar" }, + { "field.second", + "Sekonda" }, + { "field.week", + "\u0120img\u0127a" }, + { "field.weekday", + "Jum tal-\u0120img\u0127a" }, + { "field.year", + "Sena" }, + { "field.zone", + "\u017bona" }, + { "java.time.long.Eras", + new String[] { + "Qabel Kristu", + "Wara Kristu", + } + }, + { "java.time.short.Eras", + new String[] { + "QK", + "WK", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl.java b/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl.java index 5bc3964525c..461e40fbb5a 100644 --- a/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl.java +++ b/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl.java @@ -76,11 +76,11 @@ package sun.text.resources.nl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_nl extends ListResourceBundle { +public class FormatData_nl extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_nl extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "zondag", // Sunday @@ -194,111 +211,6 @@ public class FormatData_nl extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "dd-MM-yy G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "dd-MM-yy GGGGG", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "dd-MM-yy GGGGG", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "d MMMM y GGGG", - "d MMM y GGGG", - "dd-MM-yy G", - } - }, - { "islamic.MonthNames", - new String[] { - "Moeharram", - "Safar", - "Rabi\u02bba al awal", - "Rabi\u02bba al thani", - "Joemad\u02bbal awal", - "Joemad\u02bbal thani", - "Rajab", - "Sja\u02bbaban", - "Ramadan", - "Sjawal", - "Doe al ka\u02bbaba", - "Doe al hizja", - "", - } - }, - { "islamic.MonthAbbreviations", - new String[] { - "Moeh.", - "Saf.", - "Rab. I", - "Rab. II", - "Joem. I", - "Joem. II", - "Raj.", - "Sja.", - "Ram.", - "Sjaw.", - "Doe al k.", - "Doe al h.", - "", - } - }, - { "islamic.Eras", - new String[] { - "", - "Sa\u02bbna Hizjria", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "dd-MM-yy G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "d MMMM y GGGG", - "d MMM y GGGG", - "dd-MM-yy GGGG", - } - }, - { "calendarname.islamic-civil", "Islamitische kalender (cyclisch)" }, - { "calendarname.islamicc", "Islamitische kalender (cyclisch)" }, - { "calendarname.roc", "Kalender van de Chinese Republiek" }, - { "calendarname.islamic", "Islamitische kalender" }, - { "calendarname.buddhist", "Boeddhistische kalender" }, - { "calendarname.japanese", "Japanse kalender" }, - { "calendarname.gregorian", "Gregoriaanse kalender" }, - { "calendarname.gregory", "Gregoriaanse kalender" }, - { "field.era", "Tijdperk" }, - { "field.year", "Jaar" }, - { "field.month", "Maand" }, - { "field.weekday", "Dag van de week" }, - { "field.dayperiod", "AM/PM" }, - { "field.hour", "Uur" }, - { "field.minute", "Minuut" }, - { "field.second", "Seconde" }, - { "field.zone", "Zone" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_BE.java b/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_BE.java index 3d5ec076a64..444b23db00e 100644 --- a/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_BE.java +++ b/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_BE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.nl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_nl_BE extends ListResourceBundle { +public class FormatData_nl_BE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_NL.java b/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_NL.java index 94c06b5f5c8..0643a56ffc3 100644 --- a/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_NL.java +++ b/jdk/src/share/classes/sun/text/resources/nl/FormatData_nl_NL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.nl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_nl_NL extends ListResourceBundle { +public class FormatData_nl_NL extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/nl/JavaTimeSupplementary_nl.java b/jdk/src/share/classes/sun/text/resources/nl/JavaTimeSupplementary_nl.java new file mode 100644 index 00000000000..8b111fa4a5a --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/nl/JavaTimeSupplementary_nl.java @@ -0,0 +1,240 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.nl; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_nl extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "1e kwartaal", + "2e kwartaal", + "3e kwartaal", + "4e kwartaal", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Boeddhistische kalender" }, + { "calendarname.gregorian", + "Gregoriaanse kalender" }, + { "calendarname.gregory", + "Gregoriaanse kalender" }, + { "calendarname.islamic", + "Islamitische kalender" }, + { "calendarname.islamic-civil", + "Islamitische kalender (cyclisch)" }, + { "calendarname.islamicc", + "Islamitische kalender (cyclisch)" }, + { "calendarname.japanese", + "Japanse kalender" }, + { "calendarname.roc", + "Kalender van de Chinese Republiek" }, + { "field.dayperiod", + "AM/PM" }, + { "field.era", + "Tijdperk" }, + { "field.hour", + "Uur" }, + { "field.minute", + "Minuut" }, + { "field.month", + "Maand" }, + { "field.second", + "Seconde" }, + { "field.week", + "week" }, + { "field.weekday", + "Dag van de week" }, + { "field.year", + "Jaar" }, + { "field.zone", + "Zone" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM y GGGG", + "dd-MM-yy GGGG", + } + }, + { "islamic.Eras", + new String[] { + "", + "Sa\u02bbna Hizjria", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "Moeh.", + "Saf.", + "Rab. I", + "Rab. II", + "Joem. I", + "Joem. II", + "Raj.", + "Sja.", + "Ram.", + "Sjaw.", + "Doe al k.", + "Doe al h.", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "Moeharram", + "Safar", + "Rabi\u02bba al awal", + "Rabi\u02bba al thani", + "Joemad\u02bbal awal", + "Joemad\u02bbal thani", + "Rajab", + "Sja\u02bbaban", + "Ramadan", + "Sjawal", + "Doe al ka\u02bbaba", + "Doe al hizja", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "Sa\u02bbna Hizjria", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd-MM-yy G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd-MM-yy G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd-MM-yy GGGGG", + } + }, + { "java.time.long.Eras", + new String[] { + "Voor Christus", + "na Christus", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "dd-MM-yy GGGGG", + } + }, + { "java.time.short.Eras", + new String[] { + "v. Chr.", + "n. Chr.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM y GGGG", + "dd-MM-yy G", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/no/FormatData_no.java b/jdk/src/share/classes/sun/text/resources/no/FormatData_no.java index d84b057f501..3e24ebc515e 100644 --- a/jdk/src/share/classes/sun/text/resources/no/FormatData_no.java +++ b/jdk/src/share/classes/sun/text/resources/no/FormatData_no.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.no; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_no extends ListResourceBundle { +public class FormatData_no extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -65,6 +65,23 @@ public class FormatData_no extends ListResourceBundle { "" // month 13 if applicable } }, + { "standalone.MonthNames", + new String[] { + "januar", + "februar", + "mars", + "april", + "mai", + "juni", + "juli", + "august", + "september", + "oktober", + "november", + "desember", + "", + } + }, { "MonthAbbreviations", new String[] { "jan", // abb january @@ -82,6 +99,57 @@ public class FormatData_no extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "jan", + "feb", + "mar", + "apr", + "mai", + "jun", + "jul", + "aug", + "sep", + "okt", + "nov", + "des", + "", + } + }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "s\u00f8ndag", // Sunday @@ -93,6 +161,17 @@ public class FormatData_no extends ListResourceBundle { "l\u00f8rdag" // Saturday } }, + { "standalone.DayNames", + new String[] { + "s\u00f8ndag", + "mandag", + "tirsdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f8rdag", + } + }, { "DayAbbreviations", new String[] { "s\u00f8", // abb Sunday @@ -104,6 +183,39 @@ public class FormatData_no extends ListResourceBundle { "l\u00f8" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "s\u00f8.", + "ma.", + "ti.", + "on.", + "to.", + "fr.", + "l\u00f8.", + } + }, + { "DayNarrows", + new String[] { + "S", + "M", + "T", + "O", + "T", + "F", + "L", + } + }, + { "standalone.DayNarrows", + new String[] { + "S", + "M", + "T", + "O", + "T", + "F", + "L", + } + }, { "NumberElements", new String[] { ",", // decimal separator diff --git a/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO.java b/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO.java index 7c71ee5b41c..9275a12c09f 100644 --- a/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO.java +++ b/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.no; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_no_NO extends ListResourceBundle { +public class FormatData_no_NO extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO_NY.java b/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO_NY.java index 4ec2bbde88d..3cf98aeb763 100644 --- a/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO_NY.java +++ b/jdk/src/share/classes/sun/text/resources/no/FormatData_no_NO_NY.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.no; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_no_NO_NY extends ListResourceBundle { +public class FormatData_no_NO_NY extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/no/JavaTimeSupplementary_no.java b/jdk/src/share/classes/sun/text/resources/no/JavaTimeSupplementary_no.java new file mode 100644 index 00000000000..2ed407fcaf3 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/no/JavaTimeSupplementary_no.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.no; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_no extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "1. kvartal", + "2. kvartal", + "3. kvartal", + "4. kvartal", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "buddhistisk kalender" }, + { "calendarname.gregorian", + "gregoriansk kalender" }, + { "calendarname.gregory", + "gregoriansk kalender" }, + { "calendarname.islamic", + "islamsk kalender" }, + { "calendarname.islamic-civil", + "islamsk sivil kalender" }, + { "calendarname.islamicc", + "islamsk sivil kalender" }, + { "calendarname.japanese", + "japansk kalender" }, + { "calendarname.roc", + "kalender for Republikken Kina" }, + { "field.dayperiod", + "AM/PM" }, + { "field.era", + "tidsalder" }, + { "field.hour", + "time" }, + { "field.minute", + "minutt" }, + { "field.month", + "m\u00e5ned" }, + { "field.second", + "sekund" }, + { "field.week", + "uke" }, + { "field.weekday", + "ukedag" }, + { "field.year", + "\u00e5r" }, + { "field.zone", + "sone" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. MMM y GGGG", + "d.M y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M yyyy", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M y G", + } + }, + { "java.time.long.Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d. MMMM y G", + "d. MMMM y G", + "d. MMM y G", + "d.M y G", + } + }, + { "java.time.short.Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d. MMMM y GGGG", + "d. MMMM y GGGG", + "d. MMM y GGGG", + "d.M y GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl.java b/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl.java index 630337d60fa..0df28fd4850 100644 --- a/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl.java +++ b/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl.java @@ -76,11 +76,11 @@ package sun.text.resources.pl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_pl extends ListResourceBundle { +public class FormatData_pl extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -135,6 +135,57 @@ public class FormatData_pl extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "sty", + "lut", + "mar", + "kwi", + "maj", + "cze", + "lip", + "sie", + "wrz", + "pa\u017a", + "lis", + "gru", + "", + } + }, + { "MonthNarrows", + new String[] { + "s", + "l", + "m", + "k", + "m", + "c", + "l", + "s", + "w", + "p", + "l", + "g", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "s", + "l", + "m", + "k", + "m", + "c", + "l", + "s", + "w", + "p", + "l", + "g", + "", + } + }, { "DayNames", new String[] { "niedziela", // Sunday @@ -146,6 +197,17 @@ public class FormatData_pl extends ListResourceBundle { "sobota" // Saturday } }, + { "standalone.DayNames", + new String[] { + "niedziela", + "poniedzia\u0142ek", + "wtorek", + "\u015broda", + "czwartek", + "pi\u0105tek", + "sobota", + } + }, { "DayAbbreviations", new String[] { "N", // abb Sunday @@ -157,6 +219,17 @@ public class FormatData_pl extends ListResourceBundle { "So" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "niedz.", + "pon.", + "wt.", + "\u015br.", + "czw.", + "pt.", + "sob.", + } + }, { "DayNarrows", new String[] { "N", @@ -168,6 +241,17 @@ public class FormatData_pl extends ListResourceBundle { "S", } }, + { "standalone.DayNarrows", + new String[] { + "N", + "P", + "W", + "\u015a", + "C", + "P", + "S", + } + }, { "Eras", new String[] { // era strings "p.n.e.", @@ -211,71 +295,6 @@ public class FormatData_pl extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, G y MMMM dd", - "G y MMMM d", - "d MMM y G", - "dd.MM.yyyy G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, d MMMM, y G", - "d MMMM, y G", - "d MMM y G", - "dd.MM.yyyy G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d MMMM, y G", - "d MMMM, y G", - "d MMM y G", - "dd.MM.yyyy G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d MMMM, y GGGG", - "d MMMM, y GGGG", - "d MMM y GGGG", - "dd.MM.yyyy GGGG", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, d MMMM, y G", - "d MMMM, y G", - "d MMM y G", - "dd.MM.yyyy G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, d MMMM, y GGGG", - "d MMMM, y GGGG", - "d MMM y GGGG", - "dd.MM.yyyy GGGG", - } - }, - { "calendarname.islamic-civil", "kalendarz islamski (metoda obliczeniowa)" }, - { "calendarname.islamicc", "kalendarz islamski (metoda obliczeniowa)" }, - { "calendarname.islamic", "kalendarz islamski (metoda wzrokowa)" }, - { "calendarname.japanese", "kalendarz japo\u0144ski" }, - { "calendarname.gregorian", "kalendarz gregoria\u0144ski" }, - { "calendarname.gregory", "kalendarz gregoria\u0144ski" }, - { "calendarname.roc", "kalendarz Republiki Chi\u0144skiej" }, - { "calendarname.buddhist", "kalendarz buddyjski" }, - { "field.era", "Era" }, - { "field.year", "Rok" }, - { "field.month", "Miesi\u0105c" }, - { "field.week", "Tydzie\u0144" }, - { "field.weekday", "Dzie\u0144 tygodnia" }, - { "field.hour", "Godzina" }, - { "field.minute", "Minuta" }, - { "field.second", "Sekunda" }, - { "field.zone", "Strefa" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl_PL.java b/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl_PL.java index bf3f3381efd..36a002c4337 100644 --- a/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl_PL.java +++ b/jdk/src/share/classes/sun/text/resources/pl/FormatData_pl_PL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.pl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_pl_PL extends ListResourceBundle { +public class FormatData_pl_PL extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/pl/JavaTimeSupplementary_pl.java b/jdk/src/share/classes/sun/text/resources/pl/JavaTimeSupplementary_pl.java new file mode 100644 index 00000000000..21105070537 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/pl/JavaTimeSupplementary_pl.java @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.pl; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_pl extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "I kwarta\u0142", + "II kwarta\u0142", + "III kwarta\u0142", + "IV kwarta\u0142", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "kalendarz buddyjski" }, + { "calendarname.gregorian", + "kalendarz gregoria\u0144ski" }, + { "calendarname.gregory", + "kalendarz gregoria\u0144ski" }, + { "calendarname.islamic", + "kalendarz islamski (metoda wzrokowa)" }, + { "calendarname.islamic-civil", + "kalendarz islamski (metoda obliczeniowa)" }, + { "calendarname.islamicc", + "kalendarz islamski (metoda obliczeniowa)" }, + { "calendarname.japanese", + "kalendarz japo\u0144ski" }, + { "calendarname.roc", + "kalendarz Republiki Chi\u0144skiej" }, + { "field.dayperiod", + "Dayperiod" }, + { "field.era", + "Era" }, + { "field.hour", + "Godzina" }, + { "field.minute", + "Minuta" }, + { "field.month", + "Miesi\u0105c" }, + { "field.second", + "Sekunda" }, + { "field.week", + "Tydzie\u0144" }, + { "field.weekday", + "Dzie\u0144 tygodnia" }, + { "field.year", + "Rok" }, + { "field.zone", + "Strefa" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, d MMMM, y GGGG", + "d MMMM, y GGGG", + "d MMM y GGGG", + "dd.MM.yyyy GGGG", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "Muh.", + "Saf.", + "Rab. I", + "Rab. II", + "D\u017cu. I", + "D\u017cu. II", + "Ra.", + "Sza.", + "Ram.", + "Szaw.", + "Zu al-k.", + "Zu al-h.", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "Muharram", + "Safar", + "Rabi I", + "Rabi II", + "D\u017cumada I", + "D\u017cumada II", + "Rad\u017cab", + "Szaban", + "Ramadan", + "Szawwal", + "Zu al-kada", + "Zu al-hid\u017cd\u017ca", + "", + } + }, + { "islamic.MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.long.Eras", + new String[] { + "p.n.e.", + "n.e.", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM, y G", + "d MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.short.Eras", + new String[] { + "p.n.e.", + "n.e.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d MMMM, y GGGG", + "d MMMM, y GGGG", + "d MMM y GGGG", + "dd.MM.yyyy GGGG", + } + }, + { "roc.Eras", + new String[] { + "Przed ROC", + "ROC", + } + }, + { "roc.short.Eras", + new String[] { + "Przed ROC", + "ROC", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt.java b/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt.java index a9eae050312..ec36c0c7045 100644 --- a/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt.java +++ b/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt.java @@ -76,11 +76,11 @@ package sun.text.resources.pt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_pt extends ListResourceBundle { +public class FormatData_pt extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -118,6 +118,23 @@ public class FormatData_pt extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "Domingo", // Sunday @@ -151,6 +168,18 @@ public class FormatData_pt extends ListResourceBundle { "S", } }, + { "long.Eras", + new String[] { + "Antes de Cristo", + "Ano do Senhor", + } + }, + { "Eras", + new String[] { + "a.C.", + "d.C.", + } + }, { "NumberElements", new String[] { ",", // decimal al separator @@ -188,64 +217,6 @@ public class FormatData_pt extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, G y MMMM dd", - "G y MMMM d", - "G y MMM d", - "d/M/yy", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y G", - "d 'de' MMMM 'de' y G", - "dd/MM/yyyy G", - "d/M/yyyy", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y GGGG", - "d 'de' MMMM 'de' y GGGG", - "dd/MM/yyyy GGGG", - "d/M/yyyy", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y G", - "d 'de' MMMM 'de' y G", - "dd/MM/yyyy G", - "d/M/yyyy", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, d 'de' MMMM 'de' y GGGG", - "d 'de' MMMM 'de' y GGGG", - "dd/MM/yyyy GGGG", - "d/M/yyyy", - } - }, - { "calendarname.islamic-civil", "Calend\u00e1rio Civil Isl\u00e2mico" }, - { "calendarname.islamicc", "Calend\u00e1rio Civil Isl\u00e2mico" }, - { "calendarname.islamic", "Calend\u00e1rio Isl\u00e2mico" }, - { "calendarname.japanese", "Calend\u00e1rio Japon\u00eas" }, - { "calendarname.gregorian", "Calend\u00e1rio Gregoriano" }, - { "calendarname.gregory", "Calend\u00e1rio Gregoriano" }, - { "calendarname.roc", "Calend\u00e1rio da Rep\u00fablica da China" }, - { "calendarname.buddhist", "Calend\u00e1rio Budista" }, - { "field.era", "Era" }, - { "field.year", "Ano" }, - { "field.month", "M\u00eas" }, - { "field.week", "Semana" }, - { "field.weekday", "Dia da semana" }, - { "field.dayperiod", "Per\u00edodo do dia" }, - { "field.hour", "Hora" }, - { "field.minute", "Minuto" }, - { "field.second", "Segundo" }, - { "field.zone", "Fuso" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_BR.java b/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_BR.java index 1d4ddf2b481..494b5abaa00 100644 --- a/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_BR.java +++ b/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_BR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.pt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_pt_BR extends ListResourceBundle { +public class FormatData_pt_BR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_PT.java b/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_PT.java index 13b4f2090e4..8ebff2e1ed0 100644 --- a/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_PT.java +++ b/jdk/src/share/classes/sun/text/resources/pt/FormatData_pt_PT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.pt; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_pt_PT extends ListResourceBundle { +public class FormatData_pt_PT extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt.java b/jdk/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt.java new file mode 100644 index 00000000000..6b8e73e5d2b --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt.java @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.pt; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_pt extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "T1", + "T2", + "T3", + "T4", + } + }, + { "QuarterNames", + new String[] { + "1\u00ba trimestre", + "2\u00ba trimestre", + "3\u00ba trimestre", + "4\u00ba trimestre", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Calend\u00e1rio Budista" }, + { "calendarname.gregorian", + "Calend\u00e1rio Gregoriano" }, + { "calendarname.gregory", + "Calend\u00e1rio Gregoriano" }, + { "calendarname.islamic", + "Calend\u00e1rio Isl\u00e2mico" }, + { "calendarname.islamic-civil", + "Calend\u00e1rio Civil Isl\u00e2mico" }, + { "calendarname.islamicc", + "Calend\u00e1rio Civil Isl\u00e2mico" }, + { "calendarname.japanese", + "Calend\u00e1rio Japon\u00eas" }, + { "calendarname.roc", + "Calend\u00e1rio da Rep\u00fablica da China" }, + { "field.dayperiod", + "Per\u00edodo do dia" }, + { "field.era", + "Era" }, + { "field.hour", + "Hora" }, + { "field.minute", + "Minuto" }, + { "field.month", + "M\u00eas" }, + { "field.second", + "Segundo" }, + { "field.week", + "Semana" }, + { "field.weekday", + "Dia da semana" }, + { "field.year", + "Ano" }, + { "field.zone", + "Fuso" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y GGGG", + "d 'de' MMMM 'de' y GGGG", + "dd/MM/yyyy GGGG", + "d/M/yyyy", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/yyyy", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/yyyy", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM y G", + "d 'de' MMMM 'de' y G", + "d MMM y G", + "d/M/yy", + } + }, + { "java.time.long.Eras", + new String[] { + "Antes de Cristo", + "Ano do Senhor", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/yyyy", + } + }, + { "java.time.short.Eras", + new String[] { + "a.C.", + "d.C.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y GGGG", + "d 'de' MMMM 'de' y GGGG", + "dd/MM/yyyy GGGG", + "d/M/yyyy", + } + }, + { "roc.Eras", + new String[] { + "Antes de R.O.C.", + "R.O.C.", + } + }, + { "roc.short.Eras", + new String[] { + "Antes de R.O.C.", + "R.O.C.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt_PT.java b/jdk/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt_PT.java new file mode 100644 index 00000000000..dedc886de7f --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/pt/JavaTimeSupplementary_pt_PT.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.pt; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_pt_PT extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterNames", + new String[] { + "1.\u00ba trimestre", + "2.\u00ba trimestre", + "3.\u00ba trimestre", + "4.\u00ba trimestre", + } + }, + { "calendarname.islamic-civil", + "Calend\u00e1rio Isl\u00e2mico/Civil" }, + { "calendarname.islamicc", + "Calend\u00e1rio Isl\u00e2mico/Civil" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y GGGG", + "d 'de' MMMM 'de' y GGGG", + "dd/MM/yyyy GGGG", + "d/M/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/y G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/y G", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y G", + "d 'de' MMMM 'de' y G", + "dd/MM/yyyy G", + "d/M/y G", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d 'de' MMMM 'de' y GGGG", + "d 'de' MMMM 'de' y GGGG", + "dd/MM/yyyy GGGG", + "d/M/y GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro.java b/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro.java index d1ab35ce523..b8dee7c5500 100644 --- a/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro.java +++ b/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro.java @@ -76,11 +76,11 @@ package sun.text.resources.ro; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ro extends ListResourceBundle { +public class FormatData_ro extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -101,6 +101,23 @@ public class FormatData_ro extends ListResourceBundle { "" // month 13 if applicable } }, + { "standalone.MonthNames", + new String[] { + "ianuarie", + "februarie", + "martie", + "aprilie", + "mai", + "iunie", + "iulie", + "august", + "septembrie", + "octombrie", + "noiembrie", + "decembrie", + "", + } + }, { "MonthAbbreviations", new String[] { "Ian", // abb january @@ -118,6 +135,40 @@ public class FormatData_ro extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "ian.", + "feb.", + "mar.", + "apr.", + "mai", + "iun.", + "iul.", + "aug.", + "sept.", + "oct.", + "nov.", + "dec.", + "", + } + }, + { "MonthNarrows", + new String[] { + "I", + "F", + "M", + "A", + "M", + "I", + "I", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "standalone.MonthNarrows", new String[] { "I", @@ -146,6 +197,17 @@ public class FormatData_ro extends ListResourceBundle { "s\u00e2mb\u0103t\u0103" // Saturday } }, + { "standalone.DayNames", + new String[] { + "duminic\u0103", + "luni", + "mar\u021bi", + "miercuri", + "joi", + "vineri", + "s\u00e2mb\u0103t\u0103", + } + }, { "DayAbbreviations", new String[] { "D", // abb Sunday @@ -157,18 +219,28 @@ public class FormatData_ro extends ListResourceBundle { "S" // abb Saturday } }, - // commented out DayNarrows because most names are contributed. -// { "DayNarrows", -// new String[] { -// "D", -// "", -// "", -// "", -// "", -// "", -// "", -// } -// }, + { "standalone.DayAbbreviations", + new String[] { + "Du", + "Lu", + "Ma", + "Mi", + "Jo", + "Vi", + "S\u00e2", + } + }, + { "DayNarrows", + new String[] { + "D", + "L", + "M", + "M", + "J", + "V", + "S", + } + }, { "standalone.DayNarrows", new String[] { "D", @@ -223,32 +295,6 @@ public class FormatData_ro extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, G y MMMM dd", - "d MMMM y G", - "d MMM y G", - "d/M/yyyy", - } - }, - { "calendarname.islamic-civil", "calendar islamic civil" }, - { "calendarname.islamicc", "calendar islamic civil" }, - { "calendarname.roc", "calendar al Republicii Chineze" }, - { "calendarname.islamic", "calendar islamic" }, - { "calendarname.buddhist", "calendar budist" }, - { "calendarname.japanese", "calendar japonez" }, - { "calendarname.gregorian", "calendar gregorian" }, - { "calendarname.gregory", "calendar gregorian" }, - { "field.era", "er\u0103" }, - { "field.year", "an" }, - { "field.month", "lun\u0103" }, - { "field.week", "s\u0103pt\u0103m\u00e2n\u0103" }, - { "field.weekday", "zi a s\u0103pt\u0103m\u00e2nii" }, - { "field.dayperiod", "perioada zilei" }, - { "field.hour", "or\u0103" }, - { "field.minute", "minut" }, - { "field.second", "secund\u0103" }, - { "field.zone", "zon\u0103" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro_RO.java b/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro_RO.java index d6789ccd13e..c3ea414998d 100644 --- a/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro_RO.java +++ b/jdk/src/share/classes/sun/text/resources/ro/FormatData_ro_RO.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.ro; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ro_RO extends ListResourceBundle { +public class FormatData_ro_RO extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ro/JavaTimeSupplementary_ro.java b/jdk/src/share/classes/sun/text/resources/ro/JavaTimeSupplementary_ro.java new file mode 100644 index 00000000000..c2d24e08786 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ro/JavaTimeSupplementary_ro.java @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ro; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ro extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "trim. I", + "trim. II", + "trim. III", + "trim. IV", + } + }, + { "QuarterNames", + new String[] { + "trimestrul I", + "trimestrul al II-lea", + "trimestrul al III-lea", + "trimestrul al IV-lea", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "T4", + } + }, + { "calendarname.buddhist", + "calendar budist" }, + { "calendarname.gregorian", + "calendar gregorian" }, + { "calendarname.gregory", + "calendar gregorian" }, + { "calendarname.islamic", + "calendar islamic" }, + { "calendarname.islamic-civil", + "calendar islamic civil" }, + { "calendarname.islamicc", + "calendar islamic civil" }, + { "calendarname.japanese", + "calendar japonez" }, + { "calendarname.roc", + "calendar al Republicii Chineze" }, + { "field.dayperiod", + "perioada zilei" }, + { "field.era", + "er\u0103" }, + { "field.hour", + "or\u0103" }, + { "field.minute", + "minut" }, + { "field.month", + "lun\u0103" }, + { "field.second", + "secund\u0103" }, + { "field.week", + "s\u0103pt\u0103m\u00e2n\u0103" }, + { "field.weekday", + "zi a s\u0103pt\u0103m\u00e2nii" }, + { "field.year", + "an" }, + { "field.zone", + "zon\u0103" }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM, y G", + "d MMMM y G", + "d MMM y G", + "d/M/yyyy", + } + }, + { "java.time.buddhist.long.Eras", + new String[] { + "BC", + "era budist\u0103", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "e.b.", + } + }, + { "java.time.long.Eras", + new String[] { + "\u00eenainte de Hristos", + "dup\u0103 Hristos", + } + }, + { "java.time.short.Eras", + new String[] { + "d.C.", + "\u00ee.d.C.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru.java b/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru.java index ba895954c0c..90b7df279c2 100644 --- a/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru.java +++ b/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru.java @@ -76,11 +76,11 @@ package sun.text.resources.ru; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ru extends ListResourceBundle { +public class FormatData_ru extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -152,6 +152,40 @@ public class FormatData_ru extends ListResourceBundle { "", // month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u042f", + "\u0424", + "\u041c", + "\u0410", + "\u041c", + "\u0418", + "\u0418", + "\u0410", + "\u0421", + "\u041e", + "\u041d", + "\u0414", + "", + } + }, + { "standalone.MonthNarrows", + new String[] { + "\u042f", + "\u0424", + "\u041c", + "\u0410", + "\u041c", + "\u0418", + "\u0418", + "\u0410", + "\u0421", + "\u041e", + "\u041d", + "\u0414", + "", + } + }, { "DayNames", new String[] { "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", // Sunday @@ -163,6 +197,17 @@ public class FormatData_ru extends ListResourceBundle { "\u0441\u0443\u0431\u0431\u043e\u0442\u0430" // Saturday } }, + { "standalone.DayNames", + new String[] { + "\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", + "\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", + "\u0412\u0442\u043e\u0440\u043d\u0438\u043a", + "\u0421\u0440\u0435\u0434\u0430", + "\u0427\u0435\u0442\u0432\u0435\u0440\u0433", + "\u041f\u044f\u0442\u043d\u0438\u0446\u0430", + "\u0421\u0443\u0431\u0431\u043e\u0442\u0430", + } + }, { "DayAbbreviations", new String[] { "\u0412\u0441", // abb Sunday @@ -174,6 +219,17 @@ public class FormatData_ru extends ListResourceBundle { "\u0421\u0431" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "\u0412\u0441", + "\u041f\u043d", + "\u0412\u0442", + "\u0421\u0440", + "\u0427\u0442", + "\u041f\u0442", + "\u0421\u0431", + } + }, { "DayNarrows", new String[] { "\u0412", @@ -239,88 +295,6 @@ public class FormatData_ru extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, d MMMM y\u00a0'\u0433'. G", - "d MMMM y\u00a0'\u0433'. G", - "dd.MM.yyyy G", - "dd.MM.yy G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, d MMMM y\u00a0'\u0433'. G", - "d MMMM y\u00a0'\u0433'. G", - "dd.MM.yyyy G", - "dd.MM.yy G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, d MMMM y\u00a0'\u0433'. G", - "d MMMM y\u00a0'\u0433'. G", - "dd.MM.yyyy G", - "dd.MM.yy G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, d MMMM y\u00a0'\u0433'. GGGG", - "d MMMM y\u00a0'\u0433'. GGGG", - "dd.MM.yyyy GGGG", - "dd.MM.yy GGGG", - } - }, - { "islamic.MonthNames", - new String[] { - "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c", - "\u0421\u0430\u0444\u0430\u0440", - "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c", - "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440", - "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c", - "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440", - "\u0420\u0430\u0434\u0436\u0430\u0431", - "\u0428\u0430\u0430\u0431\u0430\u043d", - "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", - "\u0428\u0430\u0432\u0432\u0430\u043b\u044c", - "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430", - "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430", - "", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, d MMMM y\u00a0'\u0433'. G", - "d MMMM y\u00a0'\u0433'. G", - "dd.MM.yyyy G", - "dd.MM.yy G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, d MMMM y\u00a0'\u0433'. GGGG", - "d MMMM y\u00a0'\u0433'. GGGG", - "dd.MM.yyyy GGGG", - "dd.MM.yy GGGG", - } - }, - { "calendarname.islamic-civil", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.islamicc", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.islamic", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.japanese", "\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.gregorian", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.gregory", "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.roc", "\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "calendarname.buddhist", "\u0411\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, - { "field.era", "\u042d\u0440\u0430" }, - { "field.year", "\u0413\u043e\u0434" }, - { "field.month", "\u041c\u0435\u0441\u044f\u0446" }, - { "field.week", "\u041d\u0435\u0434\u0435\u043b\u044f" }, - { "field.weekday", "\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438" }, - { "field.hour", "\u0427\u0430\u0441" }, - { "field.minute", "\u041c\u0438\u043d\u0443\u0442\u0430" }, - { "field.second", "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" }, - { "field.zone", "\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru_RU.java b/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru_RU.java index 8663de86e8b..6efab5416b5 100644 --- a/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru_RU.java +++ b/jdk/src/share/classes/sun/text/resources/ru/FormatData_ru_RU.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.ru; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_ru_RU extends ListResourceBundle { +public class FormatData_ru_RU extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/ru/JavaTimeSupplementary_ru.java b/jdk/src/share/classes/sun/text/resources/ru/JavaTimeSupplementary_ru.java new file mode 100644 index 00000000000..54b74f0f0c6 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/ru/JavaTimeSupplementary_ru.java @@ -0,0 +1,263 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.ru; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_ru extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1-\u0439 \u043a\u0432.", + "2-\u0439 \u043a\u0432.", + "3-\u0439 \u043a\u0432.", + "4-\u0439 \u043a\u0432.", + } + }, + { "QuarterNames", + new String[] { + "1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u0411\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.gregorian", + "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.gregory", + "\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.islamic", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.islamic-civil", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.islamicc", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.japanese", + "\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "calendarname.roc", + "\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c" }, + { "field.dayperiod", + "\u0414\u041f/\u041f\u041f" }, + { "field.era", + "\u042d\u0440\u0430" }, + { "field.hour", + "\u0427\u0430\u0441" }, + { "field.minute", + "\u041c\u0438\u043d\u0443\u0442\u0430" }, + { "field.month", + "\u041c\u0435\u0441\u044f\u0446" }, + { "field.second", + "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" }, + { "field.week", + "\u041d\u0435\u0434\u0435\u043b\u044f" }, + { "field.weekday", + "\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438" }, + { "field.year", + "\u0413\u043e\u0434" }, + { "field.zone", + "\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, d MMMM y\u00a0'\u0433'. GGGG", + "d MMMM y\u00a0'\u0433'. GGGG", + "dd.MM.yyyy GGGG", + "dd.MM.yy GGGG", + } + }, + { "islamic.MonthAbbreviations", + new String[] { + "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c", + "\u0421\u0430\u0444\u0430\u0440", + "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c", + "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440", + "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c", + "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440", + "\u0420\u0430\u0434\u0436\u0430\u0431", + "\u0428\u0430\u0430\u0431\u0430\u043d", + "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", + "\u0428\u0430\u0432\u0432\u0430\u043b\u044c", + "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430", + "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430", + "", + } + }, + { "islamic.MonthNames", + new String[] { + "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c", + "\u0421\u0430\u0444\u0430\u0440", + "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c", + "\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440", + "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c", + "\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440", + "\u0420\u0430\u0434\u0436\u0430\u0431", + "\u0428\u0430\u0430\u0431\u0430\u043d", + "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", + "\u0428\u0430\u0432\u0432\u0430\u043b\u044c", + "\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430", + "\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430", + "", + } + }, + { "islamic.MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, d MMMM y\u00a0'\u0433'. G", + "d MMMM y\u00a0'\u0433'. G", + "dd.MM.yyyy G", + "dd.MM.yy G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, d MMMM y\u00a0'\u0433'. G", + "d MMMM y\u00a0'\u0433'. G", + "dd.MM.yyyy G", + "dd.MM.yy G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, d MMMM y\u00a0'\u0433'. G", + "d MMMM y\u00a0'\u0433'. G", + "dd.MM.yyyy G", + "dd.MM.yy G", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u043d.\u044d.", + "\u042d\u043f\u043e\u0445\u0430 \u041c\u044d\u0439\u0434\u0437\u0438", + "\u042d\u043f\u043e\u0445\u0430 \u0422\u0430\u0439\u0441\u044c\u043e", + "\u0421\u044c\u043e\u0432\u0430", + "\u042d\u043f\u043e\u0445\u0430 \u0425\u044d\u0439\u0441\u044d\u0439", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u043d.\u044d.", + "\u042d\u043f\u043e\u0445\u0430 \u041c\u044d\u0439\u0434\u0437\u0438", + "\u042d\u043f\u043e\u0445\u0430 \u0422\u0430\u0439\u0441\u044c\u043e", + "\u0421\u044c\u043e\u0432\u0430", + "\u042d\u043f\u043e\u0445\u0430 \u0425\u044d\u0439\u0441\u044d\u0439", + } + }, + { "java.time.long.Eras", + new String[] { + "\u0434\u043e \u043d.\u044d.", + "\u043d.\u044d.", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, d MMMM y\u00a0'\u0433'. G", + "d MMMM y\u00a0'\u0433'. G", + "dd.MM.yyyy G", + "dd.MM.yy G", + } + }, + { "java.time.short.Eras", + new String[] { + "\u0434\u043e \u043d.\u044d.", + "\u043d.\u044d.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, d MMMM y\u00a0'\u0433'. GGGG", + "d MMMM y\u00a0'\u0433'. GGGG", + "dd.MM.yyyy GGGG", + "dd.MM.yy GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk.java b/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk.java index 04f46e650ae..b55517fbb68 100644 --- a/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk.java +++ b/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk.java @@ -76,11 +76,11 @@ package sun.text.resources.sk; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sk extends ListResourceBundle { +public class FormatData_sk extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -152,6 +152,23 @@ public class FormatData_sk extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "j", + "f", + "m", + "a", + "m", + "j", + "j", + "a", + "s", + "o", + "n", + "d", + "", + } + }, { "DayNames", new String[] { "Nede\u013ea", // Sunday @@ -163,6 +180,17 @@ public class FormatData_sk extends ListResourceBundle { "Sobota" // Saturday } }, + { "standalone.DayNames", + new String[] { + "nede\u013ea", + "pondelok", + "utorok", + "streda", + "\u0161tvrtok", + "piatok", + "sobota", + } + }, { "DayAbbreviations", new String[] { "Ne", // abb Sunday @@ -174,6 +202,17 @@ public class FormatData_sk extends ListResourceBundle { "So" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "ne", + "po", + "ut", + "st", + "\u0161t", + "pi", + "so", + } + }, { "DayNarrows", new String[] { "N", @@ -185,6 +224,17 @@ public class FormatData_sk extends ListResourceBundle { "S", } }, + { "standalone.DayNarrows", + new String[] { + "N", + "P", + "U", + "S", + "\u0160", + "P", + "S", + } + }, { "Eras", new String[] { // era strings "pred n.l.", @@ -228,23 +278,6 @@ public class FormatData_sk extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "calendarname.islamic-civil", "Islamsk\u00fd ob\u010diansky kalend\u00e1r" }, - { "calendarname.islamicc", "Islamsk\u00fd ob\u010diansky kalend\u00e1r" }, - { "calendarname.islamic", "Islamsk\u00fd kalend\u00e1r" }, - { "calendarname.buddhist", "Buddhistick\u00fd kalend\u00e1r" }, - { "calendarname.japanese", "Japonsk\u00fd kalend\u00e1r" }, - { "calendarname.gregorian", "Gregori\u00e1nsky kalend\u00e1r" }, - { "calendarname.gregory", "Gregori\u00e1nsky kalend\u00e1r" }, - { "field.era", "\u00c9ra" }, - { "field.year", "Rok" }, - { "field.month", "Mesiac" }, - { "field.week", "T\u00fd\u017ede\u0148" }, - { "field.weekday", "De\u0148 v t\u00fd\u017edni" }, - { "field.dayperiod", "\u010cas\u0165 d\u0148a" }, - { "field.hour", "Hodina" }, - { "field.minute", "Min\u00fata" }, - { "field.second", "Sekunda" }, - { "field.zone", "P\u00e1smo" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk_SK.java b/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk_SK.java index 9fbc6c11bee..5217cd1f9ae 100644 --- a/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk_SK.java +++ b/jdk/src/share/classes/sun/text/resources/sk/FormatData_sk_SK.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.sk; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sk_SK extends ListResourceBundle { +public class FormatData_sk_SK extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/sk/JavaTimeSupplementary_sk.java b/jdk/src/share/classes/sun/text/resources/sk/JavaTimeSupplementary_sk.java new file mode 100644 index 00000000000..ac3e63833ff --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/sk/JavaTimeSupplementary_sk.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.sk; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_sk extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "1. \u0161tvr\u0165rok", + "2. \u0161tvr\u0165rok", + "3. \u0161tvr\u0165rok", + "4. \u0161tvr\u0165rok", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Buddhistick\u00fd kalend\u00e1r" }, + { "calendarname.gregorian", + "Gregori\u00e1nsky kalend\u00e1r" }, + { "calendarname.gregory", + "Gregori\u00e1nsky kalend\u00e1r" }, + { "calendarname.islamic", + "Islamsk\u00fd kalend\u00e1r" }, + { "calendarname.islamic-civil", + "Islamsk\u00fd ob\u010diansky kalend\u00e1r" }, + { "calendarname.islamicc", + "Islamsk\u00fd ob\u010diansky kalend\u00e1r" }, + { "calendarname.japanese", + "Japonsk\u00fd kalend\u00e1r" }, + { "calendarname.roc", + "Kalend\u00e1r \u010c\u00ednskej republiky" }, + { "field.dayperiod", + "\u010cas\u0165 d\u0148a" }, + { "field.era", + "\u00c9ra" }, + { "field.hour", + "Hodina" }, + { "field.minute", + "Min\u00fata" }, + { "field.month", + "Mesiac" }, + { "field.second", + "Sekunda" }, + { "field.week", + "T\u00fd\u017ede\u0148" }, + { "field.weekday", + "De\u0148 v t\u00fd\u017edni" }, + { "field.year", + "Rok" }, + { "field.zone", + "P\u00e1smo" }, + { "java.time.short.Eras", + new String[] { + "pred n.l.", + "n.l.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl.java b/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl.java index 864da47c77e..cdc2a596b62 100644 --- a/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl.java +++ b/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl.java @@ -76,11 +76,11 @@ package sun.text.resources.sl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sl extends ListResourceBundle { +public class FormatData_sl extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -135,6 +135,23 @@ public class FormatData_sl extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "j", + "f", + "m", + "a", + "m", + "j", + "j", + "a", + "s", + "o", + "n", + "d", + "", + } + }, { "DayNames", new String[] { "Nedelja", // Sunday @@ -157,6 +174,17 @@ public class FormatData_sl extends ListResourceBundle { "Sob" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "ned", + "pon", + "tor", + "sre", + "\u010det", + "pet", + "sob", + } + }, { "DayNarrows", new String[] { "n", @@ -211,24 +239,6 @@ public class FormatData_sl extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "calendarname.islamic-civil", "islamski civilni koledar" }, - { "calendarname.islamicc", "islamski civilni koledar" }, - { "calendarname.roc", "kitajski dr\u017eavni koledar" }, - { "calendarname.islamic", "islamski koledar" }, - { "calendarname.buddhist", "budisti\u010dni koledar" }, - { "calendarname.japanese", "japonski koledar" }, - { "calendarname.gregorian", "gregorijanski koledar" }, - { "calendarname.gregory", "gregorijanski koledar" }, - { "field.era", "Doba" }, - { "field.year", "Leto" }, - { "field.month", "Mesec" }, - { "field.week", "Teden" }, - { "field.weekday", "Dan v tednu" }, - { "field.dayperiod", "\u010cas dneva" }, - { "field.hour", "Ura" }, - { "field.minute", "Minuta" }, - { "field.second", "Sekunda" }, - { "field.zone", "Obmo\u010dje" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl_SI.java b/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl_SI.java index 198150a1652..3588c733ee3 100644 --- a/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl_SI.java +++ b/jdk/src/share/classes/sun/text/resources/sl/FormatData_sl_SI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.sl; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sl_SI extends ListResourceBundle { +public class FormatData_sl_SI extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/sl/JavaTimeSupplementary_sl.java b/jdk/src/share/classes/sun/text/resources/sl/JavaTimeSupplementary_sl.java new file mode 100644 index 00000000000..85a09a44b48 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/sl/JavaTimeSupplementary_sl.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.sl; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_sl extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "1. \u010detrtletje", + "2. \u010detrtletje", + "3. \u010detrtletje", + "4. \u010detrtletje", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "budisti\u010dni koledar" }, + { "calendarname.gregorian", + "gregorijanski koledar" }, + { "calendarname.gregory", + "gregorijanski koledar" }, + { "calendarname.islamic", + "islamski koledar" }, + { "calendarname.islamic-civil", + "islamski civilni koledar" }, + { "calendarname.islamicc", + "islamski civilni koledar" }, + { "calendarname.japanese", + "japonski koledar" }, + { "calendarname.roc", + "kitajski dr\u017eavni koledar" }, + { "field.dayperiod", + "\u010cas dneva" }, + { "field.era", + "Doba" }, + { "field.hour", + "Ura" }, + { "field.minute", + "Minuta" }, + { "field.month", + "Mesec" }, + { "field.second", + "Sekunda" }, + { "field.week", + "Teden" }, + { "field.weekday", + "Dan v tednu" }, + { "field.year", + "Leto" }, + { "field.zone", + "Obmo\u010dje" }, + { "java.time.long.Eras", + new String[] { + "pred na\u0161im \u0161tetjem", + "na\u0161e \u0161tetje", + } + }, + { "java.time.short.Eras", + new String[] { + "pr.n.\u0161.", + "po Kr.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq.java b/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq.java index 0984bb613b1..a6edf3bd1e0 100644 --- a/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq.java +++ b/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.sq; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sq extends ListResourceBundle { +public class FormatData_sq extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -82,6 +82,23 @@ public class FormatData_sq extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "S", + "M", + "P", + "M", + "Q", + "K", + "G", + "S", + "T", + "N", + "D", + "", + } + }, { "DayNames", new String[] { "e diel", // Sunday diff --git a/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq_AL.java b/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq_AL.java index 58b5532b06b..b86ab7dfc2f 100644 --- a/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq_AL.java +++ b/jdk/src/share/classes/sun/text/resources/sq/FormatData_sq_AL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.sq; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sq_AL extends ListResourceBundle { +public class FormatData_sq_AL extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/sq/JavaTimeSupplementary_sq.java b/jdk/src/share/classes/sun/text/resources/sq/JavaTimeSupplementary_sq.java new file mode 100644 index 00000000000..e5aa49d1a18 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/sq/JavaTimeSupplementary_sq.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.sq; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_sq extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "java.time.short.Eras", + new String[] { + "p.e.r.", + "n.e.r.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr.java index 793b00b2609..4d244073517 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr.java @@ -40,9 +40,9 @@ package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr extends ListResourceBundle { +public class FormatData_sr extends ParallelListResourceBundle { @Override protected final Object[][] getContents() { final String[] rocEras = { @@ -84,6 +84,40 @@ public class FormatData_sr extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "\u0458", + "\u0444", + "\u043c", + "\u0430", + "\u043c", + "\u0458", + "\u0458", + "\u0430", + "\u0441", + "\u043e", + "\u043d", + "\u0434", + "", + } + }, + { "MonthNarrows", + new String[] { + "\u0458", + "\u0444", + "\u043c", + "\u0430", + "\u043c", + "\u0458", + "\u0458", + "\u0430", + "\u0441", + "\u043e", + "\u043d", + "\u0434", + "", + } + }, { "DayNames", new String[] { "\u043d\u0435\u0434\u0435\u0459\u0430", @@ -179,57 +213,6 @@ public class FormatData_sr extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, MMMM d, y G", - "MMMM d, y G", - "MMM d, y G", - "M/d/yy G", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "islamic.MonthNames", - new String[] { - "\u041c\u0443\u0440\u0430\u0445\u0430\u043c", - "\u0421\u0430\u0444\u0430\u0440", - "\u0420\u0430\u0431\u0438\u02bb I", - "\u0420\u0430\u0431\u0438\u02bb II", - "\u0408\u0443\u043c\u0430\u0434\u0430 I", - "\u0408\u0443\u043c\u0430\u0434\u0430 II", - "\u0420\u0430\u0452\u0430\u0431", - "\u0428\u0430\u02bb\u0431\u0430\u043d", - "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", - "\u0428\u0430\u0432\u0430\u043b", - "\u0414\u0443\u02bb\u043b-\u041a\u0438\u02bb\u0434\u0430", - "\u0414\u0443\u02bb\u043b-\u0445\u0438\u0452\u0430", - "", - } - }, - { "islamic.Eras", - new String[] { - "", - "\u0410\u0425", - } - }, - { "calendarname.islamic-civil", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamicc", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamic", "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.japanese", "\u0408\u0430\u043f\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregorian", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregory", "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.roc", "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0438\u043d\u0435" }, - { "calendarname.buddhist", "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "field.era", "\u0435\u0440\u0430" }, - { "field.year", "\u0433\u043e\u0434\u0438\u043d\u0430" }, - { "field.month", "\u043c\u0435\u0441\u0435\u0446" }, - { "field.week", "\u043d\u0435\u0434\u0435\u0459\u0430" }, - { "field.weekday", "\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438" }, - { "field.dayperiod", "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435" }, - { "field.hour", "\u0447\u0430\u0441" }, - { "field.minute", "\u043c\u0438\u043d\u0443\u0442" }, - { "field.second", "\u0441\u0435\u043a\u0443\u043d\u0434" }, - { "field.zone", "\u0437\u043e\u043d\u0430" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_BA.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_BA.java index 71f17b2e1c7..2e28a11f50f 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_BA.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_BA.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr_BA extends ListResourceBundle { +public class FormatData_sr_BA extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_CS.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_CS.java index bce03dc54d3..dd626ea1c04 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_CS.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_CS.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr_CS extends ListResourceBundle { +public class FormatData_sr_CS extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { }; diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn.java index 13dd9a326f2..198b911eae9 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,12 +61,11 @@ * written authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr_Latn extends ListResourceBundle { +public class FormatData_sr_Latn extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "MonthNames", @@ -103,6 +102,23 @@ public class FormatData_sr_Latn extends ListResourceBundle { "", } }, + { "MonthNarrows", + new String[] { + "j", + "f", + "m", + "a", + "m", + "j", + "j", + "a", + "s", + "o", + "n", + "d", + "", + } + }, { "DayNames", new String[] { "nedelja", @@ -125,6 +141,17 @@ public class FormatData_sr_Latn extends ListResourceBundle { "sub", } }, + { "DayNarrows", + new String[] { + "n", + "p", + "u", + "s", + "\u010d", + "p", + "s", + } + }, { "Eras", new String[] { "p. n. e.", diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn_ME.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn_ME.java index 732d4e0f6a3..d3a88d24f59 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn_ME.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_Latn_ME.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,12 +61,11 @@ * written authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr_Latn_ME extends ListResourceBundle { +public class FormatData_sr_Latn_ME extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "TimePatterns", diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_ME.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_ME.java index 9806497c746..d3be69705f2 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_ME.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_ME.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr_ME extends ListResourceBundle { +public class FormatData_sr_ME extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { }; diff --git a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_RS.java b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_RS.java index 346e0ddbe14..332daef69b1 100644 --- a/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_RS.java +++ b/jdk/src/share/classes/sun/text/resources/sr/FormatData_sr_RS.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.sr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sr_RS extends ListResourceBundle { +public class FormatData_sr_RS extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { }; diff --git a/jdk/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr.java b/jdk/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr.java new file mode 100644 index 00000000000..c25a26bab0a --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr.java @@ -0,0 +1,219 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.sr; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_sr extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "\u041a1", + "\u041a2", + "\u041a3", + "\u041a4", + } + }, + { "QuarterNames", + new String[] { + "\u041f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + "\u0414\u0440\u0443\u0433\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + "\u0422\u0440\u0435\u045b\u0435 \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + "\u0427\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435", + } + }, + { "QuarterNarrows", + new String[] { + "1.", + "2.", + "3.", + "4.", + } + }, + { "calendarname.buddhist", + "\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregorian", + "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregory", + "\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic-civil", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamicc", + "\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.japanese", + "\u0408\u0430\u043f\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.roc", + "\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0438\u043d\u0435" }, + { "field.dayperiod", + "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435" }, + { "field.era", + "\u0435\u0440\u0430" }, + { "field.hour", + "\u0447\u0430\u0441" }, + { "field.minute", + "\u043c\u0438\u043d\u0443\u0442" }, + { "field.month", + "\u043c\u0435\u0441\u0435\u0446" }, + { "field.second", + "\u0441\u0435\u043a\u0443\u043d\u0434" }, + { "field.week", + "\u043d\u0435\u0434\u0435\u0459\u0430" }, + { "field.weekday", + "\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438" }, + { "field.year", + "\u0433\u043e\u0434\u0438\u043d\u0430" }, + { "field.zone", + "\u0437\u043e\u043d\u0430" }, + { "islamic.Eras", + new String[] { + "", + "\u0410\u0425", + } + }, + { "islamic.MonthNames", + new String[] { + "\u041c\u0443\u0440\u0430\u0445\u0430\u043c", + "\u0421\u0430\u0444\u0430\u0440", + "\u0420\u0430\u0431\u0438\u02bb I", + "\u0420\u0430\u0431\u0438\u02bb II", + "\u0408\u0443\u043c\u0430\u0434\u0430 I", + "\u0408\u0443\u043c\u0430\u0434\u0430 II", + "\u0420\u0430\u0452\u0430\u0431", + "\u0428\u0430\u02bb\u0431\u0430\u043d", + "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", + "\u0428\u0430\u0432\u0430\u043b", + "\u0414\u0443\u02bb\u043b-\u041a\u0438\u02bb\u0434\u0430", + "\u0414\u0443\u02bb\u043b-\u0445\u0438\u0452\u0430", + "", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "\u0410\u0425", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "\u0411\u0415", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, MMMM d, y G", + "MMMM d, y G", + "MMM d, y G", + "M/d/yy G", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u043d. \u0435.", + "\u041c\u0435\u0438\u0452\u0438", + "\u0422\u0430\u0438\u0448\u043e", + "\u0428\u043e\u0432\u0430", + "\u0425\u0430\u0438\u0441\u0435\u0438", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u043d. \u0435.", + "\u041c\u0435\u0438\u0452\u0438", + "\u0422\u0430\u0438\u0448\u043e", + "\u0428\u043e\u0432\u0430", + "\u0425\u0430\u0438\u0441\u0435\u0438", + } + }, + { "java.time.long.Eras", + new String[] { + "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435", + "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435", + } + }, + { "java.time.short.Eras", + new String[] { + "\u043f. \u043d. \u0435.", + "\u043d. \u0435", + } + }, + { "roc.Eras", + new String[] { + "\u041f\u0440\u0435 \u0420\u041a", + "\u0420\u041a", + } + }, + { "roc.short.Eras", + new String[] { + "\u041f\u0440\u0435 \u0420\u041a", + "\u0420\u041a", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr_Latn.java b/jdk/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr_Latn.java new file mode 100644 index 00000000000..2109447b27e --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/sr/JavaTimeSupplementary_sr_Latn.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.sr; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_sr_Latn extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "1. kvartal", + "2. kvartal", + "3. kvartal", + "4. kvartal", + } + }, + { "calendarname.buddhist", + "Budisti\u010dki kalendar" }, + { "calendarname.gregorian", + "Gregorijanski kalendar" }, + { "calendarname.gregory", + "Gregorijanski kalendar" }, + { "calendarname.islamic", + "Islamski kalendar" }, + { "calendarname.islamic-civil", + "Islamski civilni kalendar" }, + { "calendarname.islamicc", + "Islamski civilni kalendar" }, + { "calendarname.japanese", + "Japanski kalendar" }, + { "calendarname.roc", + "Kalendar Republike Kine" }, + { "field.dayperiod", + "pre podne/ popodne" }, + { "field.era", + "era" }, + { "field.hour", + "\u010das" }, + { "field.minute", + "minut" }, + { "field.month", + "mesec" }, + { "field.second", + "sekund" }, + { "field.week", + "nedelja" }, + { "field.weekday", + "dan u nedelji" }, + { "field.year", + "godina" }, + { "field.zone", + "zona" }, + { "java.time.long.Eras", + new String[] { + "Pre nove ere", + "Nove ere", + } + }, + { "java.time.short.Eras", + new String[] { + "p. n. e.", + "n. e", + } + }, + { "roc.Eras", + new String[] { + "Pre RK", + "RK", + } + }, + { "roc.short.Eras", + new String[] { + "Pre RK", + "RK", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv.java b/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv.java index b7ee4e78d57..8f7296bcee2 100644 --- a/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv.java +++ b/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv.java @@ -76,11 +76,11 @@ package sun.text.resources.sv; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sv extends ListResourceBundle { +public class FormatData_sv extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -106,6 +106,23 @@ public class FormatData_sv extends ListResourceBundle { "" // month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "J", + "F", + "M", + "A", + "M", + "J", + "J", + "A", + "S", + "O", + "N", + "D", + "", + } + }, { "MonthAbbreviations", new String[] { "jan", // abb january @@ -123,6 +140,23 @@ public class FormatData_sv extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "jan", + "feb", + "mar", + "apr", + "maj", + "jun", + "jul", + "aug", + "sep", + "okt", + "nov", + "dec", + "", + } + }, { "standalone.MonthNarrows", new String[] { "J", @@ -162,6 +196,17 @@ public class FormatData_sv extends ListResourceBundle { "l\u00f6" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "s\u00f6n", + "m\u00e5n", + "tis", + "ons", + "tor", + "fre", + "l\u00f6r", + } + }, { "DayNarrows", new String[] { "S", @@ -173,6 +218,17 @@ public class FormatData_sv extends ListResourceBundle { "L", } }, + { "standalone.DayNames", + new String[] { + "s\u00f6ndag", + "m\u00e5ndag", + "tisdag", + "onsdag", + "torsdag", + "fredag", + "l\u00f6rdag", + } + }, { "standalone.DayNarrows", new String[] { "S", @@ -184,6 +240,18 @@ public class FormatData_sv extends ListResourceBundle { "L", } }, + { "Eras", + new String[] { + "f\u00f6re Kristus", + "efter Kristus", + } + }, + { "short.Eras", + new String[] { + "f.Kr.", + "e.Kr.", + } + }, { "narrow.Eras", new String[] { "f.Kr.", @@ -239,74 +307,6 @@ public class FormatData_sv extends ListResourceBundle { } }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "G yyyy-MM-dd", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "G y-MM-dd", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "G y-MM-dd", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "d MMMM y GGGG", - "d MMM y GGGG", - "GGGG y-MM-dd", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE d MMMM y G", - "d MMMM y G", - "d MMM y G", - "G y-MM-dd", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE d MMMM y GGGG", - "d MMMM y GGGG", - "d MMM y GGGG", - "GGGG y-MM-dd", - } - }, - { "calendarname.islamic-civil", "islamisk civil kalender" }, - { "calendarname.islamicc", "islamisk civil kalender" }, - { "calendarname.islamic", "islamisk kalender" }, - { "calendarname.japanese", "japansk kalender" }, - { "calendarname.gregorian", "gregoriansk kalender" }, - { "calendarname.gregory", "gregoriansk kalender" }, - { "calendarname.roc", "kinesiska republikens kalender" }, - { "calendarname.buddhist", "buddistisk kalender" }, - { "field.era", "era" }, - { "field.year", "\u00e5r" }, - { "field.month", "m\u00e5nad" }, - { "field.week", "vecka" }, - { "field.weekday", "veckodag" }, - { "field.dayperiod", "fm/em" }, - { "field.hour", "timme" }, - { "field.minute", "minut" }, - { "field.second", "sekund" }, - { "field.zone", "tidszon" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv_SE.java b/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv_SE.java index f7100c5daa3..a9a7881a607 100644 --- a/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv_SE.java +++ b/jdk/src/share/classes/sun/text/resources/sv/FormatData_sv_SE.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.sv; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_sv_SE extends ListResourceBundle { +public class FormatData_sv_SE extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/sv/JavaTimeSupplementary_sv.java b/jdk/src/share/classes/sun/text/resources/sv/JavaTimeSupplementary_sv.java new file mode 100644 index 00000000000..f54fbceaadd --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/sv/JavaTimeSupplementary_sv.java @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.sv; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_sv extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "K1", + "K2", + "K3", + "K4", + } + }, + { "QuarterNames", + new String[] { + "1:a kvartalet", + "2:a kvartalet", + "3:e kvartalet", + "4:e kvartalet", + } + }, + { "calendarname.buddhist", + "buddistisk kalender" }, + { "calendarname.gregorian", + "gregoriansk kalender" }, + { "calendarname.gregory", + "gregoriansk kalender" }, + { "calendarname.islamic", + "islamisk kalender" }, + { "calendarname.islamic-civil", + "islamisk civil kalender" }, + { "calendarname.islamicc", + "islamisk civil kalender" }, + { "calendarname.japanese", + "japansk kalender" }, + { "calendarname.roc", + "kinesiska republikens kalender" }, + { "field.dayperiod", + "fm/em" }, + { "field.era", + "era" }, + { "field.hour", + "timme" }, + { "field.minute", + "minut" }, + { "field.month", + "m\u00e5nad" }, + { "field.second", + "sekund" }, + { "field.week", + "vecka" }, + { "field.weekday", + "veckodag" }, + { "field.year", + "\u00e5r" }, + { "field.zone", + "tidszon" }, + { "islamic.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM y GGGG", + "GGGG y-MM-dd", + } + }, + { "islamic.MonthNames", + new String[] { + "muharram", + "safar", + "rabi\u2019 al-awwal", + "rabi\u2019 al-akhir", + "jumada-l-ula", + "jumada-l-akhira", + "rajab", + "sha\u2019ban", + "ramadan", + "shawwal", + "dhu-l-ga\u2019da", + "dhu-l-hijja", + "", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "G yyyy-MM-dd", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "G y-MM-dd", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "G y-MM-dd", + } + }, + { "java.time.long.Eras", + new String[] { + "f\u00f6re Kristus", + "efter Kristus", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE d MMMM y G", + "d MMMM y G", + "d MMM y G", + "G y-MM-dd", + } + }, + { "java.time.short.Eras", + new String[] { + "f\u00f6re Kristus", + "efter Kristus", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE d MMMM y GGGG", + "d MMMM y GGGG", + "d MMM y GGGG", + "GGGG y-MM-dd", + } + }, + { "roc.Eras", + new String[] { + "f\u00f6re R.K.", + "R.K.", + } + }, + { "roc.short.Eras", + new String[] { + "f\u00f6re R.K.", + "R.K.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/th/FormatData_th.java b/jdk/src/share/classes/sun/text/resources/th/FormatData_th.java index aa6bd7fa10a..15c679a0d98 100644 --- a/jdk/src/share/classes/sun/text/resources/th/FormatData_th.java +++ b/jdk/src/share/classes/sun/text/resources/th/FormatData_th.java @@ -76,11 +76,11 @@ package sun.text.resources.th; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_th extends ListResourceBundle { +public class FormatData_th extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { String[] timePatterns = new String[] { @@ -135,6 +135,23 @@ public class FormatData_th extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u0e21.\u0e04.", + "\u0e01.\u0e1e.", + "\u0e21\u0e35.\u0e04.", + "\u0e40\u0e21.\u0e22.", + "\u0e1e.\u0e04.", + "\u0e21\u0e34.\u0e22", + "\u0e01.\u0e04.", + "\u0e2a.\u0e04.", + "\u0e01.\u0e22.", + "\u0e15.\u0e04.", + "\u0e1e.\u0e22.", + "\u0e18.\u0e04.", + "", + } + }, { "standalone.MonthNarrows", new String[] { "\u0e21.\u0e04.", @@ -209,23 +226,39 @@ public class FormatData_th extends ListResourceBundle { "\u0e04.\u0e28." } }, + { "short.Eras", + new String[] { + "\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.", + "\u0e04.\u0e28.", + } + }, { "narrow.Eras", new String[] { "\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.", "\u0e04.\u0e28.", } }, + { "japanese.Eras", + new String[] { + "\u0e04.\u0e28.", + "\u0e40\u0e21\u0e08\u0e34", + "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a", + "\u0e42\u0e0a\u0e27\u0e30", + "\u0e40\u0e2e\u0e40\u0e0b", + } + }, + { "japanese.short.Eras", + new String[] { + "\u0e04.\u0e28.", + "\u0e21", + "\u0e17", + "\u0e0a", + "\u0e2e", + } + }, { "buddhist.TimePatterns", timePatterns }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE\u0e17\u0e35\u0e48 d MMMM G y", - "d MMMM y", - "d MMM y", - "d/M/yyyy", - } - }, { "buddhist.DatePatterns", datePatterns }, @@ -242,77 +275,6 @@ public class FormatData_th extends ListResourceBundle { dateTimePatterns }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y", - "d MMMM \u0e1b\u0e35G y", - "d MMM G y", - "d/M/yy", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y", - "d MMMM \u0e1b\u0e35G y", - "d MMM G y", - "d/M/yy", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y", - "d MMMM \u0e1b\u0e35GGGG y", - "d MMM GGGG y", - "d/M/yy", - } - }, - { "islamic.MonthNames", - new String[] { - "\u0e21\u0e38\u0e2e\u0e30\u0e23\u0e4c\u0e23\u0e2d\u0e21", - "\u0e0b\u0e2d\u0e1f\u0e32\u0e23\u0e4c", - "\u0e23\u0e2d\u0e1a\u0e35 I", - "\u0e23\u0e2d\u0e1a\u0e35 II", - "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 I", - "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 II", - "\u0e23\u0e2d\u0e08\u0e31\u0e1a", - "\u0e0a\u0e30\u0e2d\u0e30\u0e1a\u0e32\u0e19", - "\u0e23\u0e2d\u0e21\u0e30\u0e14\u0e2d\u0e19", - "\u0e40\u0e0a\u0e32\u0e27\u0e31\u0e25", - "\u0e14\u0e2e\u0e38\u0e38\u0e2d\u0e31\u0e25\u0e01\u0e34\u0e14\u0e30\u0e2b\u0e4c", - "\u0e14\u0e2e\u0e38\u0e2d\u0e31\u0e25\u0e2e\u0e34\u0e08\u0e08\u0e30\u0e2b\u0e4c", - "", - } - }, - { "islamic.long.Eras", - new String[] { - "", - "\u0e2e\u0e34\u0e08\u0e40\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", - } - }, - { "islamic.Eras", - new String[] { - "", - "\u0e2e.\u0e28.", - } - }, - { "calendarname.islamic-civil", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" }, - { "calendarname.islamicc", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" }, - { "calendarname.islamic", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21" }, - { "calendarname.japanese", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" }, - { "calendarname.gregorian", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" }, - { "calendarname.gregory", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" }, - { "calendarname.roc", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19" }, - { "calendarname.buddhist", "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" }, - { "field.era", "\u0e2a\u0e21\u0e31\u0e22" }, - { "field.year", "\u0e1b\u0e35" }, - { "field.month", "\u0e40\u0e14\u0e37\u0e2d\u0e19" }, - { "field.week", "\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" }, - { "field.weekday", "\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" }, - { "field.dayperiod", "\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19" }, - { "field.hour", "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07" }, - { "field.minute", "\u0e19\u0e32\u0e17\u0e35" }, - { "field.second", "\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35" }, - { "field.zone", "\u0e40\u0e02\u0e15" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/th/FormatData_th_TH.java b/jdk/src/share/classes/sun/text/resources/th/FormatData_th_TH.java index c2a095081d2..f41df1f7ecd 100644 --- a/jdk/src/share/classes/sun/text/resources/th/FormatData_th_TH.java +++ b/jdk/src/share/classes/sun/text/resources/th/FormatData_th_TH.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.th; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_th_TH extends ListResourceBundle { +public class FormatData_th_TH extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/th/JavaTimeSupplementary_th.java b/jdk/src/share/classes/sun/text/resources/th/JavaTimeSupplementary_th.java new file mode 100644 index 00000000000..b0f4bbcae7c --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/th/JavaTimeSupplementary_th.java @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.th; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_th extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1", + "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2", + "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3", + "\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" }, + { "calendarname.gregorian", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" }, + { "calendarname.gregory", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19" }, + { "calendarname.islamic", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21" }, + { "calendarname.islamic-civil", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" }, + { "calendarname.islamicc", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25" }, + { "calendarname.japanese", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" }, + { "calendarname.roc", + "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19" }, + { "field.dayperiod", + "\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19" }, + { "field.era", + "\u0e2a\u0e21\u0e31\u0e22" }, + { "field.hour", + "\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07" }, + { "field.minute", + "\u0e19\u0e32\u0e17\u0e35" }, + { "field.month", + "\u0e40\u0e14\u0e37\u0e2d\u0e19" }, + { "field.second", + "\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35" }, + { "field.week", + "\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" }, + { "field.weekday", + "\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c" }, + { "field.year", + "\u0e1b\u0e35" }, + { "field.zone", + "\u0e40\u0e02\u0e15" }, + { "islamic.Eras", + new String[] { + "", + "\u0e2e.\u0e28.", + } + }, + { "islamic.MonthNames", + new String[] { + "\u0e21\u0e38\u0e2e\u0e30\u0e23\u0e4c\u0e23\u0e2d\u0e21", + "\u0e0b\u0e2d\u0e1f\u0e32\u0e23\u0e4c", + "\u0e23\u0e2d\u0e1a\u0e35 I", + "\u0e23\u0e2d\u0e1a\u0e35 II", + "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 I", + "\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 II", + "\u0e23\u0e2d\u0e08\u0e31\u0e1a", + "\u0e0a\u0e30\u0e2d\u0e30\u0e1a\u0e32\u0e19", + "\u0e23\u0e2d\u0e21\u0e30\u0e14\u0e2d\u0e19", + "\u0e40\u0e0a\u0e32\u0e27\u0e31\u0e25", + "\u0e14\u0e2e\u0e38\u0e38\u0e2d\u0e31\u0e25\u0e01\u0e34\u0e14\u0e30\u0e2b\u0e4c", + "\u0e14\u0e2e\u0e38\u0e2d\u0e31\u0e25\u0e2e\u0e34\u0e08\u0e08\u0e30\u0e2b\u0e4c", + "", + } + }, + { "islamic.long.Eras", + new String[] { + "", + "\u0e2e\u0e34\u0e08\u0e40\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "\u0e2e.\u0e28.", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE\u0e17\u0e35\u0e48 d MMMM G y", + "d MMMM y", + "d MMM y", + "d/M/yyyy", + } + }, + { "java.time.buddhist.long.Eras", + new String[] { + "BC", + "\u0e1e\u0e38\u0e17\u0e18\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e01\u0e32\u0e25\u0e17\u0e35\u0e48", + "\u0e1e.\u0e28.", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y", + "d MMMM \u0e1b\u0e35G y", + "d MMM G y", + "d/M/yy", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u0e04.\u0e28.", + "\u0e40\u0e21\u0e08\u0e34", + "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a", + "\u0e42\u0e0a\u0e27\u0e30", + "\u0e40\u0e2e\u0e40\u0e0b", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u0e04.\u0e28.", + "\u0e40\u0e21\u0e08\u0e34", + "\u0e17\u0e30\u0e2d\u0e34\u0e42\u0e0a", + "\u0e42\u0e0a\u0e27\u0e30", + "\u0e40\u0e2e\u0e40\u0e0b", + } + }, + { "java.time.long.Eras", + new String[] { + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", + "\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35G\u0e17\u0e35\u0e48 y", + "d MMMM \u0e1b\u0e35G y", + "d MMM G y", + "d/M/yy", + } + }, + { "java.time.short.Eras", + new String[] { + "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e01\u0e32\u0e25\u0e17\u0e35\u0e48", + "\u0e04.\u0e28.", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y", + "d MMMM \u0e1b\u0e35GGGG y", + "d MMM GGGG y", + "d/M/yy", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr.java b/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr.java index c8fc0f540e9..8f37c6058bd 100644 --- a/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr.java +++ b/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr.java @@ -76,11 +76,11 @@ package sun.text.resources.tr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_tr extends ListResourceBundle { +public class FormatData_tr extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -101,6 +101,23 @@ public class FormatData_tr extends ListResourceBundle { "" // month 13 if applicable } }, + { "standalone.MonthNames", + new String[] { + "Ocak", + "\u015eubat", + "Mart", + "Nisan", + "May\u0131s", + "Haziran", + "Temmuz", + "A\u011fustos", + "Eyl\u00fcl", + "Ekim", + "Kas\u0131m", + "Aral\u0131k", + "", + } + }, { "MonthAbbreviations", new String[] { "Oca", // abb january @@ -118,6 +135,40 @@ public class FormatData_tr extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "Oca", + "\u015eub", + "Mar", + "Nis", + "May", + "Haz", + "Tem", + "A\u011fu", + "Eyl", + "Eki", + "Kas", + "Ara", + "", + } + }, + { "MonthNarrows", + new String[] { + "O", + "\u015e", + "M", + "N", + "M", + "H", + "T", + "A", + "E", + "E", + "K", + "A", + "", + } + }, { "standalone.MonthNarrows", new String[] { "O", @@ -146,6 +197,17 @@ public class FormatData_tr extends ListResourceBundle { "Cumartesi" // Saturday } }, + { "standalone.DayNames", + new String[] { + "Pazar", + "Pazartesi", + "Sal\u0131", + "\u00c7ar\u015famba", + "Per\u015fembe", + "Cuma", + "Cumartesi", + } + }, { "DayAbbreviations", new String[] { "Paz", // abb Sunday @@ -157,6 +219,17 @@ public class FormatData_tr extends ListResourceBundle { "Cmt" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "Paz", + "Pzt", + "Sal", + "\u00c7ar", + "Per", + "Cum", + "Cmt", + } + }, { "DayNarrows", new String[] { "P", @@ -168,6 +241,29 @@ public class FormatData_tr extends ListResourceBundle { "C", } }, + { "standalone.DayNarrows", + new String[] { + "P", + "P", + "S", + "\u00c7", + "P", + "C", + "C", + } + }, + { "long.Eras", + new String[] { + "Milattan \u00d6nce", + "Milattan Sonra", + } + }, + { "Eras", + new String[] { + "M\u00d6", + "MS", + } + }, { "NumberPatterns", new String[] { "#,##0.###;-#,##0.###", // decimal pattern @@ -212,89 +308,6 @@ public class FormatData_tr extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "dd MMMM y G EEEE", - "dd MMMM y G", - "dd MMM y G", - "dd.MM.yyyy G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "dd MMMM y G EEEE", - "dd MMMM y G", - "dd MMM y G", - "dd.MM.yyyy G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "dd MMMM y G EEEE", - "dd MMMM y G", - "dd MMM y G", - "dd.MM.yyyy G", - } - }, - { "roc.DatePatterns", - new String[] { - "dd MMMM y GGGG EEEE", - "dd MMMM y GGGG", - "dd MMM y GGGG", - "dd.MM.yyyy GGGG", - } - }, - { "islamic.MonthNames", - new String[] { - "Muharrem", - "Safer", - "Rebi\u00fclevvel", - "Rebi\u00fclahir", - "Cemaziyelevvel", - "Cemaziyelahir", - "Recep", - "\u015eaban", - "Ramazan", - "\u015eevval", - "Zilkade", - "Zilhicce", - "", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "dd MMMM y G EEEE", - "dd MMMM y G", - "dd MMM y G", - "dd.MM.yyyy G", - } - }, - { "islamic.DatePatterns", - new String[] { - "dd MMMM y GGGG EEEE", - "dd MMMM y GGGG", - "dd MMM y GGGG", - "dd.MM.yyyy GGGG", - } - }, - { "calendarname.islamic-civil", "Arap Takvimi" }, - { "calendarname.islamicc", "Arap Takvimi" }, - { "calendarname.islamic", "Hicri Takvim" }, - { "calendarname.japanese", "Japon Takvimi" }, - { "calendarname.gregorian", "Miladi Takvim" }, - { "calendarname.gregory", "Miladi Takvim" }, - { "calendarname.roc", "\u00c7in Cumhuriyeti Takvimi" }, - { "calendarname.buddhist", "Budist Takvimi" }, - { "field.era", "Miladi D\u00f6nem" }, - { "field.year", "Y\u0131l" }, - { "field.month", "Ay" }, - { "field.week", "Hafta" }, - { "field.weekday", "Haftan\u0131n G\u00fcn\u00fc" }, - { "field.dayperiod", "AM/PM" }, - { "field.hour", "Saat" }, - { "field.minute", "Dakika" }, - { "field.second", "Saniye" }, - { "field.zone", "Saat Dilimi" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr_TR.java b/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr_TR.java index 3e4c35160ea..7cff320324b 100644 --- a/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr_TR.java +++ b/jdk/src/share/classes/sun/text/resources/tr/FormatData_tr_TR.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.tr; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_tr_TR extends ListResourceBundle { +public class FormatData_tr_TR extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/tr/JavaTimeSupplementary_tr.java b/jdk/src/share/classes/sun/text/resources/tr/JavaTimeSupplementary_tr.java new file mode 100644 index 00000000000..a26961f8f11 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/tr/JavaTimeSupplementary_tr.java @@ -0,0 +1,211 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.tr; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_tr extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "\u00c71", + "\u00c72", + "\u00c73", + "\u00c74", + } + }, + { "QuarterNames", + new String[] { + "1. \u00e7eyrek", + "2. \u00e7eyrek", + "3. \u00e7eyrek", + "4. \u00e7eyrek", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "Budist Takvimi" }, + { "calendarname.gregorian", + "Miladi Takvim" }, + { "calendarname.gregory", + "Miladi Takvim" }, + { "calendarname.islamic", + "Hicri Takvim" }, + { "calendarname.islamic-civil", + "Arap Takvimi" }, + { "calendarname.islamicc", + "Arap Takvimi" }, + { "calendarname.japanese", + "Japon Takvimi" }, + { "calendarname.roc", + "\u00c7in Cumhuriyeti Takvimi" }, + { "field.dayperiod", + "AM/PM" }, + { "field.era", + "Miladi D\u00f6nem" }, + { "field.hour", + "Saat" }, + { "field.minute", + "Dakika" }, + { "field.month", + "Ay" }, + { "field.second", + "Saniye" }, + { "field.week", + "Hafta" }, + { "field.weekday", + "Haftan\u0131n G\u00fcn\u00fc" }, + { "field.year", + "Y\u0131l" }, + { "field.zone", + "Saat Dilimi" }, + { "islamic.DatePatterns", + new String[] { + "dd MMMM y GGGG EEEE", + "dd MMMM y GGGG", + "dd MMM y GGGG", + "dd.MM.yyyy GGGG", + } + }, + { "islamic.MonthNames", + new String[] { + "Muharrem", + "Safer", + "Rebi\u00fclevvel", + "Rebi\u00fclahir", + "Cemaziyelevvel", + "Cemaziyelahir", + "Recep", + "\u015eaban", + "Ramazan", + "\u015eevval", + "Zilkade", + "Zilhicce", + "", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "dd MMMM y G EEEE", + "dd MMMM y G", + "dd MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "dd MMMM y G EEEE", + "dd MMMM y G", + "dd MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "dd MMMM y G EEEE", + "dd MMMM y G", + "dd MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.long.Eras", + new String[] { + "Milattan \u00d6nce", + "Milattan Sonra", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "dd MMMM y G EEEE", + "dd MMMM y G", + "dd MMM y G", + "dd.MM.yyyy G", + } + }, + { "java.time.short.Eras", + new String[] { + "M\u00d6", + "MS", + } + }, + { "roc.DatePatterns", + new String[] { + "dd MMMM y GGGG EEEE", + "dd MMMM y GGGG", + "dd MMM y GGGG", + "dd.MM.yyyy GGGG", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk.java b/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk.java index 1d896f6dad4..6054f22fdf6 100644 --- a/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk.java +++ b/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk.java @@ -76,11 +76,11 @@ package sun.text.resources.uk; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_uk extends ListResourceBundle { +public class FormatData_uk extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -152,6 +152,23 @@ public class FormatData_uk extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "\u0421", + "\u041b", + "\u0411", + "\u041a", + "\u0422", + "\u0427", + "\u041b", + "\u0421", + "\u0412", + "\u0416", + "\u041b", + "\u0413", + "", + } + }, { "DayNames", new String[] { "\u043d\u0435\u0434\u0456\u043b\u044f", // Sunday @@ -228,41 +245,6 @@ public class FormatData_uk extends ListResourceBundle { } }, { "DateTimePatternChars", "GanjkHmsSEDFwWxhKzZ" }, - { "islamic.MonthNames", - new String[] { - "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c", - "\u0421\u0430\u0444\u0430\u0440", - "\u0420\u0430\u0431\u0456 I", - "\u0420\u0430\u0431\u0456 II", - "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 I", - "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 II", - "\u0420\u0430\u0434\u0436\u0430\u0431", - "\u0428\u0430\u0430\u0431\u0430\u043d", - "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", - "\u0414\u0430\u0432\u0432\u0430\u043b", - "\u0417\u0443-\u043b\u044c-\u043a\u0430\u0430\u0434\u0430", - "\u0417\u0443-\u043b\u044c-\u0445\u0456\u0434\u0436\u0430", - "", - } - }, - { "calendarname.islamic-civil", "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamicc", "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.islamic", "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.japanese", "\u042f\u043f\u043e\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregorian", "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.gregory", "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "calendarname.roc", "\u041a\u0438\u0442\u0430\u0439\u0441\u044c\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439" }, - { "calendarname.buddhist", "\u0411\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, - { "field.era", "\u0415\u0440\u0430" }, - { "field.year", "\u0420\u0456\u043a" }, - { "field.month", "\u041c\u0456\u0441\u044f\u0446\u044c" }, - { "field.week", "\u0422\u0438\u0436\u0434\u0435\u043d\u044c" }, - { "field.weekday", "\u0414\u0435\u043d\u044c \u0442\u0438\u0436\u043d\u044f" }, - { "field.dayperiod", "\u0427\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u043e\u0431\u0438" }, - { "field.hour", "\u0413\u043e\u0434\u0438\u043d\u0430" }, - { "field.minute", "\u0425\u0432\u0438\u043b\u0438\u043d\u0430" }, - { "field.second", "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" }, - { "field.zone", "\u0417\u043e\u043d\u0430" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk_UA.java b/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk_UA.java index 2b48731f8fe..b04732e6a91 100644 --- a/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk_UA.java +++ b/jdk/src/share/classes/sun/text/resources/uk/FormatData_uk_UA.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.uk; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_uk_UA extends ListResourceBundle { +public class FormatData_uk_UA extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/uk/JavaTimeSupplementary_uk.java b/jdk/src/share/classes/sun/text/resources/uk/JavaTimeSupplementary_uk.java new file mode 100644 index 00000000000..7a239203ec2 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/uk/JavaTimeSupplementary_uk.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.uk; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_uk extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "I \u043a\u0432.", + "II \u043a\u0432.", + "III \u043a\u0432.", + "IV \u043a\u0432.", + } + }, + { "QuarterNames", + new String[] { + "I \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "II \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "III \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + "IV \u043a\u0432\u0430\u0440\u0442\u0430\u043b", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u0411\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregorian", + "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.gregory", + "\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic", + "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamic-civil", + "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.islamicc", + "\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.japanese", + "\u042f\u043f\u043e\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440" }, + { "calendarname.roc", + "\u041a\u0438\u0442\u0430\u0439\u0441\u044c\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439" }, + { "field.dayperiod", + "\u0427\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u043e\u0431\u0438" }, + { "field.era", + "\u0415\u0440\u0430" }, + { "field.hour", + "\u0413\u043e\u0434\u0438\u043d\u0430" }, + { "field.minute", + "\u0425\u0432\u0438\u043b\u0438\u043d\u0430" }, + { "field.month", + "\u041c\u0456\u0441\u044f\u0446\u044c" }, + { "field.second", + "\u0421\u0435\u043a\u0443\u043d\u0434\u0430" }, + { "field.week", + "\u0422\u0438\u0436\u0434\u0435\u043d\u044c" }, + { "field.weekday", + "\u0414\u0435\u043d\u044c \u0442\u0438\u0436\u043d\u044f" }, + { "field.year", + "\u0420\u0456\u043a" }, + { "field.zone", + "\u0417\u043e\u043d\u0430" }, + { "islamic.MonthNames", + new String[] { + "\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c", + "\u0421\u0430\u0444\u0430\u0440", + "\u0420\u0430\u0431\u0456 I", + "\u0420\u0430\u0431\u0456 II", + "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 I", + "\u0414\u0436\u0443\u043c\u0430\u0434\u0430 II", + "\u0420\u0430\u0434\u0436\u0430\u0431", + "\u0428\u0430\u0430\u0431\u0430\u043d", + "\u0420\u0430\u043c\u0430\u0434\u0430\u043d", + "\u0414\u0430\u0432\u0432\u0430\u043b", + "\u0417\u0443-\u043b\u044c-\u043a\u0430\u0430\u0434\u0430", + "\u0417\u0443-\u043b\u044c-\u0445\u0456\u0434\u0436\u0430", + "", + } + }, + { "java.time.long.Eras", + new String[] { + "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438", + "\u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438", + } + }, + { "java.time.short.Eras", + new String[] { + "\u0434\u043e \u043d.\u0435.", + "\u043f\u0456\u0441\u043b\u044f \u043d.\u0435.", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi.java b/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi.java index c0d1f2dd250..55c5e3ebc75 100644 --- a/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi.java +++ b/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi.java @@ -78,11 +78,11 @@ package sun.text.resources.vi; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_vi extends ListResourceBundle { +public class FormatData_vi extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { @@ -120,6 +120,23 @@ public class FormatData_vi extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, { "DayNames", new String[] { "Ch\u1ee7 nh\u1eadt", // Sunday @@ -153,6 +170,17 @@ public class FormatData_vi extends ListResourceBundle { "T7", } }, + { "standalone.DayNarrows", + new String[] { + "CN", + "T2", + "T3", + "T4", + "T5", + "T6", + "T7", + } + }, { "AmPmMarkers", new String[] { "SA", // am marker @@ -201,72 +229,6 @@ public class FormatData_vi extends ListResourceBundle { "{0} {1}" // date-time pattern } }, - { "cldr.buddhist.DatePatterns", - new String[] { - "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", - "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", - "dd-MM-yyyy G", - "dd/MM/yyyy G", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", - "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", - "dd-MM-y G", - "dd/MM/y G", - } - }, - { "cldr.roc.DatePatterns", - new String[] { - "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", - "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", - "dd-MM-y G", - "dd/MM/y G", - } - }, - { "roc.DatePatterns", - new String[] { - "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG", - "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG", - "dd-MM-y GGGG", - "dd/MM/y GGGG", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", - "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", - "dd-MM-y G", - "dd/MM/y G", - } - }, - { "islamic.DatePatterns", - new String[] { - "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG", - "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG", - "dd-MM-y GGGG", - "dd/MM/y GGGG", - } - }, - { "calendarname.islamic-civil", "L\u1ecbch Islamic-Civil" }, - { "calendarname.islamicc", "L\u1ecbch Islamic-Civil" }, - { "calendarname.islamic", "L\u1ecbch Islamic" }, - { "calendarname.buddhist", "L\u1ecbch Ph\u1eadt Gi\u00e1o" }, - { "calendarname.japanese", "L\u1ecbch Nh\u1eadt B\u1ea3n" }, - { "calendarname.roc", "L\u1ecbch Trung Hoa D\u00e2n Qu\u1ed1c" }, - { "calendarname.gregorian", "L\u1ecbch Gregory" }, - { "calendarname.gregory", "L\u1ecbch Gregory" }, - { "field.era", "Th\u1eddi \u0111\u1ea1i" }, - { "field.year", "N\u0103m" }, - { "field.month", "Th\u00e1ng" }, - { "field.week", "Tu\u1ea7n" }, - { "field.weekday", "Ng\u00e0y trong tu\u1ea7n" }, - { "field.dayperiod", "SA/CH" }, - { "field.hour", "Gi\u1edd" }, - { "field.minute", "Ph\u00fat" }, - { "field.second", "Gi\u00e2y" }, - { "field.zone", "M\u00fai gi\u1edd" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi_VN.java b/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi_VN.java index 5667c8b9d17..0255674eede 100644 --- a/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi_VN.java +++ b/jdk/src/share/classes/sun/text/resources/vi/FormatData_vi_VN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,11 +42,11 @@ package sun.text.resources.vi; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_vi_VN extends ListResourceBundle { +public class FormatData_vi_VN extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/vi/JavaTimeSupplementary_vi.java b/jdk/src/share/classes/sun/text/resources/vi/JavaTimeSupplementary_vi.java new file mode 100644 index 00000000000..ef8294ce309 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/vi/JavaTimeSupplementary_vi.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.vi; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_vi extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "Q1", + "Q2", + "Q3", + "Q4", + } + }, + { "QuarterNames", + new String[] { + "Qu\u00fd 1", + "Qu\u00fd 2", + "Qu\u00fd 3", + "Qu\u00fd 4", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "L\u1ecbch Ph\u1eadt Gi\u00e1o" }, + { "calendarname.gregorian", + "L\u1ecbch Gregory" }, + { "calendarname.gregory", + "L\u1ecbch Gregory" }, + { "calendarname.islamic", + "L\u1ecbch Islamic" }, + { "calendarname.islamic-civil", + "L\u1ecbch Islamic-Civil" }, + { "calendarname.islamicc", + "L\u1ecbch Islamic-Civil" }, + { "calendarname.japanese", + "L\u1ecbch Nh\u1eadt B\u1ea3n" }, + { "calendarname.roc", + "L\u1ecbch Trung Hoa D\u00e2n Qu\u1ed1c" }, + { "field.dayperiod", + "SA/CH" }, + { "field.era", + "Th\u1eddi \u0111\u1ea1i" }, + { "field.hour", + "Gi\u1edd" }, + { "field.minute", + "Ph\u00fat" }, + { "field.month", + "Th\u00e1ng" }, + { "field.second", + "Gi\u00e2y" }, + { "field.week", + "Tu\u1ea7n" }, + { "field.weekday", + "Ng\u00e0y trong tu\u1ea7n" }, + { "field.year", + "N\u0103m" }, + { "field.zone", + "M\u00fai gi\u1edd" }, + { "islamic.DatePatterns", + new String[] { + "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG", + "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG", + "dd-MM-y GGGG", + "dd/MM/y GGGG", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", + "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", + "dd-MM-yyyy G", + "dd/MM/yyyy G", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", + "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", + "dd-MM-y G", + "dd/MM/y G", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", + "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", + "dd-MM-y G", + "dd/MM/y G", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y G", + "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y G", + "dd-MM-y G", + "dd/MM/y G", + } + }, + { "java.time.short.Eras", + new String[] { + "tr. CN", + "sau CN", + } + }, + { "roc.DatePatterns", + new String[] { + "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG", + "'Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG", + "dd-MM-y GGGG", + "dd/MM/y GGGG", + } + }, + { "roc.Eras", + new String[] { + "Tr\u01b0\u1edbc R.O.C", + "", + } + }, + { "roc.short.Eras", + new String[] { + "Tr\u01b0\u1edbc R.O.C", + "", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh.java b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh.java index 83e0d7871ef..1f8f7cb31ff 100644 --- a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh.java +++ b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh.java @@ -76,11 +76,11 @@ package sun.text.resources.zh; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_zh extends ListResourceBundle { +public class FormatData_zh extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -106,6 +106,23 @@ public class FormatData_zh extends ListResourceBundle { "" // month 13 if applicable } }, + { "standalone.MonthNames", + new String[] { + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708", + "", + } + }, { "MonthAbbreviations", new String[] { "\u4e00\u6708", // abb january @@ -123,6 +140,40 @@ public class FormatData_zh extends ListResourceBundle { "" // abb month 13 if applicable } }, + { "standalone.MonthAbbreviations", + new String[] { + "\u4e00\u6708", + "\u4e8c\u6708", + "\u4e09\u6708", + "\u56db\u6708", + "\u4e94\u6708", + "\u516d\u6708", + "\u4e03\u6708", + "\u516b\u6708", + "\u4e5d\u6708", + "\u5341\u6708", + "\u5341\u4e00\u6708", + "\u5341\u4e8c\u6708", + "", + } + }, + { "MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, { "standalone.MonthNarrows", new String[] { "1\u6708", @@ -151,6 +202,17 @@ public class FormatData_zh extends ListResourceBundle { "\u661f\u671f\u516d" // Saturday } }, + { "standalone.DayNames", + new String[] { + "\u661f\u671f\u65e5", + "\u661f\u671f\u4e00", + "\u661f\u671f\u4e8c", + "\u661f\u671f\u4e09", + "\u661f\u671f\u56db", + "\u661f\u671f\u4e94", + "\u661f\u671f\u516d", + } + }, { "DayAbbreviations", new String[] { "\u661f\u671f\u65e5", // abb Sunday @@ -162,6 +224,17 @@ public class FormatData_zh extends ListResourceBundle { "\u661f\u671f\u516d" // abb Saturday } }, + { "standalone.DayAbbreviations", + new String[] { + "\u5468\u65e5", + "\u5468\u4e00", + "\u5468\u4e8c", + "\u5468\u4e09", + "\u5468\u56db", + "\u5468\u4e94", + "\u5468\u516d", + } + }, { "DayNarrows", new String[] { "\u65e5", @@ -173,6 +246,17 @@ public class FormatData_zh extends ListResourceBundle { "\u516d", } }, + { "standalone.DayNarrows", + new String[] { + "\u65e5", + "\u4e00", + "\u4e8c", + "\u4e09", + "\u56db", + "\u4e94", + "\u516d", + } + }, { "AmPmMarkers", new String[] { "\u4e0a\u5348", // am marker @@ -185,6 +269,21 @@ public class FormatData_zh extends ListResourceBundle { "\u516c\u5143" } }, + { "buddhist.Eras", + new String[] { + "BC", + "\u4f5b\u5386", + } + }, + { "japanese.Eras", + new String[] { + "\u516c\u5143", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, { "TimePatterns", new String[] { "ahh'\u65f6'mm'\u5206'ss'\u79d2' z", // full time pattern @@ -206,49 +305,15 @@ public class FormatData_zh extends ListResourceBundle { "{1} {0}" // date-time pattern } }, - { "cldr.buddhist.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gyyyy-M-d", - "Gy-M-d", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy\u5e74M\u6708d\u65e5", - "Gyy-MM-dd", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy-M-d", - "Gy-M-d", - } - }, - { "roc.DatePatterns", + { "buddhist.DatePatterns", new String[] { "GGGGy\u5e74M\u6708d\u65e5EEEE", "GGGGy\u5e74M\u6708d\u65e5", - "GGGGy-M-d", + "GGGGyyyy-M-d", "GGGGy-M-d", } }, - { "cldr.islamic.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy\u5e74M\u6708d\u65e5", - "Gyy-MM-dd", - } - }, - { "islamic.DatePatterns", + { "japanese.DatePatterns", new String[] { "GGGGy\u5e74M\u6708d\u65e5EEEE", "GGGGy\u5e74M\u6708d\u65e5", @@ -256,24 +321,6 @@ public class FormatData_zh extends ListResourceBundle { "GGGGyy-MM-dd", } }, - { "calendarname.islamic-civil", "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" }, - { "calendarname.islamicc", "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" }, - { "calendarname.islamic", "\u4f0a\u65af\u5170\u65e5\u5386" }, - { "calendarname.japanese", "\u65e5\u672c\u65e5\u5386" }, - { "calendarname.gregorian", "\u516c\u5386" }, - { "calendarname.gregory", "\u516c\u5386" }, - { "calendarname.roc", "\u6c11\u56fd\u65e5\u5386" }, - { "calendarname.buddhist", "\u4f5b\u6559\u65e5\u5386" }, - { "field.era", "\u65f6\u671f" }, - { "field.year", "\u5e74" }, - { "field.month", "\u6708" }, - { "field.week", "\u5468" }, - { "field.weekday", "\u5468\u5929" }, - { "field.dayperiod", "\u4e0a\u5348/\u4e0b\u5348" }, - { "field.hour", "\u5c0f\u65f6" }, - { "field.minute", "\u5206\u949f" }, - { "field.second", "\u79d2\u949f" }, - { "field.zone", "\u533a\u57df" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_CN.java b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_CN.java index 4aea955c015..24734a0756e 100644 --- a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_CN.java +++ b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_CN.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,11 +40,11 @@ package sun.text.resources.zh; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_zh_CN extends ListResourceBundle { +public class FormatData_zh_CN extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ protected final Object[][] getContents() { return new Object[][] { diff --git a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_HK.java b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_HK.java index 23c3f6e43fe..a81d2043849 100644 --- a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_HK.java +++ b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_HK.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,13 +40,13 @@ package sun.text.resources.zh; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; import java.util.Locale; import java.util.ResourceBundle; import sun.util.locale.provider.LocaleProviderAdapter; import sun.util.locale.provider.ResourceBundleBasedAdapter; -public class FormatData_zh_HK extends ListResourceBundle { +public class FormatData_zh_HK extends ParallelListResourceBundle { // reparent to zh_TW for traditional Chinese names public FormatData_zh_HK() { @@ -56,7 +56,7 @@ public class FormatData_zh_HK extends ListResourceBundle { } /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { diff --git a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_SG.java b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_SG.java index d1eb53aced4..4ca1468d293 100644 --- a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_SG.java +++ b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_SG.java @@ -1,5 +1,26 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. */ /* @@ -38,13 +59,11 @@ * authorization of the copyright holder. */ -// Generated automatically from the Common Locale Data Repository. DO NOT EDIT! - package sun.text.resources.zh; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_zh_SG extends ListResourceBundle { +public class FormatData_zh_SG extends ParallelListResourceBundle { protected final Object[][] getContents() { return new Object[][] { { "DayAbbreviations", diff --git a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_TW.java b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_TW.java index 7171bd9b166..83b9cca5c33 100644 --- a/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_TW.java +++ b/jdk/src/share/classes/sun/text/resources/zh/FormatData_zh_TW.java @@ -76,11 +76,11 @@ package sun.text.resources.zh; -import java.util.ListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; -public class FormatData_zh_TW extends ListResourceBundle { +public class FormatData_zh_TW extends ParallelListResourceBundle { /** - * Overrides ListResourceBundle + * Overrides ParallelListResourceBundle */ @Override protected final Object[][] getContents() { @@ -95,6 +95,40 @@ public class FormatData_zh_TW extends ListResourceBundle { "\u897f\u5143" } }, + { "standalone.MonthAbbreviations", + new String[] { + "1\u6708", + "2\u6708", + "3\u6708", + "4\u6708", + "5\u6708", + "6\u6708", + "7\u6708", + "8\u6708", + "9\u6708", + "10\u6708", + "11\u6708", + "12\u6708", + "", + } + }, + { "MonthNarrows", + new String[] { + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "", + } + }, { "NumberPatterns", new String[] { "#,##0.###;-#,##0.###", // decimal pattern @@ -123,74 +157,23 @@ public class FormatData_zh_TW extends ListResourceBundle { "{1} {0}" // date-time pattern } }, + { "buddhist.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy/M/d", + "GGGGy/M/d", + } + }, + { "japanese.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy/M/d", + "GGGGy/M/d", + } + }, { "DateTimePatternChars", "GyMdkHmsSEDFwWahKzZ" }, - { "cldr.buddhist.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy/M/d", - "Gy/M/d", - } - }, - { "cldr.japanese.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy/M/d", - "Gy/M/d", - } - }, - { "roc.Eras", rocEras }, - { "roc.short.Eras", rocEras }, - { "cldr.roc.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy/M/d", - "Gy/M/d", - } - }, - { "roc.DatePatterns", - new String[] { - "GGGGy\u5e74M\u6708d\u65e5EEEE", - "GGGGy\u5e74M\u6708d\u65e5", - "GGGGy/M/d", - "GGGGy/M/d", - } - }, - { "cldr.islamic.DatePatterns", - new String[] { - "Gy\u5e74M\u6708d\u65e5EEEE", - "Gy\u5e74M\u6708d\u65e5", - "Gy/M/d", - "Gy/M/d", - } - }, - { "islamic.DatePatterns", - new String[] { - "GGGGy\u5e74M\u6708d\u65e5EEEE", - "GGGGy\u5e74M\u6708d\u65e5", - "GGGGy/M/d", - "GGGGy/M/d", - } - }, - { "calendarname.islamic-civil", "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" }, - { "calendarname.islamicc", "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" }, - { "calendarname.islamic", "\u4f0a\u65af\u862d\u66c6\u6cd5" }, - { "calendarname.japanese", "\u65e5\u672c\u66c6\u6cd5" }, - { "calendarname.gregorian", "\u516c\u66c6" }, - { "calendarname.gregory", "\u516c\u66c6" }, - { "calendarname.roc", "\u6c11\u570b\u66c6" }, - { "calendarname.buddhist", "\u4f5b\u6559\u66c6\u6cd5" }, - { "field.era", "\u5e74\u4ee3" }, - { "field.year", "\u5e74" }, - { "field.month", "\u6708" }, - { "field.week", "\u9031" }, - { "field.weekday", "\u9031\u5929" }, - { "field.dayperiod", "\u4e0a\u5348/\u4e0b\u5348" }, - { "field.hour", "\u5c0f\u6642" }, - { "field.minute", "\u5206\u9418" }, - { "field.second", "\u79d2" }, }; } } diff --git a/jdk/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh.java b/jdk/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh.java new file mode 100644 index 00000000000..e5f44fd71c7 --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh.java @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.zh; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_zh extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterAbbreviations", + new String[] { + "1\u5b63", + "2\u5b63", + "3\u5b63", + "4\u5b63", + } + }, + { "QuarterNames", + new String[] { + "\u7b2c1\u5b63\u5ea6", + "\u7b2c2\u5b63\u5ea6", + "\u7b2c3\u5b63\u5ea6", + "\u7b2c4\u5b63\u5ea6", + } + }, + { "QuarterNarrows", + new String[] { + "1", + "2", + "3", + "4", + } + }, + { "calendarname.buddhist", + "\u4f5b\u6559\u65e5\u5386" }, + { "calendarname.gregorian", + "\u516c\u5386" }, + { "calendarname.gregory", + "\u516c\u5386" }, + { "calendarname.islamic", + "\u4f0a\u65af\u5170\u65e5\u5386" }, + { "calendarname.islamic-civil", + "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" }, + { "calendarname.islamicc", + "\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386" }, + { "calendarname.japanese", + "\u65e5\u672c\u65e5\u5386" }, + { "calendarname.roc", + "\u6c11\u56fd\u65e5\u5386" }, + { "field.dayperiod", + "\u4e0a\u5348/\u4e0b\u5348" }, + { "field.era", + "\u65f6\u671f" }, + { "field.hour", + "\u5c0f\u65f6" }, + { "field.minute", + "\u5206\u949f" }, + { "field.month", + "\u6708" }, + { "field.second", + "\u79d2\u949f" }, + { "field.week", + "\u5468" }, + { "field.weekday", + "\u5468\u5929" }, + { "field.year", + "\u5e74" }, + { "field.zone", + "\u533a\u57df" }, + { "islamic.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGyy-MM-dd", + } + }, + { "islamic.Eras", + new String[] { + "", + "\u56de\u5386", + } + }, + { "islamic.short.Eras", + new String[] { + "", + "\u56de\u5386", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gyyyy-M-d", + "Gy-M-d", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "\u4f5b\u5386", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy\u5e74M\u6708d\u65e5", + "Gyy-MM-dd", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy\u5e74M\u6708d\u65e5", + "Gyy-MM-dd", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u516c\u5143", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u516c\u5143", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy-M-d", + "Gy-M-d", + } + }, + { "java.time.short.Eras", + new String[] { + "\u516c\u5143\u524d", + "\u516c\u5143", + } + }, + { "roc.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy-M-d", + "GGGGy-M-d", + } + }, + { "roc.Eras", + new String[] { + "\u6c11\u56fd\u524d", + "\u6c11\u56fd", + } + }, + { "roc.short.Eras", + new String[] { + "\u6c11\u56fd\u524d", + "\u6c11\u56fd", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh_TW.java b/jdk/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh_TW.java new file mode 100644 index 00000000000..7359b8eeafc --- /dev/null +++ b/jdk/src/share/classes/sun/text/resources/zh/JavaTimeSupplementary_zh_TW.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * COPYRIGHT AND PERMISSION NOTICE + * + * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under + * the Terms of Use in http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of the Unicode data files and any associated documentation (the "Data + * Files") or Unicode software and any associated documentation (the + * "Software") to deal in the Data Files or Software without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, and/or sell copies of the Data Files or Software, and + * to permit persons to whom the Data Files or Software are furnished to do so, + * provided that (a) the above copyright notice(s) and this permission notice + * appear with all copies of the Data Files or Software, (b) both the above + * copyright notice(s) and this permission notice appear in associated + * documentation, and (c) there is clear notice in each modified Data File or + * in the Software as well as in the documentation associated with the Data + * File(s) or Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS + * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR + * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder shall not + * be used in advertising or otherwise to promote the sale, use or other + * dealings in these Data Files or Software without prior written authorization + * of the copyright holder. + */ + +// Note: this file has been generated by a tool. + +package sun.text.resources.zh; + +import sun.util.resources.OpenListResourceBundle; + +public class JavaTimeSupplementary_zh_TW extends OpenListResourceBundle { + @Override + protected final Object[][] getContents() { + return new Object[][] { + { "QuarterNames", + new String[] { + "\u7b2c1\u5b63", + "\u7b2c2\u5b63", + "\u7b2c3\u5b63", + "\u7b2c4\u5b63", + } + }, + { "calendarname.buddhist", + "\u4f5b\u6559\u66c6\u6cd5" }, + { "calendarname.gregorian", + "\u516c\u66c6" }, + { "calendarname.gregory", + "\u516c\u66c6" }, + { "calendarname.islamic", + "\u4f0a\u65af\u862d\u66c6\u6cd5" }, + { "calendarname.islamic-civil", + "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" }, + { "calendarname.islamicc", + "\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5" }, + { "calendarname.japanese", + "\u65e5\u672c\u66c6\u6cd5" }, + { "calendarname.roc", + "\u6c11\u570b\u66c6" }, + { "field.dayperiod", + "\u4e0a\u5348/\u4e0b\u5348" }, + { "field.era", + "\u5e74\u4ee3" }, + { "field.hour", + "\u5c0f\u6642" }, + { "field.minute", + "\u5206\u9418" }, + { "field.month", + "\u6708" }, + { "field.second", + "\u79d2" }, + { "field.week", + "\u9031" }, + { "field.weekday", + "\u9031\u5929" }, + { "field.year", + "\u5e74" }, + { "field.zone", + "\u6642\u5340" }, + { "islamic.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy/M/d", + "GGGGy/M/d", + } + }, + { "islamic.MonthNames", + new String[] { + "\u7a46\u54c8\u862d\u59c6\u6708", + "\u8272\u6cd5\u723e\u6708", + "\u8cf4\u6bd4\u6708 I", + "\u8cf4\u6bd4\u6708 II", + "\u4e3b\u99ac\u9054\u6708 I", + "\u4e3b\u99ac\u9054\u6708 II", + "\u8cf4\u54f2\u535c\u6708", + "\u820d\u723e\u90a6\u6708", + "\u8cf4\u8cb7\u4e39\u6708", + "\u9583\u74e6\u9b6f\u6708", + "\u90fd\u723e\u5580\u723e\u5fb7\u6708", + "\u90fd\u723e\u9ed1\u54f2\u6708", + "", + } + }, + { "java.time.buddhist.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy/M/d", + "Gy/M/d", + } + }, + { "java.time.buddhist.short.Eras", + new String[] { + "BC", + "\u4f5b\u66c6", + } + }, + { "java.time.islamic.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy/M/d", + "Gy/M/d", + } + }, + { "java.time.japanese.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy/M/d", + "Gy/M/d", + } + }, + { "java.time.japanese.long.Eras", + new String[] { + "\u897f\u5143", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, + { "java.time.japanese.short.Eras", + new String[] { + "\u897f\u5143", + "\u660e\u6cbb", + "\u5927\u6b63", + "\u662d\u548c", + "\u5e73\u6210", + } + }, + { "java.time.roc.DatePatterns", + new String[] { + "Gy\u5e74M\u6708d\u65e5EEEE", + "Gy\u5e74M\u6708d\u65e5", + "Gy/M/d", + "Gy/M/d", + } + }, + { "java.time.short.Eras", + new String[] { + "\u897f\u5143\u524d", + "\u897f\u5143", + } + }, + { "roc.DatePatterns", + new String[] { + "GGGGy\u5e74M\u6708d\u65e5EEEE", + "GGGGy\u5e74M\u6708d\u65e5", + "GGGGy/M/d", + "GGGGy/M/d", + } + }, + { "roc.Eras", + new String[] { + "\u6c11\u570b\u524d", + "\u6c11\u570b", + } + }, + { "roc.short.Eras", + new String[] { + "\u6c11\u570b\u524d", + "\u6c11\u570b", + } + }, + }; + } +} diff --git a/jdk/src/share/classes/sun/util/calendar/ZoneInfo.java b/jdk/src/share/classes/sun/util/calendar/ZoneInfo.java index 995ec45fcc7..c781dedf363 100644 --- a/jdk/src/share/classes/sun/util/calendar/ZoneInfo.java +++ b/jdk/src/share/classes/sun/util/calendar/ZoneInfo.java @@ -561,8 +561,7 @@ public class ZoneInfo extends TimeZone { * @return an array of time zone IDs. */ public static String[] getAvailableIDs() { - Set idSet = ZoneInfoFile.getZoneIds(); - return idSet.toArray(new String[idSet.size()]); + return ZoneInfoFile.getZoneIds(); } /** diff --git a/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java b/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java index 2bddab21f2d..b003c2eead0 100644 --- a/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java +++ b/jdk/src/share/classes/sun/util/calendar/ZoneInfoFile.java @@ -29,21 +29,13 @@ import java.io.ByteArrayInputStream; import java.io.DataInput; import java.io.DataInputStream; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.io.StreamCorruptedException; import java.security.AccessController; import java.security.PrivilegedAction; -import java.time.DayOfWeek; import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.Month; -import java.time.OffsetDateTime; import java.time.ZoneOffset; -import java.time.zone.ZoneRules; -import java.time.zone.ZoneOffsetTransition; -import java.time.zone.ZoneOffsetTransitionRule; -import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition; - import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; @@ -58,7 +50,7 @@ import java.util.Set; import java.util.SimpleTimeZone; import java.util.concurrent.ConcurrentHashMap; import java.util.zip.CRC32; -import java.util.zip.ZipFile; +import sun.security.action.GetPropertyAction; /** * Loads TZDB time-zone rules for j.u.TimeZone @@ -72,8 +64,13 @@ public final class ZoneInfoFile { * * @return a set of time zone IDs. */ - public static Set getZoneIds() { - return zones.keySet(); + public static String[] getZoneIds() { + String[] ids = Arrays.copyOf(regions, regions.length + oldMappings.length); + int i = regions.length; + for (int j = 0; j < oldMappings.length; j++) { + ids[i++] = oldMappings[j][0]; + } + return ids; } /** @@ -86,8 +83,8 @@ public final class ZoneInfoFile { */ public static String[] getZoneIds(int rawOffset) { List ids = new ArrayList<>(); - for (String id : zones.keySet()) { - ZoneInfo zi = getZoneInfo0(id); + for (String id : getZoneIds()) { + ZoneInfo zi = getZoneInfo(id); if (zi.getRawOffset() == rawOffset) { ids.add(id); } @@ -102,17 +99,42 @@ public final class ZoneInfoFile { } public static ZoneInfo getZoneInfo(String zoneId) { - if (!zones.containsKey(zoneId)) { + if (zoneId == null) { return null; } - // ZoneInfo is mutable, return the copy - ZoneInfo zi = getZoneInfo0(zoneId); - zi = (ZoneInfo)zi.clone(); - zi.setID(zoneId); + if (zi != null) { + zi = (ZoneInfo)zi.clone(); + zi.setID(zoneId); + } return zi; } + private static ZoneInfo getZoneInfo0(String zoneId) { + try { + ZoneInfo zi = zones.get(zoneId); + if (zi != null) { + return zi; + } + String zid = zoneId; + if (aliases.containsKey(zoneId)) { + zid = aliases.get(zoneId); + } + int index = Arrays.binarySearch(regions, zid); + if (index < 0) { + return null; + } + byte[] bytes = ruleArray[indices[index]]; + DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bytes)); + zi = getZoneInfo(dis, zid); + zones.put(zoneId, zi); + return zi; + } catch (Exception ex) { + throw new RuntimeException("Invalid binary time-zone data: TZDB:" + + zoneId + ", version: " + versionId, ex); + } + } + /** * Returns a Map from alias time zone IDs to their standard * time zone IDs. @@ -120,7 +142,7 @@ public final class ZoneInfoFile { * @return an unmodified alias mapping */ public static Map getAliasMap() { - return aliases; + return Collections.unmodifiableMap(aliases); } /** @@ -143,23 +165,11 @@ public final class ZoneInfoFile { public static ZoneInfo getCustomTimeZone(String originalId, int gmtOffset) { String id = toCustomID(gmtOffset); return new ZoneInfo(id, gmtOffset); -/* - ZoneInfo zi = getFromCache(id); - if (zi == null) { - zi = new ZoneInfo(id, gmtOffset); - zi = addToCache(id, zi); - if (!id.equals(originalId)) { - zi = addToCache(originalId, zi); - } - } - return (ZoneInfo) zi.clone(); -*/ } public static String toCustomID(int gmtOffset) { char sign; int offset = gmtOffset / 60000; - if (offset >= 0) { sign = '+'; } else { @@ -181,49 +191,59 @@ public final class ZoneInfoFile { return new String(buf); } - /////////////////////////////////////////////////////////// - - private static ZoneInfo getZoneInfo0(String zoneId) { - try { - - Object obj = zones.get(zoneId); - if (obj instanceof byte[]) { - byte[] bytes = (byte[]) obj; - DataInputStream dis = new DataInputStream(new ByteArrayInputStream(bytes)); - obj = getZoneInfo(dis, zoneId); - zones.put(zoneId, obj); - } - return (ZoneInfo)obj; - } catch (Exception ex) { - throw new RuntimeException("Invalid binary time-zone data: TZDB:" + - zoneId + ", version: " + versionId, ex); - } - } - private ZoneInfoFile() { } private static String versionId; - private final static Map zones = new ConcurrentHashMap<>(); + private final static Map zones = new ConcurrentHashMap<>(); private static Map aliases = new HashMap<>(); + private static byte[][] ruleArray; + private static String[] regions; + private static int[] indices; + // Flag for supporting JDK backward compatible IDs, such as "EST". private static final boolean USE_OLDMAPPING; + private static String[][] oldMappings = new String[][] { + { "ACT", "Australia/Darwin" }, + { "AET", "Australia/Sydney" }, + { "AGT", "America/Argentina/Buenos_Aires" }, + { "ART", "Africa/Cairo" }, + { "AST", "America/Anchorage" }, + { "BET", "America/Sao_Paulo" }, + { "BST", "Asia/Dhaka" }, + { "CAT", "Africa/Harare" }, + { "CNT", "America/St_Johns" }, + { "CST", "America/Chicago" }, + { "CTT", "Asia/Shanghai" }, + { "EAT", "Africa/Addis_Ababa" }, + { "ECT", "Europe/Paris" }, + { "IET", "America/Indiana/Indianapolis" }, + { "IST", "Asia/Kolkata" }, + { "JST", "Asia/Tokyo" }, + { "MIT", "Pacific/Apia" }, + { "NET", "Asia/Yerevan" }, + { "NST", "Pacific/Auckland" }, + { "PLT", "Asia/Karachi" }, + { "PNT", "America/Phoenix" }, + { "PRT", "America/Puerto_Rico" }, + { "PST", "America/Los_Angeles" }, + { "SST", "Pacific/Guadalcanal" }, + { "VST", "Asia/Ho_Chi_Minh" }, + }; + static { String oldmapping = AccessController.doPrivileged( - new sun.security.action.GetPropertyAction("sun.timezone.ids.oldmapping", "false")).toLowerCase(Locale.ROOT); + new GetPropertyAction("sun.timezone.ids.oldmapping", "false")).toLowerCase(Locale.ROOT); USE_OLDMAPPING = (oldmapping.equals("yes") || oldmapping.equals("true")); AccessController.doPrivileged(new PrivilegedAction() { public Object run() { try { - String libDir = System.getProperty("java.home") + File.separator + "lib"; - File tzdbJar = new File(libDir, "tzdb.jar"); - try (ZipFile zf = new ZipFile(tzdbJar); - DataInputStream dis = new DataInputStream( - zf.getInputStream(zf.getEntry("TZDB.dat")))) { + try (DataInputStream dis = new DataInputStream( + new FileInputStream(new File(libDir, "tzdb.dat")))) { load(dis); } } catch (Exception x) { @@ -234,56 +254,14 @@ public final class ZoneInfoFile { }); } - // Must be invoked after loading in all data private static void addOldMapping() { - String[][] oldMappings = new String[][] { - { "ACT", "Australia/Darwin" }, - { "AET", "Australia/Sydney" }, - { "AGT", "America/Argentina/Buenos_Aires" }, - { "ART", "Africa/Cairo" }, - { "AST", "America/Anchorage" }, - { "BET", "America/Sao_Paulo" }, - { "BST", "Asia/Dhaka" }, - { "CAT", "Africa/Harare" }, - { "CNT", "America/St_Johns" }, - { "CST", "America/Chicago" }, - { "CTT", "Asia/Shanghai" }, - { "EAT", "Africa/Addis_Ababa" }, - { "ECT", "Europe/Paris" }, - { "IET", "America/Indiana/Indianapolis" }, - { "IST", "Asia/Kolkata" }, - { "JST", "Asia/Tokyo" }, - { "MIT", "Pacific/Apia" }, - { "NET", "Asia/Yerevan" }, - { "NST", "Pacific/Auckland" }, - { "PLT", "Asia/Karachi" }, - { "PNT", "America/Phoenix" }, - { "PRT", "America/Puerto_Rico" }, - { "PST", "America/Los_Angeles" }, - { "SST", "Pacific/Guadalcanal" }, - { "VST", "Asia/Ho_Chi_Minh" }, - }; for (String[] alias : oldMappings) { - String k = alias[0]; - String v = alias[1]; - if (zones.containsKey(v)) { // make sure we do have the data - aliases.put(k, v); - zones.put(k, zones.get(v)); - } + aliases.put(alias[0], alias[1]); } if (USE_OLDMAPPING) { - if (zones.containsKey("America/New_York")) { - aliases.put("EST", "America/New_York"); - zones.put("EST", zones.get("America/New_York")); - } - if (zones.containsKey("America/Denver")) { - aliases.put("MST", "America/Denver"); - zones.put("MST", zones.get("America/Denver")); - } - if (zones.containsKey("Pacific/Honolulu")) { - aliases.put("HST", "Pacific/Honolulu"); - zones.put("HST", zones.get("Pacific/Honolulu")); - } + aliases.put("EST", "America/New_York"); + aliases.put("MST", "America/Denver"); + aliases.put("HST", "Pacific/Honolulu"); } } @@ -316,7 +294,7 @@ public final class ZoneInfoFile { } // rules int ruleCount = dis.readShort(); - Object[] ruleArray = new Object[ruleCount]; + ruleArray = new byte[ruleCount][]; for (int i = 0; i < ruleCount; i++) { byte[] bytes = new byte[dis.readShort()]; dis.readFully(bytes); @@ -325,11 +303,11 @@ public final class ZoneInfoFile { // link version-region-rules, only keep the last version, if more than one for (int i = 0; i < versionCount; i++) { regionCount = dis.readShort(); - zones.clear(); + regions = new String[regionCount]; + indices = new int[regionCount]; for (int j = 0; j < regionCount; j++) { - String region = regionArray[dis.readShort()]; - Object rule = ruleArray[dis.readShort() & 0xffff]; - zones.put(region, rule); + regions[j] = regionArray[dis.readShort()]; + indices[j] = dis.readShort(); } } // remove the following ids from the map, they @@ -346,7 +324,6 @@ public final class ZoneInfoFile { } // old us time-zone names addOldMapping(); - aliases = Collections.unmodifiableMap(aliases); } /////////////////////////Ser///////////////////////////////// @@ -374,7 +351,7 @@ public final class ZoneInfoFile { int ruleSize = in.readByte(); ZoneOffsetTransitionRule[] rules = new ZoneOffsetTransitionRule[ruleSize]; for (int i = 0; i < ruleSize; i++) { - rules[i] = readZOTRule(in); + rules[i] = new ZoneOffsetTransitionRule(in); } return getZoneInfo(zoneId, stdTrans, stdOffsets, savTrans, savOffsets, rules); } @@ -396,31 +373,19 @@ public final class ZoneInfoFile { } } - static ZoneOffsetTransitionRule readZOTRule(DataInput in) throws IOException { - int data = in.readInt(); - Month month = Month.of(data >>> 28); - int dom = ((data & (63 << 22)) >>> 22) - 32; - int dowByte = (data & (7 << 19)) >>> 19; - DayOfWeek dow = dowByte == 0 ? null : DayOfWeek.of(dowByte); - int timeByte = (data & (31 << 14)) >>> 14; - TimeDefinition defn = TimeDefinition.values()[(data & (3 << 12)) >>> 12]; - int stdByte = (data & (255 << 4)) >>> 4; - int beforeByte = (data & (3 << 2)) >>> 2; - int afterByte = (data & 3); - LocalTime time = (timeByte == 31 ? LocalTime.ofSecondOfDay(in.readInt()) : LocalTime.of(timeByte % 24, 0)); - ZoneOffset std = (stdByte == 255 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds((stdByte - 128) * 900)); - ZoneOffset before = (beforeByte == 3 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(std.getTotalSeconds() + beforeByte * 1800)); - ZoneOffset after = (afterByte == 3 ? ZoneOffset.ofTotalSeconds(in.readInt()) : ZoneOffset.ofTotalSeconds(std.getTotalSeconds() + afterByte * 1800)); - return ZoneOffsetTransitionRule.of(month, dom, dow, time, timeByte == 24, defn, std, before, after); - } - /////////////////////////ZoneRules --> ZoneInfo///////////////////////////////// // ZoneInfo starts with UTC1900 private static final long UTC1900 = -2208988800L; + // ZoneInfo ends with UTC2037 - private static final long UTC2037 = - LocalDateTime.of(2038, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC) - 1; + // LocalDateTime.of(2038, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC) - 1; + private static final long UTC2037 = 2145916799L; + + // ZoneInfo has an ending entry for 2037, this need to be offset by + // a "rawOffset" + // LocalDateTime.of(2037, 1, 1, 0, 0, 0).toEpochSecond(ZoneOffset.UTC)); + private static final long LDT2037 = 2114380800L; /* Get a ZoneInfo instance. * @@ -460,15 +425,12 @@ public final class ZoneInfoFile { // offsets.length > 16 (4-bit index limit) // last year in trans table // It should not matter to use before or after offset for year - int lastyear = LocalDateTime.ofEpochSecond( - savingsInstantTransitions[savingsInstantTransitions.length - 1], 0, - ZoneOffset.ofTotalSeconds(wallOffsets[savingsInstantTransitions.length - 1])).getYear(); - // int lastyear = savingsLocalTransitions[savingsLocalTransitions.length - 1].getYear(); - + int lastyear = getYear(savingsInstantTransitions[savingsInstantTransitions.length - 1], + wallOffsets[savingsInstantTransitions.length - 1]); int i = 0, k = 1; while (i < savingsInstantTransitions.length && savingsInstantTransitions[i] < UTC1900) { - i++; // skip any date before UTC1900 + i++; // skip any date before UTC1900 } if (i < savingsInstantTransitions.length) { // javazic writes the last GMT offset into index 0! @@ -478,26 +440,27 @@ public final class ZoneInfoFile { } // ZoneInfo has a beginning entry for 1900. // Only add it if this is not the only one in table - nOffsets = addTrans(transitions, nTrans++, offsets, nOffsets, + nOffsets = addTrans(transitions, nTrans++, + offsets, nOffsets, UTC1900, wallOffsets[i], getStandardOffset(standardTransitions, standardOffsets, UTC1900)); } + for (; i < savingsInstantTransitions.length; i++) { - //if (savingsLocalTransitions[i * 2].getYear() > LASTYEAR) { - if (savingsInstantTransitions[i] > UTC2037) { + long trans = savingsInstantTransitions[i]; + if (trans > UTC2037) { // no trans beyond LASTYEAR lastyear = LASTYEAR; break; } - long trans = savingsInstantTransitions[i]; while (k < standardTransitions.length) { // some standard offset transitions don't exist in // savingInstantTrans, if the offset "change" doesn't // really change the "effectiveWallOffset". For example // the 1999/2000 pair in Zone Arg/Buenos_Aires, in which // the daylightsaving "happened" but it actually does - // not result in the timezone switch. ZoneInfo however + // not result in the timezone switch. ZoneInfo however // needs them in its transitions table long trans_s = standardTransitions[k]; if (trans_s >= UTC1900) { @@ -514,6 +477,7 @@ public final class ZoneInfoFile { trans_s, wallOffsets[i], standardOffsets[k+1]); + } } k++; @@ -528,6 +492,7 @@ public final class ZoneInfoFile { trans, wallOffsets[i + 1], getStandardOffset(standardTransitions, standardOffsets, trans)); + } // append any leftover standard trans while (k < standardTransitions.length) { @@ -546,38 +511,35 @@ public final class ZoneInfoFile { // fill the gap between the last trans until LASTYEAR while (lastyear++ < LASTYEAR) { for (ZoneOffsetTransitionRule zotr : lastRules) { - ZoneOffsetTransition zot = zotr.createTransition(lastyear); - //long trans = zot.getDateTimeBefore().toEpochSecond(); - long trans = zot.toEpochSecond(); + long trans = zotr.getTransitionEpochSecond(lastyear); if (nOffsets + 2 >= offsets.length) { offsets = Arrays.copyOf(offsets, offsets.length + 100); } if (nTrans + 1 >= transitions.length) { transitions = Arrays.copyOf(transitions, transitions.length + 100); } - nOffsets = addTrans(transitions, nTrans++, offsets, nOffsets, + nOffsets = addTrans(transitions, nTrans++, + offsets, nOffsets, trans, - zot.getOffsetAfter().getTotalSeconds(), - getStandardOffset(standardTransitions, standardOffsets, trans)); + zotr.offsetAfter, + zotr.standardOffset); } } ZoneOffsetTransitionRule startRule = lastRules[lastRules.length - 2]; ZoneOffsetTransitionRule endRule = lastRules[lastRules.length - 1]; params = new int[10]; - if (startRule.getOffsetBefore().compareTo(startRule.getOffsetAfter()) < 0 && - endRule.getOffsetBefore().compareTo(endRule.getOffsetAfter()) > 0) { + if (startRule.offsetAfter - startRule.offsetBefore < 0 && + endRule.offsetAfter - endRule.offsetBefore > 0) { ZoneOffsetTransitionRule tmp; tmp = startRule; startRule = endRule; endRule = tmp; } - params[0] = startRule.getMonth().getValue() - 1; - // params[1] = startRule.getDayOfMonthIndicator(); - // params[2] = toCalendarDOW[startRule.getDayOfWeek().getValue()]; - int dom = startRule.getDayOfMonthIndicator(); - DayOfWeek dow = startRule.getDayOfWeek(); - if (dow == null) { - params[1] = startRule.getDayOfMonthIndicator(); + params[0] = startRule.month - 1; + int dom = startRule.dom; + int dow = startRule.dow; + if (dow == -1) { + params[1] = dom; params[2] = 0; } else { // ZoneRulesBuilder adjusts < 0 case (-1, for last, don't have @@ -590,41 +552,38 @@ public final class ZoneInfoFile { // "last", it works for now. if (dom < 0 || dom >= 24) { params[1] = -1; - params[2] = toCalendarDOW[dow.getValue()]; + params[2] = toCalendarDOW[dow]; } else { params[1] = dom; // To specify a day of week on or after an exact day of month, // set the month to an exact month value, day-of-month to the // day on or after which the rule is applied, and day-of-week // to a negative Calendar.DAY_OF_WEEK DAY_OF_WEEK field value. - params[2] = -toCalendarDOW[dow.getValue()]; + params[2] = -toCalendarDOW[dow]; } } - params[3] = startRule.getLocalTime().toSecondOfDay() * 1000; - params[4] = toSTZTime[startRule.getTimeDefinition().ordinal()]; - - params[5] = endRule.getMonth().getValue() - 1; - // params[6] = endRule.getDayOfMonthIndicator(); - // params[7] = toCalendarDOW[endRule.getDayOfWeek().getValue()]; - dom = endRule.getDayOfMonthIndicator(); - dow = endRule.getDayOfWeek(); - if (dow == null) { + params[3] = startRule.secondOfDay * 1000; + params[4] = toSTZTime[startRule.timeDefinition]; + params[5] = endRule.month - 1; + dom = endRule.dom; + dow = endRule.dow; + if (dow == -1) { params[6] = dom; params[7] = 0; } else { // hacking: see comment above if (dom < 0 || dom >= 24) { params[6] = -1; - params[7] = toCalendarDOW[dow.getValue()]; + params[7] = toCalendarDOW[dow]; } else { params[6] = dom; - params[7] = -toCalendarDOW[dow.getValue()]; + params[7] = -toCalendarDOW[dow]; } } - params[8] = endRule.getLocalTime().toSecondOfDay() * 1000; - params[9] = toSTZTime[endRule.getTimeDefinition().ordinal()]; - dstSavings = (startRule.getOffsetAfter().getTotalSeconds() - - startRule.getOffsetBefore().getTotalSeconds()) * 1000; + params[8] = endRule.secondOfDay * 1000; + params[9] = toSTZTime[endRule.timeDefinition]; + dstSavings = (startRule.offsetAfter - startRule.offsetBefore) * 1000; + // Note: known mismatching -> Asia/Amman // ZoneInfo : startDayOfWeek=5 <= Thursday // startTime=86400000 <= 24 hours @@ -638,14 +597,17 @@ public final class ZoneInfoFile { } else if (nTrans > 0) { // only do this if there is something in table already if (lastyear < LASTYEAR) { // ZoneInfo has an ending entry for 2037 - long trans = OffsetDateTime.of(LASTYEAR, Month.JANUARY.getValue(), 1, 0, 0, 0, 0, - ZoneOffset.ofTotalSeconds(rawOffset/1000)) - .toEpochSecond(); + //long trans = OffsetDateTime.of(LASTYEAR, 1, 1, 0, 0, 0, 0, + // ZoneOffset.ofTotalSeconds(rawOffset/1000)) + // .toEpochSecond(); + long trans = LDT2037 - rawOffset/1000; + int offsetIndex = indexOf(offsets, 0, nOffsets, rawOffset/1000); if (offsetIndex == nOffsets) nOffsets++; transitions[nTrans++] = (trans * 1000) << TRANSITION_NSHIFT | (offsetIndex & OFFSET_MASK); + } else if (savingsInstantTransitions.length > 2) { // Workaround: create the params based on the last pair for // zones like Israel and Iran which have trans defined @@ -670,40 +632,28 @@ public final class ZoneInfoFile { long endTrans = savingsInstantTransitions[m - 1]; int endOffset = wallOffsets[m - 1 + 1]; int endStd = getStandardOffset(standardTransitions, standardOffsets, endTrans); - if (startOffset > startStd && endOffset == endStd) { - /* - m = savingsLocalTransitions.length; - LocalDateTime startLDT = savingsLocalTransitions[m -4]; //gap - LocalDateTime endLDT = savingsLocalTransitions[m - 1]; //over - */ // last - 1 trans m = savingsInstantTransitions.length - 2; ZoneOffset before = ZoneOffset.ofTotalSeconds(wallOffsets[m]); ZoneOffset after = ZoneOffset.ofTotalSeconds(wallOffsets[m + 1]); - ZoneOffsetTransition trans = ZoneOffsetTransition.of( - LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before), - before, - after); + LocalDateTime ldt = LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before); LocalDateTime startLDT; - if (trans.isGap()) { - startLDT = trans.getDateTimeBefore(); + if (after.getTotalSeconds() > before.getTotalSeconds()) { // isGap() + startLDT = ldt; } else { - startLDT = trans.getDateTimeAfter(); + startLDT = ldt.plusSeconds(wallOffsets[m + 1] - wallOffsets[m]); } // last trans m = savingsInstantTransitions.length - 1; before = ZoneOffset.ofTotalSeconds(wallOffsets[m]); after = ZoneOffset.ofTotalSeconds(wallOffsets[m + 1]); - trans = ZoneOffsetTransition.of( - LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before), - before, - after); + ldt = LocalDateTime.ofEpochSecond(savingsInstantTransitions[m], 0, before); LocalDateTime endLDT; - if (trans.isGap()) { - endLDT = trans.getDateTimeAfter(); + if (after.getTotalSeconds() > before.getTotalSeconds()) { // isGap() + endLDT = ldt.plusSeconds(wallOffsets[m + 1] - wallOffsets[m]); } else { - endLDT = trans.getDateTimeBefore(); + endLDT = ldt; } params = new int[10]; params[0] = startLDT.getMonthValue() - 1; @@ -722,14 +672,14 @@ public final class ZoneInfoFile { } if (transitions != null && transitions.length != nTrans) { if (nTrans == 0) { - transitions = null; + transitions = null; } else { transitions = Arrays.copyOf(transitions, nTrans); } } if (offsets != null && offsets.length != nOffsets) { if (nOffsets == 0) { - offsets = null; + offsets = null; } else { offsets = Arrays.copyOf(offsets, nOffsets); } @@ -762,15 +712,59 @@ public final class ZoneInfoFile { private static int getStandardOffset(long[] standardTransitions, int[] standardOffsets, long epochSec) { - int index = Arrays.binarySearch(standardTransitions, epochSec); - if (index < 0) { - // switch negative insert position to start of matched range - index = -index - 2; + // The size of stdOffsets is [0..9], with most are + // [1..4] entries , simple loop search is faster + // + // int index = Arrays.binarySearch(standardTransitions, epochSec); + // if (index < 0) { + // // switch negative insert position to start of matched range + // index = -index - 2; + // } + // return standardOffsets[index + 1]; + int index = 0; + for (; index < standardTransitions.length; index++) { + if (epochSec < standardTransitions[index]) { + break; + } } - return standardOffsets[index + 1]; + return standardOffsets[index]; } - private static int toCalendarDOW[] = new int[] { + static final int SECONDS_PER_DAY = 86400; + static final int DAYS_PER_CYCLE = 146097; + static final long DAYS_0000_TO_1970 = (DAYS_PER_CYCLE * 5L) - (30L * 365L + 7L); + + private static int getYear(long epochSecond, int offset) { + long second = epochSecond + offset; // overflow caught later + long epochDay = Math.floorDiv(second, SECONDS_PER_DAY); + long zeroDay = epochDay + DAYS_0000_TO_1970; + // find the march-based year + zeroDay -= 60; // adjust to 0000-03-01 so leap day is at end of four year cycle + long adjust = 0; + if (zeroDay < 0) { + // adjust negative years to positive for calculation + long adjustCycles = (zeroDay + 1) / DAYS_PER_CYCLE - 1; + adjust = adjustCycles * 400; + zeroDay += -adjustCycles * DAYS_PER_CYCLE; + } + long yearEst = (400 * zeroDay + 591) / DAYS_PER_CYCLE; + long doyEst = zeroDay - (365 * yearEst + yearEst / 4 - yearEst / 100 + yearEst / 400); + if (doyEst < 0) { + // fix estimate + yearEst--; + doyEst = zeroDay - (365 * yearEst + yearEst / 4 - yearEst / 100 + yearEst / 400); + } + yearEst += adjust; // reset any negative year + int marchDoy0 = (int) doyEst; + // convert march-based values back to january-based + int marchMonth0 = (marchDoy0 * 5 + 2) / 153; + int month = (marchMonth0 + 2) % 12 + 1; + int dom = marchDoy0 - (marchMonth0 * 306 + 5) / 10 + 1; + yearEst += marchMonth0 / 10; + return (int)yearEst; + } + + private static final int toCalendarDOW[] = new int[] { -1, Calendar.MONDAY, Calendar.TUESDAY, @@ -781,7 +775,7 @@ public final class ZoneInfoFile { Calendar.SUNDAY }; - private static int toSTZTime[] = new int[] { + private static final int toSTZTime[] = new int[] { SimpleTimeZone.UTC_TIME, SimpleTimeZone.WALL_TIME, SimpleTimeZone.STANDARD_TIME, @@ -823,28 +817,152 @@ public final class ZoneInfoFile { return nOffsets; } - ///////////////////////////////////////////////////////////// // ZoneInfo checksum, copy/pasted from javazic private static class Checksum extends CRC32 { public void update(int val) { byte[] b = new byte[4]; - b[0] = (byte)((val >>> 24) & 0xff); - b[1] = (byte)((val >>> 16) & 0xff); - b[2] = (byte)((val >>> 8) & 0xff); - b[3] = (byte)(val & 0xff); + b[0] = (byte)(val >>> 24); + b[1] = (byte)(val >>> 16); + b[2] = (byte)(val >>> 8); + b[3] = (byte)(val); update(b); } void update(long val) { byte[] b = new byte[8]; - b[0] = (byte)((val >>> 56) & 0xff); - b[1] = (byte)((val >>> 48) & 0xff); - b[2] = (byte)((val >>> 40) & 0xff); - b[3] = (byte)((val >>> 32) & 0xff); - b[4] = (byte)((val >>> 24) & 0xff); - b[5] = (byte)((val >>> 16) & 0xff); - b[6] = (byte)((val >>> 8) & 0xff); - b[7] = (byte)(val & 0xff); + b[0] = (byte)(val >>> 56); + b[1] = (byte)(val >>> 48); + b[2] = (byte)(val >>> 40); + b[3] = (byte)(val >>> 32); + b[4] = (byte)(val >>> 24); + b[5] = (byte)(val >>> 16); + b[6] = (byte)(val >>> 8); + b[7] = (byte)(val); update(b); } } + + // A simple/raw version of j.t.ZoneOffsetTransitionRule + private static class ZoneOffsetTransitionRule { + private final int month; + private final byte dom; + private final int dow; + private final int secondOfDay; + private final boolean timeEndOfDay; + private final int timeDefinition; + private final int standardOffset; + private final int offsetBefore; + private final int offsetAfter; + + ZoneOffsetTransitionRule(DataInput in) throws IOException { + int data = in.readInt(); + int dowByte = (data & (7 << 19)) >>> 19; + int timeByte = (data & (31 << 14)) >>> 14; + int stdByte = (data & (255 << 4)) >>> 4; + int beforeByte = (data & (3 << 2)) >>> 2; + int afterByte = (data & 3); + + this.month = data >>> 28; + this.dom = (byte)(((data & (63 << 22)) >>> 22) - 32); + this.dow = dowByte == 0 ? -1 : dowByte; + this.secondOfDay = timeByte == 31 ? in.readInt() : timeByte * 3600; + this.timeEndOfDay = timeByte == 24; + this.timeDefinition = (data & (3 << 12)) >>> 12; + + this.standardOffset = stdByte == 255 ? in.readInt() : (stdByte - 128) * 900; + this.offsetBefore = beforeByte == 3 ? in.readInt() : standardOffset + beforeByte * 1800; + this.offsetAfter = afterByte == 3 ? in.readInt() : standardOffset + afterByte * 1800; + } + + long getTransitionEpochSecond(int year) { + long epochDay = 0; + if (dom < 0) { + epochDay = toEpochDay(year, month, lengthOfMonth(year, month) + 1 + dom); + if (dow != -1) { + epochDay = previousOrSame(epochDay, dow); + } + } else { + epochDay = toEpochDay(year, month, dom); + if (dow != -1) { + epochDay = nextOrSame(epochDay, dow); + } + } + if (timeEndOfDay) { + epochDay += 1; + } + int difference = 0; + switch (timeDefinition) { + case 0: // UTC + difference = 0; + break; + case 1: // WALL + difference = -offsetBefore; + break; + case 2: //STANDARD + difference = -standardOffset; + break; + } + return epochDay * 86400 + secondOfDay + difference; + } + + static final boolean isLeapYear(int year) { + return ((year & 3) == 0) && ((year % 100) != 0 || (year % 400) == 0); + } + + static final int lengthOfMonth(int year, int month) { + switch (month) { + case 2: //FEBRUARY: + return isLeapYear(year)? 29 : 28; + case 4: //APRIL: + case 6: //JUNE: + case 9: //SEPTEMBER: + case 11: //NOVEMBER: + return 30; + default: + return 31; + } + } + + static final long toEpochDay(int year, int month, int day) { + long y = year; + long m = month; + long total = 0; + total += 365 * y; + if (y >= 0) { + total += (y + 3) / 4 - (y + 99) / 100 + (y + 399) / 400; + } else { + total -= y / -4 - y / -100 + y / -400; + } + total += ((367 * m - 362) / 12); + total += day - 1; + if (m > 2) { + total--; + if (!isLeapYear(year)) { + total--; + } + } + return total - DAYS_0000_TO_1970; + } + + static final long previousOrSame(long epochDay, int dayOfWeek) { + return adjust(epochDay, dayOfWeek, 1); + } + + static final long nextOrSame(long epochDay, int dayOfWeek) { + return adjust(epochDay, dayOfWeek, 0); + } + + static final long adjust(long epochDay, int dow, int relative) { + int calDow = (int)Math.floorMod(epochDay + 3, 7L) + 1; + if (relative < 2 && calDow == dow) { + return epochDay; + } + if ((relative & 1) == 0) { + int daysDiff = calDow - dow; + return epochDay + (daysDiff >= 0 ? 7 - daysDiff : -daysDiff); + } else { + int daysDiff = dow - calDow; + return epochDay - (daysDiff >= 0 ? 7 - daysDiff : -daysDiff); + } + } + } } diff --git a/jdk/src/share/classes/sun/util/locale/provider/CalendarDataUtility.java b/jdk/src/share/classes/sun/util/locale/provider/CalendarDataUtility.java index 656b6958bc6..09d77cee0c1 100644 --- a/jdk/src/share/classes/sun/util/locale/provider/CalendarDataUtility.java +++ b/jdk/src/share/classes/sun/util/locale/provider/CalendarDataUtility.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -69,7 +69,7 @@ public class CalendarDataUtility { field, value, style, false); } - public static String retrieveCldrFieldValueName(String id, int field, int value, int style, Locale locale) { + public static String retrieveJavaTimeFieldValueName(String id, int field, int value, int style, Locale locale) { LocaleServiceProviderPool pool = LocaleServiceProviderPool.getPool(CalendarNameProvider.class); String name; @@ -89,7 +89,7 @@ public class CalendarDataUtility { normalizeCalendarType(id), field, style, false); } - public static Map retrieveCldrFieldValueNames(String id, int field, int style, Locale locale) { + public static Map retrieveJavaTimeFieldValueNames(String id, int field, int style, Locale locale) { LocaleServiceProviderPool pool = LocaleServiceProviderPool.getPool(CalendarNameProvider.class); Map map; @@ -133,14 +133,14 @@ public class CalendarDataUtility { int field = (int) params[0]; int value = (int) params[1]; int style = (int) params[2]; - boolean cldr = (boolean) params[3]; + boolean javatime = (boolean) params[3]; - // If cldr is true, resources from CLDR have precedence over JRE + // If javatime is true, resources from CLDR have precedence over JRE // native resources. - if (cldr && calendarNameProvider instanceof CalendarNameProviderImpl) { + if (javatime && calendarNameProvider instanceof CalendarNameProviderImpl) { String name; name = ((CalendarNameProviderImpl)calendarNameProvider) - .getCldrDisplayName(requestID, field, value, style, locale); + .getJavaTimeDisplayName(requestID, field, value, style, locale); return name; } return calendarNameProvider.getDisplayName(requestID, field, value, style, locale); @@ -165,14 +165,14 @@ public class CalendarDataUtility { assert params.length == 3; int field = (int) params[0]; int style = (int) params[1]; - boolean cldr = (boolean) params[2]; + boolean javatime = (boolean) params[2]; - // If cldr is true, resources from CLDR have precedence over JRE + // If javatime is true, resources from CLDR have precedence over JRE // native resources. - if (cldr && calendarNameProvider instanceof CalendarNameProviderImpl) { + if (javatime && calendarNameProvider instanceof CalendarNameProviderImpl) { Map map; map = ((CalendarNameProviderImpl)calendarNameProvider) - .getCldrDisplayNames(requestID, field, style, locale); + .getJavaTimeDisplayNames(requestID, field, style, locale); return map; } return calendarNameProvider.getDisplayNames(requestID, field, style, locale); diff --git a/jdk/src/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java b/jdk/src/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java index afdfd072b8d..edbcc44454d 100644 --- a/jdk/src/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java +++ b/jdk/src/share/classes/sun/util/locale/provider/CalendarNameProviderImpl.java @@ -53,15 +53,16 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av return getDisplayNameImpl(calendarType, field, value, style, locale, false); } - public String getCldrDisplayName(String calendarType, int field, int value, int style, Locale locale) { + public String getJavaTimeDisplayName(String calendarType, int field, int value, int style, Locale locale) { return getDisplayNameImpl(calendarType, field, value, style, locale, true); } - public String getDisplayNameImpl(String calendarType, int field, int value, int style, Locale locale, boolean cldr) { + public String getDisplayNameImpl(String calendarType, int field, int value, int style, Locale locale, boolean javatime) { String name = null; - String key = getResourceKey(calendarType, field, style, cldr); + String key = getResourceKey(calendarType, field, style, javatime); if (key != null) { - String[] strings = LocaleProviderAdapter.forType(type).getLocaleResources(locale).getCalendarNames(key); + LocaleResources lr = LocaleProviderAdapter.forType(type).getLocaleResources(locale); + String[] strings = javatime ? lr.getJavaTimeNames(key) : lr.getCalendarNames(key); if (strings != null && strings.length > 0) { if (field == DAY_OF_WEEK || field == YEAR) { --value; @@ -104,18 +105,19 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av } // NOTE: This method should be used ONLY BY JSR 310 classes. - public Map getCldrDisplayNames(String calendarType, int field, int style, Locale locale) { + public Map getJavaTimeDisplayNames(String calendarType, int field, int style, Locale locale) { Map names; names = getDisplayNamesImpl(calendarType, field, style, locale, true); return names.isEmpty() ? null : names; } private Map getDisplayNamesImpl(String calendarType, int field, - int style, Locale locale, boolean cldr) { - String key = getResourceKey(calendarType, field, style, cldr); + int style, Locale locale, boolean javatime) { + String key = getResourceKey(calendarType, field, style, javatime); Map map = new TreeMap<>(LengthBasedComparator.INSTANCE); if (key != null) { - String[] strings = LocaleProviderAdapter.forType(type).getLocaleResources(locale).getCalendarNames(key); + LocaleResources lr = LocaleProviderAdapter.forType(type).getLocaleResources(locale); + String[] strings = javatime ? lr.getJavaTimeNames(key) : lr.getCalendarNames(key); if (strings != null) { if (!hasDuplicates(strings)) { if (field == YEAR) { @@ -220,7 +222,7 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av return false; } - private String getResourceKey(String type, int field, int style, boolean cldr) { + private String getResourceKey(String type, int field, int style, boolean javatime) { int baseStyle = getBaseStyle(style); boolean isStandalone = (style != baseStyle); @@ -229,9 +231,9 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av } boolean isNarrow = (baseStyle == NARROW_FORMAT); StringBuilder key = new StringBuilder(); - // If cldr is true, use prefix "cldr.". - if (cldr) { - key.append("cldr."); + // If javatime is true, use prefix "java.time.". + if (javatime) { + key.append("java.time."); } switch (field) { case ERA: @@ -245,7 +247,7 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av // due to historical reasons. (JRE DateFormatSymbols.getEras returns // abbreviations while other getShort*() return abbreviations.) if (this.type == LocaleProviderAdapter.Type.JRE) { - if (cldr) { + if (javatime) { if (baseStyle == LONG) { key.append("long."); } @@ -253,7 +255,7 @@ public class CalendarNameProviderImpl extends CalendarNameProvider implements Av if (baseStyle == SHORT) { key.append("short."); } - } else { // CLDR + } else { // this.type == LocaleProviderAdapter.Type.CLDR if (baseStyle == LONG) { key.append("long."); } diff --git a/jdk/src/share/classes/sun/util/locale/provider/LocaleResources.java b/jdk/src/share/classes/sun/util/locale/provider/LocaleResources.java index dafa74e2ab1..d41395f3767 100644 --- a/jdk/src/share/classes/sun/util/locale/provider/LocaleResources.java +++ b/jdk/src/share/classes/sun/util/locale/provider/LocaleResources.java @@ -54,6 +54,7 @@ import java.util.concurrent.ConcurrentMap; import sun.util.calendar.ZoneInfo; import sun.util.resources.LocaleData; import sun.util.resources.OpenListResourceBundle; +import sun.util.resources.ParallelListResourceBundle; import sun.util.resources.TimeZoneNamesBundle; /** @@ -331,6 +332,25 @@ public class LocaleResources { return names; } + String[] getJavaTimeNames(String key) { + String[] names = null; + String cacheKey = CALENDAR_NAMES + key; + + removeEmptyReferences(); + ResourceReference data = cache.get(cacheKey); + + if (data == null || ((names = (String[]) data.get()) == null)) { + ResourceBundle rb = getJavaTimeFormatData(); + if (rb.containsKey(key)) { + names = rb.getStringArray(key); + cache.put(cacheKey, + new ResourceReference(cacheKey, (Object) names, referenceQueue)); + } + } + + return names; + } + public String getDateTimePattern(int timeStyle, int dateStyle, Calendar cal) { if (cal == null) { cal = Calendar.getInstance(locale); @@ -347,10 +367,10 @@ public class LocaleResources { * @param calType the calendar type for the pattern * @return the pattern string */ - public String getCldrDateTimePattern(int timeStyle, int dateStyle, String calType) { + public String getJavaTimeDateTimePattern(int timeStyle, int dateStyle, String calType) { calType = CalendarDataUtility.normalizeCalendarType(calType); String pattern; - pattern = getDateTimePattern("cldr.", timeStyle, dateStyle, calType); + pattern = getDateTimePattern("java.time.", timeStyle, dateStyle, calType); if (pattern == null) { pattern = getDateTimePattern(null, timeStyle, dateStyle, calType); } @@ -430,8 +450,12 @@ public class LocaleResources { * The FormatData should be used only for accessing extra * resources required by JSR 310. */ - public ResourceBundle getFormatData() { - return localeData.getDateFormatData(locale); + public ResourceBundle getJavaTimeFormatData() { + ResourceBundle rb = localeData.getDateFormatData(locale); + if (rb instanceof ParallelListResourceBundle) { + localeData.setSupplementary((ParallelListResourceBundle) rb); + } + return rb; } private String getDateTimePattern(String prefix, String key, int styleIndex, String calendarType) { @@ -451,7 +475,7 @@ public class LocaleResources { Object value = NULLOBJECT; if (data == null || ((value = data.get()) == null)) { - ResourceBundle r = localeData.getDateFormatData(locale); + ResourceBundle r = (prefix != null) ? getJavaTimeFormatData() : localeData.getDateFormatData(locale); if (r.containsKey(resourceKey)) { value = r.getStringArray(resourceKey); } else { diff --git a/jdk/src/share/classes/sun/util/resources/LocaleData.java b/jdk/src/share/classes/sun/util/resources/LocaleData.java index fd9ab9e4ae5..00ba6dec959 100644 --- a/jdk/src/share/classes/sun/util/resources/LocaleData.java +++ b/jdk/src/share/classes/sun/util/resources/LocaleData.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -42,9 +42,11 @@ package sun.util.resources; import java.security.AccessController; import java.security.PrivilegedAction; +import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Locale; +import java.util.MissingResourceException; import java.util.ResourceBundle; import sun.util.locale.provider.LocaleDataMetaInfo; import sun.util.locale.provider.LocaleProviderAdapter; @@ -122,6 +124,30 @@ public class LocaleData { return getBundle(type.getTextResourcesPackage() + ".FormatData", locale); } + public void setSupplementary(ParallelListResourceBundle formatData) { + if (!formatData.areParallelContentsComplete()) { + String suppName = type.getTextResourcesPackage() + ".JavaTimeSupplementary"; + setSupplementary(suppName, formatData); + } + } + + private boolean setSupplementary(String suppName, ParallelListResourceBundle formatData) { + ParallelListResourceBundle parent = (ParallelListResourceBundle) formatData.getParent(); + boolean resetKeySet = false; + if (parent != null) { + resetKeySet = setSupplementary(suppName, parent); + } + OpenListResourceBundle supp = getSupplementary(suppName, formatData.getLocale()); + formatData.setParallelContents(supp); + resetKeySet |= supp != null; + // If any parents or this bundle has parallel data, reset keyset to create + // a new keyset with the data. + if (resetKeySet) { + formatData.resetKeySet(); + } + return resetKeySet; + } + /** * Gets a number format data resource bundle, using privileges * to allow accessing a sun.* package. @@ -132,22 +158,37 @@ public class LocaleData { public static ResourceBundle getBundle(final String baseName, final Locale locale) { return AccessController.doPrivileged(new PrivilegedAction() { - @Override - public ResourceBundle run() { - return ResourceBundle. - getBundle(baseName, locale, - LocaleDataResourceBundleControl.getRBControlInstance()); - } - }); + @Override + public ResourceBundle run() { + return ResourceBundle + .getBundle(baseName, locale, LocaleDataResourceBundleControl.INSTANCE); + } + }); + } + + private static OpenListResourceBundle getSupplementary(final String baseName, final Locale locale) { + return AccessController.doPrivileged(new PrivilegedAction() { + @Override + public OpenListResourceBundle run() { + OpenListResourceBundle rb = null; + try { + rb = (OpenListResourceBundle) ResourceBundle.getBundle(baseName, + locale, SupplementaryResourceBundleControl.INSTANCE); + + } catch (MissingResourceException e) { + // return null if no supplementary is available + } + return rb; + } + }); } private static class LocaleDataResourceBundleControl extends ResourceBundle.Control { /* Singlton instance of ResourceBundle.Control. */ - private static LocaleDataResourceBundleControl rbControlInstance = + private static final LocaleDataResourceBundleControl INSTANCE = new LocaleDataResourceBundleControl(); - public static LocaleDataResourceBundleControl getRBControlInstance() { - return rbControlInstance; + private LocaleDataResourceBundleControl() { } /* @@ -243,6 +284,25 @@ public class LocaleData { } return super.toBundleName(newBaseName, locale); } + } + private static class SupplementaryResourceBundleControl extends LocaleDataResourceBundleControl { + private static final SupplementaryResourceBundleControl INSTANCE = + new SupplementaryResourceBundleControl(); + + private SupplementaryResourceBundleControl() { + } + + @Override + public List getCandidateLocales(String baseName, Locale locale) { + // Specifiy only the given locale + return Arrays.asList(locale); + } + + @Override + public long getTimeToLive(String baseName, Locale locale) { + assert baseName.contains("JavaTimeSupplementary"); + return TTL_DONT_CACHE; + } } } diff --git a/jdk/src/share/classes/sun/util/resources/OpenListResourceBundle.java b/jdk/src/share/classes/sun/util/resources/OpenListResourceBundle.java index 494e5c89c08..462b0a73411 100644 --- a/jdk/src/share/classes/sun/util/resources/OpenListResourceBundle.java +++ b/jdk/src/share/classes/sun/util/resources/OpenListResourceBundle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -68,7 +68,7 @@ public abstract class OpenListResourceBundle extends ResourceBundle { // Implements java.util.ResourceBundle.handleGetObject; inherits javadoc specification. @Override - public Object handleGetObject(String key) { + protected Object handleGetObject(String key) { if (key == null) { throw new NullPointerException(); } @@ -82,18 +82,18 @@ public abstract class OpenListResourceBundle extends ResourceBundle { */ @Override public Enumeration getKeys() { - ResourceBundle parent = this.parent; - return new ResourceBundleEnumeration(handleGetKeys(), - (parent != null) ? parent.getKeys() : null); - } + ResourceBundle parentBundle = this.parent; + return new ResourceBundleEnumeration(handleKeySet(), + (parentBundle != null) ? parentBundle.getKeys() : null); + } /** * Returns a set of keys provided in this resource bundle, * including no parents. */ - public Set handleGetKeys() { + @Override + protected Set handleKeySet() { loadLookupTablesIfNecessary(); - return lookup.keySet(); } @@ -103,7 +103,7 @@ public abstract class OpenListResourceBundle extends ResourceBundle { return keyset; } Set ks = createSet(); - ks.addAll(handleGetKeys()); + ks.addAll(handleKeySet()); if (parent != null) { ks.addAll(parent.keySet()); } diff --git a/jdk/src/share/classes/sun/util/resources/ParallelListResourceBundle.java b/jdk/src/share/classes/sun/util/resources/ParallelListResourceBundle.java new file mode 100644 index 00000000000..862143c9745 --- /dev/null +++ b/jdk/src/share/classes/sun/util/resources/ParallelListResourceBundle.java @@ -0,0 +1,259 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.util.resources; + +import java.util.AbstractSet; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Iterator; +import java.util.NoSuchElementException; +import java.util.ResourceBundle; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.atomic.AtomicMarkableReference; + +/** + * ParallelListResourceBundle is another variant of ListResourceBundle + * supporting "parallel" contents provided by another resource bundle + * (OpenListResourceBundle). Parallel contents, if any, are added into this + * bundle on demand. + * + * @author Masayoshi Okutsu + */ +public abstract class ParallelListResourceBundle extends ResourceBundle { + private volatile ConcurrentMap lookup; + private volatile Set keyset; + private final AtomicMarkableReference parallelContents + = new AtomicMarkableReference<>(null, false); + + /** + * Sole constructor. (For invocation by subclass constructors, typically + * implicit.) + */ + protected ParallelListResourceBundle() { + } + + /** + * Returns an array in which each item is a pair of objects in an + * Object array. The first element of each pair is the key, which + * must be a String, and the second element is the value + * associated with that key. See the class description for + * details. + * + * @return an array of an Object array representing a key-value pair. + */ + protected abstract Object[][] getContents(); + + /** + * Returns the parent of this resource bundle or null if there's no parent. + * + * @return the parent or null if no parent + */ + ResourceBundle getParent() { + return parent; + } + + /** + * Sets the parallel contents to the data given by rb. If rb is null, this + * bundle will be marked as `complete'. + * + * @param rb an OpenResourceBundle for parallel contents, or null indicating + * there are no parallel contents for this bundle + */ + public void setParallelContents(OpenListResourceBundle rb) { + if (rb == null) { + parallelContents.compareAndSet(null, null, false, true); + } else { + parallelContents.compareAndSet(null, rb.getContents(), false, false); + } + } + + /** + * Returns true if any parallel contents have been set or if this bundle is + * marked as complete. + * + * @return true if any parallel contents have been processed + */ + boolean areParallelContentsComplete() { + // Quick check for `complete' + if (parallelContents.isMarked()) { + return true; + } + boolean[] done = new boolean[1]; + Object[][] data = parallelContents.get(done); + return data != null || done[0]; + } + + @Override + protected Object handleGetObject(String key) { + if (key == null) { + throw new NullPointerException(); + } + + loadLookupTablesIfNecessary(); + return lookup.get(key); + } + + @Override + public Enumeration getKeys() { + return Collections.enumeration(keySet()); + } + + @Override + public boolean containsKey(String key) { + return keySet().contains(key); + } + + @Override + protected Set handleKeySet() { + loadLookupTablesIfNecessary(); + return lookup.keySet(); + } + + @Override + @SuppressWarnings("UnusedAssignment") + public Set keySet() { + Set ks; + while ((ks = keyset) == null) { + ks = new KeySet(handleKeySet(), parent); + synchronized (this) { + if (keyset == null) { + keyset = ks; + } + } + } + return ks; + } + + /** + * Discards any cached keyset value. This method is called from + * LocaleData for re-creating a KeySet. + */ + synchronized void resetKeySet() { + keyset = null; + } + + /** + * Loads the lookup table if they haven't been loaded already. + */ + void loadLookupTablesIfNecessary() { + ConcurrentMap map = lookup; + if (map == null) { + map = new ConcurrentHashMap<>(); + for (Object[] item : getContents()) { + map.put((String) item[0], item[1]); + } + } + + // If there's any parallel contents data, merge the data into map. + Object[][] data = parallelContents.getReference(); + if (data != null) { + for (Object[] item : data) { + map.putIfAbsent((String) item[0], item[1]); + } + parallelContents.set(null, true); + } + if (lookup == null) { + synchronized (this) { + if (lookup == null) { + lookup = map; + } + } + } + } + + /** + * This class implements the Set interface for + * ParallelListResourceBundle methods. + */ + private static class KeySet extends AbstractSet { + private final Set set; + private final ResourceBundle parent; + + private KeySet(Set set, ResourceBundle parent) { + this.set = set; + this.parent = parent; + } + + @Override + public boolean contains(Object o) { + if (set.contains(o)) { + return true; + } + return (parent != null) ? parent.containsKey((String) o) : false; + } + + @Override + public Iterator iterator() { + if (parent == null) { + return set.iterator(); + } + return new Iterator() { + private Iterator itr = set.iterator(); + private boolean usingParent; + + @Override + public boolean hasNext() { + if (itr.hasNext()) { + return true; + } + if (!usingParent) { + Set nextset = new HashSet<>(parent.keySet()); + nextset.removeAll(set); + itr = nextset.iterator(); + usingParent = true; + } + return itr.hasNext(); + } + + @Override + public String next() { + if (hasNext()) { + return itr.next(); + } + throw new NoSuchElementException(); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + + @Override + public int size() { + if (parent == null) { + return set.size(); + } + Set allset = new HashSet<>(set); + allset.addAll(parent.keySet()); + return allset.size(); + } + } +} diff --git a/jdk/src/share/lib/calendars.properties b/jdk/src/share/lib/calendars.properties index 79ba4e14f11..ed8c2f627dc 100644 --- a/jdk/src/share/lib/calendars.properties +++ b/jdk/src/share/lib/calendars.properties @@ -52,3 +52,9 @@ calendar.thai-buddhist.eras: \ calendar.thai-buddhist.year-boundary: \ day1=4-1,since=-79302585600000; \ day1=1-1,since=-915148800000 + +# +# Hijrah calendars +# +calendar.hijrah.Hijrah-umalqura: hijrah-config-umalqura.properties +calendar.hijrah.Hijrah-umalqura.type: islamic-umalqura diff --git a/jdk/src/share/lib/hijrah-config-umalqura.properties b/jdk/src/share/lib/hijrah-config-umalqura.properties new file mode 100644 index 00000000000..ac16c7e222f --- /dev/null +++ b/jdk/src/share/lib/hijrah-config-umalqura.properties @@ -0,0 +1,58 @@ +# +# hijrah-config-umalqura.properties +# +# +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. +# +# This properties file defines a Hijrah calendar variant. +# +# Fields: +# +# ::= 'version' '=' +# ::= 'id' '=' +# ::= 'type' '=' +# ::= 'iso-start' '=' +# ::= '=' +# +# version ... (Required) +# +# id ... (Required) +# Identifies the Java Chronology +# +# type ... (Required) +# Identifies the type of calendar in the standard calendar ID scheme +# iso-start ... (Required) +# Specifies the corresponding ISO date to the first Hijrah day +# in the defined range of dates +# +# year ... (Required) +# Number of days for each month of a Hijrah year +# * Each line defines a year. The years must be in the chronological +# order and no gap is allowed. +# * Each line is in the form indicated above. is a Hijrah year and +# nn is the number of days for a month listed in the order of the months. +# * Each year must have 12 months. +# * Each month should be 29 or 30 days long. +# * There must be one or more space characters between the months. +# + +# indicates the version of this definition +version=1.8.0_1 + +# Java chronology ID +id=Hijrah-umalqura + +# Standard calendar type specification +type=islamic-umalqura + +# defines the corresponding ISO date to the earliest Hijrah date +iso-start=2010-12-07 + +# +# the data section; defines the dates with the number of days for each month +# +# Placeholder data until full Umm alQura data can be validated +1432=29 30 30 30 29 30 29 30 29 30 29 29 +1433=30 29 30 30 29 30 30 29 30 29 30 29 +1434=29 30 29 30 29 30 30 29 30 30 29 29 +1435=30 29 30 29 30 29 30 29 30 30 29 30 diff --git a/jdk/test/java/time/tck/java/time/AbstractDateTimeTest.java b/jdk/test/java/time/tck/java/time/AbstractDateTimeTest.java index d44d2410f28..e7c6db6ef9d 100644 --- a/jdk/test/java/time/tck/java/time/AbstractDateTimeTest.java +++ b/jdk/test/java/time/tck/java/time/AbstractDateTimeTest.java @@ -59,19 +59,16 @@ */ package tck.java.time; -import java.time.*; - import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; +import java.time.DateTimeException; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQuery; import java.util.List; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQuery; -import java.time.temporal.TemporalField; - import org.testng.annotations.Test; -import test.java.time.AbstractTest; import test.java.time.temporal.MockFieldNoValue; /** @@ -100,7 +97,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { //----------------------------------------------------------------------- // isSupported(TemporalField) //----------------------------------------------------------------------- - @Test(groups = "tck") + @Test() public void basicTest_isSupported_TemporalField_supported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : validFields()) { @@ -109,7 +106,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_isSupported_TemporalField_unsupported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : invalidFields()) { @@ -118,7 +115,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_isSupported_TemporalField_null() { for (TemporalAccessor sample : samples()) { assertEquals(sample.isSupported(null), false, "Failed on " + sample); @@ -128,7 +125,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { //----------------------------------------------------------------------- // range(TemporalField) //----------------------------------------------------------------------- - @Test(groups = "tck") + @Test() public void basicTest_range_TemporalField_supported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : validFields()) { @@ -137,7 +134,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_range_TemporalField_unsupported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : invalidFields()) { @@ -151,7 +148,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_range_TemporalField_null() { for (TemporalAccessor sample : samples()) { try { @@ -166,7 +163,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { //----------------------------------------------------------------------- // get(TemporalField) //----------------------------------------------------------------------- - @Test(groups = "tck") + @Test() public void basicTest_get_TemporalField_supported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : validFields()) { @@ -184,7 +181,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_get_TemporalField_unsupported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : invalidFields()) { @@ -205,7 +202,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_get_TemporalField_null() { for (TemporalAccessor sample : samples()) { try { @@ -220,7 +217,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { //----------------------------------------------------------------------- // getLong(TemporalField) //----------------------------------------------------------------------- - @Test(groups = "tck") + @Test() public void basicTest_getLong_TemporalField_supported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : validFields()) { @@ -229,7 +226,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_getLong_TemporalField_unsupported() { for (TemporalAccessor sample : samples()) { for (TemporalField field : invalidFields()) { @@ -250,7 +247,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } } - @Test(groups = "tck") + @Test() public void basicTest_getLong_TemporalField_null() { for (TemporalAccessor sample : samples()) { try { @@ -263,7 +260,7 @@ public abstract class AbstractDateTimeTest extends AbstractTCKTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void basicTest_query() { for (TemporalAccessor sample : samples()) { assertEquals(sample.query(new TemporalQuery() { diff --git a/jdk/test/java/time/tck/java/time/TCKClock.java b/jdk/test/java/time/tck/java/time/TCKClock.java index 82e47f7f681..843992e0d79 100644 --- a/jdk/test/java/time/tck/java/time/TCKClock.java +++ b/jdk/test/java/time/tck/java/time/TCKClock.java @@ -59,10 +59,12 @@ */ package tck.java.time; -import java.time.*; - import static org.testng.Assert.assertEquals; +import java.time.Clock; +import java.time.Instant; +import java.time.ZoneId; + import org.testng.annotations.Test; /** diff --git a/jdk/test/java/time/tck/java/time/TCKDayOfWeek.java b/jdk/test/java/time/tck/java/time/TCKDayOfWeek.java index 196c0402a99..671d9ec53e9 100644 --- a/jdk/test/java/time/tck/java/time/TCKDayOfWeek.java +++ b/jdk/test/java/time/tck/java/time/TCKDayOfWeek.java @@ -70,12 +70,10 @@ import java.time.DateTimeException; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalTime; -import java.time.chrono.IsoChronology; import java.time.format.TextStyle; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; @@ -125,7 +123,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_int_singleton() { for (int i = 1; i <= 7; i++) { DayOfWeek test = DayOfWeek.of(i); @@ -134,28 +132,28 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_valueTooLow() { DayOfWeek.of(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_valueTooHigh() { DayOfWeek.of(8); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(DayOfWeek.from(LocalDate.of(2011, 6, 6)), DayOfWeek.MONDAY); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { DayOfWeek.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_CalendricalObject_null() { DayOfWeek.from((TemporalAccessor) null); } @@ -179,13 +177,13 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {DayOfWeek.FRIDAY, Queries.chronology(), null}, - {DayOfWeek.FRIDAY, Queries.zoneId(), null}, - {DayOfWeek.FRIDAY, Queries.precision(), ChronoUnit.DAYS}, - {DayOfWeek.FRIDAY, Queries.zone(), null}, - {DayOfWeek.FRIDAY, Queries.offset(), null}, - {DayOfWeek.FRIDAY, Queries.localDate(), null}, - {DayOfWeek.FRIDAY, Queries.localTime(), null}, + {DayOfWeek.FRIDAY, TemporalQuery.chronology(), null}, + {DayOfWeek.FRIDAY, TemporalQuery.zoneId(), null}, + {DayOfWeek.FRIDAY, TemporalQuery.precision(), ChronoUnit.DAYS}, + {DayOfWeek.FRIDAY, TemporalQuery.zone(), null}, + {DayOfWeek.FRIDAY, TemporalQuery.offset(), null}, + {DayOfWeek.FRIDAY, TemporalQuery.localDate(), null}, + {DayOfWeek.FRIDAY, TemporalQuery.localTime(), null}, }; } @@ -207,17 +205,17 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { //----------------------------------------------------------------------- // getText() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getText() { assertEquals(DayOfWeek.MONDAY.getDisplayName(TextStyle.SHORT, Locale.US), "Mon"); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void test_getText_nullStyle() { DayOfWeek.MONDAY.getDisplayName(null, Locale.US); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void test_getText_nullLocale() { DayOfWeek.MONDAY.getDisplayName(TextStyle.FULL, null); } @@ -264,7 +262,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { }; } - @Test(dataProvider="plus", groups={"tck"}) + @Test(dataProvider="plus") public void test_plus_long(int base, long amount, int expected) { assertEquals(DayOfWeek.of(base).plus(amount), DayOfWeek.of(expected)); } @@ -295,7 +293,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { }; } - @Test(dataProvider="minus", groups={"tck"}) + @Test(dataProvider="minus") public void test_minus_long(int base, long amount, int expected) { assertEquals(DayOfWeek.of(base).minus(amount), DayOfWeek.of(expected)); } @@ -303,7 +301,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { //----------------------------------------------------------------------- // adjustInto() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjustInto() { assertEquals(DayOfWeek.MONDAY.adjustInto(LocalDate.of(2012, 9, 2)), LocalDate.of(2012, 8, 27)); assertEquals(DayOfWeek.MONDAY.adjustInto(LocalDate.of(2012, 9, 3)), LocalDate.of(2012, 9, 3)); @@ -312,7 +310,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { assertEquals(DayOfWeek.MONDAY.adjustInto(LocalDate.of(2012, 9, 11)), LocalDate.of(2012, 9, 10)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_adjustInto_null() { DayOfWeek.MONDAY.adjustInto((Temporal) null); } @@ -320,7 +318,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString() { assertEquals(DayOfWeek.MONDAY.toString(), "MONDAY"); assertEquals(DayOfWeek.TUESDAY.toString(), "TUESDAY"); @@ -334,7 +332,7 @@ public class TCKDayOfWeek extends AbstractDateTimeTest { //----------------------------------------------------------------------- // generated methods //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_enum() { assertEquals(DayOfWeek.valueOf("MONDAY"), DayOfWeek.MONDAY); assertEquals(DayOfWeek.values()[0], DayOfWeek.MONDAY); diff --git a/jdk/test/java/time/tck/java/time/TCKDuration.java b/jdk/test/java/time/tck/java/time/TCKDuration.java index 797b54b1f31..bae2cf69805 100644 --- a/jdk/test/java/time/tck/java/time/TCKDuration.java +++ b/jdk/test/java/time/tck/java/time/TCKDuration.java @@ -72,20 +72,23 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; -import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; import java.time.DateTimeException; import java.time.Duration; import java.time.Instant; +import java.time.LocalDateTime; import java.time.LocalTime; +import java.time.Period; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeParseException; import java.time.temporal.ChronoUnit; +import java.time.temporal.Temporal; +import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalUnit; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Locale; @@ -98,6 +101,8 @@ import org.testng.annotations.Test; @Test public class TCKDuration extends AbstractTCKTest { + private static final long CYCLE_SECS = 146097L * 86400L; + //----------------------------------------------------------------------- @Test public void test_serialization() throws Exception { @@ -121,7 +126,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // constants //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_zero() { assertEquals(Duration.ZERO.getSeconds(), 0L); assertEquals(Duration.ZERO.getNano(), 0); @@ -130,7 +135,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // ofSeconds(long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_seconds_long() { for (long i = -2; i <= 2; i++) { Duration t = Duration.ofSeconds(i); @@ -142,7 +147,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // ofSeconds(long,long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_seconds_long_long() { for (long i = -2; i <= 2; i++) { for (int j = 0; j < 10; j++) { @@ -163,14 +168,14 @@ public class TCKDuration extends AbstractTCKTest { } } - @Test(groups={"tck"}) + @Test public void factory_seconds_long_long_nanosNegativeAdjusted() { Duration test = Duration.ofSeconds(2L, -1); assertEquals(test.getSeconds(), 1); assertEquals(test.getNano(), 999999999); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_seconds_long_long_tooBig() { Duration.ofSeconds(Long.MAX_VALUE, 1000000000); } @@ -195,7 +200,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="MillisDurationNoNanos", groups={"tck"}) + @Test(dataProvider="MillisDurationNoNanos") public void factory_millis_long(long millis, long expectedSeconds, int expectedNanoOfSecond) { Duration test = Duration.ofMillis(millis); assertEquals(test.getSeconds(), expectedSeconds); @@ -205,35 +210,35 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // ofNanos(long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_nanos_nanos() { Duration test = Duration.ofNanos(1); assertEquals(test.getSeconds(), 0); assertEquals(test.getNano(), 1); } - @Test(groups={"tck"}) + @Test public void factory_nanos_nanosSecs() { Duration test = Duration.ofNanos(1000000002); assertEquals(test.getSeconds(), 1); assertEquals(test.getNano(), 2); } - @Test(groups={"tck"}) + @Test public void factory_nanos_negative() { Duration test = Duration.ofNanos(-2000000001); assertEquals(test.getSeconds(), -3); assertEquals(test.getNano(), 999999999); } - @Test(groups={"tck"}) + @Test public void factory_nanos_max() { Duration test = Duration.ofNanos(Long.MAX_VALUE); assertEquals(test.getSeconds(), Long.MAX_VALUE / 1000000000); assertEquals(test.getNano(), Long.MAX_VALUE % 1000000000); } - @Test(groups={"tck"}) + @Test public void factory_nanos_min() { Duration test = Duration.ofNanos(Long.MIN_VALUE); assertEquals(test.getSeconds(), Long.MIN_VALUE / 1000000000 - 1); @@ -243,33 +248,33 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // ofMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_minutes() { Duration test = Duration.ofMinutes(2); assertEquals(test.getSeconds(), 120); assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_minutes_max() { Duration test = Duration.ofMinutes(Long.MAX_VALUE / 60); assertEquals(test.getSeconds(), (Long.MAX_VALUE / 60) * 60); assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_minutes_min() { Duration test = Duration.ofMinutes(Long.MIN_VALUE / 60); assertEquals(test.getSeconds(), (Long.MIN_VALUE / 60) * 60); assertEquals(test.getNano(), 0); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_minutes_tooBig() { Duration.ofMinutes(Long.MAX_VALUE / 60 + 1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_minutes_tooSmall() { Duration.ofMinutes(Long.MIN_VALUE / 60 - 1); } @@ -277,33 +282,33 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // ofHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_hours() { Duration test = Duration.ofHours(2); assertEquals(test.getSeconds(), 2 * 3600); assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_hours_max() { Duration test = Duration.ofHours(Long.MAX_VALUE / 3600); assertEquals(test.getSeconds(), (Long.MAX_VALUE / 3600) * 3600); assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_hours_min() { Duration test = Duration.ofHours(Long.MIN_VALUE / 3600); assertEquals(test.getSeconds(), (Long.MIN_VALUE / 3600) * 3600); assertEquals(test.getNano(), 0); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_hours_tooBig() { Duration.ofHours(Long.MAX_VALUE / 3600 + 1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_hours_tooSmall() { Duration.ofHours(Long.MIN_VALUE / 3600 - 1); } @@ -311,33 +316,33 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // ofDays() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_days() { Duration test = Duration.ofDays(2); assertEquals(test.getSeconds(), 2 * 86400); assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_days_max() { Duration test = Duration.ofDays(Long.MAX_VALUE / 86400); assertEquals(test.getSeconds(), (Long.MAX_VALUE / 86400) * 86400); assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_days_min() { Duration test = Duration.ofDays(Long.MIN_VALUE / 86400); assertEquals(test.getSeconds(), (Long.MIN_VALUE / 86400) * 86400); assertEquals(test.getNano(), 0); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_days_tooBig() { Duration.ofDays(Long.MAX_VALUE / 86400 + 1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void factory_days_tooSmall() { Duration.ofDays(Long.MIN_VALUE / 86400 - 1); } @@ -405,7 +410,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="OfTemporalUnit", groups={"tck"}) + @Test(dataProvider="OfTemporalUnit") public void factory_of_longTemporalUnit(long amount, TemporalUnit unit, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.of(amount, unit); assertEquals(t.getSeconds(), expectedSeconds); @@ -424,76 +429,93 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="OfTemporalUnitOutOfRange", expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(dataProvider="OfTemporalUnitOutOfRange", expectedExceptions=ArithmeticException.class) public void factory_of_longTemporalUnit_outOfRange(long amount, TemporalUnit unit) { Duration.of(amount, unit); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_longTemporalUnit_estimatedUnit() { Duration.of(2, WEEKS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_longTemporalUnit_null() { Duration.of(1, (TemporalUnit) null); } //----------------------------------------------------------------------- - // between() + // from(TemporalAmount) //----------------------------------------------------------------------- - @DataProvider(name="durationBetweenInstant") - Object[][] data_durationBetweenInstant() { - return new Object[][] { - {0, 0, 0, 0, 0, 0}, - {3, 0, 7, 0, 4, 0}, - {3, 20, 7, 50, 4, 30}, - {3, 80, 7, 50, 3, 999999970}, - {7, 0, 3, 0, -4, 0}, + @Test + public void factory_from_TemporalAmount_Duration() { + TemporalAmount amount = Duration.ofHours(3); + assertEquals(Duration.from(amount), Duration.ofHours(3)); + } + + @Test + public void factory_from_TemporalAmount_DaysNanos() { + TemporalAmount amount = new TemporalAmount() { + @Override + public long get(TemporalUnit unit) { + if (unit == DAYS) { + return 23; + } else { + return 45; + } + } + @Override + public List getUnits() { + List list = new ArrayList<>(); + list.add(DAYS); + list.add(NANOS); + return list; + } + @Override + public Temporal addTo(Temporal temporal) { + throw new UnsupportedOperationException(); + } + @Override + public Temporal subtractFrom(Temporal temporal) { + throw new UnsupportedOperationException(); + } }; + Duration t = Duration.from(amount); + assertEquals(t.getSeconds(), 23 * 86400); + assertEquals(t.getNano(), 45); } - @Test(dataProvider="durationBetweenInstant") - public void factory_between_TemporalTemporal_Instant(long secs1, int nanos1, long secs2, int nanos2, long expectedSeconds, int expectedNanoOfSecond) { - Instant start = Instant.ofEpochSecond(secs1, nanos1); - Instant end = Instant.ofEpochSecond(secs2, nanos2); - Duration t = Duration.between(start, end); - assertEquals(t.getSeconds(), expectedSeconds); - assertEquals(t.getNano(), expectedNanoOfSecond); - } - - @DataProvider(name="durationBetweenLocalTime") - Object[][] data_durationBetweenLocalTime() { - return new Object[][] { - {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 45), 15L, 0}, - {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 25), -5L, 0}, + @Test(expectedExceptions = ArithmeticException.class) + public void factory_from_TemporalAmount_Minutes_tooBig() { + TemporalAmount amount = new TemporalAmount() { + @Override + public long get(TemporalUnit unit) { + return (Long.MAX_VALUE / 60) + 2; + } + @Override + public List getUnits() { + return Collections.singletonList(MINUTES); + } + @Override + public Temporal addTo(Temporal temporal) { + throw new UnsupportedOperationException(); + } + @Override + public Temporal subtractFrom(Temporal temporal) { + throw new UnsupportedOperationException(); + } }; + Duration.from(amount); } - @Test(dataProvider="durationBetweenLocalTime") - public void factory_between_TemporalTemporal_LT(LocalTime start, LocalTime end, long expectedSeconds, int expectedNanoOfSecond) { - Duration t = Duration.between(start, end); - assertEquals(t.getSeconds(), expectedSeconds); - assertEquals(t.getNano(), expectedNanoOfSecond); + @Test(expectedExceptions = DateTimeException.class) + public void factory_from_TemporalAmount_Period() { + Duration.from(Period.ZERO); } - @Test(expectedExceptions=DateTimeException.class) - public void factory_between_TemporalTemporal_mixedTypes() { - Instant start = Instant.ofEpochSecond(1); - ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC); - Duration.between(start, end); - } - - @Test(expectedExceptions=NullPointerException.class) - public void factory_between__TemporalTemporal_startNull() { - Instant end = Instant.ofEpochSecond(1); - Duration.between(null, end); - } - - @Test(expectedExceptions=NullPointerException.class) - public void factory_between__TemporalTemporal_endNull() { - Instant start = Instant.ofEpochSecond(1); - Duration.between(start, null); + @Test(expectedExceptions = NullPointerException.class) + public void factory_from_TemporalAmount_null() { + Duration.from(null); } //----------------------------------------------------------------------- @@ -749,17 +771,115 @@ public class TCKDuration extends AbstractTCKTest { } //----------------------------------------------------------------------- - @Test - public void test_deserialization() throws Exception { - Duration orginal = Duration.ofSeconds(2); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(orginal); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - Duration ser = (Duration) in.readObject(); - assertEquals(Duration.ofSeconds(2), ser); + // between() + //----------------------------------------------------------------------- + @DataProvider(name="durationBetweenInstant") + Object[][] data_durationBetweenInstant() { + return new Object[][] { + {0, 0, 0, 0, 0, 0}, + {3, 0, 7, 0, 4, 0}, + {7, 0, 3, 0, -4, 0}, + + {3, 20, 7, 50, 4, 30}, + {3, 80, 7, 50, 3, 999999970}, + {3, 80, 7, 79, 3, 999999999}, + {3, 80, 7, 80, 4, 0}, + {3, 80, 7, 81, 4, 1}, + }; + } + + @Test(dataProvider="durationBetweenInstant") + public void factory_between_TemporalTemporal_Instant(long secs1, int nanos1, long secs2, int nanos2, long expectedSeconds, int expectedNanoOfSecond) { + Instant start = Instant.ofEpochSecond(secs1, nanos1); + Instant end = Instant.ofEpochSecond(secs2, nanos2); + Duration t = Duration.between(start, end); + assertEquals(t.getSeconds(), expectedSeconds); + assertEquals(t.getNano(), expectedNanoOfSecond); + } + + @Test(dataProvider="durationBetweenInstant") + public void factory_between_TemporalTemporal_Instant_negated(long secs1, int nanos1, long secs2, int nanos2, long expectedSeconds, int expectedNanoOfSecond) { + Instant start = Instant.ofEpochSecond(secs1, nanos1); + Instant end = Instant.ofEpochSecond(secs2, nanos2); + assertEquals(Duration.between(end, start), Duration.between(start, end).negated()); + } + + @DataProvider(name="durationBetweenLocalTime") + Object[][] data_durationBetweenLocalTime() { + return new Object[][] { + {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 45), 15L, 0}, + {LocalTime.of(11, 0, 30), LocalTime.of(11, 0, 25), -5L, 0}, + }; + } + + @Test(dataProvider="durationBetweenLocalTime") + public void factory_between_TemporalTemporal_LT(LocalTime start, LocalTime end, long expectedSeconds, int expectedNanoOfSecond) { + Duration t = Duration.between(start, end); + assertEquals(t.getSeconds(), expectedSeconds); + assertEquals(t.getNano(), expectedNanoOfSecond); + } + + @Test(dataProvider="durationBetweenLocalTime") + public void factory_between_TemporalTemporal_LT_negated(LocalTime start, LocalTime end, long expectedSeconds, int expectedNanoOfSecond) { + assertEquals(Duration.between(end, start), Duration.between(start, end).negated()); + } + + @DataProvider(name="durationBetweenLocalDateTime") + Object[][] data_durationBetweenLocalDateTime() { + return new Object[][] { + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 30, 65_000_000), -2L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), -1L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 32, 65_000_000), 0L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 33, 65_000_000), 1L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 34, 65_000_000), 2L, 500_000_000}, + + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 30, 565_000_000), -1L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 31, 565_000_000), 0L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 32, 565_000_000), 1L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 33, 565_000_000), 2L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 34, 565_000_000), 3L, 500_000_000}, + + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 30, 65_000_000), -1L, 0}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), 0L, 0}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 32, 65_000_000), 1L, 0}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 33, 65_000_000), 2L, 0}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2013, 3, 24, 0, 44, 34, 65_000_000), 3L, 0}, + + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2813, 3, 24, 0, 44, 30, 565_000_000), 2 * CYCLE_SECS - 1L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2813, 3, 24, 0, 44, 31, 565_000_000), 2 * CYCLE_SECS + 0L, 500_000_000}, + {LocalDateTime.of(2013, 3, 24, 0, 44, 31, 65_000_000), LocalDateTime.of(2813, 3, 24, 0, 44, 32, 565_000_000), 2 * CYCLE_SECS + 1L, 500_000_000}, + }; + } + + @Test(dataProvider="durationBetweenLocalDateTime") + public void factory_between_TemporalTemporal_LDT(LocalDateTime start, LocalDateTime end, long expectedSeconds, int expectedNanoOfSecond) { + Duration t = Duration.between(start, end); + assertEquals(t.getSeconds(), expectedSeconds); + assertEquals(t.getNano(), expectedNanoOfSecond); + } + + @Test(dataProvider="durationBetweenLocalDateTime") + public void factory_between_TemporalTemporal_LDT_negated(LocalDateTime start, LocalDateTime end, long expectedSeconds, int expectedNanoOfSecond) { + assertEquals(Duration.between(end, start), Duration.between(start, end).negated()); + } + + @Test(expectedExceptions=DateTimeException.class) + public void factory_between_TemporalTemporal_mixedTypes() { + Instant start = Instant.ofEpochSecond(1); + ZonedDateTime end = Instant.ofEpochSecond(4).atZone(ZoneOffset.UTC); + Duration.between(start, end); + } + + @Test(expectedExceptions=NullPointerException.class) + public void factory_between__TemporalTemporal_startNull() { + Instant end = Instant.ofEpochSecond(1); + Duration.between(null, end); + } + + @Test(expectedExceptions=NullPointerException.class) + public void factory_between__TemporalTemporal_endNull() { + Instant start = Instant.ofEpochSecond(1); + Duration.between(start, null); } //----------------------------------------------------------------------- @@ -977,27 +1097,27 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="Plus", groups={"tck"}) + @Test(dataProvider="Plus") public void plus(long seconds, int nanos, long otherSeconds, int otherNanos, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos).plus(Duration.ofSeconds(otherSeconds, otherNanos)); assertEquals(t.getSeconds(), expectedSeconds); assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void plusOverflowTooBig() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999); t.plus(Duration.ofSeconds(0, 1)); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void plusOverflowTooSmall() { Duration t = Duration.ofSeconds(Long.MIN_VALUE); t.plus(Duration.ofSeconds(-1, 999999999)); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void plus_longTemporalUnit_seconds() { Duration t = Duration.ofSeconds(1); t = t.plus(1, SECONDS); @@ -1005,7 +1125,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(0, t.getNano()); } - @Test(groups={"tck"}) + @Test public void plus_longTemporalUnit_millis() { Duration t = Duration.ofSeconds(1); t = t.plus(1, MILLIS); @@ -1013,7 +1133,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(1000000, t.getNano()); } - @Test(groups={"tck"}) + @Test public void plus_longTemporalUnit_micros() { Duration t = Duration.ofSeconds(1); t = t.plus(1, MICROS); @@ -1021,7 +1141,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(1000, t.getNano()); } - @Test(groups={"tck"}) + @Test public void plus_longTemporalUnit_nanos() { Duration t = Duration.ofSeconds(1); t = t.plus(1, NANOS); @@ -1029,12 +1149,138 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(1, t.getNano()); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void plus_longTemporalUnit_null() { Duration t = Duration.ofSeconds(1); t.plus(1, (TemporalUnit) null); } + //----------------------------------------------------------------------- + @DataProvider(name="PlusDays") + Object[][] provider_plusDays_long() { + return new Object[][] { + {0, 0, 0}, + {0, 1, 1}, + {0, -1, -1}, + {Long.MAX_VALUE/3600/24, 0, Long.MAX_VALUE/3600/24}, + {Long.MIN_VALUE/3600/24, 0, Long.MIN_VALUE/3600/24}, + {1, 0, 1}, + {1, 1, 2}, + {1, -1, 0}, + {1, Long.MIN_VALUE/3600/24, Long.MIN_VALUE/3600/24 + 1}, + {1, 0, 1}, + {1, 1, 2}, + {1, -1, 0}, + {-1, 0, -1}, + {-1, 1, 0}, + {-1, -1, -2}, + {-1, Long.MAX_VALUE/3600/24, Long.MAX_VALUE/3600/24 - 1}, + }; + } + + @Test(dataProvider="PlusDays") + public void plusDays_long(long days, long amount, long expectedDays) { + Duration t = Duration.ofDays(days); + t = t.plusDays(amount); + assertEquals(t.toDays(), expectedDays); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void plusDays_long_overflowTooBig() { + Duration t = Duration.ofDays(1); + t.plusDays(Long.MAX_VALUE/3600/24); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void plusDays_long_overflowTooSmall() { + Duration t = Duration.ofDays(-1); + t.plusDays(Long.MIN_VALUE/3600/24); + } + + //----------------------------------------------------------------------- + @DataProvider(name="PlusHours") + Object[][] provider_plusHours_long() { + return new Object[][] { + {0, 0, 0}, + {0, 1, 1}, + {0, -1, -1}, + {Long.MAX_VALUE/3600, 0, Long.MAX_VALUE/3600}, + {Long.MIN_VALUE/3600, 0, Long.MIN_VALUE/3600}, + {1, 0, 1}, + {1, 1, 2}, + {1, -1, 0}, + {1, Long.MIN_VALUE/3600, Long.MIN_VALUE/3600 + 1}, + {1, 0, 1}, + {1, 1, 2}, + {1, -1, 0}, + {-1, 0, -1}, + {-1, 1, 0}, + {-1, -1, -2}, + {-1, Long.MAX_VALUE/3600, Long.MAX_VALUE/3600 - 1}, + }; + } + + @Test(dataProvider="PlusHours") + public void plusHours_long(long hours, long amount, long expectedHours) { + Duration t = Duration.ofHours(hours); + t = t.plusHours(amount); + assertEquals(t.toHours(), expectedHours); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void plusHours_long_overflowTooBig() { + Duration t = Duration.ofHours(1); + t.plusHours(Long.MAX_VALUE/3600); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void plusHours_long_overflowTooSmall() { + Duration t = Duration.ofHours(-1); + t.plusHours(Long.MIN_VALUE/3600); + } + + //----------------------------------------------------------------------- + @DataProvider(name="PlusMinutes") + Object[][] provider_plusMinutes_long() { + return new Object[][] { + {0, 0, 0}, + {0, 1, 1}, + {0, -1, -1}, + {Long.MAX_VALUE/60, 0, Long.MAX_VALUE/60}, + {Long.MIN_VALUE/60, 0, Long.MIN_VALUE/60}, + {1, 0, 1}, + {1, 1, 2}, + {1, -1, 0}, + {1, Long.MIN_VALUE/60, Long.MIN_VALUE/60 + 1}, + {1, 0, 1}, + {1, 1, 2}, + {1, -1, 0}, + {-1, 0, -1}, + {-1, 1, 0}, + {-1, -1, -2}, + {-1, Long.MAX_VALUE/60, Long.MAX_VALUE/60 - 1}, + }; + } + + @Test(dataProvider="PlusMinutes") + public void plusMinutes_long(long minutes, long amount, long expectedMinutes) { + Duration t = Duration.ofMinutes(minutes); + t = t.plusMinutes(amount); + assertEquals(t.toMinutes(), expectedMinutes); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void plusMinutes_long_overflowTooBig() { + Duration t = Duration.ofMinutes(1); + t.plusMinutes(Long.MAX_VALUE/60); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void plusMinutes_long_overflowTooSmall() { + Duration t = Duration.ofMinutes(-1); + t.plusMinutes(Long.MIN_VALUE/60); + } + //----------------------------------------------------------------------- @DataProvider(name="PlusSeconds") Object[][] provider_plusSeconds_long() { @@ -1062,7 +1308,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="PlusSeconds", groups={"tck"}) + @Test(dataProvider="PlusSeconds") public void plusSeconds_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.plusSeconds(amount); @@ -1070,13 +1316,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void plusSeconds_long_overflowTooBig() { Duration t = Duration.ofSeconds(1, 0); t.plusSeconds(Long.MAX_VALUE); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void plusSeconds_long_overflowTooSmall() { Duration t = Duration.ofSeconds(-1, 0); t.plusSeconds(Long.MIN_VALUE); @@ -1138,21 +1384,21 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="PlusMillis", groups={"tck"}) + @Test(dataProvider="PlusMillis") public void plusMillis_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.plusMillis(amount); assertEquals(t.getSeconds(), expectedSeconds); assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(dataProvider="PlusMillis", groups={"tck"}) + @Test(dataProvider="PlusMillis") public void plusMillis_long_oneMore(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds + 1, nanos); t = t.plusMillis(amount); assertEquals(t.getSeconds(), expectedSeconds + 1); assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(dataProvider="PlusMillis", groups={"tck"}) + @Test(dataProvider="PlusMillis") public void plusMillis_long_minusOneLess(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds - 1, nanos); t = t.plusMillis(amount); @@ -1160,7 +1406,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(groups={"tck"}) + @Test public void plusMillis_long_max() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 998999999); t = t.plusMillis(1); @@ -1168,13 +1414,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), 999999999); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void plusMillis_long_overflowTooBig() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999000000); t.plusMillis(1); } - @Test(groups={"tck"}) + @Test public void plusMillis_long_min() { Duration t = Duration.ofSeconds(Long.MIN_VALUE, 1000000); t = t.plusMillis(-1); @@ -1182,7 +1428,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), 0); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void plusMillis_long_overflowTooSmall() { Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0); t.plusMillis(-1); @@ -1264,7 +1510,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="PlusNanos", groups={"tck"}) + @Test(dataProvider="PlusNanos") public void plusNanos_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.plusNanos(amount); @@ -1272,13 +1518,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void plusNanos_long_overflowTooBig() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999); t.plusNanos(1); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void plusNanos_long_overflowTooSmall() { Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0); t.plusNanos(-1); @@ -1470,27 +1716,27 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="Minus", groups={"tck"}) + @Test(dataProvider="Minus") public void minus(long seconds, int nanos, long otherSeconds, int otherNanos, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos).minus(Duration.ofSeconds(otherSeconds, otherNanos)); assertEquals(t.getSeconds(), expectedSeconds); assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void minusOverflowTooSmall() { Duration t = Duration.ofSeconds(Long.MIN_VALUE); t.minus(Duration.ofSeconds(0, 1)); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void minusOverflowTooBig() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999); t.minus(Duration.ofSeconds(-1, 999999999)); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void minus_longTemporalUnit_seconds() { Duration t = Duration.ofSeconds(1); t = t.minus(1, SECONDS); @@ -1498,7 +1744,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(0, t.getNano()); } - @Test(groups={"tck"}) + @Test public void minus_longTemporalUnit_millis() { Duration t = Duration.ofSeconds(1); t = t.minus(1, MILLIS); @@ -1506,7 +1752,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(999000000, t.getNano()); } - @Test(groups={"tck"}) + @Test public void minus_longTemporalUnit_micros() { Duration t = Duration.ofSeconds(1); t = t.minus(1, MICROS); @@ -1514,7 +1760,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(999999000, t.getNano()); } - @Test(groups={"tck"}) + @Test public void minus_longTemporalUnit_nanos() { Duration t = Duration.ofSeconds(1); t = t.minus(1, NANOS); @@ -1522,12 +1768,138 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(999999999, t.getNano()); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void minus_longTemporalUnit_null() { Duration t = Duration.ofSeconds(1); t.minus(1, (TemporalUnit) null); } + //----------------------------------------------------------------------- + @DataProvider(name="MinusDays") + Object[][] provider_minusDays_long() { + return new Object[][] { + {0, 0, 0}, + {0, 1, -1}, + {0, -1, 1}, + {Long.MAX_VALUE/3600/24, 0, Long.MAX_VALUE/3600/24}, + {Long.MIN_VALUE/3600/24, 0, Long.MIN_VALUE/3600/24}, + {1, 0, 1}, + {1, 1, 0}, + {1, -1, 2}, + {Long.MAX_VALUE/3600/24, 1, Long.MAX_VALUE/3600/24 - 1}, + {Long.MIN_VALUE/3600/24, -1, Long.MIN_VALUE/3600/24 + 1}, + {1, 0, 1}, + {1, 1, 0}, + {1, -1, 2}, + {-1, 0, -1}, + {-1, 1, -2}, + {-1, -1, 0}, + }; + } + + @Test(dataProvider="MinusDays") + public void minusDays_long(long days, long amount, long expectedDays) { + Duration t = Duration.ofDays(days); + t = t.minusDays(amount); + assertEquals(t.toDays(), expectedDays); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void minusDays_long_overflowTooBig() { + Duration t = Duration.ofDays(Long.MAX_VALUE/3600/24); + t.minusDays(-1); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void minusDays_long_overflowTooSmall() { + Duration t = Duration.ofDays(Long.MIN_VALUE/3600/24); + t.minusDays(1); + } + + //----------------------------------------------------------------------- + @DataProvider(name="MinusHours") + Object[][] provider_minusHours_long() { + return new Object[][] { + {0, 0, 0}, + {0, 1, -1}, + {0, -1, 1}, + {Long.MAX_VALUE/3600, 0, Long.MAX_VALUE/3600}, + {Long.MIN_VALUE/3600, 0, Long.MIN_VALUE/3600}, + {1, 0, 1}, + {1, 1, 0}, + {1, -1, 2}, + {Long.MAX_VALUE/3600, 1, Long.MAX_VALUE/3600 - 1}, + {Long.MIN_VALUE/3600, -1, Long.MIN_VALUE/3600 + 1}, + {1, 0, 1}, + {1, 1, 0}, + {1, -1, 2}, + {-1, 0, -1}, + {-1, 1, -2}, + {-1, -1, 0}, + }; + } + + @Test(dataProvider="MinusHours") + public void minusHours_long(long hours, long amount, long expectedHours) { + Duration t = Duration.ofHours(hours); + t = t.minusHours(amount); + assertEquals(t.toHours(), expectedHours); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void minusHours_long_overflowTooBig() { + Duration t = Duration.ofHours(Long.MAX_VALUE/3600); + t.minusHours(-1); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void minusHours_long_overflowTooSmall() { + Duration t = Duration.ofHours(Long.MIN_VALUE/3600); + t.minusHours(1); + } + + //----------------------------------------------------------------------- + @DataProvider(name="MinusMinutes") + Object[][] provider_minusminutes_long() { + return new Object[][] { + {0, 0, 0}, + {0, 1, -1}, + {0, -1, 1}, + {Long.MAX_VALUE/60, 0, Long.MAX_VALUE/60}, + {Long.MIN_VALUE/60, 0, Long.MIN_VALUE/60}, + {1, 0, 1}, + {1, 1, 0}, + {1, -1, 2}, + {Long.MAX_VALUE/60, 1, Long.MAX_VALUE/60 - 1}, + {Long.MIN_VALUE/60, -1, Long.MIN_VALUE/60 + 1}, + {1, 0, 1}, + {1, 1, 0}, + {1, -1, 2}, + {-1, 0, -1}, + {-1, 1, -2}, + {-1, -1, 0}, + }; + } + + @Test(dataProvider="MinusMinutes") + public void minusMinutes_long(long minutes, long amount, long expectedMinutes) { + Duration t = Duration.ofMinutes(minutes); + t = t.minusMinutes(amount); + assertEquals(t.toMinutes(), expectedMinutes); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void minusMinutes_long_overflowTooBig() { + Duration t = Duration.ofMinutes(Long.MAX_VALUE/60); + t.minusMinutes(-1); + } + + @Test(expectedExceptions = {ArithmeticException.class}) + public void minusMinutes_long_overflowTooSmall() { + Duration t = Duration.ofMinutes(Long.MIN_VALUE/60); + t.minusMinutes(1); + } + //----------------------------------------------------------------------- @DataProvider(name="MinusSeconds") Object[][] provider_minusSeconds_long() { @@ -1555,7 +1927,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="MinusSeconds", groups={"tck"}) + @Test(dataProvider="MinusSeconds") public void minusSeconds_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.minusSeconds(amount); @@ -1563,13 +1935,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void minusSeconds_long_overflowTooBig() { Duration t = Duration.ofSeconds(1, 0); t.minusSeconds(Long.MIN_VALUE + 1); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void minusSeconds_long_overflowTooSmall() { Duration t = Duration.ofSeconds(-2, 0); t.minusSeconds(Long.MAX_VALUE); @@ -1631,21 +2003,21 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="MinusMillis", groups={"tck"}) + @Test(dataProvider="MinusMillis") public void minusMillis_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.minusMillis(amount); assertEquals(t.getSeconds(), expectedSeconds); assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(dataProvider="MinusMillis", groups={"tck"}) + @Test(dataProvider="MinusMillis") public void minusMillis_long_oneMore(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds + 1, nanos); t = t.minusMillis(amount); assertEquals(t.getSeconds(), expectedSeconds + 1); assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(dataProvider="MinusMillis", groups={"tck"}) + @Test(dataProvider="MinusMillis") public void minusMillis_long_minusOneLess(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds - 1, nanos); t = t.minusMillis(amount); @@ -1653,7 +2025,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(groups={"tck"}) + @Test public void minusMillis_long_max() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 998999999); t = t.minusMillis(-1); @@ -1661,13 +2033,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), 999999999); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void minusMillis_long_overflowTooBig() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999000000); t.minusMillis(-1); } - @Test(groups={"tck"}) + @Test public void minusMillis_long_min() { Duration t = Duration.ofSeconds(Long.MIN_VALUE, 1000000); t = t.minusMillis(1); @@ -1675,7 +2047,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), 0); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void minusMillis_long_overflowTooSmall() { Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0); t.minusMillis(1); @@ -1757,7 +2129,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="MinusNanos", groups={"tck"}) + @Test(dataProvider="MinusNanos") public void minusNanos_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.minusNanos(amount); @@ -1765,13 +2137,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanoOfSecond); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void minusNanos_long_overflowTooBig() { Duration t = Duration.ofSeconds(Long.MAX_VALUE, 999999999); t.minusNanos(-1); } - @Test(expectedExceptions = {ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions = {ArithmeticException.class}) public void minusNanos_long_overflowTooSmall() { Duration t = Duration.ofSeconds(Long.MIN_VALUE, 0); t.minusNanos(1); @@ -1873,7 +2245,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="MultipliedBy", groups={"tck"}) + @Test(dataProvider="MultipliedBy") public void multipliedBy(long seconds, int nanos, int multiplicand, long expectedSeconds, int expectedNanos) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.multipliedBy(multiplicand); @@ -1881,25 +2253,25 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanos); } - @Test(groups={"tck"}) + @Test public void multipliedBy_max() { Duration test = Duration.ofSeconds(1); assertEquals(test.multipliedBy(Long.MAX_VALUE), Duration.ofSeconds(Long.MAX_VALUE)); } - @Test(groups={"tck"}) + @Test public void multipliedBy_min() { Duration test = Duration.ofSeconds(1); assertEquals(test.multipliedBy(Long.MIN_VALUE), Duration.ofSeconds(Long.MIN_VALUE)); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void multipliedBy_tooBig() { Duration test = Duration.ofSeconds(1, 1); test.multipliedBy(Long.MAX_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void multipliedBy_tooBig_negative() { Duration test = Duration.ofSeconds(1, 1); test.multipliedBy(Long.MIN_VALUE); @@ -1990,7 +2362,7 @@ public class TCKDuration extends AbstractTCKTest { }; } - @Test(dataProvider="DividedBy", groups={"tck"}) + @Test(dataProvider="DividedBy") public void dividedBy(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNanos) { Duration t = Duration.ofSeconds(seconds, nanos); t = t.dividedBy(divisor); @@ -1998,14 +2370,14 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(t.getNano(), expectedNanos); } - @Test(dataProvider="DividedBy", expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(dataProvider="DividedBy", expectedExceptions=ArithmeticException.class) public void dividedByZero(long seconds, int nanos, int divisor, long expectedSeconds, int expectedNanos) { Duration t = Duration.ofSeconds(seconds, nanos); t.dividedBy(0); fail(t + " divided by zero did not throw ArithmeticException"); } - @Test(groups={"tck"}) + @Test public void dividedBy_max() { Duration test = Duration.ofSeconds(Long.MAX_VALUE); assertEquals(test.dividedBy(Long.MAX_VALUE), Duration.ofSeconds(1)); @@ -2014,7 +2386,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // negated() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_negated() { assertEquals(Duration.ofSeconds(0).negated(), Duration.ofSeconds(0)); assertEquals(Duration.ofSeconds(12).negated(), Duration.ofSeconds(-12)); @@ -2026,7 +2398,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(Duration.ofSeconds(Long.MAX_VALUE).negated(), Duration.ofSeconds(-Long.MAX_VALUE)); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_negated_overflow() { Duration.ofSeconds(Long.MIN_VALUE).negated(); } @@ -2034,7 +2406,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // abs() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_abs() { assertEquals(Duration.ofSeconds(0).abs(), Duration.ofSeconds(0)); assertEquals(Duration.ofSeconds(12).abs(), Duration.ofSeconds(12)); @@ -2046,7 +2418,7 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(Duration.ofSeconds(Long.MAX_VALUE).abs(), Duration.ofSeconds(Long.MAX_VALUE)); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_abs_overflow() { Duration.ofSeconds(Long.MIN_VALUE).abs(); } @@ -2054,19 +2426,19 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // toNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toNanos() { Duration test = Duration.ofSeconds(321, 123456789); assertEquals(test.toNanos(), 321123456789L); } - @Test(groups={"tck"}) + @Test public void test_toNanos_max() { Duration test = Duration.ofSeconds(0, Long.MAX_VALUE); assertEquals(test.toNanos(), Long.MAX_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_toNanos_tooBig() { Duration test = Duration.ofSeconds(0, Long.MAX_VALUE).plusNanos(1); test.toNanos(); @@ -2075,19 +2447,19 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // toMillis() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toMillis() { Duration test = Duration.ofSeconds(321, 123456789); assertEquals(test.toMillis(), 321000 + 123); } - @Test(groups={"tck"}) + @Test public void test_toMillis_max() { Duration test = Duration.ofSeconds(Long.MAX_VALUE / 1000, (Long.MAX_VALUE % 1000) * 1000000); assertEquals(test.toMillis(), Long.MAX_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_toMillis_tooBig() { Duration test = Duration.ofSeconds(Long.MAX_VALUE / 1000, ((Long.MAX_VALUE % 1000) + 1) * 1000000); test.toMillis(); @@ -2096,7 +2468,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_comparisons() { doTest_comparisons_Duration( Duration.ofSeconds(-2L, 0), @@ -2134,13 +2506,13 @@ public class TCKDuration extends AbstractTCKTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_ObjectNull() { Duration a = Duration.ofSeconds(0L, 0); a.compareTo(null); } - @Test(expectedExceptions=ClassCastException.class, groups={"tck"}) + @Test(expectedExceptions=ClassCastException.class) @SuppressWarnings({ "unchecked", "rawtypes" }) public void compareToNonDuration() { Comparable c = Duration.ofSeconds(0L); @@ -2150,7 +2522,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals() { Duration test5a = Duration.ofSeconds(5L, 20); Duration test5b = Duration.ofSeconds(5L, 20); @@ -2178,13 +2550,13 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(test6.equals(test6), true); } - @Test(groups={"tck"}) + @Test public void test_equals_null() { Duration test5 = Duration.ofSeconds(5L, 20); assertEquals(test5.equals(null), false); } - @Test(groups={"tck"}) + @Test public void test_equals_otherClass() { Duration test5 = Duration.ofSeconds(5L, 20); assertEquals(test5.equals(""), false); @@ -2193,7 +2565,7 @@ public class TCKDuration extends AbstractTCKTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_hashCode() { Duration test5a = Duration.ofSeconds(5L, 20); Duration test5b = Duration.ofSeconds(5L, 20); @@ -2208,6 +2580,71 @@ public class TCKDuration extends AbstractTCKTest { assertEquals(test5a.hashCode() == test6.hashCode(), false); } + //----------------------------------------------------------------------- + @DataProvider(name="withNanos") + Object[][] provider_withNanos_int() { + return new Object[][] { + {0, 0, 0, 0, 0}, + {0, 0, 1, 0, 1}, + {0, 0, 999999999, 0, 999999999}, + + {1, 0, 0, 1, 0}, + {1, 0, 1, 1, 1}, + {1, 0, 999999999, 1, 999999999}, + + {-1, 0, 0, -1, 0}, + {-1, 0, 1, -1, 1}, + {-1, 0, 999999999, -1, 999999999}, + + {1, 999999999, 0, 1, 0}, + {1, 999999999, 1, 1, 1}, + {1, 999999998, 2, 1, 2}, + + {Long.MAX_VALUE, 0, 999999999, Long.MAX_VALUE, 999999999}, + {Long.MIN_VALUE, 0, 999999999, Long.MIN_VALUE, 999999999}, + }; + } + + @Test(dataProvider="withNanos") + public void withNanos_long(long seconds, int nanos, int amount, long expectedSeconds, int expectedNanoOfSecond) { + Duration t = Duration.ofSeconds(seconds, nanos); + t = t.withNanos(amount); + assertEquals(t.getSeconds(), expectedSeconds); + assertEquals(t.getNano(), expectedNanoOfSecond); + } + + //----------------------------------------------------------------------- + @DataProvider(name="withSeconds") + Object[][] provider_withSeconds_long() { + return new Object[][] { + {0, 0, 0, 0, 0}, + {0, 0, 1, 1, 0}, + {0, 0, -1, -1, 0}, + {0, 0, Long.MAX_VALUE, Long.MAX_VALUE, 0}, + {0, 0, Long.MIN_VALUE, Long.MIN_VALUE, 0}, + + {1, 0, 0, 0, 0}, + {1, 0, 2, 2, 0}, + {1, 0, -1, -1, 0}, + {1, 0, Long.MAX_VALUE, Long.MAX_VALUE, 0}, + {1, 0, Long.MIN_VALUE, Long.MIN_VALUE, 0}, + + {-1, 1, 0, 0, 1}, + {-1, 1, 1, 1, 1}, + {-1, 1, -1, -1, 1}, + {-1, 1, Long.MAX_VALUE, Long.MAX_VALUE, 1}, + {-1, 1, Long.MIN_VALUE, Long.MIN_VALUE, 1}, + }; + } + + @Test(dataProvider="withSeconds") + public void withSeconds_long(long seconds, int nanos, long amount, long expectedSeconds, int expectedNanoOfSecond) { + Duration t = Duration.ofSeconds(seconds, nanos); + t = t.withSeconds(amount); + assertEquals(t.getSeconds(), expectedSeconds); + assertEquals(t.getNano(), expectedNanoOfSecond); + } + //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- @@ -2299,6 +2736,6 @@ public class TCKDuration extends AbstractTCKTest { @Test(dataProvider="BadTemporalUnit", expectedExceptions=DateTimeException.class) public void test_bad_getUnit(long amount, TemporalUnit unit) { Duration t = Duration.of(amount, unit); - long actual = t.get(unit); + t.get(unit); } } diff --git a/jdk/test/java/time/tck/java/time/TCKInstant.java b/jdk/test/java/time/tck/java/time/TCKInstant.java index 0dd745d88e5..0bab2477992 100644 --- a/jdk/test/java/time/tck/java/time/TCKInstant.java +++ b/jdk/test/java/time/tck/java/time/TCKInstant.java @@ -75,6 +75,7 @@ import static java.time.temporal.ChronoUnit.WEEKS; import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; @@ -84,18 +85,20 @@ import java.time.Duration; import java.time.Instant; import java.time.LocalDateTime; import java.time.OffsetDateTime; +import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalAdjuster; import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; import java.time.temporal.TemporalUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -113,6 +116,8 @@ public class TCKInstant extends AbstractDateTimeTest { private static final long MIN_SECOND = Instant.MIN.getEpochSecond(); private static final long MAX_SECOND = Instant.MAX.getEpochSecond(); + private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris"); + private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2); private Instant TEST_12345_123456789; @@ -411,13 +416,13 @@ public class TCKInstant extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_12345_123456789, Queries.chronology(), null}, - {TEST_12345_123456789, Queries.zoneId(), null}, - {TEST_12345_123456789, Queries.precision(), NANOS}, - {TEST_12345_123456789, Queries.zone(), null}, - {TEST_12345_123456789, Queries.offset(), null}, - {TEST_12345_123456789, Queries.localDate(), null}, - {TEST_12345_123456789, Queries.localTime(), null}, + {TEST_12345_123456789, TemporalQuery.chronology(), null}, + {TEST_12345_123456789, TemporalQuery.zoneId(), null}, + {TEST_12345_123456789, TemporalQuery.precision(), NANOS}, + {TEST_12345_123456789, TemporalQuery.zone(), null}, + {TEST_12345_123456789, TemporalQuery.offset(), null}, + {TEST_12345_123456789, TemporalQuery.localDate(), null}, + {TEST_12345_123456789, TemporalQuery.localTime(), null}, }; } @@ -436,6 +441,128 @@ public class TCKInstant extends AbstractDateTimeTest { TEST_12345_123456789.query(null); } + //----------------------------------------------------------------------- + // adjustInto(Temporal) + //----------------------------------------------------------------------- + @DataProvider(name="adjustInto") + Object[][] data_adjustInto() { + return new Object[][]{ + {Instant.ofEpochSecond(10, 200), Instant.ofEpochSecond(20), Instant.ofEpochSecond(10, 200), null}, + {Instant.ofEpochSecond(10, -200), Instant.now(), Instant.ofEpochSecond(10, -200), null}, + {Instant.ofEpochSecond(-10), Instant.EPOCH, Instant.ofEpochSecond(-10), null}, + {Instant.ofEpochSecond(10), Instant.MIN, Instant.ofEpochSecond(10), null}, + {Instant.ofEpochSecond(10), Instant.MAX, Instant.ofEpochSecond(10), null}, + + {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC), Instant.ofEpochSecond(10, 200), null}, + {Instant.ofEpochSecond(10, 200), OffsetDateTime.of(1970, 1, 1, 0, 0, 20, 10, ZoneOffset.UTC), OffsetDateTime.of(1970, 1, 1, 0, 0, 10, 200, ZoneOffset.UTC), null}, + {Instant.ofEpochSecond(10, 200), OffsetDateTime.of(1970, 1, 1, 0, 0, 20, 10, OFFSET_PTWO), OffsetDateTime.of(1970, 1, 1, 2, 0, 10, 200, OFFSET_PTWO), null}, + {Instant.ofEpochSecond(10, 200), ZonedDateTime.of(1970, 1, 1, 0, 0, 20, 10, ZONE_PARIS), ZonedDateTime.of(1970, 1, 1, 1, 0, 10, 200, ZONE_PARIS), null}, + + {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20), null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), null, null, NullPointerException.class}, + + }; + } + + @Test(dataProvider="adjustInto") + public void test_adjustInto(Instant test, Temporal temporal, Temporal expected, Class expectedEx) { + if (expectedEx == null) { + Temporal result = test.adjustInto(temporal); + assertEquals(result, expected); + } else { + try { + Temporal result = test.adjustInto(temporal); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + + //----------------------------------------------------------------------- + // with(TemporalAdjuster) + //----------------------------------------------------------------------- + @DataProvider(name="with") + Object[][] data_with() { + return new Object[][]{ + {Instant.ofEpochSecond(10, 200), Instant.ofEpochSecond(20), Instant.ofEpochSecond(20), null}, + {Instant.ofEpochSecond(10), Instant.ofEpochSecond(20, -100), Instant.ofEpochSecond(20, -100), null}, + {Instant.ofEpochSecond(-10), Instant.EPOCH, Instant.ofEpochSecond(0), null}, + {Instant.ofEpochSecond(10), Instant.MIN, Instant.MIN, null}, + {Instant.ofEpochSecond(10), Instant.MAX, Instant.MAX, null}, + + {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20).toInstant(ZoneOffset.UTC), Instant.ofEpochSecond(20), null}, + + {Instant.ofEpochSecond(10, 200), LocalDateTime.of(1970, 1, 1, 0, 0, 20), null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), null, null, NullPointerException.class}, + + }; + } + + + @Test(dataProvider="with") + public void test_with_temporalAdjuster(Instant test, TemporalAdjuster adjuster, Instant expected, Class expectedEx) { + if (expectedEx == null) { + Instant result = test.with(adjuster); + assertEquals(result, expected); + } else { + try { + Instant result = test.with(adjuster); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + + //----------------------------------------------------------------------- + // with(TemporalField, long) + //----------------------------------------------------------------------- + @DataProvider(name="with_longTemporalField") + Object[][] data_with_longTemporalField() { + return new Object[][]{ + {Instant.ofEpochSecond(10, 200), ChronoField.INSTANT_SECONDS, 100, Instant.ofEpochSecond(100, 200), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.INSTANT_SECONDS, 0, Instant.ofEpochSecond(0, 200), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.INSTANT_SECONDS, -100, Instant.ofEpochSecond(-100, 200), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 100, Instant.ofEpochSecond(10, 100), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 0, Instant.ofEpochSecond(10), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_SECOND, 100, Instant.ofEpochSecond(10, 100*1000), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_SECOND, 0, Instant.ofEpochSecond(10), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_SECOND, 100, Instant.ofEpochSecond(10, 100*1000*1000), null}, + {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_SECOND, 0, Instant.ofEpochSecond(10), null}, + + {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_SECOND, 1000000000L, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_SECOND, 1000000, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_SECOND, 1000, null, DateTimeException.class}, + + {Instant.ofEpochSecond(10, 200), ChronoField.SECOND_OF_MINUTE, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.SECOND_OF_DAY, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.OFFSET_SECONDS, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.NANO_OF_DAY, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.MINUTE_OF_HOUR, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.MINUTE_OF_DAY, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.MILLI_OF_DAY, 1, null, DateTimeException.class}, + {Instant.ofEpochSecond(10, 200), ChronoField.MICRO_OF_DAY, 1, null, DateTimeException.class}, + + + }; + } + + @Test(dataProvider="with_longTemporalField") + public void test_with_longTemporalField(Instant test, TemporalField field, long value, Instant expected, Class expectedEx) { + if (expectedEx == null) { + Instant result = test.with(field, value); + assertEquals(result, expected); + } else { + try { + Instant result = test.with(field, value); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + //----------------------------------------------------------------------- // truncated(TemporalUnit) //----------------------------------------------------------------------- @@ -509,7 +636,7 @@ public class TCKInstant extends AbstractDateTimeTest { {Instant.ofEpochSecond(86400 + 10800 + 60 + 1, 123_456_789), NINETY_MINS, Instant.ofEpochSecond(86400 + 10800, 0)}, }; } - @Test(groups={"tck"}, dataProvider="truncatedToValid") + @Test(dataProvider="truncatedToValid") public void test_truncatedTo_valid(Instant input, TemporalUnit unit, Instant expected) { assertEquals(input.truncatedTo(unit), expected); } @@ -524,12 +651,12 @@ public class TCKInstant extends AbstractDateTimeTest { }; } - @Test(groups={"tck"}, dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class) + @Test(dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class) public void test_truncatedTo_invalid(Instant input, TemporalUnit unit) { input.truncatedTo(unit); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_truncatedTo_null() { TEST_12345_123456789.truncatedTo(null); } @@ -1579,6 +1706,130 @@ public class TCKInstant extends AbstractDateTimeTest { i.minusNanos(1); } + //----------------------------------------------------------------------- + // periodUntil(Temporal, TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name="periodUntilUnit") + Object[][] data_periodUntilUnit() { + return new Object[][] { + {5, 650, -1, 650, SECONDS, -6}, + {5, 650, 0, 650, SECONDS, -5}, + {5, 650, 3, 650, SECONDS, -2}, + {5, 650, 4, 650, SECONDS, -1}, + {5, 650, 5, 650, SECONDS, 0}, + {5, 650, 6, 650, SECONDS, 1}, + {5, 650, 7, 650, SECONDS, 2}, + + {5, 650, -1, 0, SECONDS, -6}, + {5, 650, 0, 0, SECONDS, -5}, + {5, 650, 3, 0, SECONDS, -2}, + {5, 650, 4, 0, SECONDS, -1}, + {5, 650, 5, 0, SECONDS, 0}, + {5, 650, 6, 0, SECONDS, 0}, + {5, 650, 7, 0, SECONDS, 1}, + + {5, 650, -1, 950, SECONDS, -5}, + {5, 650, 0, 950, SECONDS, -4}, + {5, 650, 3, 950, SECONDS, -1}, + {5, 650, 4, 950, SECONDS, 0}, + {5, 650, 5, 950, SECONDS, 0}, + {5, 650, 6, 950, SECONDS, 1}, + {5, 650, 7, 950, SECONDS, 2}, + + {5, 650, -1, 50, SECONDS, -6}, + {5, 650, 0, 50, SECONDS, -5}, + {5, 650, 4, 50, SECONDS, -1}, + {5, 650, 5, 50, SECONDS, 0}, + {5, 650, 6, 50, SECONDS, 0}, + {5, 650, 7, 50, SECONDS, 1}, + {5, 650, 8, 50, SECONDS, 2}, + + {5, 650_000_000, -1, 650_000_000, NANOS, -6_000_000_000L}, + {5, 650_000_000, 0, 650_000_000, NANOS, -5_000_000_000L}, + {5, 650_000_000, 3, 650_000_000, NANOS, -2_000_000_000L}, + {5, 650_000_000, 4, 650_000_000, NANOS, -1_000_000_000L}, + {5, 650_000_000, 5, 650_000_000, NANOS, 0}, + {5, 650_000_000, 6, 650_000_000, NANOS, 1_000_000_000L}, + {5, 650_000_000, 7, 650_000_000, NANOS, 2_000_000_000L}, + + {5, 650_000_000, -1, 0, NANOS, -6_650_000_000L}, + {5, 650_000_000, 0, 0, NANOS, -5_650_000_000L}, + {5, 650_000_000, 3, 0, NANOS, -2_650_000_000L}, + {5, 650_000_000, 4, 0, NANOS, -1_650_000_000L}, + {5, 650_000_000, 5, 0, NANOS, -650_000_000L}, + {5, 650_000_000, 6, 0, NANOS, 350_000_000L}, + {5, 650_000_000, 7, 0, NANOS, 1_350_000_000L}, + + {5, 650_000_000, -1, 950_000_000, NANOS, -5_700_000_000L}, + {5, 650_000_000, 0, 950_000_000, NANOS, -4_700_000_000L}, + {5, 650_000_000, 3, 950_000_000, NANOS, -1_700_000_000L}, + {5, 650_000_000, 4, 950_000_000, NANOS, -700_000_000L}, + {5, 650_000_000, 5, 950_000_000, NANOS, 300_000_000L}, + {5, 650_000_000, 6, 950_000_000, NANOS, 1_300_000_000L}, + {5, 650_000_000, 7, 950_000_000, NANOS, 2_300_000_000L}, + + {5, 650_000_000, -1, 50_000_000, NANOS, -6_600_000_000L}, + {5, 650_000_000, 0, 50_000_000, NANOS, -5_600_000_000L}, + {5, 650_000_000, 4, 50_000_000, NANOS, -1_600_000_000L}, + {5, 650_000_000, 5, 50_000_000, NANOS, -600_000_000L}, + {5, 650_000_000, 6, 50_000_000, NANOS, 400_000_000L}, + {5, 650_000_000, 7, 50_000_000, NANOS, 1_400_000_000L}, + {5, 650_000_000, 8, 50_000_000, NANOS, 2_400_000_000L}, + + {0, 0, -60, 0, MINUTES, -1L}, + {0, 0, -1, 999_999_999, MINUTES, 0L}, + {0, 0, 59, 0, MINUTES, 0L}, + {0, 0, 59, 999_999_999, MINUTES, 0L}, + {0, 0, 60, 0, MINUTES, 1L}, + {0, 0, 61, 0, MINUTES, 1L}, + + {0, 0, -3600, 0, HOURS, -1L}, + {0, 0, -1, 999_999_999, HOURS, 0L}, + {0, 0, 3599, 0, HOURS, 0L}, + {0, 0, 3599, 999_999_999, HOURS, 0L}, + {0, 0, 3600, 0, HOURS, 1L}, + {0, 0, 3601, 0, HOURS, 1L}, + + {0, 0, -86400, 0, DAYS, -1L}, + {0, 0, -1, 999_999_999, DAYS, 0L}, + {0, 0, 86399, 0, DAYS, 0L}, + {0, 0, 86399, 999_999_999, DAYS, 0L}, + {0, 0, 86400, 0, DAYS, 1L}, + {0, 0, 86401, 0, DAYS, 1L}, + }; + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) { + Instant i1 = Instant.ofEpochSecond(seconds1, nanos1); + Instant i2 = Instant.ofEpochSecond(seconds2, nanos2); + long amount = i1.periodUntil(i2, unit); + assertEquals(amount, expected); + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit_negated(long seconds1, int nanos1, long seconds2, long nanos2, TemporalUnit unit, long expected) { + Instant i1 = Instant.ofEpochSecond(seconds1, nanos1); + Instant i2 = Instant.ofEpochSecond(seconds2, nanos2); + long amount = i2.periodUntil(i1, unit); + assertEquals(amount, -expected); + } + + @Test(expectedExceptions = UnsupportedTemporalTypeException.class) + public void test_periodUntil_TemporalUnit_unsupportedUnit() { + TEST_12345_123456789.periodUntil(TEST_12345_123456789, MONTHS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullEnd() { + TEST_12345_123456789.periodUntil(null, HOURS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullUnit() { + TEST_12345_123456789.periodUntil(TEST_12345_123456789, null); + } + //----------------------------------------------------------------------- // atOffset() //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/TCKLocalDate.java b/jdk/test/java/time/tck/java/time/TCKLocalDate.java index 48b69385bd0..926aca4a761 100644 --- a/jdk/test/java/time/tck/java/time/TCKLocalDate.java +++ b/jdk/test/java/time/tck/java/time/TCKLocalDate.java @@ -67,11 +67,19 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.EPOCH_DAY; -import static java.time.temporal.ChronoField.EPOCH_MONTH; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; +import static java.time.temporal.ChronoUnit.CENTURIES; +import static java.time.temporal.ChronoUnit.DAYS; +import static java.time.temporal.ChronoUnit.DECADES; +import static java.time.temporal.ChronoUnit.HOURS; +import static java.time.temporal.ChronoUnit.MILLENNIA; +import static java.time.temporal.ChronoUnit.MONTHS; +import static java.time.temporal.ChronoUnit.WEEKS; +import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; @@ -101,13 +109,13 @@ import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAdjuster; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; import java.time.temporal.TemporalUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -137,7 +145,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { private Instant MAX_INSTANT; private Instant MIN_INSTANT; - @BeforeMethod(groups={"tck", "implementation"}) + @BeforeMethod public void setUp() { TEST_2007_07_15 = LocalDate.of(2007, 7, 15); @@ -170,7 +178,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { ALIGNED_WEEK_OF_MONTH, ALIGNED_WEEK_OF_YEAR, MONTH_OF_YEAR, - EPOCH_MONTH, + PROLEPTIC_MONTH, YEAR_OF_ERA, YEAR, ERA, @@ -236,7 +244,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { LocalDate expected = LocalDate.now(Clock.systemDefaultZone()); LocalDate test = LocalDate.now(); @@ -253,12 +261,12 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { LocalDate.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); LocalDate expected = LocalDate.now(Clock.system(zone)); @@ -276,12 +284,12 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { LocalDate.now((Clock) null); } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_utc() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i); @@ -293,7 +301,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_offset() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i); @@ -305,7 +313,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_beforeEpoch() { for (int i =-1; i >= -(2 * 24 * 60 * 60); i--) { Instant instant = Instant.ofEpochSecond(i); @@ -318,27 +326,27 @@ public class TCKLocalDate extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock_maxYear() { Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC); LocalDate test = LocalDate.now(clock); assertEquals(test, MAX_DATE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void now_Clock_tooBig() { Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC); LocalDate.now(clock); } - @Test(groups={"tck"}) + @Test public void now_Clock_minYear() { Clock clock = Clock.fixed(MIN_INSTANT, ZoneOffset.UTC); LocalDate test = LocalDate.now(clock); assertEquals(test, MIN_DATE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void now_Clock_tooLow() { Clock clock = Clock.fixed(MIN_INSTANT.minusNanos(1), ZoneOffset.UTC); LocalDate.now(clock); @@ -347,84 +355,84 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // of() factories //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_intsMonth() { assertEquals(TEST_2007_07_15, LocalDate.of(2007, Month.JULY, 15)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_intsMonth_29febNonLeap() { LocalDate.of(2007, Month.FEBRUARY, 29); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_intsMonth_31apr() { LocalDate.of(2007, Month.APRIL, 31); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_intsMonth_dayTooLow() { LocalDate.of(2007, Month.JANUARY, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_intsMonth_dayTooHigh() { LocalDate.of(2007, Month.JANUARY, 32); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_intsMonth_nullMonth() { LocalDate.of(2007, null, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_intsMonth_yearTooLow() { LocalDate.of(Integer.MIN_VALUE, Month.JANUARY, 1); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_ints() { check(TEST_2007_07_15, 2007, 7, 15); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_29febNonLeap() { LocalDate.of(2007, 2, 29); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_31apr() { LocalDate.of(2007, 4, 31); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_dayTooLow() { LocalDate.of(2007, 1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_dayTooHigh() { LocalDate.of(2007, 1, 32); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_monthTooLow() { LocalDate.of(2007, 0, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_monthTooHigh() { LocalDate.of(2007, 13, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_ints_yearTooLow() { LocalDate.of(Integer.MIN_VALUE, 1, 1); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofYearDay_ints_nonLeap() { LocalDate date = LocalDate.of(2007, 1, 1); for (int i = 1; i < 365; i++) { @@ -433,7 +441,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void factory_ofYearDay_ints_leap() { LocalDate date = LocalDate.of(2008, 1, 1); for (int i = 1; i < 366; i++) { @@ -442,22 +450,22 @@ public class TCKLocalDate extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofYearDay_ints_366nonLeap() { LocalDate.ofYearDay(2007, 366); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofYearDay_ints_dayTooLow() { LocalDate.ofYearDay(2007, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofYearDay_ints_dayTooHigh() { LocalDate.ofYearDay(2007, 367); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofYearDay_ints_yearTooLow() { LocalDate.ofYearDay(Integer.MIN_VALUE, 1); } @@ -491,7 +499,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofEpochDay() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofEpochDay() { long date_0000_01_01 = -678941 - 40587; assertEquals(LocalDate.ofEpochDay(0), LocalDate.of(1970, 1, 1)); @@ -512,12 +520,12 @@ public class TCKLocalDate extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofEpochDay_aboveMax() { LocalDate.ofEpochDay(MAX_VALID_EPOCHDAYS + 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofEpochDay_belowMin() { LocalDate.ofEpochDay(MIN_VALID_EPOCHDAYS - 1); } @@ -525,18 +533,18 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_from_TemporalAccessor() { assertEquals(LocalDate.from(LocalDate.of(2007, 7, 15)), LocalDate.of(2007, 7, 15)); assertEquals(LocalDate.from(LocalDateTime.of(2007, 7, 15, 12, 30)), LocalDate.of(2007, 7, 15)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_from_TemporalAccessor_invalid_noDerive() { LocalDate.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_from_TemporalAccessor_null() { LocalDate.from((TemporalAccessor) null); } @@ -544,7 +552,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse() //----------------------------------------------------------------------- - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void factory_parse_validText(int y, int m, int d, String parsable) { LocalDate t = LocalDate.parse(parsable); assertNotNull(t, parsable); @@ -570,22 +578,22 @@ public class TCKLocalDate extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleBadParse", expectedExceptions={DateTimeParseException.class}, groups={"tck"}) + @Test(dataProvider="sampleBadParse", expectedExceptions={DateTimeParseException.class}) public void factory_parse_invalidText(String unparsable) { LocalDate.parse(unparsable); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue() { LocalDate.parse("2008-06-32"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_invalidValue() { LocalDate.parse("2008-06-31"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { LocalDate.parse((String) null); } @@ -593,20 +601,20 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d"); LocalDate test = LocalDate.parse("2010 12 3", f); assertEquals(test, LocalDate.of(2010, 12, 3)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d"); LocalDate.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { LocalDate.parse("ANY", null); } @@ -617,21 +625,26 @@ public class TCKLocalDate extends AbstractDateTimeTest { @Test public void test_get_TemporalField() { LocalDate test = LocalDate.of(2008, 6, 30); - assertEquals(test.get(ChronoField.YEAR), 2008); - assertEquals(test.get(ChronoField.MONTH_OF_YEAR), 6); - assertEquals(test.get(ChronoField.DAY_OF_MONTH), 30); - assertEquals(test.get(ChronoField.DAY_OF_WEEK), 1); - assertEquals(test.get(ChronoField.DAY_OF_YEAR), 182); + assertEquals(test.get(YEAR), 2008); + assertEquals(test.get(MONTH_OF_YEAR), 6); + assertEquals(test.get(YEAR_OF_ERA), 2008); + assertEquals(test.get(ERA), 1); + assertEquals(test.get(DAY_OF_MONTH), 30); + assertEquals(test.get(DAY_OF_WEEK), 1); + assertEquals(test.get(DAY_OF_YEAR), 182); } @Test public void test_getLong_TemporalField() { LocalDate test = LocalDate.of(2008, 6, 30); - assertEquals(test.getLong(ChronoField.YEAR), 2008); - assertEquals(test.getLong(ChronoField.MONTH_OF_YEAR), 6); - assertEquals(test.getLong(ChronoField.DAY_OF_MONTH), 30); - assertEquals(test.getLong(ChronoField.DAY_OF_WEEK), 1); - assertEquals(test.getLong(ChronoField.DAY_OF_YEAR), 182); + assertEquals(test.getLong(YEAR), 2008); + assertEquals(test.getLong(MONTH_OF_YEAR), 6); + assertEquals(test.getLong(YEAR_OF_ERA), 2008); + assertEquals(test.getLong(ERA), 1); + assertEquals(test.getLong(PROLEPTIC_MONTH), 2008 * 12 + 6 - 1); + assertEquals(test.getLong(DAY_OF_MONTH), 30); + assertEquals(test.getLong(DAY_OF_WEEK), 1); + assertEquals(test.getLong(DAY_OF_YEAR), 182); } //----------------------------------------------------------------------- @@ -640,13 +653,13 @@ public class TCKLocalDate extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_2007_07_15, Queries.chronology(), IsoChronology.INSTANCE}, - {TEST_2007_07_15, Queries.zoneId(), null}, - {TEST_2007_07_15, Queries.precision(), ChronoUnit.DAYS}, - {TEST_2007_07_15, Queries.zone(), null}, - {TEST_2007_07_15, Queries.offset(), null}, - {TEST_2007_07_15, Queries.localDate(), TEST_2007_07_15}, - {TEST_2007_07_15, Queries.localTime(), null}, + {TEST_2007_07_15, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {TEST_2007_07_15, TemporalQuery.zoneId(), null}, + {TEST_2007_07_15, TemporalQuery.precision(), ChronoUnit.DAYS}, + {TEST_2007_07_15, TemporalQuery.zone(), null}, + {TEST_2007_07_15, TemporalQuery.offset(), null}, + {TEST_2007_07_15, TemporalQuery.localDate(), TEST_2007_07_15}, + {TEST_2007_07_15, TemporalQuery.localTime(), null}, }; } @@ -681,7 +694,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_get(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); assertEquals(a.getYear(), y); @@ -689,7 +702,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { assertEquals(a.getDayOfMonth(), d); } - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_getDOY(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); int total = 0; @@ -700,7 +713,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { assertEquals(a.getDayOfYear(), doy); } - @Test(groups={"tck"}) + @Test public void test_getDayOfWeek() { DayOfWeek dow = DayOfWeek.MONDAY; for (Month month : Month.values()) { @@ -716,7 +729,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isLeapYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isLeapYear() { assertEquals(LocalDate.of(1999, 1, 1).isLeapYear(), false); assertEquals(LocalDate.of(2000, 1, 1).isLeapYear(), true); @@ -736,7 +749,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // lengthOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_lengthOfMonth_notLeapYear() { assertEquals(LocalDate.of(2007, 1, 1).lengthOfMonth(), 31); assertEquals(LocalDate.of(2007, 2, 1).lengthOfMonth(), 28); @@ -752,7 +765,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { assertEquals(LocalDate.of(2007, 12, 1).lengthOfMonth(), 31); } - @Test(groups={"tck"}) + @Test public void test_lengthOfMonth_leapYear() { assertEquals(LocalDate.of(2008, 1, 1).lengthOfMonth(), 31); assertEquals(LocalDate.of(2008, 2, 1).lengthOfMonth(), 29); @@ -771,7 +784,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // lengthOfYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_lengthOfYear() { assertEquals(LocalDate.of(2007, 1, 1).lengthOfYear(), 365); assertEquals(LocalDate.of(2008, 1, 1).lengthOfYear(), 366); @@ -780,7 +793,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_adjustment() { final LocalDate sample = LocalDate.of(2012, 3, 4); TemporalAdjuster adjuster = new TemporalAdjuster() { @@ -792,7 +805,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { assertEquals(TEST_2007_07_15.with(adjuster), sample); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_adjustment_null() { TEST_2007_07_15.with((TemporalAdjuster) null); } @@ -800,28 +813,28 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with(TemporalField,long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_TemporalField_long_normal() { LocalDate t = TEST_2007_07_15.with(YEAR, 2008); assertEquals(t, LocalDate.of(2008, 7, 15)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"} ) + @Test(expectedExceptions=NullPointerException.class ) public void test_with_TemporalField_long_null() { TEST_2007_07_15.with((TemporalField) null, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"} ) + @Test(expectedExceptions=DateTimeException.class ) public void test_with_TemporalField_long_invalidField() { TEST_2007_07_15.with(MockFieldNoValue.INSTANCE, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"} ) + @Test(expectedExceptions=DateTimeException.class ) public void test_with_TemporalField_long_timeField() { TEST_2007_07_15.with(ChronoField.AMPM_OF_DAY, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"} ) + @Test(expectedExceptions=DateTimeException.class ) public void test_with_TemporalField_long_invalidValue() { TEST_2007_07_15.with(ChronoField.DAY_OF_WEEK, -1); } @@ -829,18 +842,18 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withYear_int_normal() { LocalDate t = TEST_2007_07_15.withYear(2008); assertEquals(t, LocalDate.of(2008, 7, 15)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withYear_int_invalid() { TEST_2007_07_15.withYear(Year.MIN_VALUE - 1); } - @Test(groups={"tck"}) + @Test public void test_withYear_int_adjustDay() { LocalDate t = LocalDate.of(2008, 2, 29).withYear(2007); LocalDate expected = LocalDate.of(2007, 2, 28); @@ -850,18 +863,18 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth_int_normal() { LocalDate t = TEST_2007_07_15.withMonth(1); assertEquals(t, LocalDate.of(2007, 1, 15)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_int_invalid() { TEST_2007_07_15.withMonth(13); } - @Test(groups={"tck"}) + @Test public void test_withMonth_int_adjustDay() { LocalDate t = LocalDate.of(2007, 12, 31).withMonth(11); LocalDate expected = LocalDate.of(2007, 11, 30); @@ -871,18 +884,18 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_normal() { LocalDate t = TEST_2007_07_15.withDayOfMonth(1); assertEquals(t, LocalDate.of(2007, 7, 1)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_illegal() { TEST_2007_07_15.withDayOfMonth(32); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_invalid() { LocalDate.of(2007, 11, 30).withDayOfMonth(31); } @@ -890,18 +903,18 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfYear(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfYear_normal() { LocalDate t = TEST_2007_07_15.withDayOfYear(33); assertEquals(t, LocalDate.of(2007, 2, 2)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_illegal() { TEST_2007_07_15.withDayOfYear(367); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_invalid() { TEST_2007_07_15.withDayOfYear(366); } @@ -909,38 +922,38 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(Period) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_Period_positiveMonths() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); LocalDate t = TEST_2007_07_15.plus(period); assertEquals(t, LocalDate.of(2008, 2, 15)); } - @Test(groups={"tck"}) + @Test public void test_plus_Period_negativeDays() { MockSimplePeriod period = MockSimplePeriod.of(-25, ChronoUnit.DAYS); LocalDate t = TEST_2007_07_15.plus(period); assertEquals(t, LocalDate.of(2007, 6, 20)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_Period_timeNotAllowed() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.HOURS); TEST_2007_07_15.plus(period); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_Period_null() { TEST_2007_07_15.plus((MockSimplePeriod) null); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_Period_invalidTooLarge() { MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS); LocalDate.of(Year.MAX_VALUE, 1, 1).plus(period); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_Period_invalidTooSmall() { MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS); LocalDate.of(Year.MIN_VALUE, 1, 1).plus(period); @@ -949,34 +962,34 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_positiveMonths() { LocalDate t = TEST_2007_07_15.plus(7, ChronoUnit.MONTHS); assertEquals(t, LocalDate.of(2008, 2, 15)); } - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_negativeDays() { LocalDate t = TEST_2007_07_15.plus(-25, ChronoUnit.DAYS); assertEquals(t, LocalDate.of(2007, 6, 20)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_longTemporalUnit_timeNotAllowed() { TEST_2007_07_15.plus(7, ChronoUnit.HOURS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_longTemporalUnit_null() { TEST_2007_07_15.plus(1, (TemporalUnit) null); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_longTemporalUnit_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 1, 1).plus(1, ChronoUnit.YEARS); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_longTemporalUnit_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).plus(-1, ChronoUnit.YEARS); } @@ -984,56 +997,56 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusYears_long_normal() { LocalDate t = TEST_2007_07_15.plusYears(1); assertEquals(t, LocalDate.of(2008, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusYears_long_negative() { LocalDate t = TEST_2007_07_15.plusYears(-1); assertEquals(t, LocalDate.of(2006, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusYears_long_adjustDay() { LocalDate t = LocalDate.of(2008, 2, 29).plusYears(1); LocalDate expected = LocalDate.of(2009, 2, 28); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_plusYears_long_big() { long years = 20L + Year.MAX_VALUE; LocalDate test = LocalDate.of(-40, 6, 1).plusYears(years); assertEquals(test, LocalDate.of((int) (-40L + years), 6, 1)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooLarge() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 6, 1); test.plusYears(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooLargeMaxAddMax() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.plusYears(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooLargeMaxAddMin() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.plusYears(Long.MIN_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooSmall_validInt() { LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooSmall_invalidInt() { LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-10); } @@ -1041,227 +1054,227 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_normal() { LocalDate t = TEST_2007_07_15.plusMonths(1); assertEquals(t, LocalDate.of(2007, 8, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_overYears() { LocalDate t = TEST_2007_07_15.plusMonths(25); assertEquals(t, LocalDate.of(2009, 8, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_negative() { LocalDate t = TEST_2007_07_15.plusMonths(-1); assertEquals(t, LocalDate.of(2007, 6, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_negativeAcrossYear() { LocalDate t = TEST_2007_07_15.plusMonths(-7); assertEquals(t, LocalDate.of(2006, 12, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_negativeOverYears() { LocalDate t = TEST_2007_07_15.plusMonths(-31); assertEquals(t, LocalDate.of(2004, 12, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_adjustDayFromLeapYear() { LocalDate t = LocalDate.of(2008, 2, 29).plusMonths(12); LocalDate expected = LocalDate.of(2009, 2, 28); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_adjustDayFromMonthLength() { LocalDate t = LocalDate.of(2007, 3, 31).plusMonths(1); LocalDate expected = LocalDate.of(2007, 4, 30); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_big() { long months = 20L + Integer.MAX_VALUE; LocalDate test = LocalDate.of(-40, 6, 1).plusMonths(months); assertEquals(test, LocalDate.of((int) (-40L + months / 12), 6 + (int) (months % 12), 1)); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusMonths_long_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 1).plusMonths(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusMonths_long_invalidTooLargeMaxAddMax() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.plusMonths(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusMonths_long_invalidTooLargeMaxAddMin() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.plusMonths(Long.MIN_VALUE); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusMonths_long_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).plusMonths(-1); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_normal() { LocalDate t = TEST_2007_07_15.plusWeeks(1); assertEquals(t, LocalDate.of(2007, 7, 22)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_overMonths() { LocalDate t = TEST_2007_07_15.plusWeeks(9); assertEquals(t, LocalDate.of(2007, 9, 16)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_overYears() { LocalDate t = LocalDate.of(2006, 7, 16).plusWeeks(52); assertEquals(t, TEST_2007_07_15); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_overLeapYears() { LocalDate t = TEST_2007_07_15.plusYears(-1).plusWeeks(104); assertEquals(t, LocalDate.of(2008, 7, 12)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_negative() { LocalDate t = TEST_2007_07_15.plusWeeks(-1); assertEquals(t, LocalDate.of(2007, 7, 8)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_negativeAcrossYear() { LocalDate t = TEST_2007_07_15.plusWeeks(-28); assertEquals(t, LocalDate.of(2006, 12, 31)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_negativeOverYears() { LocalDate t = TEST_2007_07_15.plusWeeks(-104); assertEquals(t, LocalDate.of(2005, 7, 17)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_maximum() { LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 24).plusWeeks(1); LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_minimum() { LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 8).plusWeeks(-1); LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1); assertEquals(t, expected); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusWeeks_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(1); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusWeeks_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 7).plusWeeks(-1); } - @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions={ArithmeticException.class}) public void test_plusWeeks_invalidMaxMinusMax() { LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(Long.MAX_VALUE); } - @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions={ArithmeticException.class}) public void test_plusWeeks_invalidMaxMinusMin() { LocalDate.of(Year.MAX_VALUE, 12, 25).plusWeeks(Long.MIN_VALUE); } - @Test(groups={"tck"}) + @Test public void test_plusDays_normal() { LocalDate t = TEST_2007_07_15.plusDays(1); assertEquals(t, LocalDate.of(2007, 7, 16)); } - @Test(groups={"tck"}) + @Test public void test_plusDays_overMonths() { LocalDate t = TEST_2007_07_15.plusDays(62); assertEquals(t, LocalDate.of(2007, 9, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusDays_overYears() { LocalDate t = LocalDate.of(2006, 7, 14).plusDays(366); assertEquals(t, TEST_2007_07_15); } - @Test(groups={"tck"}) + @Test public void test_plusDays_overLeapYears() { LocalDate t = TEST_2007_07_15.plusYears(-1).plusDays(365 + 366); assertEquals(t, LocalDate.of(2008, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusDays_negative() { LocalDate t = TEST_2007_07_15.plusDays(-1); assertEquals(t, LocalDate.of(2007, 7, 14)); } - @Test(groups={"tck"}) + @Test public void test_plusDays_negativeAcrossYear() { LocalDate t = TEST_2007_07_15.plusDays(-196); assertEquals(t, LocalDate.of(2006, 12, 31)); } - @Test(groups={"tck"}) + @Test public void test_plusDays_negativeOverYears() { LocalDate t = TEST_2007_07_15.plusDays(-730); assertEquals(t, LocalDate.of(2005, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_plusDays_maximum() { LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 30).plusDays(1); LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_plusDays_minimum() { LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 2).plusDays(-1); LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1); assertEquals(t, expected); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusDays_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 31).plusDays(1); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusDays_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).plusDays(-1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_plusDays_overflowTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 31).plusDays(Long.MAX_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_plusDays_overflowTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).plusDays(Long.MIN_VALUE); } @@ -1269,38 +1282,38 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(Period) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_Period_positiveMonths() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); LocalDate t = TEST_2007_07_15.minus(period); assertEquals(t, LocalDate.of(2006, 12, 15)); } - @Test(groups={"tck"}) + @Test public void test_minus_Period_negativeDays() { MockSimplePeriod period = MockSimplePeriod.of(-25, ChronoUnit.DAYS); LocalDate t = TEST_2007_07_15.minus(period); assertEquals(t, LocalDate.of(2007, 8, 9)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_Period_timeNotAllowed() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.HOURS); TEST_2007_07_15.minus(period); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_Period_null() { TEST_2007_07_15.minus((MockSimplePeriod) null); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_Period_invalidTooLarge() { MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS); LocalDate.of(Year.MAX_VALUE, 1, 1).minus(period); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_Period_invalidTooSmall() { MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS); LocalDate.of(Year.MIN_VALUE, 1, 1).minus(period); @@ -1309,34 +1322,34 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_positiveMonths() { LocalDate t = TEST_2007_07_15.minus(7, ChronoUnit.MONTHS); assertEquals(t, LocalDate.of(2006, 12, 15)); } - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_negativeDays() { LocalDate t = TEST_2007_07_15.minus(-25, ChronoUnit.DAYS); assertEquals(t, LocalDate.of(2007, 8, 9)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_longTemporalUnit_timeNotAllowed() { TEST_2007_07_15.minus(7, ChronoUnit.HOURS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_longTemporalUnit_null() { TEST_2007_07_15.minus(1, (TemporalUnit) null); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_longTemporalUnit_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 1, 1).minus(-1, ChronoUnit.YEARS); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_longTemporalUnit_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).minus(1, ChronoUnit.YEARS); } @@ -1344,51 +1357,51 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusYears_long_normal() { LocalDate t = TEST_2007_07_15.minusYears(1); assertEquals(t, LocalDate.of(2006, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusYears_long_negative() { LocalDate t = TEST_2007_07_15.minusYears(-1); assertEquals(t, LocalDate.of(2008, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusYears_long_adjustDay() { LocalDate t = LocalDate.of(2008, 2, 29).minusYears(1); LocalDate expected = LocalDate.of(2007, 2, 28); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_minusYears_long_big() { long years = 20L + Year.MAX_VALUE; LocalDate test = LocalDate.of(40, 6, 1).minusYears(years); assertEquals(test, LocalDate.of((int) (40L - years), 6, 1)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooLarge() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 6, 1); test.minusYears(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooLargeMaxAddMax() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.minusYears(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooLargeMaxAddMin() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.minusYears(Long.MIN_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).minusYears(1); } @@ -1396,231 +1409,306 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_normal() { LocalDate t = TEST_2007_07_15.minusMonths(1); assertEquals(t, LocalDate.of(2007, 6, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_overYears() { LocalDate t = TEST_2007_07_15.minusMonths(25); assertEquals(t, LocalDate.of(2005, 6, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_negative() { LocalDate t = TEST_2007_07_15.minusMonths(-1); assertEquals(t, LocalDate.of(2007, 8, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_negativeAcrossYear() { LocalDate t = TEST_2007_07_15.minusMonths(-7); assertEquals(t, LocalDate.of(2008, 2, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_negativeOverYears() { LocalDate t = TEST_2007_07_15.minusMonths(-31); assertEquals(t, LocalDate.of(2010, 2, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_adjustDayFromLeapYear() { LocalDate t = LocalDate.of(2008, 2, 29).minusMonths(12); LocalDate expected = LocalDate.of(2007, 2, 28); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_adjustDayFromMonthLength() { LocalDate t = LocalDate.of(2007, 3, 31).minusMonths(1); LocalDate expected = LocalDate.of(2007, 2, 28); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_big() { long months = 20L + Integer.MAX_VALUE; LocalDate test = LocalDate.of(40, 6, 1).minusMonths(months); assertEquals(test, LocalDate.of((int) (40L - months / 12), 6 - (int) (months % 12), 1)); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 1).minusMonths(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxAddMax() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.minusMonths(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxAddMin() { LocalDate test = LocalDate.of(Year.MAX_VALUE, 12, 1); test.minusMonths(Long.MIN_VALUE); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).minusMonths(1); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_normal() { LocalDate t = TEST_2007_07_15.minusWeeks(1); assertEquals(t, LocalDate.of(2007, 7, 8)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_overMonths() { LocalDate t = TEST_2007_07_15.minusWeeks(9); assertEquals(t, LocalDate.of(2007, 5, 13)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_overYears() { LocalDate t = LocalDate.of(2008, 7, 13).minusWeeks(52); assertEquals(t, TEST_2007_07_15); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_overLeapYears() { LocalDate t = TEST_2007_07_15.minusYears(-1).minusWeeks(104); assertEquals(t, LocalDate.of(2006, 7, 18)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_negative() { LocalDate t = TEST_2007_07_15.minusWeeks(-1); assertEquals(t, LocalDate.of(2007, 7, 22)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_negativeAcrossYear() { LocalDate t = TEST_2007_07_15.minusWeeks(-28); assertEquals(t, LocalDate.of(2008, 1, 27)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_negativeOverYears() { LocalDate t = TEST_2007_07_15.minusWeeks(-104); assertEquals(t, LocalDate.of(2009, 7, 12)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_maximum() { LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 24).minusWeeks(-1); LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_minimum() { LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 8).minusWeeks(1); LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1); assertEquals(t, expected); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusWeeks_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 25).minusWeeks(-1); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusWeeks_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 7).minusWeeks(1); } - @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions={ArithmeticException.class}) public void test_minusWeeks_invalidMaxMinusMax() { LocalDate.of(Year.MAX_VALUE, 12, 25).minusWeeks(Long.MAX_VALUE); } - @Test(expectedExceptions={ArithmeticException.class}, groups={"tck"}) + @Test(expectedExceptions={ArithmeticException.class}) public void test_minusWeeks_invalidMaxMinusMin() { LocalDate.of(Year.MAX_VALUE, 12, 25).minusWeeks(Long.MIN_VALUE); } - @Test(groups={"tck"}) + @Test public void test_minusDays_normal() { LocalDate t = TEST_2007_07_15.minusDays(1); assertEquals(t, LocalDate.of(2007, 7, 14)); } - @Test(groups={"tck"}) + @Test public void test_minusDays_overMonths() { LocalDate t = TEST_2007_07_15.minusDays(62); assertEquals(t, LocalDate.of(2007, 5, 14)); } - @Test(groups={"tck"}) + @Test public void test_minusDays_overYears() { LocalDate t = LocalDate.of(2008, 7, 16).minusDays(367); assertEquals(t, TEST_2007_07_15); } - @Test(groups={"tck"}) + @Test public void test_minusDays_overLeapYears() { LocalDate t = TEST_2007_07_15.plusYears(2).minusDays(365 + 366); assertEquals(t, TEST_2007_07_15); } - @Test(groups={"tck"}) + @Test public void test_minusDays_negative() { LocalDate t = TEST_2007_07_15.minusDays(-1); assertEquals(t, LocalDate.of(2007, 7, 16)); } - @Test(groups={"tck"}) + @Test public void test_minusDays_negativeAcrossYear() { LocalDate t = TEST_2007_07_15.minusDays(-169); assertEquals(t, LocalDate.of(2007, 12, 31)); } - @Test(groups={"tck"}) + @Test public void test_minusDays_negativeOverYears() { LocalDate t = TEST_2007_07_15.minusDays(-731); assertEquals(t, LocalDate.of(2009, 7, 15)); } - @Test(groups={"tck"}) + @Test public void test_minusDays_maximum() { LocalDate t = LocalDate.of(Year.MAX_VALUE, 12, 30).minusDays(-1); LocalDate expected = LocalDate.of(Year.MAX_VALUE, 12, 31); assertEquals(t, expected); } - @Test(groups={"tck"}) + @Test public void test_minusDays_minimum() { LocalDate t = LocalDate.of(Year.MIN_VALUE, 1, 2).minusDays(1); LocalDate expected = LocalDate.of(Year.MIN_VALUE, 1, 1); assertEquals(t, expected); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusDays_invalidTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 31).minusDays(-1); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusDays_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).minusDays(1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooLarge() { LocalDate.of(Year.MAX_VALUE, 12, 31).minusDays(Long.MIN_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).minusDays(Long.MAX_VALUE); } + //----------------------------------------------------------------------- + // periodUntil(Temporal, TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name="periodUntilUnit") + Object[][] data_periodUntilUnit() { + return new Object[][] { + {date(2000, 1, 1), date(2000, 1, 1), DAYS, 0}, + {date(2000, 1, 1), date(2000, 1, 1), WEEKS, 0}, + {date(2000, 1, 1), date(2000, 1, 1), MONTHS, 0}, + {date(2000, 1, 1), date(2000, 1, 1), YEARS, 0}, + {date(2000, 1, 1), date(2000, 1, 1), DECADES, 0}, + {date(2000, 1, 1), date(2000, 1, 1), CENTURIES, 0}, + {date(2000, 1, 1), date(2000, 1, 1), MILLENNIA, 0}, + + {date(2000, 1, 15), date(2000, 2, 14), DAYS, 30}, + {date(2000, 1, 15), date(2000, 2, 15), DAYS, 31}, + {date(2000, 1, 15), date(2000, 2, 16), DAYS, 32}, + + {date(2000, 1, 15), date(2000, 2, 17), WEEKS, 4}, + {date(2000, 1, 15), date(2000, 2, 18), WEEKS, 4}, + {date(2000, 1, 15), date(2000, 2, 19), WEEKS, 5}, + {date(2000, 1, 15), date(2000, 2, 20), WEEKS, 5}, + + {date(2000, 1, 15), date(2000, 2, 14), MONTHS, 0}, + {date(2000, 1, 15), date(2000, 2, 15), MONTHS, 1}, + {date(2000, 1, 15), date(2000, 2, 16), MONTHS, 1}, + {date(2000, 1, 15), date(2000, 3, 14), MONTHS, 1}, + {date(2000, 1, 15), date(2000, 3, 15), MONTHS, 2}, + {date(2000, 1, 15), date(2000, 3, 16), MONTHS, 2}, + + {date(2000, 1, 15), date(2001, 1, 14), YEARS, 0}, + {date(2000, 1, 15), date(2001, 1, 15), YEARS, 1}, + {date(2000, 1, 15), date(2001, 1, 16), YEARS, 1}, + {date(2000, 1, 15), date(2004, 1, 14), YEARS, 3}, + {date(2000, 1, 15), date(2004, 1, 15), YEARS, 4}, + {date(2000, 1, 15), date(2004, 1, 16), YEARS, 4}, + + {date(2000, 1, 15), date(2010, 1, 14), DECADES, 0}, + {date(2000, 1, 15), date(2010, 1, 15), DECADES, 1}, + + {date(2000, 1, 15), date(2100, 1, 14), CENTURIES, 0}, + {date(2000, 1, 15), date(2100, 1, 15), CENTURIES, 1}, + + {date(2000, 1, 15), date(3000, 1, 14), MILLENNIA, 0}, + {date(2000, 1, 15), date(3000, 1, 15), MILLENNIA, 1}, + }; + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) { + long amount = date1.periodUntil(date2, unit); + assertEquals(amount, expected); + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit_negated(LocalDate date1, LocalDate date2, TemporalUnit unit, long expected) { + long amount = date2.periodUntil(date1, unit); + assertEquals(amount, -expected); + } + + @Test(expectedExceptions = UnsupportedTemporalTypeException.class) + public void test_periodUntil_TemporalUnit_unsupportedUnit() { + TEST_2007_07_15.periodUntil(TEST_2007_07_15, HOURS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullEnd() { + TEST_2007_07_15.periodUntil(null, DAYS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullUnit() { + TEST_2007_07_15.periodUntil(TEST_2007_07_15, null); + } + //----------------------------------------------------------------------- // periodUntil(ChronoLocalDate) //----------------------------------------------------------------------- @@ -1732,156 +1820,171 @@ public class TCKLocalDate extends AbstractDateTimeTest { TEST_2007_07_15.periodUntil(null); } + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d"); + String t = LocalDate.of(2010, 12, 3).format(f); + assertEquals(t, "2010 12 3"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + LocalDate.of(2010, 12, 3).format(null); + } + //----------------------------------------------------------------------- // atTime() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atTime_LocalTime() { LocalDate t = LocalDate.of(2008, 6, 30); assertEquals(t.atTime(LocalTime.of(11, 30)), LocalDateTime.of(2008, 6, 30, 11, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atTime_LocalTime_null() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime((LocalTime) null); } //------------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atTime_int_int() { LocalDate t = LocalDate.of(2008, 6, 30); assertEquals(t.atTime(11, 30), LocalDateTime.of(2008, 6, 30, 11, 30)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_hourTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(-1, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_hourTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(24, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_minuteTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_minuteTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 60); } - @Test(groups={"tck"}) + @Test public void test_atTime_int_int_int() { LocalDate t = LocalDate.of(2008, 6, 30); assertEquals(t.atTime(11, 30, 40), LocalDateTime.of(2008, 6, 30, 11, 30, 40)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_hourTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(-1, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_hourTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(24, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_minuteTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, -1, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_minuteTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 60, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_secondTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 30, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_secondTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 30, 60); } - @Test(groups={"tck"}) + @Test public void test_atTime_int_int_int_int() { LocalDate t = LocalDate.of(2008, 6, 30); assertEquals(t.atTime(11, 30, 40, 50), LocalDateTime.of(2008, 6, 30, 11, 30, 40, 50)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_hourTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(-1, 30, 40, 50); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_hourTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(24, 30, 40, 50); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_minuteTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, -1, 40, 50); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_minuteTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 60, 40, 50); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_secondTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 30, -1, 50); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_secondTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 30, 60, 50); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_nanoTooSmall() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 30, 40, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atTime_int_int_int_int_nanoTooBig() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime(11, 30, 40, 1000000000); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atTime_OffsetTime() { LocalDate t = LocalDate.of(2008, 6, 30); assertEquals(t.atTime(OffsetTime.of(11, 30, 0, 0, OFFSET_PONE)), OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PONE)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atTime_OffsetTime_null() { LocalDate t = LocalDate.of(2008, 6, 30); t.atTime((OffsetTime) null); @@ -1929,7 +2032,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toEpochDay() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toEpochDay() { long date_0000_01_01 = -678941 - 40587; @@ -1954,7 +2057,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_comparisons() { doTest_comparisons_LocalDate( LocalDate.of(Year.MIN_VALUE, 1, 1), @@ -2002,36 +2105,36 @@ public class TCKLocalDate extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_ObjectNull() { TEST_2007_07_15.compareTo(null); } - @Test(groups={"tck"}) + @Test public void test_isBefore() { assertTrue(TEST_2007_07_15.isBefore(LocalDate.of(2007, 07, 16))); assertFalse(TEST_2007_07_15.isBefore(LocalDate.of(2007, 07, 14))); assertFalse(TEST_2007_07_15.isBefore(TEST_2007_07_15)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_ObjectNull() { TEST_2007_07_15.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_ObjectNull() { TEST_2007_07_15.isAfter(null); } - @Test(groups={"tck"}) + @Test public void test_isAfter() { assertTrue(TEST_2007_07_15.isAfter(LocalDate.of(2007, 07, 14))); assertFalse(TEST_2007_07_15.isAfter(LocalDate.of(2007, 07, 16))); assertFalse(TEST_2007_07_15.isAfter(TEST_2007_07_15)); } - @Test(expectedExceptions=ClassCastException.class, groups={"tck"}) + @Test(expectedExceptions=ClassCastException.class) @SuppressWarnings({"unchecked", "rawtypes"}) public void compareToNonLocalDate() { Comparable c = TEST_2007_07_15; @@ -2041,42 +2144,42 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates" , groups={"tck"}) + @Test(dataProvider="sampleDates" ) public void test_equals_true(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); LocalDate b = LocalDate.of(y, m, d); assertEquals(a.equals(b), true); } - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_equals_false_year_differs(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); LocalDate b = LocalDate.of(y + 1, m, d); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_equals_false_month_differs(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); LocalDate b = LocalDate.of(y, m + 1, d); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_equals_false_day_differs(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); LocalDate b = LocalDate.of(y, m, d + 1); assertEquals(a.equals(b), false); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_2007_07_15.equals(TEST_2007_07_15), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_2007_07_15.equals("2007-07-15"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_2007_07_15.equals(null), false); } @@ -2084,7 +2187,7 @@ public class TCKLocalDate extends AbstractDateTimeTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_hashCode(int y, int m, int d) { LocalDate a = LocalDate.of(y, m, d); assertEquals(a.hashCode(), a.hashCode()); @@ -2111,26 +2214,15 @@ public class TCKLocalDate extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int y, int m, int d, String expected) { LocalDate t = LocalDate.of(y, m, d); String str = t.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d"); - String t = LocalDate.of(2010, 12, 3).toString(f); - assertEquals(t, "2010 12 3"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - LocalDate.of(2010, 12, 3).toString(null); + private LocalDate date(int year, int month, int day) { + return LocalDate.of(year, month, day); } } diff --git a/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java b/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java index 9b95fcd51b7..f7d5c9ed1f4 100644 --- a/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java +++ b/jdk/test/java/time/tck/java/time/TCKLocalDateTime.java @@ -70,7 +70,6 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.EPOCH_DAY; -import static java.time.temporal.ChronoField.EPOCH_MONTH; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.HOUR_OF_AMPM; import static java.time.temporal.ChronoField.HOUR_OF_DAY; @@ -83,19 +82,30 @@ import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.NANO_OF_DAY; import static java.time.temporal.ChronoField.NANO_OF_SECOND; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; import static java.time.temporal.ChronoField.SECOND_OF_DAY; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; +import static java.time.temporal.ChronoUnit.CENTURIES; import static java.time.temporal.ChronoUnit.DAYS; +import static java.time.temporal.ChronoUnit.DECADES; +import static java.time.temporal.ChronoUnit.HALF_DAYS; +import static java.time.temporal.ChronoUnit.HOURS; +import static java.time.temporal.ChronoUnit.MICROS; +import static java.time.temporal.ChronoUnit.MILLENNIA; +import static java.time.temporal.ChronoUnit.MILLIS; +import static java.time.temporal.ChronoUnit.MINUTES; import static java.time.temporal.ChronoUnit.MONTHS; import static java.time.temporal.ChronoUnit.NANOS; import static java.time.temporal.ChronoUnit.SECONDS; +import static java.time.temporal.ChronoUnit.WEEKS; import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertSame; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; @@ -108,6 +118,7 @@ import java.time.LocalDateTime; import java.time.LocalTime; import java.time.Month; import java.time.OffsetDateTime; +import java.time.OffsetTime; import java.time.Year; import java.time.ZoneId; import java.time.ZoneOffset; @@ -118,7 +129,6 @@ import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAdjuster; @@ -153,7 +163,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { private Instant MAX_INSTANT; private Instant MIN_INSTANT; - @BeforeMethod(groups={"implementation","tck"}) + @BeforeMethod public void setUp() { MAX_DATE_TIME = LocalDateTime.MAX; MIN_DATE_TIME = LocalDateTime.MIN; @@ -195,7 +205,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { ALIGNED_WEEK_OF_MONTH, ALIGNED_WEEK_OF_YEAR, MONTH_OF_YEAR, - EPOCH_MONTH, + PROLEPTIC_MONTH, YEAR_OF_ERA, YEAR, ERA, @@ -272,7 +282,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(timeOut=30000, groups={"tck"}) // TODO: remove when time zone loading is faster + @Test(timeOut=30000) // TODO: remove when time zone loading is faster public void now() { LocalDateTime expected = LocalDateTime.now(Clock.systemDefaultZone()); LocalDateTime test = LocalDateTime.now(); @@ -289,12 +299,12 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { LocalDateTime.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); LocalDateTime expected = LocalDateTime.now(Clock.system(zone)); @@ -312,12 +322,12 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { LocalDateTime.now((Clock) null); } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_utc() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); @@ -333,7 +343,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_offset() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); @@ -349,7 +359,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_beforeEpoch() { LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L); for (int i =-1; i >= -(24 * 60 * 60); i--) { @@ -365,27 +375,27 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock_maxYear() { Clock clock = Clock.fixed(MAX_INSTANT, ZoneOffset.UTC); LocalDateTime test = LocalDateTime.now(clock); assertEquals(test, MAX_DATE_TIME); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void now_Clock_tooBig() { Clock clock = Clock.fixed(MAX_INSTANT.plusSeconds(24 * 60 * 60), ZoneOffset.UTC); LocalDateTime.now(clock); } - @Test(groups={"tck"}) + @Test public void now_Clock_minYear() { Clock clock = Clock.fixed(MIN_INSTANT, ZoneOffset.UTC); LocalDateTime test = LocalDateTime.now(clock); assertEquals(test, MIN_DATE_TIME); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void now_Clock_tooLow() { Clock clock = Clock.fixed(MIN_INSTANT.minusNanos(1), ZoneOffset.UTC); LocalDateTime.now(clock); @@ -395,375 +405,375 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { // of() factories //----------------------------------------------------------------------- //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_4intsMonth() { LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30); check(dateTime, 2007, 7, 15, 12, 30, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_yearTooLow() { LocalDateTime.of(Integer.MIN_VALUE, Month.JULY, 15, 12, 30); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_4intsMonth_nullMonth() { LocalDateTime.of(2007, null, 15, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_dayTooLow() { LocalDateTime.of(2007, Month.JULY, -1, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_dayTooHigh() { LocalDateTime.of(2007, Month.JULY, 32, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_hourTooLow() { LocalDateTime.of(2007, Month.JULY, 15, -1, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_hourTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 24, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_minuteTooLow() { LocalDateTime.of(2007, Month.JULY, 15, 12, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_4intsMonth_minuteTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 12, 60); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_5intsMonth() { LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40); check(dateTime, 2007, 7, 15, 12, 30, 40, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_yearTooLow() { LocalDateTime.of(Integer.MIN_VALUE, Month.JULY, 15, 12, 30, 40); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_5intsMonth_nullMonth() { LocalDateTime.of(2007, null, 15, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_dayTooLow() { LocalDateTime.of(2007, Month.JULY, -1, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_dayTooHigh() { LocalDateTime.of(2007, Month.JULY, 32, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_hourTooLow() { LocalDateTime.of(2007, Month.JULY, 15, -1, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_hourTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 24, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_minuteTooLow() { LocalDateTime.of(2007, Month.JULY, 15, 12, -1, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_minuteTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 12, 60, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_secondTooLow() { LocalDateTime.of(2007, Month.JULY, 15, 12, 30, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5intsMonth_secondTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 60); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_6intsMonth() { LocalDateTime dateTime = LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, 987654321); check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_yearTooLow() { LocalDateTime.of(Integer.MIN_VALUE, Month.JULY, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_6intsMonth_nullMonth() { LocalDateTime.of(2007, null, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_dayTooLow() { LocalDateTime.of(2007, Month.JULY, -1, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_dayTooHigh() { LocalDateTime.of(2007, Month.JULY, 32, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_hourTooLow() { LocalDateTime.of(2007, Month.JULY, 15, -1, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_hourTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 24, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_minuteTooLow() { LocalDateTime.of(2007, Month.JULY, 15, 12, -1, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_minuteTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 12, 60, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_secondTooLow() { LocalDateTime.of(2007, Month.JULY, 15, 12, 30, -1, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_secondTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 60, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_nanoTooLow() { LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6intsMonth_nanoTooHigh() { LocalDateTime.of(2007, Month.JULY, 15, 12, 30, 40, 1000000000); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_5ints() { LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30); check(dateTime, 2007, 7, 15, 12, 30, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_yearTooLow() { LocalDateTime.of(Integer.MIN_VALUE, 7, 15, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_monthTooLow() { LocalDateTime.of(2007, 0, 15, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_monthTooHigh() { LocalDateTime.of(2007, 13, 15, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_dayTooLow() { LocalDateTime.of(2007, 7, -1, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_dayTooHigh() { LocalDateTime.of(2007, 7, 32, 12, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_hourTooLow() { LocalDateTime.of(2007, 7, 15, -1, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_hourTooHigh() { LocalDateTime.of(2007, 7, 15, 24, 30); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_minuteTooLow() { LocalDateTime.of(2007, 7, 15, 12, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_5ints_minuteTooHigh() { LocalDateTime.of(2007, 7, 15, 12, 60); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_6ints() { LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30, 40); check(dateTime, 2007, 7, 15, 12, 30, 40, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_yearTooLow() { LocalDateTime.of(Integer.MIN_VALUE, 7, 15, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_monthTooLow() { LocalDateTime.of(2007, 0, 15, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_monthTooHigh() { LocalDateTime.of(2007, 13, 15, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_dayTooLow() { LocalDateTime.of(2007, 7, -1, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_dayTooHigh() { LocalDateTime.of(2007, 7, 32, 12, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_hourTooLow() { LocalDateTime.of(2007, 7, 15, -1, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_hourTooHigh() { LocalDateTime.of(2007, 7, 15, 24, 30, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_minuteTooLow() { LocalDateTime.of(2007, 7, 15, 12, -1, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_minuteTooHigh() { LocalDateTime.of(2007, 7, 15, 12, 60, 40); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_secondTooLow() { LocalDateTime.of(2007, 7, 15, 12, 30, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_6ints_secondTooHigh() { LocalDateTime.of(2007, 7, 15, 12, 30, 60); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_7ints() { LocalDateTime dateTime = LocalDateTime.of(2007, 7, 15, 12, 30, 40, 987654321); check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_yearTooLow() { LocalDateTime.of(Integer.MIN_VALUE, 7, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_monthTooLow() { LocalDateTime.of(2007, 0, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_monthTooHigh() { LocalDateTime.of(2007, 13, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_dayTooLow() { LocalDateTime.of(2007, 7, -1, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_dayTooHigh() { LocalDateTime.of(2007, 7, 32, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_hourTooLow() { LocalDateTime.of(2007, 7, 15, -1, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_hourTooHigh() { LocalDateTime.of(2007, 7, 15, 24, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_minuteTooLow() { LocalDateTime.of(2007, 7, 15, 12, -1, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_minuteTooHigh() { LocalDateTime.of(2007, 7, 15, 12, 60, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_secondTooLow() { LocalDateTime.of(2007, 7, 15, 12, 30, -1, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_secondTooHigh() { LocalDateTime.of(2007, 7, 15, 12, 30, 60, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_nanoTooLow() { LocalDateTime.of(2007, 7, 15, 12, 30, 40, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_of_7ints_nanoTooHigh() { LocalDateTime.of(2007, 7, 15, 12, 30, 40, 1000000000); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_LocalDate_LocalTime() { LocalDateTime dateTime = LocalDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(12, 30, 40, 987654321)); check(dateTime, 2007, 7, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDate_LocalTime_nullLocalDate() { LocalDateTime.of(null, LocalTime.of(12, 30, 40, 987654321)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDate_LocalTime_nullLocalTime() { LocalDateTime.of(LocalDate.of(2007, 7, 15), null); } @@ -790,22 +800,22 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(test, expected); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_instantTooBig() { LocalDateTime.ofInstant(Instant.MAX, OFFSET_PONE) ; } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_instantTooSmall() { LocalDateTime.ofInstant(Instant.MIN, OFFSET_PONE) ; } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofInstant_nullInstant() { LocalDateTime.ofInstant((Instant) null, ZONE_GAZA); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofInstant_nullZone() { LocalDateTime.ofInstant(Instant.EPOCH, (ZoneId) null); } @@ -813,7 +823,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofEpochSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofEpochSecond_longOffset_afterEpoch() { LocalDateTime base = LocalDateTime.of(1970, 1, 1, 2, 0, 0, 500); for (int i = 0; i < 100000; i++) { @@ -822,7 +832,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void factory_ofEpochSecond_longOffset_beforeEpoch() { LocalDateTime base = LocalDateTime.of(1970, 1, 1, 2, 0, 0, 500); for (int i = 0; i < 100000; i++) { @@ -831,27 +841,27 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofEpochSecond_longOffset_tooBig() { LocalDateTime.ofEpochSecond(Long.MAX_VALUE, 500, OFFSET_PONE); // TODO: better test } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofEpochSecond_longOffset_tooSmall() { LocalDateTime.ofEpochSecond(Long.MIN_VALUE, 500, OFFSET_PONE); // TODO: better test } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofEpochSecond_badNanos_toBig() { LocalDateTime.ofEpochSecond(0, 1_000_000_000, OFFSET_PONE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofEpochSecond_badNanos_toSmall() { LocalDateTime.ofEpochSecond(0, -1, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofEpochSecond_longOffset_nullOffset() { LocalDateTime.ofEpochSecond(0L, 500, null); } @@ -859,19 +869,19 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_from_TemporalAccessor() { LocalDateTime base = LocalDateTime.of(2007, 7, 15, 17, 30); assertEquals(LocalDateTime.from(base), base); assertEquals(LocalDateTime.from(ZonedDateTime.of(base, ZoneOffset.ofHours(2))), base); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_from_TemporalAccessor_invalid_noDerive() { LocalDateTime.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_from_TemporalAccessor_null() { LocalDateTime.from((TemporalAccessor) null); } @@ -879,7 +889,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse() //----------------------------------------------------------------------- - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_parse(int y, int month, int d, int h, int m, int s, int n, String text) { LocalDateTime t = LocalDateTime.parse(text); assertEquals(t.getYear(), y); @@ -891,17 +901,17 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(t.getNano(), n); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue() { LocalDateTime.parse("2008-06-32T11:15"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_invalidValue() { LocalDateTime.parse("2008-06-31T11:15"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { LocalDateTime.parse((String) null); } @@ -909,20 +919,20 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); LocalDateTime test = LocalDateTime.parse("2010 12 3 11 30 45", f); assertEquals(test, LocalDateTime.of(2010, 12, 3, 11, 30, 45)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); LocalDateTime.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { LocalDateTime.parse("ANY", null); } @@ -970,13 +980,13 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_2007_07_15_12_30_40_987654321, Queries.chronology(), IsoChronology.INSTANCE}, - {TEST_2007_07_15_12_30_40_987654321, Queries.zoneId(), null}, - {TEST_2007_07_15_12_30_40_987654321, Queries.precision(), ChronoUnit.NANOS}, - {TEST_2007_07_15_12_30_40_987654321, Queries.zone(), null}, - {TEST_2007_07_15_12_30_40_987654321, Queries.offset(), null}, - {TEST_2007_07_15_12_30_40_987654321, Queries.localDate(), LocalDate.of(2007, 7, 15)}, - {TEST_2007_07_15_12_30_40_987654321, Queries.localTime(), LocalTime.of(12, 30, 40, 987654321)}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.zoneId(), null}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.precision(), ChronoUnit.NANOS}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.zone(), null}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.offset(), null}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.localDate(), LocalDate.of(2007, 7, 15)}, + {TEST_2007_07_15_12_30_40_987654321, TemporalQuery.localTime(), LocalTime.of(12, 30, 40, 987654321)}, }; } @@ -1033,7 +1043,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // get*() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_get_dates(int y, int m, int d) { LocalDateTime a = LocalDateTime.of(y, m, d, 12, 30); assertEquals(a.getYear(), y); @@ -1041,7 +1051,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(a.getDayOfMonth(), d); } - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_getDOY(int y, int m, int d) { LocalDateTime a = LocalDateTime.of(y, m, d, 12 ,30); int total = 0; @@ -1052,7 +1062,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(a.getDayOfYear(), doy); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_get_times(int h, int m, int s, int ns) { LocalDateTime a = LocalDateTime.of(TEST_2007_07_15_12_30_40_987654321.toLocalDate(), LocalTime.of(h, m, s, ns)); assertEquals(a.getHour(), h); @@ -1064,7 +1074,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // getDayOfWeek() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getDayOfWeek() { DayOfWeek dow = DayOfWeek.MONDAY; for (Month month : Month.values()) { @@ -1078,10 +1088,50 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } + //----------------------------------------------------------------------- + // adjustInto(Temporal) + //----------------------------------------------------------------------- + @DataProvider(name="adjustInto") + Object[][] data_adjustInto() { + return new Object[][]{ + {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 23, 5, 0, 0), null}, + {LocalDateTime.of(2012, Month.MARCH, 4, 0, 0), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), LocalDateTime.of(2012, 3, 4, 0, 0), null}, + {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), null}, + {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), null}, + {LocalDateTime.MAX, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MAX, null}, + {LocalDateTime.MIN, LocalDateTime.of(2012, 3, 4, 23, 5), LocalDateTime.MIN, null}, + + {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZoneOffset.UTC), null}, + {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetDateTime.of(2210, 2, 2, 0, 0, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null}, + {LocalDateTime.of(2012, 3, 4, 23, 5), ZonedDateTime.of(2210, 2, 2, 0, 0, 0, 0, ZONE_PARIS), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_PARIS), null}, + + {LocalDateTime.of(2012, 3, 4, 23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class}, + {LocalDateTime.of(2012, 3, 4, 23, 5), LocalTime.of(22, 3, 0), null, DateTimeException.class}, + {LocalDateTime.of(2012, 3, 4, 23, 5), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class}, + {LocalDateTime.of(2012, 3, 4, 23, 5), null, null, NullPointerException.class}, + + }; + } + + @Test(dataProvider="adjustInto") + public void test_adjustInto(LocalDateTime test, Temporal temporal, Temporal expected, Class expectedEx) { + if (expectedEx == null) { + Temporal result = test.adjustInto(temporal); + assertEquals(result, expected); + } else { + try { + Temporal result = test.adjustInto(temporal); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + //----------------------------------------------------------------------- // with() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_adjustment() { final LocalDateTime sample = LocalDateTime.of(2012, 3, 4, 23, 5); TemporalAdjuster adjuster = new TemporalAdjuster() { @@ -1093,7 +1143,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(TEST_2007_07_15_12_30_40_987654321.with(adjuster), sample); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_adjustment_null() { TEST_2007_07_15_12_30_40_987654321.with((TemporalAdjuster) null); } @@ -1101,18 +1151,18 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withYear_int_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2008); check(t, 2008, 7, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withYear_int_invalid() { TEST_2007_07_15_12_30_40_987654321.withYear(Year.MIN_VALUE - 1); } - @Test(groups={"tck"}) + @Test public void test_withYear_int_adjustDay() { LocalDateTime t = LocalDateTime.of(2008, 2, 29, 12, 30).withYear(2007); LocalDateTime expected = LocalDateTime.of(2007, 2, 28, 12, 30); @@ -1122,18 +1172,18 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth_int_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMonth(1); check(t, 2007, 1, 15, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_int_invalid() { TEST_2007_07_15_12_30_40_987654321.withMonth(13); } - @Test(groups={"tck"}) + @Test public void test_withMonth_int_adjustDay() { LocalDateTime t = LocalDateTime.of(2007, 12, 31, 12, 30).withMonth(11); LocalDateTime expected = LocalDateTime.of(2007, 11, 30, 12, 30); @@ -1143,18 +1193,18 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfMonth(1); check(t, 2007, 7, 1, 12, 30, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_invalid() { LocalDateTime.of(2007, 11, 30, 12, 30).withDayOfMonth(32); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_invalidCombination() { LocalDateTime.of(2007, 11, 30, 12, 30).withDayOfMonth(31); } @@ -1162,18 +1212,18 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfYear(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfYear_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfYear(33); assertEquals(t, LocalDateTime.of(2007, 2, 2, 12, 30, 40, 987654321)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_illegal() { TEST_2007_07_15_12_30_40_987654321.withDayOfYear(367); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_invalid() { TEST_2007_07_15_12_30_40_987654321.withDayOfYear(366); } @@ -1181,7 +1231,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withHour() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withHour_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321; for (int i = 0; i < 24; i++) { @@ -1190,12 +1240,12 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withHour_hourTooLow() { TEST_2007_07_15_12_30_40_987654321.withHour(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withHour_hourTooHigh() { TEST_2007_07_15_12_30_40_987654321.withHour(24); } @@ -1203,7 +1253,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMinute() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMinute_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321; for (int i = 0; i < 60; i++) { @@ -1212,12 +1262,12 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMinute_minuteTooLow() { TEST_2007_07_15_12_30_40_987654321.withMinute(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMinute_minuteTooHigh() { TEST_2007_07_15_12_30_40_987654321.withMinute(60); } @@ -1225,7 +1275,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withSecond_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321; for (int i = 0; i < 60; i++) { @@ -1234,12 +1284,12 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withSecond_secondTooLow() { TEST_2007_07_15_12_30_40_987654321.withSecond(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withSecond_secondTooHigh() { TEST_2007_07_15_12_30_40_987654321.withSecond(60); } @@ -1247,7 +1297,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withNano() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321; t = t.withNano(1); @@ -1260,12 +1310,12 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(t.getNano(), 999999999); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withNanoOfSecond_nanoTooLow() { TEST_2007_07_15_12_30_40_987654321.withNano(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withNanoOfSecond_nanoTooHigh() { TEST_2007_07_15_12_30_40_987654321.withNano(1000000000); } @@ -1273,14 +1323,14 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // truncatedTo(TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_truncatedTo_normal() { assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(NANOS), TEST_2007_07_15_12_30_40_987654321); assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(SECONDS), TEST_2007_07_15_12_30_40_987654321.withNano(0)); assertEquals(TEST_2007_07_15_12_30_40_987654321.truncatedTo(DAYS), TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_truncatedTo_null() { TEST_2007_07_15_12_30_40_987654321.truncatedTo(null); } @@ -1322,29 +1372,29 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_positiveMonths() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(7, ChronoUnit.MONTHS); assertEquals(t, LocalDateTime.of(2008, 2, 15, 12, 30, 40, 987654321)); } - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_negativeDays() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(-25, ChronoUnit.DAYS); assertEquals(t, LocalDateTime.of(2007, 6, 20, 12, 30, 40, 987654321)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_longTemporalUnit_null() { TEST_2007_07_15_12_30_40_987654321.plus(1, (TemporalUnit) null); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_longTemporalUnit_invalidTooLarge() { LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).plus(1, ChronoUnit.YEARS); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plus_longTemporalUnit_invalidTooSmall() { LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).plus(-1, ChronoUnit.YEARS); } @@ -1352,30 +1402,30 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusYears_int_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(1); check(t, 2008, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusYears_int_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1); check(t, 2006, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusYears_int_adjustDay() { LocalDateTime t = createDateMidnight(2008, 2, 29).plusYears(1); check(t, 2009, 2, 28, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_int_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 1, 1).plusYears(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_int_invalidTooSmall() { LocalDate.of(Year.MIN_VALUE, 1, 1).plusYears(-1); } @@ -1383,54 +1433,54 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(1); check(t, 2007, 8, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_overYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(25); check(t, 2009, 8, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(-1); check(t, 2007, 6, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_negativeAcrossYear() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(-7); check(t, 2006, 12, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_negativeOverYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(-31); check(t, 2004, 12, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_adjustDayFromLeapYear() { LocalDateTime t = createDateMidnight(2008, 2, 29).plusMonths(12); check(t, 2009, 2, 28, 0, 0, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_int_adjustDayFromMonthLength() { LocalDateTime t = createDateMidnight(2007, 3, 31).plusMonths(1); check(t, 2007, 4, 30, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusMonths_int_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 1).plusMonths(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusMonths_int_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).plusMonths(-1); } @@ -1470,7 +1520,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="samplePlusWeeksSymmetry", groups={"tck"}) + @Test(dataProvider="samplePlusWeeksSymmetry") public void test_plusWeeks_symmetry(LocalDateTime reference) { for (int weeks = 0; weeks < 365 * 8; weeks++) { LocalDateTime t = reference.plusWeeks(weeks).plusWeeks(-weeks); @@ -1481,66 +1531,66 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(1); check(t, 2007, 7, 22, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_overMonths() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(9); check(t, 2007, 9, 16, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_overYears() { LocalDateTime t = LocalDateTime.of(2006, 7, 16, 12, 30, 40, 987654321).plusWeeks(52); assertEquals(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_overLeapYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1).plusWeeks(104); check(t, 2008, 7, 12, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(-1); check(t, 2007, 7, 8, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_negativeAcrossYear() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(-28); check(t, 2006, 12, 31, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_negativeOverYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(-104); check(t, 2005, 7, 17, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_maximum() { LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 24).plusWeeks(1); check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_minimum() { LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 8).plusWeeks(-1); check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusWeeks_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 25).plusWeeks(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusWeeks_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 7).plusWeeks(-1); } @@ -1580,7 +1630,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="samplePlusDaysSymmetry", groups={"tck"}) + @Test(dataProvider="samplePlusDaysSymmetry") public void test_plusDays_symmetry(LocalDateTime reference) { for (int days = 0; days < 365 * 8; days++) { LocalDateTime t = reference.plusDays(days).plusDays(-days); @@ -1591,76 +1641,76 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusDays_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(1); check(t, 2007, 7, 16, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_overMonths() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(62); check(t, 2007, 9, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_overYears() { LocalDateTime t = LocalDateTime.of(2006, 7, 14, 12, 30, 40, 987654321).plusDays(366); assertEquals(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_overLeapYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(-1).plusDays(365 + 366); check(t, 2008, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(-1); check(t, 2007, 7, 14, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_negativeAcrossYear() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(-196); check(t, 2006, 12, 31, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_negativeOverYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(-730); check(t, 2005, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_plusDays_maximum() { LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 30).plusDays(1); check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_plusDays_minimum() { LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 2).plusDays(-1); check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusDays_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 31).plusDays(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusDays_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).plusDays(-1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_plusDays_overflowTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 31).plusDays(Long.MAX_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_plusDays_overflowTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).plusDays(Long.MIN_VALUE); } @@ -1668,7 +1718,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusHours_one() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate(); @@ -1685,7 +1735,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusHours_fromZero() { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = base.toLocalDate().minusDays(3); @@ -1704,7 +1754,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusHours_fromOne() { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)); LocalDate d = base.toLocalDate().minusDays(3); @@ -1727,7 +1777,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMinutes_one() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate(); @@ -1749,7 +1799,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_fromZero() { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = base.toLocalDate().minusDays(1); @@ -1768,7 +1818,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_noChange_oneDay() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMinutes(24 * 60); assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().plusDays(1)); @@ -1777,7 +1827,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusSeconds_one() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate(); @@ -1852,7 +1902,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="plusSeconds_fromZero", groups={"tck"}) + @Test(dataProvider="plusSeconds_fromZero") public void test_plusSeconds_fromZero(int seconds, LocalDate date, int hour, int min, int sec) { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDateTime t = base.plusSeconds(seconds); @@ -1863,7 +1913,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(sec, t.getSecond()); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_noChange_oneDay() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(24 * 60 * 60); assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().plusDays(1)); @@ -1872,7 +1922,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusNanos_halfABillion() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate(); @@ -1956,7 +2006,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="plusNanos_fromZero", groups={"tck"}) + @Test(dataProvider="plusNanos_fromZero") public void test_plusNanos_fromZero(long nanoseconds, LocalDate date, int hour, int min, int sec, int nanos) { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDateTime t = base.plusNanos(nanoseconds); @@ -1968,7 +2018,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(nanos, t.getNano()); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_noChange_oneDay() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L); assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().plusDays(1)); @@ -2011,29 +2061,29 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_positiveMonths() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(7, ChronoUnit.MONTHS); assertEquals(t, LocalDateTime.of(2006, 12, 15, 12, 30, 40, 987654321)); } - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_negativeDays() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(-25, ChronoUnit.DAYS); assertEquals(t, LocalDateTime.of(2007, 8, 9, 12, 30, 40, 987654321)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_longTemporalUnit_null() { TEST_2007_07_15_12_30_40_987654321.minus(1, (TemporalUnit) null); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_longTemporalUnit_invalidTooLarge() { LocalDateTime.of(Year.MAX_VALUE, 1, 1, 0, 0).minus(-1, ChronoUnit.YEARS); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minus_longTemporalUnit_invalidTooSmall() { LocalDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0).minus(1, ChronoUnit.YEARS); } @@ -2041,30 +2091,30 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusYears_int_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(1); check(t, 2006, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusYears_int_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(-1); check(t, 2008, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusYears_int_adjustDay() { LocalDateTime t = createDateMidnight(2008, 2, 29).minusYears(1); check(t, 2007, 2, 28, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_int_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 1, 1).minusYears(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_int_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).minusYears(1); } @@ -2072,54 +2122,54 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(1); check(t, 2007, 6, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_overYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(25); check(t, 2005, 6, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(-1); check(t, 2007, 8, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_negativeAcrossYear() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(-7); check(t, 2008, 2, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_negativeOverYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(-31); check(t, 2010, 2, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_adjustDayFromLeapYear() { LocalDateTime t = createDateMidnight(2008, 2, 29).minusMonths(12); check(t, 2007, 2, 28, 0, 0, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_int_adjustDayFromMonthLength() { LocalDateTime t = createDateMidnight(2007, 3, 31).minusMonths(1); check(t, 2007, 2, 28, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_int_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 1).minusMonths(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_int_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).minusMonths(1); } @@ -2159,7 +2209,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleMinusWeeksSymmetry", groups={"tck"}) + @Test(dataProvider="sampleMinusWeeksSymmetry") public void test_minusWeeks_symmetry(LocalDateTime reference) { for (int weeks = 0; weeks < 365 * 8; weeks++) { LocalDateTime t = reference.minusWeeks(weeks).minusWeeks(-weeks); @@ -2170,66 +2220,66 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(1); check(t, 2007, 7, 8, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_overMonths() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(9); check(t, 2007, 5, 13, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_overYears() { LocalDateTime t = LocalDateTime.of(2008, 7, 13, 12, 30, 40, 987654321).minusWeeks(52); assertEquals(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_overLeapYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(-1).minusWeeks(104); check(t, 2006, 7, 18, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-1); check(t, 2007, 7, 22, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_negativeAcrossYear() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-28); check(t, 2008, 1, 27, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_negativeOverYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(-104); check(t, 2009, 7, 12, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_maximum() { LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 24).minusWeeks(-1); check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_minimum() { LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 8).minusWeeks(1); check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusWeeks_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 25).minusWeeks(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusWeeks_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 7).minusWeeks(1); } @@ -2269,7 +2319,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleMinusDaysSymmetry", groups={"tck"}) + @Test(dataProvider="sampleMinusDaysSymmetry") public void test_minusDays_symmetry(LocalDateTime reference) { for (int days = 0; days < 365 * 8; days++) { LocalDateTime t = reference.minusDays(days).minusDays(-days); @@ -2280,76 +2330,76 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusDays_normal() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(1); check(t, 2007, 7, 14, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_overMonths() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(62); check(t, 2007, 5, 14, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_overYears() { LocalDateTime t = LocalDateTime.of(2008, 7, 16, 12, 30, 40, 987654321).minusDays(367); assertEquals(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_overLeapYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(2).minusDays(365 + 366); assertEquals(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_negative() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(-1); check(t, 2007, 7, 16, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_negativeAcrossYear() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(-169); check(t, 2007, 12, 31, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_negativeOverYears() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(-731); check(t, 2009, 7, 15, 12, 30, 40, 987654321); } - @Test(groups={"tck"}) + @Test public void test_minusDays_maximum() { LocalDateTime t = createDateMidnight(Year.MAX_VALUE, 12, 30).minusDays(-1); check(t, Year.MAX_VALUE, 12, 31, 0, 0, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_minusDays_minimum() { LocalDateTime t = createDateMidnight(Year.MIN_VALUE, 1, 2).minusDays(1); check(t, Year.MIN_VALUE, 1, 1, 0, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusDays_invalidTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 31).minusDays(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusDays_invalidTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).minusDays(1); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooLarge() { createDateMidnight(Year.MAX_VALUE, 12, 31).minusDays(Long.MIN_VALUE); } - @Test(expectedExceptions=ArithmeticException.class, groups={"tck"}) + @Test(expectedExceptions=ArithmeticException.class) public void test_minusDays_overflowTooSmall() { createDateMidnight(Year.MIN_VALUE, 1, 1).minusDays(Long.MAX_VALUE); } @@ -2357,7 +2407,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusHours_one() { LocalDateTime t =TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate(); @@ -2374,7 +2424,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusHours_fromZero() { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = base.toLocalDate().plusDays(2); @@ -2393,7 +2443,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusHours_fromOne() { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)); LocalDate d = base.toLocalDate().plusDays(2); @@ -2416,7 +2466,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMinutes_one() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate().minusDays(1); @@ -2441,7 +2491,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_fromZero() { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = base.toLocalDate().minusDays(1); @@ -2460,7 +2510,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_noChange_oneDay() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMinutes(24 * 60); assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().minusDays(1)); @@ -2469,7 +2519,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusSeconds_one() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate().minusDays(1); @@ -2549,7 +2599,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="minusSeconds_fromZero", groups={"tck"}) + @Test(dataProvider="minusSeconds_fromZero") public void test_minusSeconds_fromZero(int seconds, LocalDate date, int hour, int min, int sec) { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDateTime t = base.minusSeconds(seconds); @@ -2563,7 +2613,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusNanos_halfABillion() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDate d = t.toLocalDate().minusDays(1); @@ -2654,7 +2704,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="minusNanos_fromZero", groups={"tck"}) + @Test(dataProvider="minusNanos_fromZero") public void test_minusNanos_fromZero(long nanoseconds, LocalDate date, int hour, int min, int sec, int nanos) { LocalDateTime base = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.MIDNIGHT); LocalDateTime t = base.minusNanos(nanoseconds); @@ -2666,16 +2716,194 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { assertEquals(nanos, t.getNano()); } + //----------------------------------------------------------------------- + // periodUntil(Temporal, TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name="periodUntilUnit") + Object[][] data_periodUntilUnit() { + return new Object[][] { + // date only + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), DAYS, 0}, + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), WEEKS, 0}, + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), MONTHS, 0}, + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), YEARS, 0}, + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), DECADES, 0}, + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), CENTURIES, 0}, + {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), MILLENNIA, 0}, + + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 14), DAYS, 30}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 15), DAYS, 31}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 16), DAYS, 32}, + + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 17), WEEKS, 4}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 18), WEEKS, 4}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 19), WEEKS, 5}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 20), WEEKS, 5}, + + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 14), MONTHS, 0}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 15), MONTHS, 1}, + {dtNoon(2000, 1, 15), dtNoon(2000, 2, 16), MONTHS, 1}, + {dtNoon(2000, 1, 15), dtNoon(2000, 3, 14), MONTHS, 1}, + {dtNoon(2000, 1, 15), dtNoon(2000, 3, 15), MONTHS, 2}, + {dtNoon(2000, 1, 15), dtNoon(2000, 3, 16), MONTHS, 2}, + + {dtNoon(2000, 1, 15), dtNoon(2001, 1, 14), YEARS, 0}, + {dtNoon(2000, 1, 15), dtNoon(2001, 1, 15), YEARS, 1}, + {dtNoon(2000, 1, 15), dtNoon(2001, 1, 16), YEARS, 1}, + {dtNoon(2000, 1, 15), dtNoon(2004, 1, 14), YEARS, 3}, + {dtNoon(2000, 1, 15), dtNoon(2004, 1, 15), YEARS, 4}, + {dtNoon(2000, 1, 15), dtNoon(2004, 1, 16), YEARS, 4}, + + {dtNoon(2000, 1, 15), dtNoon(2010, 1, 14), DECADES, 0}, + {dtNoon(2000, 1, 15), dtNoon(2010, 1, 15), DECADES, 1}, + + {dtNoon(2000, 1, 15), dtNoon(2100, 1, 14), CENTURIES, 0}, + {dtNoon(2000, 1, 15), dtNoon(2100, 1, 15), CENTURIES, 1}, + + {dtNoon(2000, 1, 15), dtNoon(3000, 1, 14), MILLENNIA, 0}, + {dtNoon(2000, 1, 15), dtNoon(3000, 1, 15), MILLENNIA, 1}, + + // time only + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), NANOS, 0}, + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), MICROS, 0}, + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), MILLIS, 0}, + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), SECONDS, 0}, + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), MINUTES, 0}, + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), HOURS, 0}, + {dtEpoch(0, 0, 0, 0), dtEpoch(0, 0, 0, 0), HALF_DAYS, 0}, + + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), MICROS, 2 * 3600 * 1_000_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), MILLIS, 2 * 3600 * 1_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), SECONDS, 2 * 3600}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), MINUTES, 2 * 60}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), HOURS, 2}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 0, 0, 0), HALF_DAYS, 0}, + + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), MICROS, 14 * 3600 * 1_000_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), MILLIS, 14 * 3600 * 1_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), SECONDS, 14 * 3600}, + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), MINUTES, 14 * 60}, + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), HOURS, 14}, + {dtEpoch(0, 0, 0, 0), dtEpoch(14, 0, 0, 0), HALF_DAYS, 1}, + + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L + 1500}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), MICROS, (2 * 3600 + 30 * 60 + 40) * 1_000_000L + 1}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), MILLIS, (2 * 3600 + 30 * 60 + 40) * 1_000L}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), SECONDS, 2 * 3600 + 30 * 60 + 40}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), MINUTES, 2 * 60 + 30}, + {dtEpoch(0, 0, 0, 0), dtEpoch(2, 30, 40, 1500), HOURS, 2}, + + // combinations + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), NANOS, -1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), NANOS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 501), NANOS, 1}, + + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 39, 500), SECONDS, -1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 39, 501), SECONDS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), SECONDS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), SECONDS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 501), SECONDS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 41, 499), SECONDS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 41, 500), SECONDS, 1}, + + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), NANOS, -1 + 86400_000_000_000L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), NANOS, 0 + 86400_000_000_000L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), NANOS, 1 + 86400_000_000_000L}, + + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 39, 499), SECONDS, -2 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 39, 500), SECONDS, -1 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 39, 501), SECONDS, -1 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), SECONDS, -1 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), SECONDS, 0 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), SECONDS, 0 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 41, 499), SECONDS, 0 + 86400L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 41, 500), SECONDS, 1 + 86400L}, + + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 29, 40, 499), MINUTES, -2 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 29, 40, 500), MINUTES, -1 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 29, 40, 501), MINUTES, -1 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), MINUTES, -1 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), MINUTES, 0 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), MINUTES, 0 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 31, 40, 499), MINUTES, 0 + 24 * 60L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 31, 40, 500), MINUTES, 1 + 24 * 60L}, + + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 499), HOURS, -2 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 500), HOURS, -1 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 11, 30, 40, 501), HOURS, -1 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), HOURS, -1 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), HOURS, 0 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), HOURS, 0 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 13, 30, 40, 499), HOURS, 0 + 24L}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 13, 30, 40, 500), HOURS, 1 + 24L}, + + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 13, 12, 30, 40, 499), DAYS, -2}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 13, 12, 30, 40, 500), DAYS, -2}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 13, 12, 30, 40, 501), DAYS, -1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 14, 12, 30, 40, 499), DAYS, -1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 14, 12, 30, 40, 500), DAYS, -1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 14, 12, 30, 40, 501), DAYS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 499), DAYS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 500), DAYS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 15, 12, 30, 40, 501), DAYS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 499), DAYS, 0}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 500), DAYS, 1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 16, 12, 30, 40, 501), DAYS, 1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 17, 12, 30, 40, 499), DAYS, 1}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 17, 12, 30, 40, 500), DAYS, 2}, + {dt(2000, 1, 15, 12, 30, 40, 500), dt(2000, 1, 17, 12, 30, 40, 501), DAYS, 2}, + }; + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) { + long amount = dt1.periodUntil(dt2, unit); + assertEquals(amount, expected); + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit_negated(LocalDateTime dt1, LocalDateTime dt2, TemporalUnit unit, long expected) { + long amount = dt2.periodUntil(dt1, unit); + assertEquals(amount, -expected); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullEnd() { + TEST_2007_07_15_12_30_40_987654321.periodUntil(null, HOURS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullUnit() { + TEST_2007_07_15_12_30_40_987654321.periodUntil(TEST_2007_07_15_12_30_40_987654321, null); + } + + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); + String t = LocalDateTime.of(2010, 12, 3, 11, 30, 45).format(f); + assertEquals(t, "2010 12 3 11 30 45"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + LocalDateTime.of(2010, 12, 3, 11, 30, 45).format(null); + } + //----------------------------------------------------------------------- // atOffset() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atOffset() { LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30); assertEquals(t.atOffset(OFFSET_PTWO), OffsetDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PTWO)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atOffset_nullZoneOffset() { LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30); t.atOffset((ZoneOffset) null); @@ -2684,34 +2912,34 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // atZone() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atZone() { LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30); assertEquals(t.atZone(ZONE_PARIS), ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS)); } - @Test(groups={"tck"}) + @Test public void test_atZone_Offset() { LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30); assertEquals(t.atZone(OFFSET_PTWO), ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PTWO)); } - @Test(groups={"tck"}) + @Test public void test_atZone_dstGap() { LocalDateTime t = LocalDateTime.of(2007, 4, 1, 0, 0); assertEquals(t.atZone(ZONE_GAZA), ZonedDateTime.of(LocalDateTime.of(2007, 4, 1, 1, 0), ZONE_GAZA)); } - @Test(groups={"tck"}) + @Test public void test_atZone_dstOverlap() { LocalDateTime t = LocalDateTime.of(2007, 10, 28, 2, 30); assertEquals(t.atZone(ZONE_PARIS), ZonedDateTime.ofStrict(LocalDateTime.of(2007, 10, 28, 2, 30), OFFSET_PTWO, ZONE_PARIS)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atZone_nullTimeZone() { LocalDateTime t = LocalDateTime.of(2008, 6, 30, 11, 30); t.atZone((ZoneId) null); @@ -2720,7 +2948,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toEpochSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toEpochSecond_afterEpoch() { for (int i = -5; i < 5; i++) { ZoneOffset offset = ZoneOffset.ofHours(i); @@ -2731,7 +2959,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_toEpochSecond_beforeEpoch() { for (int i = 0; i < 100000; i++) { LocalDateTime a = LocalDateTime.of(1970, 1, 1, 0, 0).minusSeconds(i); @@ -2742,22 +2970,22 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_comparisons() { test_comparisons_LocalDateTime( - LocalDate.of(Year.MIN_VALUE, 1, 1), - LocalDate.of(Year.MIN_VALUE, 12, 31), - LocalDate.of(-1, 1, 1), - LocalDate.of(-1, 12, 31), - LocalDate.of(0, 1, 1), - LocalDate.of(0, 12, 31), - LocalDate.of(1, 1, 1), - LocalDate.of(1, 12, 31), - LocalDate.of(2008, 1, 1), - LocalDate.of(2008, 2, 29), - LocalDate.of(2008, 12, 31), - LocalDate.of(Year.MAX_VALUE, 1, 1), - LocalDate.of(Year.MAX_VALUE, 12, 31) + LocalDate.of(Year.MIN_VALUE, 1, 1), + LocalDate.of(Year.MIN_VALUE, 12, 31), + LocalDate.of(-1, 1, 1), + LocalDate.of(-1, 12, 31), + LocalDate.of(0, 1, 1), + LocalDate.of(0, 12, 31), + LocalDate.of(1, 1, 1), + LocalDate.of(1, 12, 31), + LocalDate.of(2008, 1, 1), + LocalDate.of(2008, 2, 29), + LocalDate.of(2008, 12, 31), + LocalDate.of(Year.MAX_VALUE, 1, 1), + LocalDate.of(Year.MAX_VALUE, 12, 31) ); } @@ -2823,22 +3051,22 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_ObjectNull() { TEST_2007_07_15_12_30_40_987654321.compareTo(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_ObjectNull() { TEST_2007_07_15_12_30_40_987654321.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_ObjectNull() { TEST_2007_07_15_12_30_40_987654321.isAfter(null); } - @Test(expectedExceptions=ClassCastException.class, groups={"tck"}) + @Test(expectedExceptions=ClassCastException.class) @SuppressWarnings({"unchecked", "rawtypes"}) public void compareToNonLocalDateTime() { Comparable c = TEST_2007_07_15_12_30_40_987654321; @@ -2883,73 +3111,73 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_true(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m, d, h, mi, s, n); assertTrue(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_year_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y + 1, m, d, h, mi, s, n); assertFalse(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_month_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m + 1, d, h, mi, s, n); assertFalse(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_day_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m, d + 1, h, mi, s, n); assertFalse(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_hour_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m, d, h + 1, mi, s, n); assertFalse(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_minute_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m, d, h, mi + 1, s, n); assertFalse(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_second_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m, d, h, mi, s + 1, n); assertFalse(a.equals(b)); } - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_equals_false_nano_differs(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); LocalDateTime b = LocalDateTime.of(y, m, d, h, mi, s, n + 1); assertFalse(a.equals(b)); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_2007_07_15_12_30_40_987654321.equals(TEST_2007_07_15_12_30_40_987654321), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_2007_07_15_12_30_40_987654321.equals("2007-07-15T12:30:40.987654321"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_2007_07_15_12_30_40_987654321.equals(null), false); } @@ -2957,7 +3185,7 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDateTimes", groups={"tck"}) + @Test(dataProvider="sampleDateTimes") public void test_hashCode(int y, int m, int d, int h, int mi, int s, int n) { LocalDateTime a = LocalDateTime.of(y, m, d, h, mi, s, n); assertEquals(a.hashCode(), a.hashCode()); @@ -2979,26 +3207,23 @@ public class TCKLocalDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int y, int m, int d, int h, int mi, int s, int n, String expected) { LocalDateTime t = LocalDateTime.of(y, m, d, h, mi, s, n); String str = t.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); - String t = LocalDateTime.of(2010, 12, 3, 11, 30, 45).toString(f); - assertEquals(t, "2010 12 3 11 30 45"); + private LocalDateTime dtNoon(int year, int month, int day) { + return LocalDateTime.of(year, month, day, 12, 0); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - LocalDateTime.of(2010, 12, 3, 11, 30, 45).toString(null); + private LocalDateTime dtEpoch(int hour, int min, int sec, int nano) { + return LocalDateTime.of(1970, 1, 1, hour, min, sec, nano); + } + + private LocalDateTime dt(int year, int month, int day, int hour, int min, int sec, int nano) { + return LocalDateTime.of(year, month, day, hour, min, sec, nano); } } diff --git a/jdk/test/java/time/tck/java/time/TCKLocalTime.java b/jdk/test/java/time/tck/java/time/TCKLocalTime.java index 9b4d65f4938..72d52a24afe 100644 --- a/jdk/test/java/time/tck/java/time/TCKLocalTime.java +++ b/jdk/test/java/time/tck/java/time/TCKLocalTime.java @@ -76,6 +76,7 @@ import static java.time.temporal.ChronoField.SECOND_OF_DAY; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; import static java.time.temporal.ChronoUnit.DAYS; import static java.time.temporal.ChronoUnit.FOREVER; +import static java.time.temporal.ChronoUnit.HALF_DAYS; import static java.time.temporal.ChronoUnit.HOURS; import static java.time.temporal.ChronoUnit.MICROS; import static java.time.temporal.ChronoUnit.MILLIS; @@ -99,16 +100,17 @@ import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import java.time.OffsetDateTime; import java.time.OffsetTime; import java.time.Period; import java.time.ZoneId; import java.time.ZoneOffset; +import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAdjuster; @@ -116,6 +118,7 @@ import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; import java.time.temporal.TemporalUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.util.ArrayList; import java.util.Arrays; import java.util.EnumSet; @@ -133,6 +136,7 @@ import org.testng.annotations.Test; public class TCKLocalTime extends AbstractDateTimeTest { private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2); + private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris"); private LocalTime TEST_12_30_40_987654321; @@ -142,7 +146,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { INVALID_UNITS = (TemporalUnit[]) set.toArray(new TemporalUnit[set.size()]); } - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { TEST_12_30_40_987654321 = LocalTime.of(12, 30, 40, 987654321); } @@ -258,7 +262,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // constants //----------------------------------------------------------------------- - @Test(groups={"tck","implementation"}) + @Test public void constant_MIDNIGHT() { check(LocalTime.MIDNIGHT, 0, 0, 0, 0); } @@ -281,7 +285,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { LocalTime expected = LocalTime.now(Clock.systemDefaultZone()); LocalTime test = LocalTime.now(); @@ -292,12 +296,12 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { LocalTime.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); LocalTime expected = LocalTime.now(Clock.system(zone)); @@ -315,12 +319,12 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { LocalTime.now((Clock) null); } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i, 8); @@ -333,7 +337,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_beforeEpoch() { for (int i =-1; i >= -(24 * 60 * 60); i--) { Instant instant = Instant.ofEpochSecond(i, 8); @@ -347,7 +351,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock_max() { Clock clock = Clock.fixed(Instant.MAX, ZoneOffset.UTC); LocalTime test = LocalTime.now(clock); @@ -357,7 +361,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(test.getNano(), 999_999_999); } - @Test(groups={"tck"}) + @Test public void now_Clock_min() { Clock clock = Clock.fixed(Instant.MIN, ZoneOffset.UTC); LocalTime test = LocalTime.now(clock); @@ -370,71 +374,71 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // of() factories //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_time_2ints() { LocalTime test = LocalTime.of(12, 30); check(test, 12, 30, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_2ints_hourTooLow() { LocalTime.of(-1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_2ints_hourTooHigh() { LocalTime.of(24, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_2ints_minuteTooLow() { LocalTime.of(0, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_2ints_minuteTooHigh() { LocalTime.of(0, 60); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_time_3ints() { LocalTime test = LocalTime.of(12, 30, 40); check(test, 12, 30, 40, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_3ints_hourTooLow() { LocalTime.of(-1, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_3ints_hourTooHigh() { LocalTime.of(24, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_3ints_minuteTooLow() { LocalTime.of(0, -1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_3ints_minuteTooHigh() { LocalTime.of(0, 60, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_3ints_secondTooLow() { LocalTime.of(0, 0, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_3ints_secondTooHigh() { LocalTime.of(0, 0, 60); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_time_4ints() { LocalTime test = LocalTime.of(12, 30, 40, 987654321); check(test, 12, 30, 40, 987654321); @@ -442,42 +446,42 @@ public class TCKLocalTime extends AbstractDateTimeTest { check(test, 12, 0, 40, 987654321); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_hourTooLow() { LocalTime.of(-1, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_hourTooHigh() { LocalTime.of(24, 0, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_minuteTooLow() { LocalTime.of(0, -1, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_minuteTooHigh() { LocalTime.of(0, 60, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_secondTooLow() { LocalTime.of(0, 0, -1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_secondTooHigh() { LocalTime.of(0, 0, 60, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_nanoTooLow() { LocalTime.of(0, 0, 0, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_time_4ints_nanoTooHigh() { LocalTime.of(0, 0, 0, 1000000000); } @@ -485,18 +489,18 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofSecondOfDay(long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofSecondOfDay() { LocalTime localTime = LocalTime.ofSecondOfDay(2 * 60 * 60 + 17 * 60 + 23); check(localTime, 2, 17, 23, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofSecondOfDay_tooLow() { LocalTime.ofSecondOfDay(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofSecondOfDay_tooHigh() { LocalTime.ofSecondOfDay(24 * 60 * 60); } @@ -504,18 +508,18 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofNanoOfDay(long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofNanoOfDay() { LocalTime localTime = LocalTime.ofNanoOfDay(60 * 60 * 1000000000L + 17); check(localTime, 1, 0, 0, 17); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofNanoOfDay_tooLow() { LocalTime.ofNanoOfDay(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofNanoOfDay_tooHigh() { LocalTime.ofNanoOfDay(24 * 60 * 60 * 1000000000L); } @@ -523,18 +527,18 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_from_TemporalAccessor() { assertEquals(LocalTime.from(LocalTime.of(17, 30)), LocalTime.of(17, 30)); assertEquals(LocalTime.from(LocalDateTime.of(2012, 5, 1, 17, 30)), LocalTime.of(17, 30)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_from_TemporalAccessor_invalid_noDerive() { LocalTime.from(LocalDate.of(2007, 7, 15)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_from_TemporalAccessor_null() { LocalTime.from((TemporalAccessor) null); } @@ -542,7 +546,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse() //----------------------------------------------------------------------- - @Test(dataProvider = "sampleToString", groups={"tck"}) + @Test(dataProvider = "sampleToString") public void factory_parse_validText(int h, int m, int s, int n, String parsable) { LocalTime t = LocalTime.parse(parsable); assertNotNull(t, parsable); @@ -567,29 +571,29 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class}, groups={"tck"}) + @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class}) public void factory_parse_invalidText(String unparsable) { LocalTime.parse(unparsable); } //-----------------------------------------------------------------------s - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalHour() { LocalTime.parse("25:00"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalMinute() { LocalTime.parse("12:60"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalSecond() { LocalTime.parse("12:12:60"); } //-----------------------------------------------------------------------s - @Test(expectedExceptions = {NullPointerException.class}, groups={"tck"}) + @Test(expectedExceptions = {NullPointerException.class}) public void factory_parse_nullTest() { LocalTime.parse((String) null); } @@ -597,20 +601,20 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s"); LocalTime test = LocalTime.parse("14 30 40", f); assertEquals(test, LocalTime.of(14, 30, 40)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s"); LocalTime.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { LocalTime.parse("ANY", null); } @@ -656,13 +660,13 @@ public class TCKLocalTime extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_12_30_40_987654321, Queries.chronology(), null}, - {TEST_12_30_40_987654321, Queries.zoneId(), null}, - {TEST_12_30_40_987654321, Queries.precision(), ChronoUnit.NANOS}, - {TEST_12_30_40_987654321, Queries.zone(), null}, - {TEST_12_30_40_987654321, Queries.offset(), null}, - {TEST_12_30_40_987654321, Queries.localDate(), null}, - {TEST_12_30_40_987654321, Queries.localTime(), TEST_12_30_40_987654321}, + {TEST_12_30_40_987654321, TemporalQuery.chronology(), null}, + {TEST_12_30_40_987654321, TemporalQuery.zoneId(), null}, + {TEST_12_30_40_987654321, TemporalQuery.precision(), ChronoUnit.NANOS}, + {TEST_12_30_40_987654321, TemporalQuery.zone(), null}, + {TEST_12_30_40_987654321, TemporalQuery.offset(), null}, + {TEST_12_30_40_987654321, TemporalQuery.localDate(), null}, + {TEST_12_30_40_987654321, TemporalQuery.localTime(), TEST_12_30_40_987654321}, }; } @@ -707,7 +711,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_get(int h, int m, int s, int ns) { LocalTime a = LocalTime.of(h, m, s, ns); assertEquals(a.getHour(), h); @@ -716,10 +720,54 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(a.getNano(), ns); } + //----------------------------------------------------------------------- + // adjustInto(Temporal) + //----------------------------------------------------------------------- + @DataProvider(name="adjustInto") + Object[][] data_adjustInto() { + return new Object[][]{ + {LocalTime.of(23, 5), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 0, 0), null}, + {LocalTime.of(23, 5, 20), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 0), null}, + {LocalTime.of(23, 5, 20, 1000), LocalTime.of(4, 1, 1, 100), LocalTime.of(23, 5, 20, 1000), null}, + {LocalTime.of(23, 5, 20, 1000), LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), null}, + {LocalTime.of(23, 5, 20, 1000), LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), null}, + {LocalTime.of(23, 5, 20, 1000), LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), null}, + {LocalTime.of(23, 5, 20, 1000), LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), null}, + {LocalTime.MAX, LocalTime.of(23, 5, 20, 1000), LocalTime.of(23, 59, 59, 999999999), null}, + {LocalTime.MIN, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null}, + {LocalTime.NOON, LocalTime.of(23, 5, 20, 1000), LocalTime.of(12, 0, 0), null}, + {LocalTime.MIDNIGHT, LocalTime.of(23, 5, 20, 1000), LocalTime.of(0, 0, 0), null}, + + {LocalTime.of(23, 5), LocalDateTime.of(2210, 2, 2, 1, 1), LocalDateTime.of(2210, 2, 2, 23, 5), null}, + {LocalTime.of(23, 5), OffsetTime.of(1, 1, 0, 0, OFFSET_PTWO), OffsetTime.of(23, 5, 0, 0, OFFSET_PTWO), null}, + {LocalTime.of(23, 5), OffsetDateTime.of(2210, 2, 2, 1, 1, 0, 0, OFFSET_PTWO), OffsetDateTime.of(2210, 2, 2, 23, 5, 0, 0, OFFSET_PTWO), null}, + {LocalTime.of(23, 5), ZonedDateTime.of(2210, 2, 2, 1, 1, 0, 0, ZONE_PARIS), ZonedDateTime.of(2210, 2, 2, 23, 5, 0, 0, ZONE_PARIS), null}, + + {LocalTime.of(23, 5), LocalDate.of(2210, 2, 2), null, DateTimeException.class}, + {LocalTime.of(23, 5), null, null, NullPointerException.class}, + + }; + } + + @Test(dataProvider="adjustInto") + public void test_adjustInto(LocalTime test, Temporal temporal, Temporal expected, Class expectedEx) { + if (expectedEx == null) { + Temporal result = test.adjustInto(temporal); + assertEquals(result, expected); + } else { + try { + Temporal result = test.adjustInto(temporal); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + //----------------------------------------------------------------------- // with() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_adjustment() { final LocalTime sample = LocalTime.of(23, 5); TemporalAdjuster adjuster = new TemporalAdjuster() { @@ -731,7 +779,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(TEST_12_30_40_987654321.with(adjuster), sample); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_adjustment_null() { TEST_12_30_40_987654321.with((TemporalAdjuster) null); } @@ -739,7 +787,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withHour() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withHour_normal() { LocalTime t = TEST_12_30_40_987654321; for (int i = 0; i < 24; i++) { @@ -748,30 +796,30 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_withHour_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.withHour(12); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_withHour_toMidnight_equal() { LocalTime t = LocalTime.of(1, 0).withHour(0); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_withHour_toMidday_equal() { LocalTime t = LocalTime.of(1, 0).withHour(12); assertEquals(t, LocalTime.NOON); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withHour_hourTooLow() { TEST_12_30_40_987654321.withHour(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withHour_hourTooHigh() { TEST_12_30_40_987654321.withHour(24); } @@ -779,7 +827,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMinute() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMinute_normal() { LocalTime t = TEST_12_30_40_987654321; for (int i = 0; i < 60; i++) { @@ -788,30 +836,30 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_withMinute_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.withMinute(30); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_withMinute_toMidnight_equal() { LocalTime t = LocalTime.of(0, 1).withMinute(0); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_withMinute_toMidday_equals() { LocalTime t = LocalTime.of(12, 1).withMinute(0); assertEquals(t, LocalTime.NOON); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMinute_minuteTooLow() { TEST_12_30_40_987654321.withMinute(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMinute_minuteTooHigh() { TEST_12_30_40_987654321.withMinute(60); } @@ -819,7 +867,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withSecond_normal() { LocalTime t = TEST_12_30_40_987654321; for (int i = 0; i < 60; i++) { @@ -828,30 +876,30 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_withSecond_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.withSecond(40); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_withSecond_toMidnight_equal() { LocalTime t = LocalTime.of(0, 0, 1).withSecond(0); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_withSecond_toMidday_equal() { LocalTime t = LocalTime.of(12, 0, 1).withSecond(0); assertEquals(t, LocalTime.NOON); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withSecond_secondTooLow() { TEST_12_30_40_987654321.withSecond(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withSecond_secondTooHigh() { TEST_12_30_40_987654321.withSecond(60); } @@ -859,7 +907,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withNano() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_normal() { LocalTime t = TEST_12_30_40_987654321; t = t.withNano(1); @@ -872,30 +920,30 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(t.getNano(), 999999999); } - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.withNano(987654321); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_toMidnight_equal() { LocalTime t = LocalTime.of(0, 0, 0, 1).withNano(0); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_toMidday_equal() { LocalTime t = LocalTime.of(12, 0, 0, 1).withNano(0); assertEquals(t, LocalTime.NOON); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withNanoOfSecond_nanoTooLow() { TEST_12_30_40_987654321.withNano(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withNanoOfSecond_nanoTooHigh() { TEST_12_30_40_987654321.withNano(1000000000); } @@ -974,7 +1022,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(groups={"tck"}, dataProvider="truncatedToValid") + @Test(dataProvider="truncatedToValid") public void test_truncatedTo_valid(LocalTime input, TemporalUnit unit, LocalTime expected) { assertEquals(input.truncatedTo(unit), expected); } @@ -989,12 +1037,12 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(groups={"tck"}, dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class) + @Test(dataProvider="truncatedToInvalid", expectedExceptions=DateTimeException.class) public void test_truncatedTo_invalid(LocalTime input, TemporalUnit unit) { input.truncatedTo(unit); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_truncatedTo_null() { TEST_12_30_40_987654321.truncatedTo(null); } @@ -1044,25 +1092,25 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_positiveHours() { LocalTime t = TEST_12_30_40_987654321.plus(7, ChronoUnit.HOURS); assertEquals(t, LocalTime.of(19, 30, 40, 987654321)); } - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_negativeMinutes() { LocalTime t = TEST_12_30_40_987654321.plus(-25, ChronoUnit.MINUTES); assertEquals(t, LocalTime.of(12, 5, 40, 987654321)); } - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_zero() { LocalTime t = TEST_12_30_40_987654321.plus(0, ChronoUnit.MINUTES); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_invalidUnit() { for (TemporalUnit unit : INVALID_UNITS) { try { @@ -1074,7 +1122,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plus_longTemporalUnit_multiples() { assertEquals(TEST_12_30_40_987654321.plus(0, DAYS), TEST_12_30_40_987654321); assertEquals(TEST_12_30_40_987654321.plus(1, DAYS), TEST_12_30_40_987654321); @@ -1082,7 +1130,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(TEST_12_30_40_987654321.plus(-3, DAYS), TEST_12_30_40_987654321); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_longTemporalUnit_null() { TEST_12_30_40_987654321.plus(1, (TemporalUnit) null); } @@ -1090,7 +1138,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusHours_one() { LocalTime t = LocalTime.MIDNIGHT; for (int i = 0; i < 50; i++) { @@ -1099,7 +1147,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusHours_fromZero() { LocalTime base = LocalTime.MIDNIGHT; for (int i = -50; i < 50; i++) { @@ -1108,7 +1156,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusHours_fromOne() { LocalTime base = LocalTime.of(1, 0); for (int i = -50; i < 50; i++) { @@ -1117,25 +1165,25 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusHours_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.plusHours(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusHours_toMidnight_equal() { LocalTime t = LocalTime.of(23, 0).plusHours(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_plusHours_toMidday_equal() { LocalTime t = LocalTime.of(11, 0).plusHours(1); assertEquals(t, LocalTime.NOON); } - @Test(groups={"tck"}) + @Test public void test_plusHours_big() { LocalTime t = LocalTime.of(2, 30).plusHours(Long.MAX_VALUE); int hours = (int) (Long.MAX_VALUE % 24L); @@ -1145,7 +1193,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMinutes_one() { LocalTime t = LocalTime.MIDNIGHT; int hour = 0; @@ -1162,7 +1210,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_fromZero() { LocalTime base = LocalTime.MIDNIGHT; int hour; @@ -1187,31 +1235,31 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.plusMinutes(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_noChange_oneDay_equal() { LocalTime t = TEST_12_30_40_987654321.plusMinutes(24 * 60); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_toMidnight_equal() { LocalTime t = LocalTime.of(23, 59).plusMinutes(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_toMidday_equal() { LocalTime t = LocalTime.of(11, 59).plusMinutes(1); assertEquals(t, LocalTime.NOON); } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_big() { LocalTime t = LocalTime.of(2, 30).plusMinutes(Long.MAX_VALUE); int mins = (int) (Long.MAX_VALUE % (24L * 60L)); @@ -1221,7 +1269,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusSeconds_one() { LocalTime t = LocalTime.MIDNIGHT; int hour = 0; @@ -1285,7 +1333,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="plusSeconds_fromZero", groups={"tck"}) + @Test(dataProvider="plusSeconds_fromZero") public void test_plusSeconds_fromZero(int seconds, int hour, int min, int sec) { LocalTime base = LocalTime.MIDNIGHT; LocalTime t = base.plusSeconds(seconds); @@ -1295,25 +1343,25 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(sec, t.getSecond()); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.plusSeconds(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_noChange_oneDay_equal() { LocalTime t = TEST_12_30_40_987654321.plusSeconds(24 * 60 * 60); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_toMidnight_equal() { LocalTime t = LocalTime.of(23, 59, 59).plusSeconds(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_toMidday_equal() { LocalTime t = LocalTime.of(11, 59, 59).plusSeconds(1); assertEquals(t, LocalTime.NOON); @@ -1322,7 +1370,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusNanos_halfABillion() { LocalTime t = LocalTime.MIDNIGHT; int hour = 0; @@ -1398,7 +1446,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="plusNanos_fromZero", groups={"tck"}) + @Test(dataProvider="plusNanos_fromZero") public void test_plusNanos_fromZero(long nanoseconds, int hour, int min, int sec, int nanos) { LocalTime base = LocalTime.MIDNIGHT; LocalTime t = base.plusNanos(nanoseconds); @@ -1409,25 +1457,25 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(nanos, t.getNano()); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.plusNanos(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_noChange_oneDay_equal() { LocalTime t = TEST_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_toMidnight_equal() { LocalTime t = LocalTime.of(23, 59, 59, 999999999).plusNanos(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_toMidday_equal() { LocalTime t = LocalTime.of(11, 59, 59, 999999999).plusNanos(1); assertEquals(t, LocalTime.NOON); @@ -1478,25 +1526,25 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_positiveHours() { LocalTime t = TEST_12_30_40_987654321.minus(7, ChronoUnit.HOURS); assertEquals(t, LocalTime.of(5, 30, 40, 987654321)); } - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_negativeMinutes() { LocalTime t = TEST_12_30_40_987654321.minus(-25, ChronoUnit.MINUTES); assertEquals(t, LocalTime.of(12, 55, 40, 987654321)); } - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_zero() { LocalTime t = TEST_12_30_40_987654321.minus(0, ChronoUnit.MINUTES); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_invalidUnit() { for (TemporalUnit unit : INVALID_UNITS) { try { @@ -1508,7 +1556,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minus_longTemporalUnit_long_multiples() { assertEquals(TEST_12_30_40_987654321.minus(0, DAYS), TEST_12_30_40_987654321); assertEquals(TEST_12_30_40_987654321.minus(1, DAYS), TEST_12_30_40_987654321); @@ -1516,7 +1564,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(TEST_12_30_40_987654321.minus(-3, DAYS), TEST_12_30_40_987654321); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_longTemporalUnit_null() { TEST_12_30_40_987654321.minus(1, (TemporalUnit) null); } @@ -1524,7 +1572,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusHours_one() { LocalTime t = LocalTime.MIDNIGHT; for (int i = 0; i < 50; i++) { @@ -1533,7 +1581,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusHours_fromZero() { LocalTime base = LocalTime.MIDNIGHT; for (int i = -50; i < 50; i++) { @@ -1542,7 +1590,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusHours_fromOne() { LocalTime base = LocalTime.of(1, 0); for (int i = -50; i < 50; i++) { @@ -1551,25 +1599,25 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusHours_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.minusHours(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusHours_toMidnight_equal() { LocalTime t = LocalTime.of(1, 0).minusHours(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_minusHours_toMidday_equal() { LocalTime t = LocalTime.of(13, 0).minusHours(1); assertEquals(t, LocalTime.NOON); } - @Test(groups={"tck"}) + @Test public void test_minusHours_big() { LocalTime t = LocalTime.of(2, 30).minusHours(Long.MAX_VALUE); int hours = (int) (Long.MAX_VALUE % 24L); @@ -1579,7 +1627,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMinutes_one() { LocalTime t = LocalTime.MIDNIGHT; int hour = 0; @@ -1600,7 +1648,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_fromZero() { LocalTime base = LocalTime.MIDNIGHT; int hour = 22; @@ -1623,31 +1671,31 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.minusMinutes(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_noChange_oneDay_equal() { LocalTime t = TEST_12_30_40_987654321.minusMinutes(24 * 60); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_toMidnight_equal() { LocalTime t = LocalTime.of(0, 1).minusMinutes(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_toMidday_equals() { LocalTime t = LocalTime.of(12, 1).minusMinutes(1); assertEquals(t, LocalTime.NOON); } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_big() { LocalTime t = LocalTime.of(2, 30).minusMinutes(Long.MAX_VALUE); int mins = (int) (Long.MAX_VALUE % (24L * 60L)); @@ -1657,7 +1705,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusSeconds_one() { LocalTime t = LocalTime.MIDNIGHT; int hour = 0; @@ -1726,7 +1774,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="minusSeconds_fromZero", groups={"tck"}) + @Test(dataProvider="minusSeconds_fromZero") public void test_minusSeconds_fromZero(int seconds, int hour, int min, int sec) { LocalTime base = LocalTime.MIDNIGHT; LocalTime t = base.minusSeconds(seconds); @@ -1736,31 +1784,31 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(t.getSecond(), sec); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.minusSeconds(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_noChange_oneDay_equal() { LocalTime t = TEST_12_30_40_987654321.minusSeconds(24 * 60 * 60); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_toMidnight_equal() { LocalTime t = LocalTime.of(0, 0, 1).minusSeconds(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_toMidday_equal() { LocalTime t = LocalTime.of(12, 0, 1).minusSeconds(1); assertEquals(t, LocalTime.NOON); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_big() { LocalTime t = LocalTime.of(2, 30).minusSeconds(Long.MAX_VALUE); int secs = (int) (Long.MAX_VALUE % (24L * 60L * 60L)); @@ -1770,7 +1818,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusNanos_halfABillion() { LocalTime t = LocalTime.MIDNIGHT; int hour = 0; @@ -1854,7 +1902,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="minusNanos_fromZero", groups={"tck"}) + @Test(dataProvider="minusNanos_fromZero") public void test_minusNanos_fromZero(long nanoseconds, int hour, int min, int sec, int nanos) { LocalTime base = LocalTime.MIDNIGHT; LocalTime t = base.minusNanos(nanoseconds); @@ -1865,40 +1913,121 @@ public class TCKLocalTime extends AbstractDateTimeTest { assertEquals(nanos, t.getNano()); } - @Test(groups={"tck"}) + @Test public void test_minusNanos_noChange_equal() { LocalTime t = TEST_12_30_40_987654321.minusNanos(0); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusNanos_noChange_oneDay_equal() { LocalTime t = TEST_12_30_40_987654321.minusNanos(24 * 60 * 60 * 1000000000L); assertEquals(t, TEST_12_30_40_987654321); } - @Test(groups={"tck"}) + @Test public void test_minusNanos_toMidnight_equal() { LocalTime t = LocalTime.of(0, 0, 0, 1).minusNanos(1); assertEquals(t, LocalTime.MIDNIGHT); } - @Test(groups={"tck"}) + @Test public void test_minusNanos_toMidday_equal() { LocalTime t = LocalTime.of(12, 0, 0, 1).minusNanos(1); assertEquals(t, LocalTime.NOON); } + //----------------------------------------------------------------------- + // periodUntil(Temporal, TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name="periodUntilUnit") + Object[][] data_periodUntilUnit() { + return new Object[][] { + {time(0, 0, 0, 0), time(0, 0, 0, 0), NANOS, 0}, + {time(0, 0, 0, 0), time(0, 0, 0, 0), MICROS, 0}, + {time(0, 0, 0, 0), time(0, 0, 0, 0), MILLIS, 0}, + {time(0, 0, 0, 0), time(0, 0, 0, 0), SECONDS, 0}, + {time(0, 0, 0, 0), time(0, 0, 0, 0), MINUTES, 0}, + {time(0, 0, 0, 0), time(0, 0, 0, 0), HOURS, 0}, + {time(0, 0, 0, 0), time(0, 0, 0, 0), HALF_DAYS, 0}, + + {time(0, 0, 0, 0), time(2, 0, 0, 0), NANOS, 2 * 3600 * 1_000_000_000L}, + {time(0, 0, 0, 0), time(2, 0, 0, 0), MICROS, 2 * 3600 * 1_000_000L}, + {time(0, 0, 0, 0), time(2, 0, 0, 0), MILLIS, 2 * 3600 * 1_000L}, + {time(0, 0, 0, 0), time(2, 0, 0, 0), SECONDS, 2 * 3600}, + {time(0, 0, 0, 0), time(2, 0, 0, 0), MINUTES, 2 * 60}, + {time(0, 0, 0, 0), time(2, 0, 0, 0), HOURS, 2}, + {time(0, 0, 0, 0), time(2, 0, 0, 0), HALF_DAYS, 0}, + + {time(0, 0, 0, 0), time(14, 0, 0, 0), NANOS, 14 * 3600 * 1_000_000_000L}, + {time(0, 0, 0, 0), time(14, 0, 0, 0), MICROS, 14 * 3600 * 1_000_000L}, + {time(0, 0, 0, 0), time(14, 0, 0, 0), MILLIS, 14 * 3600 * 1_000L}, + {time(0, 0, 0, 0), time(14, 0, 0, 0), SECONDS, 14 * 3600}, + {time(0, 0, 0, 0), time(14, 0, 0, 0), MINUTES, 14 * 60}, + {time(0, 0, 0, 0), time(14, 0, 0, 0), HOURS, 14}, + {time(0, 0, 0, 0), time(14, 0, 0, 0), HALF_DAYS, 1}, + + {time(0, 0, 0, 0), time(2, 30, 40, 1500), NANOS, (2 * 3600 + 30 * 60 + 40) * 1_000_000_000L + 1500}, + {time(0, 0, 0, 0), time(2, 30, 40, 1500), MICROS, (2 * 3600 + 30 * 60 + 40) * 1_000_000L + 1}, + {time(0, 0, 0, 0), time(2, 30, 40, 1500), MILLIS, (2 * 3600 + 30 * 60 + 40) * 1_000L}, + {time(0, 0, 0, 0), time(2, 30, 40, 1500), SECONDS, 2 * 3600 + 30 * 60 + 40}, + {time(0, 0, 0, 0), time(2, 30, 40, 1500), MINUTES, 2 * 60 + 30}, + {time(0, 0, 0, 0), time(2, 30, 40, 1500), HOURS, 2}, + }; + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) { + long amount = time1.periodUntil(time2, unit); + assertEquals(amount, expected); + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit_negated(LocalTime time1, LocalTime time2, TemporalUnit unit, long expected) { + long amount = time2.periodUntil(time1, unit); + assertEquals(amount, -expected); + } + + @Test(expectedExceptions = UnsupportedTemporalTypeException.class) + public void test_periodUntil_TemporalUnit_unsupportedUnit() { + TEST_12_30_40_987654321.periodUntil(TEST_12_30_40_987654321, DAYS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullEnd() { + TEST_12_30_40_987654321.periodUntil(null, HOURS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullUnit() { + TEST_12_30_40_987654321.periodUntil(TEST_12_30_40_987654321, null); + } + + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s"); + String t = LocalTime.of(11, 30, 45).format(f); + assertEquals(t, "11 30 45"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + LocalTime.of(11, 30, 45).format(null); + } + //----------------------------------------------------------------------- // atDate() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atDate() { LocalTime t = LocalTime.of(11, 30); assertEquals(t.atDate(LocalDate.of(2012, 6, 30)), LocalDateTime.of(2012, 6, 30, 11, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atDate_nullDate() { TEST_12_30_40_987654321.atDate((LocalDate) null); } @@ -1906,13 +2035,13 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // atOffset() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atOffset() { LocalTime t = LocalTime.of(11, 30); assertEquals(t.atOffset(OFFSET_PTWO), OffsetTime.of(LocalTime.of(11, 30), OFFSET_PTWO)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atOffset_nullZoneOffset() { LocalTime t = LocalTime.of(11, 30); t.atOffset((ZoneOffset) null); @@ -1921,7 +2050,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toSecondOfDay() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toSecondOfDay() { LocalTime t = LocalTime.of(0, 0); for (int i = 0; i < 24 * 60 * 60; i++) { @@ -1930,7 +2059,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_toSecondOfDay_fromNanoOfDay_symmetry() { LocalTime t = LocalTime.of(0, 0); for (int i = 0; i < 24 * 60 * 60; i++) { @@ -1942,7 +2071,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toNanoOfDay() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toNanoOfDay() { LocalTime t = LocalTime.of(0, 0); for (int i = 0; i < 1000000; i++) { @@ -1956,7 +2085,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_toNanoOfDay_fromNanoOfDay_symmetry() { LocalTime t = LocalTime.of(0, 0); for (int i = 0; i < 1000000; i++) { @@ -1973,7 +2102,7 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_comparisons() { doTest_comparisons_LocalTime( LocalTime.MIDNIGHT, @@ -2028,22 +2157,22 @@ public class TCKLocalTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_ObjectNull() { TEST_12_30_40_987654321.compareTo(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_ObjectNull() { TEST_12_30_40_987654321.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_ObjectNull() { TEST_12_30_40_987654321.isAfter(null); } - @Test(expectedExceptions=ClassCastException.class, groups={"tck"}) + @Test(expectedExceptions=ClassCastException.class) @SuppressWarnings({"unchecked", "rawtypes"}) public void compareToNonLocalTime() { Comparable c = TEST_12_30_40_987654321; @@ -2053,48 +2182,48 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_true(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m, s, n); assertEquals(a.equals(b), true); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_hour_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h + 1, m, s, n); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_minute_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m + 1, s, n); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_second_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m, s + 1, n); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_nano_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m, s, n + 1); assertEquals(a.equals(b), false); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_12_30_40_987654321.equals(TEST_12_30_40_987654321), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_12_30_40_987654321.equals("2007-07-15"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_12_30_40_987654321.equals(null), false); } @@ -2102,35 +2231,35 @@ public class TCKLocalTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_hashCode_same(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m, s, n); assertEquals(a.hashCode(), b.hashCode()); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_hashCode_hour_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h + 1, m, s, n); assertEquals(a.hashCode() == b.hashCode(), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_hashCode_minute_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m + 1, s, n); assertEquals(a.hashCode() == b.hashCode(), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_hashCode_second_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m, s + 1, n); assertEquals(a.hashCode() == b.hashCode(), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_hashCode_nano_differs(int h, int m, int s, int n) { LocalTime a = LocalTime.of(h, m, s, n); LocalTime b = LocalTime.of(h, m, s, n + 1); @@ -2172,26 +2301,14 @@ public class TCKLocalTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int h, int m, int s, int n, String expected) { LocalTime t = LocalTime.of(h, m, s, n); String str = t.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s"); - String t = LocalTime.of(11, 30, 45).toString(f); - assertEquals(t, "11 30 45"); + private LocalTime time(int hour, int min, int sec, int nano) { + return LocalTime.of(hour, min, sec, nano); } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - LocalTime.of(11, 30, 45).toString(null); - } - } diff --git a/jdk/test/java/time/tck/java/time/TCKMonth.java b/jdk/test/java/time/tck/java/time/TCKMonth.java index c5160c1c286..77e9eef7a96 100644 --- a/jdk/test/java/time/tck/java/time/TCKMonth.java +++ b/jdk/test/java/time/tck/java/time/TCKMonth.java @@ -71,7 +71,6 @@ import java.time.format.TextStyle; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; @@ -117,7 +116,7 @@ public class TCKMonth extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_int_singleton() { for (int i = 1; i <= MAX_LENGTH; i++) { Month test = Month.of(i); @@ -125,28 +124,28 @@ public class TCKMonth extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_tooLow() { Month.of(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_tooHigh() { Month.of(13); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(Month.from(LocalDate.of(2011, 6, 6)), Month.JUNE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { Month.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_CalendricalObject_null() { Month.from((TemporalAccessor) null); } @@ -170,13 +169,13 @@ public class TCKMonth extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {Month.JUNE, Queries.chronology(), IsoChronology.INSTANCE}, - {Month.JUNE, Queries.zoneId(), null}, - {Month.JUNE, Queries.precision(), ChronoUnit.MONTHS}, - {Month.JUNE, Queries.zone(), null}, - {Month.JUNE, Queries.offset(), null}, - {Month.JUNE, Queries.localDate(), null}, - {Month.JUNE, Queries.localTime(), null}, + {Month.JUNE, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {Month.JUNE, TemporalQuery.zoneId(), null}, + {Month.JUNE, TemporalQuery.precision(), ChronoUnit.MONTHS}, + {Month.JUNE, TemporalQuery.zone(), null}, + {Month.JUNE, TemporalQuery.offset(), null}, + {Month.JUNE, TemporalQuery.localDate(), null}, + {Month.JUNE, TemporalQuery.localTime(), null}, }; } @@ -198,17 +197,17 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // getText() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getText() { assertEquals(Month.JANUARY.getDisplayName(TextStyle.SHORT, Locale.US), "Jan"); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void test_getText_nullStyle() { Month.JANUARY.getDisplayName(null, Locale.US); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void test_getText_nullLocale() { Month.JANUARY.getDisplayName(TextStyle.FULL, null); } @@ -275,7 +274,7 @@ public class TCKMonth extends AbstractDateTimeTest { }; } - @Test(dataProvider="plus", groups={"tck"}) + @Test(dataProvider="plus") public void test_plus_long(int base, long amount, int expected) { assertEquals(Month.of(base).plus(amount), Month.of(expected)); } @@ -316,7 +315,7 @@ public class TCKMonth extends AbstractDateTimeTest { }; } - @Test(dataProvider="minus", groups={"tck"}) + @Test(dataProvider="minus") public void test_minus_long(int base, long amount, int expected) { assertEquals(Month.of(base).minus(amount), Month.of(expected)); } @@ -324,7 +323,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // length(boolean) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_length_boolean_notLeapYear() { assertEquals(Month.JANUARY.length(false), 31); assertEquals(Month.FEBRUARY.length(false), 28); @@ -340,7 +339,7 @@ public class TCKMonth extends AbstractDateTimeTest { assertEquals(Month.DECEMBER.length(false), 31); } - @Test(groups={"tck"}) + @Test public void test_length_boolean_leapYear() { assertEquals(Month.JANUARY.length(true), 31); assertEquals(Month.FEBRUARY.length(true), 29); @@ -359,7 +358,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minLength() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minLength() { assertEquals(Month.JANUARY.minLength(), 31); assertEquals(Month.FEBRUARY.minLength(), 28); @@ -378,7 +377,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // maxLength() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_maxLength() { assertEquals(Month.JANUARY.maxLength(), 31); assertEquals(Month.FEBRUARY.maxLength(), 29); @@ -397,7 +396,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // firstDayOfYear(boolean) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_firstDayOfYear_notLeapYear() { assertEquals(Month.JANUARY.firstDayOfYear(false), 1); assertEquals(Month.FEBRUARY.firstDayOfYear(false), 1 + 31); @@ -413,7 +412,7 @@ public class TCKMonth extends AbstractDateTimeTest { assertEquals(Month.DECEMBER.firstDayOfYear(false), 1 + 31 + 28 + 31 + 30 + 31 + 30 + 31 + 31 + 30 + 31 + 30); } - @Test(groups={"tck"}) + @Test public void test_firstDayOfYear_leapYear() { assertEquals(Month.JANUARY.firstDayOfYear(true), 1); assertEquals(Month.FEBRUARY.firstDayOfYear(true), 1 + 31); @@ -432,7 +431,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // firstMonthOfQuarter() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_firstMonthOfQuarter() { assertEquals(Month.JANUARY.firstMonthOfQuarter(), Month.JANUARY); assertEquals(Month.FEBRUARY.firstMonthOfQuarter(), Month.JANUARY); @@ -451,7 +450,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString() { assertEquals(Month.JANUARY.toString(), "JANUARY"); assertEquals(Month.FEBRUARY.toString(), "FEBRUARY"); @@ -470,7 +469,7 @@ public class TCKMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // generated methods //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_enum() { assertEquals(Month.valueOf("JANUARY"), Month.JANUARY); assertEquals(Month.values()[0], Month.JANUARY); diff --git a/jdk/test/java/time/tck/java/time/TCKMonthDay.java b/jdk/test/java/time/tck/java/time/TCKMonthDay.java index 1a80e8ce303..0bcbdef8195 100644 --- a/jdk/test/java/time/tck/java/time/TCKMonthDay.java +++ b/jdk/test/java/time/tck/java/time/TCKMonthDay.java @@ -84,7 +84,6 @@ import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; @@ -106,7 +105,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { private MonthDay TEST_07_15; - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { TEST_07_15 = MonthDay.of(7, 15); } @@ -164,7 +163,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { MonthDay expected = MonthDay.now(Clock.systemDefaultZone()); MonthDay test = MonthDay.now(); @@ -181,12 +180,12 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { MonthDay.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); MonthDay expected = MonthDay.now(Clock.system(zone)); @@ -204,7 +203,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock() { Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC); Clock clock = Clock.fixed(instant, ZoneOffset.UTC); @@ -213,71 +212,71 @@ public class TCKMonthDay extends AbstractDateTimeTest { assertEquals(test.getDayOfMonth(), 31); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { MonthDay.now((Clock) null); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_intMonth() { assertEquals(TEST_07_15, MonthDay.of(Month.JULY, 15)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_intMonth_dayTooLow() { MonthDay.of(Month.JANUARY, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_intMonth_dayTooHigh() { MonthDay.of(Month.JANUARY, 32); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_intMonth_nullMonth() { MonthDay.of(null, 15); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ints() { check(TEST_07_15, 7, 15); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_dayTooLow() { MonthDay.of(1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_dayTooHigh() { MonthDay.of(1, 32); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_monthTooLow() { MonthDay.of(0, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_monthTooHigh() { MonthDay.of(13, 1); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(MonthDay.from(LocalDate.of(2007, 7, 15)), TEST_07_15); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { MonthDay.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_CalendricalObject_null() { MonthDay.from((TemporalAccessor) null); } @@ -315,7 +314,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { }; } - @Test(dataProvider="goodParseData", groups={"tck"}) + @Test(dataProvider="goodParseData") public void factory_parse_success(String text, MonthDay expected) { MonthDay monthDay = MonthDay.parse(text); assertEquals(monthDay, expected); @@ -333,7 +332,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { }; } - @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class) public void factory_parse_fail(String text, int pos) { try { MonthDay.parse(text); @@ -347,22 +346,22 @@ public class TCKMonthDay extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue_Day() { MonthDay.parse("--06-32"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_invalidValue_Day() { MonthDay.parse("--06-31"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue_Month() { MonthDay.parse("--13-25"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { MonthDay.parse(null); } @@ -370,20 +369,20 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("M d"); MonthDay test = MonthDay.parse("12 3", f); assertEquals(test, MonthDay.of(12, 3)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("M d"); MonthDay.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { MonthDay.parse("ANY", null); } @@ -409,13 +408,13 @@ public class TCKMonthDay extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_07_15, Queries.chronology(), IsoChronology.INSTANCE}, - {TEST_07_15, Queries.zoneId(), null}, - {TEST_07_15, Queries.precision(), null}, - {TEST_07_15, Queries.zone(), null}, - {TEST_07_15, Queries.offset(), null}, - {TEST_07_15, Queries.localDate(), null}, - {TEST_07_15, Queries.localTime(), null}, + {TEST_07_15, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {TEST_07_15, TemporalQuery.zoneId(), null}, + {TEST_07_15, TemporalQuery.precision(), null}, + {TEST_07_15, TemporalQuery.zone(), null}, + {TEST_07_15, TemporalQuery.offset(), null}, + {TEST_07_15, TemporalQuery.localDate(), null}, + {TEST_07_15, TemporalQuery.localTime(), null}, }; } @@ -461,28 +460,28 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with(Month) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_Month() { assertEquals(MonthDay.of(6, 30).with(Month.JANUARY), MonthDay.of(1, 30)); } - @Test(groups={"tck"}) + @Test public void test_with_Month_adjustToValid() { assertEquals(MonthDay.of(7, 31).with(Month.JUNE), MonthDay.of(6, 30)); } - @Test(groups={"tck"}) + @Test public void test_with_Month_adjustToValidFeb() { assertEquals(MonthDay.of(7, 31).with(Month.FEBRUARY), MonthDay.of(2, 29)); } - @Test(groups={"tck"}) + @Test public void test_with_Month_noChangeEqual() { MonthDay test = MonthDay.of(6, 30); assertEquals(test.with(Month.JUNE), test); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_Month_null() { MonthDay.of(6, 30).with((Month) null); } @@ -490,33 +489,33 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth() { assertEquals(MonthDay.of(6, 30).withMonth(1), MonthDay.of(1, 30)); } - @Test(groups={"tck"}) + @Test public void test_withMonth_adjustToValid() { assertEquals(MonthDay.of(7, 31).withMonth(6), MonthDay.of(6, 30)); } - @Test(groups={"tck"}) + @Test public void test_withMonth_adjustToValidFeb() { assertEquals(MonthDay.of(7, 31).withMonth(2), MonthDay.of(2, 29)); } - @Test(groups={"tck"}) + @Test public void test_withMonth_int_noChangeEqual() { MonthDay test = MonthDay.of(6, 30); assertEquals(test.withMonth(6), test); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_tooLow() { MonthDay.of(6, 30).withMonth(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_tooHigh() { MonthDay.of(6, 30).withMonth(13); } @@ -524,33 +523,33 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth() { assertEquals(MonthDay.of(6, 30).withDayOfMonth(1), MonthDay.of(6, 1)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_invalid() { MonthDay.of(6, 30).withDayOfMonth(31); } - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_adjustToValidFeb() { assertEquals(MonthDay.of(2, 1).withDayOfMonth(29), MonthDay.of(2, 29)); } - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_noChangeEqual() { MonthDay test = MonthDay.of(6, 30); assertEquals(test.withDayOfMonth(30), test); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_tooLow() { MonthDay.of(6, 30).withDayOfMonth(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_tooHigh() { MonthDay.of(6, 30).withDayOfMonth(32); } @@ -558,28 +557,28 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // adjustInto() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjustDate() { MonthDay test = MonthDay.of(6, 30); LocalDate date = LocalDate.of(2007, 1, 1); assertEquals(test.adjustInto(date), LocalDate.of(2007, 6, 30)); } - @Test(groups={"tck"}) + @Test public void test_adjustDate_resolve() { MonthDay test = MonthDay.of(2, 29); LocalDate date = LocalDate.of(2007, 6, 30); assertEquals(test.adjustInto(date), LocalDate.of(2007, 2, 28)); } - @Test(groups={"tck"}) + @Test public void test_adjustDate_equal() { MonthDay test = MonthDay.of(6, 30); LocalDate date = LocalDate.of(2007, 6, 30); assertEquals(test.adjustInto(date), date); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_adjustDate_null() { TEST_07_15.adjustInto((LocalDate) null); } @@ -587,40 +586,55 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isValidYear(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isValidYear_june() { MonthDay test = MonthDay.of(6, 30); assertEquals(test.isValidYear(2007), true); } - @Test(groups={"tck"}) + @Test public void test_isValidYear_febNonLeap() { MonthDay test = MonthDay.of(2, 29); assertEquals(test.isValidYear(2007), false); } - @Test(groups={"tck"}) + @Test public void test_isValidYear_febLeap() { MonthDay test = MonthDay.of(2, 29); assertEquals(test.isValidYear(2008), true); } + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("M d"); + String t = MonthDay.of(12, 3).format(f); + assertEquals(t, "12 3"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + MonthDay.of(12, 3).format(null); + } + //----------------------------------------------------------------------- // atYear(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atYear_int() { MonthDay test = MonthDay.of(6, 30); assertEquals(test.atYear(2008), LocalDate.of(2008, 6, 30)); } - @Test(groups={"tck"}) + @Test public void test_atYear_int_leapYearAdjust() { MonthDay test = MonthDay.of(2, 29); assertEquals(test.atYear(2005), LocalDate.of(2005, 2, 28)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atYear_int_invalidYear() { MonthDay test = MonthDay.of(6, 30); test.atYear(Integer.MIN_VALUE); @@ -629,7 +643,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_comparisons() { doTest_comparisons_MonthDay( MonthDay.of(1, 1), @@ -666,17 +680,17 @@ public class TCKMonthDay extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_ObjectNull() { TEST_07_15.compareTo(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_ObjectNull() { TEST_07_15.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_ObjectNull() { TEST_07_15.isAfter(null); } @@ -684,7 +698,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals() { MonthDay a = MonthDay.of(1, 1); MonthDay b = MonthDay.of(1, 1); @@ -712,17 +726,17 @@ public class TCKMonthDay extends AbstractDateTimeTest { assertEquals(d.equals(d), true); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_07_15.equals(TEST_07_15), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_07_15.equals("2007-07-15"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_07_15.equals(null), false); } @@ -730,7 +744,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_hashCode(int m, int d) { MonthDay a = MonthDay.of(m, d); assertEquals(a.hashCode(), a.hashCode()); @@ -738,7 +752,7 @@ public class TCKMonthDay extends AbstractDateTimeTest { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_hashCode_unique() { int leapYear = 2008; Set uniques = new HashSet(366); @@ -763,26 +777,11 @@ public class TCKMonthDay extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int m, int d, String expected) { MonthDay test = MonthDay.of(m, d); String str = test.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("M d"); - String t = MonthDay.of(12, 3).toString(f); - assertEquals(t, "12 3"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - MonthDay.of(12, 3).toString(null); - } - } diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java index ee0832e7ff0..a6bb7c30418 100644 --- a/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java +++ b/jdk/test/java/time/tck/java/time/TCKOffsetDateTime.java @@ -71,7 +71,6 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.EPOCH_DAY; -import static java.time.temporal.ChronoField.EPOCH_MONTH; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.HOUR_OF_AMPM; import static java.time.temporal.ChronoField.HOUR_OF_DAY; @@ -86,6 +85,7 @@ import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.NANO_OF_DAY; import static java.time.temporal.ChronoField.NANO_OF_SECOND; import static java.time.temporal.ChronoField.OFFSET_SECONDS; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; import static java.time.temporal.ChronoField.SECOND_OF_DAY; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; import static java.time.temporal.ChronoField.YEAR; @@ -95,6 +95,7 @@ import static java.time.temporal.ChronoUnit.NANOS; import static java.time.temporal.ChronoUnit.SECONDS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; @@ -120,7 +121,6 @@ import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAdjuster; @@ -149,9 +149,9 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { private static final ZoneOffset OFFSET_MTWO = ZoneOffset.ofHours(-2); private OffsetDateTime TEST_2008_6_30_11_30_59_000000500; - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { - TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 500), OFFSET_PONE); + TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_PONE); } //----------------------------------------------------------------------- @@ -188,7 +188,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { ALIGNED_WEEK_OF_MONTH, ALIGNED_WEEK_OF_YEAR, MONTH_OF_YEAR, - EPOCH_MONTH, + PROLEPTIC_MONTH, YEAR_OF_ERA, YEAR, ERA, @@ -261,7 +261,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { OffsetDateTime expected = OffsetDateTime.now(Clock.systemDefaultZone()); OffsetDateTime test = OffsetDateTime.now(); @@ -278,7 +278,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_utc() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); @@ -295,7 +295,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_offset() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); @@ -312,7 +312,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_beforeEpoch() { LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L); for (int i =-1; i >= -(24 * 60 * 60); i--) { @@ -328,7 +328,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_offsets() { OffsetDateTime base = OffsetDateTime.of(1970, 1, 1, 12, 0, 0, 0, ZoneOffset.UTC); for (int i = -9; i < 15; i++) { @@ -343,12 +343,12 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullZoneId() { OffsetDateTime.now((ZoneId) null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { OffsetDateTime.now((Clock) null); } @@ -371,14 +371,14 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // factories //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_intsHMSN() { OffsetDateTime test = OffsetDateTime.of(2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE); check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateLocalTimeZoneOffset() { LocalDate date = LocalDate.of(2008, 6, 30); LocalTime time = LocalTime.of(11, 30, 10, 500); @@ -386,19 +386,19 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateLocalTimeZoneOffset_nullLocalDate() { LocalTime time = LocalTime.of(11, 30, 10, 500); OffsetDateTime.of((LocalDate) null, time, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateLocalTimeZoneOffset_nullLocalTime() { LocalDate date = LocalDate.of(2008, 6, 30); OffsetDateTime.of(date, (LocalTime) null, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateLocalTimeZoneOffset_nullOffset() { LocalDate date = LocalDate.of(2008, 6, 30); LocalTime time = LocalTime.of(11, 30, 10, 500); @@ -406,19 +406,19 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateTimeZoneOffset() { LocalDateTime dt = LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500)); OffsetDateTime test = OffsetDateTime.of(dt, OFFSET_PONE); check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateTimeZoneOffset_nullProvider() { OffsetDateTime.of((LocalDateTime) null, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateTimeZoneOffset_nullOffset() { LocalDateTime dt = LocalDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500)); OffsetDateTime.of(dt, (ZoneOffset) null); @@ -427,19 +427,19 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(OffsetDateTime.from( OffsetDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(17, 30), OFFSET_PONE)), OffsetDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(17, 30), OFFSET_PONE)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { OffsetDateTime.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_Calendricals_null() { OffsetDateTime.from((TemporalAccessor) null); } @@ -447,7 +447,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse() //----------------------------------------------------------------------- - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_parse(int y, int month, int d, int h, int m, int s, int n, String offsetId, String text) { OffsetDateTime t = OffsetDateTime.parse(text); assertEquals(t.getYear(), y); @@ -460,17 +460,17 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(t.getOffset().getId(), offsetId); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue() { OffsetDateTime.parse("2008-06-32T11:15+01:00"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_invalidValue() { OffsetDateTime.parse("2008-06-31T11:15+01:00"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { OffsetDateTime.parse((String) null); } @@ -478,26 +478,26 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s XXX"); OffsetDateTime test = OffsetDateTime.parse("2010 12 3 11 30 0 +01:00", f); assertEquals(test, OffsetDateTime.of(LocalDate.of(2010, 12, 3), LocalTime.of(11, 30), ZoneOffset.ofHours(1))); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); OffsetDateTime.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { OffsetDateTime.parse("ANY", null); } //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void constructor_nullTime() throws Throwable { Constructor con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class); con.setAccessible(true); @@ -508,7 +508,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void constructor_nullOffset() throws Throwable { Constructor con = OffsetDateTime.class.getDeclaredConstructor(LocalDateTime.class, ZoneOffset.class); con.setAccessible(true); @@ -532,7 +532,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_get(int y, int o, int d, int h, int m, int s, int n, ZoneOffset offset) { LocalDate localDate = LocalDate.of(y, o, d); LocalTime localTime = LocalTime.of(h, m, s, n); @@ -602,13 +602,13 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_2008_6_30_11_30_59_000000500, Queries.chronology(), IsoChronology.INSTANCE}, - {TEST_2008_6_30_11_30_59_000000500, Queries.zoneId(), null}, - {TEST_2008_6_30_11_30_59_000000500, Queries.precision(), ChronoUnit.NANOS}, - {TEST_2008_6_30_11_30_59_000000500, Queries.zone(), OFFSET_PONE}, - {TEST_2008_6_30_11_30_59_000000500, Queries.offset(), OFFSET_PONE}, - {TEST_2008_6_30_11_30_59_000000500, Queries.localDate(), LocalDate.of(2008, 6, 30)}, - {TEST_2008_6_30_11_30_59_000000500, Queries.localTime(), LocalTime.of(11, 30, 59, 500)}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.zoneId(), null}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.precision(), ChronoUnit.NANOS}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.zone(), OFFSET_PONE}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.offset(), OFFSET_PONE}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.localDate(), LocalDate.of(2008, 6, 30)}, + {TEST_2008_6_30_11_30_59_000000500, TemporalQuery.localTime(), LocalTime.of(11, 30, 59, 500)}, }; } @@ -627,10 +627,50 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { TEST_2008_6_30_11_30_59_000000500.query(null); } + //----------------------------------------------------------------------- + // adjustInto(Temporal) + //----------------------------------------------------------------------- + @DataProvider(name="adjustInto") + Object[][] data_adjustInto() { + return new Object[][]{ + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.of(2012, 3, 4, 1, 1, 1, 100, ZoneOffset.UTC), OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null}, + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.MAX, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null}, + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.MIN, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null}, + {OffsetDateTime.MAX, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.of(OffsetDateTime.MAX.toLocalDateTime(), ZoneOffset.ofHours(-18)), null}, + {OffsetDateTime.MIN, OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetDateTime.of(OffsetDateTime.MIN.toLocalDateTime(), ZoneOffset.ofHours(18)), null}, + + + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), + ZonedDateTime.of(2012, 3, 4, 1, 1, 1, 100, ZONE_GAZA), ZonedDateTime.of(2012, 3, 4, 23, 5, 0, 0, ZONE_GAZA), null}, + + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), null, DateTimeException.class}, + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), LocalDate.of(2210, 2, 2), null, DateTimeException.class}, + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), LocalTime.of(22, 3, 0), null, DateTimeException.class}, + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), OffsetTime.of(22, 3, 0, 0, ZoneOffset.UTC), null, DateTimeException.class}, + {OffsetDateTime.of(2012, 3, 4, 23, 5, 0, 0, OFFSET_PONE), null, null, NullPointerException.class}, + + }; + } + + @Test(dataProvider="adjustInto") + public void test_adjustInto(OffsetDateTime test, Temporal temporal, Temporal expected, Class expectedEx) { + if (expectedEx == null) { + Temporal result = test.adjustInto(temporal); + assertEquals(result, expected); + } else { + try { + Temporal result = test.adjustInto(temporal); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + //----------------------------------------------------------------------- // with(WithAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_adjustment() { final OffsetDateTime sample = OffsetDateTime.of(LocalDate.of(2012, 3, 4), LocalTime.of(23, 5), OFFSET_PONE); TemporalAdjuster adjuster = new TemporalAdjuster() { @@ -642,54 +682,54 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(TEST_2008_6_30_11_30_59_000000500.with(adjuster), sample); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_LocalDate() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(LocalDate.of(2012, 9, 3)); assertEquals(test, OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(11, 30, 59, 500), OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_LocalTime() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(LocalTime.of(19, 15)); assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(19, 15), OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_LocalDateTime() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(LocalDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15))); assertEquals(test, OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15), OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_OffsetTime() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(OffsetTime.of(LocalTime.of(19, 15), OFFSET_PTWO)); assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(19, 15), OFFSET_PTWO)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_OffsetDateTime() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15), OFFSET_PTWO)); assertEquals(test, OffsetDateTime.of(LocalDate.of(2012, 9, 3), LocalTime.of(19, 15), OFFSET_PTWO)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_Month() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(DECEMBER); assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 12, 30),LocalTime.of(11, 30, 59, 500), OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_ZoneOffset() { OffsetDateTime test = TEST_2008_6_30_11_30_59_000000500.with(OFFSET_PTWO); assertEquals(test, OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 500), OFFSET_PTWO)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_adjustment_null() { TEST_2008_6_30_11_30_59_000000500.with((TemporalAdjuster) null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_withOffsetSameLocal_null() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); base.withOffsetSameLocal(null); @@ -698,7 +738,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withOffsetSameInstant() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withOffsetSameInstant() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withOffsetSameInstant(OFFSET_PTWO); @@ -706,16 +746,40 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(test, expected); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_withOffsetSameInstant_null() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); base.withOffsetSameInstant(null); } + //----------------------------------------------------------------------- + // with(long,TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name = "withFieldLong") + Object[][] data_withFieldLong() { + return new Object[][] { + {TEST_2008_6_30_11_30_59_000000500, YEAR, 2009, + OffsetDateTime.of(2009, 6, 30, 11, 30, 59, 500, OFFSET_PONE)}, + {TEST_2008_6_30_11_30_59_000000500, MONTH_OF_YEAR, 7, + OffsetDateTime.of(2008, 7, 30, 11, 30, 59, 500, OFFSET_PONE)}, + {TEST_2008_6_30_11_30_59_000000500, DAY_OF_MONTH, 15, + OffsetDateTime.of(2008, 6, 15, 11, 30, 59, 500, OFFSET_PONE)}, + {TEST_2008_6_30_11_30_59_000000500, HOUR_OF_DAY, 14, + OffsetDateTime.of(2008, 6, 30, 14, 30, 59, 500, OFFSET_PONE)}, + {TEST_2008_6_30_11_30_59_000000500, OFFSET_SECONDS, -3600, + OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 500, OFFSET_MONE)}, + }; + }; + + @Test(dataProvider = "withFieldLong") + public void test_with_fieldLong(OffsetDateTime base, TemporalField setField, long setValue, OffsetDateTime expected) { + assertEquals(base.with(setField, setValue), expected); + } + //----------------------------------------------------------------------- // withYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withYear_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withYear(2007); @@ -725,7 +789,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withMonth(1); @@ -735,7 +799,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withDayOfMonth(15); @@ -745,18 +809,18 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfYear(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfYear_normal() { OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.withDayOfYear(33); assertEquals(t, OffsetDateTime.of(LocalDate.of(2008, 2, 2), LocalTime.of(11, 30, 59, 500), OFFSET_PONE)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_illegal() { TEST_2008_6_30_11_30_59_000000500.withDayOfYear(367); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_invalid() { OffsetDateTime.of(LocalDate.of(2007, 2, 2), LocalTime.of(11, 30), OFFSET_PONE).withDayOfYear(366); } @@ -764,7 +828,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withHour() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withHour_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withHour(15); @@ -774,7 +838,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMinute() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMinute_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withMinute(15); @@ -784,7 +848,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withSecond_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withSecond(15); @@ -794,7 +858,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withNano() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_normal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 1), OFFSET_PONE); OffsetDateTime test = base.withNano(15); @@ -804,14 +868,14 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // truncatedTo(TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_truncatedTo_normal() { assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(NANOS), TEST_2008_6_30_11_30_59_000000500); assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(SECONDS), TEST_2008_6_30_11_30_59_000000500.withNano(0)); assertEquals(TEST_2008_6_30_11_30_59_000000500.truncatedTo(DAYS), TEST_2008_6_30_11_30_59_000000500.with(LocalTime.MIDNIGHT)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_truncatedTo_null() { TEST_2008_6_30_11_30_59_000000500.truncatedTo(null); } @@ -819,7 +883,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(Period) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_Period() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(period); @@ -829,20 +893,20 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(Duration) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_Duration() { Duration dur = Duration.ofSeconds(62, 3); OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(dur); assertEquals(t, OffsetDateTime.of(2008, 6, 30, 11, 32, 1, 503, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_plus_Duration_zero() { OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(Duration.ZERO); assertEquals(t, TEST_2008_6_30_11_30_59_000000500); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_Duration_null() { TEST_2008_6_30_11_30_59_000000500.plus((Duration) null); } @@ -850,7 +914,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusYears() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusYears(1); @@ -860,7 +924,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMonths() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusMonths(1); @@ -870,7 +934,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusWeeks() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusWeeks() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusWeeks(1); @@ -880,7 +944,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusDays() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusDays() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusDays(1); @@ -890,7 +954,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusHours() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusHours(13); @@ -900,7 +964,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMinutes() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusMinutes(30); @@ -910,7 +974,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusSeconds() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusSeconds(1); @@ -920,7 +984,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusNanos() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.plusNanos(1); @@ -930,7 +994,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(Period) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_Period() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(period); @@ -940,20 +1004,20 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(Duration) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_Duration() { Duration dur = Duration.ofSeconds(62, 3); OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(dur); assertEquals(t, OffsetDateTime.of(2008, 6, 30, 11, 29, 57, 497, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_minus_Duration_zero() { OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(Duration.ZERO); assertEquals(t, TEST_2008_6_30_11_30_59_000000500); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_Duration_null() { TEST_2008_6_30_11_30_59_000000500.minus((Duration) null); } @@ -961,7 +1025,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusYears() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusYears(1); @@ -971,7 +1035,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMonths() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusMonths(1); @@ -981,7 +1045,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusWeeks() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusWeeks() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusWeeks(1); @@ -991,7 +1055,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusDays() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusDays() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusDays(1); @@ -1001,7 +1065,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusHours() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusHours(13); @@ -1011,7 +1075,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMinutes() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusMinutes(30); @@ -1021,7 +1085,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusSeconds() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusSeconds(1); @@ -1031,24 +1095,39 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusNanos() { OffsetDateTime base = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); OffsetDateTime test = base.minusNanos(1); assertEquals(test, OffsetDateTime.of(2008, 6, 30, 11, 30, 58, 999999999, OFFSET_PONE)); } + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); + String t = OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).format(f); + assertEquals(t, "2010 12 3 11 30 0"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).format(null); + } + //----------------------------------------------------------------------- // atZoneSameInstant() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atZone() { OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_MTWO); assertEquals(t.atZoneSameInstant(ZONE_PARIS), ZonedDateTime.of(2008, 6, 30, 15, 30, 0, 0, ZONE_PARIS)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atZone_nullTimeZone() { OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PTWO); t.atZoneSameInstant((ZoneId) null); @@ -1057,21 +1136,21 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // atZoneSimilarLocal() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atZoneSimilarLocal() { OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_MTWO); assertEquals(t.atZoneSimilarLocal(ZONE_PARIS), ZonedDateTime.of(2008, 6, 30, 11, 30, 0, 0, ZONE_PARIS)); } - @Test(groups={"tck"}) + @Test public void test_atZoneSimilarLocal_dstGap() { OffsetDateTime t = OffsetDateTime.of(2007, 4, 1, 0, 0, 0, 0, OFFSET_MTWO); assertEquals(t.atZoneSimilarLocal(ZONE_GAZA), ZonedDateTime.of(2007, 4, 1, 1, 0, 0, 0, ZONE_GAZA)); } - @Test(groups={"tck"}) + @Test public void test_atZone_dstOverlapSummer() { OffsetDateTime t = OffsetDateTime.of(2007, 10, 28, 2, 30, 0, 0, OFFSET_PTWO); assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).toLocalDateTime(), t.toLocalDateTime()); @@ -1079,7 +1158,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).getZone(), ZONE_PARIS); } - @Test(groups={"tck"}) + @Test public void test_atZone_dstOverlapWinter() { OffsetDateTime t = OffsetDateTime.of(2007, 10, 28, 2, 30, 0, 0, OFFSET_PONE); assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).toLocalDateTime(), t.toLocalDateTime()); @@ -1087,7 +1166,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(t.atZoneSimilarLocal(ZONE_PARIS).getZone(), ZONE_PARIS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_atZoneSimilarLocal_nullTimeZone() { OffsetDateTime t = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PTWO); t.atZoneSimilarLocal((ZoneId) null); @@ -1096,7 +1175,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toEpochSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toEpochSecond_afterEpoch() { for (int i = 0; i < 100000; i++) { OffsetDateTime a = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC).plusSeconds(i); @@ -1104,7 +1183,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_toEpochSecond_beforeEpoch() { for (int i = 0; i < 100000; i++) { OffsetDateTime a = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.UTC).minusSeconds(i); @@ -1115,7 +1194,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_compareTo_timeMins() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 29, 3, 0, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 2, 0, OFFSET_PONE); // a is before b due to time @@ -1126,7 +1205,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_timeSecs() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 29, 2, 0, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 29, 3, 0, OFFSET_PONE); // a is before b due to time @@ -1137,7 +1216,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_timeNanos() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 29, 40, 4, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 29, 40, 5, OFFSET_PONE); // a is before b due to time @@ -1148,7 +1227,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_offset() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PTWO); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 0, 0, OFFSET_PONE); // a is before b due to offset @@ -1159,7 +1238,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_offsetNanos() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 40, 6, OFFSET_PTWO); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 40, 5, OFFSET_PONE); // a is before b due to offset @@ -1170,7 +1249,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_both() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 50, 0, 0, OFFSET_PTWO); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 20, 0, 0, OFFSET_PONE); // a is before b on instant scale @@ -1181,7 +1260,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_bothNanos() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 20, 40, 4, OFFSET_PTWO); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 10, 20, 40, 5, OFFSET_PONE); // a is before b on instant scale @@ -1192,7 +1271,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_hourDifference() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 10, 0, 0, 0, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 0, 0, 0, OFFSET_PTWO); // a is before b despite being same time-line time @@ -1203,7 +1282,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(a.toInstant().compareTo(b.toInstant()) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_max() { OffsetDateTime a = OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 0, 0, OFFSET_MONE); OffsetDateTime b = OffsetDateTime.of(Year.MAX_VALUE, 12, 31, 23, 59, 0, 0, OFFSET_MTWO); // a is before b due to offset @@ -1213,7 +1292,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_min() { OffsetDateTime a = OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, OFFSET_PTWO); OffsetDateTime b = OffsetDateTime.of(Year.MIN_VALUE, 1, 1, 0, 0, 0, 0, OFFSET_PONE); // a is before b due to offset @@ -1223,13 +1302,13 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_null() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); a.compareTo(null); } - @Test(expectedExceptions=ClassCastException.class, groups={"tck"}) + @Test(expectedExceptions=ClassCastException.class) @SuppressWarnings({"unchecked", "rawtypes"}) public void compareToNonOffsetDateTime() { Comparable c = TEST_2008_6_30_11_30_59_000000500; @@ -1239,7 +1318,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isAfter() / isBefore() / isEqual() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual1() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 58, 3, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 2, OFFSET_PONE); // a is before b due to time @@ -1261,7 +1340,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual2() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 2, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 3, OFFSET_PONE); // a is before b due to time @@ -1283,7 +1362,7 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual_instantComparison() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 10, 0, 0, 0, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(2008, 6, 30, 11, 0, 0, 0, OFFSET_PTWO); // a is same instant as b @@ -1305,19 +1384,19 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_null() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); a.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isEqual_null() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); a.isEqual(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_null() { OffsetDateTime a = OffsetDateTime.of(2008, 6, 30, 11, 30, 59, 0, OFFSET_PONE); a.isAfter(null); @@ -1326,65 +1405,65 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_true(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); assertEquals(a.equals(b), true); assertEquals(a.hashCode() == b.hashCode(), true); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_year_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y + 1, o, d, h, m, s, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_hour_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { h = (h == 23 ? 22 : h); OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y, o, d, h + 1, m, s, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_minute_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { m = (m == 59 ? 58 : m); OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m + 1, s, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_second_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { s = (s == 59 ? 58 : s); OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s + 1, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_nano_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { n = (n == 999999999 ? 999999998 : n); OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s, n + 1, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_offset_differs(int y, int o, int d, int h, int m, int s, int n, ZoneOffset ignored) { OffsetDateTime a = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PONE); OffsetDateTime b = OffsetDateTime.of(y, o, d, h, m, s, n, OFFSET_PTWO); assertEquals(a.equals(b), false); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_2008_6_30_11_30_59_000000500.equals(TEST_2008_6_30_11_30_59_000000500), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_2008_6_30_11_30_59_000000500.equals("2007-07-15"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_2008_6_30_11_30_59_000000500.equals(null), false); } @@ -1406,26 +1485,11 @@ public class TCKOffsetDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int y, int o, int d, int h, int m, int s, int n, String offsetId, String expected) { OffsetDateTime t = OffsetDateTime.of(y, o, d, h, m, s, n, ZoneOffset.of(offsetId)); String str = t.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); - String t = OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).toString(f); - assertEquals(t, "2010 12 3 11 30 0"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - OffsetDateTime.of(2010, 12, 3, 11, 30, 0, 0, OFFSET_PONE).toString(null); - } - } diff --git a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java index 83117099be2..ff8ec88502e 100644 --- a/jdk/test/java/time/tck/java/time/TCKOffsetTime.java +++ b/jdk/test/java/time/tck/java/time/TCKOffsetTime.java @@ -81,6 +81,7 @@ import static java.time.temporal.ChronoUnit.SECONDS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; @@ -92,6 +93,7 @@ import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import java.time.OffsetDateTime; import java.time.OffsetTime; import java.time.Period; import java.time.ZoneId; @@ -102,7 +104,6 @@ import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalAdjuster; @@ -124,12 +125,13 @@ import test.java.time.MockSimplePeriod; @Test public class TCKOffsetTime extends AbstractDateTimeTest { + private static final ZoneId ZONE_GAZA = ZoneId.of("Asia/Gaza"); private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1); private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2); private static final LocalDate DATE = LocalDate.of(2008, 12, 3); private OffsetTime TEST_11_30_59_500_PONE; - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { TEST_11_30_59_500_PONE = OffsetTime.of(11, 30, 59, 500, OFFSET_PONE); } @@ -224,7 +226,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { ZonedDateTime nowDT = ZonedDateTime.now(); @@ -238,7 +240,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i, 8); @@ -252,7 +254,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_beforeEpoch() { for (int i =-1; i >= -(24 * 60 * 60); i--) { Instant instant = Instant.ofEpochSecond(i, 8); @@ -266,7 +268,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_offsets() { Instant base = LocalDateTime.of(1970, 1, 1, 12, 0).toInstant(ZoneOffset.UTC); for (int i = -9; i < 15; i++) { @@ -281,12 +283,12 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullZoneId() { OffsetTime.now((ZoneId) null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { OffsetTime.now((Clock) null); } @@ -309,26 +311,26 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_intsHMSN() { OffsetTime test = OffsetTime.of(11, 30, 10, 500, OFFSET_PONE); check(test, 11, 30, 10, 500, OFFSET_PONE); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_LocalTimeZoneOffset() { LocalTime localTime = LocalTime.of(11, 30, 10, 500); OffsetTime test = OffsetTime.of(localTime, OFFSET_PONE); check(test, 11, 30, 10, 500, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_LocalTimeZoneOffset_nullTime() { OffsetTime.of((LocalTime) null, OFFSET_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_LocalTimeZoneOffset_nullOffset() { LocalTime localTime = LocalTime.of(11, 30, 10, 500); OffsetTime.of(localTime, (ZoneOffset) null); @@ -337,18 +339,18 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofInstant() //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofInstant_nullInstant() { OffsetTime.ofInstant((Instant) null, ZoneOffset.UTC); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofInstant_nullOffset() { Instant instant = Instant.ofEpochSecond(0L); OffsetTime.ofInstant(instant, (ZoneOffset) null); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_allSecsInDay() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i, 8); @@ -360,7 +362,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_beforeEpoch() { for (int i =-1; i >= -(24 * 60 * 60); i--) { Instant instant = Instant.ofEpochSecond(i, 8); @@ -373,7 +375,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofInstant_maxYear() { OffsetTime test = OffsetTime.ofInstant(Instant.MAX, ZoneOffset.UTC); assertEquals(test.getHour(), 23); @@ -382,7 +384,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(test.getNano(), 999_999_999); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_minYear() { OffsetTime test = OffsetTime.ofInstant(Instant.MIN, ZoneOffset.UTC); assertEquals(test.getHour(), 0); @@ -394,23 +396,23 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from(TemporalAccessor) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_from_TemporalAccessor_OT() { assertEquals(OffsetTime.from(OffsetTime.of(17, 30, 0, 0, OFFSET_PONE)), OffsetTime.of(17, 30, 0, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_from_TemporalAccessor_ZDT() { ZonedDateTime base = LocalDateTime.of(2007, 7, 15, 11, 30, 59, 500).atZone(OFFSET_PONE); assertEquals(OffsetTime.from(base), TEST_11_30_59_500_PONE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_from_TemporalAccessor_invalid_noDerive() { OffsetTime.from(LocalDate.of(2007, 7, 15)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_from_TemporalAccessor_null() { OffsetTime.from((TemporalAccessor) null); } @@ -418,7 +420,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse() //----------------------------------------------------------------------- - @Test(dataProvider = "sampleToString", groups={"tck"}) + @Test(dataProvider = "sampleToString") public void factory_parse_validText(int h, int m, int s, int n, String offsetId, String parsable) { OffsetTime t = OffsetTime.parse(parsable); assertNotNull(t, parsable); @@ -440,23 +442,23 @@ public class TCKOffsetTime extends AbstractDateTimeTest { }; } - @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class}, groups={"tck"}) + @Test(dataProvider = "sampleBadParse", expectedExceptions={DateTimeParseException.class}) public void factory_parse_invalidText(String unparsable) { OffsetTime.parse(unparsable); } //-----------------------------------------------------------------------s - @Test(expectedExceptions={DateTimeParseException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeParseException.class}) public void factory_parse_illegalHour() { OffsetTime.parse("25:00+01:00"); } - @Test(expectedExceptions={DateTimeParseException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeParseException.class}) public void factory_parse_illegalMinute() { OffsetTime.parse("12:60+01:00"); } - @Test(expectedExceptions={DateTimeParseException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeParseException.class}) public void factory_parse_illegalSecond() { OffsetTime.parse("12:12:60+01:00"); } @@ -464,20 +466,20 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s XXX"); OffsetTime test = OffsetTime.parse("11 30 0 +01:00", f); assertEquals(test, OffsetTime.of(11, 30, 0, 0, ZoneOffset.ofHours(1))); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); OffsetTime.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { OffsetTime.parse("ANY", null); } @@ -485,7 +487,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // constructor //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void constructor_nullTime() throws Throwable { Constructor con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class); con.setAccessible(true); @@ -496,7 +498,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void constructor_nullOffset() throws Throwable { Constructor con = OffsetTime.class.getDeclaredConstructor(LocalTime.class, ZoneOffset.class); con.setAccessible(true); @@ -519,7 +521,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_get(int h, int m, int s, int n, ZoneOffset offset) { LocalTime localTime = LocalTime.of(h, m, s, n); OffsetTime a = OffsetTime.of(localTime, offset); @@ -568,13 +570,13 @@ public class TCKOffsetTime extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_11_30_59_500_PONE, Queries.chronology(), null}, - {TEST_11_30_59_500_PONE, Queries.zoneId(), null}, - {TEST_11_30_59_500_PONE, Queries.precision(), ChronoUnit.NANOS}, - {TEST_11_30_59_500_PONE, Queries.zone(), OFFSET_PONE}, - {TEST_11_30_59_500_PONE, Queries.offset(), OFFSET_PONE}, - {TEST_11_30_59_500_PONE, Queries.localDate(), null}, - {TEST_11_30_59_500_PONE, Queries.localTime(), LocalTime.of(11, 30, 59, 500)}, + {TEST_11_30_59_500_PONE, TemporalQuery.chronology(), null}, + {TEST_11_30_59_500_PONE, TemporalQuery.zoneId(), null}, + {TEST_11_30_59_500_PONE, TemporalQuery.precision(), ChronoUnit.NANOS}, + {TEST_11_30_59_500_PONE, TemporalQuery.zone(), OFFSET_PONE}, + {TEST_11_30_59_500_PONE, TemporalQuery.offset(), OFFSET_PONE}, + {TEST_11_30_59_500_PONE, TemporalQuery.localDate(), null}, + {TEST_11_30_59_500_PONE, TemporalQuery.localTime(), LocalTime.of(11, 30, 59, 500)}, }; } @@ -596,7 +598,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withOffsetSameLocal() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withOffsetSameLocal() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withOffsetSameLocal(OFFSET_PTWO); @@ -604,14 +606,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(test.getOffset(), OFFSET_PTWO); } - @Test(groups={"tck"}) + @Test public void test_withOffsetSameLocal_noChange() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withOffsetSameLocal(OFFSET_PONE); assertEquals(test, base); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_withOffsetSameLocal_null() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); base.withOffsetSameLocal(null); @@ -620,7 +622,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withOffsetSameInstant() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withOffsetSameInstant() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withOffsetSameInstant(OFFSET_PTWO); @@ -628,23 +630,62 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(test, expected); } - @Test(groups={"tck"}) + @Test public void test_withOffsetSameInstant_noChange() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withOffsetSameInstant(OFFSET_PONE); assertEquals(test, base); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_withOffsetSameInstant_null() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); base.withOffsetSameInstant(null); } + //----------------------------------------------------------------------- + // adjustInto(Temporal) + //----------------------------------------------------------------------- + @DataProvider(name="adjustInto") + Object[][] data_adjustInto() { + return new Object[][]{ + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.of(LocalTime.of(1, 1, 1, 100), ZoneOffset.UTC), OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), null}, + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.MAX, OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), null}, + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.MIN, OffsetTime.of(LocalTime.of(23 , 5), OFFSET_PONE), null}, + {OffsetTime.MAX, OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.of(OffsetTime.MAX.toLocalTime(), ZoneOffset.ofHours(-18)), null}, + {OffsetTime.MIN, OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetTime.of(OffsetTime.MIN.toLocalTime(), ZoneOffset.ofHours(18)), null}, + + + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), ZonedDateTime.of(LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), ZONE_GAZA), ZonedDateTime.of(LocalDateTime.of(2012, 3, 4, 23, 5), ZONE_GAZA), null}, + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), OffsetDateTime.of(LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), ZoneOffset.UTC), OffsetDateTime.of(LocalDateTime.of(2012, 3, 4, 23, 5), OFFSET_PONE), null}, + + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), LocalDateTime.of(2012, 3, 4, 1, 1, 1, 100), null, DateTimeException.class}, + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), LocalDate.of(2210, 2, 2), null, DateTimeException.class}, + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), LocalTime.of(22, 3, 0), null, DateTimeException.class}, + {OffsetTime.of(LocalTime.of(23, 5), OFFSET_PONE), null, null, NullPointerException.class}, + + }; + } + + @Test(dataProvider="adjustInto") + public void test_adjustInto(OffsetTime test, Temporal temporal, Temporal expected, Class expectedEx) { + if (expectedEx == null) { + Temporal result = test.adjustInto(temporal); + assertEquals(result, expected); + } else { + try { + Temporal result = test.adjustInto(temporal); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + //----------------------------------------------------------------------- // with(WithAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_adjustment() { final OffsetTime sample = OffsetTime.of(23, 5, 0, 0, OFFSET_PONE); TemporalAdjuster adjuster = new TemporalAdjuster() { @@ -656,25 +697,25 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(TEST_11_30_59_500_PONE.with(adjuster), sample); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_LocalTime() { OffsetTime test = TEST_11_30_59_500_PONE.with(LocalTime.of(13, 30)); assertEquals(test, OffsetTime.of(13, 30, 0, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_OffsetTime() { OffsetTime test = TEST_11_30_59_500_PONE.with(OffsetTime.of(13, 35, 0, 0, OFFSET_PTWO)); assertEquals(test, OffsetTime.of(13, 35, 0, 0, OFFSET_PTWO)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_ZoneOffset() { OffsetTime test = TEST_11_30_59_500_PONE.with(OFFSET_PTWO); assertEquals(test, OffsetTime.of(11, 30, 59, 500, OFFSET_PTWO)); } - @Test(groups={"tck"}) + @Test public void test_with_adjustment_AmPm() { OffsetTime test = TEST_11_30_59_500_PONE.with(new TemporalAdjuster() { @Override @@ -685,7 +726,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(test, OffsetTime.of(23, 30, 59, 500, OFFSET_PONE)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_adjustment_null() { TEST_11_30_59_500_PONE.with((TemporalAdjuster) null); } @@ -693,7 +734,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with(TemporalField, long) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_TemporalField() { OffsetTime test = OffsetTime.of(12, 30, 40, 987654321, OFFSET_PONE); assertEquals(test.with(ChronoField.HOUR_OF_DAY, 15), OffsetTime.of(15, 30, 40, 987654321, OFFSET_PONE)); @@ -706,12 +747,12 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(test.with(ChronoField.OFFSET_SECONDS, 7205), OffsetTime.of(12, 30, 40, 987654321, ZoneOffset.ofHoursMinutesSeconds(2, 0, 5))); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"} ) + @Test(expectedExceptions=NullPointerException.class ) public void test_with_TemporalField_null() { TEST_11_30_59_500_PONE.with((TemporalField) null, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"} ) + @Test(expectedExceptions=DateTimeException.class ) public void test_with_TemporalField_invalidField() { TEST_11_30_59_500_PONE.with(ChronoField.YEAR, 0); } @@ -719,14 +760,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withHour() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withHour_normal() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withHour(15); assertEquals(test, OffsetTime.of(15, 30, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_withHour_noChange() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withHour(11); @@ -736,14 +777,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMinute() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMinute_normal() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withMinute(15); assertEquals(test, OffsetTime.of(11, 15, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_withMinute_noChange() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withMinute(30); @@ -753,14 +794,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withSecond_normal() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withSecond(15); assertEquals(test, OffsetTime.of(11, 30, 15, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_withSecond_noChange() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.withSecond(59); @@ -770,14 +811,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withNano() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_normal() { OffsetTime base = OffsetTime.of(11, 30, 59, 1, OFFSET_PONE); OffsetTime test = base.withNano(15); assertEquals(test, OffsetTime.of(11, 30, 59, 15, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_noChange() { OffsetTime base = OffsetTime.of(11, 30, 59, 1, OFFSET_PONE); OffsetTime test = base.withNano(1); @@ -787,14 +828,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // truncatedTo(TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_truncatedTo_normal() { assertEquals(TEST_11_30_59_500_PONE.truncatedTo(NANOS), TEST_11_30_59_500_PONE); assertEquals(TEST_11_30_59_500_PONE.truncatedTo(SECONDS), TEST_11_30_59_500_PONE.withNano(0)); assertEquals(TEST_11_30_59_500_PONE.truncatedTo(DAYS), TEST_11_30_59_500_PONE.with(LocalTime.MIDNIGHT)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_truncatedTo_null() { TEST_11_30_59_500_PONE.truncatedTo(null); } @@ -802,26 +843,26 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(PlusAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plus_PlusAdjuster() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES); OffsetTime t = TEST_11_30_59_500_PONE.plus(period); assertEquals(t, OffsetTime.of(11, 37, 59, 500, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_plus_PlusAdjuster_noChange() { OffsetTime t = TEST_11_30_59_500_PONE.plus(MockSimplePeriod.of(0, SECONDS)); assertEquals(t, TEST_11_30_59_500_PONE); } - @Test(groups={"tck"}) + @Test public void test_plus_PlusAdjuster_zero() { OffsetTime t = TEST_11_30_59_500_PONE.plus(Period.ZERO); assertEquals(t, TEST_11_30_59_500_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_PlusAdjuster_null() { TEST_11_30_59_500_PONE.plus((TemporalAmount) null); } @@ -829,14 +870,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusHours() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusHours(13); assertEquals(test, OffsetTime.of(0, 30, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_plusHours_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusHours(0); @@ -846,14 +887,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMinutes() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusMinutes(30); assertEquals(test, OffsetTime.of(12, 0, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusMinutes(0); @@ -863,14 +904,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusSeconds() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusSeconds(1); assertEquals(test, OffsetTime.of(11, 31, 0, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusSeconds(0); @@ -880,14 +921,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusNanos() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusNanos(1); assertEquals(test, OffsetTime.of(11, 30, 59, 1, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.plusNanos(0); @@ -897,26 +938,26 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(MinusAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minus_MinusAdjuster() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MINUTES); OffsetTime t = TEST_11_30_59_500_PONE.minus(period); assertEquals(t, OffsetTime.of(11, 23, 59, 500, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_minus_MinusAdjuster_noChange() { OffsetTime t = TEST_11_30_59_500_PONE.minus(MockSimplePeriod.of(0, SECONDS)); assertEquals(t, TEST_11_30_59_500_PONE); } - @Test(groups={"tck"}) + @Test public void test_minus_MinusAdjuster_zero() { OffsetTime t = TEST_11_30_59_500_PONE.minus(Period.ZERO); assertEquals(t, TEST_11_30_59_500_PONE); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_MinusAdjuster_null() { TEST_11_30_59_500_PONE.minus((TemporalAmount) null); } @@ -924,14 +965,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusHours() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusHours(-13); assertEquals(test, OffsetTime.of(0, 30, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_minusHours_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusHours(0); @@ -941,14 +982,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMinutes() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusMinutes(50); assertEquals(test, OffsetTime.of(10, 40, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusMinutes(0); @@ -958,14 +999,14 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusSeconds() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusSeconds(60); assertEquals(test, OffsetTime.of(11, 29, 59, 0, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusSeconds(0); @@ -975,24 +1016,39 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusNanos() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusNanos(1); assertEquals(test, OffsetTime.of(11, 30, 58, 999999999, OFFSET_PONE)); } - @Test(groups={"tck"}) + @Test public void test_minusNanos_zero() { OffsetTime base = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); OffsetTime test = base.minusNanos(0); assertEquals(test, base); } + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s"); + String t = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).format(f); + assertEquals(t, "11 30 0"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).format(null); + } + //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_compareTo_time() { OffsetTime a = OffsetTime.of(11, 29, 0, 0, OFFSET_PONE); OffsetTime b = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE); // a is before b due to time @@ -1003,7 +1059,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_offset() { OffsetTime a = OffsetTime.of(11, 30, 0, 0, OFFSET_PTWO); OffsetTime b = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE); // a is before b due to offset @@ -1014,7 +1070,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_both() { OffsetTime a = OffsetTime.of(11, 50, 0, 0, OFFSET_PTWO); OffsetTime b = OffsetTime.of(11, 20, 0, 0, OFFSET_PONE); // a is before b on instant scale @@ -1025,7 +1081,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_bothNearStartOfDay() { OffsetTime a = OffsetTime.of(0, 10, 0, 0, OFFSET_PONE); OffsetTime b = OffsetTime.of(2, 30, 0, 0, OFFSET_PTWO); // a is before b on instant scale @@ -1036,7 +1092,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(convertInstant(a).compareTo(convertInstant(b)) < 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_hourDifference() { OffsetTime a = OffsetTime.of(10, 0, 0, 0, OFFSET_PONE); OffsetTime b = OffsetTime.of(11, 0, 0, 0, OFFSET_PTWO); // a is before b despite being same time-line time @@ -1047,13 +1103,13 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(convertInstant(a).compareTo(convertInstant(b)) == 0, true); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_null() { OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); a.compareTo(null); } - @Test(expectedExceptions=ClassCastException.class, groups={"tck"}) + @Test(expectedExceptions=ClassCastException.class) @SuppressWarnings({"unchecked", "rawtypes"}) public void compareToNonOffsetTime() { Comparable c = TEST_11_30_59_500_PONE; @@ -1067,7 +1123,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isAfter() / isBefore() / isEqual() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual1() { OffsetTime a = OffsetTime.of(11, 30, 58, 0, OFFSET_PONE); OffsetTime b = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); // a is before b due to time @@ -1089,7 +1145,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual1nanos() { OffsetTime a = OffsetTime.of(11, 30, 59, 3, OFFSET_PONE); OffsetTime b = OffsetTime.of(11, 30, 59, 4, OFFSET_PONE); // a is before b due to time @@ -1111,7 +1167,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual2() { OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PTWO); OffsetTime b = OffsetTime.of(11, 30, 58, 0, OFFSET_PONE); // a is before b due to offset @@ -1133,7 +1189,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual2nanos() { OffsetTime a = OffsetTime.of(11, 30, 59, 4, ZoneOffset.ofTotalSeconds(OFFSET_PONE.getTotalSeconds() + 1)); OffsetTime b = OffsetTime.of(11, 30, 59, 3, OFFSET_PONE); // a is before b due to offset @@ -1155,7 +1211,7 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(groups={"tck"}) + @Test public void test_isBeforeIsAfterIsEqual_instantComparison() { OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PTWO); OffsetTime b = OffsetTime.of(10, 30, 59, 0, OFFSET_PONE); // a is same instant as b @@ -1177,19 +1233,19 @@ public class TCKOffsetTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_null() { OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); a.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_null() { OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); a.isAfter(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isEqual_null() { OffsetTime a = OffsetTime.of(11, 30, 59, 0, OFFSET_PONE); a.isEqual(null); @@ -1198,59 +1254,59 @@ public class TCKOffsetTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_true(int h, int m, int s, int n, ZoneOffset ignored) { OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE); OffsetTime b = OffsetTime.of(h, m, s, n, OFFSET_PONE); assertEquals(a.equals(b), true); assertEquals(a.hashCode() == b.hashCode(), true); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_hour_differs(int h, int m, int s, int n, ZoneOffset ignored) { h = (h == 23 ? 22 : h); OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE); OffsetTime b = OffsetTime.of(h + 1, m, s, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_minute_differs(int h, int m, int s, int n, ZoneOffset ignored) { m = (m == 59 ? 58 : m); OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE); OffsetTime b = OffsetTime.of(h, m + 1, s, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_second_differs(int h, int m, int s, int n, ZoneOffset ignored) { s = (s == 59 ? 58 : s); OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE); OffsetTime b = OffsetTime.of(h, m, s + 1, n, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_nano_differs(int h, int m, int s, int n, ZoneOffset ignored) { n = (n == 999999999 ? 999999998 : n); OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE); OffsetTime b = OffsetTime.of(h, m, s, n + 1, OFFSET_PONE); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_offset_differs(int h, int m, int s, int n, ZoneOffset ignored) { OffsetTime a = OffsetTime.of(h, m, s, n, OFFSET_PONE); OffsetTime b = OffsetTime.of(h, m, s, n, OFFSET_PTWO); assertEquals(a.equals(b), false); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_11_30_59_500_PONE.equals(TEST_11_30_59_500_PONE), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_11_30_59_500_PONE.equals("2007-07-15"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_11_30_59_500_PONE.equals(null), false); } @@ -1272,26 +1328,11 @@ public class TCKOffsetTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int h, int m, int s, int n, String offsetId, String expected) { OffsetTime t = OffsetTime.of(h, m, s, n, ZoneOffset.of(offsetId)); String str = t.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("H m s"); - String t = OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).toString(f); - assertEquals(t, "11 30 0"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - OffsetTime.of(11, 30, 0, 0, OFFSET_PONE).toString(null); - } - } diff --git a/jdk/test/java/time/tck/java/time/TCKPeriod.java b/jdk/test/java/time/tck/java/time/TCKPeriod.java index 7399b50054e..95907b237a7 100644 --- a/jdk/test/java/time/tck/java/time/TCKPeriod.java +++ b/jdk/test/java/time/tck/java/time/TCKPeriod.java @@ -59,14 +59,21 @@ */ package tck.java.time; +import static java.time.temporal.ChronoUnit.DAYS; +import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import java.time.DateTimeException; +import java.time.Duration; import java.time.LocalDate; import java.time.Period; import java.time.format.DateTimeParseException; import java.time.temporal.ChronoUnit; +import java.time.temporal.Temporal; +import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalUnit; +import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Locale; @@ -138,6 +145,78 @@ public class TCKPeriod extends AbstractTCKTest { assertPeriod(Period.of(-1, -2, -3), -1, -2, -3); } + //----------------------------------------------------------------------- + // from(TemporalAmount) + //----------------------------------------------------------------------- + @Test + public void factory_from_TemporalAmount_Period() { + TemporalAmount amount = Period.of(1, 2, 3); + assertPeriod(Period.from(amount), 1, 2, 3); + } + + @Test + public void factory_from_TemporalAmount_YearsDays() { + TemporalAmount amount = new TemporalAmount() { + @Override + public long get(TemporalUnit unit) { + if (unit == YEARS) { + return 23; + } else { + return 45; + } + } + @Override + public List getUnits() { + List list = new ArrayList<>(); + list.add(YEARS); + list.add(DAYS); + return list; + } + @Override + public Temporal addTo(Temporal temporal) { + throw new UnsupportedOperationException(); + } + @Override + public Temporal subtractFrom(Temporal temporal) { + throw new UnsupportedOperationException(); + } + }; + assertPeriod(Period.from(amount), 23, 0, 45); + } + + @Test(expectedExceptions = ArithmeticException.class) + public void factory_from_TemporalAmount_Years_tooBig() { + TemporalAmount amount = new TemporalAmount() { + @Override + public long get(TemporalUnit unit) { + return ((long) (Integer.MAX_VALUE)) + 1; + } + @Override + public List getUnits() { + return Collections.singletonList(YEARS); + } + @Override + public Temporal addTo(Temporal temporal) { + throw new UnsupportedOperationException(); + } + @Override + public Temporal subtractFrom(Temporal temporal) { + throw new UnsupportedOperationException(); + } + }; + Period.from(amount); + } + + @Test(expectedExceptions = DateTimeException.class) + public void factory_from_TemporalAmount_Duration() { + Period.from(Duration.ZERO); + } + + @Test(expectedExceptions = NullPointerException.class) + public void factory_from_TemporalAmount_null() { + Period.from(null); + } + //----------------------------------------------------------------------- // parse(String) //----------------------------------------------------------------------- @@ -465,6 +544,32 @@ public class TCKPeriod extends AbstractTCKTest { assertPeriod(Period.of(1, 2, 3).withDays(0), 1, 2, 0); } + //----------------------------------------------------------------------- + // plus(Period) + //----------------------------------------------------------------------- + @DataProvider(name="plus") + Object[][] data_plus() { + return new Object[][] { + {pymd(0, 0, 0), pymd(0, 0, 0), pymd(0, 0, 0)}, + {pymd(0, 0, 0), pymd(5, 0, 0), pymd(5, 0, 0)}, + {pymd(0, 0, 0), pymd(-5, 0, 0), pymd(-5, 0, 0)}, + {pymd(0, 0, 0), pymd(0, 5, 0), pymd(0, 5, 0)}, + {pymd(0, 0, 0), pymd(0, -5, 0), pymd(0, -5, 0)}, + {pymd(0, 0, 0), pymd(0, 0, 5), pymd(0, 0, 5)}, + {pymd(0, 0, 0), pymd(0, 0, -5), pymd(0, 0, -5)}, + {pymd(0, 0, 0), pymd(2, 3, 4), pymd(2, 3, 4)}, + {pymd(0, 0, 0), pymd(-2, -3, -4), pymd(-2, -3, -4)}, + + {pymd(4, 5, 6), pymd(2, 3, 4), pymd(6, 8, 10)}, + {pymd(4, 5, 6), pymd(-2, -3, -4), pymd(2, 2, 2)}, + }; + } + + @Test(dataProvider="plus") + public void test_plus(Period base, Period add, Period expected) { + assertEquals(base.plus(add), expected); + } + //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- @@ -474,6 +579,11 @@ public class TCKPeriod extends AbstractTCKTest { assertPeriod(Period.of(1, 2, 3).plusYears(10), 11, 2, 3); assertPeriod(Period.of(1, 2, 3).plusYears(-10), -9, 2, 3); assertPeriod(Period.of(1, 2, 3).plusYears(-1), 0, 2, 3); + + assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(0)), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(10)), 11, 2, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(-10)), -9, 2, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofYears(-1)), 0, 2, 3); } @Test(expectedExceptions=ArithmeticException.class) @@ -497,6 +607,11 @@ public class TCKPeriod extends AbstractTCKTest { assertPeriod(Period.of(1, 2, 3).plusMonths(10), 1, 12, 3); assertPeriod(Period.of(1, 2, 3).plusMonths(-10), 1, -8, 3); assertPeriod(Period.of(1, 2, 3).plusMonths(-2), 1, 0, 3); + + assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(0)), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(10)), 1, 12, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(-10)), 1, -8, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofMonths(-2)), 1, 0, 3); } @Test(expectedExceptions=ArithmeticException.class) @@ -520,6 +635,11 @@ public class TCKPeriod extends AbstractTCKTest { assertPeriod(Period.of(1, 2, 3).plusDays(10), 1, 2, 13); assertPeriod(Period.of(1, 2, 3).plusDays(-10), 1, 2, -7); assertPeriod(Period.of(1, 2, 3).plusDays(-3), 1, 2, 0); + + assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(0)), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(10)), 1, 2, 13); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(-10)), 1, 2, -7); + assertPeriod(Period.of(1, 2, 3).plus(Period.ofDays(-3)), 1, 2, 0); } @Test(expectedExceptions=ArithmeticException.class) @@ -534,6 +654,116 @@ public class TCKPeriod extends AbstractTCKTest { test.plusDays(-1); } + //----------------------------------------------------------------------- + // minus(Period) + //----------------------------------------------------------------------- + @DataProvider(name="minus") + Object[][] data_minus() { + return new Object[][] { + {pymd(0, 0, 0), pymd(0, 0, 0), pymd(0, 0, 0)}, + {pymd(0, 0, 0), pymd(5, 0, 0), pymd(-5, 0, 0)}, + {pymd(0, 0, 0), pymd(-5, 0, 0), pymd(5, 0, 0)}, + {pymd(0, 0, 0), pymd(0, 5, 0), pymd(0, -5, 0)}, + {pymd(0, 0, 0), pymd(0, -5, 0), pymd(0, 5, 0)}, + {pymd(0, 0, 0), pymd(0, 0, 5), pymd(0, 0, -5)}, + {pymd(0, 0, 0), pymd(0, 0, -5), pymd(0, 0, 5)}, + {pymd(0, 0, 0), pymd(2, 3, 4), pymd(-2, -3, -4)}, + {pymd(0, 0, 0), pymd(-2, -3, -4), pymd(2, 3, 4)}, + + {pymd(4, 5, 6), pymd(2, 3, 4), pymd(2, 2, 2)}, + {pymd(4, 5, 6), pymd(-2, -3, -4), pymd(6, 8, 10)}, + }; + } + + @Test(dataProvider="minus") + public void test_minus(Period base, Period subtract, Period expected) { + assertEquals(base.minus(subtract), expected); + } + + //----------------------------------------------------------------------- + // minusYears() + //----------------------------------------------------------------------- + @Test + public void test_minusYears() { + assertPeriod(Period.of(1, 2, 3).minusYears(0), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).minusYears(10), -9, 2, 3); + assertPeriod(Period.of(1, 2, 3).minusYears(-10), 11, 2, 3); + assertPeriod(Period.of(1, 2, 3).minusYears(-1), 2, 2, 3); + + assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(0)), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(10)), -9, 2, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(-10)), 11, 2, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofYears(-1)), 2, 2, 3); + } + + @Test(expectedExceptions=ArithmeticException.class) + public void test_minusYears_overflowTooBig() { + Period test = Period.ofYears(Integer.MAX_VALUE); + test.minusYears(-1); + } + + @Test(expectedExceptions=ArithmeticException.class) + public void test_minusYears_overflowTooSmall() { + Period test = Period.ofYears(Integer.MIN_VALUE); + test.minusYears(1); + } + + //----------------------------------------------------------------------- + // minusMonths() + //----------------------------------------------------------------------- + @Test + public void test_minusMonths() { + assertPeriod(Period.of(1, 2, 3).minusMonths(0), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).minusMonths(10), 1, -8, 3); + assertPeriod(Period.of(1, 2, 3).minusMonths(-10), 1, 12, 3); + assertPeriod(Period.of(1, 2, 3).minusMonths(-2), 1, 4, 3); + + assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(0)), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(10)), 1, -8, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(-10)), 1, 12, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofMonths(-2)), 1, 4, 3); + } + + @Test(expectedExceptions=ArithmeticException.class) + public void test_minusMonths_overflowTooBig() { + Period test = Period.ofMonths(Integer.MAX_VALUE); + test.minusMonths(-1); + } + + @Test(expectedExceptions=ArithmeticException.class) + public void test_minusMonths_overflowTooSmall() { + Period test = Period.ofMonths(Integer.MIN_VALUE); + test.minusMonths(1); + } + + //----------------------------------------------------------------------- + // minusDays() + //----------------------------------------------------------------------- + @Test + public void test_minusDays() { + assertPeriod(Period.of(1, 2, 3).minusDays(0), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).minusDays(10), 1, 2, -7); + assertPeriod(Period.of(1, 2, 3).minusDays(-10), 1, 2, 13); + assertPeriod(Period.of(1, 2, 3).minusDays(-3), 1, 2, 6); + + assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(0)), 1, 2, 3); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(10)), 1, 2, -7); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(-10)), 1, 2, 13); + assertPeriod(Period.of(1, 2, 3).minus(Period.ofDays(-3)), 1, 2, 6); + } + + @Test(expectedExceptions=ArithmeticException.class) + public void test_minusDays_overflowTooBig() { + Period test = Period.ofDays(Integer.MAX_VALUE); + test.minusDays(-1); + } + + @Test(expectedExceptions=ArithmeticException.class) + public void test_minusDays_overflowTooSmall() { + Period test = Period.ofDays(Integer.MIN_VALUE); + test.minusDays(1); + } + //----------------------------------------------------------------------- // multipliedBy() //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/TCKYear.java b/jdk/test/java/time/tck/java/time/TCKYear.java index 3f0e653f8cf..570946f3239 100644 --- a/jdk/test/java/time/tck/java/time/TCKYear.java +++ b/jdk/test/java/time/tck/java/time/TCKYear.java @@ -62,6 +62,14 @@ package tck.java.time; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; +import static java.time.temporal.ChronoUnit.CENTURIES; +import static java.time.temporal.ChronoUnit.DAYS; +import static java.time.temporal.ChronoUnit.DECADES; +import static java.time.temporal.ChronoUnit.HOURS; +import static java.time.temporal.ChronoUnit.MILLENNIA; +import static java.time.temporal.ChronoUnit.MONTHS; +import static java.time.temporal.ChronoUnit.WEEKS; +import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; @@ -69,12 +77,14 @@ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.time.Clock; import java.time.DateTimeException; +import java.time.Duration; import java.time.Instant; import java.time.LocalDate; import java.time.LocalTime; import java.time.Month; import java.time.MonthDay; import java.time.OffsetDateTime; +import java.time.Period; import java.time.Year; import java.time.YearMonth; import java.time.ZoneId; @@ -85,11 +95,13 @@ import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; +import java.time.temporal.TemporalUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -159,7 +171,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { Year expected = Year.now(Clock.systemDefaultZone()); Year test = Year.now(); @@ -176,12 +188,12 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { Year.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); Year expected = Year.now(Clock.system(zone)); @@ -199,7 +211,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock() { Instant instant = OffsetDateTime.of(LocalDate.of(2010, 12, 31), LocalTime.of(0, 0), ZoneOffset.UTC).toInstant(); Clock clock = Clock.fixed(instant, ZoneOffset.UTC); @@ -207,13 +219,13 @@ public class TCKYear extends AbstractDateTimeTest { assertEquals(test.getValue(), 2010); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { Year.now((Clock) null); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_int_singleton() { for (int i = -4; i <= 2104; i++) { Year test = Year.of(i); @@ -222,28 +234,28 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_tooLow() { Year.of(Year.MIN_VALUE - 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_tooHigh() { Year.of(Year.MAX_VALUE + 1); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(Year.from(LocalDate.of(2007, 7, 15)), Year.of(2007)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { Year.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_CalendricalObject_null() { Year.from((TemporalAccessor) null); } @@ -268,7 +280,7 @@ public class TCKYear extends AbstractDateTimeTest { }; } - @Test(dataProvider="goodParseData", groups={"tck"}) + @Test(dataProvider="goodParseData") public void factory_parse_success(String text, Year expected) { Year year = Year.parse(text); assertEquals(year, expected); @@ -295,7 +307,7 @@ public class TCKYear extends AbstractDateTimeTest { }; } - @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class) public void factory_parse_fail(String text, int pos) { try { Year.parse(text); @@ -307,7 +319,7 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { Year.parse(null); } @@ -315,20 +327,20 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y"); Year test = Year.parse("2010", f); assertEquals(test, Year.of(2010)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y"); Year.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { Year.parse("ANY", null); } @@ -356,13 +368,13 @@ public class TCKYear extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_2008, Queries.chronology(), IsoChronology.INSTANCE}, - {TEST_2008, Queries.zoneId(), null}, - {TEST_2008, Queries.precision(), ChronoUnit.YEARS}, - {TEST_2008, Queries.zone(), null}, - {TEST_2008, Queries.offset(), null}, - {TEST_2008, Queries.localDate(), null}, - {TEST_2008, Queries.localTime(), null}, + {TEST_2008, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {TEST_2008, TemporalQuery.zoneId(), null}, + {TEST_2008, TemporalQuery.precision(), ChronoUnit.YEARS}, + {TEST_2008, TemporalQuery.zone(), null}, + {TEST_2008, TemporalQuery.offset(), null}, + {TEST_2008, TemporalQuery.localDate(), null}, + {TEST_2008, TemporalQuery.localTime(), null}, }; } @@ -384,7 +396,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isLeap() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isLeap() { assertEquals(Year.of(1999).isLeap(), false); assertEquals(Year.of(2000).isLeap(), true); @@ -422,10 +434,52 @@ public class TCKYear extends AbstractDateTimeTest { assertEquals(Year.of(500).isLeap(), false); } + //----------------------------------------------------------------------- + // plus(Period) + //----------------------------------------------------------------------- + @DataProvider(name="plusValid") + Object[][] data_plusValid() { + return new Object[][] { + {2012, Period.ofYears(0), 2012}, + {2012, Period.ofYears(1), 2013}, + {2012, Period.ofYears(2), 2014}, + {2012, Period.ofYears(-2), 2010}, + }; + } + + @Test(dataProvider="plusValid") + public void test_plusValid(int year, TemporalAmount amount, int expected) { + assertEquals(Year.of(year).plus(amount), Year.of(expected)); + } + + @DataProvider(name="plusInvalidUnit") + Object[][] data_plusInvalidUnit() { + return new Object[][] { + {Period.of(0, 1, 0)}, + {Period.of(0, 0, 1)}, + {Period.of(0, 1, 1)}, + {Period.of(1, 1, 1)}, + {Duration.ofDays(1)}, + {Duration.ofHours(1)}, + {Duration.ofMinutes(1)}, + {Duration.ofSeconds(1)}, + }; + } + + @Test(dataProvider="plusInvalidUnit", expectedExceptions=UnsupportedTemporalTypeException.class) + public void test_plusInvalidUnit(TemporalAmount amount) { + TEST_2008.plus(amount); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_plus_null() { + TEST_2008.plus(null); + } + //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusYears() { assertEquals(Year.of(2007).plusYears(-1), Year.of(2006)); assertEquals(Year.of(2007).plusYears(0), Year.of(2007)); @@ -439,42 +493,84 @@ public class TCKYear extends AbstractDateTimeTest { assertEquals(Year.of(Year.MIN_VALUE).plusYears(0), Year.of(Year.MIN_VALUE)); } - @Test(groups={"tck"}) + @Test public void test_plusYear_zero_equals() { Year base = Year.of(2007); assertEquals(base.plusYears(0), base); } - @Test(groups={"tck"}) + @Test public void test_plusYears_big() { long years = 20L + Year.MAX_VALUE; assertEquals(Year.of(-40).plusYears(years), Year.of((int) (-40L + years))); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_max() { Year.of(Year.MAX_VALUE).plusYears(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_maxLots() { Year.of(Year.MAX_VALUE).plusYears(1000); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_min() { Year.of(Year.MIN_VALUE).plusYears(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_minLots() { Year.of(Year.MIN_VALUE).plusYears(-1000); } + //----------------------------------------------------------------------- + // minus(Period) + //----------------------------------------------------------------------- + @DataProvider(name="minusValid") + Object[][] data_minusValid() { + return new Object[][] { + {2012, Period.ofYears(0), 2012}, + {2012, Period.ofYears(1), 2011}, + {2012, Period.ofYears(2), 2010}, + {2012, Period.ofYears(-2), 2014}, + }; + } + + @Test(dataProvider="minusValid") + public void test_minusValid(int year, TemporalAmount amount, int expected) { + assertEquals(Year.of(year).minus(amount), Year.of(expected)); + } + + @DataProvider(name="minusInvalidUnit") + Object[][] data_minusInvalidUnit() { + return new Object[][] { + {Period.of(0, 1, 0)}, + {Period.of(0, 0, 1)}, + {Period.of(0, 1, 1)}, + {Period.of(1, 1, 1)}, + {Duration.ofDays(1)}, + {Duration.ofHours(1)}, + {Duration.ofMinutes(1)}, + {Duration.ofSeconds(1)}, + }; + } + + @Test(dataProvider="minusInvalidUnit", expectedExceptions=UnsupportedTemporalTypeException.class) + public void test_minusInvalidUnit(TemporalAmount amount) { + TEST_2008.minus(amount); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_minus_null() { + TEST_2008.minus(null); + } + //----------------------------------------------------------------------- // minusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusYears() { assertEquals(Year.of(2007).minusYears(-1), Year.of(2008)); assertEquals(Year.of(2007).minusYears(0), Year.of(2007)); @@ -488,34 +584,34 @@ public class TCKYear extends AbstractDateTimeTest { assertEquals(Year.of(Year.MIN_VALUE).minusYears(0), Year.of(Year.MIN_VALUE)); } - @Test(groups={"tck"}) + @Test public void test_minusYear_zero_equals() { Year base = Year.of(2007); assertEquals(base.minusYears(0), base); } - @Test(groups={"tck"}) + @Test public void test_minusYears_big() { long years = 20L + Year.MAX_VALUE; assertEquals(Year.of(40).minusYears(years), Year.of((int) (40L - years))); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_max() { Year.of(Year.MAX_VALUE).minusYears(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_maxLots() { Year.of(Year.MAX_VALUE).minusYears(-1000); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_min() { Year.of(Year.MIN_VALUE).minusYears(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_minLots() { Year.of(Year.MIN_VALUE).minusYears(1000); } @@ -523,7 +619,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // adjustInto() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjustDate() { LocalDate base = LocalDate.of(2007, 2, 12); for (int i = -4; i <= 2104; i++) { @@ -532,13 +628,13 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_adjustDate_resolve() { Year test = Year.of(2011); assertEquals(test.adjustInto(LocalDate.of(2012, 2, 29)), LocalDate.of(2011, 2, 28)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_adjustDate_nullLocalDate() { Year test = Year.of(1); test.adjustInto((LocalDate) null); @@ -547,7 +643,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // length() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_length() { assertEquals(Year.of(1999).length(), 365); assertEquals(Year.of(2000).length(), 366); @@ -605,6 +701,99 @@ public class TCKYear extends AbstractDateTimeTest { assertEquals(year.isValidMonthDay(monthDay), expected); } + //----------------------------------------------------------------------- + // periodUntil(Temporal, TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name="periodUntilUnit") + Object[][] data_periodUntilUnit() { + return new Object[][] { + {Year.of(2000), Year.of(-1), YEARS, -2001}, + {Year.of(2000), Year.of(0), YEARS, -2000}, + {Year.of(2000), Year.of(1), YEARS, -1999}, + {Year.of(2000), Year.of(1998), YEARS, -2}, + {Year.of(2000), Year.of(1999), YEARS, -1}, + {Year.of(2000), Year.of(2000), YEARS, 0}, + {Year.of(2000), Year.of(2001), YEARS, 1}, + {Year.of(2000), Year.of(2002), YEARS, 2}, + {Year.of(2000), Year.of(2246), YEARS, 246}, + + {Year.of(2000), Year.of(-1), DECADES, -200}, + {Year.of(2000), Year.of(0), DECADES, -200}, + {Year.of(2000), Year.of(1), DECADES, -199}, + {Year.of(2000), Year.of(1989), DECADES, -1}, + {Year.of(2000), Year.of(1990), DECADES, -1}, + {Year.of(2000), Year.of(1991), DECADES, 0}, + {Year.of(2000), Year.of(2000), DECADES, 0}, + {Year.of(2000), Year.of(2009), DECADES, 0}, + {Year.of(2000), Year.of(2010), DECADES, 1}, + {Year.of(2000), Year.of(2011), DECADES, 1}, + + {Year.of(2000), Year.of(-1), CENTURIES, -20}, + {Year.of(2000), Year.of(0), CENTURIES, -20}, + {Year.of(2000), Year.of(1), CENTURIES, -19}, + {Year.of(2000), Year.of(1899), CENTURIES, -1}, + {Year.of(2000), Year.of(1900), CENTURIES, -1}, + {Year.of(2000), Year.of(1901), CENTURIES, 0}, + {Year.of(2000), Year.of(2000), CENTURIES, 0}, + {Year.of(2000), Year.of(2099), CENTURIES, 0}, + {Year.of(2000), Year.of(2100), CENTURIES, 1}, + {Year.of(2000), Year.of(2101), CENTURIES, 1}, + + {Year.of(2000), Year.of(-1), MILLENNIA, -2}, + {Year.of(2000), Year.of(0), MILLENNIA, -2}, + {Year.of(2000), Year.of(1), MILLENNIA, -1}, + {Year.of(2000), Year.of(999), MILLENNIA, -1}, + {Year.of(2000), Year.of(1000), MILLENNIA, -1}, + {Year.of(2000), Year.of(1001), MILLENNIA, 0}, + {Year.of(2000), Year.of(2000), MILLENNIA, 0}, + {Year.of(2000), Year.of(2999), MILLENNIA, 0}, + {Year.of(2000), Year.of(3000), MILLENNIA, 1}, + {Year.of(2000), Year.of(3001), MILLENNIA, 1}, + }; + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit(Year year1, Year year2, TemporalUnit unit, long expected) { + long amount = year1.periodUntil(year2, unit); + assertEquals(amount, expected); + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit_negated(Year year1, Year year2, TemporalUnit unit, long expected) { + long amount = year2.periodUntil(year1, unit); + assertEquals(amount, -expected); + } + + @Test(expectedExceptions = UnsupportedTemporalTypeException.class) + public void test_periodUntil_TemporalUnit_unsupportedUnit() { + TEST_2008.periodUntil(TEST_2008, MONTHS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullEnd() { + TEST_2008.periodUntil(null, DAYS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullUnit() { + TEST_2008.periodUntil(TEST_2008, null); + } + + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("y"); + String t = Year.of(2010).format(f); + assertEquals(t, "2010"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + Year.of(2010).format(null); + } + //----------------------------------------------------------------------- // atMonth(Month) //----------------------------------------------------------------------- @@ -636,7 +825,7 @@ public class TCKYear extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - // atMonthDay(Month) + // atMonthDay(MonthDay) //----------------------------------------------------------------------- @DataProvider(name="atMonthDay") Object[][] data_atMonthDay() { @@ -661,7 +850,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // atDay(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_atDay_notLeapYear() { Year test = Year.of(2007); LocalDate expected = LocalDate.of(2007, 1, 1); @@ -671,13 +860,13 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atDay_notLeapYear_day366() { Year test = Year.of(2007); test.atDay(366); } - @Test(groups={"tck"}) + @Test public void test_atDay_leapYear() { Year test = Year.of(2008); LocalDate expected = LocalDate.of(2008, 1, 1); @@ -687,13 +876,13 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atDay_day0() { Year test = Year.of(2007); test.atDay(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_atDay_day367() { Year test = Year.of(2007); test.atDay(367); @@ -702,7 +891,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_compareTo() { for (int i = -4; i <= 2104; i++) { Year a = Year.of(i); @@ -734,7 +923,7 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_nullYear() { Year doy = null; Year test = Year.of(1); @@ -744,7 +933,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals() { for (int i = -4; i <= 2104; i++) { Year a = Year.of(i); @@ -756,20 +945,20 @@ public class TCKYear extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_equals_same() { Year test = Year.of(2011); assertEquals(test.equals(test), true); } - @Test(groups={"tck"}) + @Test public void test_equals_nullYear() { Year doy = null; Year test = Year.of(1); assertEquals(test.equals(doy), false); } - @Test(groups={"tck"}) + @Test public void test_equals_incorrectType() { Year test = Year.of(1); assertEquals(test.equals("Incorrect type"), false); @@ -778,7 +967,7 @@ public class TCKYear extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString() { for (int i = -4; i <= 2104; i++) { Year a = Year.of(i); @@ -786,19 +975,4 @@ public class TCKYear extends AbstractDateTimeTest { } } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("y"); - String t = Year.of(2010).toString(f); - assertEquals(t, "2010"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - Year.of(2010).toString(null); - } - } diff --git a/jdk/test/java/time/tck/java/time/TCKYearMonth.java b/jdk/test/java/time/tck/java/time/TCKYearMonth.java index 3369daccca2..8cbf6c472ca 100644 --- a/jdk/test/java/time/tck/java/time/TCKYearMonth.java +++ b/jdk/test/java/time/tck/java/time/TCKYearMonth.java @@ -59,11 +59,19 @@ */ package tck.java.time; -import static java.time.temporal.ChronoField.EPOCH_MONTH; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; +import static java.time.temporal.ChronoUnit.CENTURIES; +import static java.time.temporal.ChronoUnit.DAYS; +import static java.time.temporal.ChronoUnit.DECADES; +import static java.time.temporal.ChronoUnit.HOURS; +import static java.time.temporal.ChronoUnit.MILLENNIA; +import static java.time.temporal.ChronoUnit.MONTHS; +import static java.time.temporal.ChronoUnit.WEEKS; +import static java.time.temporal.ChronoUnit.YEARS; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; @@ -78,6 +86,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; import java.time.Month; +import java.time.Period; import java.time.Year; import java.time.YearMonth; import java.time.ZoneId; @@ -88,10 +97,11 @@ import java.time.format.DateTimeParseException; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; +import java.time.temporal.TemporalUnit; +import java.time.temporal.UnsupportedTemporalTypeException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; @@ -110,7 +120,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { private YearMonth TEST_2008_06; - @BeforeMethod(groups={"tck", "implementation"}) + @BeforeMethod public void setUp() { TEST_2008_06 = YearMonth.of(2008, 6); } @@ -126,7 +136,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { protected List validFields() { TemporalField[] array = { MONTH_OF_YEAR, - EPOCH_MONTH, + PROLEPTIC_MONTH, YEAR_OF_ERA, YEAR, ERA, @@ -171,7 +181,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { YearMonth expected = YearMonth.now(Clock.systemDefaultZone()); YearMonth test = YearMonth.now(); @@ -188,12 +198,12 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { YearMonth.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); YearMonth expected = YearMonth.now(Clock.system(zone)); @@ -211,7 +221,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now_Clock() { Instant instant = LocalDateTime.of(2010, 12, 31, 0, 0).toInstant(ZoneOffset.UTC); Clock clock = Clock.fixed(instant, ZoneOffset.UTC); @@ -220,72 +230,72 @@ public class TCKYearMonth extends AbstractDateTimeTest { assertEquals(test.getMonth(), Month.DECEMBER); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { YearMonth.now((Clock) null); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_intsMonth() { YearMonth test = YearMonth.of(2008, Month.FEBRUARY); check(test, 2008, 2); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_intsMonth_yearTooLow() { YearMonth.of(Year.MIN_VALUE - 1, Month.JANUARY); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_intsMonth_dayTooHigh() { YearMonth.of(Year.MAX_VALUE + 1, Month.JANUARY); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_intsMonth_nullMonth() { YearMonth.of(2008, null); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ints() { YearMonth test = YearMonth.of(2008, 2); check(test, 2008, 2); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_yearTooLow() { YearMonth.of(Year.MIN_VALUE - 1, 2); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_dayTooHigh() { YearMonth.of(Year.MAX_VALUE + 1, 2); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_monthTooLow() { YearMonth.of(2008, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ints_monthTooHigh() { YearMonth.of(2008, 13); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(YearMonth.from(LocalDate.of(2007, 7, 15)), YearMonth.of(2007, 7)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { YearMonth.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_CalendricalObject_null() { YearMonth.from((TemporalAccessor) null); } @@ -323,7 +333,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { }; } - @Test(dataProvider="goodParseData", groups={"tck"}) + @Test(dataProvider="goodParseData") public void factory_parse_success(String text, YearMonth expected) { YearMonth yearMonth = YearMonth.parse(text); assertEquals(yearMonth, expected); @@ -351,7 +361,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { }; } - @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(dataProvider="badParseData", expectedExceptions=DateTimeParseException.class) public void factory_parse_fail(String text, int pos) { try { YearMonth.parse(text); @@ -364,12 +374,12 @@ public class TCKYearMonth extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue_Month() { YearMonth.parse("2008-13"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { YearMonth.parse(null); } @@ -377,20 +387,20 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M"); YearMonth test = YearMonth.parse("2010 12", f); assertEquals(test, YearMonth.of(2010, 12)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M"); YearMonth.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { YearMonth.parse("ANY", null); } @@ -400,19 +410,19 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- @Test public void test_get_TemporalField() { - assertEquals(TEST_2008_06.get(ChronoField.YEAR), 2008); - assertEquals(TEST_2008_06.get(ChronoField.MONTH_OF_YEAR), 6); - assertEquals(TEST_2008_06.get(ChronoField.YEAR_OF_ERA), 2008); - assertEquals(TEST_2008_06.get(ChronoField.ERA), 1); + assertEquals(TEST_2008_06.get(YEAR), 2008); + assertEquals(TEST_2008_06.get(MONTH_OF_YEAR), 6); + assertEquals(TEST_2008_06.get(YEAR_OF_ERA), 2008); + assertEquals(TEST_2008_06.get(ERA), 1); } @Test public void test_getLong_TemporalField() { - assertEquals(TEST_2008_06.getLong(ChronoField.YEAR), 2008); - assertEquals(TEST_2008_06.getLong(ChronoField.MONTH_OF_YEAR), 6); - assertEquals(TEST_2008_06.getLong(ChronoField.YEAR_OF_ERA), 2008); - assertEquals(TEST_2008_06.getLong(ChronoField.ERA), 1); - assertEquals(TEST_2008_06.getLong(ChronoField.EPOCH_MONTH), (2008 - 1970) * 12 + 6 - 1); + assertEquals(TEST_2008_06.getLong(YEAR), 2008); + assertEquals(TEST_2008_06.getLong(MONTH_OF_YEAR), 6); + assertEquals(TEST_2008_06.getLong(YEAR_OF_ERA), 2008); + assertEquals(TEST_2008_06.getLong(ERA), 1); + assertEquals(TEST_2008_06.getLong(PROLEPTIC_MONTH), 2008 * 12 + 6 - 1); } //----------------------------------------------------------------------- @@ -421,13 +431,13 @@ public class TCKYearMonth extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {TEST_2008_06, Queries.chronology(), IsoChronology.INSTANCE}, - {TEST_2008_06, Queries.zoneId(), null}, - {TEST_2008_06, Queries.precision(), ChronoUnit.MONTHS}, - {TEST_2008_06, Queries.zone(), null}, - {TEST_2008_06, Queries.offset(), null}, - {TEST_2008_06, Queries.localDate(), null}, - {TEST_2008_06, Queries.localTime(), null}, + {TEST_2008_06, TemporalQuery.chronology(), IsoChronology.INSTANCE}, + {TEST_2008_06, TemporalQuery.zoneId(), null}, + {TEST_2008_06, TemporalQuery.precision(), ChronoUnit.MONTHS}, + {TEST_2008_06, TemporalQuery.zone(), null}, + {TEST_2008_06, TemporalQuery.offset(), null}, + {TEST_2008_06, TemporalQuery.localDate(), null}, + {TEST_2008_06, TemporalQuery.localTime(), null}, }; } @@ -470,19 +480,19 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with(Year) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_Year() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.with(Year.of(2000)), YearMonth.of(2000, 6)); } - @Test(groups={"tck"}) + @Test public void test_with_Year_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.with(Year.of(2008)), test); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_Year_null() { YearMonth test = YearMonth.of(2008, 6); test.with((Year) null); @@ -491,19 +501,19 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with(Month) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_with_Month() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.with(Month.JANUARY), YearMonth.of(2008, 1)); } - @Test(groups={"tck"}) + @Test public void test_with_Month_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.with(Month.JUNE), test); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_with_Month_null() { YearMonth test = YearMonth.of(2008, 6); test.with((Month) null); @@ -512,25 +522,25 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withYear() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.withYear(1999), YearMonth.of(1999, 6)); } - @Test(groups={"tck"}) + @Test public void test_withYear_int_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.withYear(2008), test); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withYear_tooLow() { YearMonth test = YearMonth.of(2008, 6); test.withYear(Year.MIN_VALUE - 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withYear_tooHigh() { YearMonth test = YearMonth.of(2008, 6); test.withYear(Year.MAX_VALUE + 1); @@ -539,25 +549,25 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.withMonth(1), YearMonth.of(2008, 1)); } - @Test(groups={"tck"}) + @Test public void test_withMonth_int_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.withMonth(6), test); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_tooLow() { YearMonth test = YearMonth.of(2008, 6); test.withMonth(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_tooHigh() { YearMonth test = YearMonth.of(2008, 6); test.withMonth(13); @@ -566,49 +576,49 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusYears_long() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusYears(1), YearMonth.of(2009, 6)); } - @Test(groups={"tck"}) + @Test public void test_plusYears_long_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusYears(0), test); } - @Test(groups={"tck"}) + @Test public void test_plusYears_long_negative() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusYears(-1), YearMonth.of(2007, 6)); } - @Test(groups={"tck"}) + @Test public void test_plusYears_long_big() { YearMonth test = YearMonth.of(-40, 6); assertEquals(test.plusYears(20L + Year.MAX_VALUE), YearMonth.of((int) (-40L + 20L + Year.MAX_VALUE), 6)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooLarge() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 6); test.plusYears(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooLargeMaxAddMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.plusYears(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooLargeMaxAddMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.plusYears(Long.MIN_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusYears_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 6); test.plusYears(-1); @@ -617,62 +627,62 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMonths_long() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusMonths(1), YearMonth.of(2008, 7)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusMonths(0), test); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_overYears() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusMonths(7), YearMonth.of(2009, 1)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_negative() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusMonths(-1), YearMonth.of(2008, 5)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_negativeOverYear() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.plusMonths(-6), YearMonth.of(2007, 12)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_long_big() { YearMonth test = YearMonth.of(-40, 6); long months = 20L + Integer.MAX_VALUE; assertEquals(test.plusMonths(months), YearMonth.of((int) (-40L + months / 12), 6 + (int) (months % 12))); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusMonths_long_invalidTooLarge() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.plusMonths(1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusMonths_long_invalidTooLargeMaxAddMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.plusMonths(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_plusMonths_long_invalidTooLargeMaxAddMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.plusMonths(Long.MIN_VALUE); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_plusMonths_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 1); test.plusMonths(-1); @@ -681,49 +691,49 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusYears_long() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusYears(1), YearMonth.of(2007, 6)); } - @Test(groups={"tck"}) + @Test public void test_minusYears_long_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusYears(0), test); } - @Test(groups={"tck"}) + @Test public void test_minusYears_long_negative() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusYears(-1), YearMonth.of(2009, 6)); } - @Test(groups={"tck"}) + @Test public void test_minusYears_long_big() { YearMonth test = YearMonth.of(40, 6); assertEquals(test.minusYears(20L + Year.MAX_VALUE), YearMonth.of((int) (40L - 20L - Year.MAX_VALUE), 6)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooLarge() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 6); test.minusYears(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 12); test.minusYears(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 12); test.minusYears(Long.MIN_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusYears_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 6); test.minusYears(1); @@ -732,62 +742,62 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMonths_long() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusMonths(1), YearMonth.of(2008, 5)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_noChange_equal() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusMonths(0), test); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_overYears() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusMonths(6), YearMonth.of(2007, 12)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_negative() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusMonths(-1), YearMonth.of(2008, 7)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_negativeOverYear() { YearMonth test = YearMonth.of(2008, 6); assertEquals(test.minusMonths(-7), YearMonth.of(2009, 1)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_long_big() { YearMonth test = YearMonth.of(40, 6); long months = 20L + Integer.MAX_VALUE; assertEquals(test.minusMonths(months), YearMonth.of((int) (40L - months / 12), 6 - (int) (months % 12))); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooLarge() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(-1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMax() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MAX_VALUE); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_minusMonths_long_invalidTooLargeMaxSubtractMin() { YearMonth test = YearMonth.of(Year.MAX_VALUE, 12); test.minusMonths(Long.MIN_VALUE); } - @Test(expectedExceptions={DateTimeException.class}, groups={"tck"}) + @Test(expectedExceptions={DateTimeException.class}) public void test_minusMonths_long_invalidTooSmall() { YearMonth test = YearMonth.of(Year.MIN_VALUE, 1); test.minusMonths(1); @@ -796,35 +806,35 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // adjustInto() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjustDate() { YearMonth test = YearMonth.of(2008, 6); LocalDate date = LocalDate.of(2007, 1, 1); assertEquals(test.adjustInto(date), LocalDate.of(2008, 6, 1)); } - @Test(groups={"tck"}) + @Test public void test_adjustDate_preserveDoM() { YearMonth test = YearMonth.of(2011, 3); LocalDate date = LocalDate.of(2008, 2, 29); assertEquals(test.adjustInto(date), LocalDate.of(2011, 3, 29)); } - @Test(groups={"tck"}) + @Test public void test_adjustDate_resolve() { YearMonth test = YearMonth.of(2007, 2); LocalDate date = LocalDate.of(2008, 3, 31); assertEquals(test.adjustInto(date), LocalDate.of(2007, 2, 28)); } - @Test(groups={"tck"}) + @Test public void test_adjustDate_equal() { YearMonth test = YearMonth.of(2008, 6); LocalDate date = LocalDate.of(2008, 6, 30); assertEquals(test.adjustInto(date), date); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_adjustDate_null() { TEST_2008_06.adjustInto((LocalDate) null); } @@ -832,7 +842,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isLeapYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isLeapYear() { assertEquals(YearMonth.of(2007, 6).isLeapYear(), false); assertEquals(YearMonth.of(2008, 6).isLeapYear(), true); @@ -841,19 +851,19 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // lengthOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_lengthOfMonth_june() { YearMonth test = YearMonth.of(2007, 6); assertEquals(test.lengthOfMonth(), 30); } - @Test(groups={"tck"}) + @Test public void test_lengthOfMonth_febNonLeap() { YearMonth test = YearMonth.of(2007, 2); assertEquals(test.lengthOfMonth(), 28); } - @Test(groups={"tck"}) + @Test public void test_lengthOfMonth_febLeap() { YearMonth test = YearMonth.of(2008, 2); assertEquals(test.lengthOfMonth(), 29); @@ -862,7 +872,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // lengthOfYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_lengthOfYear() { assertEquals(YearMonth.of(2007, 6).lengthOfYear(), 365); assertEquals(YearMonth.of(2008, 6).lengthOfYear(), 366); @@ -871,7 +881,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // isValidDay(int) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isValidDay_int_june() { YearMonth test = YearMonth.of(2007, 6); assertEquals(test.isValidDay(1), true); @@ -883,7 +893,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { assertEquals(test.isValidDay(32), false); } - @Test(groups={"tck"}) + @Test public void test_isValidDay_int_febNonLeap() { YearMonth test = YearMonth.of(2007, 2); assertEquals(test.isValidDay(1), true); @@ -895,7 +905,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { assertEquals(test.isValidDay(32), false); } - @Test(groups={"tck"}) + @Test public void test_isValidDay_int_febLeap() { YearMonth test = YearMonth.of(2008, 2); assertEquals(test.isValidDay(1), true); @@ -907,6 +917,127 @@ public class TCKYearMonth extends AbstractDateTimeTest { assertEquals(test.isValidDay(32), false); } + //----------------------------------------------------------------------- + // periodUntil(Temporal, TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name="periodUntilUnit") + Object[][] data_periodUntilUnit() { + return new Object[][] { + {ym(2000, 1), ym(-1, 12), MONTHS, -2000 * 12 - 1}, + {ym(2000, 1), ym(0, 1), MONTHS, -2000 * 12}, + {ym(2000, 1), ym(0, 12), MONTHS, -1999 * 12 - 1}, + {ym(2000, 1), ym(1, 1), MONTHS, -1999 * 12}, + {ym(2000, 1), ym(1999, 12), MONTHS, -1}, + {ym(2000, 1), ym(2000, 1), MONTHS, 0}, + {ym(2000, 1), ym(2000, 2), MONTHS, 1}, + {ym(2000, 1), ym(2000, 3), MONTHS, 2}, + {ym(2000, 1), ym(2000, 12), MONTHS, 11}, + {ym(2000, 1), ym(2001, 1), MONTHS, 12}, + {ym(2000, 1), ym(2246, 5), MONTHS, 246 * 12 + 4}, + + {ym(2000, 1), ym(-1, 12), YEARS, -2000}, + {ym(2000, 1), ym(0, 1), YEARS, -2000}, + {ym(2000, 1), ym(0, 12), YEARS, -1999}, + {ym(2000, 1), ym(1, 1), YEARS, -1999}, + {ym(2000, 1), ym(1998, 12), YEARS, -1}, + {ym(2000, 1), ym(1999, 1), YEARS, -1}, + {ym(2000, 1), ym(1999, 2), YEARS, 0}, + {ym(2000, 1), ym(1999, 12), YEARS, 0}, + {ym(2000, 1), ym(2000, 1), YEARS, 0}, + {ym(2000, 1), ym(2000, 2), YEARS, 0}, + {ym(2000, 1), ym(2000, 12), YEARS, 0}, + {ym(2000, 1), ym(2001, 1), YEARS, 1}, + {ym(2000, 1), ym(2246, 5), YEARS, 246}, + + {ym(2000, 5), ym(-1, 5), DECADES, -200}, + {ym(2000, 5), ym(0, 4), DECADES, -200}, + {ym(2000, 5), ym(0, 5), DECADES, -200}, + {ym(2000, 5), ym(0, 6), DECADES, -199}, + {ym(2000, 5), ym(1, 5), DECADES, -199}, + {ym(2000, 5), ym(1990, 4), DECADES, -1}, + {ym(2000, 5), ym(1990, 5), DECADES, -1}, + {ym(2000, 5), ym(1990, 6), DECADES, 0}, + {ym(2000, 5), ym(2000, 4), DECADES, 0}, + {ym(2000, 5), ym(2000, 5), DECADES, 0}, + {ym(2000, 5), ym(2000, 6), DECADES, 0}, + {ym(2000, 5), ym(2010, 4), DECADES, 0}, + {ym(2000, 5), ym(2010, 5), DECADES, 1}, + {ym(2000, 5), ym(2010, 6), DECADES, 1}, + + {ym(2000, 5), ym(-1, 5), CENTURIES, -20}, + {ym(2000, 5), ym(0, 4), CENTURIES, -20}, + {ym(2000, 5), ym(0, 5), CENTURIES, -20}, + {ym(2000, 5), ym(0, 6), CENTURIES, -19}, + {ym(2000, 5), ym(1, 5), CENTURIES, -19}, + {ym(2000, 5), ym(1900, 4), CENTURIES, -1}, + {ym(2000, 5), ym(1900, 5), CENTURIES, -1}, + {ym(2000, 5), ym(1900, 6), CENTURIES, 0}, + {ym(2000, 5), ym(2000, 4), CENTURIES, 0}, + {ym(2000, 5), ym(2000, 5), CENTURIES, 0}, + {ym(2000, 5), ym(2000, 6), CENTURIES, 0}, + {ym(2000, 5), ym(2100, 4), CENTURIES, 0}, + {ym(2000, 5), ym(2100, 5), CENTURIES, 1}, + {ym(2000, 5), ym(2100, 6), CENTURIES, 1}, + + {ym(2000, 5), ym(-1, 5), MILLENNIA, -2}, + {ym(2000, 5), ym(0, 4), MILLENNIA, -2}, + {ym(2000, 5), ym(0, 5), MILLENNIA, -2}, + {ym(2000, 5), ym(0, 6), MILLENNIA, -1}, + {ym(2000, 5), ym(1, 5), MILLENNIA, -1}, + {ym(2000, 5), ym(1000, 4), MILLENNIA, -1}, + {ym(2000, 5), ym(1000, 5), MILLENNIA, -1}, + {ym(2000, 5), ym(1000, 6), MILLENNIA, 0}, + {ym(2000, 5), ym(2000, 4), MILLENNIA, 0}, + {ym(2000, 5), ym(2000, 5), MILLENNIA, 0}, + {ym(2000, 5), ym(2000, 6), MILLENNIA, 0}, + {ym(2000, 5), ym(3000, 4), MILLENNIA, 0}, + {ym(2000, 5), ym(3000, 5), MILLENNIA, 1}, + {ym(2000, 5), ym(3000, 5), MILLENNIA, 1}, + }; + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) { + long amount = ym1.periodUntil(ym2, unit); + assertEquals(amount, expected); + } + + @Test(dataProvider="periodUntilUnit") + public void test_periodUntil_TemporalUnit_negated(YearMonth ym1, YearMonth ym2, TemporalUnit unit, long expected) { + long amount = ym2.periodUntil(ym1, unit); + assertEquals(amount, -expected); + } + + @Test(expectedExceptions = UnsupportedTemporalTypeException.class) + public void test_periodUntil_TemporalUnit_unsupportedUnit() { + TEST_2008_06.periodUntil(TEST_2008_06, HOURS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullEnd() { + TEST_2008_06.periodUntil(null, DAYS); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_periodUntil_TemporalUnit_nullUnit() { + TEST_2008_06.periodUntil(TEST_2008_06, null); + } + + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("y M"); + String t = YearMonth.of(2010, 12).format(f); + assertEquals(t, "2010 12"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + YearMonth.of(2010, 12).format(null); + } + //----------------------------------------------------------------------- // atDay(int) //----------------------------------------------------------------------- @@ -975,7 +1106,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_comparisons() { doTest_comparisons_YearMonth( YearMonth.of(-1, 1), @@ -1015,17 +1146,17 @@ public class TCKYearMonth extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_ObjectNull() { TEST_2008_06.compareTo(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_ObjectNull() { TEST_2008_06.isBefore(null); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_ObjectNull() { TEST_2008_06.isAfter(null); } @@ -1033,7 +1164,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals() { YearMonth a = YearMonth.of(2008, 6); YearMonth b = YearMonth.of(2008, 6); @@ -1061,17 +1192,17 @@ public class TCKYearMonth extends AbstractDateTimeTest { assertEquals(d.equals(d), true); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_2008_06.equals(TEST_2008_06), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_2008_06.equals("2007-07-15"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { assertEquals(TEST_2008_06.equals(null), false); } @@ -1079,7 +1210,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates", groups={"tck"}) + @Test(dataProvider="sampleDates") public void test_hashCode(int y, int m) { YearMonth a = YearMonth.of(y, m); assertEquals(a.hashCode(), a.hashCode()); @@ -1087,7 +1218,7 @@ public class TCKYearMonth extends AbstractDateTimeTest { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_hashCode_unique() { Set uniques = new HashSet(201 * 12); for (int i = 1900; i <= 2100; i++) { @@ -1111,26 +1242,15 @@ public class TCKYearMonth extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int y, int m, String expected) { YearMonth test = YearMonth.of(y, m); String str = test.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("y M"); - String t = YearMonth.of(2010, 12).toString(f); - assertEquals(t, "2010 12"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - YearMonth.of(2010, 12).toString(null); + private YearMonth ym(int year, int month) { + return YearMonth.of(year, month); } } diff --git a/jdk/test/java/time/tck/java/time/TCKZoneId.java b/jdk/test/java/time/tck/java/time/TCKZoneId.java index bc6944a8854..dd37d804dff 100644 --- a/jdk/test/java/time/tck/java/time/TCKZoneId.java +++ b/jdk/test/java/time/tck/java/time/TCKZoneId.java @@ -64,23 +64,24 @@ import static org.testng.Assert.fail; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; import java.io.DataOutputStream; -import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectStreamConstants; import java.lang.reflect.Field; import java.time.DateTimeException; +import java.time.Instant; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZoneOffset; -import java.time.temporal.Queries; +import java.time.format.TextStyle; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; import java.time.zone.ZoneRulesException; import java.util.HashMap; +import java.util.Locale; import java.util.Map; +import java.util.Set; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -114,9 +115,12 @@ public class TCKZoneId extends AbstractTCKTest { // an ID can be loaded without validation during deserialization String id = "QWERTYUIOPASDFGHJKLZXCVBNM~/._+-"; ZoneId deser = deserialize(id); - // getting the ID and string are OK + // getId, equals, hashCode, toString and normalized are OK assertEquals(deser.getId(), id); assertEquals(deser.toString(), id); + assertEquals(deser, deser); + assertEquals(deser.hashCode(), deser.hashCode()); + assertEquals(deser.normalized(), deser); // getting the rules is not try { deser.getRules(); @@ -133,32 +137,32 @@ public class TCKZoneId extends AbstractTCKTest { deserialize("|!?"); } - @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class) + @Test(dataProvider="offsetBasedValid") public void test_deserialization_lenient_offsetNotAllowed_noPrefix(String input, String resolvedId) throws Exception { - // an ID can be loaded without validation during deserialization - // but there is a check to ensure the ID format is valid - deserialize(input); + ZoneId deserialized = deserialize(input); + assertEquals(deserialized, ZoneId.of(input)); + assertEquals(deserialized, ZoneId.of(resolvedId)); } - @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class) - public void test_deserialization_lenient_offsetNotAllowed_prefixUTC(String input, String resolvedId) throws Exception { - // an ID can be loaded without validation during deserialization - // but there is a check to ensure the ID format is valid - deserialize("UTC" + input); + @Test(dataProvider="offsetBasedValidPrefix") + public void test_deserialization_lenient_offsetNotAllowed_prefixUTC(String input, String resolvedId, String offsetId) throws Exception { + ZoneId deserialized = deserialize("UTC" + input); + assertEquals(deserialized, ZoneId.of("UTC" + input)); + assertEquals(deserialized, ZoneId.of("UTC" + resolvedId)); } - @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class) - public void test_deserialization_lenient_offsetNotAllowed_prefixGMT(String input, String resolvedId) throws Exception { - // an ID can be loaded without validation during deserialization - // but there is a check to ensure the ID format is valid - deserialize("GMT" + input); + @Test(dataProvider="offsetBasedValidPrefix") + public void test_deserialization_lenient_offsetNotAllowed_prefixGMT(String input, String resolvedId, String offsetId) throws Exception { + ZoneId deserialized = deserialize("GMT" + input); + assertEquals(deserialized, ZoneId.of("GMT" + input)); + assertEquals(deserialized, ZoneId.of("GMT" + resolvedId)); } - @Test(dataProvider="offsetBasedValid", expectedExceptions=DateTimeException.class) - public void test_deserialization_lenient_offsetNotAllowed_prefixUT(String input, String resolvedId) throws Exception { - // an ID can be loaded without validation during deserialization - // but there is a check to ensure the ID format is valid - deserialize("UT" + input); + @Test(dataProvider="offsetBasedValidPrefix") + public void test_deserialization_lenient_offsetNotAllowed_prefixUT(String input, String resolvedId, String offsetId) throws Exception { + ZoneId deserialized = deserialize("UT" + input); + assertEquals(deserialized, ZoneId.of("UT" + input)); + assertEquals(deserialized, ZoneId.of("UT" + resolvedId)); } private ZoneId deserialize(String id) throws Exception { @@ -193,10 +197,10 @@ public class TCKZoneId extends AbstractTCKTest { } //----------------------------------------------------------------------- - // OLD_IDS_PRE_2005 + // OLD_SHORT_IDS //----------------------------------------------------------------------- public void test_constant_OLD_IDS_PRE_2005() { - Map ids = ZoneId.OLD_IDS_PRE_2005; + Map ids = ZoneId.OLD_SHORT_IDS; assertEquals(ids.get("EST"), "America/New_York"); assertEquals(ids.get("MST"), "America/Denver"); assertEquals(ids.get("HST"), "Pacific/Honolulu"); @@ -229,15 +233,15 @@ public class TCKZoneId extends AbstractTCKTest { @Test(expectedExceptions=UnsupportedOperationException.class) public void test_constant_OLD_IDS_PRE_2005_immutable() { - Map ids = ZoneId.OLD_IDS_PRE_2005; + Map ids = ZoneId.OLD_SHORT_IDS; ids.clear(); } //----------------------------------------------------------------------- - // OLD_IDS_POST_2005 + // SHORT_IDS //----------------------------------------------------------------------- public void test_constant_OLD_IDS_POST_2005() { - Map ids = ZoneId.OLD_IDS_POST_2005; + Map ids = ZoneId.SHORT_IDS; assertEquals(ids.get("EST"), "-05:00"); assertEquals(ids.get("MST"), "-07:00"); assertEquals(ids.get("HST"), "-10:00"); @@ -270,10 +274,23 @@ public class TCKZoneId extends AbstractTCKTest { @Test(expectedExceptions=UnsupportedOperationException.class) public void test_constant_OLD_IDS_POST_2005_immutable() { - Map ids = ZoneId.OLD_IDS_POST_2005; + Map ids = ZoneId.SHORT_IDS; ids.clear(); } + //----------------------------------------------------------------------- + // getAvailableZoneIds() + //----------------------------------------------------------------------- + @Test + public void test_getAvailableGroupIds() { + Set zoneIds = ZoneId.getAvailableZoneIds(); + assertEquals(zoneIds.contains("Europe/London"), true); + zoneIds.clear(); + assertEquals(zoneIds.size(), 0); + Set zoneIds2 = ZoneId.getAvailableZoneIds(); + assertEquals(zoneIds2.contains("Europe/London"), true); + } + //----------------------------------------------------------------------- // mapped factory //----------------------------------------------------------------------- @@ -315,65 +332,41 @@ public class TCKZoneId extends AbstractTCKTest { } //----------------------------------------------------------------------- - // regular factory - //----------------------------------------------------------------------- - @DataProvider(name="offsetBasedZero") - Object[][] data_offsetBasedZero() { - return new Object[][] { - {""}, {"0"}, - {"+00"},{"+0000"},{"+00:00"},{"+000000"},{"+00:00:00"}, - {"-00"},{"-0000"},{"-00:00"},{"-000000"},{"-00:00:00"}, - }; - } - - @Test(dataProvider="offsetBasedZero") - public void factory_of_String_offsetBasedZero_noPrefix(String id) { - if (id.length() > 0 && id.equals("0") == false) { - ZoneId test = ZoneId.of(id); - assertEquals(test, ZoneOffset.UTC); - } - } - - @Test(dataProvider="offsetBasedZero") - public void factory_of_String_offsetBasedZero_prefixUTC(String id) { - ZoneId test = ZoneId.of("UTC" + id); - assertEquals(test, ZoneOffset.UTC); - } - - @Test(dataProvider="offsetBasedZero") - public void factory_of_String_offsetBasedZero_prefixGMT(String id) { - ZoneId test = ZoneId.of("GMT" + id); - assertEquals(test, ZoneOffset.UTC); - } - - @Test(dataProvider="offsetBasedZero") - public void factory_of_String_offsetBasedZero_prefixUT(String id) { - ZoneId test = ZoneId.of("UT" + id); - assertEquals(test, ZoneOffset.UTC); - } - - @Test - public void factory_of_String_offsetBasedZero_z() { - ZoneId test = ZoneId.of("Z"); - assertEquals(test, ZoneOffset.UTC); - } - + // regular factory and .normalized() //----------------------------------------------------------------------- @DataProvider(name="offsetBasedValid") Object[][] data_offsetBasedValid() { return new Object[][] { + {"Z", "Z"}, {"+0", "Z"}, + {"-0", "Z"}, + {"+00", "Z"}, + {"+0000", "Z"}, + {"+00:00", "Z"}, + {"+000000", "Z"}, + {"+00:00:00", "Z"}, + {"-00", "Z"}, + {"-0000", "Z"}, + {"-00:00", "Z"}, + {"-000000", "Z"}, + {"-00:00:00", "Z"}, {"+5", "+05:00"}, {"+01", "+01:00"}, - {"+0100", "+01:00"},{"+01:00", "+01:00"}, - {"+010000", "+01:00"},{"+01:00:00", "+01:00"}, + {"+0100", "+01:00"}, + {"+01:00", "+01:00"}, + {"+010000", "+01:00"}, + {"+01:00:00", "+01:00"}, {"+12", "+12:00"}, - {"+1234", "+12:34"},{"+12:34", "+12:34"}, - {"+123456", "+12:34:56"},{"+12:34:56", "+12:34:56"}, + {"+1234", "+12:34"}, + {"+12:34", "+12:34"}, + {"+123456", "+12:34:56"}, + {"+12:34:56", "+12:34:56"}, {"-02", "-02:00"}, {"-5", "-05:00"}, - {"-0200", "-02:00"},{"-02:00", "-02:00"}, - {"-020000", "-02:00"},{"-02:00:00", "-02:00"}, + {"-0200", "-02:00"}, + {"-02:00", "-02:00"}, + {"-020000", "-02:00"}, + {"-02:00:00", "-02:00"}, }; } @@ -382,27 +375,126 @@ public class TCKZoneId extends AbstractTCKTest { ZoneId test = ZoneId.of(input); assertEquals(test.getId(), id); assertEquals(test, ZoneOffset.of(id)); + assertEquals(test.normalized(), ZoneOffset.of(id)); + assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id); + assertEquals(test.getRules().isFixedOffset(), true); + assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(id)); } - @Test(dataProvider="offsetBasedValid") - public void factory_of_String_offsetBasedValid_prefixUTC(String input, String id) { + //----------------------------------------------------------------------- + @DataProvider(name="offsetBasedValidPrefix") + Object[][] data_offsetBasedValidPrefix() { + return new Object[][] { + {"", "", "Z"}, + {"+0", "", "Z"}, + {"-0", "", "Z"}, + {"+00", "", "Z"}, + {"+0000", "", "Z"}, + {"+00:00", "", "Z"}, + {"+000000", "", "Z"}, + {"+00:00:00", "", "Z"}, + {"-00", "", "Z"}, + {"-0000", "", "Z"}, + {"-00:00", "", "Z"}, + {"-000000", "", "Z"}, + {"-00:00:00", "", "Z"}, + {"+5", "+05:00", "+05:00"}, + {"+01", "+01:00", "+01:00"}, + {"+0100", "+01:00", "+01:00"}, + {"+01:00", "+01:00", "+01:00"}, + {"+010000", "+01:00", "+01:00"}, + {"+01:00:00", "+01:00", "+01:00"}, + {"+12", "+12:00", "+12:00"}, + {"+1234", "+12:34", "+12:34"}, + {"+12:34", "+12:34", "+12:34"}, + {"+123456", "+12:34:56", "+12:34:56"}, + {"+12:34:56", "+12:34:56", "+12:34:56"}, + {"-02", "-02:00", "-02:00"}, + {"-5", "-05:00", "-05:00"}, + {"-0200", "-02:00", "-02:00"}, + {"-02:00", "-02:00", "-02:00"}, + {"-020000", "-02:00", "-02:00"}, + {"-02:00:00", "-02:00", "-02:00"}, + }; + } + + @Test(dataProvider="offsetBasedValidPrefix") + public void factory_of_String_offsetBasedValid_prefixUTC(String input, String id, String offsetId) { ZoneId test = ZoneId.of("UTC" + input); - assertEquals(test.getId(), id); - assertEquals(test, ZoneOffset.of(id)); + assertEquals(test.getId(), "UTC" + id); + assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); + assertEquals(test.normalized(), ZoneOffset.of(offsetId)); + assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), displayName("UTC" + id)); + assertEquals(test.getRules().isFixedOffset(), true); + assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId)); } - @Test(dataProvider="offsetBasedValid") - public void factory_of_String_offsetBasedValid_prefixGMT(String input, String id) { + @Test(dataProvider="offsetBasedValidPrefix") + public void factory_of_String_offsetBasedValid_prefixGMT(String input, String id, String offsetId) { ZoneId test = ZoneId.of("GMT" + input); - assertEquals(test.getId(), id); - assertEquals(test, ZoneOffset.of(id)); + assertEquals(test.getId(), "GMT" + id); + assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); + assertEquals(test.normalized(), ZoneOffset.of(offsetId)); + assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), displayName("GMT" + id)); + assertEquals(test.getRules().isFixedOffset(), true); + assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId)); } - @Test(dataProvider="offsetBasedValid") - public void factory_of_String_offsetBasedValid_prefixUT(String input, String id) { + @Test(dataProvider="offsetBasedValidPrefix") + public void factory_of_String_offsetBasedValid_prefixUT(String input, String id, String offsetId) { ZoneId test = ZoneId.of("UT" + input); - assertEquals(test.getId(), id); - assertEquals(test, ZoneOffset.of(id)); + assertEquals(test.getId(), "UT" + id); + assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); + assertEquals(test.normalized(), ZoneOffset.of(offsetId)); + assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), displayName("UT" + id)); + assertEquals(test.getRules().isFixedOffset(), true); + assertEquals(test.getRules().getOffset(Instant.EPOCH), ZoneOffset.of(offsetId)); + } + + private String displayName(String id) { + if (id.equals("GMT")) { + return "Greenwich Mean Time"; + } + if (id.equals("GMT0")) { + return "Greenwich Mean Time"; + } + if (id.equals("UTC")) { + return "Coordinated Universal Time"; + } + return id; + } + + //----------------------------------------------------------------------- + @DataProvider(name="offsetBasedValidOther") + Object[][] data_offsetBasedValidOther() { + return new Object[][] { + {"GMT", "Z"}, + {"GMT0", "Z"}, + {"UCT", "Z"}, + {"Greenwich", "Z"}, + {"Universal", "Z"}, + {"Zulu", "Z"}, + {"Etc/GMT", "Z"}, + {"Etc/GMT+0", "Z"}, + {"Etc/GMT+1", "-01:00"}, + {"Etc/GMT-1", "+01:00"}, + {"Etc/GMT+9", "-09:00"}, + {"Etc/GMT-9", "+09:00"}, + {"Etc/GMT0", "Z"}, + {"Etc/UCT", "Z"}, + {"Etc/UTC", "Z"}, + {"Etc/Greenwich", "Z"}, + {"Etc/Universal", "Z"}, + {"Etc/Zulu", "Z"}, + }; + } + + @Test(dataProvider="offsetBasedValidOther") + public void factory_of_String_offsetBasedValidOther(String input, String offsetId) { + ZoneId test = ZoneId.of(input); + assertEquals(test.getId(), input); + assertEquals(test.getRules(), ZoneOffset.of(offsetId).getRules()); + assertEquals(test.normalized(), ZoneOffset.of(offsetId)); } //----------------------------------------------------------------------- @@ -422,6 +514,12 @@ public class TCKZoneId extends AbstractTCKTest { {"-19"}, {"-19:00"}, {"-18:01"}, {"-18:00:01"}, {"-1801"}, {"-180001"}, {"-01_00"}, {"-01;00"}, {"-01@00"}, {"-01:AA"}, {"@01:00"}, + {"0"}, + {"UT0"}, + {"UTZ"}, + {"UTC0"}, + {"UTCZ"}, + {"GMTZ"}, // GMT0 is valid in ZoneRulesProvider }; } @@ -440,6 +538,9 @@ public class TCKZoneId extends AbstractTCKTest { @Test(dataProvider="offsetBasedInvalid", expectedExceptions=DateTimeException.class) public void factory_of_String_offsetBasedInvalid_prefixGMT(String id) { + if (id.equals("0")) { + throw new DateTimeException("Fake exception: GMT0 is valid, not invalid"); + } ZoneId.of("GMT" + id); } @@ -479,6 +580,7 @@ public class TCKZoneId extends AbstractTCKTest { ZoneId test = ZoneId.of("Europe/London"); assertEquals(test.getId(), "Europe/London"); assertEquals(test.getRules().isFixedOffset(), false); + assertEquals(test.normalized(), test); } //----------------------------------------------------------------------- @@ -514,7 +616,7 @@ public class TCKZoneId extends AbstractTCKTest { @SuppressWarnings("unchecked") @Override public R query(TemporalQuery query) { - if (query == Queries.zoneId()) { + if (query == TemporalQuery.zoneId()) { return (R) ZoneId.of("Europe/Paris"); } return TemporalAccessor.super.query(query); @@ -578,8 +680,10 @@ public class TCKZoneId extends AbstractTCKTest { {"Europe/London", "Europe/London"}, {"Europe/Paris", "Europe/Paris"}, {"Europe/Berlin", "Europe/Berlin"}, - {"UTC", "Z"}, - {"UTC+01:00", "+01:00"}, + {"Z", "Z"}, + {"+01:00", "+01:00"}, + {"UTC", "UTC"}, + {"UTC+01:00", "UTC+01:00"}, }; } diff --git a/jdk/test/java/time/tck/java/time/TCKZoneOffset.java b/jdk/test/java/time/tck/java/time/TCKZoneOffset.java index c8fb56bf63b..18882df474e 100644 --- a/jdk/test/java/time/tck/java/time/TCKZoneOffset.java +++ b/jdk/test/java/time/tck/java/time/TCKZoneOffset.java @@ -77,7 +77,6 @@ import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.temporal.ChronoField; import java.time.temporal.JulianFields; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; @@ -183,7 +182,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // of(String) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_string_UTC() { String[] values = new String[] { "Z", "+0", @@ -196,7 +195,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_factory_string_invalid() { String[] values = new String[] { "","A","B","C","D","E","F","G","H","I","J","K","L","M", @@ -223,13 +222,13 @@ public class TCKZoneOffset extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_string_null() { ZoneOffset.of((String) null); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_string_singleDigitHours() { for (int i = -9; i <= 9; i++) { String str = (i < 0 ? "-" : "+") + Math.abs(i); @@ -238,7 +237,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_factory_string_hours() { for (int i = -18; i <= 18; i++) { String str = (i < 0 ? "-" : "+") + Integer.toString(Math.abs(i) + 100).substring(1); @@ -247,7 +246,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_factory_string_hours_minutes_noColon() { for (int i = -17; i <= 17; i++) { for (int j = -59; j <= 59; j++) { @@ -266,7 +265,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { doTestOffset(test2, 18, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_factory_string_hours_minutes_colon() { for (int i = -17; i <= 17; i++) { for (int j = -59; j <= 59; j++) { @@ -285,7 +284,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { doTestOffset(test2, 18, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_factory_string_hours_minutes_seconds_noColon() { for (int i = -17; i <= 17; i++) { for (int j = -59; j <= 59; j++) { @@ -308,7 +307,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { doTestOffset(test2, 18, 0, 0); } - @Test(groups={"tck"}) + @Test public void test_factory_string_hours_minutes_seconds_colon() { for (int i = -17; i <= 17; i++) { for (int j = -59; j <= 59; j++) { @@ -332,7 +331,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_int_hours() { for (int i = -18; i <= 18; i++) { ZoneOffset test = ZoneOffset.ofHours(i); @@ -340,18 +339,18 @@ public class TCKZoneOffset extends AbstractDateTimeTest { } } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_tooBig() { ZoneOffset.ofHours(19); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_tooSmall() { ZoneOffset.ofHours(-19); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_int_hours_minutes() { for (int i = -17; i <= 17; i++) { for (int j = -59; j <= 59; j++) { @@ -367,18 +366,18 @@ public class TCKZoneOffset extends AbstractDateTimeTest { doTestOffset(test2, 18, 0, 0); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_tooBig() { ZoneOffset.ofHoursMinutes(19, 0); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_tooSmall() { ZoneOffset.ofHoursMinutes(-19, 0); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_int_hours_minutes_seconds() { for (int i = -17; i <= 17; i++) { for (int j = -59; j <= 59; j++) { @@ -397,80 +396,80 @@ public class TCKZoneOffset extends AbstractDateTimeTest { doTestOffset(test2, 18, 0, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_plusHoursMinusMinutes() { ZoneOffset.ofHoursMinutesSeconds(1, -1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_plusHoursMinusSeconds() { ZoneOffset.ofHoursMinutesSeconds(1, 0, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_minusHoursPlusMinutes() { ZoneOffset.ofHoursMinutesSeconds(-1, 1, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_minusHoursPlusSeconds() { ZoneOffset.ofHoursMinutesSeconds(-1, 0, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_zeroHoursMinusMinutesPlusSeconds() { ZoneOffset.ofHoursMinutesSeconds(0, -1, 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_zeroHoursPlusMinutesMinusSeconds() { ZoneOffset.ofHoursMinutesSeconds(0, 1, -1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_minutesTooLarge() { ZoneOffset.ofHoursMinutesSeconds(0, 60, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_minutesTooSmall() { ZoneOffset.ofHoursMinutesSeconds(0, -60, 0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_secondsTooLarge() { ZoneOffset.ofHoursMinutesSeconds(0, 0, 60); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_secondsTooSmall() { ZoneOffset.ofHoursMinutesSeconds(0, 0, 60); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_hoursTooBig() { ZoneOffset.ofHoursMinutesSeconds(19, 0, 0); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_int_hours_minutes_seconds_hoursTooSmall() { ZoneOffset.ofHoursMinutesSeconds(-19, 0, 0); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_ofTotalSeconds() { assertEquals(ZoneOffset.ofTotalSeconds(60 * 60 + 1), ZoneOffset.ofHoursMinutesSeconds(1, 0, 1)); assertEquals(ZoneOffset.ofTotalSeconds(18 * 60 * 60), ZoneOffset.ofHours(18)); assertEquals(ZoneOffset.ofTotalSeconds(-18 * 60 * 60), ZoneOffset.ofHours(-18)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ofTotalSeconds_tooLarge() { ZoneOffset.ofTotalSeconds(18 * 60 * 60 + 1); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_ofTotalSeconds_tooSmall() { ZoneOffset.ofTotalSeconds(-18 * 60 * 60 - 1); } @@ -478,18 +477,18 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_factory_CalendricalObject() { assertEquals(ZoneOffset.from(ZonedDateTime.of(LocalDateTime.of(LocalDate.of(2007, 7, 15), LocalTime.of(17, 30)), ZoneOffset.ofHours(2))), ZoneOffset.ofHours(2)); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_factory_CalendricalObject_invalid_noDerive() { ZoneOffset.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_CalendricalObject_null() { ZoneOffset.from((TemporalAccessor) null); } @@ -497,7 +496,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // getTotalSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getTotalSeconds() { ZoneOffset offset = ZoneOffset.ofTotalSeconds(60 * 60 + 1); assertEquals(offset.getTotalSeconds(), 60 * 60 + 1); @@ -506,7 +505,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // getId() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getId() { ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(1, 0, 0); assertEquals(offset.getId(), "+01:00"); @@ -519,7 +518,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // getRules() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getRules() { ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(1, 2, 3); assertEquals(offset.getRules().isFixedOffset(), true); @@ -562,13 +561,13 @@ public class TCKZoneOffset extends AbstractDateTimeTest { @DataProvider(name="query") Object[][] data_query() { return new Object[][] { - {ZoneOffset.UTC, Queries.chronology(), null}, - {ZoneOffset.UTC, Queries.zoneId(), null}, - {ZoneOffset.UTC, Queries.precision(), null}, - {ZoneOffset.UTC, Queries.zone(), ZoneOffset.UTC}, - {ZoneOffset.UTC, Queries.offset(), ZoneOffset.UTC}, - {ZoneOffset.UTC, Queries.localDate(), null}, - {ZoneOffset.UTC, Queries.localTime(), null}, + {ZoneOffset.UTC, TemporalQuery.chronology(), null}, + {ZoneOffset.UTC, TemporalQuery.zoneId(), null}, + {ZoneOffset.UTC, TemporalQuery.precision(), null}, + {ZoneOffset.UTC, TemporalQuery.zone(), ZoneOffset.UTC}, + {ZoneOffset.UTC, TemporalQuery.offset(), ZoneOffset.UTC}, + {ZoneOffset.UTC, TemporalQuery.localDate(), null}, + {ZoneOffset.UTC, TemporalQuery.localTime(), null}, }; } @@ -590,7 +589,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_compareTo() { ZoneOffset offset1 = ZoneOffset.ofHoursMinutesSeconds(1, 2, 3); ZoneOffset offset2 = ZoneOffset.ofHoursMinutesSeconds(2, 3, 4); @@ -603,7 +602,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals() { ZoneOffset offset1 = ZoneOffset.ofHoursMinutesSeconds(1, 2, 3); ZoneOffset offset2 = ZoneOffset.ofHoursMinutesSeconds(2, 3, 4); @@ -623,7 +622,7 @@ public class TCKZoneOffset extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString() { ZoneOffset offset = ZoneOffset.ofHoursMinutesSeconds(1, 0, 0); assertEquals(offset.toString(), "+01:00"); diff --git a/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java b/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java index 9841fc8e849..3bf1dbfa6e6 100644 --- a/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java +++ b/jdk/test/java/time/tck/java/time/TCKZonedDateTime.java @@ -59,8 +59,6 @@ */ package tck.java.time; -import java.time.*; - import static java.time.Month.JANUARY; import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; @@ -73,7 +71,6 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.EPOCH_DAY; -import static java.time.temporal.ChronoField.EPOCH_MONTH; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.HOUR_OF_AMPM; import static java.time.temporal.ChronoField.HOUR_OF_DAY; @@ -88,6 +85,7 @@ import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.NANO_OF_DAY; import static java.time.temporal.ChronoField.NANO_OF_SECOND; import static java.time.temporal.ChronoField.OFFSET_SECONDS; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; import static java.time.temporal.ChronoField.SECOND_OF_DAY; import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; import static java.time.temporal.ChronoField.YEAR; @@ -103,29 +101,36 @@ import static org.testng.Assert.assertTrue; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; +import java.time.Clock; +import java.time.DateTimeException; +import java.time.Duration; +import java.time.Instant; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.Month; +import java.time.OffsetDateTime; +import java.time.OffsetTime; +import java.time.Period; +import java.time.Year; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.chrono.IsoChronology; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.time.temporal.ChronoField; +import java.time.temporal.ChronoUnit; +import java.time.temporal.JulianFields; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalAdjuster; +import java.time.temporal.TemporalAmount; +import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQuery; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.time.temporal.ChronoField; -import java.time.temporal.ChronoUnit; -import java.time.temporal.Queries; -import java.time.temporal.TemporalAmount; -import java.time.temporal.TemporalAmount; -import java.time.temporal.TemporalAdjuster; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalQuery; -import java.time.temporal.TemporalField; -import java.time.chrono.IsoChronology; -import java.time.temporal.JulianFields; -import test.java.time.temporal.MockFieldNoValue; - -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeParseException; -import java.time.OffsetDateTime; -import java.time.Year; - import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -153,7 +158,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { private ZonedDateTime TEST_DATE_TIME; private ZonedDateTime TEST_DATE_TIME_PARIS; - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { TEST_LOCAL_2008_06_30_11_30_59_500 = LocalDateTime.of(2008, 6, 30, 11, 30, 59, 500); TEST_DATE_TIME = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); @@ -196,7 +201,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { ALIGNED_WEEK_OF_MONTH, ALIGNED_WEEK_OF_YEAR, MONTH_OF_YEAR, - EPOCH_MONTH, + PROLEPTIC_MONTH, YEAR_OF_ERA, YEAR, ERA, @@ -267,7 +272,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void now() { ZonedDateTime expected = ZonedDateTime.now(Clock.systemDefaultZone()); ZonedDateTime test = ZonedDateTime.now(); @@ -284,12 +289,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(ZoneId) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_ZoneId_nullZoneId() { ZonedDateTime.now((ZoneId) null); } - @Test(groups={"tck"}) + @Test public void now_ZoneId() { ZoneId zone = ZoneId.of("UTC+01:02:03"); ZonedDateTime expected = ZonedDateTime.now(Clock.system(zone)); @@ -307,12 +312,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // now(Clock) //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void now_Clock_nullClock() { - ZonedDateTime.now((Clock)null); + ZonedDateTime.now((Clock) null); } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_utc() { for (int i = 0; i < (2 * 24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i).plusNanos(123456789L); @@ -330,7 +335,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_zone() { ZoneId zone = ZoneId.of("Europe/London"); for (int i = 0; i < (2 * 24 * 60 * 60); i++) { @@ -342,7 +347,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_allSecsInDay_beforeEpoch() { LocalTime expected = LocalTime.MIDNIGHT.plusNanos(123456789L); for (int i =-1; i >= -(24 * 60 * 60); i--) { @@ -359,7 +364,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void now_Clock_offsets() { ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(1970, 1, 1, 12, 0), ZoneOffset.UTC); for (int i = -9; i < 15; i++) { @@ -393,35 +398,35 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // of(LocalDate, LocalTime, ZoneId) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateLocalTime() { ZonedDateTime test = ZonedDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500), ZONE_PARIS); check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateLocalTime_inGap() { ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_GAP_2008_03_30_02_30.toLocalDate(), TEST_PARIS_GAP_2008_03_30_02_30.toLocalTime(), ZONE_PARIS); check(test, 2008, 3, 30, 3, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // one hour later in summer offset } - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateLocalTime_inOverlap() { ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_OVERLAP_2008_10_26_02_30.toLocalDate(), TEST_PARIS_OVERLAP_2008_10_26_02_30.toLocalTime(), ZONE_PARIS); check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // same time in summer offset } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateLocalTime_nullDate() { ZonedDateTime.of((LocalDate) null, LocalTime.of(11, 30, 10, 500), ZONE_PARIS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateLocalTime_nullTime() { ZonedDateTime.of(LocalDate.of(2008, 6, 30), (LocalTime) null, ZONE_PARIS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateLocalTime_nullZone() { ZonedDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 10, 500), null); } @@ -429,31 +434,31 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // of(LocalDateTime, ZoneId) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateTime() { LocalDateTime base = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500); ZonedDateTime test = ZonedDateTime.of(base, ZONE_PARIS); check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateTime_inGap() { ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_GAP_2008_03_30_02_30, ZONE_PARIS); check(test, 2008, 3, 30, 3, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // one hour later in summer offset } - @Test(groups={"tck"}) + @Test public void factory_of_LocalDateTime_inOverlap() { ZonedDateTime test = ZonedDateTime.of(TEST_PARIS_OVERLAP_2008_10_26_02_30, ZONE_PARIS); check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // same time in summer offset } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateTime_nullDateTime() { ZonedDateTime.of((LocalDateTime) null, ZONE_PARIS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_of_LocalDateTime_nullZone() { LocalDateTime base = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500); ZonedDateTime.of(base, null); @@ -462,7 +467,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // of(int..., ZoneId) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_of_ints() { ZonedDateTime test = ZonedDateTime.of(2008, 6, 30, 11, 30, 10, 500, ZONE_PARIS); check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS); @@ -471,49 +476,49 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofInstant(Instant, ZoneId) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofInstant_Instant_ZR() { Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 35).toInstant(OFFSET_0200); ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS); check(test, 2008, 6, 30, 11, 30, 10, 35, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_Instant_ZO() { Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 45).toInstant(OFFSET_0200); ZonedDateTime test = ZonedDateTime.ofInstant(instant, OFFSET_0200); check(test, 2008, 6, 30, 11, 30, 10, 45, OFFSET_0200, OFFSET_0200); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_Instant_inGap() { Instant instant = TEST_PARIS_GAP_2008_03_30_02_30.toInstant(OFFSET_0100); ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS); check(test, 2008, 3, 30, 3, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // one hour later in summer offset } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_Instant_inOverlap_earlier() { Instant instant = TEST_PARIS_OVERLAP_2008_10_26_02_30.toInstant(OFFSET_0200); ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS); check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // same time and offset } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_Instant_inOverlap_later() { Instant instant = TEST_PARIS_OVERLAP_2008_10_26_02_30.toInstant(OFFSET_0100); ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS); check(test, 2008, 10, 26, 2, 30, 0, 0, OFFSET_0100, ZONE_PARIS); // same time and offset } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_Instant_invalidOffset() { Instant instant = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500).toInstant(OFFSET_0130); ZonedDateTime test = ZonedDateTime.ofInstant(instant, ZONE_PARIS); check(test, 2008, 6, 30, 12, 0, 10, 500, OFFSET_0200, ZONE_PARIS); // corrected offset, thus altered time } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_allSecsInDay() { for (int i = 0; i < (24 * 60 * 60); i++) { Instant instant = Instant.ofEpochSecond(i); @@ -527,7 +532,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_allDaysInCycle() { // sanity check using different algorithm ZonedDateTime expected = LocalDateTime.of(1970, 1, 1, 0, 0, 0, 0).atZone(ZoneOffset.UTC); @@ -539,7 +544,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_minWithMinOffset() { long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7); int year = Year.MIN_VALUE; @@ -556,7 +561,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_minWithMaxOffset() { long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7); int year = Year.MIN_VALUE; @@ -573,7 +578,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_maxWithMinOffset() { long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7); int year = Year.MAX_VALUE; @@ -590,7 +595,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getNano(), 0); } - @Test(groups={"tck"}) + @Test public void factory_ofInstant_maxWithMaxOffset() { long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7); int year = Year.MAX_VALUE; @@ -608,19 +613,19 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_maxInstantWithMaxOffset() { Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE); ZonedDateTime.ofInstant(instant, OFFSET_MAX); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_maxInstantWithMinOffset() { Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE); ZonedDateTime.ofInstant(instant, OFFSET_MIN); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_tooBig() { long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7); long year = Year.MAX_VALUE + 1L; @@ -629,7 +634,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { ZonedDateTime.ofInstant(instant, ZoneOffset.UTC); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_tooLow() { long days_0000_to_1970 = (146097 * 5) - (30 * 365 + 7); int year = Year.MIN_VALUE - 1; @@ -638,12 +643,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { ZonedDateTime.ofInstant(instant, ZoneOffset.UTC); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofInstant_Instant_nullInstant() { ZonedDateTime.ofInstant((Instant) null, ZONE_0100); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofInstant_Instant_nullZone() { ZonedDateTime.ofInstant(Instant.EPOCH, null); } @@ -651,14 +656,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // ofStrict(LocalDateTime, ZoneId, ZoneOffset) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_ofStrict_LDT_ZI_ZO() { LocalDateTime normal = LocalDateTime.of(2008, 6, 30, 11, 30, 10, 500); ZonedDateTime test = ZonedDateTime.ofStrict(normal, OFFSET_0200, ZONE_PARIS); check(test, 2008, 6, 30, 11, 30, 10, 500, OFFSET_0200, ZONE_PARIS); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofStrict_LDT_ZI_ZO_inGap() { try { ZonedDateTime.ofStrict(TEST_PARIS_GAP_2008_03_30_02_30, OFFSET_0100, ZONE_PARIS); @@ -668,7 +673,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofStrict_LDT_ZI_ZO_inOverlap_invalidOfset() { try { ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0130, ZONE_PARIS); @@ -678,7 +683,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_ofStrict_LDT_ZI_ZO_invalidOffset() { try { ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0130, ZONE_PARIS); @@ -688,17 +693,17 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofStrict_LDT_ZI_ZO_nullLDT() { ZonedDateTime.ofStrict((LocalDateTime) null, OFFSET_0100, ZONE_PARIS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofStrict_LDT_ZI_ZO_nullZO() { ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, null, ZONE_PARIS); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_ofStrict_LDT_ZI_ZO_nullZI() { ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0100, null); } @@ -706,12 +711,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // from(TemporalAccessor) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_from_TemporalAccessor_ZDT() { assertEquals(ZonedDateTime.from(TEST_DATE_TIME_PARIS), TEST_DATE_TIME_PARIS); } - @Test(groups={"tck"}) + @Test public void factory_from_TemporalAccessor_LDT_ZoneId() { assertEquals(ZonedDateTime.from(new TemporalAccessor() { @Override @@ -725,7 +730,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { @SuppressWarnings("unchecked") @Override public R query(TemporalQuery query) { - if (query == Queries.zoneId()) { + if (query == TemporalQuery.zoneId()) { return (R) TEST_DATE_TIME_PARIS.getZone(); } return TemporalAccessor.super.query(query); @@ -733,7 +738,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }), TEST_DATE_TIME_PARIS); } - @Test(groups={"tck"}) + @Test public void factory_from_TemporalAccessor_Instant_ZoneId() { assertEquals(ZonedDateTime.from(new TemporalAccessor() { @Override @@ -749,7 +754,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { @SuppressWarnings("unchecked") @Override public R query(TemporalQuery query) { - if (query == Queries.zoneId()) { + if (query == TemporalQuery.zoneId()) { return (R) TEST_DATE_TIME_PARIS.getZone(); } return TemporalAccessor.super.query(query); @@ -757,12 +762,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }), TEST_DATE_TIME_PARIS); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void factory_from_TemporalAccessor_invalid_noDerive() { ZonedDateTime.from(LocalTime.of(12, 30)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_from_TemporalAccessor_null() { ZonedDateTime.from((TemporalAccessor) null); } @@ -814,17 +819,17 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(t.getZone().getId(), zoneId); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_illegalValue() { ZonedDateTime.parse("2008-06-32T11:15+01:00[Europe/Paris]"); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void factory_parse_invalidValue() { ZonedDateTime.parse("2008-06-31T11:15+01:00[Europe/Paris]"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_nullText() { ZonedDateTime.parse((String) null); } @@ -832,20 +837,20 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // parse(DateTimeFormatter) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_parse_formatter() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s VV"); ZonedDateTime test = ZonedDateTime.parse("2010 12 3 11 30 0 Europe/London", f); assertEquals(test, ZonedDateTime.of(LocalDateTime.of(2010, 12, 3, 11, 30), ZoneId.of("Europe/London"))); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullText() { DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); ZonedDateTime.parse((String) null, f); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_parse_formatter_nullFormatter() { ZonedDateTime.parse("ANY", null); } @@ -865,7 +870,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_get(int y, int o, int d, int h, int m, int s, int n, ZoneId zone) { LocalDate localDate = LocalDate.of(y, o, d); LocalTime localTime = LocalTime.of(h, m, s, n); @@ -941,32 +946,32 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- @Test public void test_query_chrono() { - assertEquals(TEST_DATE_TIME.query(Queries.chronology()), IsoChronology.INSTANCE); - assertEquals(Queries.chronology().queryFrom(TEST_DATE_TIME), IsoChronology.INSTANCE); + assertEquals(TEST_DATE_TIME.query(TemporalQuery.chronology()), IsoChronology.INSTANCE); + assertEquals(TemporalQuery.chronology().queryFrom(TEST_DATE_TIME), IsoChronology.INSTANCE); } @Test public void test_query_zoneId() { - assertEquals(TEST_DATE_TIME.query(Queries.zoneId()), TEST_DATE_TIME.getZone()); - assertEquals(Queries.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone()); + assertEquals(TEST_DATE_TIME.query(TemporalQuery.zoneId()), TEST_DATE_TIME.getZone()); + assertEquals(TemporalQuery.zoneId().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone()); } @Test public void test_query_precision() { - assertEquals(TEST_DATE_TIME.query(Queries.precision()), NANOS); - assertEquals(Queries.precision().queryFrom(TEST_DATE_TIME), NANOS); + assertEquals(TEST_DATE_TIME.query(TemporalQuery.precision()), NANOS); + assertEquals(TemporalQuery.precision().queryFrom(TEST_DATE_TIME), NANOS); } @Test public void test_query_offset() { - assertEquals(TEST_DATE_TIME.query(Queries.offset()), TEST_DATE_TIME.getOffset()); - assertEquals(Queries.offset().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getOffset()); + assertEquals(TEST_DATE_TIME.query(TemporalQuery.offset()), TEST_DATE_TIME.getOffset()); + assertEquals(TemporalQuery.offset().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getOffset()); } @Test public void test_query_zone() { - assertEquals(TEST_DATE_TIME.query(Queries.zone()), TEST_DATE_TIME.getZone()); - assertEquals(Queries.zone().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone()); + assertEquals(TEST_DATE_TIME.query(TemporalQuery.zone()), TEST_DATE_TIME.getZone()); + assertEquals(TemporalQuery.zone().queryFrom(TEST_DATE_TIME), TEST_DATE_TIME.getZone()); } @Test(expectedExceptions=NullPointerException.class) @@ -977,14 +982,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withEarlierOffsetAtOverlap() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withEarlierOffsetAtOverlap_notAtOverlap() { ZonedDateTime base = ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0200, ZONE_PARIS); ZonedDateTime test = base.withEarlierOffsetAtOverlap(); assertEquals(test, base); // not changed } - @Test(groups={"tck"}) + @Test public void test_withEarlierOffsetAtOverlap_atOverlap() { ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0100, ZONE_PARIS); ZonedDateTime test = base.withEarlierOffsetAtOverlap(); @@ -992,7 +997,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.toLocalDateTime(), base.toLocalDateTime()); // date-time not changed } - @Test(groups={"tck"}) + @Test public void test_withEarlierOffsetAtOverlap_atOverlap_noChange() { ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0200, ZONE_PARIS); ZonedDateTime test = base.withEarlierOffsetAtOverlap(); @@ -1002,14 +1007,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withLaterOffsetAtOverlap() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withLaterOffsetAtOverlap_notAtOverlap() { ZonedDateTime base = ZonedDateTime.ofStrict(TEST_LOCAL_2008_06_30_11_30_59_500, OFFSET_0200, ZONE_PARIS); ZonedDateTime test = base.withLaterOffsetAtOverlap(); assertEquals(test, base); // not changed } - @Test(groups={"tck"}) + @Test public void test_withLaterOffsetAtOverlap_atOverlap() { ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0200, ZONE_PARIS); ZonedDateTime test = base.withLaterOffsetAtOverlap(); @@ -1017,7 +1022,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.toLocalDateTime(), base.toLocalDateTime()); // date-time not changed } - @Test(groups={"tck"}) + @Test public void test_withLaterOffsetAtOverlap_atOverlap_noChange() { ZonedDateTime base = ZonedDateTime.ofStrict(TEST_PARIS_OVERLAP_2008_10_26_02_30, OFFSET_0100, ZONE_PARIS); ZonedDateTime test = base.withLaterOffsetAtOverlap(); @@ -1027,7 +1032,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withZoneSameLocal(ZoneId) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withZoneSameLocal() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1035,7 +1040,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.toLocalDateTime(), base.toLocalDateTime()); } - @Test(groups={"tck","implementation"}) + @Test public void test_withZoneSameLocal_noChange() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1043,7 +1048,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, base); } - @Test(groups={"tck"}) + @Test public void test_withZoneSameLocal_retainOffset1() { LocalDateTime ldt = LocalDateTime.of(2008, 11, 2, 1, 30, 59, 0); // overlap ZonedDateTime base = ZonedDateTime.of(ldt, ZoneId.of("UTC-04:00") ); @@ -1052,7 +1057,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getOffset(), ZoneOffset.ofHours(-4)); } - @Test(groups={"tck"}) + @Test public void test_withZoneSameLocal_retainOffset2() { LocalDateTime ldt = LocalDateTime.of(2008, 11, 2, 1, 30, 59, 0); // overlap ZonedDateTime base = ZonedDateTime.of(ldt, ZoneId.of("UTC-05:00") ); @@ -1061,7 +1066,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getOffset(), ZoneOffset.ofHours(-5)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_withZoneSameLocal_null() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1071,7 +1076,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withZoneSameInstant() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withZoneSameInstant() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withZoneSameInstant(ZONE_0200); @@ -1079,14 +1084,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, expected); } - @Test(groups={"tck"}) + @Test public void test_withZoneSameInstant_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withZoneSameInstant(ZONE_0100); assertEquals(test, base); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_withZoneSameInstant_null() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); base.withZoneSameInstant(null); @@ -1095,7 +1100,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withFixedOffsetZone() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withZoneLocked() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS); ZonedDateTime test = base.withFixedOffsetZone(); @@ -1104,67 +1109,67 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } //----------------------------------------------------------------------- - // with(WithAdjuster) + // with(TemporalAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_with_WithAdjuster_LocalDateTime_sameOffset() { + @Test + public void test_with_adjuster_LocalDateTime_sameOffset() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS); ZonedDateTime test = base.with(LocalDateTime.of(2012, 7, 15, 14, 30)); check(test, 2012, 7, 15, 14, 30, 0, 0, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_LocalDateTime_adjustedOffset() { + @Test + public void test_with_adjuster_LocalDateTime_adjustedOffset() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS); ZonedDateTime test = base.with(LocalDateTime.of(2012, 1, 15, 14, 30)); check(test, 2012, 1, 15, 14, 30, 0, 0, OFFSET_0100, ZONE_PARIS); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_LocalDate() { + @Test + public void test_with_adjuster_LocalDate() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_PARIS); ZonedDateTime test = base.with(LocalDate.of(2012, 7, 28)); check(test, 2012, 7, 28, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_LocalTime() { + @Test + public void test_with_adjuster_LocalTime() { ZonedDateTime base = ZonedDateTime.of(TEST_PARIS_OVERLAP_2008_10_26_02_30, ZONE_PARIS); ZonedDateTime test = base.with(LocalTime.of(2, 29)); check(test, 2008, 10, 26, 2, 29, 0, 0, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_Year() { + @Test + public void test_with_adjuster_Year() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); ZonedDateTime test = base.with(Year.of(2007)); assertEquals(test, ZonedDateTime.of(ldt.withYear(2007), ZONE_0100)); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_Month_adjustedDayOfMonth() { + @Test + public void test_with_adjuster_Month_adjustedDayOfMonth() { ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(2012, 7, 31, 0, 0), ZONE_PARIS); ZonedDateTime test = base.with(Month.JUNE); check(test, 2012, 6, 30, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_Offset_same() { + @Test + public void test_with_adjuster_Offset_same() { ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(2012, 7, 31, 0, 0), ZONE_PARIS); ZonedDateTime test = base.with(ZoneOffset.ofHours(2)); check(test, 2012, 7, 31, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_Offset_timeAdjust() { + @Test + public void test_with_adjuster_Offset_timeAdjust() { ZonedDateTime base = ZonedDateTime.of(LocalDateTime.of(2012, 7, 31, 0, 0), ZONE_PARIS); ZonedDateTime test = base.with(ZoneOffset.ofHours(1)); - check(test, 2012, 7, 31, 1, 0, 0, 0, OFFSET_0200, ZONE_PARIS); // time adjusted + check(test, 2012, 7, 31, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); // invalid offset ignored } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_LocalDate_retainOffset1() { + @Test + public void test_with_adjuster_LocalDate_retainOffset1() { ZoneId newYork = ZoneId.of("America/New_York"); LocalDateTime ldt = LocalDateTime.of(2008, 11, 1, 1, 30); ZonedDateTime base = ZonedDateTime.of(ldt, newYork); @@ -1173,8 +1178,8 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getOffset(), ZoneOffset.ofHours(-4)); } - @Test(groups={"tck"}) - public void test_with_WithAdjuster_LocalDate_retainOffset2() { + @Test + public void test_with_adjuster_LocalDate_retainOffset2() { ZoneId newYork = ZoneId.of("America/New_York"); LocalDateTime ldt = LocalDateTime.of(2008, 11, 3, 1, 30); ZonedDateTime base = ZonedDateTime.of(ldt, newYork); @@ -1183,23 +1188,176 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getOffset(), ZoneOffset.ofHours(-5)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_with_WithAdjuster_null() { + @Test + public void test_with_adjuster_OffsetDateTime_validOffsetNotInOverlap() { + // ODT will be a valid ZDT for the zone, so must be retained exactly + OffsetDateTime odt = TEST_LOCAL_2008_06_30_11_30_59_500.atOffset(OFFSET_0200); + ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); + ZonedDateTime test = zdt.with(odt); + assertEquals(test.toOffsetDateTime(), odt); + } + + @Test + public void test_with_adjuster_OffsetDateTime_invalidOffsetIgnored() { + // ODT has invalid offset for ZDT, so only LDT is set + OffsetDateTime odt = TEST_LOCAL_2008_06_30_11_30_59_500.atOffset(OFFSET_0130); + ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); + ZonedDateTime test = zdt.with(odt); + assertEquals(test.toLocalDateTime(), TEST_LOCAL_2008_06_30_11_30_59_500); + assertEquals(test.getOffset(), zdt.getOffset()); + } + + @Test + public void test_with_adjuster_OffsetDateTime_retainOffsetInOverlap1() { + // ODT will be a valid ZDT for the zone, so must be retained exactly + OffsetDateTime odt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atOffset(OFFSET_0100); + ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS); + ZonedDateTime test = zdt.with(odt); + assertEquals(test.toOffsetDateTime(), odt); + } + + @Test + public void test_with_adjuster_OffsetDateTime_retainOffsetInOverlap2() { + // ODT will be a valid ZDT for the zone, so must be retained exactly + OffsetDateTime odt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atOffset(OFFSET_0200); + ZonedDateTime zdt = TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS); + ZonedDateTime test = zdt.with(odt); + assertEquals(test.toOffsetDateTime(), odt); + } + + @Test + public void test_with_adjuster_OffsetTime_validOffsetNotInOverlap() { + // OT has valid offset for resulting time + OffsetTime ot = OffsetTime.of(15, 50, 30, 40, OFFSET_0100); + ZonedDateTime zdt = TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS); + ZonedDateTime test = zdt.with(ot); + assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 15, 50, 30, 40)); + assertEquals(test.getOffset(), OFFSET_0100); + } + + @Test + public void test_with_adjuster_OffsetTime_invalidOffsetIgnored1() { + // OT has invalid offset for ZDT, so only LT is set + OffsetTime ot = OffsetTime.of(0, 50, 30, 40, OFFSET_0130); + ZonedDateTime zdt = dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // earlier part of overlap + ZonedDateTime test = zdt.with(ot); + assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 0, 50, 30, 40)); + assertEquals(test.getOffset(), OFFSET_0200); // offset not adjusted + } + + @Test + public void test_with_adjuster_OffsetTime_invalidOffsetIgnored2() { + // OT has invalid offset for ZDT, so only LT is set + OffsetTime ot = OffsetTime.of(15, 50, 30, 40, OFFSET_0130); + ZonedDateTime zdt = dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS); // earlier part of overlap + ZonedDateTime test = zdt.with(ot); + assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 15, 50, 30, 40)); + assertEquals(test.getOffset(), OFFSET_0100); // offset adjusted because of time change + } + + @Test + public void test_with_adjuster_OffsetTime_validOffsetIntoOverlap1() { + // OT has valid offset for resulting time + OffsetTime ot = OffsetTime.of(2, 30, 30, 40, OFFSET_0100); // valid offset in overlap + ZonedDateTime zdt = dateTime(2008, 10, 26, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); // just before overlap + ZonedDateTime test = zdt.with(ot); + assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 2, 30, 30, 40)); + assertEquals(test.getOffset(), OFFSET_0100); + } + + @Test + public void test_with_adjuster_OffsetTime_validOffsetIntoOverlap2() { + // OT has valid offset for resulting time + OffsetTime ot = OffsetTime.of(2, 30, 30, 40, OFFSET_0200); // valid offset in overlap + ZonedDateTime zdt = dateTime(2008, 10, 26, 0, 0, 0, 0, OFFSET_0200, ZONE_PARIS); // just before overlap + ZonedDateTime test = zdt.with(ot); + assertEquals(test.toLocalDateTime(), dateTime(2008, 10, 26, 2, 30, 30, 40)); + assertEquals(test.getOffset(), OFFSET_0200); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_with_adjuster_null() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); base.with((TemporalAdjuster) null); } + //----------------------------------------------------------------------- + // with(long,TemporalUnit) + //----------------------------------------------------------------------- + @DataProvider(name = "withFieldLong") + Object[][] data_withFieldLong() { + return new Object[][] { + // set simple fields + {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), YEAR, 2009, + dateTime(2009, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)}, + {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), MONTH_OF_YEAR, 7, + dateTime(2008, 7, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)}, + {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), DAY_OF_MONTH, 15, + dateTime(2008, 6, 15, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)}, + {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), HOUR_OF_DAY, 14, + dateTime(2008, 6, 30, 14, 30, 59, 500, OFFSET_0200, ZONE_PARIS)}, + + // set around overlap + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), HOUR_OF_DAY, 0, + dateTime(2008, 10, 26, 0, 30, 0, 0, OFFSET_0200, ZONE_PARIS)}, + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), HOUR_OF_DAY, 0, + dateTime(2008, 10, 26, 0, 30, 0, 0, OFFSET_0200, ZONE_PARIS)}, + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), MINUTE_OF_HOUR, 20, + dateTime(2008, 10, 26, 2, 20, 0, 0, OFFSET_0200, ZONE_PARIS)}, // offset unchanged + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), MINUTE_OF_HOUR, 20, + dateTime(2008, 10, 26, 2, 20, 0, 0, OFFSET_0100, ZONE_PARIS)}, // offset unchanged + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), HOUR_OF_DAY, 3, + dateTime(2008, 10, 26, 3, 30, 0, 0, OFFSET_0100, ZONE_PARIS)}, + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), HOUR_OF_DAY, 3, + dateTime(2008, 10, 26, 3, 30, 0, 0, OFFSET_0100, ZONE_PARIS)}, + + // set offset + {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), OFFSET_SECONDS, 7200, + dateTime(2008, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)}, // offset unchanged + {TEST_LOCAL_2008_06_30_11_30_59_500.atZone(ZONE_PARIS), OFFSET_SECONDS, 3600, + dateTime(2008, 6, 30, 11, 30, 59, 500, OFFSET_0200, ZONE_PARIS)}, // invalid offset ignored + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), OFFSET_SECONDS, 3600, + dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0100, ZONE_PARIS)}, + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), OFFSET_SECONDS, 3600, + dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0100, ZONE_PARIS)}, + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withEarlierOffsetAtOverlap(), OFFSET_SECONDS, 7200, + dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS)}, + {TEST_PARIS_OVERLAP_2008_10_26_02_30.atZone(ZONE_PARIS).withLaterOffsetAtOverlap(), OFFSET_SECONDS, 7200, + dateTime(2008, 10, 26, 2, 30, 0, 0, OFFSET_0200, ZONE_PARIS)}, + }; + }; + + @Test(dataProvider = "withFieldLong") + public void test_with_fieldLong(ZonedDateTime base, TemporalField setField, int setValue, ZonedDateTime expected) { + assertEquals(base.with(setField, setValue), expected); + } + + @Test(dataProvider = "withFieldLong") + public void test_with_adjuster_ensureZoneOffsetConsistent(ZonedDateTime base, TemporalField setField, int setValue, ZonedDateTime expected) { + if (setField == OFFSET_SECONDS) { + assertEquals(base.with(ZoneOffset.ofTotalSeconds(setValue)), expected); + } + } + + @Test(dataProvider = "withFieldLong") + public void test_with_adjuster_ensureOffsetDateTimeConsistent(ZonedDateTime base, TemporalField setField, int setValue, ZonedDateTime expected) { + if (setField == OFFSET_SECONDS) { + OffsetDateTime odt = base.toOffsetDateTime().with(setField, setValue); + assertEquals(base.with(odt), expected); + } + } + //----------------------------------------------------------------------- // withYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withYear_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withYear(2007); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withYear(2007), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withYear_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withYear(2008); @@ -1209,14 +1367,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // with(Month) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth_Month_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.with(JANUARY); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withMonth(1), ZONE_0100)); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void test_withMonth_Month_null() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); base.with((Month) null); @@ -1225,26 +1383,26 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMonth_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withMonth(1); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withMonth(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withMonth_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withMonth(6); assertEquals(test, base); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_tooBig() { TEST_DATE_TIME.withMonth(13); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withMonth_tooSmall() { TEST_DATE_TIME.withMonth(0); } @@ -1252,31 +1410,31 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withDayOfMonth(15); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withDayOfMonth(15), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withDayOfMonth_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withDayOfMonth(30); assertEquals(test, base); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_tooBig() { LocalDateTime.of(2007, 7, 2, 11, 30).atZone(ZONE_PARIS).withDayOfMonth(32); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_tooSmall() { TEST_DATE_TIME.withDayOfMonth(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfMonth_invalid31() { LocalDateTime.of(2007, 6, 2, 11, 30).atZone(ZONE_PARIS).withDayOfMonth(31); } @@ -1284,14 +1442,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withDayOfYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withDayOfYear_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withDayOfYear(33); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withDayOfYear(33), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withDayOfYear_noChange() { LocalDateTime ldt = LocalDateTime.of(2008, 2, 5, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1299,17 +1457,17 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, base); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_tooBig() { TEST_DATE_TIME.withDayOfYear(367); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_tooSmall() { TEST_DATE_TIME.withDayOfYear(0); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_withDayOfYear_invalid366() { LocalDateTime.of(2007, 2, 2, 11, 30).atZone(ZONE_PARIS).withDayOfYear(366); } @@ -1317,14 +1475,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withHour() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withHour_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withHour(15); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withHour(15), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withHour_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withHour(11); @@ -1334,14 +1492,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withMinute() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withMinute_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withMinute(15); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withMinute(15), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withMinute_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withMinute(30); @@ -1351,14 +1509,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withSecond_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withSecond(12); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withSecond(12), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withSecond_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withSecond(59); @@ -1368,14 +1526,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // withNano() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_normal() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withNano(15); assertEquals(test, ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500.withNano(15), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_withNanoOfSecond_noChange() { ZonedDateTime base = ZonedDateTime.of(TEST_LOCAL_2008_06_30_11_30_59_500, ZONE_0100); ZonedDateTime test = base.withNano(500); @@ -1385,14 +1543,14 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // truncatedTo(TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_truncatedTo_normal() { assertEquals(TEST_DATE_TIME.truncatedTo(NANOS), TEST_DATE_TIME); assertEquals(TEST_DATE_TIME.truncatedTo(SECONDS), TEST_DATE_TIME.withNano(0)); assertEquals(TEST_DATE_TIME.truncatedTo(DAYS), TEST_DATE_TIME.with(LocalTime.MIDNIGHT)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_truncatedTo_null() { TEST_DATE_TIME.truncatedTo(null); } @@ -1444,22 +1602,22 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(TemporalAmount) //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusDays") + @Test(dataProvider="plusDays") public void test_plus_TemporalAmount_Period_days(ZonedDateTime base, int amount, ZonedDateTime expected) { assertEquals(base.plus(Period.ofDays(amount)), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plus_TemporalAmount_Period_hours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(MockSimplePeriod.of(amount, HOURS)), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plus_TemporalAmount_Duration_hours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(Duration.ofHours(amount)), expected); } - @Test(groups={"tck"}) + @Test public void test_plus_TemporalAmount() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100); @@ -1467,7 +1625,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(t.plus(period), expected); } - @Test(groups={"tck"}) + @Test public void test_plus_TemporalAmount_Duration() { Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L); ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100); @@ -1475,19 +1633,19 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(t.plus(duration), expected); } - @Test(groups={"tck"}) + @Test public void test_plus_TemporalAmount_Period_zero() { ZonedDateTime t = TEST_DATE_TIME.plus(MockSimplePeriod.ZERO_DAYS); assertEquals(t, TEST_DATE_TIME); } - @Test(groups={"tck"}) + @Test public void test_plus_TemporalAmount_Duration_zero() { ZonedDateTime t = TEST_DATE_TIME.plus(Duration.ZERO); assertEquals(t, TEST_DATE_TIME); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_TemporalAmount_null() { TEST_DATE_TIME.plus((TemporalAmount) null); } @@ -1495,32 +1653,32 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plus(long,TemporalUnit) //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusDays") + @Test(dataProvider="plusDays") public void test_plus_longUnit_days(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(amount, DAYS), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plus_longUnit_hours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(amount, HOURS), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plus_longUnit_minutes(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(amount * 60, MINUTES), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plus_longUnit_seconds(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(amount * 3600, SECONDS), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plus_longUnit_nanos(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plus(amount * 3600_000_000_000L, NANOS), expected); } - @Test(groups={"tck"}, expectedExceptions=NullPointerException.class) + @Test(expectedExceptions=NullPointerException.class) public void test_plus_longUnit_null() { TEST_DATE_TIME_PARIS.plus(0, null); } @@ -1528,7 +1686,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusYears() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1536,7 +1694,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, ZonedDateTime.of(ldt.plusYears(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_plusYears_zero() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1547,7 +1705,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusMonths() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1555,7 +1713,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, ZonedDateTime.of(ldt.plusMonths(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_plusMonths_zero() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1566,7 +1724,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusWeeks() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_plusWeeks() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1574,7 +1732,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, ZonedDateTime.of(ldt.plusWeeks(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_plusWeeks_zero() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1585,7 +1743,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusDays() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusDays") + @Test(dataProvider="plusDays") public void test_plusDays(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plusDays(amount), expected); } @@ -1593,7 +1751,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plusHours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plusHours(amount), expected); } @@ -1601,12 +1759,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plusMinutes(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plusMinutes(amount * 60), expected); } - @Test(groups={"tck"}) + @Test public void test_plusMinutes_minutes() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1617,12 +1775,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plusSeconds(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plusSeconds(amount * 3600), expected); } - @Test(groups={"tck"}) + @Test public void test_plusSeconds_seconds() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1633,12 +1791,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // plusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_plusNanos(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.plusNanos(amount * 3600_000_000_000L), expected); } - @Test(groups={"tck"}) + @Test public void test_plusNanos_nanos() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1649,22 +1807,22 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minus(TemporalAmount) //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusDays") + @Test(dataProvider="plusDays") public void test_minus_TemporalAmount_Period_days(ZonedDateTime base, int amount, ZonedDateTime expected) { assertEquals(base.minus(Period.ofDays(-amount)), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_minus_TemporalAmount_Period_hours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minus(MockSimplePeriod.of(-amount, HOURS)), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_minus_TemporalAmount_Duration_hours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minus(Duration.ofHours(-amount)), expected); } - @Test(groups={"tck"}) + @Test public void test_minus_TemporalAmount() { MockSimplePeriod period = MockSimplePeriod.of(7, ChronoUnit.MONTHS); ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100); @@ -1672,7 +1830,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(t.minus(period), expected); } - @Test(groups={"tck"}) + @Test public void test_minus_TemporalAmount_Duration() { Duration duration = Duration.ofSeconds(4L * 60 * 60 + 5L * 60 + 6L); ZonedDateTime t = ZonedDateTime.of(LocalDateTime.of(2008, 6, 1, 12, 30, 59, 500), ZONE_0100); @@ -1680,19 +1838,19 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(t.minus(duration), expected); } - @Test(groups={"tck"}) + @Test public void test_minus_TemporalAmount_Period_zero() { ZonedDateTime t = TEST_DATE_TIME.minus(MockSimplePeriod.ZERO_DAYS); assertEquals(t, TEST_DATE_TIME); } - @Test(groups={"tck"}) + @Test public void test_minus_TemporalAmount_Duration_zero() { ZonedDateTime t = TEST_DATE_TIME.minus(Duration.ZERO); assertEquals(t, TEST_DATE_TIME); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_minus_TemporalAmount_null() { TEST_DATE_TIME.minus((TemporalAmount) null); } @@ -1700,7 +1858,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusYears() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusYears() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1708,7 +1866,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, ZonedDateTime.of(ldt.minusYears(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_minusYears_zero() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1719,7 +1877,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMonths() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusMonths() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1727,7 +1885,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, ZonedDateTime.of(ldt.minusMonths(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_minusMonths_zero() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1738,7 +1896,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusWeeks() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_minusWeeks() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1746,7 +1904,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test, ZonedDateTime.of(ldt.minusWeeks(1), ZONE_0100)); } - @Test(groups={"tck"}) + @Test public void test_minusWeeks_zero() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1757,7 +1915,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusDays() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusDays") + @Test(dataProvider="plusDays") public void test_minusDays(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minusDays(-amount), expected); } @@ -1765,7 +1923,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusHours() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_minusHours(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minusHours(-amount), expected); } @@ -1773,12 +1931,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusMinutes() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_minusMinutes(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minusMinutes(-amount * 60), expected); } - @Test(groups={"tck"}) + @Test public void test_minusMinutes_minutes() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1789,12 +1947,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusSeconds() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_minusSeconds(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minusSeconds(-amount * 3600), expected); } - @Test(groups={"tck"}) + @Test public void test_minusSeconds_seconds() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1805,12 +1963,12 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // minusNanos() //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_minusNanos(ZonedDateTime base, long amount, ZonedDateTime expected) { assertEquals(base.minusNanos(-amount * 3600_000_000_000L), expected); } - @Test(groups={"tck"}) + @Test public void test_minusNanos_nanos() { LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 23, 30, 59, 0); ZonedDateTime base = ZonedDateTime.of(ldt, ZONE_0100); @@ -1824,32 +1982,35 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { // TODO: more tests for period between two different zones // compare results to OffsetDateTime.periodUntil, especially wrt dates - @Test(groups={"tck"}, dataProvider="plusDays") + @Test(dataProvider="plusDays") public void test_periodUntil_days(ZonedDateTime base, long expected, ZonedDateTime end) { + if (base.toLocalTime().equals(end.toLocalTime()) == false) { + return; // avoid DST gap input values + } assertEquals(base.periodUntil(end, DAYS), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_periodUntil_hours(ZonedDateTime base, long expected, ZonedDateTime end) { assertEquals(base.periodUntil(end, HOURS), expected); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_periodUntil_minutes(ZonedDateTime base, long expected, ZonedDateTime end) { assertEquals(base.periodUntil(end, MINUTES), expected * 60); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_periodUntil_seconds(ZonedDateTime base, long expected, ZonedDateTime end) { assertEquals(base.periodUntil(end, SECONDS), expected * 3600); } - @Test(groups={"tck"}, dataProvider="plusTime") + @Test(dataProvider="plusTime") public void test_periodUntil_nanos(ZonedDateTime base, long expected, ZonedDateTime end) { assertEquals(base.periodUntil(end, NANOS), expected * 3600_000_000_000L); } - @Test(groups={"tck"}) + @Test public void test_periodUntil_parisLondon() { ZonedDateTime midnightLondon = LocalDate.of(2012, 6, 28).atStartOfDay(ZONE_LONDON); ZonedDateTime midnightParis1 = LocalDate.of(2012, 6, 29).atStartOfDay(ZONE_PARIS); @@ -1865,7 +2026,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(midnightLondon.periodUntil(midnightParis2, DAYS), 1); } - @Test(groups={"tck"}) + @Test public void test_periodUntil_gap() { ZonedDateTime before = TEST_PARIS_GAP_2008_03_30_02_30.withHour(0).withMinute(0).atZone(ZONE_PARIS); ZonedDateTime after = TEST_PARIS_GAP_2008_03_30_02_30.withHour(0).withMinute(0).plusDays(1).atZone(ZONE_PARIS); @@ -1874,7 +2035,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(before.periodUntil(after, DAYS), 1); } - @Test(groups={"tck"}) + @Test public void test_periodUntil_overlap() { ZonedDateTime before = TEST_PARIS_OVERLAP_2008_10_26_02_30.withHour(0).withMinute(0).atZone(ZONE_PARIS); ZonedDateTime after = TEST_PARIS_OVERLAP_2008_10_26_02_30.withHour(0).withMinute(0).plusDays(1).atZone(ZONE_PARIS); @@ -1883,25 +2044,40 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(before.periodUntil(after, DAYS), 1); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_periodUntil_differentType() { TEST_DATE_TIME_PARIS.periodUntil(TEST_LOCAL_2008_06_30_11_30_59_500, DAYS); } - @Test(groups={"tck"}, expectedExceptions=NullPointerException.class) + @Test(expectedExceptions=NullPointerException.class) public void test_periodUntil_nullTemporal() { TEST_DATE_TIME_PARIS.periodUntil(null, DAYS); } - @Test(groups={"tck"}, expectedExceptions=NullPointerException.class) + @Test(expectedExceptions=NullPointerException.class) public void test_periodUntil_nullUnit() { TEST_DATE_TIME_PARIS.periodUntil(TEST_DATE_TIME_PARIS, null); } + //----------------------------------------------------------------------- + // format(DateTimeFormatter) + //----------------------------------------------------------------------- + @Test + public void test_format_formatter() { + DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); + String t = ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).format(f); + assertEquals(t, "2010 12 3 11 30 0"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_format_formatter_null() { + ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).format(null); + } + //----------------------------------------------------------------------- // toOffsetDateTime() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toOffsetDateTime() { assertEquals(TEST_DATE_TIME.toOffsetDateTime(), OffsetDateTime.of(TEST_DATE_TIME.toLocalDateTime(), TEST_DATE_TIME.getOffset())); } @@ -1923,7 +2099,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }; } - @Test(groups={"tck"}, dataProvider="toInstant") + @Test(dataProvider="toInstant") public void test_toInstant_UTC(LocalDateTime ldt, long expectedEpSec, int expectedNos) { ZonedDateTime dt = ldt.atZone(ZoneOffset.UTC); Instant test = dt.toInstant(); @@ -1931,7 +2107,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getNano(), expectedNos); } - @Test(groups={"tck"}, dataProvider="toInstant") + @Test(dataProvider="toInstant") public void test_toInstant_P0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) { ZonedDateTime dt = ldt.atZone(ZONE_0100); Instant test = dt.toInstant(); @@ -1939,7 +2115,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(test.getNano(), expectedNos); } - @Test(groups={"tck"}, dataProvider="toInstant") + @Test(dataProvider="toInstant") public void test_toInstant_M0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) { ZonedDateTime dt = ldt.atZone(ZONE_M0100); Instant test = dt.toInstant(); @@ -1950,7 +2126,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // toEpochSecond() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toEpochSecond_afterEpoch() { LocalDateTime ldt = LocalDateTime.of(1970, 1, 1, 0, 0).plusHours(1); for (int i = 0; i < 100000; i++) { @@ -1960,7 +2136,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}) + @Test public void test_toEpochSecond_beforeEpoch() { LocalDateTime ldt = LocalDateTime.of(1970, 1, 1, 0, 0).plusHours(1); for (int i = 0; i < 100000; i++) { @@ -1970,19 +2146,19 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { } } - @Test(groups={"tck"}, dataProvider="toInstant") + @Test(dataProvider="toInstant") public void test_toEpochSecond_UTC(LocalDateTime ldt, long expectedEpSec, int expectedNos) { ZonedDateTime dt = ldt.atZone(ZoneOffset.UTC); assertEquals(dt.toEpochSecond(), expectedEpSec); } - @Test(groups={"tck"}, dataProvider="toInstant") + @Test(dataProvider="toInstant") public void test_toEpochSecond_P0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) { ZonedDateTime dt = ldt.atZone(ZONE_0100); assertEquals(dt.toEpochSecond(), expectedEpSec - 3600); } - @Test(groups={"tck"}, dataProvider="toInstant") + @Test(dataProvider="toInstant") public void test_toEpochSecond_M0100(LocalDateTime ldt, long expectedEpSec, int expectedNos) { ZonedDateTime dt = ldt.atZone(ZONE_M0100); assertEquals(dt.toEpochSecond(), expectedEpSec + 3600); @@ -1991,7 +2167,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_compareTo_time1() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 39, 0, ZONE_0100); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 41, 0, ZONE_0100); // a is before b due to time @@ -2001,7 +2177,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_time2() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 4, ZONE_0100); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 5, ZONE_0100); // a is before b due to time @@ -2011,7 +2187,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_offset1() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 41, 0, ZONE_0200); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 39, 0, ZONE_0100); // a is before b due to offset @@ -2021,7 +2197,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_offset2() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 5, ZoneId.of("UTC+01:01")); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 30, 40, 4, ZONE_0100); // a is before b due to offset @@ -2031,7 +2207,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_both() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 50, 0, 0, ZONE_0200); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 20, 0, 0, ZONE_0100); // a is before b on instant scale @@ -2041,7 +2217,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_bothNanos() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 11, 20, 40, 5, ZONE_0200); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 10, 20, 40, 6, ZONE_0100); // a is before b on instant scale @@ -2051,7 +2227,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_hourDifference() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 10, 0, 0, 0, ZONE_0100); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, 11, 0, 0, 0, ZONE_0200); // a is before b despite being same time-line time @@ -2061,7 +2237,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.compareTo(b) == 0, true); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_compareTo_null() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 23, 30, 59, 0, ZONE_0100); a.compareTo(null); @@ -2079,7 +2255,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="IsBefore", groups={"tck"}) + @Test(dataProvider="IsBefore") public void test_isBefore(int hour1, int minute1, ZoneId zone1, int hour2, int minute2, ZoneId zone2, boolean expected) { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, hour1, minute1, 0, 0, zone1); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, hour2, minute2, 0, 0, zone2); @@ -2089,7 +2265,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.isBefore(b), false); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isBefore_null() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 23, 30, 59, 0, ZONE_0100); a.isBefore(null); @@ -2107,7 +2283,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="IsAfter", groups={"tck"}) + @Test(dataProvider="IsAfter") public void test_isAfter(int hour1, int minute1, ZoneId zone1, int hour2, int minute2, ZoneId zone2, boolean expected) { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, hour1, minute1, 0, 0, zone1); ZonedDateTime b = ZonedDateTime.of(2008, 6, 30, hour2, minute2, 0, 0, zone2); @@ -2117,7 +2293,7 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { assertEquals(b.isAfter(b), false); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_isAfter_null() { ZonedDateTime a = ZonedDateTime.of(2008, 6, 30, 23, 30, 59, 0, ZONE_0100); a.isAfter(null); @@ -2126,60 +2302,60 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_true(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); assertEquals(a.equals(b), true); assertEquals(a.hashCode() == b.hashCode(), true); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_year_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y + 1, o, d, h, m, s, n), ZONE_0100); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_hour_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { h = (h == 23 ? 22 : h); ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h + 1, m, s, n), ZONE_0100); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_minute_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { m = (m == 59 ? 58 : m); ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m + 1, s, n), ZONE_0100); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_second_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { s = (s == 59 ? 58 : s); ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s + 1, n), ZONE_0100); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_nano_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { n = (n == 999999999 ? 999999998 : n); ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n + 1), ZONE_0100); assertEquals(a.equals(b), false); } - @Test(dataProvider="sampleTimes", groups={"tck"}) + @Test(dataProvider="sampleTimes") public void test_equals_false_offset_differs(int y, int o, int d, int h, int m, int s, int n, ZoneId ignored) { ZonedDateTime a = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0100); ZonedDateTime b = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZONE_0200); assertEquals(a.equals(b), false); } - @Test(groups={"tck"}) + @Test public void test_equals_itself_true() { assertEquals(TEST_DATE_TIME.equals(TEST_DATE_TIME), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { assertEquals(TEST_DATE_TIME.equals("2007-07-15"), false); } @@ -2204,28 +2380,13 @@ public class TCKZonedDateTime extends AbstractDateTimeTest { }; } - @Test(dataProvider="sampleToString", groups={"tck"}) + @Test(dataProvider="sampleToString") public void test_toString(int y, int o, int d, int h, int m, int s, int n, String zoneId, String expected) { ZonedDateTime t = ZonedDateTime.of(dateTime(y, o, d, h, m, s, n), ZoneId.of(zoneId)); String str = t.toString(); assertEquals(str, expected); } - //----------------------------------------------------------------------- - // toString(DateTimeFormatter) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_toString_formatter() { - DateTimeFormatter f = DateTimeFormatter.ofPattern("y M d H m s"); - String t = ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).toString(f); - assertEquals(t, "2010 12 3 11 30 0"); - } - - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_toString_formatter_null() { - ZonedDateTime.of(dateTime(2010, 12, 3, 11, 30), ZONE_PARIS).toString(null); - } - //------------------------------------------------------------------------- private static LocalDateTime dateTime( int year, int month, int dayOfMonth, diff --git a/jdk/test/java/time/tck/java/time/TestChronology.java b/jdk/test/java/time/tck/java/time/TestChronology.java deleted file mode 100644 index b186cd315eb..00000000000 --- a/jdk/test/java/time/tck/java/time/TestChronology.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * This file is available under and governed by the GNU General Public - * License version 2 only, as published by the Free Software Foundation. - * However, the following notice accompanied the original version of this - * file: - * - * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of JSR-310 nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package tck.java.time; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertSame; -import static org.testng.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.util.Locale; -import java.util.Set; - -import java.time.chrono.Chronology; -import java.time.temporal.ChronoField; -import java.time.chrono.HijrahChronology; -import java.time.chrono.JapaneseChronology; -import java.time.chrono.MinguoChronology; -import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.IsoChronology; - -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -/** - * Test Chronology class. - */ -@Test -public class TestChronology { - - //----------------------------------------------------------------------- - // regular data factory for names and descriptions of available calendars - //----------------------------------------------------------------------- - @DataProvider(name = "calendars") - Object[][] data_of_calendars() { - return new Object[][] { - {"Hijrah", "islamicc", "Hijrah calendar"}, - {"ISO", "iso8601", "ISO calendar"}, - {"Japanese", "japanese", "Japanese calendar"}, - {"Minguo", "roc", "Minguo Calendar"}, - {"ThaiBuddhist", "buddhist", "ThaiBuddhist calendar"}, - }; - } - - @Test(dataProvider = "calendars") - public void test_getters(String chronoId, String calendarSystemType, String description) { - Chronology chrono = Chronology.of(chronoId); - assertNotNull(chrono, "Required calendar not found by ID: " + chronoId); - assertEquals(chrono.getId(), chronoId); - assertEquals(chrono.getCalendarType(), calendarSystemType); - } - - @Test(dataProvider = "calendars") - public void test_required_calendars(String chronoId, String calendarSystemType, String description) { - Chronology chrono = Chronology.of(chronoId); - assertNotNull(chrono, "Required calendar not found by ID: " + chronoId); - chrono = Chronology.of(calendarSystemType); - assertNotNull(chrono, "Required calendar not found by type: " + chronoId); - Set cals = Chronology.getAvailableChronologies(); - assertTrue(cals.contains(chrono), "Required calendar not found in set of available calendars"); - } - - @Test(groups="tck") - public void test_calendar_list() { - Set chronos = Chronology.getAvailableChronologies(); - assertNotNull(chronos, "Required list of calendars must be non-null"); - for (Chronology chrono : chronos) { - Chronology lookup = Chronology.of(chrono.getId()); - assertNotNull(lookup, "Required calendar not found: " + chrono); - } - assertEquals(chronos.size() >= data_of_calendars().length, true, "Chronology.getAvailableChronologies().size = " + chronos.size() - + ", expected >= " + data_of_calendars().length); - } - - /** - * Compute the number of days from the Epoch and compute the date from the number of days. - */ - @Test(dataProvider = "calendars", groups="tck") - public void test_epoch(String name, String alias, String description) { - Chronology chrono = Chronology.of(name); // a chronology. In practice this is rarely hardcoded - ChronoLocalDate date1 = chrono.dateNow(); - long epoch1 = date1.getLong(ChronoField.EPOCH_DAY); - ChronoLocalDate date2 = date1.with(ChronoField.EPOCH_DAY, epoch1); - assertEquals(date1, date2, "Date from epoch day is not same date: " + date1 + " != " + date2); - long epoch2 = date1.getLong(ChronoField.EPOCH_DAY); - assertEquals(epoch1, epoch2, "Epoch day not the same: " + epoch1 + " != " + epoch2); - } - - //----------------------------------------------------------------------- - // locale based lookup - //----------------------------------------------------------------------- - @DataProvider(name = "calendarsystemtype") - Object[][] data_CalendarType() { - return new Object[][] { - {HijrahChronology.INSTANCE, "islamicc"}, - {IsoChronology.INSTANCE, "iso8601"}, - {JapaneseChronology.INSTANCE, "japanese"}, - {MinguoChronology.INSTANCE, "roc"}, - {ThaiBuddhistChronology.INSTANCE, "buddhist"}, - }; - } - - @Test(dataProvider = "calendarsystemtype", groups="tck") - public void test_getCalendarType(Chronology chrono, String calendarType) { - assertEquals(chrono.getCalendarType(), calendarType); - } - - @Test(dataProvider = "calendarsystemtype", groups="tck") - public void test_lookupLocale(Chronology chrono, String calendarType) { - Locale locale = new Locale.Builder().setLanguage("en").setRegion("CA").setUnicodeLocaleKeyword("ca", calendarType).build(); - assertEquals(Chronology.ofLocale(locale), chrono); - } - - - //----------------------------------------------------------------------- - // serialization; serialize and check each calendar system - //----------------------------------------------------------------------- - @Test(groups={"tck","implementation"}, dataProvider = "calendarsystemtype") - public void test_chronoSerializationSingleton(Chronology chrono, String calendarType) throws Exception { - Chronology orginal = chrono; - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(orginal); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - Chronology ser = (Chronology) in.readObject(); - assertSame(ser, chrono, "Deserialized Chronology is not the singleton serialized"); - } - -} diff --git a/jdk/test/java/time/tck/java/time/TestIsoChronology.java b/jdk/test/java/time/tck/java/time/TestIsoChronology.java index aa42e4a0ca0..c99ec2a3ac4 100644 --- a/jdk/test/java/time/tck/java/time/TestIsoChronology.java +++ b/jdk/test/java/time/tck/java/time/TestIsoChronology.java @@ -59,8 +59,8 @@ */ package tck.java.time; -import static java.time.chrono.IsoChronology.ERA_BCE; -import static java.time.chrono.IsoChronology.ERA_CE; +import static java.time.chrono.IsoEra.BCE; +import static java.time.chrono.IsoEra.CE; import static java.time.temporal.ChronoField.ERA; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; @@ -73,13 +73,14 @@ import java.time.DateTimeException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; -import java.time.temporal.Adjusters; -import java.time.temporal.ChronoField; -import java.time.chrono.HijrahChronology; import java.time.chrono.Chronology; -import java.time.chrono.ChronoLocalDate; import java.time.chrono.Era; +import java.time.chrono.HijrahChronology; +import java.time.chrono.HijrahEra; import java.time.chrono.IsoChronology; +import java.time.chrono.IsoEra; +import java.time.temporal.ChronoField; +import java.time.temporal.TemporalAdjuster; import org.testng.Assert; import org.testng.annotations.DataProvider; @@ -94,7 +95,7 @@ public class TestIsoChronology { //----------------------------------------------------------------------- // Chronology.ofName("ISO") Lookup by name //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_chrono_byName() { Chronology c = IsoChronology.INSTANCE; Chronology test = Chronology.of("ISO"); @@ -107,7 +108,7 @@ public class TestIsoChronology { //----------------------------------------------------------------------- // Lookup by Singleton //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void instanceNotNull() { assertNotNull(IsoChronology.INSTANCE); } @@ -115,10 +116,10 @@ public class TestIsoChronology { //----------------------------------------------------------------------- // Era creation //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_eraOf() { - assertEquals(IsoChronology.INSTANCE.eraOf(0), ERA_BCE); - assertEquals(IsoChronology.INSTANCE.eraOf(1), ERA_CE); + assertEquals(IsoChronology.INSTANCE.eraOf(0), BCE); + assertEquals(IsoChronology.INSTANCE.eraOf(1), CE); } //----------------------------------------------------------------------- @@ -144,12 +145,12 @@ public class TestIsoChronology { }; } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_toLocalDate(LocalDate isoDate, LocalDate iso) { assertEquals(LocalDate.from(isoDate), iso); } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_fromCalendrical(LocalDate isoDate, LocalDate iso) { assertEquals(IsoChronology.INSTANCE.date(iso), isoDate); } @@ -174,18 +175,18 @@ public class TestIsoChronology { }; } - @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class) public void test_badDates(int year, int month, int dom) { IsoChronology.INSTANCE.date(year, month, dom); } - @Test(groups="tck") + @Test public void test_date_withEra() { int year = 5; int month = 5; int dayOfMonth = 5; - LocalDate test = IsoChronology.INSTANCE.date(ERA_BCE, year, month, dayOfMonth); - assertEquals(test.getEra(), ERA_BCE); + LocalDate test = IsoChronology.INSTANCE.date(IsoEra.BCE, year, month, dayOfMonth); + assertEquals(test.getEra(), IsoEra.BCE); assertEquals(test.get(ChronoField.YEAR_OF_ERA), year); assertEquals(test.get(ChronoField.MONTH_OF_YEAR), month); assertEquals(test.get(ChronoField.DAY_OF_MONTH), dayOfMonth); @@ -196,39 +197,39 @@ public class TestIsoChronology { } @SuppressWarnings({ "unchecked", "rawtypes" }) - @Test(expectedExceptions=DateTimeException.class, groups="tck") + @Test(expectedExceptions=ClassCastException.class) public void test_date_withEra_withWrongEra() { - IsoChronology.INSTANCE.date((Era) HijrahChronology.ERA_AH, 1, 1, 1); + IsoChronology.INSTANCE.date((Era) HijrahEra.AH, 1, 1, 1); } //----------------------------------------------------------------------- // with(DateTimeAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust1() { LocalDate base = IsoChronology.INSTANCE.date(1728, 10, 28); - LocalDate test = base.with(Adjusters.lastDayOfMonth()); + LocalDate test = base.with(TemporalAdjuster.lastDayOfMonth()); assertEquals(test, IsoChronology.INSTANCE.date(1728, 10, 31)); } - @Test(groups={"tck"}) + @Test public void test_adjust2() { LocalDate base = IsoChronology.INSTANCE.date(1728, 12, 2); - LocalDate test = base.with(Adjusters.lastDayOfMonth()); + LocalDate test = base.with(TemporalAdjuster.lastDayOfMonth()); assertEquals(test, IsoChronology.INSTANCE.date(1728, 12, 31)); } //----------------------------------------------------------------------- // ISODate.with(Local*) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust_toLocalDate() { LocalDate isoDate = IsoChronology.INSTANCE.date(1726, 1, 4); LocalDate test = isoDate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, IsoChronology.INSTANCE.date(2012, 7, 6)); } - @Test(groups={"tck"}) + @Test public void test_adjust_toMonth() { LocalDate isoDate = IsoChronology.INSTANCE.date(1726, 1, 4); assertEquals(IsoChronology.INSTANCE.date(1726, 4, 4), isoDate.with(Month.APRIL)); @@ -237,14 +238,14 @@ public class TestIsoChronology { //----------------------------------------------------------------------- // LocalDate.with(ISODate) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_LocalDate_adjustToISODate() { LocalDate isoDate = IsoChronology.INSTANCE.date(1728, 10, 29); LocalDate test = LocalDate.MIN.with(isoDate); assertEquals(test, LocalDate.of(1728, 10, 29)); } - @Test(groups={"tck"}) + @Test public void test_LocalDateTime_adjustToISODate() { LocalDate isoDate = IsoChronology.INSTANCE.date(1728, 10, 29); LocalDateTime test = LocalDateTime.MIN.with(isoDate); @@ -266,7 +267,7 @@ public class TestIsoChronology { }; } - @Test(dataProvider="leapYears", groups="tck") + @Test(dataProvider="leapYears") public void test_isLeapYear(int year, boolean isLeapYear) { assertEquals(IsoChronology.INSTANCE.isLeapYear(year), isLeapYear); } @@ -274,7 +275,7 @@ public class TestIsoChronology { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_now() { assertEquals(LocalDate.from(IsoChronology.INSTANCE.dateNow()), LocalDate.now()); } @@ -293,7 +294,7 @@ public class TestIsoChronology { }; } - @Test(dataProvider="toString", groups={"tck"}) + @Test(dataProvider="toString") public void test_toString(LocalDate isoDate, String expected) { assertEquals(isoDate.toString(), expected); } @@ -301,12 +302,12 @@ public class TestIsoChronology { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_equals_true() { assertTrue(IsoChronology.INSTANCE.equals(IsoChronology.INSTANCE)); } - @Test(groups="tck") + @Test public void test_equals_false() { assertFalse(IsoChronology.INSTANCE.equals(HijrahChronology.INSTANCE)); } diff --git a/jdk/test/java/time/tck/java/time/chrono/CopticChronology.java b/jdk/test/java/time/tck/java/time/chrono/CopticChronology.java index 5c55d7593cc..c111eed3658 100644 --- a/jdk/test/java/time/tck/java/time/chrono/CopticChronology.java +++ b/jdk/test/java/time/tck/java/time/chrono/CopticChronology.java @@ -59,18 +59,17 @@ package tck.java.time.chrono; import static java.time.temporal.ChronoField.EPOCH_DAY; import java.io.Serializable; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; -import java.time.DateTimeException; import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; import java.time.temporal.ValueRange; import java.time.chrono.Chronology; -import java.time.chrono.ChronoLocalDate; import java.time.chrono.Era; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; + /** * The Coptic calendar system. *

      @@ -102,16 +101,6 @@ public final class CopticChronology extends Chronology implements Serializable { * Singleton instance of the Coptic chronology. */ public static final CopticChronology INSTANCE = new CopticChronology(); - /** - * The singleton instance for the era BEFORE_AM. - * This has the numeric value of {@code 0}. - */ - public static final Era ERA_BEFORE_AM = CopticEra.BEFORE_AM; - /** - * The singleton instance for the era AM - 'Era of the Martyrs'. - * This has the numeric value of {@code 1}. - */ - public static final Era ERA_AM = CopticEra.AM; /** * Serialization version. @@ -192,6 +181,11 @@ public final class CopticChronology extends Chronology implements Serializable { return new CopticDate(prolepticYear, (dayOfYear - 1) / 30 + 1, (dayOfYear - 1) % 30 + 1); } + @Override + public CopticDate dateEpochDay(long epochDay) { + return CopticDate.ofEpochDay(epochDay); + } + @Override public CopticDate date(TemporalAccessor dateTime) { if (dateTime instanceof CopticDate) { @@ -219,7 +213,7 @@ public final class CopticChronology extends Chronology implements Serializable { @Override public int prolepticYear(Era era, int yearOfEra) { if (era instanceof CopticEra == false) { - throw new DateTimeException("Era must be CopticEra"); + throw new ClassCastException("Era must be CopticEra"); } return (era == CopticEra.AM ? yearOfEra : 1 - yearOfEra); } @@ -241,7 +235,7 @@ public final class CopticChronology extends Chronology implements Serializable { case DAY_OF_MONTH: return ValueRange.of(1, 5, 30); case ALIGNED_WEEK_OF_MONTH: return ValueRange.of(1, 1, 5); case MONTH_OF_YEAR: return ValueRange.of(1, 13); - case EPOCH_MONTH: return ValueRange.of(-1000, 1000); // TODO + case PROLEPTIC_MONTH: return ValueRange.of(-1000, 1000); // TODO case YEAR_OF_ERA: return ValueRange.of(1, 999, 1000); // TODO case YEAR: return ValueRange.of(-1000, 1000); // TODO } diff --git a/jdk/test/java/time/tck/java/time/chrono/CopticDate.java b/jdk/test/java/time/tck/java/time/chrono/CopticDate.java index d8447eb660f..aa2d627058c 100644 --- a/jdk/test/java/time/tck/java/time/chrono/CopticDate.java +++ b/jdk/test/java/time/tck/java/time/chrono/CopticDate.java @@ -68,6 +68,7 @@ import java.io.Serializable; import java.time.DateTimeException; import java.time.LocalDate; import java.time.Period; +import java.time.Year; import java.time.chrono.ChronoLocalDate; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; @@ -75,7 +76,7 @@ import java.time.temporal.Temporal; import java.time.temporal.TemporalField; import java.time.temporal.TemporalUnit; import java.time.temporal.ValueRange; -import java.time.Year; +import java.time.temporal.UnsupportedTemporalTypeException; /** * A date in the Coptic calendar system. @@ -201,7 +202,7 @@ public final class CopticDate } return getChronology().range(f); } - throw new DateTimeException("Unsupported field: " + field.getName()); + throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); } return field.rangeRefinedBy(this); } @@ -223,7 +224,7 @@ public final class CopticDate case YEAR: return prolepticYear; case ERA: return (prolepticYear >= 1 ? 1 : 0); } - throw new DateTimeException("Unsupported field: " + field.getName()); + throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); } return field.getFrom(this); } @@ -248,7 +249,7 @@ public final class CopticDate case YEAR: return resolvePreviousValid(nvalue, month, day); case ERA: return resolvePreviousValid(1 - prolepticYear, month, day); } - throw new DateTimeException("Unsupported field: " + field.getName()); + throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); } return field.adjustInto(this, newValue); } @@ -267,7 +268,7 @@ public final class CopticDate case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); } - throw new DateTimeException(unit.getName() + " not valid for CopticDate"); + throw new UnsupportedTemporalTypeException("Unsupported unit: " + unit.getName()); } return unit.addTo(this, amountToAdd); } diff --git a/jdk/test/java/time/tck/java/time/chrono/CopticEra.java b/jdk/test/java/time/tck/java/time/chrono/CopticEra.java index cfe4bdc9b34..c1d7f56071a 100644 --- a/jdk/test/java/time/tck/java/time/chrono/CopticEra.java +++ b/jdk/test/java/time/tck/java/time/chrono/CopticEra.java @@ -71,7 +71,7 @@ import java.time.chrono.Era; *

      Implementation notes

      * This is an immutable and thread-safe enum. */ -enum CopticEra implements Era { +public enum CopticEra implements Era { /** * The singleton instance for the era BEFORE_AM, 'Before Era of the Martyrs'. @@ -118,21 +118,4 @@ enum CopticEra implements Era { return ordinal(); } - @Override - public CopticChronology getChronology() { - return CopticChronology.INSTANCE; - } - - // JDK8 default methods: - //----------------------------------------------------------------------- - @Override - public CopticDate date(int year, int month, int day) { - return (CopticDate)(getChronology().date(this, year, month, day)); - } - - @Override - public CopticDate dateYearDay(int year, int dayOfYear) { - return (CopticDate)(getChronology().dateYearDay(this, year, dayOfYear)); - } - } diff --git a/jdk/test/java/time/tck/java/time/chrono/TestChronoLocalDate.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java similarity index 89% rename from jdk/test/java/time/tck/java/time/chrono/TestChronoLocalDate.java rename to jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java index 51674e27f90..b30a255995c 100644 --- a/jdk/test/java/time/tck/java/time/chrono/TestChronoLocalDate.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDate.java @@ -63,15 +63,18 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.time.DateTimeException; import java.time.Duration; import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneOffset; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; import java.time.chrono.HijrahChronology; +import java.time.chrono.IsoChronology; import java.time.chrono.JapaneseChronology; import java.time.chrono.MinguoChronology; import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.Chronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.IsoChronology; import java.time.temporal.ChronoUnit; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; @@ -81,6 +84,7 @@ import java.time.temporal.TemporalField; import java.time.temporal.TemporalUnit; import java.time.temporal.ValueRange; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.testng.Assert; @@ -91,7 +95,7 @@ import org.testng.annotations.Test; * Test assertions that must be true for all built-in chronologies. */ @Test -public class TestChronoLocalDate { +public class TCKChronoLocalDate { //----------------------------------------------------------------------- // regular data factory for names and descriptions of available calendars @@ -106,9 +110,9 @@ public class TestChronoLocalDate { {ThaiBuddhistChronology.INSTANCE}}; } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badWithAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDate date = chrono.date(refDate); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -129,9 +133,9 @@ public class TestChronoLocalDate { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badPlusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDate date = chrono.date(refDate); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -152,9 +156,9 @@ public class TestChronoLocalDate { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badMinusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDate date = chrono.date(refDate); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -175,9 +179,9 @@ public class TestChronoLocalDate { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badPlusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDate date = chrono.date(refDate); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -199,9 +203,9 @@ public class TestChronoLocalDate { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badMinusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDate date = chrono.date(refDate); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -223,9 +227,9 @@ public class TestChronoLocalDate { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badTemporalFieldChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDate date = chrono.date(refDate); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -250,16 +254,13 @@ public class TestChronoLocalDate { //----------------------------------------------------------------------- // isBefore, isAfter, isEqual, DATE_COMPARATOR //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_date_comparisons(Chronology chrono) { List dates = new ArrayList<>(); - ChronoLocalDate date = chrono.date(LocalDate.of(1900, 1, 1)); + ChronoLocalDate date = chrono.date(LocalDate.of(2013, 1, 1)); // Insert dates in order, no duplicates - dates.add(date.minus(1000, ChronoUnit.YEARS)); - dates.add(date.minus(100, ChronoUnit.YEARS)); - dates.add(date.minus(10, ChronoUnit.YEARS)); dates.add(date.minus(1, ChronoUnit.YEARS)); dates.add(date.minus(1, ChronoUnit.MONTHS)); dates.add(date.minus(1, ChronoUnit.WEEKS)); @@ -269,9 +270,6 @@ public class TestChronoLocalDate { dates.add(date.plus(1, ChronoUnit.WEEKS)); dates.add(date.plus(1, ChronoUnit.MONTHS)); dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(10, ChronoUnit.YEARS)); - dates.add(date.plus(100, ChronoUnit.YEARS)); - dates.add(date.plus(1000, ChronoUnit.YEARS)); // Check these dates against the corresponding dates for every calendar for (Chronology[] clist : data_of_calendars()) { @@ -286,7 +284,7 @@ public class TestChronoLocalDate { ChronoLocalDate a = dates.get(i); for (int j = 0; j < otherDates.size(); j++) { ChronoLocalDate b = otherDates.get(j); - int cmp = ChronoLocalDate.DATE_COMPARATOR.compare(a, b); + int cmp = ChronoLocalDate.timeLineOrder().compare(a, b); if (i < j) { assertTrue(cmp < 0, a + " compare " + b); assertEquals(a.isBefore(b), true, a + " isBefore " + b); @@ -311,9 +309,9 @@ public class TestChronoLocalDate { //----------------------------------------------------------------------- // Test Serialization of Calendars //----------------------------------------------------------------------- - @Test( groups={"tck"}, dataProvider="calendars") + @Test( dataProvider="calendars") public void test_ChronoSerialization(Chronology chrono) throws Exception { - LocalDate ref = LocalDate.of(1900, 1, 5); + LocalDate ref = LocalDate.of(2013, 1, 5); ChronoLocalDate orginal = chrono.date(ref); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); @@ -326,6 +324,30 @@ public class TestChronoLocalDate { assertEquals(ser, orginal, "deserialized date is wrong"); } + //----------------------------------------------------------------------- + @Test(dataProvider="calendars") + public void test_from_TemporalAccessor(Chronology chrono) { + LocalDate refDate = LocalDate.of(2013, 1, 1); + ChronoLocalDate date = chrono.date(refDate); + ChronoLocalDate test1 = ChronoLocalDate.from(date); + assertEquals(test1, date); + ChronoLocalDate test2 = ChronoLocalDate.from(date.atTime(LocalTime.of(12, 30))); + assertEquals(test2, date); + ChronoLocalDate test3 = ChronoLocalDate.from(date.atTime(LocalTime.of(12, 30)).atZone(ZoneOffset.UTC)); + assertEquals(test3, date); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_from_TemporalAccessor_timeOnly() { + ChronoLocalDate.from(LocalTime.of(12, 30)); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_from_TemporalAccessor_null() { + ChronoLocalDate.from(null); + } + + //----------------------------------------------------------------------- /** * FixedAdjusted returns a fixed Temporal in all adjustments. * Construct an adjuster with the Temporal that should be returned from adjust. diff --git a/jdk/test/java/time/tck/java/time/temporal/TestChronoLocalDateTime.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java similarity index 89% rename from jdk/test/java/time/tck/java/time/temporal/TestChronoLocalDateTime.java rename to jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java index 46335cedb4f..251c071d318 100644 --- a/jdk/test/java/time/tck/java/time/temporal/TestChronoLocalDateTime.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoLocalDateTime.java @@ -54,7 +54,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package tck.java.time.temporal; +package tck.java.time.chrono; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; @@ -63,18 +63,19 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.time.DateTimeException; import java.time.Duration; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import java.time.ZoneOffset; +import java.time.chrono.ChronoLocalDateTime; +import java.time.chrono.Chronology; import java.time.chrono.HijrahChronology; +import java.time.chrono.IsoChronology; import java.time.chrono.JapaneseChronology; import java.time.chrono.MinguoChronology; import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.ChronoLocalDateTime; -import java.time.chrono.Chronology; -import java.time.chrono.IsoChronology; import java.time.temporal.ChronoUnit; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; @@ -94,7 +95,7 @@ import org.testng.annotations.Test; * Test assertions that must be true for all built-in chronologies. */ @Test -public class TestChronoLocalDateTime { +public class TCKChronoLocalDateTime { //----------------------------------------------------------------------- // regular data factory for names and descriptions of available calendars @@ -109,9 +110,9 @@ public class TestChronoLocalDateTime { {ThaiBuddhistChronology.INSTANCE}}; } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badWithAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -133,9 +134,9 @@ public class TestChronoLocalDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badPlusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -157,9 +158,9 @@ public class TestChronoLocalDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badMinusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -181,9 +182,9 @@ public class TestChronoLocalDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badPlusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -205,9 +206,9 @@ public class TestChronoLocalDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badMinusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -229,9 +230,9 @@ public class TestChronoLocalDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badTemporalFieldChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -256,14 +257,13 @@ public class TestChronoLocalDateTime { //----------------------------------------------------------------------- // isBefore, isAfter, isEqual //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_datetime_comparisons(Chronology chrono) { List> dates = new ArrayList<>(); - ChronoLocalDateTime date = chrono.date(LocalDate.of(1900, 1, 1)).atTime(LocalTime.MIN); + ChronoLocalDateTime date = chrono.date(LocalDate.of(2013, 1, 1)).atTime(LocalTime.MIN); // Insert dates in order, no duplicates - dates.add(date.minus(100, ChronoUnit.YEARS)); dates.add(date.minus(1, ChronoUnit.YEARS)); dates.add(date.minus(1, ChronoUnit.MONTHS)); dates.add(date.minus(1, ChronoUnit.WEEKS)); @@ -281,7 +281,6 @@ public class TestChronoLocalDateTime { dates.add(date.plus(1, ChronoUnit.WEEKS)); dates.add(date.plus(1, ChronoUnit.MONTHS)); dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(100, ChronoUnit.YEARS)); // Check these dates against the corresponding dates for every calendar for (Chronology[] clist : data_of_calendars()) { @@ -296,7 +295,7 @@ public class TestChronoLocalDateTime { ChronoLocalDateTime a = dates.get(i); for (int j = 0; j < otherDates.size(); j++) { ChronoLocalDateTime b = otherDates.get(j); - int cmp = ChronoLocalDateTime.DATE_TIME_COMPARATOR.compare(a, b); + int cmp = ChronoLocalDateTime.timeLineOrder().compare(a, b); if (i < j) { assertTrue(cmp < 0, a + " compare " + b); assertEquals(a.isBefore(b), true, a + " isBefore " + b); @@ -321,9 +320,9 @@ public class TestChronoLocalDateTime { //----------------------------------------------------------------------- // Test Serialization of ISO via chrono API //----------------------------------------------------------------------- - @Test( groups={"tck"}, dataProvider="calendars") + @Test( dataProvider="calendars") public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception { - LocalDateTime ref = LocalDate.of(2000, 1, 5).atTime(12, 1, 2, 3); + LocalDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3); ChronoLocalDateTime orginal = chrono.date(ref).atTime(ref.toLocalTime()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); @@ -331,11 +330,37 @@ public class TestChronoLocalDateTime { out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new ObjectInputStream(bais); - @SuppressWarnings("unchecked") ChronoLocalDateTime ser = (ChronoLocalDateTime) in.readObject(); assertEquals(ser, orginal, "deserialized date is wrong"); } + //----------------------------------------------------------------------- + @Test(dataProvider="calendars") + public void test_from_TemporalAccessor(Chronology chrono) { + LocalDateTime refDateTime = LocalDateTime.of(2013, 1, 1, 12, 30); + ChronoLocalDateTime dateTime = chrono.localDateTime(refDateTime); + ChronoLocalDateTime test1 = ChronoLocalDateTime.from(dateTime); + assertEquals(test1, dateTime); + ChronoLocalDateTime test2 = ChronoLocalDateTime.from(dateTime.atZone(ZoneOffset.UTC)); + assertEquals(test2, dateTime); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_from_TemporalAccessor_dateOnly() { + ChronoLocalDateTime.from(LocalDate.of(2013, 1, 1)); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_from_TemporalAccessor_timeOnly() { + ChronoLocalDateTime.from(LocalTime.of(12, 30)); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_from_TemporalAccessor_null() { + ChronoLocalDateTime.from(null); + } + + //----------------------------------------------------------------------- /** * FixedAdjusted returns a fixed Temporal in all adjustments. * Construct an adjuster with the Temporal that should be returned from adjust. diff --git a/jdk/test/java/time/tck/java/time/temporal/TestChronoZonedDateTime.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java similarity index 90% rename from jdk/test/java/time/tck/java/time/temporal/TestChronoZonedDateTime.java rename to jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java index c97a0181003..611c9258df9 100644 --- a/jdk/test/java/time/tck/java/time/temporal/TestChronoZonedDateTime.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronoZonedDateTime.java @@ -54,7 +54,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package tck.java.time.temporal; +package tck.java.time.chrono; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; @@ -63,20 +63,20 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.time.DateTimeException; import java.time.Duration; import java.time.LocalDate; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; +import java.time.chrono.ChronoZonedDateTime; +import java.time.chrono.Chronology; import java.time.chrono.HijrahChronology; +import java.time.chrono.IsoChronology; import java.time.chrono.JapaneseChronology; import java.time.chrono.MinguoChronology; import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.ChronoZonedDateTime; -import java.time.chrono.Chronology; -import java.time.chrono.IsoChronology; import java.time.temporal.ChronoUnit; import java.time.temporal.Temporal; import java.time.temporal.TemporalAccessor; @@ -96,7 +96,7 @@ import org.testng.annotations.Test; * Test assertions that must be true for all built-in chronologies. */ @Test -public class TestChronoZonedDateTime { +public class TCKChronoZonedDateTime { //----------------------------------------------------------------------- // regular data factory for names and descriptions of available calendars @@ -112,9 +112,9 @@ public class TestChronoZonedDateTime { }; } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badWithAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoZonedDateTime czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -135,9 +135,9 @@ public class TestChronoZonedDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badPlusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoZonedDateTime czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -159,9 +159,9 @@ public class TestChronoZonedDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badMinusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoZonedDateTime czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -183,9 +183,9 @@ public class TestChronoZonedDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badPlusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoZonedDateTime czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -207,9 +207,9 @@ public class TestChronoZonedDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badMinusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoZonedDateTime czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -231,9 +231,9 @@ public class TestChronoZonedDateTime { } } - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_badTemporalFieldChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); + LocalDate refDate = LocalDate.of(2013, 1, 1); ChronoZonedDateTime czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); for (Chronology[] clist : data_of_calendars()) { Chronology chrono2 = clist[0]; @@ -258,16 +258,15 @@ public class TestChronoZonedDateTime { //----------------------------------------------------------------------- // isBefore, isAfter, isEqual, INSTANT_COMPARATOR test a Chronology against the other Chronos //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="calendars") + @Test(dataProvider="calendars") public void test_zonedDateTime_comparisons(Chronology chrono) { List> dates = new ArrayList<>(); - ChronoZonedDateTime date = chrono.date(LocalDate.of(1900, 1, 1)) + ChronoZonedDateTime date = chrono.date(LocalDate.of(2013, 1, 1)) .atTime(LocalTime.MIN) .atZone(ZoneOffset.UTC); // Insert dates in order, no duplicates - dates.add(date.minus(100, ChronoUnit.YEARS)); dates.add(date.minus(1, ChronoUnit.YEARS)); dates.add(date.minus(1, ChronoUnit.MONTHS)); dates.add(date.minus(1, ChronoUnit.WEEKS)); @@ -285,7 +284,6 @@ public class TestChronoZonedDateTime { dates.add(date.plus(1, ChronoUnit.WEEKS)); dates.add(date.plus(1, ChronoUnit.MONTHS)); dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(100, ChronoUnit.YEARS)); // Check these dates against the corresponding dates for every calendar for (Chronology[] clist : data_of_calendars()) { @@ -300,7 +298,7 @@ public class TestChronoZonedDateTime { ChronoZonedDateTime a = dates.get(i); for (int j = 0; j < otherDates.size(); j++) { ChronoZonedDateTime b = otherDates.get(j); - int cmp = ChronoZonedDateTime.INSTANT_COMPARATOR.compare(a, b); + int cmp = ChronoZonedDateTime.timeLineOrder().compare(a, b); if (i < j) { assertTrue(cmp < 0, a + " compare " + b); assertEquals(a.isBefore(b), true, a + " isBefore " + b); @@ -325,9 +323,9 @@ public class TestChronoZonedDateTime { //----------------------------------------------------------------------- // Test Serialization of ISO via chrono API //----------------------------------------------------------------------- - @Test( groups={"tck"}, dataProvider="calendars") + @Test( dataProvider="calendars") public void test_ChronoZonedDateTimeSerialization(Chronology chrono) throws Exception { - ZonedDateTime ref = LocalDate.of(2000, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23")); + ZonedDateTime ref = LocalDate.of(2013, 1, 5).atTime(12, 1, 2, 3).atZone(ZoneId.of("GMT+01:23")); ChronoZonedDateTime orginal = chrono.date(ref).atTime(ref.toLocalTime()).atZone(ref.getZone()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); @@ -340,7 +338,31 @@ public class TestChronoZonedDateTime { assertEquals(ser, orginal, "deserialized date is wrong"); } + //----------------------------------------------------------------------- + @Test(dataProvider="calendars") + public void test_from_TemporalAccessor(Chronology chrono) { + ZonedDateTime refDateTime = ZonedDateTime.of(2013, 1, 1, 12, 30, 0, 0, ZoneId.of("Europe/Paris")); + ChronoZonedDateTime dateTime = chrono.zonedDateTime(refDateTime); + ChronoZonedDateTime test1 = ChronoZonedDateTime.from(dateTime); + assertEquals(test1, dateTime); + } + @Test(expectedExceptions = DateTimeException.class) + public void test_from_TemporalAccessor_dateOnly() { + ChronoZonedDateTime.from(LocalDate.of(2013, 1, 1)); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_from_TemporalAccessor_timeOnly() { + ChronoZonedDateTime.from(LocalTime.of(12, 30)); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_from_TemporalAccessor_null() { + ChronoZonedDateTime.from(null); + } + + //----------------------------------------------------------------------- /** * FixedAdjusted returns a fixed Temporal in all adjustments. * Construct an adjuster with the Temporal that should be returned from adjust. diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java index c1a43093733..17aadcc1cdb 100644 --- a/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronology.java @@ -4,9 +4,7 @@ * * 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. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. + * 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 @@ -24,7 +22,12 @@ */ /* - * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Copyright (c) 2012, Stephen Colebourne & Michael Nascimento Santos * * All rights reserved. * @@ -57,217 +60,189 @@ package tck.java.time.chrono; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertSame; +import static org.testng.Assert.assertTrue; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.ZoneId; -import java.time.ZonedDateTime; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.time.DateTimeException; import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; -import java.time.chrono.Era; +import java.time.chrono.HijrahChronology; import java.time.chrono.IsoChronology; +import java.time.chrono.JapaneseChronology; +import java.time.chrono.MinguoChronology; +import java.time.chrono.ThaiBuddhistChronology; import java.time.temporal.ChronoField; -import java.time.temporal.Queries; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalField; -import java.time.temporal.TemporalQuery; -import java.time.temporal.ValueRange; -import java.util.List; +import java.util.Locale; +import java.util.Set; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** - * Test. + * Test Chronology class. */ @Test public class TCKChronology { - // Can only work with IsoChronology here - // others may be in separate module - @Test - public void factory_from_TemporalAccessor_dateWithChronlogy() { - assertEquals(Chronology.from(LocalDate.of(2012, 6, 30)), IsoChronology.INSTANCE); + //----------------------------------------------------------------------- + // regular data factory for ID and calendarType of available calendars + //----------------------------------------------------------------------- + @DataProvider(name = "calendarNameAndType") + Object[][] data_of_calendars() { + return new Object[][] { + {"Hijrah-umalqura", "islamic-umalqura"}, + {"ISO", "iso8601"}, + {"Japanese", "japanese"}, + {"Minguo", "roc"}, + {"ThaiBuddhist", "buddhist"}, + }; + } + + @Test(dataProvider = "calendarNameAndType") + public void test_getters(String chronoId, String calendarSystemType) { + Chronology chrono = Chronology.of(chronoId); + assertNotNull(chrono, "Required calendar not found by ID: " + chronoId); + assertEquals(chrono.getId(), chronoId); + assertEquals(chrono.getCalendarType(), calendarSystemType); + } + + @Test(dataProvider = "calendarNameAndType") + public void test_required_calendars(String chronoId, String calendarSystemType) { + Chronology chrono = Chronology.of(chronoId); + assertNotNull(chrono, "Required calendar not found by ID: " + chronoId); + chrono = Chronology.of(calendarSystemType); + assertNotNull(chrono, "Required calendar not found by type: " + chronoId); + Set cals = Chronology.getAvailableChronologies(); + assertTrue(cals.contains(chrono), "Required calendar not found in set of available calendars"); } @Test - public void factory_from_TemporalAccessor_chronology() { - assertEquals(Chronology.from(new TemporalAccessor() { - @Override - public boolean isSupported(TemporalField field) { - throw new UnsupportedOperationException(); - } - @Override - public long getLong(TemporalField field) { - throw new UnsupportedOperationException(); - } - @SuppressWarnings("unchecked") - @Override - public R query(TemporalQuery query) { - if (query == Queries.chronology()) { - return (R) IsoChronology.INSTANCE; - } - throw new UnsupportedOperationException(); - } - }), IsoChronology.INSTANCE); + public void test_calendar_list() { + Set chronos = Chronology.getAvailableChronologies(); + assertNotNull(chronos, "Required list of calendars must be non-null"); + for (Chronology chrono : chronos) { + Chronology lookup = Chronology.of(chrono.getId()); + assertNotNull(lookup, "Required calendar not found: " + chrono); + } + assertEquals(chronos.size() >= data_of_calendars().length, true, "Chronology.getAvailableChronologies().size = " + chronos.size() + + ", expected >= " + data_of_calendars().length); } - @Test - public void factory_from_TemporalAccessor_noChronology() { - assertEquals(Chronology.from(new TemporalAccessor() { - @Override - public boolean isSupported(TemporalField field) { - throw new UnsupportedOperationException(); - } - - @Override - public long getLong(TemporalField field) { - throw new UnsupportedOperationException(); - } - - @Override - public R query(TemporalQuery query) { - if (query == Queries.chronology()) { - return null; - } - throw new UnsupportedOperationException(); - } - }), IsoChronology.INSTANCE); + /** + * Compute the number of days from the Epoch and compute the date from the number of days. + */ + @Test(dataProvider = "calendarNameAndType") + public void test_epoch(String name, String alias) { + Chronology chrono = Chronology.of(name); // a chronology. In practice this is rarely hardcoded + ChronoLocalDate date1 = chrono.dateNow(); + long epoch1 = date1.getLong(ChronoField.EPOCH_DAY); + ChronoLocalDate date2 = date1.with(ChronoField.EPOCH_DAY, epoch1); + assertEquals(date1, date2, "Date from epoch day is not same date: " + date1 + " != " + date2); + long epoch2 = date1.getLong(ChronoField.EPOCH_DAY); + assertEquals(epoch1, epoch2, "Epoch day not the same: " + epoch1 + " != " + epoch2); } - @Test(expectedExceptions=NullPointerException.class) - public void factory_from_TemporalAccessor_null() { - Chronology.from(null); + @Test(dataProvider = "calendarNameAndType") + public void test_dateEpochDay(String name, String alias) { + Chronology chrono = Chronology.of(name); + ChronoLocalDate date = chrono.dateNow(); + long epochDay = date.getLong(ChronoField.EPOCH_DAY); + ChronoLocalDate test = chrono.dateEpochDay(epochDay); + assertEquals(test, date); } //----------------------------------------------------------------------- - @Test - public void test_date_TemporalAccessor() { - assertEquals(IsoChronology.INSTANCE.date(new TemporalAccessor() { - @Override - public boolean isSupported(TemporalField field) { - if (field == ChronoField.EPOCH_DAY) { - return true; - } - throw new UnsupportedOperationException(); - } - - @Override - public long getLong(TemporalField field) { - if (field == ChronoField.EPOCH_DAY) { - return LocalDate.of(2012, 6, 30).toEpochDay(); - } - throw new UnsupportedOperationException(); - } - - @SuppressWarnings("unchecked") - @Override - public R query(TemporalQuery query) { - if (query == Queries.localDate()) { - return (R) LocalDate.of(2012, 6, 30); - } - throw new UnsupportedOperationException(); - } - }), LocalDate.of(2012, 6, 30)); + // locale based lookup + //----------------------------------------------------------------------- + @DataProvider(name = "calendarsystemtype") + Object[][] data_CalendarType() { + return new Object[][] { + {HijrahChronology.INSTANCE, "islamic", "umalqura"}, + {IsoChronology.INSTANCE, "iso8601", null}, + {JapaneseChronology.INSTANCE, "japanese", null}, + {MinguoChronology.INSTANCE, "roc", null}, + {ThaiBuddhistChronology.INSTANCE, "buddhist", null}, + }; } - @Test(expectedExceptions=NullPointerException.class) - public void test_date_TemporalAccessor_null() { - IsoChronology.INSTANCE.date(null); + @Test(dataProvider = "calendarsystemtype") + public void test_getCalendarType(Chronology chrono, String calendarType, String variant) { + String type = calendarType; + if (variant != null) { + type += '-'; + type += variant; + } + assertEquals(chrono.getCalendarType(), type); + } + + @Test(dataProvider = "calendarsystemtype") + public void test_lookupLocale(Chronology chrono, String calendarType, String variant) { + Locale.Builder builder = new Locale.Builder().setLanguage("en").setRegion("CA"); + builder.setUnicodeLocaleKeyword("ca", calendarType); + if (variant != null) { + builder.setUnicodeLocaleKeyword("cv", variant); + } + Locale locale = builder.build(); + assertEquals(Chronology.ofLocale(locale), chrono); + } + + + /** + * Test lookup by calendarType of each chronology. + * The calendarType is split on "-" to separate the calendar and variant. + * Verify that the calendar can be found by {@link java.time.chrono.Chronology#ofLocale}. + */ + @Test + public void test_ofLocaleByType() { + // Test that all available chronologies can be successfully found using ofLocale + Set chronos = Chronology.getAvailableChronologies(); + for (Chronology chrono : chronos) { + String[] split = chrono.getCalendarType().split("-"); + + Locale.Builder builder = new Locale.Builder().setLanguage("en").setRegion("CA"); + builder.setUnicodeLocaleKeyword("ca", split[0]); + if (split.length > 1) { + builder.setUnicodeLocaleKeyword("cv", split[1]); + } + Locale locale = builder.build(); + assertEquals(Chronology.ofLocale(locale), chrono, "Lookup by type and variant"); + } + } + + @Test(expectedExceptions=DateTimeException.class) + public void test_lookupLocale() { + Locale.Builder builder = new Locale.Builder().setLanguage("en").setRegion("CA"); + builder.setUnicodeLocaleKeyword("ca", "xxx"); + builder.setUnicodeLocaleKeyword("cv", "yyy"); + + Locale locale = builder.build(); + Chronology.ofLocale(locale); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_noChrono() { + Chronology chrono = Chronology.of("FooFoo"); } //----------------------------------------------------------------------- - @Test - public void test_localDateTime_TemporalAccessor() { - assertEquals(IsoChronology.INSTANCE.localDateTime(new TemporalAccessor() { - @Override - public boolean isSupported(TemporalField field) { - if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY) { - return true; - } - throw new UnsupportedOperationException(); - } - - @Override - public long getLong(TemporalField field) { - if (field == ChronoField.EPOCH_DAY) { - return LocalDate.of(2012, 6, 30).toEpochDay(); - } - if (field == ChronoField.NANO_OF_DAY) { - return LocalTime.of(12, 30, 40).toNanoOfDay(); - } - throw new UnsupportedOperationException(); - } - - @SuppressWarnings("unchecked") - @Override - public R query(TemporalQuery query) { - if (query == Queries.localDate()) { - return (R) LocalDate.of(2012, 6, 30); - } - if (query == Queries.localTime()) { - return (R) LocalTime.of(12, 30, 40); - } - throw new UnsupportedOperationException(); - } - }), LocalDateTime.of(2012, 6, 30, 12, 30, 40)); - } - - @Test(expectedExceptions=NullPointerException.class) - public void test_localDateTime_TemporalAccessor_null() { - IsoChronology.INSTANCE.localDateTime(null); - } - + // serialization; serialize and check each calendar system //----------------------------------------------------------------------- - @Test - public void test_zonedDateTime_TemporalAccessor() { - assertEquals(IsoChronology.INSTANCE.zonedDateTime(new TemporalAccessor() { - @Override - public boolean isSupported(TemporalField field) { - if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY || - field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) { - return true; - } - throw new UnsupportedOperationException(); - } - - @Override - public long getLong(TemporalField field) { - if (field == ChronoField.INSTANT_SECONDS) { - return ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London")).toEpochSecond(); - } - if (field == ChronoField.NANO_OF_SECOND) { - return 0; - } - if (field == ChronoField.EPOCH_DAY) { - return LocalDate.of(2012, 6, 30).toEpochDay(); - } - if (field == ChronoField.NANO_OF_DAY) { - return LocalTime.of(12, 30, 40).toNanoOfDay(); - } - throw new UnsupportedOperationException(); - } - - @SuppressWarnings("unchecked") - @Override - public R query(TemporalQuery query) { - if (query == Queries.localDate()) { - return (R) LocalDate.of(2012, 6, 30); - } - if (query == Queries.localTime()) { - return (R) LocalTime.of(12, 30, 40); - } - if (query == Queries.zoneId() || query == Queries.zone()) { - return (R) ZoneId.of("Europe/London"); - } - throw new UnsupportedOperationException(); - } - }), ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London"))); - } - - @Test(expectedExceptions=NullPointerException.class) - public void test_zonedDateTime_TemporalAccessor_null() { - IsoChronology.INSTANCE.zonedDateTime(null); + @Test(dataProvider = "calendarNameAndType") + public void test_chronoSerializationSingleton(String id, String _calendarType) throws Exception { + Chronology original = Chronology.of(id); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream out = new ObjectOutputStream(baos); + out.writeObject(original); + out.close(); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + ObjectInputStream in = new ObjectInputStream(bais); + Chronology ser = (Chronology) in.readObject(); + assertEquals(ser, original, "Deserialized Chronology is not correct"); } } diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java b/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java new file mode 100644 index 00000000000..c4e44998139 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKChronologySerialization.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static org.testng.Assert.assertEquals; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.PrintStream; +import java.time.chrono.Chronology; +import java.time.chrono.HijrahChronology; +import java.time.chrono.IsoChronology; +import java.time.chrono.JapaneseChronology; +import java.time.chrono.MinguoChronology; +import java.time.chrono.ThaiBuddhistChronology; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +public class TCKChronologySerialization { + + //----------------------------------------------------------------------- + // regular data factory for names and descriptions of available calendars + //----------------------------------------------------------------------- + @DataProvider(name = "calendars") + Chronology[][] data_of_calendars() { + return new Chronology[][]{ + {HijrahChronology.INSTANCE}, + {IsoChronology.INSTANCE}, + {JapaneseChronology.INSTANCE}, + {MinguoChronology.INSTANCE}, + {ThaiBuddhistChronology.INSTANCE}}; + } + + //----------------------------------------------------------------------- + // Test Serialization of Calendars + //----------------------------------------------------------------------- + @Test(dataProvider="calendars") + public void test_ChronoSerialization(Chronology chrono) throws Exception { + System.out.printf(" ChronoSerialization: %s%n", chrono); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream out = new ObjectOutputStream(baos); + out.writeObject(chrono); + out.close(); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + + ObjectInputStream in = new ObjectInputStream(bais); + @SuppressWarnings("unchecked") + Chronology ser = (Chronology) in.readObject(); + assertEquals(ser, chrono, "deserialized Chronology is wrong"); + } + + /** + * Utility method to dump a byte array in a java syntax. + * @param bytes and array of bytes + * @param os the outputstream to receive the output. + */ + static void dumpSerialStream(byte[] bytes, PrintStream os) { + os.printf(" byte[] bytes = {" ); + final int linelen = 10; + for (int i = 0; i < bytes.length; i++) { + if (i % linelen == 0) { + os.printf("%n "); + } + os.printf(" %3d,", bytes[i] & 0xff); + if ((i % linelen) == (linelen-1) || i == bytes.length - 1) { + os.printf(" /*"); + int s = i / linelen * linelen; + int k = i % linelen; + for (int j = 0; j <= k && s + j < bytes.length; j++) { + os.printf(" %c", bytes[s + j] & 0xff); + } + os.printf(" */"); + } + } + os.printf("%n };%n"); + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TestHijrahChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKHijrahChronology.java similarity index 51% rename from jdk/test/java/time/tck/java/time/chrono/TestHijrahChronology.java rename to jdk/test/java/time/tck/java/time/chrono/TCKHijrahChronology.java index 1938c5e9849..0efd1ab640a 100644 --- a/jdk/test/java/time/tck/java/time/chrono/TestHijrahChronology.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKHijrahChronology.java @@ -56,20 +56,28 @@ */ package tck.java.time.chrono; +import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.time.DateTimeException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; +import java.time.Period; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; +import java.time.chrono.Era; import java.time.chrono.HijrahChronology; import java.time.chrono.HijrahDate; -import java.time.chrono.ChronoLocalDate; -import java.time.temporal.Adjusters; -import java.time.chrono.Chronology; import java.time.chrono.IsoChronology; +import java.time.chrono.MinguoChronology; +import java.time.chrono.MinguoDate; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalAdjuster; +import java.util.List; import org.testng.Assert; import org.testng.annotations.DataProvider; @@ -79,18 +87,18 @@ import org.testng.annotations.Test; * Test. */ @Test -public class TestHijrahChronology { +public class TCKHijrahChronology { //----------------------------------------------------------------------- // Chronology.ofName("Hijrah") Lookup by name //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_chrono_byName() { Chronology c = HijrahChronology.INSTANCE; - Chronology test = Chronology.of("Hijrah"); - Assert.assertNotNull(test, "The Hijrah calendar could not be found byName"); - Assert.assertEquals(test.getId(), "Hijrah", "ID mismatch"); - Assert.assertEquals(test.getCalendarType(), "islamicc", "Type mismatch"); + Chronology test = Chronology.of("Hijrah-umalqura"); + Assert.assertNotNull(test, "The Hijrah-umalqura calendar could not be found by name"); + Assert.assertEquals(test.getId(), "Hijrah-umalqura", "ID mismatch"); + Assert.assertEquals(test.getCalendarType(), "islamic-umalqura", "Type mismatch"); Assert.assertEquals(test, c); } @@ -100,106 +108,181 @@ public class TestHijrahChronology { @DataProvider(name="samples") Object[][] data_samples() { return new Object[][] { - {HijrahChronology.INSTANCE.date(1, 1, 1), LocalDate.of(622, 7, 19)}, - {HijrahChronology.INSTANCE.date(1, 1, 2), LocalDate.of(622, 7, 20)}, - {HijrahChronology.INSTANCE.date(1, 1, 3), LocalDate.of(622, 7, 21)}, + //{HijrahChronology.INSTANCE.date(1320, 1, 1), LocalDate.of(1902, 4, 9)}, + //{HijrahChronology.INSTANCE.date(1320, 1, 2), LocalDate.of(1902, 4, 10)}, + //{HijrahChronology.INSTANCE.date(1320, 1, 3), LocalDate.of(1902, 4, 11)}, - {HijrahChronology.INSTANCE.date(2, 1, 1), LocalDate.of(623, 7, 8)}, - {HijrahChronology.INSTANCE.date(3, 1, 1), LocalDate.of(624, 6, 27)}, - {HijrahChronology.INSTANCE.date(3, 12, 6), LocalDate.of(625, 5, 23)}, - {HijrahChronology.INSTANCE.date(4, 1, 1), LocalDate.of(625, 6, 16)}, - {HijrahChronology.INSTANCE.date(4, 7, 3), LocalDate.of(625, 12, 12)}, - {HijrahChronology.INSTANCE.date(4, 7, 4), LocalDate.of(625, 12, 13)}, - {HijrahChronology.INSTANCE.date(5, 1, 1), LocalDate.of(626, 6, 5)}, - {HijrahChronology.INSTANCE.date(1662, 3, 3), LocalDate.of(2234, 4, 3)}, - {HijrahChronology.INSTANCE.date(1728, 10, 28), LocalDate.of(2298, 12, 03)}, - {HijrahChronology.INSTANCE.date(1728, 10, 29), LocalDate.of(2298, 12, 04)}, + //{HijrahChronology.INSTANCE.date(1322, 1, 1), LocalDate.of(1904, 3, 18)}, + //{HijrahChronology.INSTANCE.date(1323, 1, 1), LocalDate.of(1905, 3, 7)}, + //{HijrahChronology.INSTANCE.date(1323, 12, 6), LocalDate.of(1906, 1, 30)}, + //{HijrahChronology.INSTANCE.date(1324, 1, 1), LocalDate.of(1906, 2, 24)}, + //{HijrahChronology.INSTANCE.date(1324, 7, 3), LocalDate.of(1906, 8, 23)}, + //{HijrahChronology.INSTANCE.date(1324, 7, 4), LocalDate.of(1906, 8, 24)}, + //{HijrahChronology.INSTANCE.date(1325, 1, 1), LocalDate.of(1907, 2, 13)}, + {HijrahChronology.INSTANCE.date(1434, 7, 1), LocalDate.of(2013, 5, 11)}, + + //{HijrahChronology.INSTANCE.date(1500, 3, 3), LocalDate.of(2079, 1, 5)}, + //{HijrahChronology.INSTANCE.date(1500, 10, 28), LocalDate.of(2079, 8, 25)}, + //{HijrahChronology.INSTANCE.date(1500, 10, 29), LocalDate.of(2079, 8, 26)}, }; } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_toLocalDate(ChronoLocalDate hijrahDate, LocalDate iso) { assertEquals(LocalDate.from(hijrahDate), iso); } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_fromCalendrical(ChronoLocalDate hijrahDate, LocalDate iso) { assertEquals(HijrahChronology.INSTANCE.date(iso), hijrahDate); } + @Test(dataProvider="samples") + public void test_dayOfWeekEqualIsoDayOfWeek(ChronoLocalDate hijrahDate, LocalDate iso) { + assertEquals(hijrahDate.get(DAY_OF_WEEK), iso.get(DAY_OF_WEEK), "Hijrah day of week should be same as ISO day of week"); + } + @DataProvider(name="badDates") Object[][] data_badDates() { return new Object[][] { - {1728, 0, 0}, + {1434, 0, 0}, - {1728, -1, 1}, - {1728, 0, 1}, - {1728, 14, 1}, - {1728, 15, 1}, + {1434, -1, 1}, + {1434, 0, 1}, + {1434, 14, 1}, + {1434, 15, 1}, - {1728, 1, -1}, - {1728, 1, 0}, - {1728, 1, 32}, + {1434, 1, -1}, + {1434, 1, 0}, + {1434, 1, 32}, - {1728, 12, -1}, - {1728, 12, 0}, - {1728, 12, 32}, + {1434, 12, -1}, + {1434, 12, 0}, + {1434, 12, 32}, }; } - @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class) public void test_badDates(int year, int month, int dom) { HijrahChronology.INSTANCE.date(year, month, dom); } //----------------------------------------------------------------------- - // with(WithAdjuster) + // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...) //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_adjust1() { - ChronoLocalDate base = HijrahChronology.INSTANCE.date(1728, 10, 28); - ChronoLocalDate test = base.with(Adjusters.lastDayOfMonth()); - assertEquals(test, HijrahChronology.INSTANCE.date(1728, 10, 29)); + @Test + public void test_InvalidEras() { + // Verify that the eras from every other Chronology are invalid + for (Chronology chrono : Chronology.getAvailableChronologies()) { + if (chrono instanceof HijrahChronology) { + continue; + } + List eras = chrono.eras(); + for (Era era : eras) { + try { + ChronoLocalDate date = HijrahChronology.INSTANCE.date(era, 1, 1, 1); + fail("HijrahChronology.date did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + + /* TODO: Test for missing HijrahDate.of(Era, y, m, d) method. + try { + @SuppressWarnings("unused") + HijrahDate jdate = HijrahDate.of(era, 1, 1, 1); + fail("HijrahDate.of did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + */ + + try { + @SuppressWarnings("unused") + int year = HijrahChronology.INSTANCE.prolepticYear(era, 1); + fail("HijrahChronology.prolepticYear did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + } + } } - @Test(groups={"tck"}) + //----------------------------------------------------------------------- + // with(WithAdjuster) + //----------------------------------------------------------------------- + @Test + public void test_adjust1() { + ChronoLocalDate base = HijrahChronology.INSTANCE.date(1434, 5, 15); + ChronoLocalDate test = base.with(TemporalAdjuster.lastDayOfMonth()); + assertEquals(test, HijrahChronology.INSTANCE.date(1434, 5, 29)); + } + + @Test public void test_adjust2() { - ChronoLocalDate base = HijrahChronology.INSTANCE.date(1728, 12, 2); - ChronoLocalDate test = base.with(Adjusters.lastDayOfMonth()); - assertEquals(test, HijrahChronology.INSTANCE.date(1728, 12, 30)); + ChronoLocalDate base = HijrahChronology.INSTANCE.date(1434, 6, 2); + ChronoLocalDate test = base.with(TemporalAdjuster.lastDayOfMonth()); + assertEquals(test, HijrahChronology.INSTANCE.date(1434, 6, 30)); } //----------------------------------------------------------------------- // HijrahDate.with(Local*) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust_toLocalDate() { - ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1726, 1, 4); + ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1435, 1, 4); ChronoLocalDate test = hijrahDate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, HijrahChronology.INSTANCE.date(1433, 8, 16)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { - ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1726, 1, 4); + ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1435, 1, 4); hijrahDate.with(Month.APRIL); } //----------------------------------------------------------------------- // LocalDate.with(HijrahDate) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_LocalDate_adjustToHijrahDate() { - ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1728, 10, 29); + ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1434, 5, 15); LocalDate test = LocalDate.MIN.with(hijrahDate); - assertEquals(test, LocalDate.of(2298, 12, 4)); + assertEquals(test, LocalDate.of(2013, 3, 27)); } - @Test(groups={"tck"}) + @Test public void test_LocalDateTime_adjustToHijrahDate() { - ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1728, 10, 29); + ChronoLocalDate hijrahDate = HijrahChronology.INSTANCE.date(1435, 5, 15); LocalDateTime test = LocalDateTime.MIN.with(hijrahDate); - assertEquals(test, LocalDateTime.of(2298, 12, 4, 0, 0)); + assertEquals(test, LocalDateTime.of(2014, 3, 16, 0, 0)); + } + + //----------------------------------------------------------------------- + // PeriodUntil() + //----------------------------------------------------------------------- + @Test + public void test_periodUntilDate() { + HijrahDate mdate1 = HijrahDate.of(1434, 1, 1); + HijrahDate mdate2 = HijrahDate.of(1435, 2, 2); + Period period = mdate1.periodUntil(mdate2); + assertEquals(period, Period.of(1, 1, 1)); + } + + @Test + public void test_periodUntilUnit() { + HijrahDate mdate1 = HijrahDate.of(1434, 1, 1); + HijrahDate mdate2 = HijrahDate.of(1435, 2, 2); + long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS); + assertEquals(months, 13); + } + + @Test + public void test_periodUntilDiffChrono() { + HijrahDate mdate1 = HijrahDate.of(1434, 1, 1); + HijrahDate mdate2 = HijrahDate.of(1435, 2, 2); + MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); + Period period = mdate1.periodUntil(ldate2); + assertEquals(period, Period.of(1, 1, 1)); } //----------------------------------------------------------------------- @@ -208,15 +291,15 @@ public class TestHijrahChronology { @DataProvider(name="toString") Object[][] data_toString() { return new Object[][] { - {HijrahChronology.INSTANCE.date(1, 1, 1), "Hijrah AH 1-01-01"}, - {HijrahChronology.INSTANCE.date(1728, 10, 28), "Hijrah AH 1728-10-28"}, - {HijrahChronology.INSTANCE.date(1728, 10, 29), "Hijrah AH 1728-10-29"}, - {HijrahChronology.INSTANCE.date(1727, 12, 5), "Hijrah AH 1727-12-05"}, - {HijrahChronology.INSTANCE.date(1727, 12, 6), "Hijrah AH 1727-12-06"}, + //{HijrahChronology.INSTANCE.date(1320, 1, 1), "Hijrah AH 1320-01-01"}, + //{HijrahChronology.INSTANCE.date(1500, 10, 28), "Hijrah AH 1500-10-28"}, + //{HijrahChronology.INSTANCE.date(1500, 10, 29), "Hijrah AH 1500-10-29"}, + {HijrahChronology.INSTANCE.date(1434, 12, 5), "Hijrah-umalqura AH 1434-12-05"}, + {HijrahChronology.INSTANCE.date(1434, 12, 6), "Hijrah-umalqura AH 1434-12-06"}, }; } - @Test(dataProvider="toString", groups={"tck"}) + @Test(dataProvider="toString") public void test_toString(ChronoLocalDate hijrahDate, String expected) { assertEquals(hijrahDate.toString(), expected); } @@ -224,12 +307,12 @@ public class TestHijrahChronology { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_equals_true() { assertTrue(HijrahChronology.INSTANCE.equals(HijrahChronology.INSTANCE)); } - @Test(groups="tck") + @Test public void test_equals_false() { assertFalse(HijrahChronology.INSTANCE.equals(IsoChronology.INSTANCE)); } diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKHijrahEra.java b/jdk/test/java/time/tck/java/time/chrono/TCKHijrahEra.java new file mode 100644 index 00000000000..569eff0f3f4 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKHijrahEra.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static java.time.temporal.ChronoField.ERA; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.time.chrono.Era; +import java.time.chrono.HijrahChronology; +import java.time.chrono.HijrahEra; +import java.time.temporal.ValueRange; +import java.util.List; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKHijrahEra { + + @DataProvider(name = "HijrahEras") + Object[][] data_of_eras() { + return new Object[][] { + {HijrahEra.AH, "AH", 1}, + }; + } + + @Test(dataProvider="HijrahEras") + public void test_valueOf(HijrahEra era , String eraName, int eraValue) { + assertEquals(era.getValue(), eraValue); + assertEquals(HijrahEra.of(eraValue), era); + assertEquals(HijrahEra.valueOf(eraName), era); + } + + //----------------------------------------------------------------------- + // values() + //----------------------------------------------------------------------- + @Test + public void test_values() { + List eraList = HijrahChronology.INSTANCE.eras(); + HijrahEra[] eras = HijrahEra.values(); + assertEquals(eraList.size(), eras.length); + for (HijrahEra era : eras) { + assertTrue(eraList.contains(era)); + } + } + + //----------------------------------------------------------------------- + // range() + //----------------------------------------------------------------------- + @Test + public void test_range() { + for (HijrahEra era : HijrahEra.values()) { + assertEquals(era.range(ERA), ValueRange.of(1, 1)); + } + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKIsoChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKIsoChronology.java new file mode 100644 index 00000000000..b30c1ffbfcc --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKIsoChronology.java @@ -0,0 +1,679 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; + +import java.time.DateTimeException; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.chrono.Chronology; +import java.time.chrono.IsoChronology; +import java.time.format.ResolverStyle; +import java.time.temporal.ChronoField; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQuery; +import java.util.HashMap; +import java.util.Map; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKIsoChronology { + // Can only work with IsoChronology here + // others may be in separate module + + @Test + public void factory_from_TemporalAccessor_dateWithChronlogy() { + assertEquals(Chronology.from(LocalDate.of(2012, 6, 30)), IsoChronology.INSTANCE); + } + + @Test + public void factory_from_TemporalAccessor_chronology() { + assertEquals(Chronology.from(new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + throw new UnsupportedOperationException(); + } + + @Override + public long getLong(TemporalField field) { + throw new UnsupportedOperationException(); + } + + @SuppressWarnings("unchecked") + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.chronology()) { + return (R) IsoChronology.INSTANCE; + } + throw new UnsupportedOperationException(); + } + }), IsoChronology.INSTANCE); + } + + @Test + public void factory_from_TemporalAccessor_noChronology() { + assertEquals(Chronology.from(new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + throw new UnsupportedOperationException(); + } + + @Override + public long getLong(TemporalField field) { + throw new UnsupportedOperationException(); + } + + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.chronology()) { + return null; + } + throw new UnsupportedOperationException(); + } + }), IsoChronology.INSTANCE); + } + + @Test(expectedExceptions=NullPointerException.class) + public void factory_from_TemporalAccessor_null() { + Chronology.from(null); + } + + //----------------------------------------------------------------------- + @Test + public void test_date_TemporalAccessor() { + assertEquals(IsoChronology.INSTANCE.date(new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + if (field == ChronoField.EPOCH_DAY) { + return true; + } + throw new UnsupportedOperationException(); + } + + @Override + public long getLong(TemporalField field) { + if (field == ChronoField.EPOCH_DAY) { + return LocalDate.of(2012, 6, 30).toEpochDay(); + } + throw new UnsupportedOperationException(); + } + + @SuppressWarnings("unchecked") + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.localDate()) { + return (R) LocalDate.of(2012, 6, 30); + } + throw new UnsupportedOperationException(); + } + }), LocalDate.of(2012, 6, 30)); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_date_TemporalAccessor_null() { + IsoChronology.INSTANCE.date(null); + } + + //----------------------------------------------------------------------- + @Test + public void test_localDateTime_TemporalAccessor() { + assertEquals(IsoChronology.INSTANCE.localDateTime(new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY) { + return true; + } + throw new UnsupportedOperationException(); + } + + @Override + public long getLong(TemporalField field) { + if (field == ChronoField.EPOCH_DAY) { + return LocalDate.of(2012, 6, 30).toEpochDay(); + } + if (field == ChronoField.NANO_OF_DAY) { + return LocalTime.of(12, 30, 40).toNanoOfDay(); + } + throw new UnsupportedOperationException(); + } + + @SuppressWarnings("unchecked") + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.localDate()) { + return (R) LocalDate.of(2012, 6, 30); + } + if (query == TemporalQuery.localTime()) { + return (R) LocalTime.of(12, 30, 40); + } + throw new UnsupportedOperationException(); + } + }), LocalDateTime.of(2012, 6, 30, 12, 30, 40)); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_localDateTime_TemporalAccessor_null() { + IsoChronology.INSTANCE.localDateTime(null); + } + + //----------------------------------------------------------------------- + @Test + public void test_zonedDateTime_TemporalAccessor() { + assertEquals(IsoChronology.INSTANCE.zonedDateTime(new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + if (field == ChronoField.EPOCH_DAY || field == ChronoField.NANO_OF_DAY || + field == ChronoField.INSTANT_SECONDS || field == ChronoField.NANO_OF_SECOND) { + return true; + } + throw new UnsupportedOperationException(); + } + + @Override + public long getLong(TemporalField field) { + if (field == ChronoField.INSTANT_SECONDS) { + return ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London")).toEpochSecond(); + } + if (field == ChronoField.NANO_OF_SECOND) { + return 0; + } + if (field == ChronoField.EPOCH_DAY) { + return LocalDate.of(2012, 6, 30).toEpochDay(); + } + if (field == ChronoField.NANO_OF_DAY) { + return LocalTime.of(12, 30, 40).toNanoOfDay(); + } + throw new UnsupportedOperationException(); + } + + @SuppressWarnings("unchecked") + @Override + public R query(TemporalQuery query) { + if (query == TemporalQuery.localDate()) { + return (R) LocalDate.of(2012, 6, 30); + } + if (query == TemporalQuery.localTime()) { + return (R) LocalTime.of(12, 30, 40); + } + if (query == TemporalQuery.zoneId() || query == TemporalQuery.zone()) { + return (R) ZoneId.of("Europe/London"); + } + throw new UnsupportedOperationException(); + } + }), ZonedDateTime.of(2012, 6, 30, 12, 30, 40, 0, ZoneId.of("Europe/London"))); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_zonedDateTime_TemporalAccessor_null() { + IsoChronology.INSTANCE.zonedDateTime(null); + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @DataProvider(name = "resolve_yearOfEra") + Object[][] data_resolve_yearOfEra() { + return new Object[][] { + {-1, 2012, null, null, false, false}, + {0, 2012, null, -2011, true, true}, + {1, 2012, null, 2012, true, true}, + {2, 2012, null, null, false, false}, + + {null, 2012, null, 2012, true, null}, + {null, 2012, 2012, 2012, true, true}, + {null, 2012, -2011, -2011, true, true}, + {null, 2012, 2013, null, false, false}, + {null, 2012, -2013, null, false, false}, + }; + } + + @Test(dataProvider = "resolve_yearOfEra") + public void test_resolve_yearOfEra_lenient(Integer e, int yoe, Integer y, Integer expected, boolean smart, Boolean strict) { + Map fieldValues = new HashMap<>(); + if (e != null) { + fieldValues.put(ChronoField.ERA, (long) e); + } + fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe); + if (y != null) { + fieldValues.put(ChronoField.YEAR, (long) y); + } + if (smart) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT); + assertEquals(date, null); + assertEquals(fieldValues.get(ChronoField.YEAR), (Long) (long) expected); + assertEquals(fieldValues.size(), 1); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + @Test(dataProvider = "resolve_yearOfEra") + public void test_resolve_yearOfEra_smart(Integer e, int yoe, Integer y, Integer expected, boolean smart, Boolean strict) { + Map fieldValues = new HashMap<>(); + if (e != null) { + fieldValues.put(ChronoField.ERA, (long) e); + } + fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe); + if (y != null) { + fieldValues.put(ChronoField.YEAR, (long) y); + } + if (smart) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + assertEquals(date, null); + assertEquals(fieldValues.get(ChronoField.YEAR), (Long) (long) expected); + assertEquals(fieldValues.size(), 1); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + @Test(dataProvider = "resolve_yearOfEra") + public void test_resolve_yearOfEra_strict(Integer e, int yoe, Integer y, Integer expected, boolean smart, Boolean strict) { + Map fieldValues = new HashMap<>(); + if (e != null) { + fieldValues.put(ChronoField.ERA, (long) e); + } + fieldValues.put(ChronoField.YEAR_OF_ERA, (long) yoe); + if (y != null) { + fieldValues.put(ChronoField.YEAR, (long) y); + } + if (strict == null) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + assertEquals(date, null); + assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (Long) (long) yoe); + } else if (strict) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + assertEquals(date, null); + assertEquals(fieldValues.get(ChronoField.YEAR), (Long) (long) expected); + assertEquals(fieldValues.size(), 1); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @DataProvider(name = "resolve_ymd") + Object[][] data_resolve_ymd() { + return new Object[][] { + {2012, 1, -365, date(2010, 12, 31), false, false}, + {2012, 1, -364, date(2011, 1, 1), false, false}, + {2012, 1, -31, date(2011, 11, 30), false, false}, + {2012, 1, -30, date(2011, 12, 1), false, false}, + {2012, 1, -12, date(2011, 12, 19), false, false}, + {2012, 1, 1, date(2012, 1, 1), true, true}, + {2012, 1, 59, date(2012, 2, 28), false, false}, + {2012, 1, 60, date(2012, 2, 29), false, false}, + {2012, 1, 61, date(2012, 3, 1), false, false}, + {2012, 1, 365, date(2012, 12, 30), false, false}, + {2012, 1, 366, date(2012, 12, 31), false, false}, + {2012, 1, 367, date(2013, 1, 1), false, false}, + {2012, 1, 367 + 364, date(2013, 12, 31), false, false}, + {2012, 1, 367 + 365, date(2014, 1, 1), false, false}, + + {2012, 2, 1, date(2012, 2, 1), true, true}, + {2012, 2, 28, date(2012, 2, 28), true, true}, + {2012, 2, 29, date(2012, 2, 29), true, true}, + {2012, 2, 30, date(2012, 3, 1), date(2012, 2, 29), false}, + {2012, 2, 31, date(2012, 3, 2), date(2012, 2, 29), false}, + {2012, 2, 32, date(2012, 3, 3), false, false}, + + {2012, -12, 1, date(2010, 12, 1), false, false}, + {2012, -11, 1, date(2011, 1, 1), false, false}, + {2012, -1, 1, date(2011, 11, 1), false, false}, + {2012, 0, 1, date(2011, 12, 1), false, false}, + {2012, 1, 1, date(2012, 1, 1), true, true}, + {2012, 12, 1, date(2012, 12, 1), true, true}, + {2012, 13, 1, date(2013, 1, 1), false, false}, + {2012, 24, 1, date(2013, 12, 1), false, false}, + {2012, 25, 1, date(2014, 1, 1), false, false}, + + {2012, 6, -31, date(2012, 4, 30), false, false}, + {2012, 6, -30, date(2012, 5, 1), false, false}, + {2012, 6, -1, date(2012, 5, 30), false, false}, + {2012, 6, 0, date(2012, 5, 31), false, false}, + {2012, 6, 1, date(2012, 6, 1), true, true}, + {2012, 6, 30, date(2012, 6, 30), true, true}, + {2012, 6, 31, date(2012, 7, 1), date(2012, 6, 30), false}, + {2012, 6, 61, date(2012, 7, 31), false, false}, + {2012, 6, 62, date(2012, 8, 1), false, false}, + + {2011, 2, 1, date(2011, 2, 1), true, true}, + {2011, 2, 28, date(2011, 2, 28), true, true}, + {2011, 2, 29, date(2011, 3, 1), date(2011, 2, 28), false}, + {2011, 2, 30, date(2011, 3, 2), date(2011, 2, 28), false}, + {2011, 2, 31, date(2011, 3, 3), date(2011, 2, 28), false}, + {2011, 2, 32, date(2011, 3, 4), false, false}, + }; + } + + @Test(dataProvider = "resolve_ymd") + public void test_resolve_ymd_lenient(int y, int m, int d, LocalDate expected, Object smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m); + fieldValues.put(ChronoField.DAY_OF_MONTH, (long) d); + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } + + @Test(dataProvider = "resolve_ymd") + public void test_resolve_ymd_smart(int y, int m, int d, LocalDate expected, Object smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m); + fieldValues.put(ChronoField.DAY_OF_MONTH, (long) d); + if (Boolean.TRUE.equals(smart)) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } else if (smart instanceof LocalDate) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + assertEquals(date, smart); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + @Test(dataProvider = "resolve_ymd") + public void test_resolve_ymd_strict(int y, int m, int d, LocalDate expected, Object smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m); + fieldValues.put(ChronoField.DAY_OF_MONTH, (long) d); + if (strict) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @DataProvider(name = "resolve_yd") + Object[][] data_resolve_yd() { + return new Object[][] { + {2012, -365, date(2010, 12, 31), false, false}, + {2012, -364, date(2011, 1, 1), false, false}, + {2012, -31, date(2011, 11, 30), false, false}, + {2012, -30, date(2011, 12, 1), false, false}, + {2012, -12, date(2011, 12, 19), false, false}, + {2012, -1, date(2011, 12, 30), false, false}, + {2012, 0, date(2011, 12, 31), false, false}, + {2012, 1, date(2012, 1, 1), true, true}, + {2012, 2, date(2012, 1, 2), true, true}, + {2012, 31, date(2012, 1, 31), true, true}, + {2012, 32, date(2012, 2, 1), true, true}, + {2012, 59, date(2012, 2, 28), true, true}, + {2012, 60, date(2012, 2, 29), true, true}, + {2012, 61, date(2012, 3, 1), true, true}, + {2012, 365, date(2012, 12, 30), true, true}, + {2012, 366, date(2012, 12, 31), true, true}, + {2012, 367, date(2013, 1, 1), false, false}, + {2012, 367 + 364, date(2013, 12, 31), false, false}, + {2012, 367 + 365, date(2014, 1, 1), false, false}, + + {2011, 59, date(2011, 2, 28), true, true}, + {2011, 60, date(2011, 3, 1), true, true}, + }; + } + + @Test(dataProvider = "resolve_yd") + public void test_resolve_yd_lenient(int y, int d, LocalDate expected, boolean smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.DAY_OF_YEAR, (long) d); + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } + + @Test(dataProvider = "resolve_yd") + public void test_resolve_yd_smart(int y, int d, LocalDate expected, boolean smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.DAY_OF_YEAR, (long) d); + if (smart) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + @Test(dataProvider = "resolve_yd") + public void test_resolve_yd_strict(int y, int d, LocalDate expected, boolean smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.DAY_OF_YEAR, (long) d); + if (strict) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @DataProvider(name = "resolve_ymaa") + Object[][] data_resolve_ymaa() { + return new Object[][] { + {2012, 1, 1, -365, date(2010, 12, 31), false, false}, + {2012, 1, 1, -364, date(2011, 1, 1), false, false}, + {2012, 1, 1, -31, date(2011, 11, 30), false, false}, + {2012, 1, 1, -30, date(2011, 12, 1), false, false}, + {2012, 1, 1, -12, date(2011, 12, 19), false, false}, + {2012, 1, 1, 1, date(2012, 1, 1), true, true}, + {2012, 1, 1, 59, date(2012, 2, 28), false, false}, + {2012, 1, 1, 60, date(2012, 2, 29), false, false}, + {2012, 1, 1, 61, date(2012, 3, 1), false, false}, + {2012, 1, 1, 365, date(2012, 12, 30), false, false}, + {2012, 1, 1, 366, date(2012, 12, 31), false, false}, + {2012, 1, 1, 367, date(2013, 1, 1), false, false}, + {2012, 1, 1, 367 + 364, date(2013, 12, 31), false, false}, + {2012, 1, 1, 367 + 365, date(2014, 1, 1), false, false}, + + {2012, 2, 0, 1, date(2012, 1, 25), false, false}, + {2012, 2, 0, 7, date(2012, 1, 31), false, false}, + {2012, 2, 1, 1, date(2012, 2, 1), true, true}, + {2012, 2, 1, 7, date(2012, 2, 7), true, true}, + {2012, 2, 2, 1, date(2012, 2, 8), true, true}, + {2012, 2, 2, 7, date(2012, 2, 14), true, true}, + {2012, 2, 3, 1, date(2012, 2, 15), true, true}, + {2012, 2, 3, 7, date(2012, 2, 21), true, true}, + {2012, 2, 4, 1, date(2012, 2, 22), true, true}, + {2012, 2, 4, 7, date(2012, 2, 28), true, true}, + {2012, 2, 5, 1, date(2012, 2, 29), true, true}, + {2012, 2, 5, 2, date(2012, 3, 1), true, false}, + {2012, 2, 5, 7, date(2012, 3, 6), true, false}, + {2012, 2, 6, 1, date(2012, 3, 7), false, false}, + {2012, 2, 6, 7, date(2012, 3, 13), false, false}, + + {2012, 12, 1, 1, date(2012, 12, 1), true, true}, + {2012, 12, 5, 1, date(2012, 12, 29), true, true}, + {2012, 12, 5, 2, date(2012, 12, 30), true, true}, + {2012, 12, 5, 3, date(2012, 12, 31), true, true}, + {2012, 12, 5, 4, date(2013, 1, 1), true, false}, + {2012, 12, 5, 7, date(2013, 1, 4), true, false}, + + {2012, -12, 1, 1, date(2010, 12, 1), false, false}, + {2012, -11, 1, 1, date(2011, 1, 1), false, false}, + {2012, -1, 1, 1, date(2011, 11, 1), false, false}, + {2012, 0, 1, 1, date(2011, 12, 1), false, false}, + {2012, 1, 1, 1, date(2012, 1, 1), true, true}, + {2012, 12, 1, 1, date(2012, 12, 1), true, true}, + {2012, 13, 1, 1, date(2013, 1, 1), false, false}, + {2012, 24, 1, 1, date(2013, 12, 1), false, false}, + {2012, 25, 1, 1, date(2014, 1, 1), false, false}, + + {2011, 2, 1, 1, date(2011, 2, 1), true, true}, + {2011, 2, 4, 7, date(2011, 2, 28), true, true}, + {2011, 2, 5, 1, date(2011, 3, 1), true, false}, + }; + } + + @Test(dataProvider = "resolve_ymaa") + public void test_resolve_ymaa_lenient(int y, int m, int w, int d, LocalDate expected, boolean smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m); + fieldValues.put(ChronoField.ALIGNED_WEEK_OF_MONTH, (long) w); + fieldValues.put(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH, (long) d); + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.LENIENT); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } + + @Test(dataProvider = "resolve_ymaa") + public void test_resolve_ymaa_smart(int y, int m, int w, int d, LocalDate expected, boolean smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m); + fieldValues.put(ChronoField.ALIGNED_WEEK_OF_MONTH, (long) w); + fieldValues.put(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH, (long) d); + if (smart) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.SMART); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + @Test(dataProvider = "resolve_ymaa") + public void test_resolve_ymaa_strict(int y, int m, int w, int d, LocalDate expected, boolean smart, boolean strict) { + Map fieldValues = new HashMap<>(); + fieldValues.put(ChronoField.YEAR, (long) y); + fieldValues.put(ChronoField.MONTH_OF_YEAR, (long) m); + fieldValues.put(ChronoField.ALIGNED_WEEK_OF_MONTH, (long) w); + fieldValues.put(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH, (long) d); + if (strict) { + LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + assertEquals(date, expected); + assertEquals(fieldValues.size(), 0); + } else { + try { + IsoChronology.INSTANCE.resolveDate(fieldValues, ResolverStyle.STRICT); + fail("Should have failed"); + } catch (DateTimeException ex) { + // expected + } + } + } + + //----------------------------------------------------------------------- + private static LocalDate date(int y, int m, int d) { + return LocalDate.of(y, m, d); + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKIsoEra.java b/jdk/test/java/time/tck/java/time/chrono/TCKIsoEra.java new file mode 100644 index 00000000000..e42cbc612db --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKIsoEra.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static java.time.temporal.ChronoField.ERA; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.time.chrono.Era; +import java.time.chrono.IsoChronology; +import java.time.chrono.IsoEra; +import java.time.temporal.ValueRange; +import java.util.List; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKIsoEra { + + @DataProvider(name = "IsoEras") + Object[][] data_of_eras() { + return new Object[][] { + {IsoEra.BCE, "BCE", 0}, + {IsoEra.CE, "CE", 1}, + }; + } + + @Test(dataProvider="IsoEras") + public void test_valueOf(IsoEra era , String eraName, int eraValue) { + assertEquals(era.getValue(), eraValue); + assertEquals(IsoEra.of(eraValue), era); + assertEquals(IsoEra.valueOf(eraName), era); + } + + //----------------------------------------------------------------------- + // values() + //----------------------------------------------------------------------- + @Test + public void test_values() { + List eraList = IsoChronology.INSTANCE.eras(); + IsoEra[] eras = IsoEra.values(); + assertEquals(eraList.size(), eras.length); + for (IsoEra era : eras) { + assertTrue(eraList.contains(era)); + } + } + + //----------------------------------------------------------------------- + // range() + //----------------------------------------------------------------------- + @Test + public void test_range() { + for (IsoEra era : IsoEra.values()) { + assertEquals(era.range(ERA), ValueRange.of(0, 1)); + } + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TestJapaneseChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java similarity index 60% rename from jdk/test/java/time/tck/java/time/chrono/TestJapaneseChronology.java rename to jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java index b3027dfb6f6..cd5e859d56a 100644 --- a/jdk/test/java/time/tck/java/time/chrono/TestJapaneseChronology.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseChronology.java @@ -56,24 +56,34 @@ */ package tck.java.time.chrono; +import static java.time.temporal.ChronoField.DAY_OF_MONTH; +import static java.time.temporal.ChronoField.ERA; +import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.YEAR; +import static java.time.temporal.ChronoField.YEAR_OF_ERA; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; -import java.util.List; - import java.time.DateTimeException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; +import java.time.Period; import java.time.Year; -import java.time.chrono.JapaneseChronology; -import java.time.chrono.JapaneseDate; +import java.time.chrono.ChronoLocalDate; import java.time.chrono.Chronology; import java.time.chrono.Era; import java.time.chrono.IsoChronology; -import java.time.temporal.Adjusters; +import java.time.chrono.JapaneseChronology; +import java.time.chrono.JapaneseDate; +import java.time.chrono.JapaneseEra; +import java.time.chrono.MinguoChronology; +import java.time.chrono.MinguoDate; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalAdjuster; +import java.util.List; import java.util.Locale; import org.testng.Assert; @@ -84,11 +94,11 @@ import org.testng.annotations.Test; * Test. */ @Test -public class TestJapaneseChronology { - private static int YDIFF_HEISEI = 1988; - private static int YDIFF_MEIJI = 1867; - private static int YDIFF_SHOWA = 1925; - private static int YDIFF_TAISHO = 1911; +public class TCKJapaneseChronology { + private static final int YDIFF_HEISEI = 1988; + private static final int YDIFF_MEIJI = 1867; + private static final int YDIFF_SHOWA = 1925; + private static final int YDIFF_TAISHO = 1911; //----------------------------------------------------------------------- // Chronology.of(String) @@ -162,11 +172,11 @@ public class TestJapaneseChronology { {JapaneseChronology.INSTANCE.date(1728, 10, 28), LocalDate.of(1728, 10, 28)}, {JapaneseChronology.INSTANCE.date(1728, 10, 29), LocalDate.of(1728, 10, 29)}, - {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_HEISEI, 1996 - YDIFF_HEISEI, 2, 29), LocalDate.of(1996, 2, 29)}, - {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_HEISEI, 2000 - YDIFF_HEISEI, 2, 29), LocalDate.of(2000, 2, 29)}, - {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_MEIJI, 1868 - YDIFF_MEIJI, 2, 29), LocalDate.of(1868, 2, 29)}, - {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_SHOWA, 1928 - YDIFF_SHOWA, 2, 29), LocalDate.of(1928, 2, 29)}, - {JapaneseChronology.INSTANCE.date(JapaneseChronology.ERA_TAISHO, 1912 - YDIFF_TAISHO, 2, 29), LocalDate.of(1912, 2, 29)}, + {JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 1996 - YDIFF_HEISEI, 2, 29), LocalDate.of(1996, 2, 29)}, + {JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2000 - YDIFF_HEISEI, 2, 29), LocalDate.of(2000, 2, 29)}, + {JapaneseChronology.INSTANCE.date(JapaneseEra.MEIJI, 1868 - YDIFF_MEIJI, 2, 29), LocalDate.of(1868, 2, 29)}, + {JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 1928 - YDIFF_SHOWA, 12, 25), LocalDate.of(1928, 12, 25)}, + {JapaneseChronology.INSTANCE.date(JapaneseEra.TAISHO, 1912 - YDIFF_TAISHO, 7, 30), LocalDate.of(1912, 7, 30)}, {JapaneseChronology.INSTANCE.dateYearDay(1996, 60), LocalDate.of(1996, 2, 29)}, {JapaneseChronology.INSTANCE.dateYearDay(1868, 60), LocalDate.of(1868, 2, 29)}, @@ -175,12 +185,12 @@ public class TestJapaneseChronology { }; } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_toLocalDate(JapaneseDate jdate, LocalDate iso) { assertEquals(LocalDate.from(jdate), iso); } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_fromCalendrical(JapaneseDate jdate, LocalDate iso) { assertEquals(JapaneseChronology.INSTANCE.date(iso), jdate); } @@ -209,7 +219,7 @@ public class TestJapaneseChronology { }; } - @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class) public void test_badDates(int year, int month, int dom) { JapaneseChronology.INSTANCE.date(year, month, dom); } @@ -220,30 +230,23 @@ public class TestJapaneseChronology { @DataProvider(name="prolepticYear") Object[][] data_prolepticYear() { return new Object[][] { - {2, JapaneseChronology.ERA_HEISEI, 1, 1 + YDIFF_HEISEI, false}, - {2, JapaneseChronology.ERA_HEISEI, 100, 100 + YDIFF_HEISEI, true}, - {2, JapaneseChronology.ERA_HEISEI, 0, YDIFF_HEISEI, true}, - {2, JapaneseChronology.ERA_HEISEI, -10, -10 + YDIFF_HEISEI, false}, + {2, JapaneseEra.HEISEI, 1, 1 + YDIFF_HEISEI, false}, + {2, JapaneseEra.HEISEI, 100, 100 + YDIFF_HEISEI, true}, + {2, JapaneseEra.HEISEI, 0, YDIFF_HEISEI, true}, + {2, JapaneseEra.HEISEI, -10, -10 + YDIFF_HEISEI, false}, - {-1, JapaneseChronology.ERA_MEIJI, 1, 1 + YDIFF_MEIJI, true}, - {-1, JapaneseChronology.ERA_MEIJI, 100, 100 + YDIFF_MEIJI, false}, - {-1, JapaneseChronology.ERA_MEIJI, 0, YDIFF_MEIJI, false}, - {-1, JapaneseChronology.ERA_MEIJI, -10, -10 + YDIFF_MEIJI, false}, + {-1, JapaneseEra.MEIJI, 1, 1 + YDIFF_MEIJI, true}, + {-1, JapaneseEra.MEIJI, 4, 4 + YDIFF_MEIJI, false}, - {1, JapaneseChronology.ERA_SHOWA, 1, 1 + YDIFF_SHOWA, false}, - {1, JapaneseChronology.ERA_SHOWA, 100, 100 + YDIFF_SHOWA, false}, - {1, JapaneseChronology.ERA_SHOWA, 0, YDIFF_SHOWA, false}, - {1, JapaneseChronology.ERA_SHOWA, -5, -5 + YDIFF_SHOWA, true}, - - {0, JapaneseChronology.ERA_TAISHO, 1, 1 + YDIFF_TAISHO, true}, - {0, JapaneseChronology.ERA_TAISHO, 100, 100 + YDIFF_TAISHO, false}, - {0, JapaneseChronology.ERA_TAISHO, 0, YDIFF_TAISHO, false}, - {0, JapaneseChronology.ERA_TAISHO, -10, -10 + YDIFF_TAISHO, false}, + {1, JapaneseEra.SHOWA, 1, 1 + YDIFF_SHOWA, false}, + {1, JapaneseEra.SHOWA, 7, 7 + YDIFF_SHOWA, true}, + {0, JapaneseEra.TAISHO, 1, 1 + YDIFF_TAISHO, true}, + {0, JapaneseEra.TAISHO, 4, 4 + YDIFF_TAISHO, false}, }; } - @Test(dataProvider="prolepticYear", groups={"tck"}) + @Test(dataProvider="prolepticYear") public void test_prolepticYear(int eraValue, Era era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) { Era eraObj = JapaneseChronology.INSTANCE.eraOf(eraValue) ; assertTrue(JapaneseChronology.INSTANCE.eras().contains(eraObj)); @@ -253,34 +256,130 @@ public class TestJapaneseChronology { assertEquals(JapaneseChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear).isLeap()) ; } + @DataProvider(name="prolepticYearError") + Object[][] data_prolepticYearError() { + return new Object[][] { + {JapaneseEra.MEIJI, 100}, + {JapaneseEra.MEIJI, 0}, + {JapaneseEra.MEIJI, -10}, + + {JapaneseEra.SHOWA, 100}, + {JapaneseEra.SHOWA, 0}, + {JapaneseEra.SHOWA, -10}, + + {JapaneseEra.TAISHO, 100}, + {JapaneseEra.TAISHO, 0}, + {JapaneseEra.TAISHO, -10}, + }; + } + + @Test(dataProvider="prolepticYearError", expectedExceptions=DateTimeException.class) + public void test_prolepticYearError(Era era, int yearOfEra) { + JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra); + } + + //----------------------------------------------------------------------- + // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...) + //----------------------------------------------------------------------- + @Test + public void test_InvalidEras() { + // Verify that the eras from every other Chronology are invalid + for (Chronology chrono : Chronology.getAvailableChronologies()) { + if (chrono instanceof JapaneseChronology) { + continue; + } + List eras = chrono.eras(); + for (Era era : eras) { + try { + ChronoLocalDate date = JapaneseChronology.INSTANCE.date(era, 1, 1, 1); + fail("JapaneseChronology.date did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + + try { + @SuppressWarnings("unused") + JapaneseDate jdate = JapaneseDate.of(era, 1, 1, 1); + fail("JapaneseDate.of did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + + try { + @SuppressWarnings("unused") + int year = JapaneseChronology.INSTANCE.prolepticYear(era, 1); + fail("JapaneseChronology.prolepticYear did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + + } + } + } + + //----------------------------------------------------------------------- + // get(TemporalField) + //----------------------------------------------------------------------- + @Test + public void test_getLong() { + JapaneseDate base = JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 63, 6, 30); + assertEquals(base.getLong(ERA), JapaneseEra.SHOWA.getValue()); + assertEquals(base.getLong(YEAR), 1988L); + assertEquals(base.getLong(YEAR_OF_ERA), 63L); + assertEquals(base.getLong(MONTH_OF_YEAR), 6L); + assertEquals(base.getLong(DAY_OF_MONTH), 30L); + } + + //----------------------------------------------------------------------- + // with(TemporalField, long) + //----------------------------------------------------------------------- + @Test + public void test_with_TemporalField_long() { + JapaneseDate base = JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 63, 6, 30); + JapaneseDate test = base.with(YEAR, 1987); + assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 62, 6, 30)); + + test = test.with(YEAR_OF_ERA, 2); + assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 2, 6, 30)); + + test = test.with(ERA, JapaneseEra.HEISEI.getValue()); + assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2, 6, 30)); + + test = test.with(MONTH_OF_YEAR, 3); + assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2, 3, 30)); + + test = test.with(DAY_OF_MONTH, 4); + assertEquals(test, JapaneseChronology.INSTANCE.date(JapaneseEra.HEISEI, 2, 3, 4)); + } + //----------------------------------------------------------------------- // with(WithAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust1() { JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 10, 29); - JapaneseDate test = base.with(Adjusters.lastDayOfMonth()); + JapaneseDate test = base.with(TemporalAdjuster.lastDayOfMonth()); assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 10, 31)); } - @Test(groups={"tck"}) + @Test public void test_adjust2() { JapaneseDate base = JapaneseChronology.INSTANCE.date(1728, 12, 2); - JapaneseDate test = base.with(Adjusters.lastDayOfMonth()); + JapaneseDate test = base.with(TemporalAdjuster.lastDayOfMonth()); assertEquals(test, JapaneseChronology.INSTANCE.date(1728, 12, 31)); } //----------------------------------------------------------------------- // JapaneseDate.with(Local*) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust_toLocalDate() { JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4); JapaneseDate test = jdate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, JapaneseChronology.INSTANCE.date(2012, 7, 6)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); @@ -289,14 +388,14 @@ public class TestJapaneseChronology { //----------------------------------------------------------------------- // LocalDate.with(JapaneseDate) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_LocalDate_adjustToJapaneseDate() { JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1728, 10, 29); LocalDate test = LocalDate.MIN.with(jdate); assertEquals(test, LocalDate.of(1728, 10, 29)); } - @Test(groups={"tck"}) + @Test public void test_LocalDateTime_adjustToJapaneseDate() { JapaneseDate jdate = JapaneseChronology.INSTANCE.date(1728, 10, 29); LocalDateTime test = LocalDateTime.MIN.with(jdate); @@ -309,15 +408,15 @@ public class TestJapaneseChronology { @DataProvider(name="japaneseEras") Object[][] data_japanseseEras() { return new Object[][] { - { JapaneseChronology.ERA_SEIREKI, -999, "Seireki"}, - { JapaneseChronology.ERA_MEIJI, -1, "Meiji"}, - { JapaneseChronology.ERA_TAISHO, 0, "Taisho"}, - { JapaneseChronology.ERA_SHOWA, 1, "Showa"}, - { JapaneseChronology.ERA_HEISEI, 2, "Heisei"}, + { JapaneseEra.SEIREKI, -999, "Seireki"}, + { JapaneseEra.MEIJI, -1, "Meiji"}, + { JapaneseEra.TAISHO, 0, "Taisho"}, + { JapaneseEra.SHOWA, 1, "Showa"}, + { JapaneseEra.HEISEI, 2, "Heisei"}, }; } - @Test(groups={"tck"}, dataProvider="japaneseEras") + @Test(dataProvider="japaneseEras") public void test_Japanese_Eras(Era era, int eraValue, String name) { assertEquals(era.getValue(), eraValue, "EraValue"); assertEquals(era.toString(), name, "Era Name"); @@ -326,7 +425,7 @@ public class TestJapaneseChronology { assertTrue(eras.contains(era), "Era is not present in JapaneseChronology.INSTANCE.eras()"); } - @Test(groups="tck") + @Test public void test_Japanese_badEras() { int badEras[] = {-1000, -998, -997, -2, 3, 4, 1000}; for (int badEra : badEras) { @@ -339,6 +438,70 @@ public class TestJapaneseChronology { } } + @Test(dataProvider="japaneseEras") + public void test_JapaneseEra_singletons(Era expectedEra, int eraValue, String name) { + JapaneseEra actualEra = JapaneseEra.valueOf(name); + assertEquals(actualEra, expectedEra, "JapaneseEra.valueOf(name)"); + + actualEra = JapaneseEra.of(eraValue); + assertEquals(actualEra, expectedEra, "JapaneseEra.of(value)"); + + String string = actualEra.toString(); + assertEquals(string, name, "JapaneseEra.toString()"); + } + + @Test + public void test_JapaneseEra_values() { + JapaneseEra[] actualEras = JapaneseEra.values(); + Object[][] erasInfo = data_japanseseEras(); + assertEquals(actualEras.length, erasInfo.length, "Wrong number of Eras"); + + for (int i = 0; i < erasInfo.length; i++) { + Object[] eraInfo = erasInfo[i]; + assertEquals(actualEras[i], eraInfo[0], "Singleton mismatch"); + } + } + + @Test + public void test_JapaneseChronology_eras() { + List actualEras = JapaneseChronology.INSTANCE.eras(); + Object[][] erasInfo = data_japanseseEras(); + assertEquals(actualEras.size(), erasInfo.length, "Wrong number of Eras"); + + for (int i = 0; i < erasInfo.length; i++) { + Object[] eraInfo = erasInfo[i]; + assertEquals(actualEras.get(i), eraInfo[0], "Singleton mismatch"); + } + } + + //----------------------------------------------------------------------- + // PeriodUntil() + //----------------------------------------------------------------------- + @Test + public void test_periodUntilDate() { + JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1); + JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2); + Period period = mdate1.periodUntil(mdate2); + assertEquals(period, Period.of(1, 1, 1)); + } + + @Test + public void test_periodUntilUnit() { + JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1); + JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2); + long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS); + assertEquals(months, 13); + } + + @Test + public void test_periodUntilDiffChrono() { + JapaneseDate mdate1 = JapaneseDate.of(1970, 1, 1); + JapaneseDate mdate2 = JapaneseDate.of(1971, 2, 2); + MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); + Period period = mdate1.periodUntil(ldate2); + assertEquals(period, Period.of(1, 1, 1)); + } + //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- @@ -361,7 +524,7 @@ public class TestJapaneseChronology { }; } - @Test(dataProvider="toString", groups={"tck"}) + @Test(dataProvider="toString") public void test_toString(JapaneseDate jdate, String expected) { assertEquals(jdate.toString(), expected); } @@ -369,12 +532,12 @@ public class TestJapaneseChronology { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_equals_true() { assertTrue(JapaneseChronology.INSTANCE.equals(JapaneseChronology.INSTANCE)); } - @Test(groups="tck") + @Test public void test_equals_false() { assertFalse(JapaneseChronology.INSTANCE.equals(IsoChronology.INSTANCE)); } diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseEra.java b/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseEra.java new file mode 100644 index 00000000000..1aa1df360f6 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKJapaneseEra.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static java.time.temporal.ChronoField.ERA; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.time.chrono.Era; +import java.time.chrono.JapaneseChronology; +import java.time.chrono.JapaneseEra; +import java.util.List; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKJapaneseEra { + + @DataProvider(name = "JapaneseEras") + Object[][] data_of_eras() { + return new Object[][] { + {JapaneseEra.HEISEI, "Heisei", 2}, + {JapaneseEra.SHOWA, "Showa", 1}, + {JapaneseEra.TAISHO, "Taisho", 0}, + {JapaneseEra.MEIJI, "Meiji", -1}, + {JapaneseEra.SEIREKI, "Seireki", -999}, + }; + } + + @Test(dataProvider="JapaneseEras") + public void test_valueOf(JapaneseEra era , String eraName, int eraValue) { + assertEquals(era.getValue(), eraValue); + assertEquals(JapaneseEra.of(eraValue), era); + assertEquals(JapaneseEra.valueOf(eraName), era); + } + + //----------------------------------------------------------------------- + // values() + //----------------------------------------------------------------------- + @Test + public void test_values() { + List eraList = JapaneseChronology.INSTANCE.eras(); + JapaneseEra[] eras = JapaneseEra.values(); + assertEquals(eraList.size(), eras.length); + for (JapaneseEra era : eras) { + assertTrue(eraList.contains(era)); + } + } + + //----------------------------------------------------------------------- + // range() + //----------------------------------------------------------------------- + @Test + public void test_range() { + // eras may be added after release + for (JapaneseEra era : JapaneseEra.values()) { + assertEquals(era.range(ERA).getMinimum(), -999); + assertEquals(era.range(ERA).getLargestMinimum(), -999); + assertEquals(era.range(ERA).getSmallestMaximum(), era.range(ERA).getMaximum()); + assertEquals(era.range(ERA).getMaximum() >= 2, true); + } + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java new file mode 100644 index 00000000000..cad29d76f29 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKMinguoChronology.java @@ -0,0 +1,523 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; + +import java.time.Clock; +import java.time.DateTimeException; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.Month; +import java.time.OffsetDateTime; +import java.time.Period; +import java.time.Year; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.ZonedDateTime; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.ChronoLocalDateTime; +import java.time.chrono.ChronoZonedDateTime; +import java.time.chrono.Chronology; +import java.time.chrono.Era; +import java.time.chrono.IsoChronology; +import java.time.chrono.JapaneseDate; +import java.time.chrono.MinguoChronology; +import java.time.chrono.MinguoDate; +import java.time.chrono.MinguoEra; +import java.time.chrono.ThaiBuddhistChronology; +import java.time.chrono.ThaiBuddhistDate; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalAdjuster; +import java.util.List; + +import org.testng.Assert; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKMinguoChronology { + + private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2); + private static final ZoneId ZONE_PARIS = ZoneId.of("Europe/Paris"); + private static final int YDIFF = 1911; + //----------------------------------------------------------------------- + // Chronology.ofName("Minguo") Lookup by name + //----------------------------------------------------------------------- + @Test + public void test_chrono_byName() { + Chronology c = MinguoChronology.INSTANCE; + Chronology test = Chronology.of("Minguo"); + Assert.assertNotNull(test, "The Minguo calendar could not be found byName"); + Assert.assertEquals(test.getId(), "Minguo", "ID mismatch"); + Assert.assertEquals(test.getCalendarType(), "roc", "Type mismatch"); + Assert.assertEquals(test, c); + } + + //----------------------------------------------------------------------- + // creation, toLocalDate() + //----------------------------------------------------------------------- + @DataProvider(name="samples") + Object[][] data_samples() { + return new Object[][] { + {MinguoChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1 + YDIFF, 1, 1)}, + {MinguoChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1 + YDIFF, 1, 2)}, + {MinguoChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1 + YDIFF, 1, 3)}, + + {MinguoChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2 + YDIFF, 1, 1)}, + {MinguoChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3 + YDIFF, 1, 1)}, + {MinguoChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3 + YDIFF, 12, 6)}, + {MinguoChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4 + YDIFF, 1, 1)}, + {MinguoChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4 + YDIFF, 7, 3)}, + {MinguoChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4 + YDIFF, 7, 4)}, + {MinguoChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5 + YDIFF, 1, 1)}, + {MinguoChronology.INSTANCE.date(100, 3, 3), LocalDate.of(100 + YDIFF, 3, 3)}, + {MinguoChronology.INSTANCE.date(101, 10, 28), LocalDate.of(101 + YDIFF, 10, 28)}, + {MinguoChronology.INSTANCE.date(101, 10, 29), LocalDate.of(101 + YDIFF, 10, 29)}, + + {MinguoChronology.INSTANCE.dateYearDay(1916 - YDIFF, 60), LocalDate.of(1916, 2, 29)}, + {MinguoChronology.INSTANCE.dateYearDay(1908 - YDIFF, 60), LocalDate.of(1908, 2, 29)}, + {MinguoChronology.INSTANCE.dateYearDay(2000 - YDIFF, 60), LocalDate.of(2000, 2, 29)}, + {MinguoChronology.INSTANCE.dateYearDay(2400 - YDIFF, 60), LocalDate.of(2400, 2, 29)}, + + {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.ROC, 1916 - YDIFF, 60), LocalDate.of(1916, 2, 29)}, + {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.BEFORE_ROC, 4, 60), LocalDate.of(1908, 2, 29)}, + {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.ROC, 2000 - YDIFF, 60), LocalDate.of(2000, 2, 29)}, + {MinguoChronology.INSTANCE.dateYearDay(MinguoEra.ROC, 2400 - YDIFF, 60), LocalDate.of(2400, 2, 29)}, + + {MinguoChronology.INSTANCE.date(MinguoEra.ROC, 1916 - YDIFF, 2, 29 ), LocalDate.of(1916, 2, 29)}, + {MinguoChronology.INSTANCE.date(MinguoEra.BEFORE_ROC, 4, 2, 29), LocalDate.of(1908, 2, 29)}, + {MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2000 - YDIFF, 2, 29), LocalDate.of(2000, 2, 29)}, + {MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2400 - YDIFF, 2, 29), LocalDate.of(2400, 2, 29)}, + }; + } + + @Test(dataProvider="samples") + public void test_toLocalDate(MinguoDate minguo, LocalDate iso) { + assertEquals(LocalDate.from(minguo), iso); + } + + @Test(dataProvider="samples") + public void test_fromCalendrical(MinguoDate minguo, LocalDate iso) { + assertEquals(MinguoChronology.INSTANCE.date(iso), minguo); + } + + @Test + public void test_dateNow(){ + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now()) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(ZoneId.systemDefault())) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(Clock.systemDefaultZone())) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoDate.now(Clock.systemDefaultZone().getZone())) ; + + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(ZoneId.systemDefault())) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(Clock.systemDefaultZone())) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(), MinguoChronology.INSTANCE.dateNow(Clock.systemDefaultZone().getZone())) ; + + ZoneId zoneId = ZoneId.of("Europe/Paris"); + assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.system(zoneId))) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoChronology.INSTANCE.dateNow(Clock.system(zoneId).getZone())) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId))) ; + assertEquals(MinguoChronology.INSTANCE.dateNow(zoneId), MinguoDate.now(Clock.system(zoneId).getZone())) ; + + assertEquals(MinguoChronology.INSTANCE.dateNow(ZoneId.of(ZoneOffset.UTC.getId())), MinguoChronology.INSTANCE.dateNow(Clock.systemUTC())) ; + } + + @SuppressWarnings("unused") + @Test(dataProvider="samples") + public void test_MinguoDate(MinguoDate minguoDate, LocalDate iso) { + MinguoDate hd = minguoDate; + ChronoLocalDateTime hdt = hd.atTime(LocalTime.NOON); + ZoneOffset zo = ZoneOffset.ofHours(1); + ChronoZonedDateTime hzdt = hdt.atZone(zo); + hdt = hdt.plus(1, ChronoUnit.YEARS); + hdt = hdt.plus(1, ChronoUnit.MONTHS); + hdt = hdt.plus(1, ChronoUnit.DAYS); + hdt = hdt.plus(1, ChronoUnit.HOURS); + hdt = hdt.plus(1, ChronoUnit.MINUTES); + hdt = hdt.plus(1, ChronoUnit.SECONDS); + hdt = hdt.plus(1, ChronoUnit.NANOS); + ChronoLocalDateTime a2 = hzdt.toLocalDateTime(); + MinguoDate a3 = a2.toLocalDate(); + MinguoDate a5 = hzdt.toLocalDate(); + //System.out.printf(" d: %s, dt: %s; odt: %s; zodt: %s; a4: %s%n", date, hdt, hodt, hzdt, a5); + } + + @Test() + public void test_MinguoChrono() { + MinguoDate h1 = MinguoChronology.INSTANCE.date(MinguoEra.ROC, 1, 2, 3); + MinguoDate h2 = h1; + ChronoLocalDateTime h3 = h2.atTime(LocalTime.NOON); + @SuppressWarnings("unused") + ChronoZonedDateTime h4 = h3.atZone(ZoneOffset.UTC); + } + + @DataProvider(name="badDates") + Object[][] data_badDates() { + return new Object[][] { + {1912, 0, 0}, + + {1912, -1, 1}, + {1912, 0, 1}, + {1912, 14, 1}, + {1912, 15, 1}, + + {1912, 1, -1}, + {1912, 1, 0}, + {1912, 1, 32}, + {1912, 2, 29}, + {1912, 2, 30}, + + {1912, 12, -1}, + {1912, 12, 0}, + {1912, 12, 32}, + + {1907 - YDIFF, 2, 29}, + {100 - YDIFF, 2, 29}, + {2100 - YDIFF, 2, 29}, + {2101 - YDIFF, 2, 29}, + }; + } + + @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class) + public void test_badDates(int year, int month, int dom) { + MinguoChronology.INSTANCE.date(year, month, dom); + } + + //----------------------------------------------------------------------- + // prolepticYear() and is LeapYear() + //----------------------------------------------------------------------- + @DataProvider(name="prolepticYear") + Object[][] data_prolepticYear() { + return new Object[][] { + {1, MinguoEra.ROC, 1912 - YDIFF, 1912 - YDIFF, true}, + {1, MinguoEra.ROC, 1916 - YDIFF, 1916 - YDIFF, true}, + {1, MinguoEra.ROC, 1914 - YDIFF, 1914 - YDIFF, false}, + {1, MinguoEra.ROC, 2000 - YDIFF, 2000 - YDIFF, true}, + {1, MinguoEra.ROC, 2100 - YDIFF, 2100 - YDIFF, false}, + {1, MinguoEra.ROC, 0, 0, false}, + {1, MinguoEra.ROC, 1908 - YDIFF, 1908 - YDIFF, true}, + {1, MinguoEra.ROC, 1900 - YDIFF, 1900 - YDIFF, false}, + {1, MinguoEra.ROC, 1600 - YDIFF, 1600 - YDIFF, true}, + + {0, MinguoEra.BEFORE_ROC, YDIFF - 1911, 1912 - YDIFF, true}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 1915, 1916 - YDIFF, true}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 1913, 1914 - YDIFF, false}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 1999, 2000 - YDIFF, true}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 2099, 2100 - YDIFF, false}, + {0, MinguoEra.BEFORE_ROC, 1, 0, false}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 1907, 1908 - YDIFF, true}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 1899, 1900 - YDIFF, false}, + {0, MinguoEra.BEFORE_ROC, YDIFF - 1599, 1600 - YDIFF, true}, + + }; + } + + @Test(dataProvider="prolepticYear") + public void test_prolepticYear(int eraValue, Era era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) { + Era eraObj = MinguoChronology.INSTANCE.eraOf(eraValue) ; + assertTrue(MinguoChronology.INSTANCE.eras().contains(eraObj)); + assertEquals(eraObj, era); + assertEquals(MinguoChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear); + assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ; + assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear + YDIFF).isLeap()) ; + } + + //----------------------------------------------------------------------- + // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...) + //----------------------------------------------------------------------- + @Test + public void test_InvalidEras() { + // Verify that the eras from every other Chronology are invalid + for (Chronology chrono : Chronology.getAvailableChronologies()) { + if (chrono instanceof MinguoChronology) { + continue; + } + List eras = chrono.eras(); + for (Era era : eras) { + try { + ChronoLocalDate date = MinguoChronology.INSTANCE.date(era, 1, 1, 1); + fail("MinguoChronology.date did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + + /* Test for missing MinguoDate.of(Era, y, m, d) method. + try { + @SuppressWarnings("unused") + MinguoDate jdate = MinguoDate.of(era, 1, 1, 1); + fail("MinguoDate.of did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + */ + + try { + @SuppressWarnings("unused") + int year = MinguoChronology.INSTANCE.prolepticYear(era, 1); + fail("MinguoChronology.prolepticYear did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + } + } + } + + //----------------------------------------------------------------------- + // with(DateTimeAdjuster) + //----------------------------------------------------------------------- + @Test + public void test_adjust1() { + MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29); + MinguoDate test = base.with(TemporalAdjuster.lastDayOfMonth()); + assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31)); + } + + @Test + public void test_adjust2() { + MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2); + MinguoDate test = base.with(TemporalAdjuster.lastDayOfMonth()); + assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31)); + } + + //----------------------------------------------------------------------- + // MinguoDate.with(Local*) + //----------------------------------------------------------------------- + @Test + public void test_adjust_toLocalDate() { + MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4); + MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6)); + assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6)); + } + + @Test(expectedExceptions=DateTimeException.class) + public void test_adjust_toMonth() { + MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4); + minguo.with(Month.APRIL); + } + + //----------------------------------------------------------------------- + // LocalDate.with(MinguoDate) + //----------------------------------------------------------------------- + @Test + public void test_LocalDate_adjustToMinguoDate() { + MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29); + LocalDate test = LocalDate.MIN.with(minguo); + assertEquals(test, LocalDate.of(2012, 10, 29)); + } + + @Test + public void test_LocalDateTime_adjustToMinguoDate() { + MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29); + LocalDateTime test = LocalDateTime.MIN.with(minguo); + assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0)); + } + + //----------------------------------------------------------------------- + // localDateTime() + //----------------------------------------------------------------------- + @DataProvider(name="localDateTime") + Object[][] data_localDateTime() { + return new Object[][] { + {LocalDateTime.of(2012, 2, 29, 2, 7), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7), null}, + {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, + {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, + + {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, + {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, + {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, + {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, + }; + } + + @Test(dataProvider="localDateTime") + public void test_localDateTime(TemporalAccessor accessor, MinguoDate expectedDate, LocalTime expectedTime, Class expectedEx) { + if (expectedEx == null) { + ChronoLocalDateTime result = MinguoChronology.INSTANCE.localDateTime(accessor); + assertEquals(result.toLocalDate(), expectedDate); + assertEquals(MinguoDate.from(accessor), expectedDate); + assertEquals(result.toLocalTime(), expectedTime); + } else { + try { + ChronoLocalDateTime result = MinguoChronology.INSTANCE.localDateTime(accessor); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + + //----------------------------------------------------------------------- + // zonedDateTime(TemporalAccessor) + //----------------------------------------------------------------------- + @DataProvider(name="zonedDateTime") + Object[][] data_zonedDateTime() { + return new Object[][] { + {ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, + {OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29), LocalTime.of(2, 7, 1, 1), null}, + + {LocalDateTime.of(2012, 2, 29, 2, 7), null, null, DateTimeException.class}, + {JapaneseDate.of(2012, 2, 29), null, null, DateTimeException.class}, + {ThaiBuddhistDate.of(2012 + 543, 2, 29), null, null, DateTimeException.class}, + {LocalDate.of(2012, 2, 29), null, null, DateTimeException.class}, + {LocalTime.of(20, 30, 29, 0), null, null, DateTimeException.class}, + }; + } + + @Test(dataProvider="zonedDateTime") + public void test_zonedDateTime(TemporalAccessor accessor, MinguoDate expectedDate, LocalTime expectedTime, Class expectedEx) { + if (expectedEx == null) { + ChronoZonedDateTime result = MinguoChronology.INSTANCE.zonedDateTime(accessor); + assertEquals(result.toLocalDate(), expectedDate); + assertEquals(MinguoDate.from(accessor), expectedDate); + assertEquals(result.toLocalTime(), expectedTime); + + } else { + try { + ChronoZonedDateTime result = MinguoChronology.INSTANCE.zonedDateTime(accessor); + fail(); + } catch (Exception ex) { + assertTrue(expectedEx.isInstance(ex)); + } + } + } + + //----------------------------------------------------------------------- + // zonedDateTime(Instant, ZoneId ) + //----------------------------------------------------------------------- + @Test + public void test_Instant_zonedDateTime() { + OffsetDateTime offsetDateTime = OffsetDateTime.of(2012, 2, 29, 2, 7, 1, 1, OFFSET_PTWO); + ZonedDateTime zonedDateTime = ZonedDateTime.of(2012, 2, 29, 2, 7, 1, 1, ZONE_PARIS); + + ChronoZonedDateTime result = MinguoChronology.INSTANCE.zonedDateTime(offsetDateTime.toInstant(), offsetDateTime.getOffset()); + assertEquals(result.toLocalDate(), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29)); + assertEquals(result.toLocalTime(), LocalTime.of(2, 7, 1, 1)); + + result = MinguoChronology.INSTANCE.zonedDateTime(zonedDateTime.toInstant(), zonedDateTime.getOffset()); + assertEquals(result.toLocalDate(), MinguoChronology.INSTANCE.date(MinguoEra.ROC, 2012 - YDIFF, 2, 29)); + assertEquals(result.toLocalTime(), LocalTime.of(2, 7, 1, 1)); + } + + //----------------------------------------------------------------------- + // PeriodUntil() + //----------------------------------------------------------------------- + @Test + public void test_periodUntilDate() { + MinguoDate mdate1 = MinguoDate.of(1970, 1, 1); + MinguoDate mdate2 = MinguoDate.of(1971, 2, 2); + Period period = mdate1.periodUntil(mdate2); + assertEquals(period, Period.of(1, 1, 1)); + } + + @Test + public void test_periodUntilUnit() { + MinguoDate mdate1 = MinguoDate.of(1970, 1, 1); + MinguoDate mdate2 = MinguoDate.of(1971, 2, 2); + long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS); + assertEquals(months, 13); + } + + @Test + public void test_periodUntilDiffChrono() { + MinguoDate mdate1 = MinguoDate.of(1970, 1, 1); + MinguoDate mdate2 = MinguoDate.of(1971, 2, 2); + ThaiBuddhistDate ldate2 = ThaiBuddhistChronology.INSTANCE.date(mdate2); + Period period = mdate1.periodUntil(ldate2); + assertEquals(period, Period.of(1, 1, 1)); + } + + //----------------------------------------------------------------------- + // toString() + //----------------------------------------------------------------------- + @DataProvider(name="toString") + Object[][] data_toString() { + return new Object[][] { + {MinguoChronology.INSTANCE.date(1, 1, 1), "Minguo ROC 1-01-01"}, + {MinguoChronology.INSTANCE.date(1728, 10, 28), "Minguo ROC 1728-10-28"}, + {MinguoChronology.INSTANCE.date(1728, 10, 29), "Minguo ROC 1728-10-29"}, + {MinguoChronology.INSTANCE.date(1727, 12, 5), "Minguo ROC 1727-12-05"}, + {MinguoChronology.INSTANCE.date(1727, 12, 6), "Minguo ROC 1727-12-06"}, + }; + } + + @Test(dataProvider="toString") + public void test_toString(MinguoDate minguo, String expected) { + assertEquals(minguo.toString(), expected); + } + + //----------------------------------------------------------------------- + // equals() + //----------------------------------------------------------------------- + @Test + public void test_equals_true() { + assertTrue(MinguoChronology.INSTANCE.equals(MinguoChronology.INSTANCE)); + } + + @Test + public void test_equals_false() { + assertFalse(MinguoChronology.INSTANCE.equals(IsoChronology.INSTANCE)); + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKMinguoEra.java b/jdk/test/java/time/tck/java/time/chrono/TCKMinguoEra.java new file mode 100644 index 00000000000..19e05e80444 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKMinguoEra.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + + +import static java.time.temporal.ChronoField.ERA; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.time.chrono.Era; +import java.time.chrono.MinguoChronology; +import java.time.chrono.MinguoEra; +import java.time.temporal.ValueRange; +import java.util.List; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKMinguoEra { + + @DataProvider(name = "MinguoEras") + Object[][] data_of_eras() { + return new Object[][] { + {MinguoEra.BEFORE_ROC, "BEFORE_ROC", 0}, + {MinguoEra.ROC, "ROC", 1}, + }; + } + + //----------------------------------------------------------------------- + // valueOf() + //----------------------------------------------------------------------- + @Test(dataProvider="MinguoEras") + public void test_valueOf(MinguoEra era , String eraName, int eraValue) { + assertEquals(era.getValue(), eraValue); + assertEquals(MinguoEra.of(eraValue), era); + assertEquals(MinguoEra.valueOf(eraName), era); + } + + + //----------------------------------------------------------------------- + // values() + //----------------------------------------------------------------------- + @Test + public void test_values() { + List eraList = MinguoChronology.INSTANCE.eras(); + MinguoEra[] eras = MinguoEra.values() ; + assertEquals(eraList.size(), eras.length); + for (MinguoEra era : eras) { + assertTrue(eraList.contains(era)); + } + } + + //----------------------------------------------------------------------- + // range() + //----------------------------------------------------------------------- + @Test + public void test_range() { + for (MinguoEra era : MinguoEra.values()) { + assertEquals(era.range(ERA), ValueRange.of(0, 1)); + } + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java b/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java index 0236656aad6..b67f01185aa 100644 --- a/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKTestServiceLoader.java @@ -60,9 +60,13 @@ package tck.java.time.chrono; import static org.testng.Assert.assertEquals; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.time.LocalDate; -import java.time.chrono.Chronology; import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; import org.testng.annotations.Test; @@ -73,7 +77,7 @@ import org.testng.annotations.Test; @Test public class TCKTestServiceLoader { - @Test(groups={"tck"}) + @Test public void test_CopticServiceLoader() { Chronology chrono = Chronology.of("Coptic"); ChronoLocalDate copticDate = chrono.date(1729, 4, 27); @@ -81,4 +85,22 @@ public class TCKTestServiceLoader { assertEquals(ld, LocalDate.of(2013, 1, 5), "CopticDate does not match LocalDate"); } + + //----------------------------------------------------------------------- + // Test Serialization of Loaded Coptic Calendar + //----------------------------------------------------------------------- + @Test + public void test_ChronoSerialization() throws Exception { + Chronology chrono = Chronology.of("Coptic"); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + ObjectOutputStream out = new ObjectOutputStream(baos); + out.writeObject(chrono); + out.close(); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + + ObjectInputStream in = new ObjectInputStream(bais); + @SuppressWarnings("unchecked") + Chronology ser = (Chronology) in.readObject(); + assertEquals(ser, chrono, "deserialized Chronology is wrong"); + } } diff --git a/jdk/test/java/time/tck/java/time/chrono/TestThaiBuddhistChronology.java b/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java similarity index 75% rename from jdk/test/java/time/tck/java/time/chrono/TestThaiBuddhistChronology.java rename to jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java index 32eae1e073e..04d9dd982ba 100644 --- a/jdk/test/java/time/tck/java/time/chrono/TestThaiBuddhistChronology.java +++ b/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistChronology.java @@ -64,21 +64,28 @@ import static java.time.temporal.ChronoField.YEAR_OF_ERA; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; +import static org.testng.Assert.fail; import java.time.DateTimeException; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.Month; +import java.time.Period; import java.time.Year; -import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.ThaiBuddhistDate; -import java.time.chrono.Chronology; import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; import java.time.chrono.Era; import java.time.chrono.IsoChronology; -import java.time.temporal.Adjusters; +import java.time.chrono.MinguoChronology; +import java.time.chrono.MinguoDate; +import java.time.chrono.ThaiBuddhistChronology; +import java.time.chrono.ThaiBuddhistDate; +import java.time.chrono.ThaiBuddhistEra; import java.time.temporal.ChronoField; +import java.time.temporal.ChronoUnit; +import java.time.temporal.TemporalAdjuster; import java.time.temporal.ValueRange; +import java.util.List; import java.util.Locale; import org.testng.Assert; @@ -89,7 +96,7 @@ import org.testng.annotations.Test; * Test. */ @Test -public class TestThaiBuddhistChronology { +public class TCKThaiBuddhistChronology { private static final int YDIFF = 543; @@ -173,12 +180,12 @@ public class TestThaiBuddhistChronology { }; } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_toLocalDate(ThaiBuddhistDate jdate, LocalDate iso) { assertEquals(LocalDate.from(jdate), iso); } - @Test(dataProvider="samples", groups={"tck"}) + @Test(dataProvider="samples") public void test_fromCalendrical(ThaiBuddhistDate jdate, LocalDate iso) { assertEquals(ThaiBuddhistChronology.INSTANCE.date(iso), jdate); } @@ -207,7 +214,7 @@ public class TestThaiBuddhistChronology { }; } - @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class) public void test_badDates(int year, int month, int dom) { ThaiBuddhistChronology.INSTANCE.date(year, month, dom); } @@ -218,32 +225,32 @@ public class TestThaiBuddhistChronology { @DataProvider(name="prolepticYear") Object[][] data_prolepticYear() { return new Object[][] { - {1, ThaiBuddhistChronology.ERA_BE, 4 + YDIFF, 4 + YDIFF, true}, - {1, ThaiBuddhistChronology.ERA_BE, 7 + YDIFF, 7 + YDIFF, false}, - {1, ThaiBuddhistChronology.ERA_BE, 8 + YDIFF, 8 + YDIFF, true}, - {1, ThaiBuddhistChronology.ERA_BE, 1000 + YDIFF, 1000 + YDIFF, false}, - {1, ThaiBuddhistChronology.ERA_BE, 2000 + YDIFF, 2000 + YDIFF, true}, - {1, ThaiBuddhistChronology.ERA_BE, 0, 0, false}, - {1, ThaiBuddhistChronology.ERA_BE, -4 + YDIFF, -4 + YDIFF, true}, - {1, ThaiBuddhistChronology.ERA_BE, -7 + YDIFF, -7 + YDIFF, false}, - {1, ThaiBuddhistChronology.ERA_BE, -100 + YDIFF, -100 + YDIFF, false}, - {1, ThaiBuddhistChronology.ERA_BE, -800 + YDIFF, -800 + YDIFF, true}, + {1, ThaiBuddhistEra.BE, 4 + YDIFF, 4 + YDIFF, true}, + {1, ThaiBuddhistEra.BE, 7 + YDIFF, 7 + YDIFF, false}, + {1, ThaiBuddhistEra.BE, 8 + YDIFF, 8 + YDIFF, true}, + {1, ThaiBuddhistEra.BE, 1000 + YDIFF, 1000 + YDIFF, false}, + {1, ThaiBuddhistEra.BE, 2000 + YDIFF, 2000 + YDIFF, true}, + {1, ThaiBuddhistEra.BE, 0, 0, false}, + {1, ThaiBuddhistEra.BE, -4 + YDIFF, -4 + YDIFF, true}, + {1, ThaiBuddhistEra.BE, -7 + YDIFF, -7 + YDIFF, false}, + {1, ThaiBuddhistEra.BE, -100 + YDIFF, -100 + YDIFF, false}, + {1, ThaiBuddhistEra.BE, -800 + YDIFF, -800 + YDIFF, true}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -3 - YDIFF, 4 + YDIFF, true}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -6 - YDIFF, 7 + YDIFF, false}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -7 - YDIFF, 8 + YDIFF, true}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -999 - YDIFF, 1000 + YDIFF, false}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, -1999 - YDIFF, 2000 + YDIFF, true}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 1, 0, false}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 5 - YDIFF, -4 + YDIFF, true}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 8 - YDIFF, -7 + YDIFF, false}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 101 - YDIFF, -100 + YDIFF, false}, - {0, ThaiBuddhistChronology.ERA_BEFORE_BE, 801 - YDIFF, -800 + YDIFF, true}, + {0, ThaiBuddhistEra.BEFORE_BE, -3 - YDIFF, 4 + YDIFF, true}, + {0, ThaiBuddhistEra.BEFORE_BE, -6 - YDIFF, 7 + YDIFF, false}, + {0, ThaiBuddhistEra.BEFORE_BE, -7 - YDIFF, 8 + YDIFF, true}, + {0, ThaiBuddhistEra.BEFORE_BE, -999 - YDIFF, 1000 + YDIFF, false}, + {0, ThaiBuddhistEra.BEFORE_BE, -1999 - YDIFF, 2000 + YDIFF, true}, + {0, ThaiBuddhistEra.BEFORE_BE, 1, 0, false}, + {0, ThaiBuddhistEra.BEFORE_BE, 5 - YDIFF, -4 + YDIFF, true}, + {0, ThaiBuddhistEra.BEFORE_BE, 8 - YDIFF, -7 + YDIFF, false}, + {0, ThaiBuddhistEra.BEFORE_BE, 101 - YDIFF, -100 + YDIFF, false}, + {0, ThaiBuddhistEra.BEFORE_BE, 801 - YDIFF, -800 + YDIFF, true}, }; } - @Test(dataProvider="prolepticYear", groups={"tck"}) + @Test(dataProvider="prolepticYear") public void test_prolepticYear(int eraValue, Era era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) { Era eraObj = ThaiBuddhistChronology.INSTANCE.eraOf(eraValue) ; assertTrue(ThaiBuddhistChronology.INSTANCE.eras().contains(eraObj)); @@ -253,34 +260,73 @@ public class TestThaiBuddhistChronology { assertEquals(ThaiBuddhistChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear - YDIFF).isLeap()) ; } + //----------------------------------------------------------------------- + // Bad Era for Chronology.date(era,...) and Chronology.prolepticYear(Era,...) + //----------------------------------------------------------------------- + @Test + public void test_InvalidEras() { + // Verify that the eras from every other Chronology are invalid + for (Chronology chrono : Chronology.getAvailableChronologies()) { + if (chrono instanceof ThaiBuddhistChronology) { + continue; + } + List eras = chrono.eras(); + for (Era era : eras) { + try { + ChronoLocalDate date = ThaiBuddhistChronology.INSTANCE.date(era, 1, 1, 1); + fail("ThaiBuddhistChronology.date did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + + /* TODO: Test for missing ThaiBuddhistDate.of(Era, y, m, d) method. + try { + @SuppressWarnings("unused") + ThaiBuddhistDate jdate = ThaiBuddhistDate.of(era, 1, 1, 1); + fail("ThaiBuddhistDate.of did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } + */ + + try { + @SuppressWarnings("unused") + int year = ThaiBuddhistChronology.INSTANCE.prolepticYear(era, 1); + fail("ThaiBuddhistChronology.prolepticYear did not throw ClassCastException for Era: " + era); + } catch (ClassCastException cex) { + ; // ignore expected exception + } } + } + } + //----------------------------------------------------------------------- // with(WithAdjuster) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust1() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 10, 29); - ThaiBuddhistDate test = base.with(Adjusters.lastDayOfMonth()); + ThaiBuddhistDate test = base.with(TemporalAdjuster.lastDayOfMonth()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 10, 31)); } - @Test(groups={"tck"}) + @Test public void test_adjust2() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(1728, 12, 2); - ThaiBuddhistDate test = base.with(Adjusters.lastDayOfMonth()); + ThaiBuddhistDate test = base.with(TemporalAdjuster.lastDayOfMonth()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(1728, 12, 31)); } //----------------------------------------------------------------------- // withYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withYear_BE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29); ThaiBuddhistDate test = base.with(YEAR, 2554); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2554, 8, 29)); } - @Test(groups={"tck"}) + @Test public void test_withYear_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); ThaiBuddhistDate test = base.with(YEAR_OF_ERA, 2554); @@ -290,38 +336,38 @@ public class TestThaiBuddhistChronology { //----------------------------------------------------------------------- // withEra() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_withEra_BE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29); - ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistChronology.ERA_BE.getValue()); + ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); } - @Test(groups={"tck"}) + @Test public void test_withEra_BBE() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); - ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistChronology.ERA_BEFORE_BE.getValue()); + ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BEFORE_BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29)); } - @Test(groups={"tck"}) + @Test public void test_withEra_swap() { ThaiBuddhistDate base = ThaiBuddhistChronology.INSTANCE.date(-2554, 8, 29); - ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistChronology.ERA_BE.getValue()); + ThaiBuddhistDate test = base.with(ChronoField.ERA, ThaiBuddhistEra.BE.getValue()); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 8, 29)); } //----------------------------------------------------------------------- // BuddhistDate.with(Local*) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_adjust_toLocalDate() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); ThaiBuddhistDate test = jdate.with(LocalDate.of(2012, 7, 6)); assertEquals(test, ThaiBuddhistChronology.INSTANCE.date(2555, 7, 6)); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_adjust_toMonth() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(1726, 1, 4); jdate.with(Month.APRIL); @@ -330,20 +376,48 @@ public class TestThaiBuddhistChronology { //----------------------------------------------------------------------- // LocalDate.with(BuddhistDate) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_LocalDate_adjustToBuddhistDate() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29); LocalDate test = LocalDate.MIN.with(jdate); assertEquals(test, LocalDate.of(2012, 10, 29)); } - @Test(groups={"tck"}) + @Test public void test_LocalDateTime_adjustToBuddhistDate() { ThaiBuddhistDate jdate = ThaiBuddhistChronology.INSTANCE.date(2555, 10, 29); LocalDateTime test = LocalDateTime.MIN.with(jdate); assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0)); } + //----------------------------------------------------------------------- + // PeriodUntil() + //----------------------------------------------------------------------- + @Test + public void test_periodUntilDate() { + ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); + ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); + Period period = mdate1.periodUntil(mdate2); + assertEquals(period, Period.of(1, 1, 1)); + } + + @Test + public void test_periodUntilUnit() { + ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); + ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); + long months = mdate1.periodUntil(mdate2, ChronoUnit.MONTHS); + assertEquals(months, 13); + } + + @Test + public void test_periodUntilDiffChrono() { + ThaiBuddhistDate mdate1 = ThaiBuddhistDate.of(1, 1, 1); + ThaiBuddhistDate mdate2 = ThaiBuddhistDate.of(2, 2, 2); + MinguoDate ldate2 = MinguoChronology.INSTANCE.date(mdate2); + Period period = mdate1.periodUntil(ldate2); + assertEquals(period, Period.of(1, 1, 1)); + } + //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- @@ -358,7 +432,7 @@ public class TestThaiBuddhistChronology { }; } - @Test(dataProvider="toString", groups={"tck"}) + @Test(dataProvider="toString") public void test_toString(ThaiBuddhistDate jdate, String expected) { assertEquals(jdate.toString(), expected); } @@ -366,7 +440,7 @@ public class TestThaiBuddhistChronology { //----------------------------------------------------------------------- // chronology range(ChronoField) //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_Chrono_range() { long minYear = LocalDate.MIN.getYear() + YDIFF; long maxYear = LocalDate.MAX.getYear() + YDIFF; @@ -381,12 +455,12 @@ public class TestThaiBuddhistChronology { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_equals_true() { assertTrue(ThaiBuddhistChronology.INSTANCE.equals(ThaiBuddhistChronology.INSTANCE)); } - @Test(groups="tck") + @Test public void test_equals_false() { assertFalse(ThaiBuddhistChronology.INSTANCE.equals(IsoChronology.INSTANCE)); } diff --git a/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistEra.java b/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistEra.java new file mode 100644 index 00000000000..4737edb3d28 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/chrono/TCKThaiBuddhistEra.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.chrono; + +import static java.time.temporal.ChronoField.ERA; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.time.chrono.Era; +import java.time.chrono.ThaiBuddhistChronology; +import java.time.chrono.ThaiBuddhistEra; +import java.time.temporal.ValueRange; +import java.util.List; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test. + */ +@Test +public class TCKThaiBuddhistEra { + + @DataProvider(name = "ThaiBuddhistEras") + Object[][] data_of_eras() { + return new Object[][] { + {ThaiBuddhistEra.BEFORE_BE, "BEFORE_BE", 0}, + {ThaiBuddhistEra.BE, "BE", 1}, + }; + } + + + //----------------------------------------------------------------------- + // valueOf() + //----------------------------------------------------------------------- + @Test(dataProvider="ThaiBuddhistEras") + public void test_valueOf(ThaiBuddhistEra era , String eraName, int eraValue) { + assertEquals(era.getValue(), eraValue); + assertEquals(ThaiBuddhistEra.of(eraValue), era); + assertEquals(ThaiBuddhistEra.valueOf(eraName), era); + } + + //----------------------------------------------------------------------- + // values() + //----------------------------------------------------------------------- + @Test + public void test_values() { + List eraList = ThaiBuddhistChronology.INSTANCE.eras(); + ThaiBuddhistEra[] eras = ThaiBuddhistEra.values(); + assertEquals(eraList.size(), eras.length); + for (ThaiBuddhistEra era : eras) { + assertTrue(eraList.contains(era)); + } + } + + //----------------------------------------------------------------------- + // range() + //----------------------------------------------------------------------- + @Test + public void test_range() { + for (ThaiBuddhistEra era : ThaiBuddhistEra.values()) { + assertEquals(era.range(ERA), ValueRange.of(0, 1)); + } + } + +} diff --git a/jdk/test/java/time/tck/java/time/chrono/TestChronoLocalDateTime.java b/jdk/test/java/time/tck/java/time/chrono/TestChronoLocalDateTime.java deleted file mode 100644 index fd72237b8b7..00000000000 --- a/jdk/test/java/time/tck/java/time/chrono/TestChronoLocalDateTime.java +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of JSR-310 nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package tck.java.time.chrono; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.time.Duration; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.chrono.HijrahChronology; -import java.time.chrono.JapaneseChronology; -import java.time.chrono.MinguoChronology; -import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.ChronoLocalDateTime; -import java.time.chrono.Chronology; -import java.time.chrono.IsoChronology; -import java.time.temporal.ChronoUnit; -import java.time.temporal.Temporal; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalAdjuster; -import java.time.temporal.TemporalAmount; -import java.time.temporal.TemporalField; -import java.time.temporal.TemporalUnit; -import java.time.temporal.ValueRange; -import java.util.ArrayList; -import java.util.List; - -import org.testng.Assert; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -/** - * Test assertions that must be true for all built-in chronologies. - */ -@Test -public class TestChronoLocalDateTime { - //----------------------------------------------------------------------- - // regular data factory for names and descriptions of available calendars - //----------------------------------------------------------------------- - @DataProvider(name = "calendars") - Chronology[][] data_of_calendars() { - return new Chronology[][]{ - {HijrahChronology.INSTANCE}, - {IsoChronology.INSTANCE}, - {JapaneseChronology.INSTANCE}, - {MinguoChronology.INSTANCE}, - {ThaiBuddhistChronology.INSTANCE}}; - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badWithAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDateTime cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); - TemporalAdjuster adjuster = new FixedAdjuster(cdt2); - if (chrono != chrono2) { - try { - ChronoLocalDateTime notreached = cdt.with(adjuster); - Assert.fail("WithAdjuster should have thrown a ClassCastException, " - + "required: " + cdt + ", supplied: " + cdt2); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDateTime result = cdt.with(adjuster); - assertEquals(result, cdt2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badPlusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDateTime cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); - TemporalAmount adjuster = new FixedAdjuster(cdt2); - if (chrono != chrono2) { - try { - ChronoLocalDateTime notreached = cdt.plus(adjuster); - Assert.fail("WithAdjuster should have thrown a ClassCastException, " - + "required: " + cdt + ", supplied: " + cdt2); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDateTime result = cdt.plus(adjuster); - assertEquals(result, cdt2, "WithAdjuster failed to replace date time"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badMinusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDateTime cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); - TemporalAmount adjuster = new FixedAdjuster(cdt2); - if (chrono != chrono2) { - try { - ChronoLocalDateTime notreached = cdt.minus(adjuster); - Assert.fail("WithAdjuster should have thrown a ClassCastException, " - + "required: " + cdt + ", supplied: " + cdt2); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDateTime result = cdt.minus(adjuster); - assertEquals(result, cdt2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badPlusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDateTime cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); - TemporalUnit adjuster = new FixedTemporalUnit(cdt2); - if (chrono != chrono2) { - try { - ChronoLocalDateTime notreached = cdt.plus(1, adjuster); - Assert.fail("TemporalUnit.doAdd plus should have thrown a ClassCastException" + cdt - + ", can not be cast to " + cdt2); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDateTime result = cdt.plus(1, adjuster); - assertEquals(result, cdt2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badMinusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDateTime cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); - TemporalUnit adjuster = new FixedTemporalUnit(cdt2); - if (chrono != chrono2) { - try { - ChronoLocalDateTime notreached = cdt.minus(1, adjuster); - Assert.fail("TemporalUnit.doAdd minus should have thrown a ClassCastException" + cdt.getClass() - + ", can not be cast to " + cdt2.getClass()); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDateTime result = cdt.minus(1, adjuster); - assertEquals(result, cdt2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badTemporalFieldChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDateTime cdt = chrono.date(refDate).atTime(LocalTime.NOON); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDateTime cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); - TemporalField adjuster = new FixedTemporalField(cdt2); - if (chrono != chrono2) { - try { - ChronoLocalDateTime notreached = cdt.with(adjuster, 1); - Assert.fail("TemporalField doSet should have thrown a ClassCastException" + cdt.getClass() - + ", can not be cast to " + cdt2.getClass()); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDateTime result = cdt.with(adjuster, 1); - assertEquals(result, cdt2, "TemporalField doSet failed to replace date"); - } - } - } - - //----------------------------------------------------------------------- - // isBefore, isAfter, isEqual - //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="calendars") - public void test_datetime_comparisons(Chronology chrono) { - List> dates = new ArrayList<>(); - - ChronoLocalDateTime date = chrono.date(LocalDate.of(1900, 1, 1)).atTime(LocalTime.MIN); - - // Insert dates in order, no duplicates - dates.add(date.minus(100, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.MONTHS)); - dates.add(date.minus(1, ChronoUnit.WEEKS)); - dates.add(date.minus(1, ChronoUnit.DAYS)); - dates.add(date.minus(1, ChronoUnit.HOURS)); - dates.add(date.minus(1, ChronoUnit.MINUTES)); - dates.add(date.minus(1, ChronoUnit.SECONDS)); - dates.add(date.minus(1, ChronoUnit.NANOS)); - dates.add(date); - dates.add(date.plus(1, ChronoUnit.NANOS)); - dates.add(date.plus(1, ChronoUnit.SECONDS)); - dates.add(date.plus(1, ChronoUnit.MINUTES)); - dates.add(date.plus(1, ChronoUnit.HOURS)); - dates.add(date.plus(1, ChronoUnit.DAYS)); - dates.add(date.plus(1, ChronoUnit.WEEKS)); - dates.add(date.plus(1, ChronoUnit.MONTHS)); - dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(100, ChronoUnit.YEARS)); - - // Check these dates against the corresponding dates for every calendar - for (Chronology[] clist : data_of_calendars()) { - List> otherDates = new ArrayList<>(); - Chronology chrono2 = clist[0]; - for (ChronoLocalDateTime d : dates) { - otherDates.add(chrono2.date(d).atTime(d.toLocalTime())); - } - - // Now compare the sequence of original dates with the sequence of converted dates - for (int i = 0; i < dates.size(); i++) { - ChronoLocalDateTime a = dates.get(i); - for (int j = 0; j < otherDates.size(); j++) { - ChronoLocalDateTime b = otherDates.get(j); - int cmp = ChronoLocalDateTime.DATE_TIME_COMPARATOR.compare(a, b); - if (i < j) { - assertTrue(cmp < 0, a + " compare " + b); - assertEquals(a.isBefore(b), true, a + " isBefore " + b); - assertEquals(a.isAfter(b), false, a + " isAfter " + b); - assertEquals(a.isEqual(b), false, a + " isEqual " + b); - } else if (i > j) { - assertTrue(cmp > 0, a + " compare " + b); - assertEquals(a.isBefore(b), false, a + " isBefore " + b); - assertEquals(a.isAfter(b), true, a + " isAfter " + b); - assertEquals(a.isEqual(b), false, a + " isEqual " + b); - } else { - assertTrue(cmp == 0, a + " compare " + b); - assertEquals(a.isBefore(b), false, a + " isBefore " + b); - assertEquals(a.isAfter(b), false, a + " isAfter " + b); - assertEquals(a.isEqual(b), true, a + " isEqual " + b); - } - } - } - } - } - - //----------------------------------------------------------------------- - // Test Serialization of ISO via chrono API - //----------------------------------------------------------------------- - @Test( groups={"tck"}, dataProvider="calendars") - public void test_ChronoLocalDateTimeSerialization(Chronology chrono) throws Exception { - LocalDateTime ref = LocalDate.of(2000, 1, 5).atTime(12, 1, 2, 3); - ChronoLocalDateTime orginal = chrono.date(ref).atTime(ref.toLocalTime()); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(orginal); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - ChronoLocalDateTime ser = (ChronoLocalDateTime) in.readObject(); - assertEquals(ser, orginal, "deserialized date is wrong"); - } - - - /** - * FixedAdjusted returns a fixed Temporal in all adjustments. - * Construct an adjuster with the Temporal that should be returned from adjust. - */ - static class FixedAdjuster implements TemporalAdjuster, TemporalAmount { - private Temporal datetime; - - FixedAdjuster(Temporal datetime) { - this.datetime = datetime; - } - - @Override - public Temporal adjustInto(Temporal ignore) { - return datetime; - } - - @Override - public Temporal addTo(Temporal ignore) { - return datetime; - } - - @Override - public Temporal subtractFrom(Temporal ignore) { - return datetime; - } - - @Override - public long get(TemporalUnit unit) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public List getUnits() { - throw new UnsupportedOperationException("Not supported yet."); - } - - } - - /** - * FixedTemporalUnit returns a fixed Temporal in all adjustments. - * Construct an FixedTemporalUnit with the Temporal that should be returned from doAdd. - */ - static class FixedTemporalUnit implements TemporalUnit { - private Temporal temporal; - - FixedTemporalUnit(Temporal temporal) { - this.temporal = temporal; - } - - @Override - public String getName() { - return "FixedTemporalUnit"; - } - - @Override - public Duration getDuration() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isDurationEstimated() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isSupportedBy(Temporal temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @SuppressWarnings("unchecked") - @Override - public R addTo(R temporal, long amount) { - return (R) this.temporal; - } - - @Override - public long between(Temporal temporal1, Temporal temporal2) { - throw new UnsupportedOperationException("Not supported yet."); - } - } - - /** - * FixedTemporalField returns a fixed Temporal in all adjustments. - * Construct an FixedTemporalField with the Temporal that should be returned from doSet. - */ - static class FixedTemporalField implements TemporalField { - private Temporal temporal; - FixedTemporalField(Temporal temporal) { - this.temporal = temporal; - } - - @Override - public String getName() { - return "FixedTemporalField"; - } - - @Override - public TemporalUnit getBaseUnit() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public TemporalUnit getRangeUnit() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public ValueRange range() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isSupportedBy(TemporalAccessor temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public ValueRange rangeRefinedBy(TemporalAccessor temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public long getFrom(TemporalAccessor temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @SuppressWarnings("unchecked") - @Override - public R adjustInto(R temporal, long newValue) { - return (R) this.temporal; - } - } -} diff --git a/jdk/test/java/time/tck/java/time/chrono/TestMinguoChronology.java b/jdk/test/java/time/tck/java/time/chrono/TestMinguoChronology.java deleted file mode 100644 index 5ea1979bcdf..00000000000 --- a/jdk/test/java/time/tck/java/time/chrono/TestMinguoChronology.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of JSR-310 nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package tck.java.time.chrono; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; -import static org.testng.Assert.assertTrue; - -import java.time.DateTimeException; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.LocalTime; -import java.time.Month; -import java.time.ZoneOffset; -import java.time.chrono.MinguoChronology; -import java.time.chrono.MinguoDate; -import java.time.temporal.Adjusters; -import java.time.temporal.ChronoUnit; -import java.time.chrono.ChronoZonedDateTime; -import java.time.chrono.Chronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.ChronoLocalDateTime; -import java.time.chrono.IsoChronology; -import java.time.chrono.Era; -import java.time.Year; - -import org.testng.Assert; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -/** - * Test. - */ -@Test -public class TestMinguoChronology { - - private static final int YDIFF = 1911; - //----------------------------------------------------------------------- - // Chronology.ofName("Minguo") Lookup by name - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_chrono_byName() { - Chronology c = MinguoChronology.INSTANCE; - Chronology test = Chronology.of("Minguo"); - Assert.assertNotNull(test, "The Minguo calendar could not be found byName"); - Assert.assertEquals(test.getId(), "Minguo", "ID mismatch"); - Assert.assertEquals(test.getCalendarType(), "roc", "Type mismatch"); - Assert.assertEquals(test, c); - } - - //----------------------------------------------------------------------- - // creation, toLocalDate() - //----------------------------------------------------------------------- - @DataProvider(name="samples") - Object[][] data_samples() { - return new Object[][] { - {MinguoChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1 + YDIFF, 1, 1)}, - {MinguoChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1 + YDIFF, 1, 2)}, - {MinguoChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1 + YDIFF, 1, 3)}, - - {MinguoChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2 + YDIFF, 1, 1)}, - {MinguoChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3 + YDIFF, 1, 1)}, - {MinguoChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3 + YDIFF, 12, 6)}, - {MinguoChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4 + YDIFF, 1, 1)}, - {MinguoChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4 + YDIFF, 7, 3)}, - {MinguoChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4 + YDIFF, 7, 4)}, - {MinguoChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5 + YDIFF, 1, 1)}, - {MinguoChronology.INSTANCE.date(100, 3, 3), LocalDate.of(100 + YDIFF, 3, 3)}, - {MinguoChronology.INSTANCE.date(101, 10, 28), LocalDate.of(101 + YDIFF, 10, 28)}, - {MinguoChronology.INSTANCE.date(101, 10, 29), LocalDate.of(101 + YDIFF, 10, 29)}, - - {MinguoChronology.INSTANCE.dateYearDay(1916 - YDIFF, 60), LocalDate.of(1916, 2, 29)}, - {MinguoChronology.INSTANCE.dateYearDay(1908 - YDIFF, 60), LocalDate.of(1908, 2, 29)}, - {MinguoChronology.INSTANCE.dateYearDay(2000 - YDIFF, 60), LocalDate.of(2000, 2, 29)}, - {MinguoChronology.INSTANCE.dateYearDay(2400 - YDIFF, 60), LocalDate.of(2400, 2, 29)}, - }; - } - - @Test(dataProvider="samples", groups={"tck"}) - public void test_toLocalDate(MinguoDate minguo, LocalDate iso) { - assertEquals(LocalDate.from(minguo), iso); - } - - @Test(dataProvider="samples", groups={"tck"}) - public void test_fromCalendrical(MinguoDate minguo, LocalDate iso) { - assertEquals(MinguoChronology.INSTANCE.date(iso), minguo); - } - - @SuppressWarnings("unused") - @Test(dataProvider="samples", groups={"implementation"}) - public void test_MinguoDate(MinguoDate minguoDate, LocalDate iso) { - MinguoDate hd = minguoDate; - ChronoLocalDateTime hdt = hd.atTime(LocalTime.NOON); - ZoneOffset zo = ZoneOffset.ofHours(1); - ChronoZonedDateTime hzdt = hdt.atZone(zo); - hdt = hdt.plus(1, ChronoUnit.YEARS); - hdt = hdt.plus(1, ChronoUnit.MONTHS); - hdt = hdt.plus(1, ChronoUnit.DAYS); - hdt = hdt.plus(1, ChronoUnit.HOURS); - hdt = hdt.plus(1, ChronoUnit.MINUTES); - hdt = hdt.plus(1, ChronoUnit.SECONDS); - hdt = hdt.plus(1, ChronoUnit.NANOS); - ChronoLocalDateTime a2 = hzdt.toLocalDateTime(); - MinguoDate a3 = a2.toLocalDate(); - MinguoDate a5 = hzdt.toLocalDate(); - //System.out.printf(" d: %s, dt: %s; odt: %s; zodt: %s; a4: %s%n", date, hdt, hodt, hzdt, a5); - } - - @Test() - public void test_MinguoChrono() { - MinguoDate h1 = (MinguoDate)MinguoChronology.ERA_ROC.date(1, 2, 3); - MinguoDate h2 = h1; - ChronoLocalDateTime h3 = h2.atTime(LocalTime.NOON); - @SuppressWarnings("unused") - ChronoZonedDateTime h4 = h3.atZone(ZoneOffset.UTC); - } - - @DataProvider(name="badDates") - Object[][] data_badDates() { - return new Object[][] { - {1912, 0, 0}, - - {1912, -1, 1}, - {1912, 0, 1}, - {1912, 14, 1}, - {1912, 15, 1}, - - {1912, 1, -1}, - {1912, 1, 0}, - {1912, 1, 32}, - {1912, 2, 29}, - {1912, 2, 30}, - - {1912, 12, -1}, - {1912, 12, 0}, - {1912, 12, 32}, - - {1907 - YDIFF, 2, 29}, - {100 - YDIFF, 2, 29}, - {2100 - YDIFF, 2, 29}, - {2101 - YDIFF, 2, 29}, - }; - } - - @Test(dataProvider="badDates", groups={"tck"}, expectedExceptions=DateTimeException.class) - public void test_badDates(int year, int month, int dom) { - MinguoChronology.INSTANCE.date(year, month, dom); - } - - //----------------------------------------------------------------------- - // prolepticYear() and is LeapYear() - //----------------------------------------------------------------------- - @DataProvider(name="prolepticYear") - Object[][] data_prolepticYear() { - return new Object[][] { - {1, MinguoChronology.ERA_ROC, 1912 - YDIFF, 1912 - YDIFF, true}, - {1, MinguoChronology.ERA_ROC, 1916 - YDIFF, 1916 - YDIFF, true}, - {1, MinguoChronology.ERA_ROC, 1914 - YDIFF, 1914 - YDIFF, false}, - {1, MinguoChronology.ERA_ROC, 2000 - YDIFF, 2000 - YDIFF, true}, - {1, MinguoChronology.ERA_ROC, 2100 - YDIFF, 2100 - YDIFF, false}, - {1, MinguoChronology.ERA_ROC, 0, 0, false}, - {1, MinguoChronology.ERA_ROC, 1908 - YDIFF, 1908 - YDIFF, true}, - {1, MinguoChronology.ERA_ROC, 1900 - YDIFF, 1900 - YDIFF, false}, - {1, MinguoChronology.ERA_ROC, 1600 - YDIFF, 1600 - YDIFF, true}, - - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1911, 1912 - YDIFF, true}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1915, 1916 - YDIFF, true}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1913, 1914 - YDIFF, false}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1999, 2000 - YDIFF, true}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 2099, 2100 - YDIFF, false}, - {0, MinguoChronology.ERA_BEFORE_ROC, 1, 0, false}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1907, 1908 - YDIFF, true}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1899, 1900 - YDIFF, false}, - {0, MinguoChronology.ERA_BEFORE_ROC, YDIFF - 1599, 1600 - YDIFF, true}, - - }; - } - - @Test(dataProvider="prolepticYear", groups={"tck"}) - public void test_prolepticYear(int eraValue, Era era, int yearOfEra, int expectedProlepticYear, boolean isLeapYear) { - Era eraObj = MinguoChronology.INSTANCE.eraOf(eraValue) ; - assertTrue(MinguoChronology.INSTANCE.eras().contains(eraObj)); - assertEquals(eraObj, era); - assertEquals(MinguoChronology.INSTANCE.prolepticYear(era, yearOfEra), expectedProlepticYear); - assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), isLeapYear) ; - assertEquals(MinguoChronology.INSTANCE.isLeapYear(expectedProlepticYear), Year.of(expectedProlepticYear + YDIFF).isLeap()) ; - } - - //----------------------------------------------------------------------- - // with(DateTimeAdjuster) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_adjust1() { - MinguoDate base = MinguoChronology.INSTANCE.date(2012, 10, 29); - MinguoDate test = base.with(Adjusters.lastDayOfMonth()); - assertEquals(test, MinguoChronology.INSTANCE.date(2012, 10, 31)); - } - - @Test(groups={"tck"}) - public void test_adjust2() { - MinguoDate base = MinguoChronology.INSTANCE.date(1728, 12, 2); - MinguoDate test = base.with(Adjusters.lastDayOfMonth()); - assertEquals(test, MinguoChronology.INSTANCE.date(1728, 12, 31)); - } - - //----------------------------------------------------------------------- - // MinguoDate.with(Local*) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_adjust_toLocalDate() { - MinguoDate minguo = MinguoChronology.INSTANCE.date(99, 1, 4); - MinguoDate test = minguo.with(LocalDate.of(2012, 7, 6)); - assertEquals(test, MinguoChronology.INSTANCE.date(101, 7, 6)); - } - - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) - public void test_adjust_toMonth() { - MinguoDate minguo = MinguoChronology.INSTANCE.date(1726, 1, 4); - minguo.with(Month.APRIL); - } - - //----------------------------------------------------------------------- - // LocalDate.with(MinguoDate) - //----------------------------------------------------------------------- - @Test(groups={"tck"}) - public void test_LocalDate_adjustToMinguoDate() { - MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29); - LocalDate test = LocalDate.MIN.with(minguo); - assertEquals(test, LocalDate.of(2012, 10, 29)); - } - - @Test(groups={"tck"}) - public void test_LocalDateTime_adjustToMinguoDate() { - MinguoDate minguo = MinguoChronology.INSTANCE.date(101, 10, 29); - LocalDateTime test = LocalDateTime.MIN.with(minguo); - assertEquals(test, LocalDateTime.of(2012, 10, 29, 0, 0)); - } - - //----------------------------------------------------------------------- - // toString() - //----------------------------------------------------------------------- - @DataProvider(name="toString") - Object[][] data_toString() { - return new Object[][] { - {MinguoChronology.INSTANCE.date(1, 1, 1), "Minguo ROC 1-01-01"}, - {MinguoChronology.INSTANCE.date(1728, 10, 28), "Minguo ROC 1728-10-28"}, - {MinguoChronology.INSTANCE.date(1728, 10, 29), "Minguo ROC 1728-10-29"}, - {MinguoChronology.INSTANCE.date(1727, 12, 5), "Minguo ROC 1727-12-05"}, - {MinguoChronology.INSTANCE.date(1727, 12, 6), "Minguo ROC 1727-12-06"}, - }; - } - - @Test(dataProvider="toString", groups={"tck"}) - public void test_toString(MinguoDate minguo, String expected) { - assertEquals(minguo.toString(), expected); - } - - //----------------------------------------------------------------------- - // equals() - //----------------------------------------------------------------------- - @Test(groups="tck") - public void test_equals_true() { - assertTrue(MinguoChronology.INSTANCE.equals(MinguoChronology.INSTANCE)); - } - - @Test(groups="tck") - public void test_equals_false() { - assertFalse(MinguoChronology.INSTANCE.equals(IsoChronology.INSTANCE)); - } - -} diff --git a/jdk/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java b/jdk/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java index e4e74f6f351..de3b91c7f75 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java +++ b/jdk/test/java/time/tck/java/time/format/TCKChronoPrinterParser.java @@ -67,8 +67,8 @@ import java.time.chrono.IsoChronology; import java.time.chrono.JapaneseChronology; import java.time.chrono.ThaiBuddhistChronology; import java.time.format.DateTimeFormatterBuilder; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQuery; import java.util.Locale; import org.testng.annotations.BeforeMethod; @@ -122,7 +122,7 @@ public class TCKChronoPrinterParser { TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); assertEquals(pos.getIndex(), expected.getId().length()); assertEquals(pos.getErrorIndex(), -1); - assertEquals(parsed.query(Queries.chronology()), expected); + assertEquals(parsed.query(TemporalQuery.chronology()), expected); } @Test(dataProvider="parseValid") @@ -140,7 +140,7 @@ public class TCKChronoPrinterParser { TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text.toLowerCase(Locale.ENGLISH), pos); assertEquals(pos.getIndex(), expected.getId().length()); assertEquals(pos.getErrorIndex(), -1); - assertEquals(parsed.query(Queries.chronology()), expected); + assertEquals(parsed.query(TemporalQuery.chronology()), expected); } //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatSymbols.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatSymbols.java index f2be900c908..9deec99814e 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatSymbols.java +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatSymbols.java @@ -59,11 +59,9 @@ */ package tck.java.time.format; -import java.time.format.*; -import test.java.time.format.*; - import static org.testng.Assert.assertEquals; +import java.time.format.DateTimeFormatSymbols; import java.util.Arrays; import java.util.Locale; @@ -75,7 +73,7 @@ import org.testng.annotations.Test; @Test public class TCKDateTimeFormatSymbols { - @Test(groups={"tck"}) + @Test public void test_getAvailableLocales() { Locale[] locales = DateTimeFormatSymbols.getAvailableLocales(); assertEquals(locales.length > 0, true); @@ -83,7 +81,7 @@ public class TCKDateTimeFormatSymbols { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_of_Locale() { DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.of(Locale.CANADA); assertEquals(loc1.getZeroDigit(), '0'); @@ -93,7 +91,7 @@ public class TCKDateTimeFormatSymbols { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_STANDARD() { DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.STANDARD; assertEquals(loc1.getZeroDigit(), '0'); @@ -103,25 +101,25 @@ public class TCKDateTimeFormatSymbols { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_zeroDigit() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.withZeroDigit('A').getZeroDigit(), 'A'); } - @Test(groups={"tck"}) + @Test public void test_positiveSign() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.withPositiveSign('A').getPositiveSign(), 'A'); } - @Test(groups={"tck"}) + @Test public void test_negativeSign() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.withNegativeSign('A').getNegativeSign(), 'A'); } - @Test(groups={"tck"}) + @Test public void test_decimalSeparator() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.withDecimalSeparator('A').getDecimalSeparator(), 'A'); @@ -129,7 +127,7 @@ public class TCKDateTimeFormatSymbols { //----------------------------------------------------------------------- /* TBD: convertToDigit and convertNumberToI18N are package-private methods - @Test(groups={"tck"}) + @Test public void test_convertToDigit_base() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.convertToDigit('0'), 0); @@ -139,7 +137,7 @@ public class TCKDateTimeFormatSymbols { assertEquals(base.convertToDigit('A'), -1); } - @Test(groups={"tck"}) + @Test public void test_convertToDigit_altered() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD.withZeroDigit('A'); assertEquals(base.convertToDigit('A'), 0); @@ -150,20 +148,20 @@ public class TCKDateTimeFormatSymbols { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_convertNumberToI18N_base() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.convertNumberToI18N("134"), "134"); } - @Test(groups={"tck"}) + @Test public void test_convertNumberToI18N_altered() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD.withZeroDigit('A'); assertEquals(base.convertNumberToI18N("134"), "BDE"); } */ //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equalsHashCode1() { DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD; DateTimeFormatSymbols b = DateTimeFormatSymbols.STANDARD; @@ -172,7 +170,7 @@ public class TCKDateTimeFormatSymbols { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_equalsHashCode2() { DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD.withZeroDigit('A'); DateTimeFormatSymbols b = DateTimeFormatSymbols.STANDARD.withZeroDigit('A'); @@ -181,7 +179,7 @@ public class TCKDateTimeFormatSymbols { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_equalsHashCode3() { DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD.withZeroDigit('A'); DateTimeFormatSymbols b = DateTimeFormatSymbols.STANDARD.withDecimalSeparator('A'); @@ -189,7 +187,7 @@ public class TCKDateTimeFormatSymbols { assertEquals(b.equals(a), false); } - @Test(groups={"tck"}) + @Test public void test_equalsHashCode_bad() { DateTimeFormatSymbols a = DateTimeFormatSymbols.STANDARD; assertEquals(a.equals(""), false); @@ -197,13 +195,13 @@ public class TCKDateTimeFormatSymbols { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString_base() { DateTimeFormatSymbols base = DateTimeFormatSymbols.STANDARD; assertEquals(base.toString(), "Symbols[0+-.]"); } - @Test(groups={"tck"}) + @Test public void test_toString_altered() { DateTimeFormatSymbols base = DateTimeFormatSymbols.of(Locale.US).withZeroDigit('A').withDecimalSeparator('@'); assertEquals(base.toString(), "Symbols[A+-@]"); diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatter.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatter.java index f124d7ef215..e8f137f963d 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatter.java +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatter.java @@ -60,6 +60,8 @@ package tck.java.time.format; import static java.time.temporal.ChronoField.DAY_OF_MONTH; +import static java.time.temporal.ChronoField.DAY_OF_WEEK; +import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.HOUR_OF_DAY; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.YEAR; @@ -71,29 +73,37 @@ import static org.testng.Assert.fail; import java.text.Format; import java.text.ParseException; import java.text.ParsePosition; -import java.util.Locale; - import java.time.DateTimeException; +import java.time.DayOfWeek; import java.time.Instant; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; +import java.time.OffsetDateTime; +import java.time.OffsetTime; +import java.time.YearMonth; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; +import java.time.chrono.ChronoZonedDateTime; +import java.time.chrono.Chronology; +import java.time.chrono.IsoChronology; import java.time.chrono.ThaiBuddhistChronology; +import java.time.chrono.ThaiBuddhistDate; import java.time.format.DateTimeFormatSymbols; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.format.DateTimeParseException; import java.time.format.SignStyle; -import java.time.chrono.Chronology; -import java.time.chrono.IsoChronology; -import java.time.OffsetDateTime; -import java.time.OffsetTime; -import java.time.temporal.Temporal; +import java.time.temporal.IsoFields; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; +import java.time.temporal.UnsupportedTemporalTypeException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Locale; +import java.util.Set; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -102,7 +112,7 @@ import org.testng.annotations.Test; /** * Test DateTimeFormatter. */ -@Test(groups={"tck"}) +@Test public class TCKDateTimeFormatter { private static final ZoneOffset OFFSET_PONE = ZoneOffset.ofHours(1); @@ -160,87 +170,241 @@ public class TCKDateTimeFormatter { } //----------------------------------------------------------------------- - // print + @Test + public void test_resolverFields_selectOneDateResolveYMD() throws Exception { + DateTimeFormatter base = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral('-').appendValue(MONTH_OF_YEAR).appendLiteral('-') + .appendValue(DAY_OF_MONTH).appendLiteral('-').appendValue(DAY_OF_YEAR).toFormatter(); + DateTimeFormatter f = base.withResolverFields(YEAR, MONTH_OF_YEAR, DAY_OF_MONTH); + try { + base.parse("2012-6-30-321", LocalDate::from); // wrong day-of-year + fail(); + } catch (DateTimeException ex) { + // expected, fails as it produces two different dates + } + LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored day-of-year + assertEquals(parsed, LocalDate.of(2012, 6, 30)); + } + + @Test + public void test_resolverFields_selectOneDateResolveYD() throws Exception { + DateTimeFormatter base = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral('-').appendValue(MONTH_OF_YEAR).appendLiteral('-') + .appendValue(DAY_OF_MONTH).appendLiteral('-').appendValue(DAY_OF_YEAR).toFormatter(); + DateTimeFormatter f = base.withResolverFields(YEAR, DAY_OF_YEAR); + assertEquals(f.getResolverFields(), new HashSet<>(Arrays.asList(YEAR, DAY_OF_YEAR))); + try { + base.parse("2012-6-30-321", LocalDate::from); // wrong month/day-of-month + fail(); + } catch (DateTimeException ex) { + // expected, fails as it produces two different dates + } + LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored month/day-of-month + assertEquals(parsed, LocalDate.of(2012, 11, 16)); + } + + @Test + public void test_resolverFields_ignoreCrossCheck() throws Exception { + DateTimeFormatter base = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral('-').appendValue(DAY_OF_YEAR).appendLiteral('-') + .appendValue(DAY_OF_WEEK).toFormatter(); + DateTimeFormatter f = base.withResolverFields(YEAR, DAY_OF_YEAR); + try { + base.parse("2012-321-1", LocalDate::from); // wrong day-of-week + fail(); + } catch (DateTimeException ex) { + // expected, should fail in cross-check of day-of-week + } + LocalDate parsed = f.parse("2012-321-1", LocalDate::from); // ignored wrong day-of-week + assertEquals(parsed, LocalDate.of(2012, 11, 16)); + } + + @Test + public void test_resolverFields_emptyList() throws Exception { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).toFormatter().withResolverFields(); + TemporalAccessor parsed = f.parse("2012"); + assertEquals(parsed.isSupported(YEAR), false); // not in the list of resolverFields + } + + @Test + public void test_resolverFields_listOfOneMatching() throws Exception { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).toFormatter().withResolverFields(YEAR); + TemporalAccessor parsed = f.parse("2012"); + assertEquals(parsed.isSupported(YEAR), true); + } + + @Test + public void test_resolverFields_listOfOneNotMatching() throws Exception { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).toFormatter().withResolverFields(MONTH_OF_YEAR); + TemporalAccessor parsed = f.parse("2012"); + assertEquals(parsed.isSupported(YEAR), false); // not in the list of resolverFields + assertEquals(parsed.isSupported(MONTH_OF_YEAR), false); + } + + @Test + public void test_resolverFields_listOfOneNull() throws Exception { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).toFormatter().withResolverFields((TemporalField) null); + TemporalAccessor parsed = f.parse("2012"); + assertEquals(parsed.isSupported(YEAR), false); // not in the list of resolverFields + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_resolverFields_Array_null() throws Exception { + DateTimeFormatter.ISO_DATE.withResolverFields((TemporalField[]) null); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_resolverFields_Set_null() throws Exception { + DateTimeFormatter.ISO_DATE.withResolverFields((Set) null); + } + //----------------------------------------------------------------------- - @DataProvider(name="print") - Object[][] data_format() { + // format + //----------------------------------------------------------------------- + @DataProvider(name="formatWithZoneWithChronology") + Object[][] data_format_withZone_withChronology() { + YearMonth ym = YearMonth.of(2008, 6); LocalDate ld = LocalDate.of(2008, 6, 30); LocalTime lt = LocalTime.of(11, 30); LocalDateTime ldt = LocalDateTime.of(2008, 6, 30, 11, 30); OffsetTime ot = OffsetTime.of(LocalTime.of(11, 30), OFFSET_PONE); OffsetDateTime odt = OffsetDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), OFFSET_PONE); ZonedDateTime zdt = ZonedDateTime.of(LocalDateTime.of(2008, 6, 30, 11, 30), ZONE_PARIS); + ChronoZonedDateTime thaiZdt = ThaiBuddhistChronology.INSTANCE.zonedDateTime(zdt); Instant instant = Instant.ofEpochSecond(3600); return new Object[][] { - {null, null, ld, "2008::"}, - {null, null, lt, ":11:"}, - {null, null, ldt, "2008:11:"}, - {null, null, ot, ":11:+01:00"}, - {null, null, odt, "2008:11:+01:00"}, - {null, null, zdt, "2008:11:+02:00Europe/Paris"}, - {null, null, instant, "::"}, + {null, null, DayOfWeek.MONDAY, "::::"}, + {null, null, ym, "2008::::ISO"}, + {null, null, ld, "2008::::ISO"}, + {null, null, lt, ":11:::"}, + {null, null, ldt, "2008:11:::ISO"}, + {null, null, ot, ":11:+01:00::"}, + {null, null, odt, "2008:11:+01:00::ISO"}, + {null, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, + {null, null, instant, "::::"}, - {null, ZONE_PARIS, ld, "2008::"}, - {null, ZONE_PARIS, lt, ":11:"}, - {null, ZONE_PARIS, ldt, "2008:11:"}, - {null, ZONE_PARIS, ot, ":11:+01:00"}, - {null, ZONE_PARIS, odt, "2008:12:+02:00Europe/Paris"}, - {null, ZONE_PARIS, zdt, "2008:11:+02:00Europe/Paris"}, - {null, ZONE_PARIS, instant, "1970:02:+01:00Europe/Paris"}, + {IsoChronology.INSTANCE, null, DayOfWeek.MONDAY, "::::ISO"}, + {IsoChronology.INSTANCE, null, ym, "2008::::ISO"}, + {IsoChronology.INSTANCE, null, ld, "2008::::ISO"}, + {IsoChronology.INSTANCE, null, lt, ":11:::ISO"}, + {IsoChronology.INSTANCE, null, ldt, "2008:11:::ISO"}, + {IsoChronology.INSTANCE, null, ot, ":11:+01:00::ISO"}, + {IsoChronology.INSTANCE, null, odt, "2008:11:+01:00::ISO"}, + {IsoChronology.INSTANCE, null, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, + {IsoChronology.INSTANCE, null, instant, "::::ISO"}, - {null, OFFSET_PTHREE, ld, "2008::"}, - {null, OFFSET_PTHREE, lt, ":11:"}, - {null, OFFSET_PTHREE, ldt, "2008:11:"}, - {null, OFFSET_PTHREE, ot, ":11:+01:00"}, - {null, OFFSET_PTHREE, odt, "2008:13:+03:00"}, - {null, OFFSET_PTHREE, zdt, "2008:12:+03:00"}, - {null, OFFSET_PTHREE, instant, "1970:04:+03:00"}, + {null, ZONE_PARIS, DayOfWeek.MONDAY, ":::Europe/Paris:"}, + {null, ZONE_PARIS, ym, "2008:::Europe/Paris:ISO"}, + {null, ZONE_PARIS, ld, "2008:::Europe/Paris:ISO"}, + {null, ZONE_PARIS, lt, ":11::Europe/Paris:"}, + {null, ZONE_PARIS, ldt, "2008:11::Europe/Paris:ISO"}, + {null, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:"}, + {null, ZONE_PARIS, odt, "2008:12:+02:00:Europe/Paris:ISO"}, + {null, ZONE_PARIS, zdt, "2008:11:+02:00:Europe/Paris:ISO"}, + {null, ZONE_PARIS, instant, "1970:02:+01:00:Europe/Paris:ISO"}, - {ThaiBuddhistChronology.INSTANCE, null, ld, "2551::"}, - {ThaiBuddhistChronology.INSTANCE, null, lt, ":11:"}, - {ThaiBuddhistChronology.INSTANCE, null, ldt, "2551:11:"}, - {ThaiBuddhistChronology.INSTANCE, null, ot, ":11:+01:00"}, - {ThaiBuddhistChronology.INSTANCE, null, odt, "2551:11:+01:00"}, - {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00Europe/Paris"}, - {ThaiBuddhistChronology.INSTANCE, null, instant, "::"}, + {null, OFFSET_PTHREE, DayOfWeek.MONDAY, ":::+03:00:"}, + {null, OFFSET_PTHREE, ym, "2008:::+03:00:ISO"}, + {null, OFFSET_PTHREE, ld, "2008:::+03:00:ISO"}, + {null, OFFSET_PTHREE, lt, ":11::+03:00:"}, + {null, OFFSET_PTHREE, ldt, "2008:11::+03:00:ISO"}, + {null, OFFSET_PTHREE, ot, null}, // offset and zone clash + {null, OFFSET_PTHREE, odt, "2008:13:+03:00:+03:00:ISO"}, + {null, OFFSET_PTHREE, zdt, "2008:12:+03:00:+03:00:ISO"}, + {null, OFFSET_PTHREE, instant, "1970:04:+03:00:+03:00:ISO"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ld, "2551::"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, lt, ":11:"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ldt, "2551:11:"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ot, ":11:+01:00"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, odt, "2551:12:+02:00Europe/Paris"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00Europe/Paris"}, - {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, instant, "1970:02:+01:00Europe/Paris"}, + {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null}, // not a complete date + {ThaiBuddhistChronology.INSTANCE, null, ym, null}, // not a complete date + {ThaiBuddhistChronology.INSTANCE, null, ld, "2551::::ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, null, lt, ":11:::ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, null, ldt, "2551:11:::ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, null, ot, ":11:+01:00::ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, null, odt, "2551:11:+01:00::ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, null, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, null, instant, "::::ThaiBuddhist"}, + + {ThaiBuddhistChronology.INSTANCE, null, DayOfWeek.MONDAY, null}, // not a complete date + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ym, null}, // not a complete date + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ld, "2551:::Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, lt, ":11::Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ldt, "2551:11::Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, ot, ":11:+01:00:Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, odt, "2551:12:+02:00:Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, zdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, instant, "2513:02:+01:00:Europe/Paris:ThaiBuddhist"}, + + {null, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, + {ThaiBuddhistChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2551:11:+02:00:Europe/Paris:ThaiBuddhist"}, + {IsoChronology.INSTANCE, ZONE_PARIS, thaiZdt, "2008:11:+02:00:Europe/Paris:ISO"}, }; } - @Test(dataProvider="print") - public void test_print_Temporal(Chronology overrideChrono, ZoneId overrideZone, Temporal temporal, String expected) { + @Test(dataProvider="formatWithZoneWithChronology") + public void test_format_withZone_withChronology(Chronology overrideChrono, ZoneId overrideZone, TemporalAccessor temporal, String expected) { DateTimeFormatter test = new DateTimeFormatterBuilder() .optionalStart().appendValue(YEAR, 4).optionalEnd() .appendLiteral(':').optionalStart().appendValue(HOUR_OF_DAY, 2).optionalEnd() - .appendLiteral(':').optionalStart().appendOffsetId().optionalStart().appendZoneRegionId().optionalEnd().optionalEnd() + .appendLiteral(':').optionalStart().appendOffsetId().optionalEnd() + .appendLiteral(':').optionalStart().appendZoneId().optionalEnd() + .appendLiteral(':').optionalStart().appendChronologyId().optionalEnd() .toFormatter(Locale.ENGLISH) .withChronology(overrideChrono).withZone(overrideZone); - String result = test.format(temporal); - assertEquals(result, expected); + if (expected != null) { + String result = test.format(temporal); + assertEquals(result, expected); + } else { + try { + test.format(temporal); + fail("Formatting should have failed"); + } catch (DateTimeException ex) { + // expected + } + } } @Test - public void test_print_Temporal_simple() throws Exception { + public void test_format_withChronology_nonChronoFieldMapLink() { + TemporalAccessor temporal = new TemporalAccessor() { + @Override + public boolean isSupported(TemporalField field) { + return field == IsoFields.WEEK_BASED_YEAR; + } + @Override + public long getLong(TemporalField field) { + if (field == IsoFields.WEEK_BASED_YEAR) { + return 2345; + } + throw new UnsupportedTemporalTypeException("Unsupported field: " + field); + } + }; + DateTimeFormatter test = new DateTimeFormatterBuilder() + .appendValue(IsoFields.WEEK_BASED_YEAR, 4) + .toFormatter(Locale.ENGLISH) + .withChronology(IsoChronology.INSTANCE); + String result = test.format(temporal); + assertEquals(result, "2345"); + } + + //----------------------------------------------------------------------- + @Test + public void test_format_TemporalAccessor_simple() { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withSymbols(DateTimeFormatSymbols.STANDARD); String result = test.format(LocalDate.of(2008, 6, 30)); assertEquals(result, "ONE30"); } - @Test(expectedExceptions=DateTimeException.class) - public void test_print_Temporal_noSuchField() throws Exception { + @Test(expectedExceptions = DateTimeException.class) + public void test_format_TemporalAccessor_noSuchField() { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withSymbols(DateTimeFormatSymbols.STANDARD); test.format(LocalTime.of(11, 30)); } - @Test(expectedExceptions=NullPointerException.class) - public void test_print_Temporal_null() throws Exception { + @Test(expectedExceptions = NullPointerException.class) + public void test_format_TemporalAccessor_null() { DateTimeFormatter test = fmt.withLocale(Locale.ENGLISH).withSymbols(DateTimeFormatSymbols.STANDARD); test.format((TemporalAccessor) null); } diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java index 0cb5cb1c7a3..cf2c3a1dad6 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java @@ -98,7 +98,36 @@ public class TCKDateTimeFormatterBuilder { @Test public void test_toFormatter_empty() throws Exception { DateTimeFormatter f = builder.toFormatter(); - assertEquals(f.toString(), ""); + assertEquals(f.format(LocalDate.of(2012, 6, 30)), ""); + } + + //----------------------------------------------------------------------- + @Test + public void test_parseDefaulting_entireDate() { + DateTimeFormatter f = builder + .parseDefaulting(YEAR, 2012).parseDefaulting(MONTH_OF_YEAR, 6) + .parseDefaulting(DAY_OF_MONTH, 30).toFormatter(); + LocalDate parsed = f.parse("", LocalDate::from); // blank string can be parsed + assertEquals(parsed, LocalDate.of(2012, 6, 30)); + } + + @Test + public void test_parseDefaulting_yearOptionalMonthOptionalDay() { + DateTimeFormatter f = builder + .appendValue(YEAR) + .optionalStart().appendLiteral('-').appendValue(MONTH_OF_YEAR) + .optionalStart().appendLiteral('-').appendValue(DAY_OF_MONTH) + .optionalEnd().optionalEnd() + .parseDefaulting(MONTH_OF_YEAR, 1) + .parseDefaulting(DAY_OF_MONTH, 1).toFormatter(); + assertEquals(f.parse("2012", LocalDate::from), LocalDate.of(2012, 1, 1)); + assertEquals(f.parse("2012-6", LocalDate::from), LocalDate.of(2012, 6, 1)); + assertEquals(f.parse("2012-6-30", LocalDate::from), LocalDate.of(2012, 6, 30)); + } + + @Test(expectedExceptions = NullPointerException.class) + public void test_parseDefaulting_null() { + builder.parseDefaulting(null, 1); } //----------------------------------------------------------------------- @@ -393,6 +422,7 @@ public class TCKDateTimeFormatterBuilder { {"''"}, {"'!'"}, {"!"}, + {"'#'"}, {"'hello_people,][)('"}, {"'hi'"}, @@ -418,17 +448,20 @@ public class TCKDateTimeFormatterBuilder { {"MMMM"}, {"MMMMM"}, + {"L"}, + {"LL"}, + {"LLL"}, + {"LLLL"}, + {"LLLLL"}, + {"D"}, {"DD"}, {"DDD"}, {"d"}, {"dd"}, - {"ddd"}, {"F"}, - {"FF"}, - {"FFF"}, {"Q"}, {"QQ"}, @@ -436,41 +469,48 @@ public class TCKDateTimeFormatterBuilder { {"QQQQ"}, {"QQQQQ"}, + {"q"}, + {"qq"}, + {"qqq"}, + {"qqqq"}, + {"qqqqq"}, + {"E"}, {"EE"}, {"EEE"}, {"EEEE"}, {"EEEEE"}, + {"e"}, + {"ee"}, + {"eee"}, + {"eeee"}, + {"eeeee"}, + + {"c"}, + {"ccc"}, + {"cccc"}, + {"ccccc"}, + {"a"}, - {"aa"}, - {"aaa"}, - {"aaaa"}, - {"aaaaa"}, {"H"}, {"HH"}, - {"HHH"}, {"K"}, {"KK"}, - {"KKK"}, {"k"}, {"kk"}, - {"kkk"}, {"h"}, {"hh"}, - {"hhh"}, {"m"}, {"mm"}, - {"mmm"}, {"s"}, {"ss"}, - {"sss"}, {"S"}, {"SS"}, @@ -523,8 +563,9 @@ public class TCKDateTimeFormatterBuilder { {"e"}, {"w"}, + {"ww"}, + {"W"}, {"W"}, - {"WW"}, }; } @@ -545,18 +586,40 @@ public class TCKDateTimeFormatterBuilder { {"{"}, {"}"}, {"{}"}, + {"#"}, {"]"}, {"yyyy]"}, {"yyyy]MM"}, {"yyyy[MM]]"}, + {"aa"}, + {"aaa"}, + {"aaaa"}, + {"aaaaa"}, + {"aaaaaa"}, {"MMMMMM"}, {"QQQQQQ"}, + {"qqqqqq"}, {"EEEEEE"}, - {"aaaaaa"}, - {"ZZZZ"}, + {"eeeeee"}, + {"cc"}, + {"cccccc"}, + {"ddd"}, + {"DDDD"}, + {"FF"}, + {"FFF"}, + {"hhh"}, + {"HHH"}, + {"kkk"}, + {"KKK"}, + {"mmm"}, + {"sss"}, + {"OO"}, + {"OOO"}, + {"OOOOO"}, {"XXXXXX"}, {"zzzzz"}, + {"ZZZZZZ"}, {"RO"}, @@ -571,9 +634,8 @@ public class TCKDateTimeFormatterBuilder { {"fa"}, {"fM"}, - {"ww"}, - {"ee"}, - {"WWW"}, + {"www"}, + {"WW"}, }; } @@ -588,9 +650,9 @@ public class TCKDateTimeFormatterBuilder { return new Object[][] { {"Q", date(2012, 2, 10), "1"}, {"QQ", date(2012, 2, 10), "01"}, -// {"QQQ", date(2012, 2, 10), "Q1"}, // TODO: data for quarters? -// {"QQQQ", date(2012, 2, 10), "Q1"}, -// {"QQQQQ", date(2012, 2, 10), "Q1"}, + {"QQQ", date(2012, 2, 10), "Q1"}, + {"QQQQ", date(2012, 2, 10), "1st quarter"}, + {"QQQQQ", date(2012, 2, 10), "1"}, }; } diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java index 45548772f50..3ba962ad212 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeFormatters.java @@ -77,16 +77,20 @@ import java.text.ParsePosition; import java.time.DateTimeException; import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.Month; import java.time.Year; import java.time.YearMonth; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.chrono.Chronology; +import java.time.chrono.IsoChronology; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeParseException; +import java.time.format.FormatStyle; +import java.time.format.ResolverStyle; +import java.time.format.TextStyle; import java.time.temporal.IsoFields; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; import java.time.temporal.TemporalQuery; @@ -110,27 +114,28 @@ public class TCKDateTimeFormatters { } //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) - public void test_print_nullCalendrical() { + @Test(expectedExceptions=NullPointerException.class) + public void test_format_nullTemporalAccessor() { DateTimeFormatter.ISO_DATE.format((TemporalAccessor) null); } //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_pattern_String() { DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy"); - assertEquals(test.toString(), "Value(DayOfMonth)' 'Text(MonthOfYear,SHORT)' 'Value(Year,4,19,EXCEEDS_PAD)"); + assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 " + + Month.JUNE.getDisplayName(TextStyle.SHORT, Locale.getDefault()) + " 2012"); assertEquals(test.getLocale(), Locale.getDefault()); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_pattern_String_invalid() { DateTimeFormatter.ofPattern("p"); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_pattern_String_null() { DateTimeFormatter.ofPattern(null); } @@ -138,28 +143,59 @@ public class TCKDateTimeFormatters { //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_pattern_StringLocale() { DateTimeFormatter test = DateTimeFormatter.ofPattern("d MMM yyyy", Locale.UK); - assertEquals(test.toString(), "Value(DayOfMonth)' 'Text(MonthOfYear,SHORT)' 'Value(Year,4,19,EXCEEDS_PAD)"); + assertEquals(test.format(LocalDate.of(2012, 6, 30)), "30 Jun 2012"); assertEquals(test.getLocale(), Locale.UK); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_pattern_StringLocale_invalid() { DateTimeFormatter.ofPattern("p", Locale.UK); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_pattern_StringLocale_nullPattern() { DateTimeFormatter.ofPattern(null, Locale.UK); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_pattern_StringLocale_nullLocale() { DateTimeFormatter.ofPattern("yyyy", null); } + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @Test + public void test_ofLocalizedDate_basics() { + assertEquals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getZone(), null); + assertEquals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART); + } + + @Test + public void test_ofLocalizedTime_basics() { + assertEquals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getZone(), null); + assertEquals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART); + } + + @Test + public void test_ofLocalizedDateTime1_basics() { + assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getZone(), null); + assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART); + } + + @Test + public void test_ofLocalizedDateTime2_basics() { + assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getZone(), null); + assertEquals(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getResolverStyle(), ResolverStyle.SMART); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -183,7 +219,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoLocalDate", groups={"tck"}) + @Test(dataProvider="sample_isoLocalDate") public void test_print_isoLocalDate( Integer year, Integer month, Integer day, String offsetId, String zoneId, String expected, Class expectedEx) { @@ -200,7 +236,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoLocalDate", groups={"tck"}) + @Test(dataProvider="sample_isoLocalDate") public void test_parse_isoLocalDate( Integer year, Integer month, Integer day, String offsetId, String zoneId, String input, Class invalid) { @@ -211,42 +247,49 @@ public class TCKDateTimeFormatters { } } - @Test(groups={"tck"}) + @Test public void test_parse_isoLocalDate_999999999() { Expected expected = createDate(999999999, 8, 6); assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("+999999999-08-06", new ParsePosition(0)), expected); assertEquals(LocalDate.parse("+999999999-08-06"), LocalDate.of(999999999, 8, 6)); } - @Test(groups={"tck"}) + @Test public void test_parse_isoLocalDate_1000000000() { Expected expected = createDate(1000000000, 8, 6); assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("+1000000000-08-06", new ParsePosition(0)), expected); } - @Test(expectedExceptions = DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions = DateTimeException.class) public void test_parse_isoLocalDate_1000000000_failedCreate() { LocalDate.parse("+1000000000-08-06"); } - @Test(groups={"tck"}) + @Test public void test_parse_isoLocalDate_M999999999() { Expected expected = createDate(-999999999, 8, 6); assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("-999999999-08-06", new ParsePosition(0)), expected); assertEquals(LocalDate.parse("-999999999-08-06"), LocalDate.of(-999999999, 8, 6)); } - @Test(groups={"tck"}) + @Test public void test_parse_isoLocalDate_M1000000000() { Expected expected = createDate(-1000000000, 8, 6); assertParseMatch(DateTimeFormatter.ISO_LOCAL_DATE.parseUnresolved("-1000000000-08-06", new ParsePosition(0)), expected); } - @Test(expectedExceptions = DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions = DateTimeException.class) public void test_parse_isoLocalDate_M1000000000_failedCreate() { LocalDate.parse("-1000000000-08-06"); } + @Test + public void test_isoLocalDate_basics() { + assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getZone(), null); + assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -270,7 +313,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoOffsetDate", groups={"tck"}) + @Test(dataProvider="sample_isoOffsetDate") public void test_print_isoOffsetDate( Integer year, Integer month, Integer day, String offsetId, String zoneId, String expected, Class expectedEx) { @@ -287,7 +330,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoOffsetDate", groups={"tck"}) + @Test(dataProvider="sample_isoOffsetDate") public void test_parse_isoOffsetDate( Integer year, Integer month, Integer day, String offsetId, String zoneId, String input, Class invalid) { @@ -298,6 +341,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoOffsetDate_basics() { + assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getZone(), null); + assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -321,7 +371,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoDate", groups={"tck"}) + @Test(dataProvider="sample_isoDate") public void test_print_isoDate( Integer year, Integer month, Integer day, String offsetId, String zoneId, String expected, Class expectedEx) { @@ -338,7 +388,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoDate", groups={"tck"}) + @Test(dataProvider="sample_isoDate") public void test_parse_isoDate( Integer year, Integer month, Integer day, String offsetId, String zoneId, String input, Class invalid) { @@ -351,6 +401,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoDate_basics() { + assertEquals(DateTimeFormatter.ISO_DATE.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_DATE.getZone(), null); + assertEquals(DateTimeFormatter.ISO_DATE.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -386,7 +443,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoLocalTime", groups={"tck"}) + @Test(dataProvider="sample_isoLocalTime") public void test_print_isoLocalTime( Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, String expected, Class expectedEx) { @@ -403,7 +460,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoLocalTime", groups={"tck"}) + @Test(dataProvider="sample_isoLocalTime") public void test_parse_isoLocalTime( Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, String input, Class invalid) { @@ -414,6 +471,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoLocalTime_basics() { + assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getChronology(), null); + assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -449,7 +513,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoOffsetTime", groups={"tck"}) + @Test(dataProvider="sample_isoOffsetTime") public void test_print_isoOffsetTime( Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, String expected, Class expectedEx) { @@ -466,7 +530,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoOffsetTime", groups={"tck"}) + @Test(dataProvider="sample_isoOffsetTime") public void test_parse_isoOffsetTime( Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, String input, Class invalid) { @@ -477,6 +541,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoOffsetTime_basics() { + assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getChronology(), null); + assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -512,7 +583,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoTime", groups={"tck"}) + @Test(dataProvider="sample_isoTime") public void test_print_isoTime( Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, String expected, Class expectedEx) { @@ -529,7 +600,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoTime", groups={"tck"}) + @Test(dataProvider="sample_isoTime") public void test_parse_isoTime( Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, String input, Class invalid) { @@ -542,6 +613,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoTime_basics() { + assertEquals(DateTimeFormatter.ISO_TIME.getChronology(), null); + assertEquals(DateTimeFormatter.ISO_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -585,7 +663,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoLocalDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoLocalDateTime") public void test_print_isoLocalDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -603,7 +681,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoLocalDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoLocalDateTime") public void test_parse_isoLocalDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -614,6 +692,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoLocalDateTime_basics() { + assertEquals(DateTimeFormatter.ISO_LOCAL_DATE_TIME.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_LOCAL_DATE_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_LOCAL_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -657,7 +742,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoOffsetDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoOffsetDateTime") public void test_print_isoOffsetDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -675,7 +760,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoOffsetDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoOffsetDateTime") public void test_parse_isoOffsetDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -687,6 +772,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoOffsetDateTime_basics() { + assertEquals(DateTimeFormatter.ISO_OFFSET_DATE_TIME.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_OFFSET_DATE_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_OFFSET_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -739,7 +831,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoZonedDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoZonedDateTime") public void test_print_isoZonedDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -757,7 +849,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoZonedDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoZonedDateTime") public void test_parse_isoZonedDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -773,6 +865,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoZonedDateTime_basics() { + assertEquals(DateTimeFormatter.ISO_ZONED_DATE_TIME.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_ZONED_DATE_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_ZONED_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -816,7 +915,7 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="sample_isoDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoDateTime") public void test_print_isoDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -834,7 +933,7 @@ public class TCKDateTimeFormatters { } } - @Test(dataProvider="sample_isoDateTime", groups={"tck"}) + @Test(dataProvider="sample_isoDateTime") public void test_parse_isoDateTime( Integer year, Integer month, Integer day, Integer hour, Integer min, Integer sec, Integer nano, String offsetId, String zoneId, @@ -851,28 +950,35 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_isoDateTime_basics() { + assertEquals(DateTimeFormatter.ISO_DATE_TIME.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_DATE_TIME.getZone(), null); + assertEquals(DateTimeFormatter.ISO_DATE_TIME.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_print_isoOrdinalDate() { TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), null, null); assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "2008-155"); } - @Test(groups={"tck"}) + @Test public void test_print_isoOrdinalDate_offset() { TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "Z", null); assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "2008-155Z"); } - @Test(groups={"tck"}) + @Test public void test_print_isoOrdinalDate_zoned() { TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "+02:00", "Europe/Paris"); assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "2008-155+02:00"); } - @Test(groups={"tck"}) + @Test public void test_print_isoOrdinalDate_zoned_largeYear() { TemporalAccessor test = buildAccessor(LocalDateTime.of(123456, 6, 3, 11, 5, 30), "Z", null); assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.format(test), "+123456-155Z"); @@ -907,65 +1013,72 @@ public class TCKDateTimeFormatters { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_parse_isoOrdinalDate() { Expected expected = new Expected(YEAR, 2008, DAY_OF_YEAR, 123); assertParseMatch(DateTimeFormatter.ISO_ORDINAL_DATE.parseUnresolved("2008-123", new ParsePosition(0)), expected); } - @Test(groups={"tck"}) + @Test public void test_parse_isoOrdinalDate_largeYear() { Expected expected = new Expected(YEAR, 123456, DAY_OF_YEAR, 123); assertParseMatch(DateTimeFormatter.ISO_ORDINAL_DATE.parseUnresolved("+123456-123", new ParsePosition(0)), expected); } + @Test + public void test_isoOrdinalDate_basics() { + assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.getZone(), null); + assertEquals(DateTimeFormatter.ISO_ORDINAL_DATE.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_print_basicIsoDate() { TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), null, null); assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603"); } - @Test(groups={"tck"}) + @Test public void test_print_basicIsoDate_offset() { TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "Z", null); assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603Z"); } - @Test(groups={"tck"}) + @Test public void test_print_basicIsoDate_zoned() { TemporalAccessor test = buildAccessor(LocalDateTime.of(2008, 6, 3, 11, 5, 30), "+02:00", "Europe/Paris"); assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603+0200"); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_print_basicIsoDate_largeYear() { TemporalAccessor test = buildAccessor(LocalDateTime.of(123456, 6, 3, 11, 5, 30), "Z", null); DateTimeFormatter.BASIC_ISO_DATE.format(test); } - @Test(groups={"tck"}) + @Test public void test_print_basicIsoDate_fields() { TemporalAccessor test = buildAccessor(LocalDate.of(2008, 6, 3), null, null); assertEquals(DateTimeFormatter.BASIC_ISO_DATE.format(test), "20080603"); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_print_basicIsoDate_missingField() { TemporalAccessor test = YearMonth.of(2008, 6); DateTimeFormatter.BASIC_ISO_DATE.format(test); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_parse_basicIsoDate() { LocalDate expected = LocalDate.of(2008, 6, 3); assertEquals(DateTimeFormatter.BASIC_ISO_DATE.parse("20080603", LocalDate::from), expected); } - @Test(expectedExceptions=DateTimeParseException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeParseException.class) public void test_parse_basicIsoDate_largeYear() { try { LocalDate expected = LocalDate.of(123456, 6, 3); @@ -977,6 +1090,13 @@ public class TCKDateTimeFormatters { } } + @Test + public void test_basicIsoDate_basics() { + assertEquals(DateTimeFormatter.BASIC_ISO_DATE.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.BASIC_ISO_DATE.getZone(), null); + assertEquals(DateTimeFormatter.BASIC_ISO_DATE.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -1012,37 +1132,37 @@ public class TCKDateTimeFormatters { }; } - @Test(dataProvider="weekDate", groups={"tck"}) + @Test(dataProvider="weekDate") public void test_print_isoWeekDate(TemporalAccessor test, String expected) { assertEquals(DateTimeFormatter.ISO_WEEK_DATE.format(test), expected); } - @Test(groups={"tck"}) + @Test public void test_print_isoWeekDate_zoned_largeYear() { TemporalAccessor test = buildAccessor(LocalDateTime.of(123456, 6, 3, 11, 5, 30), "Z", null); assertEquals(DateTimeFormatter.ISO_WEEK_DATE.format(test), "+123456-W23-2Z"); } - @Test(groups={"tck"}) + @Test public void test_print_isoWeekDate_fields() { TemporalAccessor test = buildAccessor(LocalDate.of(2004, 1, 27), null, null); assertEquals(DateTimeFormatter.ISO_WEEK_DATE.format(test), "2004-W05-2"); } - @Test(expectedExceptions=DateTimeException.class, groups={"tck"}) + @Test(expectedExceptions=DateTimeException.class) public void test_print_isoWeekDate_missingField() { TemporalAccessor test = YearMonth.of(2008, 6); DateTimeFormatter.ISO_WEEK_DATE.format(test); } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_parse_weekDate() { LocalDate expected = LocalDate.of(2004, 1, 28); assertEquals(DateTimeFormatter.ISO_WEEK_DATE.parse("2004-W05-3", LocalDate::from), expected); } - @Test(groups={"tck"}) + @Test public void test_parse_weekDate_largeYear() { TemporalAccessor parsed = DateTimeFormatter.ISO_WEEK_DATE.parseUnresolved("+123456-W04-5", new ParsePosition(0)); assertEquals(parsed.getLong(IsoFields.WEEK_BASED_YEAR), 123456L); @@ -1050,6 +1170,23 @@ public class TCKDateTimeFormatters { assertEquals(parsed.getLong(DAY_OF_WEEK), 5L); } + @Test + public void test_isoWeekDate_basics() { + assertEquals(DateTimeFormatter.ISO_WEEK_DATE.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.ISO_WEEK_DATE.getZone(), null); + assertEquals(DateTimeFormatter.ISO_WEEK_DATE.getResolverStyle(), ResolverStyle.STRICT); + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @Test + public void test_isoInstant_basics() { + assertEquals(DateTimeFormatter.ISO_INSTANT.getChronology(), null); + assertEquals(DateTimeFormatter.ISO_INSTANT.getZone(), null); + assertEquals(DateTimeFormatter.ISO_INSTANT.getResolverStyle(), ResolverStyle.STRICT); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -1063,24 +1200,31 @@ public class TCKDateTimeFormatters { }; } - @Test(groups={"tck"}, dataProvider="rfc") + @Test(dataProvider="rfc") public void test_print_rfc1123(LocalDateTime base, String offsetId, String expected) { TemporalAccessor test = buildAccessor(base, offsetId, null); assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.format(test), expected); } - @Test(groups={"tck"}, dataProvider="rfc") + @Test(dataProvider="rfc") public void test_print_rfc1123_french(LocalDateTime base, String offsetId, String expected) { TemporalAccessor test = buildAccessor(base, offsetId, null); assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.withLocale(Locale.FRENCH).format(test), expected); } - @Test(groups={"tck"}, expectedExceptions=DateTimeException.class) + @Test(expectedExceptions=DateTimeException.class) public void test_print_rfc1123_missingField() { TemporalAccessor test = YearMonth.of(2008, 6); DateTimeFormatter.RFC_1123_DATE_TIME.format(test); } + @Test + public void test_rfc1123_basics() { + assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.getChronology(), IsoChronology.INSTANCE); + assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.getZone(), null); + assertEquals(DateTimeFormatter.RFC_1123_DATE_TIME.getResolverStyle(), ResolverStyle.SMART); + } + //----------------------------------------------------------------------- //----------------------------------------------------------------------- //----------------------------------------------------------------------- @@ -1204,13 +1348,11 @@ public class TCKDateTimeFormatters { assertEquals(parsed.isSupported(field), true); parsed.getLong(field); } - assertEquals(parsed.query(Queries.chronology()), expected.chrono); - assertEquals(parsed.query(Queries.zoneId()), expected.zone); + assertEquals(parsed.query(TemporalQuery.chronology()), expected.chrono); + assertEquals(parsed.query(TemporalQuery.zoneId()), expected.zone); } //------------------------------------------------------------------------- - Map fields = new HashMap<>(); - ZoneId zoneId; static class MockAccessor implements TemporalAccessor { Map fields = new HashMap<>(); ZoneId zoneId; @@ -1272,7 +1414,7 @@ public class TCKDateTimeFormatters { @SuppressWarnings("unchecked") @Override public R query(TemporalQuery query) { - if (query == Queries.zoneId()) { + if (query == TemporalQuery.zoneId()) { return (R) zoneId; } return TemporalAccessor.super.query(query); diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java new file mode 100644 index 00000000000..8b6c1340688 --- /dev/null +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeParseResolver.java @@ -0,0 +1,522 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * This file is available under and governed by the GNU General Public + * License version 2 only, as published by the Free Software Foundation. + * However, the following notice accompanied the original version of this + * file: + * + * Copyright (c) 2008-2013, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package tck.java.time.format; + +import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; +import static java.time.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; +import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_MONTH; +import static java.time.temporal.ChronoField.ALIGNED_WEEK_OF_YEAR; +import static java.time.temporal.ChronoField.AMPM_OF_DAY; +import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_AMPM; +import static java.time.temporal.ChronoField.CLOCK_HOUR_OF_DAY; +import static java.time.temporal.ChronoField.DAY_OF_MONTH; +import static java.time.temporal.ChronoField.DAY_OF_WEEK; +import static java.time.temporal.ChronoField.DAY_OF_YEAR; +import static java.time.temporal.ChronoField.EPOCH_DAY; +import static java.time.temporal.ChronoField.ERA; +import static java.time.temporal.ChronoField.HOUR_OF_AMPM; +import static java.time.temporal.ChronoField.HOUR_OF_DAY; +import static java.time.temporal.ChronoField.MICRO_OF_DAY; +import static java.time.temporal.ChronoField.MICRO_OF_SECOND; +import static java.time.temporal.ChronoField.MILLI_OF_DAY; +import static java.time.temporal.ChronoField.MILLI_OF_SECOND; +import static java.time.temporal.ChronoField.MINUTE_OF_DAY; +import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; +import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.NANO_OF_DAY; +import static java.time.temporal.ChronoField.NANO_OF_SECOND; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; +import static java.time.temporal.ChronoField.SECOND_OF_DAY; +import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; +import static java.time.temporal.ChronoField.YEAR; +import static java.time.temporal.ChronoField.YEAR_OF_ERA; +import static org.testng.Assert.assertEquals; + +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.temporal.IsoFields; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQuery; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Test parse resolving. + */ +@Test +public class TCKDateTimeParseResolver { + // TODO: tests with weird TenporalField implementations + // TODO: tests with non-ISO chronologies + + //----------------------------------------------------------------------- + @DataProvider(name="resolveOneNoChange") + Object[][] data_resolveOneNoChange() { + return new Object[][]{ + {YEAR, 2012}, + {MONTH_OF_YEAR, 8}, + {DAY_OF_MONTH, 7}, + {DAY_OF_YEAR, 6}, + {DAY_OF_WEEK, 5}, + }; + } + + @Test(dataProvider="resolveOneNoChange") + public void test_resolveOneNoChange(TemporalField field1, long value1) { + String str = Long.toString(value1); + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + assertEquals(accessor.isSupported(field1), true); + assertEquals(accessor.getLong(field1), value1); + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveTwoNoChange") + Object[][] data_resolveTwoNoChange() { + return new Object[][]{ + {YEAR, 2012, MONTH_OF_YEAR, 5}, + {YEAR, 2012, DAY_OF_MONTH, 5}, + {YEAR, 2012, DAY_OF_WEEK, 5}, + {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5}, + {YEAR, 2012, ALIGNED_WEEK_OF_MONTH, 5}, + {YEAR, 2012, IsoFields.QUARTER_OF_YEAR, 3}, + {YEAR, 2012, MINUTE_OF_HOUR, 5}, + {YEAR, 2012, SECOND_OF_MINUTE, 5}, + {YEAR, 2012, NANO_OF_SECOND, 5}, + + {MONTH_OF_YEAR, 5, DAY_OF_MONTH, 5}, + {MONTH_OF_YEAR, 5, DAY_OF_WEEK, 5}, + {MONTH_OF_YEAR, 5, ALIGNED_WEEK_OF_YEAR, 5}, + {MONTH_OF_YEAR, 5, ALIGNED_WEEK_OF_MONTH, 5}, + {MONTH_OF_YEAR, 3, IsoFields.QUARTER_OF_YEAR, 5}, + {MONTH_OF_YEAR, 5, MINUTE_OF_HOUR, 5}, + {MONTH_OF_YEAR, 5, SECOND_OF_MINUTE, 5}, + {MONTH_OF_YEAR, 5, NANO_OF_SECOND, 5}, + }; + } + + @Test(dataProvider="resolveTwoNoChange") + public void test_resolveTwoNoChange(TemporalField field1, long value1, TemporalField field2, long value2) { + String str = value1 + " " + value2; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).toFormatter(); + TemporalAccessor accessor = f.parse(str); + + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + assertEquals(accessor.isSupported(field1), true); + assertEquals(accessor.isSupported(field2), true); + assertEquals(accessor.getLong(field1), value1); + assertEquals(accessor.getLong(field2), value2); + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveThreeNoChange") + Object[][] data_resolveThreeNoChange() { + return new Object[][]{ + {YEAR, 2012, MONTH_OF_YEAR, 5, DAY_OF_WEEK, 5}, + {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, DAY_OF_MONTH, 5}, + {YEAR, 2012, ALIGNED_WEEK_OF_MONTH, 5, DAY_OF_MONTH, 5}, + {YEAR, 2012, MONTH_OF_YEAR, 5, DAY_OF_WEEK, 5}, + {ERA, 1, MONTH_OF_YEAR, 5, DAY_OF_MONTH, 5}, + {MONTH_OF_YEAR, 1, DAY_OF_MONTH, 5, IsoFields.QUARTER_OF_YEAR, 3}, + {HOUR_OF_DAY, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, + {MINUTE_OF_HOUR, 1, SECOND_OF_MINUTE, 5, NANO_OF_SECOND, 5}, + }; + } + + @Test(dataProvider="resolveThreeNoChange") + public void test_resolveThreeNoChange(TemporalField field1, long value1, TemporalField field2, long value2, TemporalField field3, long value3) { + String str = value1 + " " + value2 + " " + value3; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).appendLiteral(' ') + .appendValue(field3).toFormatter(); + TemporalAccessor accessor = f.parse(str); + + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + assertEquals(accessor.isSupported(field1), true); + assertEquals(accessor.isSupported(field2), true); + assertEquals(accessor.isSupported(field3), true); + assertEquals(accessor.getLong(field1), value1); + assertEquals(accessor.getLong(field2), value2); + assertEquals(accessor.getLong(field3), value3); + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @DataProvider(name="resolveOneToField") + Object[][] data_resolveOneToField() { + return new Object[][]{ + {YEAR_OF_ERA, 2012, YEAR, 2012L, null, null}, + {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), YEAR, 2012L, MONTH_OF_YEAR, 3L}, + + {CLOCK_HOUR_OF_AMPM, 8, HOUR_OF_AMPM, 8L, null, null}, + {CLOCK_HOUR_OF_AMPM, 12, HOUR_OF_AMPM, 0L, null, null}, + {MICRO_OF_SECOND, 12, NANO_OF_SECOND, 12_000L, null, null}, + {MILLI_OF_SECOND, 12, NANO_OF_SECOND, 12_000_000L, null, null}, + }; + } + + @Test(dataProvider="resolveOneToField") + public void test_resolveOneToField(TemporalField field1, long value1, + TemporalField expectedField1, Long expectedValue1, + TemporalField expectedField2, Long expectedValue2) { + String str = Long.toString(value1); + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + if (expectedField1 != null) { + assertEquals(accessor.isSupported(expectedField1), true); + assertEquals(accessor.getLong(expectedField1), expectedValue1.longValue()); + } + if (expectedField2 != null) { + assertEquals(accessor.isSupported(expectedField2), true); + assertEquals(accessor.getLong(expectedField2), expectedValue2.longValue()); + } + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveOneToDate") + Object[][] data_resolveOneToDate() { + return new Object[][]{ + {EPOCH_DAY, 32, LocalDate.of(1970, 2, 2)}, + }; + } + + @Test(dataProvider="resolveOneToDate") + public void test_resolveOneToDate(TemporalField field1, long value1, LocalDate expectedDate) { + String str = Long.toString(value1); + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveOneToTime") + Object[][] data_resolveOneToTime() { + return new Object[][]{ + {HOUR_OF_DAY, 8, LocalTime.of(8, 0)}, + {CLOCK_HOUR_OF_DAY, 8, LocalTime.of(8, 0)}, + {CLOCK_HOUR_OF_DAY, 24, LocalTime.of(0, 0)}, + {MINUTE_OF_DAY, 650, LocalTime.of(10, 50)}, + {SECOND_OF_DAY, 3600 + 650, LocalTime.of(1, 10, 50)}, + {MILLI_OF_DAY, (3600 + 650) * 1_000L + 2, LocalTime.of(1, 10, 50, 2_000_000)}, + {MICRO_OF_DAY, (3600 + 650) * 1_000_000L + 2, LocalTime.of(1, 10, 50, 2_000)}, + {NANO_OF_DAY, (3600 + 650) * 1_000_000_000L + 2, LocalTime.of(1, 10, 50, 2)}, + }; + } + + @Test(dataProvider="resolveOneToTime") + public void test_resolveOneToTime(TemporalField field1, long value1, LocalTime expectedTime) { + String str = Long.toString(value1); + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime); + } + + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + //----------------------------------------------------------------------- + @DataProvider(name="resolveTwoToField") + Object[][] data_resolveTwoToField() { + return new Object[][]{ + // cross-check + {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), YEAR, 2012, YEAR, 2012L, MONTH_OF_YEAR, 3L}, + {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), YEAR_OF_ERA, 2012, YEAR, 2012L, MONTH_OF_YEAR, 3L}, + {PROLEPTIC_MONTH, 2012 * 12L + (3 - 1), ERA, 1, YEAR, 2012L, MONTH_OF_YEAR, 3L}, + {PROLEPTIC_MONTH, (3 - 1), YEAR, 0, YEAR, 0L, MONTH_OF_YEAR, 3L}, + {PROLEPTIC_MONTH, (3 - 1), YEAR_OF_ERA, 1, YEAR, 0L, MONTH_OF_YEAR, 3L}, + {PROLEPTIC_MONTH, (3 - 1), ERA, 0, YEAR, 0L, MONTH_OF_YEAR, 3L}, + }; + } + + @Test(dataProvider="resolveTwoToField") + public void test_resolveTwoToField(TemporalField field1, long value1, + TemporalField field2, long value2, + TemporalField expectedField1, Long expectedValue1, + TemporalField expectedField2, Long expectedValue2) { + String str = value1 + " " + value2; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + if (expectedField1 != null) { + assertEquals(accessor.isSupported(expectedField1), true); + assertEquals(accessor.getLong(expectedField1), expectedValue1.longValue()); + } + if (expectedField2 != null) { + assertEquals(accessor.isSupported(expectedField2), true); + assertEquals(accessor.getLong(expectedField2), expectedValue2.longValue()); + } + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveTwoToDate") + Object[][] data_resolveTwoToDate() { + return new Object[][]{ + // merge + {YEAR, 2012, DAY_OF_YEAR, 32, LocalDate.of(2012, 2, 1)}, + {YEAR_OF_ERA, 2012, DAY_OF_YEAR, 32, LocalDate.of(2012, 2, 1)}, + + // merge + {PROLEPTIC_MONTH, 2012 * 12 + (2 - 1), DAY_OF_MONTH, 25, LocalDate.of(2012, 2, 25)}, + {PROLEPTIC_MONTH, 2012 * 12 + (2 - 1), DAY_OF_YEAR, 56, LocalDate.of(2012, 2, 25)}, + + // cross-check + {EPOCH_DAY, 32, ERA, 1, LocalDate.of(1970, 2, 2)}, + {EPOCH_DAY, -146097 * 5L, ERA, 0, LocalDate.of(1970 - (400 * 5), 1, 1)}, + {EPOCH_DAY, 32, YEAR, 1970, LocalDate.of(1970, 2, 2)}, + {EPOCH_DAY, -146097 * 5L, YEAR, 1970 - (400 * 5), LocalDate.of(1970 - (400 * 5), 1, 1)}, + {EPOCH_DAY, 32, YEAR_OF_ERA, 1970, LocalDate.of(1970, 2, 2)}, + {EPOCH_DAY, -146097 * 5L, YEAR_OF_ERA, 1 - (1970 - (400 * 5)), LocalDate.of(1970 - (400 * 5), 1, 1)}, + {EPOCH_DAY, 32, MONTH_OF_YEAR, 2, LocalDate.of(1970, 2, 2)}, + {EPOCH_DAY, 32, DAY_OF_YEAR, 33, LocalDate.of(1970, 2, 2)}, + {EPOCH_DAY, 32, DAY_OF_MONTH, 2, LocalDate.of(1970, 2, 2)}, + {EPOCH_DAY, 32, DAY_OF_WEEK, 1, LocalDate.of(1970, 2, 2)}, + }; + } + + @Test(dataProvider="resolveTwoToDate") + public void test_resolveTwoToDate(TemporalField field1, long value1, + TemporalField field2, long value2, + LocalDate expectedDate) { + String str = value1 + " " + value2; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveTwoToTime") + Object[][] data_resolveTwoToTime() { + return new Object[][]{ + // merge + {HOUR_OF_DAY, 8, MINUTE_OF_HOUR, 6, LocalTime.of(8, 6)}, + + // merge + {AMPM_OF_DAY, 0, HOUR_OF_AMPM, 5, LocalTime.of(5, 0)}, + {AMPM_OF_DAY, 1, HOUR_OF_AMPM, 5, LocalTime.of(17, 0)}, + {AMPM_OF_DAY, 0, CLOCK_HOUR_OF_AMPM, 5, LocalTime.of(5, 0)}, + {AMPM_OF_DAY, 1, CLOCK_HOUR_OF_AMPM, 5, LocalTime.of(17, 0)}, + {AMPM_OF_DAY, 0, HOUR_OF_DAY, 5, LocalTime.of(5, 0)}, + {AMPM_OF_DAY, 1, HOUR_OF_DAY, 17, LocalTime.of(17, 0)}, + {AMPM_OF_DAY, 0, CLOCK_HOUR_OF_DAY, 5, LocalTime.of(5, 0)}, + {AMPM_OF_DAY, 1, CLOCK_HOUR_OF_DAY, 17, LocalTime.of(17, 0)}, + + // merge + {CLOCK_HOUR_OF_DAY, 8, MINUTE_OF_HOUR, 6, LocalTime.of(8, 6)}, + {CLOCK_HOUR_OF_DAY, 24, MINUTE_OF_HOUR, 6, LocalTime.of(0, 6)}, + // cross-check + {CLOCK_HOUR_OF_DAY, 8, HOUR_OF_DAY, 8, LocalTime.of(8, 0)}, + {CLOCK_HOUR_OF_DAY, 8, CLOCK_HOUR_OF_AMPM, 8, LocalTime.of(8, 0)}, + {CLOCK_HOUR_OF_DAY, 20, CLOCK_HOUR_OF_AMPM, 8, LocalTime.of(20, 0)}, + {CLOCK_HOUR_OF_DAY, 8, AMPM_OF_DAY, 0, LocalTime.of(8, 0)}, + {CLOCK_HOUR_OF_DAY, 20, AMPM_OF_DAY, 1, LocalTime.of(20, 0)}, + + // merge + {MINUTE_OF_DAY, 650, SECOND_OF_MINUTE, 8, LocalTime.of(10, 50, 8)}, + // cross-check + {MINUTE_OF_DAY, 650, HOUR_OF_DAY, 10, LocalTime.of(10, 50)}, + {MINUTE_OF_DAY, 650, CLOCK_HOUR_OF_DAY, 10, LocalTime.of(10, 50)}, + {MINUTE_OF_DAY, 650, CLOCK_HOUR_OF_AMPM, 10, LocalTime.of(10, 50)}, + {MINUTE_OF_DAY, 650, AMPM_OF_DAY, 0, LocalTime.of(10, 50)}, + {MINUTE_OF_DAY, 650, MINUTE_OF_HOUR, 50, LocalTime.of(10, 50)}, + + // merge + {SECOND_OF_DAY, 3600 + 650, MILLI_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000_000)}, + {SECOND_OF_DAY, 3600 + 650, MICRO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000)}, + {SECOND_OF_DAY, 3600 + 650, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)}, + // cross-check + {SECOND_OF_DAY, 3600 + 650, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50)}, + {SECOND_OF_DAY, 3600 + 650, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50)}, + {SECOND_OF_DAY, 3600 + 650, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50)}, + + // merge + {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, MICRO_OF_SECOND, 2_004, LocalTime.of(1, 10, 50, 2_004_000)}, + {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, NANO_OF_SECOND, 2_000_004, LocalTime.of(1, 10, 50, 2_000_004)}, + // cross-check + {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50, 2_000_000)}, + {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50, 2_000_000)}, + {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50, 2_000_000)}, + {MILLI_OF_DAY, (3600 + 650) * 1000L + 2, MILLI_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000_000)}, + + // merge + {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, NANO_OF_SECOND, 2_004, LocalTime.of(1, 10, 50, 2_004)}, + // cross-check + {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50, 2_000)}, + {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50, 2_000)}, + {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50, 2_000)}, + {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, MILLI_OF_SECOND, 0, LocalTime.of(1, 10, 50, 2_000)}, + {MICRO_OF_DAY, (3600 + 650) * 1000_000L + 2, MICRO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2_000)}, + + // cross-check + {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, HOUR_OF_DAY, 1, LocalTime.of(1, 10, 50, 2)}, + {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, MINUTE_OF_HOUR, 10, LocalTime.of(1, 10, 50, 2)}, + {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, SECOND_OF_MINUTE, 50, LocalTime.of(1, 10, 50, 2)}, + {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, MILLI_OF_SECOND, 0, LocalTime.of(1, 10, 50, 2)}, + {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, MICRO_OF_SECOND, 0, LocalTime.of(1, 10, 50, 2)}, + {NANO_OF_DAY, (3600 + 650) * 1000_000_000L + 2, NANO_OF_SECOND, 2, LocalTime.of(1, 10, 50, 2)}, + }; + } + + @Test(dataProvider="resolveTwoToTime") + public void test_resolveTwoToTime(TemporalField field1, long value1, + TemporalField field2, long value2, + LocalTime expectedTime) { + String str = value1 + " " + value2; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), null); + assertEquals(accessor.query(TemporalQuery.localTime()), expectedTime); + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveThreeToDate") + Object[][] data_resolveThreeToDate() { + return new Object[][]{ + // merge + {YEAR, 2012, MONTH_OF_YEAR, 2, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)}, + {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, ALIGNED_DAY_OF_WEEK_IN_YEAR, 4, LocalDate.of(2012, 2, 1)}, + {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)}, + + // cross-check + {YEAR, 2012, DAY_OF_YEAR, 32, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)}, + {YEAR_OF_ERA, 2012, DAY_OF_YEAR, 32, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)}, + {YEAR, 2012, DAY_OF_YEAR, 32, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)}, + {PROLEPTIC_MONTH, 2012 * 12 + (2 - 1), DAY_OF_MONTH, 25, DAY_OF_WEEK, 6, LocalDate.of(2012, 2, 25)}, + }; + } + + @Test(dataProvider="resolveThreeToDate") + public void test_resolveThreeToDate(TemporalField field1, long value1, + TemporalField field2, long value2, + TemporalField field3, long value3, + LocalDate expectedDate) { + String str = value1 + " " + value2 + " " + value3; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).appendLiteral(' ') + .appendValue(field3).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + } + + //----------------------------------------------------------------------- + @DataProvider(name="resolveFourToDate") + Object[][] data_resolveFourToDate() { + return new Object[][]{ + // merge + {YEAR, 2012, MONTH_OF_YEAR, 2, ALIGNED_WEEK_OF_MONTH, 1, ALIGNED_DAY_OF_WEEK_IN_MONTH, 1, LocalDate.of(2012, 2, 1)}, + {YEAR, 2012, MONTH_OF_YEAR, 2, ALIGNED_WEEK_OF_MONTH, 1, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)}, + + // cross-check + {YEAR, 2012, MONTH_OF_YEAR, 2, DAY_OF_MONTH, 1, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)}, + {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, ALIGNED_DAY_OF_WEEK_IN_YEAR, 4, DAY_OF_WEEK, 3, LocalDate.of(2012, 2, 1)}, + {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 5, DAY_OF_WEEK, 3, DAY_OF_MONTH, 1, LocalDate.of(2012, 2, 1)}, + }; + } + + @Test(dataProvider="resolveFourToDate") + public void test_resolveFourToDate(TemporalField field1, long value1, + TemporalField field2, long value2, + TemporalField field3, long value3, + TemporalField field4, long value4, + LocalDate expectedDate) { + String str = value1 + " " + value2 + " " + value3 + " " + value4; + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(field1).appendLiteral(' ') + .appendValue(field2).appendLiteral(' ') + .appendValue(field3).appendLiteral(' ') + .appendValue(field4).toFormatter(); + + TemporalAccessor accessor = f.parse(str); + assertEquals(accessor.query(TemporalQuery.localDate()), expectedDate); + assertEquals(accessor.query(TemporalQuery.localTime()), null); + } + +} diff --git a/jdk/test/java/time/tck/java/time/format/TCKDateTimeTextPrinting.java b/jdk/test/java/time/tck/java/time/format/TCKDateTimeTextPrinting.java index d436fb41ad4..52f51369a0c 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKDateTimeTextPrinting.java +++ b/jdk/test/java/time/tck/java/time/format/TCKDateTimeTextPrinting.java @@ -59,21 +59,21 @@ */ package tck.java.time.format; -import java.time.format.*; - import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static org.testng.Assert.assertEquals; +import java.time.LocalDateTime; +import java.time.Month; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.TextStyle; +import java.time.temporal.TemporalField; import java.util.HashMap; import java.util.Locale; import java.util.Map; -import java.time.LocalDateTime; -import java.time.Month; -import java.time.temporal.TemporalField; - import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -86,7 +86,7 @@ public class TCKDateTimeTextPrinting { private DateTimeFormatterBuilder builder; - @BeforeMethod(groups={"tck"}) + @BeforeMethod public void setUp() { builder = new DateTimeFormatterBuilder(); } @@ -135,7 +135,7 @@ public class TCKDateTimeTextPrinting { }; } - @Test(dataProvider="printText", groups={"tck"}) + @Test(dataProvider="printText") public void test_appendText2arg_format(TemporalField field, TextStyle style, int value, String expected) throws Exception { DateTimeFormatter f = builder.appendText(field, style).toFormatter(Locale.ENGLISH); LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); @@ -144,7 +144,7 @@ public class TCKDateTimeTextPrinting { assertEquals(text, expected); } - @Test(dataProvider="printText", groups={"tck"}) + @Test(dataProvider="printText") public void test_appendText1arg_format(TemporalField field, TextStyle style, int value, String expected) throws Exception { if (style == TextStyle.FULL) { DateTimeFormatter f = builder.appendText(field).toFormatter(Locale.ENGLISH); @@ -156,7 +156,7 @@ public class TCKDateTimeTextPrinting { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_print_appendText2arg_french_long() throws Exception { DateTimeFormatter f = builder.appendText(MONTH_OF_YEAR, TextStyle.FULL).toFormatter(Locale.FRENCH); LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); @@ -164,7 +164,7 @@ public class TCKDateTimeTextPrinting { assertEquals(text, "janvier"); } - @Test(groups={"tck"}) + @Test public void test_print_appendText2arg_french_short() throws Exception { DateTimeFormatter f = builder.appendText(MONTH_OF_YEAR, TextStyle.SHORT).toFormatter(Locale.FRENCH); LocalDateTime dt = LocalDateTime.of(2010, 1, 1, 0, 0); @@ -173,7 +173,7 @@ public class TCKDateTimeTextPrinting { } //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_appendTextMap() throws Exception { Map map = new HashMap(); map.put(1L, "JNY"); @@ -196,7 +196,7 @@ public class TCKDateTimeTextPrinting { } } - @Test(groups={"tck"}) + @Test public void test_appendTextMap_DOM() throws Exception { Map map = new HashMap(); map.put(1L, "1st"); @@ -210,7 +210,7 @@ public class TCKDateTimeTextPrinting { assertEquals(f.format(dt.withDayOfMonth(3)), "3rd"); } - @Test(groups={"tck"}) + @Test public void test_appendTextMapIncomplete() throws Exception { Map map = new HashMap(); map.put(1L, "JNY"); diff --git a/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldParser.java b/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldParser.java index 0d7975a8310..eef99fc7add 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldParser.java +++ b/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldParser.java @@ -59,8 +59,7 @@ */ package tck.java.time.format; -import static java.time.temporal.ChronoField.MONTH_OF_YEAR; -import static java.time.temporal.ChronoField.YEAR; +import static java.time.temporal.ChronoField.YEAR_OF_ERA; import static org.testng.Assert.assertEquals; import java.text.ParsePosition; @@ -78,7 +77,7 @@ import test.java.time.format.AbstractTestPrinterParser; /** * Test TCKLocalizedFieldParser. */ -@Test(groups={"tck"}) +@Test public class TCKLocalizedFieldParser extends AbstractTestPrinterParser { //----------------------------------------------------------------------- @@ -86,13 +85,16 @@ public class TCKLocalizedFieldParser extends AbstractTestPrinterParser { Object[][] provider_fieldPatterns() { return new Object[][] { {"e", "6", 0, 1, 6}, - {"w", "3", 0, 1, 3}, - {"W", "29", 0, 2, 29}, - {"WW", "29", 0, 2, 29}, + {"W", "3", 0, 1, 3}, + {"w", "29", 0, 2, 29}, + {"ww", "29", 0, 2, 29}, + {"Y", "2013", 0, 4, 2013}, + {"YY", "13", 0, 2, 2013}, + {"YYYY", "2013", 0, 4, 2013}, }; } - @Test(dataProvider="FieldPatterns",groups={"tck"}) + @Test(dataProvider="FieldPatterns") public void test_parse_textField(String pattern, String text, int pos, int expectedPos, long expectedValue) { WeekFields weekDef = WeekFields.of(locale); TemporalField field = null; @@ -101,10 +103,13 @@ public class TCKLocalizedFieldParser extends AbstractTestPrinterParser { field = weekDef.dayOfWeek(); break; case 'w': - field = weekDef.weekOfMonth(); + field = weekDef.weekOfWeekBasedYear(); break; case 'W': - field = weekDef.weekOfYear(); + field = weekDef.weekOfMonth(); + break; + case 'Y': + field = weekDef.weekBasedYear(); break; default: throw new IllegalStateException("bad format letter from pattern"); @@ -123,27 +128,24 @@ public class TCKLocalizedFieldParser extends AbstractTestPrinterParser { } } - //----------------------------------------------------------------------- - @DataProvider(name="LocalDatePatterns") + //----------------------------------------------------------------------- + @DataProvider(name="LocalWeekMonthYearPatterns") Object[][] provider_patternLocalDate() { return new Object[][] { - {"e w M y", "1 1 1 2012", 0, 10, LocalDate.of(2012, 1, 1)}, - {"e w M y", "1 2 1 2012", 0, 10, LocalDate.of(2012, 1, 8)}, - {"e w M y", "2 2 1 2012", 0, 10, LocalDate.of(2012, 1, 9)}, - {"e w M y", "3 2 1 2012", 0, 10, LocalDate.of(2012, 1, 10)}, - {"e w M y", "1 3 1 2012", 0, 10, LocalDate.of(2012, 1, 15)}, - {"e w M y", "2 3 1 2012", 0, 10, LocalDate.of(2012, 1, 16)}, - {"e w M y", "6 2 1 2012", 0, 10, LocalDate.of(2012, 1, 13)}, - {"e w M y", "6 2 7 2012", 0, 10, LocalDate.of(2012, 7, 13)}, - {"e W y", "6 29 2012", 0, 9, LocalDate.of(2012, 7, 20)}, - {"'Date: 'y-MM', day-of-week: 'e', week-of-month: 'w", + {"e W M y", "1 1 1 2012", 0, 10, LocalDate.of(2012, 1, 1)}, + {"e W M y", "1 2 1 2012", 0, 10, LocalDate.of(2012, 1, 8)}, + {"e W M y", "2 2 1 2012", 0, 10, LocalDate.of(2012, 1, 9)}, + {"e W M y", "3 2 1 2012", 0, 10, LocalDate.of(2012, 1, 10)}, + {"e W M y", "1 3 1 2012", 0, 10, LocalDate.of(2012, 1, 15)}, + {"e W M y", "2 3 1 2012", 0, 10, LocalDate.of(2012, 1, 16)}, + {"e W M y", "6 2 1 2012", 0, 10, LocalDate.of(2012, 1, 13)}, + {"e W M y", "6 2 7 2012", 0, 10, LocalDate.of(2012, 7, 13)}, + {"'Date: 'y-MM', day-of-week: 'e', week-of-month: 'W", "Date: 2012-07, day-of-week: 6, week-of-month: 3", 0, 47, LocalDate.of(2012, 7, 20)}, - {"'Date: 'y', day-of-week: 'e', week-of-year: 'W", - "Date: 2012, day-of-week: 6, week-of-year: 29", 0, 44, LocalDate.of(2012, 7, 20)}, }; } - @Test(dataProvider="LocalDatePatterns",groups={"tck"}) + @Test(dataProvider="LocalWeekMonthYearPatterns") public void test_parse_textLocalDate(String pattern, String text, int pos, int expectedPos, LocalDate expectedValue) { ParsePosition ppos = new ParsePosition(pos); DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern); @@ -153,7 +155,7 @@ public class TCKLocalizedFieldParser extends AbstractTestPrinterParser { assertEquals(ppos.getErrorIndex(), expectedPos); } else { assertEquals(ppos.getIndex(), expectedPos, "Incorrect ending parse position"); - assertEquals(parsed.isSupported(YEAR), true); + assertEquals(parsed.isSupported(YEAR_OF_ERA), true); assertEquals(parsed.isSupported(WeekFields.of(locale).dayOfWeek()), true); assertEquals(parsed.isSupported(WeekFields.of(locale).weekOfMonth()) || parsed.isSupported(WeekFields.of(locale).weekOfYear()), true); @@ -163,4 +165,41 @@ public class TCKLocalizedFieldParser extends AbstractTestPrinterParser { } } + //----------------------------------------------------------------------- + @DataProvider(name="LocalWeekBasedYearPatterns") + Object[][] provider_patternLocalWeekBasedYearDate() { + return new Object[][] { + //{"w Y", "29 2012", 0, 7, LocalDate.of(2012, 7, 20)}, // Default lenient dayOfWeek not supported + {"e w Y", "6 29 2012", 0, 9, LocalDate.of(2012, 7, 20)}, + {"'Date: 'Y', day-of-week: 'e', week-of-year: 'w", + "Date: 2012, day-of-week: 6, week-of-year: 29", 0, 44, LocalDate.of(2012, 7, 20)}, + {"Y-w-e", "2008-01-1", 0, 9, LocalDate.of(2007, 12, 30)}, + {"Y-w-e", "2008-52-1", 0, 9, LocalDate.of(2008, 12, 21)}, + {"Y-w-e", "2008-52-7", 0, 9, LocalDate.of(2008, 12, 27)}, + {"Y-w-e", "2009-01-01", 0, 10, LocalDate.of(2008, 12, 28)}, + {"Y-w-e", "2009-01-04", 0, 10, LocalDate.of(2008, 12, 31)}, + {"Y-w-e", "2009-01-05", 0, 10, LocalDate.of(2009, 1, 1)}, + }; + } + + @Test(dataProvider="LocalWeekBasedYearPatterns") + public void test_parse_WeekBasedYear(String pattern, String text, int pos, int expectedPos, LocalDate expectedValue) { + ParsePosition ppos = new ParsePosition(pos); + DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern); + DateTimeFormatter dtf = b.toFormatter(locale); + TemporalAccessor parsed = dtf.parseUnresolved(text, ppos); + if (ppos.getErrorIndex() != -1) { + assertEquals(ppos.getErrorIndex(), expectedPos); + } else { + WeekFields weekDef = WeekFields.of(locale); + assertEquals(ppos.getIndex(), expectedPos, "Incorrect ending parse position"); + assertEquals(parsed.isSupported(weekDef.dayOfWeek()), pattern.indexOf('e') >= 0); + assertEquals(parsed.isSupported(weekDef.weekOfWeekBasedYear()), pattern.indexOf('w') >= 0); + assertEquals(parsed.isSupported(weekDef.weekBasedYear()), pattern.indexOf('Y') >= 0); + // ensure combination resolves into a date + LocalDate result = LocalDate.parse(text, dtf); + assertEquals(result, expectedValue, "LocalDate incorrect for " + pattern + ", weekDef: " + weekDef); + } + } + } diff --git a/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldPrinter.java b/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldPrinter.java index 3be85a9a03c..2b7d0f82ce4 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldPrinter.java +++ b/jdk/test/java/time/tck/java/time/format/TCKLocalizedFieldPrinter.java @@ -59,22 +59,22 @@ */ package tck.java.time.format; -import java.time.format.*; - import static org.testng.Assert.assertEquals; -import static org.testng.Assert.fail; import java.time.LocalDate; - -import test.java.time.format.AbstractTestPrinterParser; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.temporal.WeekFields; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import test.java.time.format.AbstractTestPrinterParser; + /** * Test LocalizedFieldPrinterParser. */ -@Test(groups={"tck"}) +@Test public class TCKLocalizedFieldPrinter extends AbstractTestPrinterParser { //----------------------------------------------------------------------- @@ -82,17 +82,17 @@ public class TCKLocalizedFieldPrinter extends AbstractTestPrinterParser { Object[][] provider_pad() { return new Object[][] { {"e", "6"}, - {"w", "3"}, - {"W", "29"}, - {"WW", "29"}, - {"'Date: 'y-MM-d', week-of-month: 'w', week-of-year: 'W", + {"W", "3"}, + {"w", "29"}, + {"ww", "29"}, + {"'Date: 'y-MM-d', week-of-month: 'W', week-of-year: 'w", "Date: 2012-07-20, week-of-month: 3, week-of-year: 29"}, }; } //----------------------------------------------------------------------- - @Test(dataProvider="Patterns",groups={"tck"}) + @Test(dataProvider="Patterns") public void test_localizedDayOfWeek(String pattern, String expected) { DateTimeFormatterBuilder b = new DateTimeFormatterBuilder().appendPattern(pattern); @@ -102,4 +102,28 @@ public class TCKLocalizedFieldPrinter extends AbstractTestPrinterParser { assertEquals(result, expected, "Wrong output for pattern '" + pattern + "'."); } + //----------------------------------------------------------------------- + @DataProvider(name="LocalWeekBasedYearPatterns") + Object[][] provider_patternLocalWeekBasedYearDate() { + return new Object[][] { + {"e w Y", "6 29 2012", LocalDate.of(2012, 7, 20)}, + {"'Date: 'Y', day-of-week: 'e', week-of-year: 'w", + "Date: 2012, day-of-week: 6, week-of-year: 29", LocalDate.of(2012, 7, 20)}, + {"Y-ww-ee", "2008-01-01", LocalDate.of(2007, 12, 30)}, + {"Y-w-e", "2008-52-1", LocalDate.of(2008, 12, 21)}, + {"Y-w-e", "2008-52-7", LocalDate.of(2008, 12, 27)}, + {"Y-ww-e", "2009-01-1", LocalDate.of(2008, 12, 28)}, + {"Y-w-e", "2009-1-4", LocalDate.of(2008, 12, 31)}, + {"Y-w-e", "2009-1-5", LocalDate.of(2009, 1, 1)}, + {"YYYYYYYYY-w-e", "000002009-1-5", LocalDate.of(2009, 1, 1)}, + }; + } + + @Test(dataProvider = "LocalWeekBasedYearPatterns") + public void test_print_WeekBasedYear(String pattern, String expectedText, LocalDate date) { + DateTimeFormatter dtf = DateTimeFormatter.ofPattern(pattern, locale); + String result = dtf.format(date); + WeekFields weekDef = WeekFields.of(locale); + assertEquals(result, expectedText, "Incorrect formatting for " + pattern + ", weekDef: " + weekDef); + } } diff --git a/jdk/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java b/jdk/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java index cb348b264c3..075d862e72c 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java +++ b/jdk/test/java/time/tck/java/time/format/TCKLocalizedPrinterParser.java @@ -63,7 +63,6 @@ import static org.testng.Assert.assertEquals; import java.text.DateFormat; import java.text.ParsePosition; -import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalTime; import java.time.format.DateTimeFormatter; diff --git a/jdk/test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java b/jdk/test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java index 0ebc718c1e3..76cfa56f88d 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java +++ b/jdk/test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java @@ -62,11 +62,13 @@ package tck.java.time.format; import static org.testng.Assert.assertEquals; import java.time.LocalDateTime; +import java.time.OffsetDateTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +import java.time.format.TextStyle; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -200,6 +202,34 @@ public class TCKOffsetPrinterParser { }; } + @DataProvider(name="print_localized") + Object[][] data_print_localized() { + return new Object[][] { + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_UTC, "GMT"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P0100, "GMT+01:00"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P0123, "GMT+01:23"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P0023, "GMT+00:23"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_P012345, "GMT+01:23:45"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-00:00:45"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M0100, "GMT-01:00"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M0123, "GMT-01:23"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M0023, "GMT-00:23"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M012345, "GMT-01:23:45"}, + {TextStyle.FULL, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-00:00:45"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_UTC, "GMT"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P0100, "GMT+1"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P0123, "GMT+1:23"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P0023, "GMT+0:23"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_P012345, "GMT+1:23:45"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-0:00:45"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M0100, "GMT-1"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M0123, "GMT-1:23"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M0023, "GMT-0:23"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M012345, "GMT-1:23:45"}, + {TextStyle.SHORT, DT_2012_06_30_12_30_40, OFFSET_M000045, "GMT-0:00:45"}, + }; + } + @Test(dataProvider="print") public void test_print(String offsetPattern, String noOffset, LocalDateTime ldt, ZoneId zone, String expected) { ZonedDateTime zdt = ldt.atZone(zone); @@ -275,6 +305,45 @@ public class TCKOffsetPrinterParser { DateTimeFormatter f3 = new DateTimeFormatterBuilder().appendPattern("ZZZ").toFormatter(); String output3 = f3.format(zdt); assertEquals(output3, (expected.equals("Z") ? "+0000" : expected)); + } else if (offsetPattern.equals("+HH:MM:ss") && noOffset.equals("Z")) { + ZonedDateTime zdt = ldt.atZone(zone); + DateTimeFormatter f = new DateTimeFormatterBuilder().appendPattern("ZZZZZ").toFormatter(); + String output = f.format(zdt); + assertEquals(output, expected); + } + } + + @Test(dataProvider="print_localized") + public void test_print_localized(TextStyle style, LocalDateTime ldt, ZoneOffset offset, String expected) { + OffsetDateTime odt = OffsetDateTime.of(ldt, offset); + ZonedDateTime zdt = ldt.atZone(offset); + + DateTimeFormatter f = new DateTimeFormatterBuilder().appendLocalizedOffset(style) + .toFormatter(); + assertEquals(f.format(odt), expected); + assertEquals(f.format(zdt), expected); + assertEquals(f.parse(expected, ZoneOffset::from), offset); + + if (style == TextStyle.FULL) { + f = new DateTimeFormatterBuilder().appendPattern("ZZZZ") + .toFormatter(); + assertEquals(f.format(odt), expected); + assertEquals(f.format(zdt), expected); + assertEquals(f.parse(expected, ZoneOffset::from), offset); + + f = new DateTimeFormatterBuilder().appendPattern("OOOO") + .toFormatter(); + assertEquals(f.format(odt), expected); + assertEquals(f.format(zdt), expected); + assertEquals(f.parse(expected, ZoneOffset::from), offset); + } + + if (style == TextStyle.SHORT) { + f = new DateTimeFormatterBuilder().appendPattern("O") + .toFormatter(); + assertEquals(f.format(odt), expected); + assertEquals(f.format(zdt), expected); + assertEquals(f.parse(expected, ZoneOffset::from), offset); } } @@ -290,8 +359,43 @@ public class TCKOffsetPrinterParser { } @Test(expectedExceptions=IllegalArgumentException.class) - public void test_print_pattern_Z4rejected() { - builder.appendPattern("ZZZZ"); + public void test_print_pattern_Z6rejected() { + builder.appendPattern("ZZZZZZ"); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_O2rejected() { + builder.appendPattern("OO"); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_O3rejected() { + builder.appendPattern("OOO"); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_O5rejected() { + builder.appendPattern("OOOOO"); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_localzed_full_standline() { + builder.appendLocalizedOffset(TextStyle.FULL_STANDALONE); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_localzed_short_standalone() { + builder.appendLocalizedOffset(TextStyle.SHORT_STANDALONE); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_localzed_narrow() { + builder.appendLocalizedOffset(TextStyle.NARROW); + } + + @Test(expectedExceptions=IllegalArgumentException.class) + public void test_print_pattern_localzed_narrow_standalone() { + builder.appendLocalizedOffset(TextStyle.NARROW_STANDALONE); } } diff --git a/jdk/test/java/time/test/java/time/temporal/TestDateTimeAdjusters.java b/jdk/test/java/time/tck/java/time/format/TCKTextStyle.java similarity index 63% rename from jdk/test/java/time/test/java/time/temporal/TestDateTimeAdjusters.java rename to jdk/test/java/time/tck/java/time/format/TCKTextStyle.java index bdade55f572..4e80960fc2f 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestDateTimeAdjusters.java +++ b/jdk/test/java/time/tck/java/time/format/TCKTextStyle.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,7 +27,7 @@ * However, the following notice accompanied the original version of this * file: * - * Copyright (c) 2007-2012, Stephen Colebourne & Michael Nascimento Santos + * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos * * All rights reserved. * @@ -57,56 +57,38 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package test.java.time.temporal; +package tck.java.time.format; -import java.time.temporal.*; - -import static org.testng.Assert.assertSame; +import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; -import java.lang.reflect.Constructor; -import java.lang.reflect.Modifier; -import java.util.Collections; +import java.time.format.TextStyle; import org.testng.annotations.Test; /** - * Test Adjusters. + * Test DateTimeFormatSymbols. */ -@Test(groups={"implementation"}) -public class TestDateTimeAdjusters { +@Test +public class TCKTextStyle { - @SuppressWarnings("rawtypes") - public void test_constructor() throws Exception { - for (Constructor constructor : Adjusters.class.getDeclaredConstructors()) { - assertTrue(Modifier.isPrivate(constructor.getModifiers())); - constructor.setAccessible(true); - constructor.newInstance(Collections.nCopies(constructor.getParameterTypes().length, null).toArray()); - } - } + @Test + public void test_standaloneNormal() { + assertEquals(TextStyle.FULL, TextStyle.FULL_STANDALONE.asNormal()); + assertEquals(TextStyle.SHORT, TextStyle.SHORT.asNormal()); + assertEquals(TextStyle.NARROW, TextStyle.NARROW.asNormal()); - public void factory_firstDayOfMonthSame() { - assertSame(Adjusters.firstDayOfMonth(), Adjusters.firstDayOfMonth()); - } + assertEquals(TextStyle.FULL_STANDALONE, TextStyle.FULL_STANDALONE.asStandalone()); + assertEquals(TextStyle.SHORT_STANDALONE, TextStyle.SHORT.asStandalone()); + assertEquals(TextStyle.NARROW_STANDALONE, TextStyle.NARROW.asStandalone()); - public void factory_lastDayOfMonthSame() { - assertSame(Adjusters.lastDayOfMonth(), Adjusters.lastDayOfMonth()); - } + assertTrue(TextStyle.FULL_STANDALONE.isStandalone()); + assertTrue(TextStyle.SHORT_STANDALONE.isStandalone()); + assertTrue(TextStyle.NARROW_STANDALONE.isStandalone()); - public void factory_firstDayOfNextMonthSame() { - assertSame(Adjusters.firstDayOfNextMonth(), Adjusters.firstDayOfNextMonth()); - } - - public void factory_firstDayOfYearSame() { - assertSame(Adjusters.firstDayOfYear(), Adjusters.firstDayOfYear()); - } - - public void factory_lastDayOfYearSame() { - assertSame(Adjusters.lastDayOfYear(), Adjusters.lastDayOfYear()); - } - - public void factory_firstDayOfNextYearSame() { - assertSame(Adjusters.firstDayOfNextYear(), Adjusters.firstDayOfNextYear()); + assertTrue(!TextStyle.FULL.isStandalone()); + assertTrue(!TextStyle.SHORT.isStandalone()); + assertTrue(!TextStyle.NARROW.isStandalone()); } } diff --git a/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java b/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java index e346742dea3..f6c4c46f2a1 100644 --- a/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java +++ b/jdk/test/java/time/tck/java/time/format/TCKZoneIdPrinterParser.java @@ -67,8 +67,8 @@ import java.time.ZoneId; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatterBuilder; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQuery; import java.util.Locale; import org.testng.annotations.BeforeMethod; @@ -209,9 +209,9 @@ public class TCKZoneIdPrinterParser { assertEquals(pos.getErrorIndex(), expectedErrorIndex); assertEquals(pos.getIndex(), expectedIndex); if (expected != null) { - assertEquals(parsed.query(Queries.zoneId()), expected); - assertEquals(parsed.query(Queries.offset()), null); - assertEquals(parsed.query(Queries.zone()), expected); + assertEquals(parsed.query(TemporalQuery.zoneId()), expected); + assertEquals(parsed.query(TemporalQuery.offset()), null); + assertEquals(parsed.query(TemporalQuery.zone()), expected); } else { assertEquals(parsed, null); } @@ -225,9 +225,9 @@ public class TCKZoneIdPrinterParser { assertEquals(pos.getErrorIndex(), expectedErrorIndex >= 0 ? expectedErrorIndex + 3 : expectedErrorIndex); assertEquals(pos.getIndex(), expectedIndex + 3); if (expected != null) { - assertEquals(parsed.query(Queries.zoneId()), expected); - assertEquals(parsed.query(Queries.offset()), null); - assertEquals(parsed.query(Queries.zone()), expected); + assertEquals(parsed.query(TemporalQuery.zoneId()), expected); + assertEquals(parsed.query(TemporalQuery.offset()), null); + assertEquals(parsed.query(TemporalQuery.zone()), expected); } else { assertEquals(parsed, null); } @@ -240,9 +240,9 @@ public class TCKZoneIdPrinterParser { assertEquals(pos.getErrorIndex(), expectedErrorIndex); assertEquals(pos.getIndex(), expectedIndex); if (expected != null) { - assertEquals(parsed.query(Queries.zoneId()), expected); - assertEquals(parsed.query(Queries.offset()), null); - assertEquals(parsed.query(Queries.zone()), expected); + assertEquals(parsed.query(TemporalQuery.zoneId()), expected); + assertEquals(parsed.query(TemporalQuery.offset()), null); + assertEquals(parsed.query(TemporalQuery.zone()), expected); } else { assertEquals(parsed, null); } @@ -261,9 +261,9 @@ public class TCKZoneIdPrinterParser { assertEquals(pos.getIndex(), expectedIndex); assertEquals(pos.getErrorIndex(), expectedErrorIndex); if (expected != null) { - assertEquals(parsed.query(Queries.zoneId()), expected); - assertEquals(parsed.query(Queries.offset()), null); - assertEquals(parsed.query(Queries.zone()), expected); + assertEquals(parsed.query(TemporalQuery.zoneId()), expected); + assertEquals(parsed.query(TemporalQuery.offset()), null); + assertEquals(parsed.query(TemporalQuery.zone()), expected); } else { assertEquals(parsed, null); } @@ -277,9 +277,9 @@ public class TCKZoneIdPrinterParser { assertEquals(pos.getErrorIndex(), expectedErrorIndex); assertEquals(pos.getIndex(), expectedIndex); if (expected != null) { - assertEquals(parsed.query(Queries.zoneId()), expected); - assertEquals(parsed.query(Queries.offset()), null); - assertEquals(parsed.query(Queries.zone()), expected); + assertEquals(parsed.query(TemporalQuery.zoneId()), expected); + assertEquals(parsed.query(TemporalQuery.offset()), null); + assertEquals(parsed.query(TemporalQuery.zone()), expected); } else { assertEquals(parsed, null); } diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java b/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java index 359aac1b0e6..7159b312866 100644 --- a/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java +++ b/jdk/test/java/time/tck/java/time/temporal/TCKIsoFields.java @@ -66,11 +66,14 @@ import static java.time.DayOfWeek.WEDNESDAY; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.YEAR; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +import java.time.format.DateTimeParseException; +import java.time.format.ResolverStyle; import java.time.temporal.IsoFields; import java.time.temporal.ValueRange; @@ -80,7 +83,7 @@ import org.testng.annotations.Test; /** * Test. */ -@Test(groups={"tck"}) +@Test public class TCKIsoFields { @DataProvider(name="quarter") @@ -115,34 +118,132 @@ public class TCKIsoFields { //----------------------------------------------------------------------- // DAY_OF_QUARTER //----------------------------------------------------------------------- - @Test(dataProvider="quarter") + @Test(dataProvider = "quarter") public void test_DOQ(LocalDate date, int doq, int qoy) { assertEquals(IsoFields.DAY_OF_QUARTER.getFrom(date), doq); assertEquals(date.get(IsoFields.DAY_OF_QUARTER), doq); } + public void test_DOQ_basics() { + assertEquals(IsoFields.DAY_OF_QUARTER.isDateBased(), true); + assertEquals(IsoFields.DAY_OF_QUARTER.isTimeBased(), false); + } + //----------------------------------------------------------------------- // QUARTER_OF_YEAR //----------------------------------------------------------------------- - @Test(dataProvider="quarter") + @Test(dataProvider = "quarter") public void test_QOY(LocalDate date, int doq, int qoy) { assertEquals(IsoFields.QUARTER_OF_YEAR.getFrom(date), qoy); assertEquals(date.get(IsoFields.QUARTER_OF_YEAR), qoy); } + public void test_QOY_basics() { + assertEquals(IsoFields.QUARTER_OF_YEAR.isDateBased(), true); + assertEquals(IsoFields.QUARTER_OF_YEAR.isTimeBased(), false); + } + //----------------------------------------------------------------------- // parse quarters //----------------------------------------------------------------------- - @Test(dataProvider="quarter") + @Test(dataProvider = "quarter") public void test_parse_quarters(LocalDate date, int doq, int qoy) { DateTimeFormatter f = new DateTimeFormatterBuilder() .appendValue(YEAR).appendLiteral('-') .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral('-') - .appendValue(IsoFields.DAY_OF_QUARTER).toFormatter(); + .appendValue(IsoFields.DAY_OF_QUARTER) + .toFormatter().withResolverStyle(ResolverStyle.STRICT); LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); assertEquals(parsed, date); } + @Test(dataProvider = "quarter") + public void test_parse_quarters_SMART(LocalDate date, int doq, int qoy) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral('-') + .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral('-') + .appendValue(IsoFields.DAY_OF_QUARTER) + .toFormatter().withResolverStyle(ResolverStyle.SMART); + LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); + assertEquals(parsed, date); + } + + @Test(dataProvider = "quarter") + public void test_parse_quarters_LENIENT(LocalDate date, int doq, int qoy) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral('-') + .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral('-') + .appendValue(IsoFields.DAY_OF_QUARTER) + .toFormatter().withResolverStyle(ResolverStyle.LENIENT); + LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); + assertEquals(parsed, date); + } + + //----------------------------------------------------------------------- + @DataProvider(name="parseLenientQuarter") + Object[][] data_parseLenientQuarter() { + return new Object[][] { + {"2012:0:1", LocalDate.of(2011, 10, 1), false}, + {"2012:5:1", LocalDate.of(2013, 1, 1), false}, + + {"2012:1:-1", LocalDate.of(2011, 12, 30), false}, + {"2012:1:0", LocalDate.of(2011, 12, 31), false}, + {"2012:0:0", LocalDate.of(2011, 9, 30), false}, + + {"2012:1:92", LocalDate.of(2012, 4, 1), true}, + {"2012:2:92", LocalDate.of(2012, 7, 1), true}, + {"2012:2:93", LocalDate.of(2012, 7, 2), false}, + {"2012:3:93", LocalDate.of(2012, 10, 1), false}, + {"2012:4:93", LocalDate.of(2013, 1, 1), false}, + {"2012:4:182", LocalDate.of(2013, 3, 31), false}, + {"2012:4:183", LocalDate.of(2013, 4, 1), false}, + + {"2011:1:91", LocalDate.of(2011, 4, 1), true}, + {"2011:1:92", LocalDate.of(2011, 4, 2), true}, + }; + } + + @Test(dataProvider = "parseLenientQuarter", expectedExceptions = DateTimeParseException.class) + public void test_parse_parseLenientQuarter_STRICT(String str, LocalDate expected, boolean smart) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral(':') + .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral(':') + .appendValue(IsoFields.DAY_OF_QUARTER) + .toFormatter().withResolverStyle(ResolverStyle.STRICT); + LocalDate.parse(str, f); + } + + @Test(dataProvider = "parseLenientQuarter") + public void test_parse_parseLenientQuarter_SMART(String str, LocalDate expected, boolean smart) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral(':') + .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral(':') + .appendValue(IsoFields.DAY_OF_QUARTER) + .toFormatter().withResolverStyle(ResolverStyle.SMART); + if (smart) { + LocalDate parsed = LocalDate.parse(str, f); + assertEquals(parsed, expected); + } else { + try { + LocalDate.parse(str, f); + fail("Should have failed"); + } catch (DateTimeParseException ex) { + // expected + } + } + } + + @Test(dataProvider = "parseLenientQuarter") + public void test_parse_parseLenientQuarter_LENIENT(String str, LocalDate expected, boolean smart) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(YEAR).appendLiteral(':') + .appendValue(IsoFields.QUARTER_OF_YEAR).appendLiteral(':') + .appendValue(IsoFields.DAY_OF_QUARTER) + .toFormatter().withResolverStyle(ResolverStyle.LENIENT); + LocalDate parsed = LocalDate.parse(str, f); + assertEquals(parsed, expected); + } + //----------------------------------------------------------------------- // quarters between //----------------------------------------------------------------------- @@ -214,6 +315,11 @@ public class TCKIsoFields { assertEquals(date.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR), week); } + public void test_WOWBY_basics() { + assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.isDateBased(), true); + assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.isTimeBased(), false); + } + //----------------------------------------------------------------------- // WEEK_BASED_YEAR //----------------------------------------------------------------------- @@ -224,19 +330,105 @@ public class TCKIsoFields { assertEquals(date.get(IsoFields.WEEK_BASED_YEAR), wby); } + public void test_WBY_basics() { + assertEquals(IsoFields.WEEK_BASED_YEAR.isDateBased(), true); + assertEquals(IsoFields.WEEK_BASED_YEAR.isTimeBased(), false); + } + //----------------------------------------------------------------------- // parse weeks //----------------------------------------------------------------------- @Test(dataProvider="week") - public void test_parse_weeks(LocalDate date, DayOfWeek dow, int week, int wby) { + public void test_parse_weeks_STRICT(LocalDate date, DayOfWeek dow, int week, int wby) { DateTimeFormatter f = new DateTimeFormatterBuilder() .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral('-') .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral('-') - .appendValue(DAY_OF_WEEK).toFormatter(); + .appendValue(DAY_OF_WEEK) + .toFormatter().withResolverStyle(ResolverStyle.STRICT); LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); assertEquals(parsed, date); } + @Test(dataProvider="week") + public void test_parse_weeks_SMART(LocalDate date, DayOfWeek dow, int week, int wby) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral('-') + .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral('-') + .appendValue(DAY_OF_WEEK) + .toFormatter().withResolverStyle(ResolverStyle.SMART); + LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); + assertEquals(parsed, date); + } + + @Test(dataProvider="week") + public void test_parse_weeks_LENIENT(LocalDate date, DayOfWeek dow, int week, int wby) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral('-') + .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral('-') + .appendValue(DAY_OF_WEEK) + .toFormatter().withResolverStyle(ResolverStyle.LENIENT); + LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); + assertEquals(parsed, date); + } + + //----------------------------------------------------------------------- + @DataProvider(name="parseLenientWeek") + Object[][] data_parseLenientWeek() { + return new Object[][] { + {"2012:52:-1", LocalDate.of(2012, 12, 22), false}, + {"2012:52:0", LocalDate.of(2012, 12, 23), false}, + {"2012:52:8", LocalDate.of(2012, 12, 31), false}, + {"2012:52:9", LocalDate.of(2013, 1, 1), false}, + + {"2012:53:1", LocalDate.of(2012, 12, 31), true}, + {"2012:54:1", LocalDate.of(2013, 1, 7), false}, + + {"2013:0:1", LocalDate.of(2012, 12, 24), false}, + {"2013:0:0", LocalDate.of(2012, 12, 23), false}, + }; + } + + @Test(dataProvider = "parseLenientWeek", expectedExceptions = DateTimeParseException.class) + public void test_parse_parseLenientWeek_STRICT(String str, LocalDate expected, boolean smart) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral(':') + .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral(':') + .appendValue(DAY_OF_WEEK) + .toFormatter().withResolverStyle(ResolverStyle.STRICT); + LocalDate.parse(str, f); + } + + @Test(dataProvider = "parseLenientWeek") + public void test_parse_parseLenientWeek_SMART(String str, LocalDate expected, boolean smart) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral(':') + .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral(':') + .appendValue(DAY_OF_WEEK) + .toFormatter().withResolverStyle(ResolverStyle.SMART); + if (smart) { + LocalDate parsed = LocalDate.parse(str, f); + assertEquals(parsed, expected); + } else { + try { + LocalDate.parse(str, f); + fail("Should have failed"); + } catch (DateTimeParseException ex) { + // expected + } + } + } + + @Test(dataProvider = "parseLenientWeek") + public void test_parse_parseLenientWeek_LENIENT(String str, LocalDate expected, boolean smart) { + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(IsoFields.WEEK_BASED_YEAR).appendLiteral(':') + .appendValue(IsoFields.WEEK_OF_WEEK_BASED_YEAR).appendLiteral(':') + .appendValue(DAY_OF_WEEK) + .toFormatter().withResolverStyle(ResolverStyle.LENIENT); + LocalDate parsed = LocalDate.parse(str, f); + assertEquals(parsed, expected); + } + //----------------------------------------------------------------------- public void test_loop() { // loop round at least one 400 year cycle, including before 1970 diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java b/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java index 94399e0fdd8..711792fbedb 100644 --- a/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java +++ b/jdk/test/java/time/tck/java/time/temporal/TCKJulianFields.java @@ -65,7 +65,9 @@ import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +import java.time.format.ResolverStyle; import java.time.temporal.ChronoField; +import java.time.temporal.IsoFields; import java.time.temporal.JulianFields; import java.time.temporal.TemporalField; @@ -125,6 +127,17 @@ public class TCKJulianFields extends AbstractTCKTest { assertSerializable(field); } + public void test_basics() { + assertEquals(JulianFields.JULIAN_DAY.isDateBased(), true); + assertEquals(JulianFields.JULIAN_DAY.isTimeBased(), false); + + assertEquals(JulianFields.MODIFIED_JULIAN_DAY.isDateBased(), true); + assertEquals(JulianFields.MODIFIED_JULIAN_DAY.isTimeBased(), false); + + assertEquals(JulianFields.RATA_DIE.isDateBased(), true); + assertEquals(JulianFields.RATA_DIE.isTimeBased(), false); + } + //----------------------------------------------------------------------- @Test(dataProvider="samples") public void test_samples_get(TemporalField field, LocalDate date, long expected) { @@ -142,8 +155,25 @@ public class TCKJulianFields extends AbstractTCKTest { //----------------------------------------------------------------------- @Test(dataProvider="samples") - public void test_samples_parse(TemporalField field, LocalDate date, long value) { - DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field).toFormatter(); + public void test_samples_parse_STRICT(TemporalField field, LocalDate date, long value) { + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field) + .toFormatter().withResolverStyle(ResolverStyle.STRICT); + LocalDate parsed = LocalDate.parse(Long.toString(value), f); + assertEquals(parsed, date); + } + + @Test(dataProvider="samples") + public void test_samples_parse_SMART(TemporalField field, LocalDate date, long value) { + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field) + .toFormatter().withResolverStyle(ResolverStyle.SMART); + LocalDate parsed = LocalDate.parse(Long.toString(value), f); + assertEquals(parsed, date); + } + + @Test(dataProvider="samples") + public void test_samples_parse_LENIENT(TemporalField field, LocalDate date, long value) { + DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field) + .toFormatter().withResolverStyle(ResolverStyle.LENIENT); LocalDate parsed = LocalDate.parse(Long.toString(value), f); assertEquals(parsed, date); } diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKDateTimeAdjusters.java b/jdk/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java similarity index 80% rename from jdk/test/java/time/tck/java/time/temporal/TCKDateTimeAdjusters.java rename to jdk/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java index 231a16b5674..66f129c0906 100644 --- a/jdk/test/java/time/tck/java/time/temporal/TCKDateTimeAdjusters.java +++ b/jdk/test/java/time/tck/java/time/temporal/TCKTemporalAdjusters.java @@ -59,8 +59,6 @@ */ package tck.java.time.temporal; -import java.time.temporal.*; - import static java.time.DayOfWeek.MONDAY; import static java.time.DayOfWeek.TUESDAY; import static java.time.Month.DECEMBER; @@ -74,30 +72,46 @@ import static org.testng.Assert.assertTrue; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.Month; +import java.time.temporal.TemporalAdjuster; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** - * Test Adjusters. + * Test TemporalAdjuster. */ @Test -public class TCKDateTimeAdjusters { +public class TCKTemporalAdjusters { + + //----------------------------------------------------------------------- + // ofDateAdjuster() + //----------------------------------------------------------------------- + @Test + public void factory_ofDateAdjuster() { + TemporalAdjuster test = TemporalAdjuster.ofDateAdjuster(date -> date.plusDays(2)); + assertEquals(LocalDate.of(2012, 6, 30).with(test), LocalDate.of(2012, 7, 2)); + } + + @Test(expectedExceptions = NullPointerException.class) + public void factory_ofDateAdjuster_null() { + TemporalAdjuster.ofDateAdjuster(null); + } + //----------------------------------------------------------------------- // firstDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_firstDayOfMonth() { - assertNotNull(Adjusters.firstDayOfMonth()); + assertNotNull(TemporalAdjuster.firstDayOfMonth()); } - @Test(groups={"tck"}) + @Test public void test_firstDayOfMonth_nonLeap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfMonth().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfMonth().adjustInto(date); assertEquals(test.getYear(), 2007); assertEquals(test.getMonth(), month); assertEquals(test.getDayOfMonth(), 1); @@ -105,12 +119,12 @@ public class TCKDateTimeAdjusters { } } - @Test(groups={"tck"}) + @Test public void test_firstDayOfMonth_leap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(true); i++) { LocalDate date = date(2008, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfMonth().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfMonth().adjustInto(date); assertEquals(test.getYear(), 2008); assertEquals(test.getMonth(), month); assertEquals(test.getDayOfMonth(), 1); @@ -121,17 +135,17 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // lastDayOfMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_lastDayOfMonth() { - assertNotNull(Adjusters.lastDayOfMonth()); + assertNotNull(TemporalAdjuster.lastDayOfMonth()); } - @Test(groups={"tck"}) + @Test public void test_lastDayOfMonth_nonLeap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); - LocalDate test = (LocalDate) Adjusters.lastDayOfMonth().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfMonth().adjustInto(date); assertEquals(test.getYear(), 2007); assertEquals(test.getMonth(), month); assertEquals(test.getDayOfMonth(), month.length(false)); @@ -139,12 +153,12 @@ public class TCKDateTimeAdjusters { } } - @Test(groups={"tck"}) + @Test public void test_lastDayOfMonth_leap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(true); i++) { LocalDate date = date(2008, month, i); - LocalDate test = (LocalDate) Adjusters.lastDayOfMonth().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfMonth().adjustInto(date); assertEquals(test.getYear(), 2008); assertEquals(test.getMonth(), month); assertEquals(test.getDayOfMonth(), month.length(true)); @@ -155,17 +169,17 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // firstDayOfNextMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_firstDayOfNextMonth() { - assertNotNull(Adjusters.firstDayOfNextMonth()); + assertNotNull(TemporalAdjuster.firstDayOfNextMonth()); } - @Test(groups={"tck"}) + @Test public void test_firstDayOfNextMonth_nonLeap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfNextMonth().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextMonth().adjustInto(date); assertEquals(test.getYear(), month == DECEMBER ? 2008 : 2007); assertEquals(test.getMonth(), month.plus(1)); assertEquals(test.getDayOfMonth(), 1); @@ -173,12 +187,12 @@ public class TCKDateTimeAdjusters { } } - @Test(groups={"tck"}) + @Test public void test_firstDayOfNextMonth_leap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(true); i++) { LocalDate date = date(2008, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfNextMonth().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextMonth().adjustInto(date); assertEquals(test.getYear(), month == DECEMBER ? 2009 : 2008); assertEquals(test.getMonth(), month.plus(1)); assertEquals(test.getDayOfMonth(), 1); @@ -189,17 +203,17 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // firstDayOfYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_firstDayOfYear() { - assertNotNull(Adjusters.firstDayOfYear()); + assertNotNull(TemporalAdjuster.firstDayOfYear()); } - @Test(groups={"tck"}) + @Test public void test_firstDayOfYear_nonLeap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfYear().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfYear().adjustInto(date); assertEquals(test.getYear(), 2007); assertEquals(test.getMonth(), Month.JANUARY); assertEquals(test.getDayOfMonth(), 1); @@ -207,12 +221,12 @@ public class TCKDateTimeAdjusters { } } - @Test(groups={"tck"}) + @Test public void test_firstDayOfYear_leap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(true); i++) { LocalDate date = date(2008, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfYear().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfYear().adjustInto(date); assertEquals(test.getYear(), 2008); assertEquals(test.getMonth(), Month.JANUARY); assertEquals(test.getDayOfMonth(), 1); @@ -223,17 +237,17 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // lastDayOfYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_lastDayOfYear() { - assertNotNull(Adjusters.lastDayOfYear()); + assertNotNull(TemporalAdjuster.lastDayOfYear()); } - @Test(groups={"tck"}) + @Test public void test_lastDayOfYear_nonLeap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); - LocalDate test = (LocalDate) Adjusters.lastDayOfYear().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfYear().adjustInto(date); assertEquals(test.getYear(), 2007); assertEquals(test.getMonth(), Month.DECEMBER); assertEquals(test.getDayOfMonth(), 31); @@ -241,12 +255,12 @@ public class TCKDateTimeAdjusters { } } - @Test(groups={"tck"}) + @Test public void test_lastDayOfYear_leap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(true); i++) { LocalDate date = date(2008, month, i); - LocalDate test = (LocalDate) Adjusters.lastDayOfYear().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.lastDayOfYear().adjustInto(date); assertEquals(test.getYear(), 2008); assertEquals(test.getMonth(), Month.DECEMBER); assertEquals(test.getDayOfMonth(), 31); @@ -257,17 +271,17 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // firstDayOfNextYear() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_firstDayOfNextYear() { - assertNotNull(Adjusters.firstDayOfNextYear()); + assertNotNull(TemporalAdjuster.firstDayOfNextYear()); } - @Test(groups={"tck"}) + @Test public void test_firstDayOfNextYear_nonLeap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfNextYear().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextYear().adjustInto(date); assertEquals(test.getYear(), 2008); assertEquals(test.getMonth(), JANUARY); assertEquals(test.getDayOfMonth(), 1); @@ -275,12 +289,12 @@ public class TCKDateTimeAdjusters { } } - @Test(groups={"tck"}) + @Test public void test_firstDayOfNextYear_leap() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(true); i++) { LocalDate date = date(2008, month, i); - LocalDate test = (LocalDate) Adjusters.firstDayOfNextYear().adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstDayOfNextYear().adjustInto(date); assertEquals(test.getYear(), 2009); assertEquals(test.getMonth(), JANUARY); assertEquals(test.getDayOfMonth(), 1); @@ -291,14 +305,14 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // dayOfWeekInMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_dayOfWeekInMonth() { - assertNotNull(Adjusters.dayOfWeekInMonth(1, MONDAY)); + assertNotNull(TemporalAdjuster.dayOfWeekInMonth(1, MONDAY)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_dayOfWeekInMonth_nullDayOfWeek() { - Adjusters.dayOfWeekInMonth(1, null); + TemporalAdjuster.dayOfWeekInMonth(1, null); } @DataProvider(name = "dayOfWeekInMonth_positive") @@ -319,12 +333,12 @@ public class TCKDateTimeAdjusters { }; } - @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_positive") + @Test(dataProvider = "dayOfWeekInMonth_positive") public void test_dayOfWeekInMonth_positive(int year, int month, DayOfWeek dow, LocalDate expected) { for (int ordinal = 1; ordinal <= 5; ordinal++) { for (int day = 1; day <= Month.of(month).length(false); day++) { LocalDate date = date(year, month, day); - LocalDate test = (LocalDate) Adjusters.dayOfWeekInMonth(ordinal, dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.dayOfWeekInMonth(ordinal, dow).adjustInto(date); assertEquals(test, expected.plusWeeks(ordinal - 1)); } } @@ -348,11 +362,11 @@ public class TCKDateTimeAdjusters { }; } - @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_zero") + @Test(dataProvider = "dayOfWeekInMonth_zero") public void test_dayOfWeekInMonth_zero(int year, int month, DayOfWeek dow, LocalDate expected) { for (int day = 1; day <= Month.of(month).length(false); day++) { LocalDate date = date(year, month, day); - LocalDate test = (LocalDate) Adjusters.dayOfWeekInMonth(0, dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.dayOfWeekInMonth(0, dow).adjustInto(date); assertEquals(test, expected); } } @@ -375,12 +389,12 @@ public class TCKDateTimeAdjusters { }; } - @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_negative") + @Test(dataProvider = "dayOfWeekInMonth_negative") public void test_dayOfWeekInMonth_negative(int year, int month, DayOfWeek dow, LocalDate expected) { for (int ordinal = 0; ordinal < 5; ordinal++) { for (int day = 1; day <= Month.of(month).length(false); day++) { LocalDate date = date(year, month, day); - LocalDate test = (LocalDate) Adjusters.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date); assertEquals(test, expected.minusWeeks(ordinal)); } } @@ -389,21 +403,21 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // firstInMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_firstInMonth() { - assertNotNull(Adjusters.firstInMonth(MONDAY)); + assertNotNull(TemporalAdjuster.firstInMonth(MONDAY)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_firstInMonth_nullDayOfWeek() { - Adjusters.firstInMonth(null); + TemporalAdjuster.firstInMonth(null); } - @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_positive") + @Test(dataProvider = "dayOfWeekInMonth_positive") public void test_firstInMonth(int year, int month, DayOfWeek dow, LocalDate expected) { for (int day = 1; day <= Month.of(month).length(false); day++) { LocalDate date = date(year, month, day); - LocalDate test = (LocalDate) Adjusters.firstInMonth(dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.firstInMonth(dow).adjustInto(date); assertEquals(test, expected, "day-of-month=" + day); } } @@ -411,21 +425,21 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // lastInMonth() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_lastInMonth() { - assertNotNull(Adjusters.lastInMonth(MONDAY)); + assertNotNull(TemporalAdjuster.lastInMonth(MONDAY)); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void factory_lastInMonth_nullDayOfWeek() { - Adjusters.lastInMonth(null); + TemporalAdjuster.lastInMonth(null); } - @Test(groups={"tck"}, dataProvider = "dayOfWeekInMonth_negative") + @Test(dataProvider = "dayOfWeekInMonth_negative") public void test_lastInMonth(int year, int month, DayOfWeek dow, LocalDate expected) { for (int day = 1; day <= Month.of(month).length(false); day++) { LocalDate date = date(year, month, day); - LocalDate test = (LocalDate) Adjusters.lastInMonth(dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.lastInMonth(dow).adjustInto(date); assertEquals(test, expected, "day-of-month=" + day); } } @@ -433,24 +447,24 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // next() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_next() { - assertNotNull(Adjusters.next(MONDAY)); + assertNotNull(TemporalAdjuster.next(MONDAY)); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void factory_next_nullDayOfWeek() { - Adjusters.next(null); + TemporalAdjuster.next(null); } - @Test(groups={"tck"}) + @Test public void test_next() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); for (DayOfWeek dow : DayOfWeek.values()) { - LocalDate test = (LocalDate) Adjusters.next(dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.next(dow).adjustInto(date); assertSame(test.getDayOfWeek(), dow, date + " " + test); @@ -472,24 +486,24 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // nextOrSame() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_nextOrCurrent() { - assertNotNull(Adjusters.nextOrSame(MONDAY)); + assertNotNull(TemporalAdjuster.nextOrSame(MONDAY)); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void factory_nextOrCurrent_nullDayOfWeek() { - Adjusters.nextOrSame(null); + TemporalAdjuster.nextOrSame(null); } - @Test(groups={"tck"}) + @Test public void test_nextOrCurrent() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); for (DayOfWeek dow : DayOfWeek.values()) { - LocalDate test = (LocalDate) Adjusters.nextOrSame(dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.nextOrSame(dow).adjustInto(date); assertSame(test.getDayOfWeek(), dow); @@ -513,24 +527,24 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // previous() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_previous() { - assertNotNull(Adjusters.previous(MONDAY)); + assertNotNull(TemporalAdjuster.previous(MONDAY)); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void factory_previous_nullDayOfWeek() { - Adjusters.previous(null); + TemporalAdjuster.previous(null); } - @Test(groups={"tck"}) + @Test public void test_previous() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); for (DayOfWeek dow : DayOfWeek.values()) { - LocalDate test = (LocalDate) Adjusters.previous(dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.previous(dow).adjustInto(date); assertSame(test.getDayOfWeek(), dow, date + " " + test); @@ -552,24 +566,24 @@ public class TCKDateTimeAdjusters { //----------------------------------------------------------------------- // previousOrSame() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void factory_previousOrCurrent() { - assertNotNull(Adjusters.previousOrSame(MONDAY)); + assertNotNull(TemporalAdjuster.previousOrSame(MONDAY)); } - @Test(expectedExceptions = NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions = NullPointerException.class) public void factory_previousOrCurrent_nullDayOfWeek() { - Adjusters.previousOrSame(null); + TemporalAdjuster.previousOrSame(null); } - @Test(groups={"tck"}) + @Test public void test_previousOrCurrent() { for (Month month : Month.values()) { for (int i = 1; i <= month.length(false); i++) { LocalDate date = date(2007, month, i); for (DayOfWeek dow : DayOfWeek.values()) { - LocalDate test = (LocalDate) Adjusters.previousOrSame(dow).adjustInto(date); + LocalDate test = (LocalDate) TemporalAdjuster.previousOrSame(dow).adjustInto(date); assertSame(test.getDayOfWeek(), dow); diff --git a/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java b/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java index 76789cd00a2..748b5283068 100644 --- a/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java +++ b/jdk/test/java/time/tck/java/time/temporal/TCKWeekFields.java @@ -61,6 +61,7 @@ import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.YEAR; + import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertSame; @@ -69,6 +70,8 @@ import java.time.DayOfWeek; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; +import java.time.temporal.ChronoUnit; +import java.time.temporal.JulianFields; import java.time.temporal.TemporalField; import java.time.temporal.ValueRange; import java.time.temporal.WeekFields; @@ -91,6 +94,26 @@ public class TCKWeekFields extends AbstractTCKTest { assertSame(WeekFields.of(firstDayOfWeek, minDays), week); } + //----------------------------------------------------------------------- + @Test(dataProvider="weekFields") + public void test_basics(DayOfWeek firstDayOfWeek, int minDays) { + WeekFields week = WeekFields.of(firstDayOfWeek, minDays); + assertEquals(week.dayOfWeek().isDateBased(), true); + assertEquals(week.dayOfWeek().isTimeBased(), false); + + assertEquals(week.weekOfMonth().isDateBased(), true); + assertEquals(week.weekOfMonth().isTimeBased(), false); + + assertEquals(week.weekOfYear().isDateBased(), true); + assertEquals(week.weekOfYear().isTimeBased(), false); + + assertEquals(week.weekOfWeekBasedYear().isDateBased(), true); + assertEquals(week.weekOfWeekBasedYear().isTimeBased(), false); + + assertEquals(week.weekBasedYear().isDateBased(), true); + assertEquals(week.weekBasedYear().isTimeBased(), false); + } + //----------------------------------------------------------------------- @Test public void test_dayOfWeekField_simpleGet() { @@ -124,10 +147,8 @@ public class TCKWeekFields extends AbstractTCKTest { LocalDate day = LocalDate.of(2000, 1, 10); // Known to be ISO Monday WeekFields week = WeekFields.of(firstDayOfWeek, minDays); TemporalField f = week.dayOfWeek(); - //System.out.printf(" Week: %s; field: %s%n", week, f); for (int i = 1; i <= 7; i++) { - //System.out.printf(" ISO Dow: %s, WeekDOW ordinal: %s%n", day.getDayOfWeek(), day.get(f)); assertEquals(day.get(f), (7 + day.getDayOfWeek().getValue() - firstDayOfWeek.getValue()) % 7 + 1); day = day.plusDays(1); } @@ -139,7 +160,6 @@ public class TCKWeekFields extends AbstractTCKTest { WeekFields week = WeekFields.of(firstDayOfWeek, minDays); TemporalField dowField = week.dayOfWeek(); TemporalField womField = week.weekOfMonth(); - //System.err.printf("%n Week: %s; dowField: %s, domField: %s%n", week, dowField, womField); DayOfWeek isoDOW = day.getDayOfWeek(); int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1; @@ -152,23 +172,17 @@ public class TCKWeekFields extends AbstractTCKTest { // to reconstruct the same date. LocalDate day1 = day.withDayOfMonth(1); int offset = - (day1.get(dowField) - 1); - //System.err.printf(" refDay: %s%n", day1.plusDays(offset)); + int week1 = day1.get(womField); if (week1 == 0) { // week of the 1st is partial; start with first full week offset += 7; } - //System.err.printf(" refDay2: %s, offset: %d, week1: %d%n", day1.plusDays(offset), offset, week1); + offset += actualDOW - 1; - //System.err.printf(" refDay3: %s%n", day1.plusDays(offset)); offset += (actualWOM - 1) * 7; - //System.err.printf(" refDay4: %s%n", day1.plusDays(offset)); LocalDate result = day1.plusDays(offset); - if (!day.equals(result)) { - System.err.printf("FAIL ISO Dow: %s, offset: %s, actualDOW: %s, actualWOM: %s, expected: %s, result: %s%n", - day.getDayOfWeek(), offset, actualDOW, actualWOM, day, result); - } assertEquals(result, day, "Incorrect dayOfWeek or weekOfMonth: " + String.format("%s, ISO Dow: %s, offset: %s, actualDOW: %s, actualWOM: %s, expected: %s, result: %s%n", week, day.getDayOfWeek(), offset, actualDOW, actualWOM, day, result)); @@ -182,7 +196,6 @@ public class TCKWeekFields extends AbstractTCKTest { WeekFields week = WeekFields.of(firstDayOfWeek, minDays); TemporalField dowField = week.dayOfWeek(); TemporalField woyField = week.weekOfYear(); - //System.err.printf("%n Year: %s; dowField: %s, woyField: %s%n", week, dowField, woyField); DayOfWeek isoDOW = day.getDayOfWeek(); int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1; @@ -195,24 +208,15 @@ public class TCKWeekFields extends AbstractTCKTest { // to reconstruct the same date. LocalDate day1 = day.withDayOfYear(1); int offset = - (day1.get(dowField) - 1); - //System.err.printf(" refDay: %s%n", day1.plusDays(offset)); int week1 = day1.get(woyField); if (week1 == 0) { // week of the 1st is partial; start with first full week offset += 7; } - //System.err.printf(" refDay2: %s, offset: %d, week1: %d%n", day1.plusDays(offset), offset, week1); offset += actualDOW - 1; - //System.err.printf(" refDay3: %s%n", day1.plusDays(offset)); offset += (actualWOY - 1) * 7; - //System.err.printf(" refDay4: %s%n", day1.plusDays(offset)); LocalDate result = day1.plusDays(offset); - - if (!day.equals(result)) { - System.err.printf("FAIL ISO Dow: %s, offset: %s, actualDOW: %s, actualWOY: %s, expected: %s, result: %s%n", - day.getDayOfWeek(), offset, actualDOW, actualWOY, day, result); - } assertEquals(result, day, "Incorrect dayOfWeek or weekOfYear " + String.format("%s, ISO Dow: %s, offset: %s, actualDOW: %s, actualWOM: %s, expected: %s, result: %s%n", week, day.getDayOfWeek(), offset, actualDOW, actualWOY, day, result)); @@ -220,6 +224,48 @@ public class TCKWeekFields extends AbstractTCKTest { } } + /** + * Verify that the date can be reconstructed from the DOW, WeekOfWeekBasedYear, + * and WeekBasedYear for every combination of start of week + * and minimal days in week. + * @param firstDayOfWeek the first day of the week + * @param minDays the minimum number of days in the week + */ + @Test(dataProvider="weekFields") + public void test_weekOfWeekBasedYearField(DayOfWeek firstDayOfWeek, int minDays) { + LocalDate day = LocalDate.of(2012, 12, 31); // Known to be ISO Monday + WeekFields weekDef = WeekFields.of(firstDayOfWeek, minDays); + TemporalField dowField = weekDef.dayOfWeek(); + TemporalField wowbyField = weekDef.weekOfWeekBasedYear(); + TemporalField yowbyField = weekDef.weekBasedYear(); + + for (int i = 1; i <= 15; i++) { + int actualDOW = day.get(dowField); + int actualWOWBY = day.get(wowbyField); + int actualYOWBY = day.get(yowbyField); + + // Verify that the combination of day of week and week of month can be used + // to reconstruct the same date. + LocalDate day1 = LocalDate.of(actualYOWBY, 1, 1); + DayOfWeek isoDOW = day1.getDayOfWeek(); + int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1; + + int weekStart = Math.floorMod(1 - dow, 7); + if (weekStart + 1 > weekDef.getMinimalDaysInFirstWeek()) { + // The previous week has the minimum days in the current month to be a 'week' + weekStart -= 7; + } + weekStart += actualDOW - 1; + weekStart += (actualWOWBY - 1) * 7; + LocalDate result = day1.plusDays(weekStart); + + assertEquals(result, day, "Incorrect dayOfWeek or weekOfYear " + + String.format("%s, ISO Dow: %s, weekStart: %s, actualDOW: %s, actualWOWBY: %s, YearOfWBY: %d, expected day: %s, result: %s%n", + weekDef, day.getDayOfWeek(), weekStart, actualDOW, actualWOWBY, actualYOWBY, day, result)); + day = day.plusDays(1); + } + } + @Test(dataProvider="weekFields") public void test_fieldRanges(DayOfWeek firstDayOfWeek, int minDays) { WeekFields weekDef = WeekFields.of(firstDayOfWeek, minDays); @@ -272,24 +318,63 @@ public class TCKWeekFields extends AbstractTCKTest { int woy = day.get(woyField); for (int dow = 1; dow <= 7; dow++) { LocalDate result = day.with(dowField, dow); - if (result.get(dowField) != dow) { - System.err.printf(" DOW actual: %d, expected: %d, week:%s%n", - result.get(dowField), dow, week); - } - if (result.get(womField) != wom) { - System.err.printf(" WOM actual: %d, expected: %d, week:%s%n", - result.get(womField), wom, week); - } - if (result.get(woyField) != woy) { - System.err.printf(" WOY actual: %d, expected: %d, week:%s%n", - result.get(woyField), woy, week); - } assertEquals(result.get(dowField), dow, String.format("Incorrect new Day of week: %s", result)); assertEquals(result.get(womField), wom, "Week of Month should not change"); assertEquals(result.get(woyField), woy, "Week of Year should not change"); } } + @Test(dataProvider="weekFields") + public void test_rangeWeekOfWeekBasedYear(DayOfWeek firstDayOfWeek, int minDays) { + WeekFields weekFields = WeekFields.of(firstDayOfWeek, minDays); + TemporalField dowField = weekFields.dayOfWeek(); + TemporalField wowByField = weekFields.weekOfWeekBasedYear(); + + LocalDate day1 = LocalDate.of(2012, 1, weekFields.getMinimalDaysInFirstWeek()); + day1 = day1.with(wowByField, 1).with(dowField, 1); + + LocalDate day2 = LocalDate.of(2013, 1, weekFields.getMinimalDaysInFirstWeek()); + day2 = day2.with(wowByField, 1).with(dowField, 1); + + int expectedWeeks = (int)ChronoUnit.DAYS.between(day1, day2) / 7; + + ValueRange range = day1.range(wowByField); + assertEquals(range.getMaximum(), expectedWeeks, "Range incorrect"); + } + + @Test(dataProvider="weekFields") + public void test_withWeekOfWeekBasedYear(DayOfWeek firstDayOfWeek, int minDays) { + LocalDate day = LocalDate.of(2012, 12, 31); + WeekFields week = WeekFields.of(firstDayOfWeek, minDays); + TemporalField dowField = week.dayOfWeek(); + TemporalField wowbyField = week.weekOfWeekBasedYear(); + TemporalField yowbyField = week.weekBasedYear(); + + int dowExpected = (day.get(dowField) - 1) % 7 + 1; + LocalDate dowDate = day.with(dowField, dowExpected); + int dowResult = dowDate.get(dowField); + assertEquals(dowResult, dowExpected, "Localized DayOfWeek not correct; " + day + " -->" + dowDate); + + int weekExpected = day.get(wowbyField) + 1; + ValueRange range = day.range(wowbyField); + weekExpected = ((weekExpected - 1) % (int)range.getMaximum()) + 1; + LocalDate weekDate = day.with(wowbyField, weekExpected); + int weekResult = weekDate.get(wowbyField); + assertEquals(weekResult, weekExpected, "Localized WeekOfWeekBasedYear not correct; " + day + " -->" + weekDate); + + int yearExpected = day.get(yowbyField) + 1; + + LocalDate yearDate = day.with(yowbyField, yearExpected); + int yearResult = yearDate.get(yowbyField); + assertEquals(yearResult, yearExpected, "Localized WeekBasedYear not correct; " + day + " --> " + yearDate); + + range = yearDate.range(wowbyField); + weekExpected = Math.min(day.get(wowbyField), (int)range.getMaximum()); + + int weekActual = yearDate.get(wowbyField); + assertEquals(weekActual, weekExpected, "Localized WeekOfWeekBasedYear week should not change; " + day + " --> " + yearDate + ", actual: " + weekActual + ", weekExpected: " + weekExpected); + } + //----------------------------------------------------------------------- @Test(dataProvider="weekFields") public void test_parse_resolve_localizedWom(DayOfWeek firstDayOfWeek, int minDays) { @@ -381,6 +466,29 @@ public class TCKWeekFields extends AbstractTCKTest { } } + @Test(dataProvider="weekFields") + public void test_parse_resolve_localizedWoWBY(DayOfWeek firstDayOfWeek, int minDays) { + LocalDate date = LocalDate.of(2012, 12, 31); + WeekFields week = WeekFields.of(firstDayOfWeek, minDays); + TemporalField dowField = week.dayOfWeek(); + TemporalField wowbyField = week.weekOfWeekBasedYear(); + TemporalField yowbyField = week.weekBasedYear(); + + for (int i = 1; i <= 60; i++) { + // Test that with dayOfWeek, week of year and year of week-based-year it computes the date + DateTimeFormatter f = new DateTimeFormatterBuilder() + .appendValue(yowbyField).appendLiteral('-') + .appendValue(wowbyField).appendLiteral('-') + .appendValue(dowField).toFormatter(); + String str = date.get(yowbyField) + "-" + date.get(wowbyField) + "-" + + date.get(dowField); + LocalDate parsed = LocalDate.parse(str, f); + assertEquals(parsed, date, " :: " + str + " " + i); + + date = date.plusDays(1); + } + } + //----------------------------------------------------------------------- @Test(dataProvider="weekFields") public void test_serializable_singleton(DayOfWeek firstDayOfWeek, int minDays) throws IOException, ClassNotFoundException { @@ -401,4 +509,67 @@ public class TCKWeekFields extends AbstractTCKTest { return objects; } + //----------------------------------------------------------------------- + @DataProvider(name="WeekBasedYearData") + Object[][] provider_WeekBasedYearData() { + return new Object[][] { + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2008, 52, 7, LocalDate.of(2008, 12, 27)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 1, 1, LocalDate.of(2008, 12, 28)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 1, 2, LocalDate.of(2008, 12, 29)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 1, 3, LocalDate.of(2008, 12, 30)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 1, 4, LocalDate.of(2008, 12, 31)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 1, 5, LocalDate.of(2009, 1, 1)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 2, 1, LocalDate.of(2009, 1, 4)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 2, 2, LocalDate.of(2009, 1, 5)}, + {WeekFields.of(DayOfWeek.SUNDAY, 1), 2009, 2, 3, LocalDate.of(2009, 1, 6)}, + }; + } + + @Test(dataProvider="WeekBasedYearData") + public void test_weekBasedYears(WeekFields weekDef, int weekBasedYear, + int weekOfWeekBasedYear, int dayOfWeek, LocalDate date) { + TemporalField dowField = weekDef.dayOfWeek(); + TemporalField wowbyField = weekDef.weekOfWeekBasedYear(); + TemporalField yowbyField = weekDef.weekBasedYear(); + assertEquals(date.get(dowField), dayOfWeek, "DayOfWeek mismatch"); + assertEquals(date.get(wowbyField), weekOfWeekBasedYear, "Week of WeekBasedYear mismatch"); + assertEquals(date.get(yowbyField), weekBasedYear, "Year of WeekBasedYear mismatch"); + } + + + //----------------------------------------------------------------------- + @DataProvider(name="IsoWeekData") + Object[][] data_week() { + return new Object[][] { + {LocalDate.of(1969, 12, 29), DayOfWeek.MONDAY, 1, 1970}, + {LocalDate.of(2012, 12, 23), DayOfWeek.SUNDAY, 51, 2012}, + {LocalDate.of(2012, 12, 24), DayOfWeek.MONDAY, 52, 2012}, + {LocalDate.of(2012, 12, 27), DayOfWeek.THURSDAY, 52, 2012}, + {LocalDate.of(2012, 12, 28), DayOfWeek.FRIDAY, 52, 2012}, + {LocalDate.of(2012, 12, 29), DayOfWeek.SATURDAY, 52, 2012}, + {LocalDate.of(2012, 12, 30), DayOfWeek.SUNDAY, 52, 2012}, + {LocalDate.of(2012, 12, 31), DayOfWeek.MONDAY, 1, 2013}, + {LocalDate.of(2013, 1, 1), DayOfWeek.TUESDAY, 1, 2013}, + {LocalDate.of(2013, 1, 2), DayOfWeek.WEDNESDAY, 1, 2013}, + {LocalDate.of(2013, 1, 6), DayOfWeek.SUNDAY, 1, 2013}, + {LocalDate.of(2013, 1, 7), DayOfWeek.MONDAY, 2, 2013}, + }; + } + + //----------------------------------------------------------------------- + // WEEK_OF_WEEK_BASED_YEAR + // Validate with the same data used by IsoFields. + //----------------------------------------------------------------------- + @Test(dataProvider="IsoWeekData") + public void test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) { + WeekFields weekDef = WeekFields.ISO; + TemporalField dowField = weekDef.dayOfWeek(); + TemporalField wowbyField = weekDef.weekOfWeekBasedYear(); + TemporalField yowbyField = weekDef.weekBasedYear(); + + assertEquals(date.get(dowField), dow.getValue()); + assertEquals(date.get(wowbyField), week); + assertEquals(date.get(yowbyField), wby); + } + } diff --git a/jdk/test/java/time/tck/java/time/temporal/TestChronoLocalDate.java b/jdk/test/java/time/tck/java/time/temporal/TestChronoLocalDate.java deleted file mode 100644 index 6d156839dc8..00000000000 --- a/jdk/test/java/time/tck/java/time/temporal/TestChronoLocalDate.java +++ /dev/null @@ -1,503 +0,0 @@ -/* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -/* - * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos - * - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * * Neither the name of JSR-310 nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package tck.java.time.temporal; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertTrue; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.time.Duration; -import java.time.LocalDate; -import java.time.chrono.Chronology; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.IsoChronology; -import java.time.temporal.ChronoUnit; -import java.time.temporal.Temporal; -import java.time.temporal.TemporalAccessor; -import java.time.temporal.TemporalAdjuster; -import java.time.temporal.TemporalAmount; -import java.time.temporal.TemporalField; -import java.time.temporal.TemporalUnit; -import java.time.temporal.ValueRange; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.testng.Assert; -import org.testng.annotations.DataProvider; -import org.testng.annotations.Test; - -/** - * Test assertions that must be true for the built-in ISO chronology. - */ -@Test -public class TestChronoLocalDate { - - //----------------------------------------------------------------------- - // regular data factory for names and descriptions of ISO calendar - //----------------------------------------------------------------------- - @DataProvider(name = "calendars") - Chronology[][] data_of_calendars() { - return new Chronology[][]{ - {IsoChronology.INSTANCE}, - }; - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badWithAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDate date = chrono.date(refDate); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDate date2 = chrono2.date(refDate); - TemporalAdjuster adjuster = new FixedAdjuster(date2); - if (chrono != chrono2) { - try { - date.with(adjuster); - Assert.fail("WithAdjuster should have thrown a ClassCastException"); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDate result = date.with(adjuster); - assertEquals(result, date2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badPlusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDate date = chrono.date(refDate); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDate date2 = chrono2.date(refDate); - TemporalAmount adjuster = new FixedAdjuster(date2); - if (chrono != chrono2) { - try { - date.plus(adjuster); - Assert.fail("WithAdjuster should have thrown a ClassCastException"); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDate result = date.plus(adjuster); - assertEquals(result, date2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badMinusAdjusterChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDate date = chrono.date(refDate); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDate date2 = chrono2.date(refDate); - TemporalAmount adjuster = new FixedAdjuster(date2); - if (chrono != chrono2) { - try { - date.minus(adjuster); - Assert.fail("WithAdjuster should have thrown a ClassCastException"); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDate result = date.minus(adjuster); - assertEquals(result, date2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badPlusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDate date = chrono.date(refDate); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDate date2 = chrono2.date(refDate); - TemporalUnit adjuster = new FixedTemporalUnit(date2); - if (chrono != chrono2) { - try { - date.plus(1, adjuster); - Assert.fail("TemporalUnit.doPlus plus should have thrown a ClassCastException" + date.getClass() - + ", can not be cast to " + date2.getClass()); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDate result = date.plus(1, adjuster); - assertEquals(result, date2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badMinusTemporalUnitChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDate date = chrono.date(refDate); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDate date2 = chrono2.date(refDate); - TemporalUnit adjuster = new FixedTemporalUnit(date2); - if (chrono != chrono2) { - try { - date.minus(1, adjuster); - Assert.fail("TemporalUnit.doPlus minus should have thrown a ClassCastException" + date.getClass() - + ", can not be cast to " + date2.getClass()); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDate result = date.minus(1, adjuster); - assertEquals(result, date2, "WithAdjuster failed to replace date"); - } - } - } - - @Test(groups={"tck"}, dataProvider="calendars") - public void test_badTemporalFieldChrono(Chronology chrono) { - LocalDate refDate = LocalDate.of(1900, 1, 1); - ChronoLocalDate date = chrono.date(refDate); - for (Chronology[] clist : data_of_calendars()) { - Chronology chrono2 = clist[0]; - ChronoLocalDate date2 = chrono2.date(refDate); - TemporalField adjuster = new FixedTemporalField(date2); - if (chrono != chrono2) { - try { - date.with(adjuster, 1); - Assert.fail("TemporalField doWith() should have thrown a ClassCastException" + date.getClass() - + ", can not be cast to " + date2.getClass()); - } catch (ClassCastException cce) { - // Expected exception; not an error - } - } else { - // Same chronology, - ChronoLocalDate result = date.with(adjuster, 1); - assertEquals(result, date2, "TemporalField doWith() failed to replace date"); - } - } - } - - //----------------------------------------------------------------------- - // isBefore, isAfter, isEqual, DATE_COMPARATOR - //----------------------------------------------------------------------- - @Test(groups={"tck"}, dataProvider="calendars") - public void test_date_comparisons(Chronology chrono) { - List dates = new ArrayList<>(); - - ChronoLocalDate date = chrono.date(LocalDate.of(1900, 1, 1)); - - // Insert dates in order, no duplicates - dates.add(date.minus(1000, ChronoUnit.YEARS)); - dates.add(date.minus(100, ChronoUnit.YEARS)); - dates.add(date.minus(10, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.MONTHS)); - dates.add(date.minus(1, ChronoUnit.WEEKS)); - dates.add(date.minus(1, ChronoUnit.DAYS)); - dates.add(date); - dates.add(date.plus(1, ChronoUnit.DAYS)); - dates.add(date.plus(1, ChronoUnit.WEEKS)); - dates.add(date.plus(1, ChronoUnit.MONTHS)); - dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(10, ChronoUnit.YEARS)); - dates.add(date.plus(100, ChronoUnit.YEARS)); - dates.add(date.plus(1000, ChronoUnit.YEARS)); - - // Check these dates against the corresponding dates for every calendar - for (Chronology[] clist : data_of_calendars()) { - List otherDates = new ArrayList<>(); - Chronology chrono2 = clist[0]; - for (ChronoLocalDate d : dates) { - otherDates.add(chrono2.date(d)); - } - - // Now compare the sequence of original dates with the sequence of converted dates - for (int i = 0; i < dates.size(); i++) { - ChronoLocalDate a = dates.get(i); - for (int j = 0; j < otherDates.size(); j++) { - ChronoLocalDate b = otherDates.get(j); - int cmp = ChronoLocalDate.DATE_COMPARATOR.compare(a, b); - if (i < j) { - assertTrue(cmp < 0, a + " compare " + b); - assertEquals(a.isBefore(b), true, a + " isBefore " + b); - assertEquals(a.isAfter(b), false, a + " isAfter " + b); - assertEquals(a.isEqual(b), false, a + " isEqual " + b); - } else if (i > j) { - assertTrue(cmp > 0, a + " compare " + b); - assertEquals(a.isBefore(b), false, a + " isBefore " + b); - assertEquals(a.isAfter(b), true, a + " isAfter " + b); - assertEquals(a.isEqual(b), false, a + " isEqual " + b); - } else { - assertTrue(cmp == 0, a + " compare " + b); - assertEquals(a.isBefore(b), false, a + " isBefore " + b); - assertEquals(a.isAfter(b), false, a + " isAfter " + b); - assertEquals(a.isEqual(b), true, a + " isEqual " + b); - } - } - } - } - } - - public void test_date_comparator_checkGenerics_ISO() { - List dates = new ArrayList<>(); - LocalDate date = LocalDate.of(1900, 1, 1); - - // Insert dates in order, no duplicates - dates.add(date.minus(10, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.MONTHS)); - dates.add(date.minus(1, ChronoUnit.WEEKS)); - dates.add(date.minus(1, ChronoUnit.DAYS)); - dates.add(date); - dates.add(date.plus(1, ChronoUnit.DAYS)); - dates.add(date.plus(1, ChronoUnit.WEEKS)); - dates.add(date.plus(1, ChronoUnit.MONTHS)); - dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(10, ChronoUnit.YEARS)); - - List copy = new ArrayList<>(dates); - Collections.shuffle(copy); - Collections.sort(copy, ChronoLocalDate.DATE_COMPARATOR); - assertEquals(copy, dates); - assertTrue(ChronoLocalDate.DATE_COMPARATOR.compare(copy.get(0), copy.get(1)) < 0); - } - - public void test_date_comparator_checkGenerics_LocalDate() { - List dates = new ArrayList<>(); - LocalDate date = LocalDate.of(1900, 1, 1); - - // Insert dates in order, no duplicates - dates.add(date.minus(10, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.YEARS)); - dates.add(date.minus(1, ChronoUnit.MONTHS)); - dates.add(date.minus(1, ChronoUnit.WEEKS)); - dates.add(date.minus(1, ChronoUnit.DAYS)); - dates.add(date); - dates.add(date.plus(1, ChronoUnit.DAYS)); - dates.add(date.plus(1, ChronoUnit.WEEKS)); - dates.add(date.plus(1, ChronoUnit.MONTHS)); - dates.add(date.plus(1, ChronoUnit.YEARS)); - dates.add(date.plus(10, ChronoUnit.YEARS)); - - List copy = new ArrayList<>(dates); - Collections.shuffle(copy); - Collections.sort(copy, ChronoLocalDate.DATE_COMPARATOR); - assertEquals(copy, dates); - assertTrue(ChronoLocalDate.DATE_COMPARATOR.compare(copy.get(0), copy.get(1)) < 0); - } - - //----------------------------------------------------------------------- - // Test Serialization of ISO via chrono API - //----------------------------------------------------------------------- - @Test( groups={"tck"}, dataProvider="calendars") - public void test_ChronoSerialization(Chronology chrono) throws Exception { - LocalDate ref = LocalDate.of(2000, 1, 5); - ChronoLocalDate orginal = chrono.date(ref); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - ObjectOutputStream out = new ObjectOutputStream(baos); - out.writeObject(orginal); - out.close(); - ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); - ObjectInputStream in = new ObjectInputStream(bais); - @SuppressWarnings("unchecked") - ChronoLocalDate ser = (ChronoLocalDate) in.readObject(); - assertEquals(ser, orginal, "deserialized date is wrong"); - } - - /** - * FixedAdjusted returns a fixed Temporal in all adjustments. - * Construct an adjuster with the Temporal that should be returned from adjust. - */ - static class FixedAdjuster implements TemporalAdjuster, TemporalAmount { - private Temporal datetime; - - FixedAdjuster(Temporal datetime) { - this.datetime = datetime; - } - - @Override - public Temporal adjustInto(Temporal ignore) { - return datetime; - } - - @Override - public Temporal addTo(Temporal ignore) { - return datetime; - } - - @Override - public Temporal subtractFrom(Temporal ignore) { - return datetime; - } - - @Override - public long get(TemporalUnit unit) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public List getUnits() { - throw new UnsupportedOperationException("Not supported yet."); - } - - } - - /** - * FixedTemporalUnit returns a fixed Temporal in all adjustments. - * Construct an FixedTemporalUnit with the Temporal that should be returned from addTo. - */ - static class FixedTemporalUnit implements TemporalUnit { - private Temporal temporal; - - FixedTemporalUnit(Temporal temporal) { - this.temporal = temporal; - } - - @Override - public String getName() { - return "FixedTemporalUnit"; - } - - @Override - public Duration getDuration() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isDurationEstimated() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isSupportedBy(Temporal temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @SuppressWarnings("unchecked") - @Override - public R addTo(R temporal, long amount) { - return (R) this.temporal; - } - - @Override - public long between(Temporal temporal1, Temporal temporal2) { - throw new UnsupportedOperationException("Not supported yet."); - } - } - - /** - * FixedTemporalField returns a fixed Temporal in all adjustments. - * Construct an FixedTemporalField with the Temporal that should be returned from adjustInto. - */ - static class FixedTemporalField implements TemporalField { - private Temporal temporal; - FixedTemporalField(Temporal temporal) { - this.temporal = temporal; - } - - @Override - public String getName() { - return "FixedTemporalField"; - } - - @Override - public TemporalUnit getBaseUnit() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public TemporalUnit getRangeUnit() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public ValueRange range() { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public boolean isSupportedBy(TemporalAccessor temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public ValueRange rangeRefinedBy(TemporalAccessor temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @Override - public long getFrom(TemporalAccessor temporal) { - throw new UnsupportedOperationException("Not supported yet."); - } - - @SuppressWarnings("unchecked") - @Override - public R adjustInto(R temporal, long newValue) { - return (R) this.temporal; - } - } -} diff --git a/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java b/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java index 3cf6053a2da..418d1ad9ec2 100644 --- a/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java +++ b/jdk/test/java/time/tck/java/time/zone/TCKFixedZoneRules.java @@ -65,7 +65,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; - import java.time.Duration; import java.time.Instant; import java.time.LocalDateTime; @@ -108,7 +107,7 @@ public class TCKFixedZoneRules { //----------------------------------------------------------------------- // Basics //----------------------------------------------------------------------- - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_serialization(ZoneRules test, ZoneOffset expectedOffset) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); @@ -127,19 +126,19 @@ public class TCKFixedZoneRules { //----------------------------------------------------------------------- // basics //----------------------------------------------------------------------- - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getOffset_Instant(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getOffset(INSTANT), expectedOffset); assertEquals(test.getOffset((Instant) null), expectedOffset); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getOffset_LocalDateTime(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getOffset(LDT), expectedOffset); assertEquals(test.getOffset((LocalDateTime) null), expectedOffset); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getValidOffsets_LDT(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getValidOffsets(LDT).size(), 1); assertEquals(test.getValidOffsets(LDT).get(0), expectedOffset); @@ -147,13 +146,13 @@ public class TCKFixedZoneRules { assertEquals(test.getValidOffsets(null).get(0), expectedOffset); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getTransition_LDT(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getTransition(LDT), null); assertEquals(test.getTransition(null), null); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_isValidOffset_LDT_ZO(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.isValidOffset(LDT, expectedOffset), true); assertEquals(test.isValidOffset(LDT, ZoneOffset.UTC), false); @@ -164,55 +163,55 @@ public class TCKFixedZoneRules { assertEquals(test.isValidOffset(null, null), false); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getStandardOffset_Instant(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getStandardOffset(INSTANT), expectedOffset); assertEquals(test.getStandardOffset(null), expectedOffset); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getDaylightSavings_Instant(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getDaylightSavings(INSTANT), Duration.ZERO); assertEquals(test.getDaylightSavings(null), Duration.ZERO); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_isDaylightSavings_Instant(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.isDaylightSavings(INSTANT), false); assertEquals(test.isDaylightSavings(null), false); } //------------------------------------------------------------------------- - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_nextTransition_Instant(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.nextTransition(INSTANT), null); assertEquals(test.nextTransition(null), null); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_previousTransition_Instant(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.previousTransition(INSTANT), null); assertEquals(test.previousTransition(null), null); } //------------------------------------------------------------------------- - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getTransitions(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getTransitions().size(), 0); } - @Test(expectedExceptions=UnsupportedOperationException.class, groups="tck") + @Test(expectedExceptions=UnsupportedOperationException.class) public void test_getTransitions_immutable() { ZoneRules test = make(OFFSET_PTWO); test.getTransitions().add(ZoneOffsetTransition.of(LDT, OFFSET_PONE, OFFSET_PTWO)); } - @Test(groups="tck", dataProvider="rules") + @Test(dataProvider="rules") public void test_getTransitionRules(ZoneRules test, ZoneOffset expectedOffset) { assertEquals(test.getTransitionRules().size(), 0); } - @Test(expectedExceptions=UnsupportedOperationException.class, groups="tck") + @Test(expectedExceptions=UnsupportedOperationException.class) public void test_getTransitionRules_immutable() { ZoneRules test = make(OFFSET_PTWO); test.getTransitionRules().add(ZoneOffsetTransitionRule.of(Month.JULY, 2, null, LocalTime.of(12, 30), false, TimeDefinition.STANDARD, OFFSET_PONE, OFFSET_PTWO, OFFSET_PONE)); @@ -221,7 +220,7 @@ public class TCKFixedZoneRules { //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- - @Test(groups="tck") + @Test public void test_equalsHashCode() { ZoneRules a = make(OFFSET_PONE); ZoneRules b = make(OFFSET_PTWO); diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java index f98b82f1f18..c5da309d872 100644 --- a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java +++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransition.java @@ -62,13 +62,14 @@ package tck.java.time.zone; import static java.time.temporal.ChronoUnit.HOURS; import static org.testng.Assert.assertEquals; -import tck.java.time.AbstractTCKTest; import java.time.Duration; import java.time.LocalDateTime; -import java.time.ZoneOffset; import java.time.Year; +import java.time.ZoneOffset; import java.time.zone.ZoneOffsetTransition; + import org.testng.annotations.Test; +import tck.java.time.AbstractTCKTest; /** * Test ZoneOffsetTransition. @@ -85,27 +86,27 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // factory //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullTransition() { ZoneOffsetTransition.of(null, OFFSET_0100, OFFSET_0200); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullOffsetBefore() { ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), null, OFFSET_0200); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullOffsetAfter() { ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, null); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_factory_sameOffset() { ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30), OFFSET_0200, OFFSET_0200); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_factory_noNanos() { ZoneOffsetTransition.of(LocalDateTime.of(2010, 12, 3, 11, 30, 0, 500), OFFSET_0200, OFFSET_0300); } @@ -113,7 +114,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // getters //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_getters_gap() throws Exception { LocalDateTime before = LocalDateTime.of(2010, 3, 31, 1, 0); LocalDateTime after = LocalDateTime.of(2010, 3, 31, 2, 0); @@ -129,7 +130,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { assertSerializable(test); } - @Test(groups={"tck"}) + @Test public void test_getters_overlap() throws Exception { LocalDateTime before = LocalDateTime.of(2010, 10, 31, 1, 0); LocalDateTime after = LocalDateTime.of(2010, 10, 31, 0, 0); @@ -163,7 +164,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // isValidOffset() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_isValidOffset_gap() { LocalDateTime ldt = LocalDateTime.of(2010, 3, 31, 1, 0); ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0200, OFFSET_0300); @@ -174,7 +175,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { assertEquals(test.isValidOffset(OFFSET_0400), false); } - @Test(groups={"tck"}) + @Test public void test_isValidOffset_overlap() { LocalDateTime ldt = LocalDateTime.of(2010, 10, 31, 1, 0); ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0300, OFFSET_0200); @@ -188,7 +189,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // compareTo() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_compareTo() { ZoneOffsetTransition a = ZoneOffsetTransition.of( LocalDateTime.ofEpochSecond(23875287L - 1, 0, OFFSET_0200), OFFSET_0200, OFFSET_0300); @@ -210,7 +211,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { assertEquals(c.compareTo(c) == 0, true); } - @Test(groups={"tck"}) + @Test public void test_compareTo_sameInstant() { ZoneOffsetTransition a = ZoneOffsetTransition.of( LocalDateTime.ofEpochSecond(23875287L, 0, OFFSET_0200), OFFSET_0200, OFFSET_0300); @@ -235,7 +236,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals() { LocalDateTime ldtA = LocalDateTime.of(2010, 3, 31, 1, 0); ZoneOffsetTransition a1 = ZoneOffsetTransition.of(ldtA, OFFSET_0200, OFFSET_0300); @@ -260,7 +261,7 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_hashCode_floatingWeek_gap_notEndOfDay() { LocalDateTime ldtA = LocalDateTime.of(2010, 3, 31, 1, 0); ZoneOffsetTransition a1 = ZoneOffsetTransition.of(ldtA, OFFSET_0200, OFFSET_0300); @@ -276,14 +277,14 @@ public class TCKZoneOffsetTransition extends AbstractTCKTest { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString_gap() { LocalDateTime ldt = LocalDateTime.of(2010, 3, 31, 1, 0); ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0200, OFFSET_0300); assertEquals(test.toString(), "Transition[Gap at 2010-03-31T01:00+02:00 to +03:00]"); } - @Test(groups={"tck"}) + @Test public void test_toString_overlap() { LocalDateTime ldt = LocalDateTime.of(2010, 10, 31, 1, 0); ZoneOffsetTransition test = ZoneOffsetTransition.of(ldt, OFFSET_0300, OFFSET_0200); diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java index c98ddf02102..fedded75337 100644 --- a/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java +++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneOffsetTransitionRule.java @@ -61,7 +61,6 @@ package tck.java.time.zone; import static org.testng.Assert.assertEquals; -import tck.java.time.AbstractTCKTest; import java.time.DayOfWeek; import java.time.LocalDateTime; import java.time.LocalTime; @@ -72,6 +71,7 @@ import java.time.zone.ZoneOffsetTransitionRule; import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition; import org.testng.annotations.Test; +import tck.java.time.AbstractTCKTest; /** * Test ZoneOffsetTransitionRule. @@ -86,70 +86,70 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { //----------------------------------------------------------------------- // factory //----------------------------------------------------------------------- - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullMonth() { ZoneOffsetTransitionRule.of( null, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullTime() { ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, null, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullTimeDefinition() { ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, null, OFFSET_0200, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullStandardOffset() { ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, null, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullOffsetBefore() { ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, null, OFFSET_0300); } - @Test(expectedExceptions=NullPointerException.class, groups={"tck"}) + @Test(expectedExceptions=NullPointerException.class) public void test_factory_nullOffsetAfter() { ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, null); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_factory_invalidDayOfMonthIndicator_tooSmall() { ZoneOffsetTransitionRule.of( Month.MARCH, -29, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_factory_invalidDayOfMonthIndicator_zero() { ZoneOffsetTransitionRule.of( Month.MARCH, 0, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_factory_invalidDayOfMonthIndicator_tooLarge() { ZoneOffsetTransitionRule.of( Month.MARCH, 32, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, OFFSET_0200, OFFSET_0200, OFFSET_0300); } - @Test(expectedExceptions=IllegalArgumentException.class, groups={"tck"}) + @Test(expectedExceptions=IllegalArgumentException.class) public void test_factory_invalidMidnightFlag() { ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, true, TimeDefinition.WALL, @@ -239,7 +239,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { //----------------------------------------------------------------------- // createTransition() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_createTransition_floatingWeek_gap_notEndOfDay() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -249,7 +249,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.createTransition(2000), trans); } - @Test(groups={"tck"}) + @Test public void test_createTransition_floatingWeek_overlap_endOfDay() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, @@ -259,7 +259,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.createTransition(2000), trans); } - @Test(groups={"tck"}) + @Test public void test_createTransition_floatingWeekBackwards_last() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -269,7 +269,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.createTransition(2000), trans); } - @Test(groups={"tck"}) + @Test public void test_createTransition_floatingWeekBackwards_seventhLast() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, -7, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -279,7 +279,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.createTransition(2000), trans); } - @Test(groups={"tck"}) + @Test public void test_createTransition_floatingWeekBackwards_secondLast() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, -2, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -289,7 +289,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.createTransition(2000), trans); } - @Test(groups={"tck"}) + @Test public void test_createTransition_fixedDate() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, @@ -302,7 +302,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { //----------------------------------------------------------------------- // equals() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_equals_monthDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -316,7 +316,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_dayOfMonthDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -330,7 +330,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_dayOfWeekDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -344,7 +344,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_dayOfWeekDifferentNull() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -358,7 +358,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_localTimeDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -372,7 +372,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_endOfDayDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, false, TimeDefinition.WALL, @@ -386,7 +386,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_timeDefinitionDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -400,7 +400,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_standardOffsetDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -414,7 +414,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_offsetBeforeDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -428,7 +428,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_offsetAfterDifferent() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -442,7 +442,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(b.equals(b), true); } - @Test(groups={"tck"}) + @Test public void test_equals_string_false() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -450,7 +450,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(a.equals("TZDB"), false); } - @Test(groups={"tck"}) + @Test public void test_equals_null_false() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -461,7 +461,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_hashCode_floatingWeek_gap_notEndOfDay() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -472,7 +472,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_hashCode_floatingWeek_overlap_endOfDay_nullDayOfWeek() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.OCTOBER, 20, null, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, @@ -483,7 +483,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_hashCode_floatingWeekBackwards() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -494,7 +494,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(a.hashCode(), b.hashCode()); } - @Test(groups={"tck"}) + @Test public void test_hashCode_fixedDate() { ZoneOffsetTransitionRule a = ZoneOffsetTransitionRule.of( Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, @@ -508,7 +508,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { //----------------------------------------------------------------------- // toString() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_toString_floatingWeek_gap_notEndOfDay() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, 20, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -516,7 +516,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or after MARCH 20 at 01:00 WALL, standard offset +02:00]"); } - @Test(groups={"tck"}) + @Test public void test_toString_floatingWeek_overlap_endOfDay() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.OCTOBER, 20, DayOfWeek.SUNDAY, LocalTime.MIDNIGHT, true, TimeDefinition.WALL, @@ -524,7 +524,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.toString(), "TransitionRule[Overlap +03:00 to +02:00, SUNDAY on or after OCTOBER 20 at 24:00 WALL, standard offset +02:00]"); } - @Test(groups={"tck"}) + @Test public void test_toString_floatingWeekBackwards_last() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, -1, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -532,7 +532,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or before last day of MARCH at 01:00 WALL, standard offset +02:00]"); } - @Test(groups={"tck"}) + @Test public void test_toString_floatingWeekBackwards_secondLast() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, -2, DayOfWeek.SUNDAY, TIME_0100, false, TimeDefinition.WALL, @@ -540,7 +540,7 @@ public class TCKZoneOffsetTransitionRule extends AbstractTCKTest { assertEquals(test.toString(), "TransitionRule[Gap +02:00 to +03:00, SUNDAY on or before last day minus 1 of MARCH at 01:00 WALL, standard offset +02:00]"); } - @Test(groups={"tck"}) + @Test public void test_toString_fixedDate() { ZoneOffsetTransitionRule test = ZoneOffsetTransitionRule.of( Month.MARCH, 20, null, TIME_0100, false, TimeDefinition.STANDARD, diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java index 5feac51ecac..4cc630d50be 100644 --- a/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java +++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneRules.java @@ -68,9 +68,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.util.Iterator; -import java.util.List; - import java.time.DayOfWeek; import java.time.Duration; import java.time.Instant; @@ -86,6 +83,8 @@ import java.time.zone.ZoneOffsetTransition; import java.time.zone.ZoneOffsetTransitionRule; import java.time.zone.ZoneOffsetTransitionRule.TimeDefinition; import java.time.zone.ZoneRules; +import java.util.Iterator; +import java.util.List; import org.testng.annotations.Test; diff --git a/jdk/test/java/time/tck/java/time/zone/TCKZoneRulesProvider.java b/jdk/test/java/time/tck/java/time/zone/TCKZoneRulesProvider.java index a8081268ee4..a30424f4572 100644 --- a/jdk/test/java/time/tck/java/time/zone/TCKZoneRulesProvider.java +++ b/jdk/test/java/time/tck/java/time/zone/TCKZoneRulesProvider.java @@ -59,23 +59,21 @@ */ package tck.java.time.zone; -import java.time.ZoneId; - import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; +import java.time.ZoneId; +import java.time.ZoneOffset; +import java.time.zone.ZoneRules; +import java.time.zone.ZoneRulesException; +import java.time.zone.ZoneRulesProvider; import java.util.Collections; import java.util.HashSet; import java.util.NavigableMap; import java.util.Set; import java.util.TreeMap; -import java.time.ZoneOffset; -import java.time.zone.ZoneRules; -import java.time.zone.ZoneRulesException; -import java.time.zone.ZoneRulesProvider; - import org.testng.annotations.Test; /** @@ -172,7 +170,7 @@ public class TCKZoneRulesProvider { //----------------------------------------------------------------------- // registerProvider() //----------------------------------------------------------------------- - @Test(groups={"tck"}) + @Test public void test_registerProvider() { Set pre = ZoneRulesProvider.getAvailableZoneIds(); assertEquals(pre.contains("FooLocation"), false); diff --git a/jdk/test/java/time/test/java/time/MockSimplePeriod.java b/jdk/test/java/time/test/java/time/MockSimplePeriod.java index 662c8b12100..2d8f7d5ba9c 100644 --- a/jdk/test/java/time/test/java/time/MockSimplePeriod.java +++ b/jdk/test/java/time/test/java/time/MockSimplePeriod.java @@ -59,19 +59,16 @@ */ package test.java.time; -import java.time.*; - import static java.time.temporal.ChronoUnit.DAYS; import static java.time.temporal.ChronoUnit.FOREVER; import static java.time.temporal.ChronoUnit.SECONDS; -import java.util.Objects; - +import java.time.DateTimeException; import java.time.temporal.Temporal; import java.time.temporal.TemporalAmount; -import java.time.temporal.TemporalAmount; import java.time.temporal.TemporalUnit; import java.util.List; +import java.util.Objects; /** * Mock period of time measured using a single unit, such as {@code 3 Days}. diff --git a/jdk/test/java/time/test/java/time/TestClock_System.java b/jdk/test/java/time/test/java/time/TestClock_System.java index 00e9bbffe84..881a76060a1 100644 --- a/jdk/test/java/time/test/java/time/TestClock_System.java +++ b/jdk/test/java/time/test/java/time/TestClock_System.java @@ -59,11 +59,12 @@ */ package test.java.time; -import java.time.*; - import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertSame; +import java.time.Clock; +import java.time.ZoneId; + import org.testng.annotations.Test; /** diff --git a/jdk/test/java/time/test/java/time/TestDuration.java b/jdk/test/java/time/test/java/time/TestDuration.java index 786bfc0f05f..23aedd84aa5 100644 --- a/jdk/test/java/time/test/java/time/TestDuration.java +++ b/jdk/test/java/time/test/java/time/TestDuration.java @@ -65,11 +65,9 @@ import static org.testng.Assert.assertTrue; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; - import java.time.Duration; import org.testng.annotations.Test; @@ -87,7 +85,7 @@ public class TestDuration extends AbstractTest { } //----------------------------------------------------------------------- - @Test(groups={"implementation"}) + @Test public void test_interfaces() { assertTrue(Serializable.class.isAssignableFrom(Duration.class)); assertTrue(Comparable.class.isAssignableFrom(Duration.class)); @@ -96,7 +94,7 @@ public class TestDuration extends AbstractTest { //----------------------------------------------------------------------- // serialization //----------------------------------------------------------------------- - @Test(groups={"implementation"}) + @Test public void test_deserializationSingleton() throws Exception { Duration orginal = Duration.ZERO; ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -109,103 +107,103 @@ public class TestDuration extends AbstractTest { assertSame(ser, Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void plus_zeroReturnsThis() { Duration t = Duration.ofSeconds(-1); assertSame(t.plus(Duration.ZERO), t); } - @Test(groups={"implementation"}) + @Test public void plus_zeroSingleton() { Duration t = Duration.ofSeconds(-1); assertSame(t.plus(Duration.ofSeconds(1)), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void plusSeconds_zeroReturnsThis() { Duration t = Duration.ofSeconds(-1); assertSame(t.plusSeconds(0), t); } - @Test(groups={"implementation"}) + @Test public void plusSeconds_zeroSingleton() { Duration t = Duration.ofSeconds(-1); assertSame(t.plusSeconds(1), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void plusMillis_zeroReturnsThis() { Duration t = Duration.ofSeconds(-1, 2000000); assertSame(t.plusMillis(0), t); } - @Test(groups={"implementation"}) + @Test public void plusMillis_zeroSingleton() { Duration t = Duration.ofSeconds(-1, 2000000); assertSame(t.plusMillis(998), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void plusNanos_zeroReturnsThis() { Duration t = Duration.ofSeconds(-1, 2000000); assertSame(t.plusNanos(0), t); } - @Test(groups={"implementation"}) + @Test public void plusNanos_zeroSingleton() { Duration t = Duration.ofSeconds(-1, 2000000); assertSame(t.plusNanos(998000000), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void minus_zeroReturnsThis() { Duration t = Duration.ofSeconds(1); assertSame(t.minus(Duration.ZERO), t); } - @Test(groups={"implementation"}) + @Test public void minus_zeroSingleton() { Duration t = Duration.ofSeconds(1); assertSame(t.minus(Duration.ofSeconds(1)), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void minusSeconds_zeroReturnsThis() { Duration t = Duration.ofSeconds(1); assertSame(t.minusSeconds(0), t); } - @Test(groups={"implementation"}) + @Test public void minusSeconds_zeroSingleton() { Duration t = Duration.ofSeconds(1); assertSame(t.minusSeconds(1), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void minusMillis_zeroReturnsThis() { Duration t = Duration.ofSeconds(1, 2000000); assertSame(t.minusMillis(0), t); } - @Test(groups={"implementation"}) + @Test public void minusMillis_zeroSingleton() { Duration t = Duration.ofSeconds(1, 2000000); assertSame(t.minusMillis(1002), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void minusNanos_zeroReturnsThis() { Duration t = Duration.ofSeconds(1, 2000000); assertSame(t.minusNanos(0), t); } - @Test(groups={"implementation"}) + @Test public void minusNanos_zeroSingleton() { Duration t = Duration.ofSeconds(1, 2000000); assertSame(t.minusNanos(1002000000), Duration.ZERO); } - @Test(groups={"implementation"}) + @Test public void test_abs_same() { Duration base = Duration.ofSeconds(12); assertSame(base.abs(), base); diff --git a/jdk/test/java/time/test/java/time/TestLocalDate.java b/jdk/test/java/time/test/java/time/TestLocalDate.java index 44033123cdf..a6bd18c5bb3 100644 --- a/jdk/test/java/time/test/java/time/TestLocalDate.java +++ b/jdk/test/java/time/test/java/time/TestLocalDate.java @@ -80,7 +80,7 @@ public class TestLocalDate extends AbstractTest { private LocalDate TEST_2007_07_15; - @BeforeMethod(groups={"tck", "implementation"}) + @BeforeMethod public void setUp() { TEST_2007_07_15 = LocalDate.of(2007, 7, 15); } @@ -117,55 +117,55 @@ public class TestLocalDate extends AbstractTest { return date.withDayOfMonth(date.getMonth().length(isIsoLeap(date.getYear()))); } - @Test(groups={"implementation"}) + @Test public void test_with_DateTimeField_long_noChange_same() { LocalDate t = TEST_2007_07_15.with(YEAR, 2007); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_withYear_int_noChange_same() { LocalDate t = TEST_2007_07_15.withYear(2007); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_withMonth_int_noChange_same() { LocalDate t = TEST_2007_07_15.withMonth(7); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfMonth_noChange_same() { LocalDate t = TEST_2007_07_15.withDayOfMonth(15); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfYear_noChange_same() { LocalDate t = TEST_2007_07_15.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 15); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_plus_Period_zero() { LocalDate t = TEST_2007_07_15.plus(MockSimplePeriod.ZERO_DAYS); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_plus_longPeriodUnit_zero() { LocalDate t = TEST_2007_07_15.plus(0, ChronoUnit.DAYS); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_plusYears_long_noChange_same() { LocalDate t = TEST_2007_07_15.plusYears(0); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_plusMonths_long_noChange_same() { LocalDate t = TEST_2007_07_15.plusMonths(0); assertSame(t, TEST_2007_07_15); @@ -206,7 +206,7 @@ public class TestLocalDate extends AbstractTest { }; } - @Test(dataProvider="samplePlusWeeksSymmetry", groups={"implementation"}) + @Test(dataProvider="samplePlusWeeksSymmetry") public void test_plusWeeks_symmetry(LocalDate reference) { for (int weeks = 0; weeks < 365 * 8; weeks++) { LocalDate t = reference.plusWeeks(weeks).plusWeeks(-weeks); @@ -217,7 +217,7 @@ public class TestLocalDate extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void test_plusWeeks_noChange_same() { LocalDate t = TEST_2007_07_15.plusWeeks(0); assertSame(t, TEST_2007_07_15); @@ -258,7 +258,7 @@ public class TestLocalDate extends AbstractTest { }; } - @Test(dataProvider="samplePlusDaysSymmetry", groups={"implementation"}) + @Test(dataProvider="samplePlusDaysSymmetry") public void test_plusDays_symmetry(LocalDate reference) { for (int days = 0; days < 365 * 8; days++) { LocalDate t = reference.plusDays(days).plusDays(-days); @@ -269,31 +269,31 @@ public class TestLocalDate extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void test_plusDays_noChange_same() { LocalDate t = TEST_2007_07_15.plusDays(0); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_minus_Period_zero() { LocalDate t = TEST_2007_07_15.minus(MockSimplePeriod.ZERO_DAYS); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_minus_longPeriodUnit_zero() { LocalDate t = TEST_2007_07_15.minus(0, ChronoUnit.DAYS); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_minusYears_long_noChange_same() { LocalDate t = TEST_2007_07_15.minusYears(0); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_minusMonths_long_noChange_same() { LocalDate t = TEST_2007_07_15.minusMonths(0); assertSame(t, TEST_2007_07_15); @@ -334,7 +334,7 @@ public class TestLocalDate extends AbstractTest { }; } - @Test(dataProvider="sampleMinusWeeksSymmetry", groups={"implementation"}) + @Test(dataProvider="sampleMinusWeeksSymmetry") public void test_minusWeeks_symmetry(LocalDate reference) { for (int weeks = 0; weeks < 365 * 8; weeks++) { LocalDate t = reference.minusWeeks(weeks).minusWeeks(-weeks); @@ -345,7 +345,7 @@ public class TestLocalDate extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void test_minusWeeks_noChange_same() { LocalDate t = TEST_2007_07_15.minusWeeks(0); assertSame(t, TEST_2007_07_15); @@ -386,7 +386,7 @@ public class TestLocalDate extends AbstractTest { }; } - @Test(dataProvider="sampleMinusDaysSymmetry", groups={"implementation"}) + @Test(dataProvider="sampleMinusDaysSymmetry") public void test_minusDays_symmetry(LocalDate reference) { for (int days = 0; days < 365 * 8; days++) { LocalDate t = reference.minusDays(days).minusDays(-days); @@ -397,13 +397,13 @@ public class TestLocalDate extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void test_minusDays_noChange_same() { LocalDate t = TEST_2007_07_15.minusDays(0); assertSame(t, TEST_2007_07_15); } - @Test(groups={"implementation"}) + @Test public void test_toEpochDay_fromMJDays_symmetry() { long date_0000_01_01 = -678941 - 40587; diff --git a/jdk/test/java/time/test/java/time/TestLocalDateTime.java b/jdk/test/java/time/test/java/time/TestLocalDateTime.java index 90c3927406f..80469ed0621 100644 --- a/jdk/test/java/time/test/java/time/TestLocalDateTime.java +++ b/jdk/test/java/time/test/java/time/TestLocalDateTime.java @@ -121,365 +121,365 @@ public class TestLocalDateTime extends AbstractTest { }; } - @Test(groups={"implementation"}) + @Test public void test_withYear_int_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withYear(2007); assertSame(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate()); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_withMonth_int_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMonth(7); assertSame(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate()); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfMonth_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfMonth(15); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfYear_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withDayOfYear(31 + 28 + 31 + 30 + 31 + 30 + 15); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_withHour_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withHour(12); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_withHour_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(0); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_withHour_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).withHour(12); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_withMinute_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withMinute(30); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_withMinute_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 1)).withMinute(0); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_withMinute_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 1)).withMinute(0); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_withSecond_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withSecond(40); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_withSecond_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 1)).withSecond(0); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_withSecond_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 1)).withSecond(0); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_withNanoOfSecond_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.withNano(987654321); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_withNanoOfSecond_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).withNano(0); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_withNanoOfSecond_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).withNano(0); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_plus_adjuster_zero() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(Period.ZERO); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plus_Period_zero() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(MockSimplePeriod.ZERO_DAYS); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plus_longPeriodUnit_zero() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plus(0, ChronoUnit.DAYS); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusYears_int_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusYears(0); assertSame(TEST_2007_07_15_12_30_40_987654321, t); } - @Test(groups={"implementation"}) + @Test public void test_plusMonths_int_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMonths(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusWeeks_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusWeeks(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusDays_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusDays(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusHours_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusHours(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusHours_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 0)).plusHours(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_plusHours_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 0)).plusHours(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_plusMinutes_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMinutes(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusMinutes_noChange_oneDay_same() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusMinutes(24 * 60); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_plusMinutes_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59)).plusMinutes(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_plusMinutes_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59)).plusMinutes(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_plusSeconds_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusSeconds_noChange_oneDay_same() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusSeconds(24 * 60 * 60); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_plusSeconds_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59)).plusSeconds(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_plusSeconds_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59)).plusSeconds(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_plusNanos_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_plusNanos_noChange_oneDay_same() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.plusNanos(24 * 60 * 60 * 1000000000L); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_plusNanos_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(23, 59, 59, 999999999)).plusNanos(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_plusNanos_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(11, 59, 59, 999999999)).plusNanos(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_minus_adjuster_zero() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(Period.ZERO); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minus_Period_zero() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(MockSimplePeriod.ZERO_DAYS); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minus_longPeriodUnit_zero() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minus(0, ChronoUnit.DAYS); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusYears_int_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusYears(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusMonths_int_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMonths(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusWeeks_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusWeeks(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusDays_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusDays(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusHours_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusHours(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusHours_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(1, 0)).minusHours(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_minusHours_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(13, 0)).minusHours(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_minusMinutes_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMinutes(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusMinutes_noChange_oneDay_same() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusMinutes(24 * 60); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_minusMinutes_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 1)).minusMinutes(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_minusMinutes_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 1)).minusMinutes(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_minusSeconds_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusSeconds(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusSeconds_noChange_oneDay() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusSeconds(24 * 60 * 60); assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().minusDays(1)); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_minusSeconds_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 1)).minusSeconds(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_minusSeconds_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 1)).minusSeconds(1); assertSame(t.toLocalTime(), LocalTime.NOON); } - @Test(groups={"implementation"}) + @Test public void test_minusNanos_noChange() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusNanos(0); assertSame(t, TEST_2007_07_15_12_30_40_987654321); } - @Test(groups={"implementation"}) + @Test public void test_minusNanos_noChange_oneDay() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.minusNanos(24 * 60 * 60 * 1000000000L); assertEquals(t.toLocalDate(), TEST_2007_07_15_12_30_40_987654321.toLocalDate().minusDays(1)); assertSame(t.toLocalTime(), TEST_2007_07_15_12_30_40_987654321.toLocalTime()); } - @Test(groups={"implementation"}) + @Test public void test_minusNanos_toMidnight() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(0, 0, 0, 1)).minusNanos(1); assertSame(t.toLocalTime(), LocalTime.MIDNIGHT); } - @Test(groups={"implementation"}) + @Test public void test_minusNanos_toMidday() { LocalDateTime t = TEST_2007_07_15_12_30_40_987654321.with(LocalTime.of(12, 0, 0, 1)).minusNanos(1); assertSame(t.toLocalTime(), LocalTime.NOON); @@ -488,7 +488,7 @@ public class TestLocalDateTime extends AbstractTest { //----------------------------------------------------------------------- // toLocalDate() //----------------------------------------------------------------------- - @Test(dataProvider="sampleDates", groups={"implementation"}) + @Test(dataProvider="sampleDates") public void test_getDate(int year, int month, int day) { LocalDate d = LocalDate.of(year, month, day); LocalDateTime dt = LocalDateTime.of(d, LocalTime.MIDNIGHT); @@ -498,7 +498,7 @@ public class TestLocalDateTime extends AbstractTest { //----------------------------------------------------------------------- // toLocalTime() //----------------------------------------------------------------------- - @Test(dataProvider="sampleTimes", groups={"implementation"}) + @Test(dataProvider="sampleTimes") public void test_getTime(int h, int m, int s, int ns) { LocalTime t = LocalTime.of(h, m, s, ns); LocalDateTime dt = LocalDateTime.of(LocalDate.of(2011, 7, 30), t); diff --git a/jdk/test/java/time/test/java/time/TestLocalTime.java b/jdk/test/java/time/test/java/time/TestLocalTime.java index 47aa94a7ecd..ddd7b0f572e 100644 --- a/jdk/test/java/time/test/java/time/TestLocalTime.java +++ b/jdk/test/java/time/test/java/time/TestLocalTime.java @@ -87,51 +87,51 @@ public class TestLocalTime extends AbstractTest { } //----------------------------------------------------------------------- - @Test(groups={"tck","implementation"}) + @Test public void constant_MIDNIGHT() { check(LocalTime.MIDNIGHT, 0, 0, 0, 0); } - @Test(groups={"implementation"}) + @Test public void constant_MIDNIGHT_same() { assertSame(LocalTime.MIDNIGHT, LocalTime.MIDNIGHT); assertSame(LocalTime.MIDNIGHT, LocalTime.of(0, 0)); } - @Test(groups={"tck","implementation"}) + @Test public void constant_MIDDAY() { check(LocalTime.NOON, 12, 0, 0, 0); } - @Test(groups={"implementation"}) + @Test public void constant_MIDDAY_same() { assertSame(LocalTime.NOON, LocalTime.NOON); assertSame(LocalTime.NOON, LocalTime.of(12, 0)); } //----------------------------------------------------------------------- - @Test(groups={"tck","implementation"}) + @Test public void constant_MIN_TIME() { check(LocalTime.MIN, 0, 0, 0, 0); } - @Test(groups={"implementation"}) + @Test public void constant_MIN_TIME_same() { assertSame(LocalTime.MIN, LocalTime.of(0, 0)); } - @Test(groups={"tck","implementation"}) + @Test public void constant_MAX_TIME() { check(LocalTime.MAX, 23, 59, 59, 999999999); } - @Test(groups={"implementation"}) + @Test public void constant_MAX_TIME_same() { assertSame(LocalTime.NOON, LocalTime.NOON); assertSame(LocalTime.NOON, LocalTime.of(12, 0)); } - @Test(groups={"implementation"}) + @Test public void factory_time_2ints_singletons() { for (int i = 0; i < 24; i++) { LocalTime test1 = LocalTime.of(i, 0); @@ -140,7 +140,7 @@ public class TestLocalTime extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void factory_time_3ints_singletons() { for (int i = 0; i < 24; i++) { LocalTime test1 = LocalTime.of(i, 0, 0); @@ -149,7 +149,7 @@ public class TestLocalTime extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void factory_time_4ints_singletons() { for (int i = 0; i < 24; i++) { LocalTime test1 = LocalTime.of(i, 0, 0, 0); @@ -158,7 +158,7 @@ public class TestLocalTime extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void factory_ofSecondOfDay_singletons() { for (int i = 0; i < 24; i++) { LocalTime test1 = LocalTime.ofSecondOfDay(i * 60L * 60L); @@ -167,7 +167,7 @@ public class TestLocalTime extends AbstractTest { } } - @Test(groups={"implementation"}) + @Test public void factory_ofNanoOfDay_singletons() { for (int i = 0; i < 24; i++) { LocalTime test1 = LocalTime.ofNanoOfDay(i * 1000000000L * 60L * 60L); diff --git a/jdk/test/java/time/test/java/time/TestMonthDay.java b/jdk/test/java/time/test/java/time/TestMonthDay.java index ebfdc6de6e5..b03878be1a5 100644 --- a/jdk/test/java/time/test/java/time/TestMonthDay.java +++ b/jdk/test/java/time/test/java/time/TestMonthDay.java @@ -78,7 +78,7 @@ public class TestMonthDay extends AbstractTest { private MonthDay TEST_07_15; - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { TEST_07_15 = MonthDay.of(7, 15); } @@ -95,24 +95,24 @@ public class TestMonthDay extends AbstractTest { assertEquals(test.getDayOfMonth(), d); } - @Test(groups={"implementation"}) + @Test public void test_with_Month_noChangeSame() { MonthDay test = MonthDay.of(6, 30); assertSame(test.with(Month.JUNE), test); } - @Test(groups={"implementation"}) + @Test public void test_withMonth_int_noChangeSame() { MonthDay test = MonthDay.of(6, 30); assertSame(test.withMonth(6), test); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfMonth_noChangeSame() { MonthDay test = MonthDay.of(6, 30); assertSame(test.withDayOfMonth(30), test); } - @Test(groups={"implementation"}) + @Test public void test_adjustDate_same() { MonthDay test = MonthDay.of(6, 30); LocalDate date = LocalDate.of(2007, 6, 30); diff --git a/jdk/test/java/time/test/java/time/TestOffsetDateTime.java b/jdk/test/java/time/test/java/time/TestOffsetDateTime.java index 7766b5ffb3b..4279a433af7 100644 --- a/jdk/test/java/time/test/java/time/TestOffsetDateTime.java +++ b/jdk/test/java/time/test/java/time/TestOffsetDateTime.java @@ -64,8 +64,8 @@ import static org.testng.Assert.assertSame; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; -import java.time.ZoneOffset; import java.time.OffsetDateTime; +import java.time.ZoneOffset; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; @@ -81,7 +81,7 @@ public class TestOffsetDateTime extends AbstractTest { private static final ZoneOffset OFFSET_PTWO = ZoneOffset.ofHours(2); private OffsetDateTime TEST_2008_6_30_11_30_59_000000500; - @BeforeMethod(groups={"tck","implementation"}) + @BeforeMethod public void setUp() { TEST_2008_6_30_11_30_59_000000500 = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 500), OFFSET_PONE); } @@ -104,7 +104,7 @@ public class TestOffsetDateTime extends AbstractTest { }; } - @Test(dataProvider="sampleTimes", groups={"implementation"}) + @Test(dataProvider="sampleTimes") public void test_get_same(int y, int o, int d, int h, int m, int s, int n, ZoneOffset offset) { LocalDate localDate = LocalDate.of(y, o, d); LocalTime localTime = LocalTime.of(h, m, s, n); @@ -120,7 +120,7 @@ public class TestOffsetDateTime extends AbstractTest { //----------------------------------------------------------------------- // withOffsetSameLocal() //----------------------------------------------------------------------- - @Test(groups={"implementation"}) + @Test public void test_withOffsetSameLocal() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PTWO); @@ -128,192 +128,192 @@ public class TestOffsetDateTime extends AbstractTest { assertSame(test.getOffset(), OFFSET_PTWO); } - @Test(groups={"implementation"}) + @Test public void test_withOffsetSameLocal_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withOffsetSameLocal(OFFSET_PONE); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withOffsetSameInstant_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withOffsetSameInstant(OFFSET_PONE); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withYear_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withYear(2008); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withMonth_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withMonth(6); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfMonth_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withDayOfMonth(30); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withDayOfYear_noChange() { OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.withDayOfYear(31 + 29 + 31 + 30 + 31 + 30); assertSame(t, TEST_2008_6_30_11_30_59_000000500); } - @Test(groups={"implementation"}) + @Test public void test_withHour_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withHour(11); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withMinute_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withMinute(30); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withSecond_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.withSecond(59); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_withNanoOfSecond_noChange() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59, 1), OFFSET_PONE); OffsetDateTime test = base.withNano(1); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plus_Period_zero() { OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.plus(MockSimplePeriod.ZERO_DAYS); assertSame(t, TEST_2008_6_30_11_30_59_000000500); } - @Test(groups={"implementation"}) + @Test public void test_plusYears_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusYears(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusMonths_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusMonths(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusWeeks_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusWeeks(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusDays_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusDays(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusHours_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusHours(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusMinutes_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusMinutes(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusSeconds_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusSeconds(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_plusNanos_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.plusNanos(0); } - @Test(groups={"implementation"}) + @Test public void test_minus_Period_zero() { OffsetDateTime t = TEST_2008_6_30_11_30_59_000000500.minus(MockSimplePeriod.ZERO_DAYS); assertSame(t, TEST_2008_6_30_11_30_59_000000500); } - @Test(groups={"implementation"}) + @Test public void test_minusYears_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2007, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusYears(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusMonths_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusMonths(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusWeeks_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusWeeks(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusDays_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusDays(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusHours_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusHours(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusMinutes_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusMinutes(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusSeconds_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusSeconds(0); assertSame(test, base); } - @Test(groups={"implementation"}) + @Test public void test_minusNanos_zero() { OffsetDateTime base = OffsetDateTime.of(LocalDate.of(2008, 6, 30), LocalTime.of(11, 30, 59), OFFSET_PONE); OffsetDateTime test = base.minusNanos(0); diff --git a/jdk/test/java/time/test/java/time/TestOffsetDateTime_instants.java b/jdk/test/java/time/test/java/time/TestOffsetDateTime_instants.java index 86c887ac829..28b32ba2811 100644 --- a/jdk/test/java/time/test/java/time/TestOffsetDateTime_instants.java +++ b/jdk/test/java/time/test/java/time/TestOffsetDateTime_instants.java @@ -59,17 +59,16 @@ */ package test.java.time; +import static org.testng.Assert.assertEquals; + import java.time.DateTimeException; import java.time.Instant; import java.time.LocalDate; import java.time.LocalTime; import java.time.Month; -import java.time.ZoneOffset; - import java.time.OffsetDateTime; import java.time.Year; - -import static org.testng.Assert.assertEquals; +import java.time.ZoneOffset; import org.testng.annotations.Test; diff --git a/jdk/test/java/time/test/java/time/TestPeriod.java b/jdk/test/java/time/test/java/time/TestPeriod.java index 6559947b145..2c6d4030d84 100644 --- a/jdk/test/java/time/test/java/time/TestPeriod.java +++ b/jdk/test/java/time/test/java/time/TestPeriod.java @@ -80,6 +80,7 @@ public class TestPeriod extends AbstractTest { //----------------------------------------------------------------------- // factories //----------------------------------------------------------------------- + @Test public void factory_zeroSingleton() { assertSame(Period.ZERO, Period.ZERO); assertSame(Period.ofYears(0), Period.ZERO); @@ -91,6 +92,7 @@ public class TestPeriod extends AbstractTest { //----------------------------------------------------------------------- // hashCode() //----------------------------------------------------------------------- + @Test public void test_hashCode() { Period test5 = Period.ofDays(5); Period test6 = Period.ofDays(6); diff --git a/jdk/test/java/time/test/java/time/TestZoneId.java b/jdk/test/java/time/test/java/time/TestZoneId.java index 6aa373288a7..df2bbbc519e 100644 --- a/jdk/test/java/time/test/java/time/TestZoneId.java +++ b/jdk/test/java/time/test/java/time/TestZoneId.java @@ -62,7 +62,6 @@ package test.java.time; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertNotNull; -import static org.testng.Assert.assertSame; import static org.testng.Assert.assertTrue; import java.lang.reflect.Field; @@ -82,7 +81,6 @@ import java.util.Locale; import java.util.SimpleTimeZone; import java.util.TimeZone; -import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** @@ -121,7 +119,6 @@ public class TestZoneId extends AbstractTest { assertEquals(test.getRules().isFixedOffset(), true); assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), ZoneOffset.UTC); checkOffset(test.getRules(), createLDT(2008, 6, 30), ZoneOffset.UTC, 1); - assertSame(test, ZoneId.of("UTC+00")); } //----------------------------------------------------------------------- @@ -129,9 +126,7 @@ public class TestZoneId extends AbstractTest { //----------------------------------------------------------------------- public void test_systemDefault() { ZoneId test = ZoneId.systemDefault(); - assertEquals(test.getId(), TimeZone.getDefault() - .getID() - .replaceAll("GMT|UTC|UT", "Z")); + assertEquals(test.getId(), TimeZone.getDefault().getID()); } @Test(expectedExceptions = DateTimeException.class) @@ -156,58 +151,6 @@ public class TestZoneId extends AbstractTest { } } - //----------------------------------------------------------------------- - @DataProvider(name="String_Fixed") - Object[][] data_of_string_Fixed() { - return new Object[][] { - {"+0", "Z"}, - {"+5", "+05:00"}, - {"+01", "+01:00"}, - {"+0100", "+01:00"},{"+01:00", "+01:00"}, - {"+010000", "+01:00"},{"+01:00:00", "+01:00"}, - {"+12", "+12:00"}, - {"+1234", "+12:34"},{"+12:34", "+12:34"}, - {"+123456", "+12:34:56"},{"+12:34:56", "+12:34:56"}, - {"-02", "-02:00"}, - {"-5", "-05:00"}, - {"-0200", "-02:00"},{"-02:00", "-02:00"}, - {"-020000", "-02:00"},{"-02:00:00", "-02:00"}, - }; - } - - @Test(dataProvider="String_Fixed") - public void test_of_string_offset(String input, String id) { - ZoneId test = ZoneId.of(input); - assertEquals(test.getId(), id); - assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id); - assertEquals(test.getRules().isFixedOffset(), true); - ZoneOffset offset = ZoneOffset.of(id); - assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), offset); - checkOffset(test.getRules(), createLDT(2008, 6, 30), offset, 1); - } - - @Test(dataProvider="String_Fixed") - public void test_of_string_FixedUTC(String input, String id) { - ZoneId test = ZoneId.of("UTC" + input); - assertEquals(test.getId(), id); - assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id); - assertEquals(test.getRules().isFixedOffset(), true); - ZoneOffset offset = ZoneOffset.of(id); - assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), offset); - checkOffset(test.getRules(), createLDT(2008, 6, 30), offset, 1); - } - - @Test(dataProvider="String_Fixed") - public void test_of_string_FixedGMT(String input, String id) { - ZoneId test = ZoneId.of("GMT" + input); - assertEquals(test.getId(), id); - assertEquals(test.getDisplayName(TextStyle.FULL, Locale.UK), id); - assertEquals(test.getRules().isFixedOffset(), true); - ZoneOffset offset = ZoneOffset.of(id); - assertEquals(test.getRules().getOffset(Instant.ofEpochSecond(0L)), offset); - checkOffset(test.getRules(), createLDT(2008, 6, 30), offset, 1); - } - //----------------------------------------------------------------------- // Europe/London //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/chrono/TestChronoLocalDate.java b/jdk/test/java/time/test/java/time/chrono/TestChronoLocalDate.java new file mode 100644 index 00000000000..7865985998e --- /dev/null +++ b/jdk/test/java/time/test/java/time/chrono/TestChronoLocalDate.java @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2008-2012, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package test.java.time.chrono; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; + +import java.time.LocalDate; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; +import java.time.chrono.ThaiBuddhistChronology; +import java.time.chrono.ThaiBuddhistDate; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.testng.annotations.Test; + +/** + * Test chrono local date. + */ +@Test +public class TestChronoLocalDate { + // this class primarily tests whether the generics work OK + + //----------------------------------------------------------------------- + public void test_date_comparator_checkGenerics_ISO() { + List> dates = new ArrayList<>(); + ChronoLocalDate date = LocalDate.of(2013, 1, 1); + + // Insert dates in order, no duplicates + dates.add(date.minus(10, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.MONTHS)); + dates.add(date.minus(1, ChronoUnit.WEEKS)); + dates.add(date.minus(1, ChronoUnit.DAYS)); + dates.add(date); + dates.add(date.plus(1, ChronoUnit.DAYS)); + dates.add(date.plus(1, ChronoUnit.WEEKS)); + dates.add(date.plus(1, ChronoUnit.MONTHS)); + dates.add(date.plus(1, ChronoUnit.YEARS)); + dates.add(date.plus(10, ChronoUnit.YEARS)); + + List> copy = new ArrayList<>(dates); + Collections.shuffle(copy); + Collections.sort(copy, ChronoLocalDate.timeLineOrder()); + assertEquals(copy, dates); + assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0); + } + + public void test_date_comparator_checkGenerics_unknown() { + List> dates = new ArrayList<>(); + ChronoLocalDate date = LocalDate.of(2013, 1, 1); + + // Insert dates in order, no duplicates + dates.add(date.minus(10, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.MONTHS)); + dates.add(date.minus(1, ChronoUnit.WEEKS)); + dates.add(date.minus(1, ChronoUnit.DAYS)); + dates.add(date); + dates.add(date.plus(1, ChronoUnit.DAYS)); + dates.add(date.plus(1, ChronoUnit.WEEKS)); + dates.add(date.plus(1, ChronoUnit.MONTHS)); + dates.add(date.plus(1, ChronoUnit.YEARS)); + dates.add(date.plus(10, ChronoUnit.YEARS)); + + List> copy = new ArrayList<>(dates); + Collections.shuffle(copy); + Collections.sort(copy, ChronoLocalDate.timeLineOrder()); + assertEquals(copy, dates); + assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0); + } + + public > void test_date_comparator_checkGenerics_unknownExtends() { + List> dates = new ArrayList<>(); + ChronoLocalDate date = (ChronoLocalDate) LocalDate.of(2013, 1, 1); // TODO generics raw type + + // Insert dates in order, no duplicates + dates.add(date.minus(10, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.MONTHS)); + dates.add(date.minus(1, ChronoUnit.WEEKS)); + dates.add(date.minus(1, ChronoUnit.DAYS)); + dates.add(date); + dates.add(date.plus(1, ChronoUnit.DAYS)); + dates.add(date.plus(1, ChronoUnit.WEEKS)); + dates.add(date.plus(1, ChronoUnit.MONTHS)); + dates.add(date.plus(1, ChronoUnit.YEARS)); + dates.add(date.plus(10, ChronoUnit.YEARS)); + + List> copy = new ArrayList<>(dates); + Collections.shuffle(copy); + Collections.sort(copy, ChronoLocalDate.timeLineOrder()); + assertEquals(copy, dates); + assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0); + } + + public void test_date_comparator_checkGenerics_LocalDate() { + List dates = new ArrayList<>(); + LocalDate date = LocalDate.of(2013, 1, 1); + + // Insert dates in order, no duplicates + dates.add(date.minus(10, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.YEARS)); + dates.add(date.minus(1, ChronoUnit.MONTHS)); + dates.add(date.minus(1, ChronoUnit.WEEKS)); + dates.add(date.minus(1, ChronoUnit.DAYS)); + dates.add(date); + dates.add(date.plus(1, ChronoUnit.DAYS)); + dates.add(date.plus(1, ChronoUnit.WEEKS)); + dates.add(date.plus(1, ChronoUnit.MONTHS)); + dates.add(date.plus(1, ChronoUnit.YEARS)); + dates.add(date.plus(10, ChronoUnit.YEARS)); + + List copy = new ArrayList<>(dates); + Collections.shuffle(copy); + Collections.sort(copy, ChronoLocalDate.timeLineOrder()); + assertEquals(copy, dates); + assertTrue(ChronoLocalDate.timeLineOrder().compare(copy.get(0), copy.get(1)) < 0); + } + + //----------------------------------------------------------------------- + public void test_date_checkGenerics_genericsMethod() { + Chronology chrono = ThaiBuddhistChronology.INSTANCE; + ChronoLocalDate date = chrono.dateNow(); + // date = processOK(date); // does not compile + date = processClassOK(ThaiBuddhistDate.class); + date = dateSupplier(); + + // date = processWeird(date); // does not compile (correct) + // date = processClassWeird(ThaiBuddhistDate.class); // does not compile (correct) + } + + public void test_date_checkGenerics_genericsMethod_concreteType() { + ThaiBuddhistChronology chrono = ThaiBuddhistChronology.INSTANCE; + ThaiBuddhistDate date = chrono.dateNow(); + date = ThaiBuddhistDate.now(); + date = processOK(date); + date = processClassOK(ThaiBuddhistDate.class); + date = dateSupplier(); + + // date = processWeird(date); // does not compile (correct) + // date = processClassWeird(ThaiBuddhistDate.class); // does not compile (correct) + } + + public > void test_date_checkGenerics_genericsMethod_withType() { + Chronology chrono = ThaiBuddhistChronology.INSTANCE; + D date = (D) chrono.dateNow(); + date = processOK(date); + // date = processClassOK(ThaiBuddhistDate.class); // does not compile (correct) + date = dateSupplier(); + + // date = processWeird(date); // does not compile (correct) + // date = processClassWeird(ThaiBuddhistDate.class); // does not compile (correct) + } + + private > D dateSupplier() { + return (D) (ChronoLocalDate) ThaiBuddhistChronology.INSTANCE.dateNow(); // TODO raw types + } + + // decent generics signatures that need to work + private > D processOK(D date) { + return date; + } + private > D processClassOK(Class cls) { + return null; + } + + // weird generics signatures that shouldn't really work + private > ChronoLocalDate processWeird(ChronoLocalDate date) { + return date; + } + private > ChronoLocalDate processClassWeird(Class cls) { + return null; + } + +} diff --git a/jdk/test/java/time/test/java/time/chrono/TestChronologyPerf.java b/jdk/test/java/time/test/java/time/chrono/TestChronologyPerf.java new file mode 100644 index 00000000000..8d73568b146 --- /dev/null +++ b/jdk/test/java/time/test/java/time/chrono/TestChronologyPerf.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package test.java.time.chrono; + +import java.time.Duration; +import java.time.chrono.Chronology; +import java.time.temporal.ChronoUnit; +import java.util.Set; + +import org.testng.annotations.Test; + +/** + * Test the speed of initializing all calendars. + */ +public class TestChronologyPerf { + + @Test + public void test_chronologyGetAvailablePerf() { + long start = System.nanoTime(); + Set chronos = Chronology.getAvailableChronologies(); + long end = System.nanoTime(); + Duration d = Duration.of(end - start, ChronoUnit.NANOS); + System.out.printf(" Duration of Chronology.getAvailableChronologies(): %s%n", d); + } + +} diff --git a/jdk/test/java/time/test/java/time/chrono/TestExampleCode.java b/jdk/test/java/time/test/java/time/chrono/TestExampleCode.java index bfdec45c198..d387c88fd65 100644 --- a/jdk/test/java/time/test/java/time/chrono/TestExampleCode.java +++ b/jdk/test/java/time/test/java/time/chrono/TestExampleCode.java @@ -57,16 +57,20 @@ package test.java.time.chrono; +import static org.testng.Assert.assertEquals; + import java.time.LocalTime; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.ChronoLocalDateTime; +import java.time.chrono.Chronology; import java.time.chrono.HijrahDate; import java.time.chrono.ThaiBuddhistDate; -import java.time.chrono.ChronoLocalDateTime; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.Chronology; import java.time.temporal.ChronoField; import java.time.temporal.ChronoUnit; +import java.util.Locale; import java.util.Set; +import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** @@ -104,6 +108,30 @@ public class TestExampleCode { first, last); } + //----------------------------------------------------------------------- + // Data provider for Hijrah Variant names + //----------------------------------------------------------------------- + @DataProvider(name = "HijrahVariantNames") + Object[][] data_of_ummalqura() { + return new Object[][]{ + { "Hijrah-umalqura", "islamic", "umalqura"}, + }; + } + + @Test(dataProvider= "HijrahVariantNames") + public void test_HijrahVariantViaLocale(String calendarId, String calendarType, String variant) { + Locale.Builder builder = new Locale.Builder(); + builder.setLanguage("en").setRegion("US"); + builder.setUnicodeLocaleKeyword("ca", calendarType); + builder.setUnicodeLocaleKeyword("cv", variant); + Locale locale = builder.build(); + Chronology chrono = Chronology.ofLocale(locale); + System.out.printf(" Locale language tag: %s, Chronology ID: %s, type: %s%n", + locale.toLanguageTag(), chrono, chrono.getCalendarType()); + Chronology expected = Chronology.of(calendarId); + assertEquals(chrono, expected, "Expected chronology not found"); + } + @Test public void test_calendarPackageExample() { diff --git a/jdk/test/java/time/test/java/time/chrono/TestIsoChronoImpl.java b/jdk/test/java/time/test/java/time/chrono/TestIsoChronoImpl.java index 1e66574a4a8..6b3a4e87fee 100644 --- a/jdk/test/java/time/test/java/time/chrono/TestIsoChronoImpl.java +++ b/jdk/test/java/time/test/java/time/chrono/TestIsoChronoImpl.java @@ -60,19 +60,16 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.YEAR; import static java.time.temporal.ChronoField.YEAR_OF_ERA; - import static org.testng.Assert.assertEquals; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.TimeZone; - import java.time.DayOfWeek; import java.time.LocalDate; -import java.time.chrono.ChronoLocalDate; import java.time.chrono.IsoChronology; import java.time.temporal.ChronoUnit; import java.time.temporal.WeekFields; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.TimeZone; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -86,15 +83,14 @@ public class TestIsoChronoImpl { @DataProvider(name = "RangeVersusCalendar") Object[][] provider_rangeVersusCalendar() { return new Object[][]{ - {LocalDate.of(1900, 1, 4), LocalDate.of(2100, 1, 8)}, - //{LocalDate.of(1583, 1, 1), LocalDate.of(2100, 1, 1)}, + {LocalDate.of(1583, 1, 1), LocalDate.of(2100, 1, 1)}, }; } //----------------------------------------------------------------------- // Verify ISO Calendar matches java.util.Calendar for range //----------------------------------------------------------------------- - @Test(groups = {"implementation"}, dataProvider = "RangeVersusCalendar") + @Test(dataProvider = "RangeVersusCalendar") public void test_IsoChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) { GregorianCalendar cal = new GregorianCalendar(); assertEquals(cal.getCalendarType(), "gregory", "Unexpected calendar type"); @@ -119,7 +115,7 @@ public class TestIsoChronoImpl { // Verify ISO Calendar matches java.util.Calendar // DayOfWeek, WeekOfMonth, WeekOfYear for range //----------------------------------------------------------------------- - @Test(groups = {"implementation"}, dataProvider = "RangeVersusCalendar") + @Test(dataProvider = "RangeVersusCalendar") public void test_DayOfWeek_IsoChronology_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) { GregorianCalendar cal = new GregorianCalendar(); assertEquals(cal.getCalendarType(), "gregory", "Unexpected calendar type"); @@ -136,32 +132,31 @@ public class TestIsoChronoImpl { cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1); cal.set(Calendar.DAY_OF_MONTH, isoDate.get(DAY_OF_MONTH)); + // For every date in the range while (isoDate.isBefore(isoEndDate)) { assertEquals(isoDate.get(DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + isoDate + "; cal: " + cal); assertEquals(isoDate.get(MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + isoDate); assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate); - int jDOW = Math.floorMod(cal.get(Calendar.DAY_OF_WEEK) - 2, 7) + 1; - int isoDOW = isoDate.get(weekDef.dayOfWeek()); - if (jDOW != isoDOW) { - System.err.printf(" DOW vs Calendar jdow: %s, isoDate(DOW): %s, isoDate: %s, WeekDef: %s%n", jDOW, isoDOW, isoDate, weekDef); - } - assertEquals(jDOW, isoDOW, "Calendar DayOfWeek does not match ISO DayOfWeek"); + + int jdow = Math.floorMod(cal.get(Calendar.DAY_OF_WEEK) - 2, 7) + 1; + int dow = isoDate.get(weekDef.dayOfWeek()); + assertEquals(jdow, dow, "Calendar DayOfWeek does not match ISO DayOfWeek"); int jweekOfMonth = cal.get(Calendar.WEEK_OF_MONTH); int isoWeekOfMonth = isoDate.get(weekDef.weekOfMonth()); - if (jweekOfMonth != isoWeekOfMonth) { - System.err.printf(" WeekOfMonth jWeekOfMonth: %s, isoWeekOfMonth: %s, isoDate: %s, %s%n", - jweekOfMonth, isoWeekOfMonth, isoDate, weekDef); - } assertEquals(jweekOfMonth, isoWeekOfMonth, "Calendar WeekOfMonth does not match ISO WeekOfMonth"); int jweekOfYear = cal.get(Calendar.WEEK_OF_YEAR); - int isoWeekOfYear = isoDate.get(weekDef.weekOfYear()); - if (jweekOfYear != isoWeekOfYear) { - // TBD: Issue #186 Remove misleading output pending resolution - // System.err.printf(" Mismatch WeekOfYear jweekOfYear: %s, isoWeekOfYear: %s, isoDate: %s, WeekDef: %s%n", jweekOfYear, isoWeekOfYear, isoDate, weekDef); - } - //assertEquals(jweekOfYear, isoWeekOfYear, "Calendar WeekOfYear does not match ISO WeekOfYear"); + int weekOfYear = isoDate.get(weekDef.weekOfWeekBasedYear()); + assertEquals(jweekOfYear, weekOfYear, "GregorianCalendar WeekOfYear does not match WeekOfWeekBasedYear"); + + int jWeekYear = cal.getWeekYear(); + int weekBasedYear = isoDate.get(weekDef.weekBasedYear()); + assertEquals(jWeekYear, weekBasedYear, "GregorianCalendar getWeekYear does not match YearOfWeekBasedYear"); + + int jweeksInWeekyear = cal.getWeeksInWeekYear(); + int weeksInWeekBasedYear = (int)isoDate.range(weekDef.weekOfWeekBasedYear()).getMaximum(); + assertEquals(jweeksInWeekyear, weeksInWeekBasedYear, "length of weekBasedYear"); isoDate = isoDate.plus(1, ChronoUnit.DAYS); cal.add(Calendar.DAY_OF_MONTH, 1); diff --git a/jdk/test/java/time/test/java/time/temporal/TestJapaneseChronoImpl.java b/jdk/test/java/time/test/java/time/chrono/TestJapaneseChronoImpl.java similarity index 97% rename from jdk/test/java/time/test/java/time/temporal/TestJapaneseChronoImpl.java rename to jdk/test/java/time/test/java/time/chrono/TestJapaneseChronoImpl.java index ababf14cb4a..282a9f2231d 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestJapaneseChronoImpl.java +++ b/jdk/test/java/time/test/java/time/chrono/TestJapaneseChronoImpl.java @@ -54,22 +54,21 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package test.java.time.temporal; +package test.java.time.chrono; import static org.testng.Assert.assertEquals; -import java.util.Calendar; -import java.util.Locale; -import java.util.TimeZone; import java.time.LocalDate; import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.ZoneOffset; -import java.time.temporal.ChronoField; -import java.time.chrono.ChronoLocalDate; -import java.time.temporal.ChronoUnit; import java.time.chrono.JapaneseChronology; import java.time.chrono.JapaneseDate; +import java.time.temporal.ChronoField; +import java.time.temporal.ChronoUnit; +import java.util.Calendar; +import java.util.Locale; +import java.util.TimeZone; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -93,7 +92,7 @@ public class TestJapaneseChronoImpl { //----------------------------------------------------------------------- // Verify Japanese Calendar matches java.util.Calendar for range //----------------------------------------------------------------------- - @Test(groups={"implementation"}, dataProvider="RangeVersusCalendar") + @Test(dataProvider="RangeVersusCalendar") public void test_JapaneseChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) { Locale locale = Locale.forLanguageTag("ja-JP-u-ca-japanese"); assertEquals(locale.toString(), "ja_JP_#u-ca-japanese", "Unexpected locale"); diff --git a/jdk/test/java/time/test/java/time/chrono/TestServiceLoader.java b/jdk/test/java/time/test/java/time/chrono/TestServiceLoader.java index 99304a74cd5..b64f8f4d05b 100644 --- a/jdk/test/java/time/test/java/time/chrono/TestServiceLoader.java +++ b/jdk/test/java/time/test/java/time/chrono/TestServiceLoader.java @@ -60,10 +60,11 @@ package test.java.time.chrono; import static org.testng.Assert.assertNotNull; +import java.time.chrono.Chronology; import java.util.HashMap; import java.util.Map; import java.util.ServiceLoader; -import java.time.chrono.Chronology; + import org.testng.annotations.Test; /** @@ -73,7 +74,7 @@ import org.testng.annotations.Test; @Test public class TestServiceLoader { - @Test(groups="implementation") + @Test public void test_copticServiceLoader() { Map chronos = new HashMap<>(); ServiceLoader loader = ServiceLoader.load(Chronology.class, null); diff --git a/jdk/test/java/time/test/java/time/temporal/TestThaiBuddhistChronoImpl.java b/jdk/test/java/time/test/java/time/chrono/TestThaiBuddhistChronoImpl.java similarity index 97% rename from jdk/test/java/time/test/java/time/temporal/TestThaiBuddhistChronoImpl.java rename to jdk/test/java/time/test/java/time/chrono/TestThaiBuddhistChronoImpl.java index 14b0a45fe0c..94bbe0f94dd 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestThaiBuddhistChronoImpl.java +++ b/jdk/test/java/time/test/java/time/chrono/TestThaiBuddhistChronoImpl.java @@ -54,23 +54,21 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package test.java.time.temporal; +package test.java.time.chrono; import static org.testng.Assert.assertEquals; +import java.time.LocalDate; +import java.time.chrono.ThaiBuddhistChronology; +import java.time.chrono.ThaiBuddhistDate; +import java.time.temporal.ChronoField; +import java.time.temporal.ChronoUnit; import java.util.Calendar; import java.util.Locale; import java.util.TimeZone; -import java.time.LocalDate; -import java.time.temporal.ChronoField; -import java.time.temporal.ChronoUnit; -import java.time.chrono.ChronoLocalDate; -import java.time.chrono.ThaiBuddhistChronology; -import java.time.chrono.ThaiBuddhistDate; - -import org.testng.annotations.Test; import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; /** * Test. @@ -91,7 +89,7 @@ public class TestThaiBuddhistChronoImpl { //----------------------------------------------------------------------- // Verify ThaiBuddhist Calendar matches java.util.Calendar for range //----------------------------------------------------------------------- - @Test(groups={"implementation"}, dataProvider="RangeVersusCalendar") + @Test(dataProvider="RangeVersusCalendar") public void test_ThaiBuddhistChrono_vsCalendar(LocalDate isoStartDate, LocalDate isoEndDate) { Locale locale = Locale.forLanguageTag("th-TH--u-ca-buddhist"); assertEquals(locale.toString(), "th_TH", "Unexpected locale"); diff --git a/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java b/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java new file mode 100644 index 00000000000..3e1b8a85803 --- /dev/null +++ b/jdk/test/java/time/test/java/time/chrono/TestUmmAlQuraChronology.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package test.java.time.chrono; + +import static java.time.temporal.ChronoField.DAY_OF_MONTH; +import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.YEAR; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; + +import java.time.DateTimeException; +import java.time.LocalDate; +import java.time.chrono.Chronology; +import java.time.chrono.HijrahChronology; +import java.time.chrono.HijrahDate; +import java.time.temporal.ChronoField; +import java.time.temporal.ChronoUnit; +import java.time.temporal.ValueRange; + +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +/** + * Tests for the Umm alQura chronology and data + */ +@Test +public class TestUmmAlQuraChronology { + + @Test + public void test_aliases() { + HijrahChronology hc = (HijrahChronology) Chronology.of("Hijrah"); + assertEquals(hc, HijrahChronology.INSTANCE, "Alias for Hijrah-umalqura"); + hc = (HijrahChronology) Chronology.of("islamic"); + assertEquals(hc, HijrahChronology.INSTANCE, "Alias for Hijrah-umalqura"); + } + + //----------------------------------------------------------------------- + // regular data factory for Umm alQura dates and the corresponding ISO dates + //----------------------------------------------------------------------- + @DataProvider(name = "UmmalQuraVsISODates") + Object[][] data_of_ummalqura() { + return new Object[][]{ + + //{1318, 01, 01, 1900, 04, 30}, + //{1318, 01, 02, 1900, 05, 01}, + + //{1318, 12, 29, 1901, 04, 18}, + //{1319, 01, 01, 1901, 04, 19}, + + //{1433, 12, 29, 2012, 11, 14}, + //{1434, 01, 01, 2012, 11, 15}, + + {1434, 02, 18, 2012, 12, 31}, + {1434, 02, 19, 2013, 01, 01}, + + //{1502, 12, 30, 2079, 10, 25}, + // not in Umm alQura data {1503, 01, 01, 2079, 10, 26}, + + // not in Umm alQura data {1503, 06, 28, 2080, 04, 18}, + // not in Umm alQura data ~/ws/Downloads + }; + } + + @Test(dataProvider="UmmalQuraVsISODates") + public void Test_UmmAlQuraDatesVsISO(int h_year, int h_month, int h_day, int iso_year, int iso_month, int iso_day) { + HijrahDate hd = HijrahDate.of(h_year, h_month, h_day); + LocalDate ld = LocalDate.of(iso_year, iso_month, iso_day); + assertEquals(hd.toEpochDay(), ld.toEpochDay(), "Umm alQura date and ISO date should have same epochDay"); + } + + + @Test + public void Test_UmmAlQuraChronoRange() { + HijrahChronology chrono = HijrahChronology.INSTANCE; + ValueRange year = chrono.range(YEAR); + assertEquals(year.getMinimum(), 1432, "Minimum year"); + assertEquals(year.getLargestMinimum(), 1432, "Largest minimum year"); + assertEquals(year.getMaximum(), 1435, "Largest year"); + assertEquals(year.getSmallestMaximum(), 1435, "Smallest Maximum year"); + + ValueRange month = chrono.range(MONTH_OF_YEAR); + assertEquals(month.getMinimum(), 1, "Minimum month"); + assertEquals(month.getLargestMinimum(), 1, "Largest minimum month"); + assertEquals(month.getMaximum(), 12, "Largest month"); + assertEquals(month.getSmallestMaximum(), 12, "Smallest Maximum month"); + + ValueRange day = chrono.range(DAY_OF_MONTH); + assertEquals(day.getMinimum(), 1, "Minimum day"); + assertEquals(day.getLargestMinimum(), 1, "Largest minimum day"); + assertEquals(day.getMaximum(), 30, "Largest day"); + assertEquals(day.getSmallestMaximum(), 29, "Smallest Maximum day"); + } + + //----------------------------------------------------------------------- + // regular data factory for dates and the corresponding range values + //----------------------------------------------------------------------- + @DataProvider(name = "dates") + Object[][] data_of_calendars() { + return new Object[][]{ + {HijrahDate.of(1434, 5, 1), 1432, 1435, 1, 12, 1, 29, 30}, + {HijrahDate.of(1434, 6, 1), 1432, 1435, 1, 12, 1, 30, 30}, + }; + } + + @Test(dataProvider="dates") + public void Test_UmmAlQuraRanges(HijrahDate date, + int minYear, int maxYear, + int minMonth, int maxMonth, + int minDay, int maxDay, int maxChronoDay) { + // Check the chronology ranges + HijrahChronology chrono = date.getChronology(); + ValueRange yearRange = chrono.range(YEAR); + assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah chronology"); + assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah chronology"); + assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah chronology"); + assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest Maximum year for Hijrah chronology"); + + ValueRange monthRange = chrono.range(MONTH_OF_YEAR); + assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for Hijrah chronology"); + assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for Hijrah chronology"); + + ValueRange daysRange = chrono.range(DAY_OF_MONTH); + assertEquals(daysRange.getMinimum(), minDay, "Minimum day for chronology"); + assertEquals(daysRange.getMaximum(), maxChronoDay, "Maximum day for Hijrah chronology"); + + // Check the date ranges + yearRange = date.range(YEAR); + assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); + assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); + assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); + assertEquals(yearRange.getSmallestMaximum(), maxYear, "Smallest maximum year for Hijrah date"); + + monthRange = date.range(MONTH_OF_YEAR); + assertEquals(monthRange.getMinimum(), minMonth, "Minimum month for HijrahDate"); + assertEquals(monthRange.getMaximum(), maxMonth, "Maximum month for HijrahDate"); + + daysRange = date.range(DAY_OF_MONTH); + assertEquals(daysRange.getMinimum(), minDay, "Minimum day for HijrahDate"); + assertEquals(daysRange.getMaximum(), maxDay, "Maximum day for HijrahDate"); + + } + + @Test + public void test_hijrahDateLimits() { + HijrahChronology chrono = HijrahChronology.INSTANCE; + ValueRange yearRange = chrono.range(YEAR); + ValueRange monthRange = chrono.range(MONTH_OF_YEAR); + ValueRange dayRange = chrono.range(DAY_OF_MONTH); + + HijrahDate xx = chrono.date(1434, 1, 1); + HijrahDate minDate = chrono.date((int)yearRange.getLargestMinimum(), + (int)monthRange.getMinimum(), (int)dayRange.getMinimum()); + try { + HijrahDate before = minDate.minus(1, ChronoUnit.DAYS); + fail("Exception did not occur, minDate: " + minDate + ".minus(1, DAYS) = " + before); + + } catch (DateTimeException ex) { + // ignore, this exception was expected + } + + HijrahDate maxDate = chrono.date((int)yearRange.getSmallestMaximum(), + (int)monthRange.getMaximum(), 1); + int monthLen = maxDate.lengthOfMonth(); + maxDate = maxDate.with(DAY_OF_MONTH, monthLen); + try { + HijrahDate after = maxDate.plus(1, ChronoUnit.DAYS); + fail("Exception did not occur, maxDate: " + maxDate + ".plus(1, DAYS) = " + after); + } catch (DateTimeException ex) { + // ignore, this exception was expected + } + } + + @DataProvider(name="badDates") + Object[][] data_badDates() { + return new Object[][] { + {1317, 12, 29}, + {1317, 12, 30}, + + {1320, 1, 29 + 1}, + {1320, 2, 30 + 1}, + {1320, 3, 29 + 1}, + {1320, 4, 29 + 1}, + {1320, 5, 30 + 1}, + {1320, 6, 29 + 1}, + {1320, 7, 30 + 1}, + {1320, 8, 30 + 1}, + {1320, 9, 29 + 1}, + {1320, 10, 30 + 1}, + {1320, 11, 30 + 1}, + {1320, 12, 30 + 1}, + }; + } + + @Test(dataProvider="badDates", expectedExceptions=DateTimeException.class) + public void test_badDates(int year, int month, int dom) { + HijrahChronology.INSTANCE.date(year, month, dom); + } + + void printRange(ValueRange range, Object obj, ChronoField field) { + System.err.printf(" range: min: %d, max: %d; of: %s, field: %s%n", range.getMinimum(), range.getMaximum(), obj.toString(), field.toString()); + } +} diff --git a/jdk/test/java/time/test/java/time/format/AbstractTestPrinterParser.java b/jdk/test/java/time/test/java/time/format/AbstractTestPrinterParser.java index c1b0ad2a18e..e11a24dd0c7 100644 --- a/jdk/test/java/time/test/java/time/format/AbstractTestPrinterParser.java +++ b/jdk/test/java/time/test/java/time/format/AbstractTestPrinterParser.java @@ -59,16 +59,18 @@ */ package test.java.time.format; -import java.time.format.*; - -import java.util.Locale; - import java.time.DateTimeException; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatSymbols; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.SignStyle; +import java.time.format.TextStyle; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; +import java.util.Locale; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -86,7 +88,7 @@ public class AbstractTestPrinterParser { protected DateTimeFormatSymbols symbols; - @BeforeMethod(groups={"tck"}) + @BeforeMethod public void setUp() { buf = new StringBuilder(); builder = new DateTimeFormatterBuilder(); @@ -123,6 +125,10 @@ public class AbstractTestPrinterParser { return builder.appendLiteral(s).toFormatter(locale).withSymbols(symbols); } + protected DateTimeFormatter getFormatter(TemporalField field) { + return builder.appendText(field).toFormatter(locale).withSymbols(symbols); + } + protected DateTimeFormatter getFormatter(TemporalField field, TextStyle style) { return builder.appendText(field, style).toFormatter(locale).withSymbols(symbols); } @@ -135,6 +141,10 @@ public class AbstractTestPrinterParser { return builder.appendOffset(pattern, noOffsetText).toFormatter(locale).withSymbols(symbols); } + protected DateTimeFormatter getPatternFormatter(String pattern) { + return builder.appendPattern(pattern).toFormatter(locale).withSymbols(symbols); + } + protected static final TemporalAccessor EMPTY_DTA = new TemporalAccessor() { public boolean isSupported(TemporalField field) { return true; diff --git a/jdk/test/java/time/test/java/time/format/MockIOExceptionAppendable.java b/jdk/test/java/time/test/java/time/format/MockIOExceptionAppendable.java index 8cdedccdf8f..f3608b501f8 100644 --- a/jdk/test/java/time/test/java/time/format/MockIOExceptionAppendable.java +++ b/jdk/test/java/time/test/java/time/format/MockIOExceptionAppendable.java @@ -59,8 +59,6 @@ */ package test.java.time.format; -import java.time.format.*; - import java.io.IOException; /** diff --git a/jdk/test/java/time/test/java/time/format/TestCharLiteralParser.java b/jdk/test/java/time/test/java/time/format/TestCharLiteralParser.java index ff73696c3e5..92cd6f885d9 100644 --- a/jdk/test/java/time/test/java/time/format/TestCharLiteralParser.java +++ b/jdk/test/java/time/test/java/time/format/TestCharLiteralParser.java @@ -65,8 +65,8 @@ import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; import java.text.ParsePosition; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQuery; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -74,7 +74,7 @@ import org.testng.annotations.Test; /** * Test CharLiteralPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestCharLiteralParser extends AbstractTestPrinterParser { @DataProvider(name="success") @@ -111,8 +111,8 @@ public class TestCharLiteralParser extends AbstractTestPrinterParser { } else { assertEquals(ppos.getIndex(), expectedPos); assertEquals(parsed.isSupported(YEAR), false); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } diff --git a/jdk/test/java/time/test/java/time/format/TestCharLiteralPrinter.java b/jdk/test/java/time/test/java/time/format/TestCharLiteralPrinter.java index 780c04db8cb..6aaf6a5b97d 100644 --- a/jdk/test/java/time/test/java/time/format/TestCharLiteralPrinter.java +++ b/jdk/test/java/time/test/java/time/format/TestCharLiteralPrinter.java @@ -59,8 +59,6 @@ */ package test.java.time.format; -import java.time.format.*; - import static org.testng.Assert.assertEquals; import org.testng.annotations.Test; @@ -68,7 +66,7 @@ import org.testng.annotations.Test; /** * Test CharLiteralPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestCharLiteralPrinter extends AbstractTestPrinterParser { //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatSymbols.java b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatSymbols.java index fe2d408a6f9..cb3932a3932 100644 --- a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatSymbols.java +++ b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatSymbols.java @@ -59,10 +59,9 @@ */ package test.java.time.format; -import java.time.format.*; - import static org.testng.Assert.assertSame; +import java.time.format.DateTimeFormatSymbols; import java.util.Locale; import org.testng.annotations.Test; @@ -73,7 +72,7 @@ import org.testng.annotations.Test; @Test public class TestDateTimeFormatSymbols { - @Test(groups={"implementation"}) + @Test public void test_of_Locale_cached() { DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.of(Locale.CANADA); DateTimeFormatSymbols loc2 = DateTimeFormatSymbols.of(Locale.CANADA); @@ -81,7 +80,7 @@ public class TestDateTimeFormatSymbols { } //----------------------------------------------------------------------- - @Test(groups={"implementation"}) + @Test public void test_ofDefaultLocale_cached() { DateTimeFormatSymbols loc1 = DateTimeFormatSymbols.ofDefaultLocale(); DateTimeFormatSymbols loc2 = DateTimeFormatSymbols.ofDefaultLocale(); diff --git a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java index 61b0806f958..a96dfb6b455 100644 --- a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java +++ b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatter.java @@ -59,14 +59,15 @@ */ package test.java.time.format; -import java.time.format.*; - import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static org.testng.Assert.assertSame; +import java.time.format.DateTimeFormatSymbols; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.SignStyle; import java.util.Locale; -import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; /** @@ -74,14 +75,8 @@ import org.testng.annotations.Test; */ @Test public class TestDateTimeFormatter { - // TODO these tests are not tck, as they refer to a non-public class - // rewrite whole test case to use BASIC_FORMATTER or similar - @BeforeMethod(groups={"tck"}) - public void setUp() { - } - - @Test(groups={"implementation"}) + @Test public void test_withLocale_same() throws Exception { DateTimeFormatter base = new DateTimeFormatterBuilder().appendLiteral("ONE") diff --git a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java index ec0d16e8fd4..432c0381f06 100644 --- a/jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java +++ b/jdk/test/java/time/test/java/time/format/TestDateTimeFormatterBuilder.java @@ -645,17 +645,23 @@ public class TestDateTimeFormatterBuilder { {"GGGG", "Text(Era)"}, {"GGGGG", "Text(Era,NARROW)"}, - {"y", "Value(Year)"}, - {"yy", "ReducedValue(Year,2,2000)"}, - {"yyy", "Value(Year,3,19,NORMAL)"}, - {"yyyy", "Value(Year,4,19,EXCEEDS_PAD)"}, - {"yyyyy", "Value(Year,5,19,EXCEEDS_PAD)"}, + {"u", "Value(Year)"}, + {"uu", "ReducedValue(Year,2,2000)"}, + {"uuu", "Value(Year,3,19,NORMAL)"}, + {"uuuu", "Value(Year,4,19,EXCEEDS_PAD)"}, + {"uuuuu", "Value(Year,5,19,EXCEEDS_PAD)"}, -// {"Y", "Value(WeekBasedYear)"}, -// {"YY", "ReducedValue(WeekBasedYear,2,2000)"}, -// {"YYY", "Value(WeekBasedYear,3,19,NORMAL)"}, -// {"YYYY", "Value(WeekBasedYear,4,19,EXCEEDS_PAD)"}, -// {"YYYYY", "Value(WeekBasedYear,5,19,EXCEEDS_PAD)"}, + {"y", "Value(YearOfEra)"}, + {"yy", "ReducedValue(YearOfEra,2,2000)"}, + {"yyy", "Value(YearOfEra,3,19,NORMAL)"}, + {"yyyy", "Value(YearOfEra,4,19,EXCEEDS_PAD)"}, + {"yyyyy", "Value(YearOfEra,5,19,EXCEEDS_PAD)"}, + + {"Y", "Localized(WeekBasedYear)"}, + {"YY", "Localized(ReducedValue(WeekBasedYear,2,2000))"}, + {"YYY", "Localized(WeekBasedYear,3,19,NORMAL)"}, + {"YYYY", "Localized(WeekBasedYear,4,19,EXCEEDS_PAD)"}, + {"YYYYY", "Localized(WeekBasedYear,5,19,EXCEEDS_PAD)"}, {"M", "Value(MonthOfYear)"}, {"MM", "Value(MonthOfYear,2)"}, @@ -663,17 +669,20 @@ public class TestDateTimeFormatterBuilder { {"MMMM", "Text(MonthOfYear)"}, {"MMMMM", "Text(MonthOfYear,NARROW)"}, + {"L", "Value(MonthOfYear)"}, + {"LL", "Value(MonthOfYear,2)"}, + {"LLL", "Text(MonthOfYear,SHORT_STANDALONE)"}, + {"LLLL", "Text(MonthOfYear,FULL_STANDALONE)"}, + {"LLLLL", "Text(MonthOfYear,NARROW_STANDALONE)"}, + {"D", "Value(DayOfYear)"}, {"DD", "Value(DayOfYear,2)"}, {"DDD", "Value(DayOfYear,3)"}, {"d", "Value(DayOfMonth)"}, {"dd", "Value(DayOfMonth,2)"}, - {"ddd", "Value(DayOfMonth,3)"}, - {"F", "Value(AlignedWeekOfMonth)"}, - {"FF", "Value(AlignedWeekOfMonth,2)"}, - {"FFF", "Value(AlignedWeekOfMonth,3)"}, + {"F", "Value(AlignedDayOfWeekInMonth)"}, {"Q", "Value(QuarterOfYear)"}, {"QQ", "Value(QuarterOfYear,2)"}, @@ -681,41 +690,48 @@ public class TestDateTimeFormatterBuilder { {"QQQQ", "Text(QuarterOfYear)"}, {"QQQQQ", "Text(QuarterOfYear,NARROW)"}, - {"E", "Value(DayOfWeek)"}, - {"EE", "Value(DayOfWeek,2)"}, + {"q", "Value(QuarterOfYear)"}, + {"qq", "Value(QuarterOfYear,2)"}, + {"qqq", "Text(QuarterOfYear,SHORT_STANDALONE)"}, + {"qqqq", "Text(QuarterOfYear,FULL_STANDALONE)"}, + {"qqqqq", "Text(QuarterOfYear,NARROW_STANDALONE)"}, + + {"E", "Text(DayOfWeek,SHORT)"}, + {"EE", "Text(DayOfWeek,SHORT)"}, {"EEE", "Text(DayOfWeek,SHORT)"}, {"EEEE", "Text(DayOfWeek)"}, {"EEEEE", "Text(DayOfWeek,NARROW)"}, + {"e", "Localized(DayOfWeek,1)"}, + {"ee", "Localized(DayOfWeek,2)"}, + {"eee", "Text(DayOfWeek,SHORT)"}, + {"eeee", "Text(DayOfWeek)"}, + {"eeeee", "Text(DayOfWeek,NARROW)"}, + + {"c", "Localized(DayOfWeek,1)"}, + {"ccc", "Text(DayOfWeek,SHORT_STANDALONE)"}, + {"cccc", "Text(DayOfWeek,FULL_STANDALONE)"}, + {"ccccc", "Text(DayOfWeek,NARROW_STANDALONE)"}, + {"a", "Text(AmPmOfDay,SHORT)"}, - {"aa", "Text(AmPmOfDay,SHORT)"}, - {"aaa", "Text(AmPmOfDay,SHORT)"}, - {"aaaa", "Text(AmPmOfDay)"}, - {"aaaaa", "Text(AmPmOfDay,NARROW)"}, {"H", "Value(HourOfDay)"}, {"HH", "Value(HourOfDay,2)"}, - {"HHH", "Value(HourOfDay,3)"}, {"K", "Value(HourOfAmPm)"}, {"KK", "Value(HourOfAmPm,2)"}, - {"KKK", "Value(HourOfAmPm,3)"}, {"k", "Value(ClockHourOfDay)"}, {"kk", "Value(ClockHourOfDay,2)"}, - {"kkk", "Value(ClockHourOfDay,3)"}, {"h", "Value(ClockHourOfAmPm)"}, {"hh", "Value(ClockHourOfAmPm,2)"}, - {"hhh", "Value(ClockHourOfAmPm,3)"}, {"m", "Value(MinuteOfHour)"}, {"mm", "Value(MinuteOfHour,2)"}, - {"mmm", "Value(MinuteOfHour,3)"}, {"s", "Value(SecondOfMinute)"}, {"ss", "Value(SecondOfMinute,2)"}, - {"sss", "Value(SecondOfMinute,3)"}, {"S", "Fraction(NanoOfSecond,1,1)"}, {"SS", "Fraction(NanoOfSecond,2,2)"}, @@ -760,22 +776,20 @@ public class TestDateTimeFormatterBuilder { {"ppH", "Pad(Value(HourOfDay),2)"}, {"pppDD", "Pad(Value(DayOfYear,2),3)"}, - {"yyyy[-MM[-dd", "Value(Year,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"}, - {"yyyy[-MM[-dd]]", "Value(Year,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"}, - {"yyyy[-MM[]-dd]", "Value(Year,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)]"}, + {"yyyy[-MM[-dd", "Value(YearOfEra,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"}, + {"yyyy[-MM[-dd]]", "Value(YearOfEra,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)['-'Value(DayOfMonth,2)]]"}, + {"yyyy[-MM[]-dd]", "Value(YearOfEra,4,19,EXCEEDS_PAD)['-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)]"}, - {"yyyy-MM-dd'T'HH:mm:ss.SSS", "Value(Year,4,19,EXCEEDS_PAD)'-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)" + + {"yyyy-MM-dd'T'HH:mm:ss.SSS", "Value(YearOfEra,4,19,EXCEEDS_PAD)'-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)" + "'T'Value(HourOfDay,2)':'Value(MinuteOfHour,2)':'Value(SecondOfMinute,2)'.'Fraction(NanoOfSecond,3,3)"}, - {"e", "WeekBased(e1)"}, - {"w", "WeekBased(w1)"}, - {"W", "WeekBased(W1)"}, - {"WW", "WeekBased(W2)"}, - + {"w", "Localized(WeekOfWeekBasedYear,1)"}, + {"ww", "Localized(WeekOfWeekBasedYear,2)"}, + {"W", "Localized(WeekOfMonth,1)"}, }; } - @Test(dataProvider="validPatterns", groups={"implementation"}) + @Test(dataProvider="validPatterns") public void test_appendPattern_valid(String input, String expected) throws Exception { builder.appendPattern(input); DateTimeFormatter f = builder.toFormatter(); @@ -798,12 +812,34 @@ public class TestDateTimeFormatterBuilder { {"yyyy]MM"}, {"yyyy[MM]]"}, - {"MMMMMM"}, - {"QQQQQQ"}, - {"EEEEEE"}, + {"aa"}, + {"aaa"}, + {"aaaa"}, + {"aaaaa"}, {"aaaaaa"}, - {"ZZZZ"}, + {"MMMMMM"}, + {"LLLLLL"}, + {"QQQQQQ"}, + {"qqqqqq"}, + {"EEEEEE"}, + {"eeeeee"}, + {"cc"}, + {"cccccc"}, + {"ddd"}, + {"DDDD"}, + {"FF"}, + {"FFF"}, + {"hhh"}, + {"HHH"}, + {"kkk"}, + {"KKK"}, + {"mmm"}, + {"sss"}, + {"OO"}, + {"OOO"}, + {"OOOOO"}, {"XXXXXX"}, + {"ZZZZZZ"}, {"zzzzz"}, {"V"}, {"VVV"}, @@ -823,9 +859,8 @@ public class TestDateTimeFormatterBuilder { {"fa"}, {"fM"}, - {"ww"}, - {"ee"}, - {"WWW"}, + {"www"}, + {"WW"}, }; } @@ -844,9 +879,9 @@ public class TestDateTimeFormatterBuilder { return new Object[][] { {"Q", date(2012, 2, 10), "1"}, {"QQ", date(2012, 2, 10), "01"}, -// {"QQQ", date(2012, 2, 10), "Q1"}, // TODO: data for quarters? -// {"QQQQ", date(2012, 2, 10), "Q1"}, -// {"QQQQQ", date(2012, 2, 10), "Q1"}, + {"QQQ", date(2012, 2, 10), "Q1"}, + {"QQQQ", date(2012, 2, 10), "1st quarter"}, + {"QQQQQ", date(2012, 2, 10), "1"}, }; } diff --git a/jdk/test/java/time/test/java/time/format/TestDateTimeTextProvider.java b/jdk/test/java/time/test/java/time/format/TestDateTimeTextProvider.java index 1d34a2d05f1..056dfa22dcd 100644 --- a/jdk/test/java/time/test/java/time/format/TestDateTimeTextProvider.java +++ b/jdk/test/java/time/test/java/time/format/TestDateTimeTextProvider.java @@ -59,17 +59,16 @@ */ package test.java.time.format; -import java.time.format.*; - import static java.time.temporal.ChronoField.AMPM_OF_DAY; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static org.testng.Assert.assertEquals; -import java.util.Locale; - import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.TextStyle; import java.time.temporal.TemporalField; +import java.util.Locale; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -77,7 +76,7 @@ import org.testng.annotations.Test; /** * Test SimpleDateTimeTextProvider. */ -@Test(groups={"implementation"}) +@Test public class TestDateTimeTextProvider extends AbstractTestPrinterParser { Locale enUS = new Locale("en", "US"); diff --git a/jdk/test/java/time/test/java/time/format/TestFractionPrinterParser.java b/jdk/test/java/time/test/java/time/format/TestFractionPrinterParser.java index 2925c9f7988..ae940540f6c 100644 --- a/jdk/test/java/time/test/java/time/format/TestFractionPrinterParser.java +++ b/jdk/test/java/time/test/java/time/format/TestFractionPrinterParser.java @@ -78,7 +78,7 @@ import test.java.time.temporal.MockFieldValue; /** * Test FractionPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestFractionPrinterParser extends AbstractTestPrinterParser { private DateTimeFormatter getFormatter(TemporalField field, int minWidth, int maxWidth, boolean decimalPoint) { diff --git a/jdk/test/java/time/test/java/time/format/TestNonIsoFormatter.java b/jdk/test/java/time/test/java/time/format/TestNonIsoFormatter.java index 43a603cceae..24852eff096 100644 --- a/jdk/test/java/time/test/java/time/format/TestNonIsoFormatter.java +++ b/jdk/test/java/time/test/java/time/format/TestNonIsoFormatter.java @@ -22,16 +22,29 @@ */ package test.java.time.format; -import java.time.*; -import java.time.chrono.*; -import java.time.format.*; -import java.time.temporal.*; +import static org.testng.Assert.assertEquals; + +import java.time.LocalDate; +import java.time.chrono.ChronoLocalDate; +import java.time.chrono.Chronology; +import java.time.chrono.HijrahChronology; +import java.time.chrono.IsoChronology; +import java.time.chrono.JapaneseChronology; +import java.time.chrono.MinguoChronology; +import java.time.chrono.ThaiBuddhistChronology; +import java.time.format.DateTimeFormatSymbols; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.DateTimeParseException; +import java.time.format.FormatStyle; +import java.time.format.TextStyle; +import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQuery; import java.util.Locale; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; /** * Test DateTimeFormatter with non-ISO chronology. @@ -39,8 +52,9 @@ import static org.testng.Assert.assertEquals; * Strings in test data are all dependent on CLDR data which may change * in future CLDR releases. */ -@Test(groups={"implementation"}) +@Test public class TestNonIsoFormatter { + private static final Chronology ISO8601 = IsoChronology.INSTANCE; private static final Chronology JAPANESE = JapaneseChronology.INSTANCE; private static final Chronology HIJRAH = HijrahChronology.INSTANCE; private static final Chronology MINGUO = MinguoChronology.INSTANCE; @@ -50,7 +64,8 @@ public class TestNonIsoFormatter { private static final Locale ARABIC = new Locale("ar"); private static final Locale thTH = new Locale("th", "TH"); - private static final Locale thTHTH = new Locale("th", "TH", "TH"); + private static final Locale thTHTH = Locale.forLanguageTag("th-TH-u-nu-thai"); + private static final Locale jaJPJP = Locale.forLanguageTag("ja-JP-u-ca-japanese"); @BeforeMethod public void setUp() { @@ -59,19 +74,22 @@ public class TestNonIsoFormatter { @DataProvider(name="format_data") Object[][] formatData() { return new Object[][] { - // Chronology, Locale, ChronoLocalDate, expected string - { JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate), - "\u5e73\u621025\u5e742\u670811\u65e5\u6708\u66dc\u65e5" }, // Japanese Heisei 25-02-11 (Mon) - { HIJRAH, ARABIC, HIJRAH.date(IsoDate), - "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 30 \u0631\u0628\u064a\u0639 " - + "\u0627\u0644\u0623\u0648\u0644 1434" }, // Hijrah AH 1434-03-30 (Mon) - { MINGUO, Locale.TAIWAN, MINGUO.date(IsoDate), + // Chronology, Format Locale, Numbering Locale, ChronoLocalDate, expected string + { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate), + "\u5e73\u621025\u5e742\u670811\u65e5" }, // Japanese Heisei 25-02-11 + { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate), + "\u0627\u0644\u0627\u062b\u0646\u064a\u0646\u060c 1 \u0631\u0628\u064a\u0639 " + + "\u0627\u0644\u0622\u062e\u0631 1434" }, // Hijrah AH 1434-04-01 (Mon) + { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate), "\u6c11\u570b102\u5e742\u670811\u65e5\u661f\u671f\u4e00" }, // Minguo ROC 102-02-11 (Mon) - { BUDDHIST, thTH, BUDDHIST.date(IsoDate), + { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate), "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48" + " 11 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c" + " \u0e1e.\u0e28. 2556" }, // ThaiBuddhist BE 2556-02-11 - // { BUDDHIST, thTHTH, BUDDHIST.date(IsoDate), "" }, // doesn't work + { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate), + "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48 \u0e51\u0e51 " + + "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e1e.\u0e28. " + + "\u0e52\u0e55\u0e55\u0e56" }, // ThaiBuddhist BE 2556-02-11 (with Thai digits) }; } @@ -79,23 +97,49 @@ public class TestNonIsoFormatter { Object[][] invalidText() { return new Object[][] { // TODO: currently fixed Chronology and Locale. - { "\u662d\u548c64\u5e741\u67089\u65e5\u6708\u66dc\u65e5" }, // S64.01.09 (Mon) + // line commented out, as S64.01.09 seems like a reasonable thing to parse + // (era "S" ended on S64.01.07, but a little leniency is a good thing +// { "\u662d\u548c64\u5e741\u67089\u65e5\u6708\u66dc\u65e5" }, // S64.01.09 (Mon) { "\u662d\u548c65\u5e741\u67081\u65e5\u6708\u66dc\u65e5" }, // S65.01.01 (Mon) }; } + @DataProvider(name="chrono_names") + Object[][] chronoNamesData() { + return new Object[][] { + // Chronology, Locale, Chronology Name + { ISO8601, Locale.ENGLISH, "ISO" }, // No data in CLDR; Use Id. + { BUDDHIST, Locale.ENGLISH, "Buddhist Calendar" }, + { HIJRAH, Locale.ENGLISH, "Hijrah-umalqura" }, // No data in CLDR; Use Id. + { JAPANESE, Locale.ENGLISH, "Japanese Calendar" }, + { MINGUO, Locale.ENGLISH, "Minguo Calendar" }, + + { ISO8601, Locale.JAPANESE, "ISO" }, // No data in CLDR; Use Id. + { JAPANESE, Locale.JAPANESE, "\u548c\u66a6" }, + { BUDDHIST, Locale.JAPANESE, "\u30bf\u30a4\u4ecf\u6559\u66a6" }, + + { ISO8601, thTH, "ISO" }, // No data in CLDR; Use Id. + { JAPANESE, thTH, "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19" }, + { BUDDHIST, thTH, "\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18" }, + }; + } + @Test(dataProvider="format_data") - public void test_formatLocalizedDate(Chronology chrono, Locale locale, ChronoLocalDate date, String expected) { + public void test_formatLocalizedDate(Chronology chrono, Locale formatLocale, Locale numberingLocale, + ChronoLocalDate date, String expected) { DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL) - .withChronology(chrono).withLocale(locale); + .withChronology(chrono).withLocale(formatLocale) + .withSymbols(DateTimeFormatSymbols.of(numberingLocale)); String text = dtf.format(date); assertEquals(text, expected); } @Test(dataProvider="format_data") - public void test_parseLocalizedText(Chronology chrono, Locale locale, ChronoLocalDate expected, String text) { + public void test_parseLocalizedText(Chronology chrono, Locale formatLocale, Locale numberingLocale, + ChronoLocalDate expected, String text) { DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL) - .withChronology(chrono).withLocale(locale); + .withChronology(chrono).withLocale(formatLocale) + .withSymbols(DateTimeFormatSymbols.of(numberingLocale)); TemporalAccessor temporal = dtf.parse(text); ChronoLocalDate date = chrono.date(temporal); assertEquals(date, expected); @@ -105,6 +149,17 @@ public class TestNonIsoFormatter { public void test_parseInvalidText(String text) { DateTimeFormatter dtf = DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL) .withChronology(JAPANESE).withLocale(Locale.JAPANESE); - TemporalAccessor temporal = dtf.parse(text); + dtf.parse(text); + } + + @Test(dataProvider="chrono_names") + public void test_chronoNames(Chronology chrono, Locale locale, String expected) { + DateTimeFormatter dtf = new DateTimeFormatterBuilder().appendChronologyText(TextStyle.SHORT) + .toFormatter(locale); + String text = dtf.format(chrono.dateNow()); + assertEquals(text, expected); + TemporalAccessor ta = dtf.parse(text); + Chronology cal = ta.query(TemporalQuery.chronology()); + assertEquals(cal, chrono); } } diff --git a/jdk/test/java/time/test/java/time/format/TestNumberParser.java b/jdk/test/java/time/test/java/time/format/TestNumberParser.java index 5dca693e80f..a6fc4a2ee47 100644 --- a/jdk/test/java/time/test/java/time/format/TestNumberParser.java +++ b/jdk/test/java/time/test/java/time/format/TestNumberParser.java @@ -70,9 +70,9 @@ import static org.testng.Assert.fail; import java.text.ParsePosition; import java.time.format.DateTimeFormatter; import java.time.format.SignStyle; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; +import java.time.temporal.TemporalQuery; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -80,7 +80,7 @@ import org.testng.annotations.Test; /** * Test NumberPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestNumberParser extends AbstractTestPrinterParser { //----------------------------------------------------------------------- @@ -178,8 +178,8 @@ public class TestNumberParser extends AbstractTestPrinterParser { assertTrue(subsequentWidth >= 0); assertEquals(ppos.getIndex(), expectedPos + subsequentWidth); assertEquals(parsed.getLong(DAY_OF_MONTH), expectedValue); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } @@ -198,8 +198,8 @@ public class TestNumberParser extends AbstractTestPrinterParser { assertTrue(subsequentWidth >= 0); assertEquals(ppos.getIndex(), expectedPos + subsequentWidth); assertEquals(parsed.getLong(DAY_OF_WEEK), expectedValue); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } @@ -313,8 +313,8 @@ public class TestNumberParser extends AbstractTestPrinterParser { } else { assertEquals(pos.getIndex(), parseLen); assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } @@ -423,8 +423,8 @@ public class TestNumberParser extends AbstractTestPrinterParser { } else { assertEquals(pos.getIndex(), parseLen); assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } @@ -514,8 +514,8 @@ public class TestNumberParser extends AbstractTestPrinterParser { } else { assertEquals(pos.getIndex(), parseLen); assertEquals(parsed.getLong(DAY_OF_MONTH), (long)parseVal); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } @@ -552,8 +552,8 @@ public class TestNumberParser extends AbstractTestPrinterParser { assertEquals(pos.getIndex(), parseLen); assertEquals(parsed.getLong(MONTH_OF_YEAR), (long) parseMonth); assertEquals(parsed.getLong(DAY_OF_MONTH), (long) parsedDay); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } diff --git a/jdk/test/java/time/test/java/time/format/TestPadPrinterDecorator.java b/jdk/test/java/time/test/java/time/format/TestPadPrinterDecorator.java index c8dcbf39c53..adb7677556a 100644 --- a/jdk/test/java/time/test/java/time/format/TestPadPrinterDecorator.java +++ b/jdk/test/java/time/test/java/time/format/TestPadPrinterDecorator.java @@ -69,7 +69,7 @@ import org.testng.annotations.Test; /** * Test PadPrinterDecorator. */ -@Test(groups={"implementation"}) +@Test public class TestPadPrinterDecorator extends AbstractTestPrinterParser { //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/format/TestReducedParser.java b/jdk/test/java/time/test/java/time/format/TestReducedParser.java index c1a41bbef95..b8ae45f8542 100644 --- a/jdk/test/java/time/test/java/time/format/TestReducedParser.java +++ b/jdk/test/java/time/test/java/time/format/TestReducedParser.java @@ -75,7 +75,7 @@ import org.testng.annotations.Test; /** * Test ReducedPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestReducedParser extends AbstractTestPrinterParser { private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { diff --git a/jdk/test/java/time/test/java/time/format/TestReducedPrinter.java b/jdk/test/java/time/test/java/time/format/TestReducedPrinter.java index 76060691910..b213b80fece 100644 --- a/jdk/test/java/time/test/java/time/format/TestReducedPrinter.java +++ b/jdk/test/java/time/test/java/time/format/TestReducedPrinter.java @@ -59,24 +59,23 @@ */ package test.java.time.format; -import java.time.format.*; - import static java.time.temporal.ChronoField.YEAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; import java.time.DateTimeException; import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.time.temporal.TemporalField; -import test.java.time.temporal.MockFieldValue; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import test.java.time.temporal.MockFieldValue; /** * Test ReducedPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestReducedPrinter extends AbstractTestPrinterParser { private DateTimeFormatter getFormatter0(TemporalField field, int width, int baseValue) { diff --git a/jdk/test/java/time/test/java/time/format/TestSettingsParser.java b/jdk/test/java/time/test/java/time/format/TestSettingsParser.java index ed3b0a58716..ce7b2d7f187 100644 --- a/jdk/test/java/time/test/java/time/format/TestSettingsParser.java +++ b/jdk/test/java/time/test/java/time/format/TestSettingsParser.java @@ -68,7 +68,7 @@ import org.testng.annotations.Test; /** * Test SettingsParser. */ -@Test(groups={"implementation"}) +@Test public class TestSettingsParser extends AbstractTestPrinterParser { //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/format/TestStringLiteralParser.java b/jdk/test/java/time/test/java/time/format/TestStringLiteralParser.java index a2096521bff..8b624417820 100644 --- a/jdk/test/java/time/test/java/time/format/TestStringLiteralParser.java +++ b/jdk/test/java/time/test/java/time/format/TestStringLiteralParser.java @@ -65,8 +65,8 @@ import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; import java.text.ParsePosition; -import java.time.temporal.Queries; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalQuery; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -74,7 +74,7 @@ import org.testng.annotations.Test; /** * Test StringLiteralPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestStringLiteralParser extends AbstractTestPrinterParser { @DataProvider(name="success") @@ -114,8 +114,8 @@ public class TestStringLiteralParser extends AbstractTestPrinterParser { } else { assertEquals(ppos.getIndex(), expectedPos); assertEquals(parsed.isSupported(YEAR), false); - assertEquals(parsed.query(Queries.chronology()), null); - assertEquals(parsed.query(Queries.zoneId()), null); + assertEquals(parsed.query(TemporalQuery.chronology()), null); + assertEquals(parsed.query(TemporalQuery.zoneId()), null); } } diff --git a/jdk/test/java/time/test/java/time/format/TestStringLiteralPrinter.java b/jdk/test/java/time/test/java/time/format/TestStringLiteralPrinter.java index 62d6a4efc0c..6733af164a4 100644 --- a/jdk/test/java/time/test/java/time/format/TestStringLiteralPrinter.java +++ b/jdk/test/java/time/test/java/time/format/TestStringLiteralPrinter.java @@ -59,8 +59,6 @@ */ package test.java.time.format; -import java.time.format.*; - import static org.testng.Assert.assertEquals; import org.testng.annotations.Test; @@ -68,7 +66,7 @@ import org.testng.annotations.Test; /** * Test StringLiteralPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestStringLiteralPrinter extends AbstractTestPrinterParser { //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/format/TestTextParser.java b/jdk/test/java/time/test/java/time/format/TestTextParser.java index 9e9c3f73973..07bd2146212 100644 --- a/jdk/test/java/time/test/java/time/format/TestTextParser.java +++ b/jdk/test/java/time/test/java/time/format/TestTextParser.java @@ -62,10 +62,13 @@ package test.java.time.format; import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.IsoFields.QUARTER_OF_YEAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import java.text.ParsePosition; +import java.time.DayOfWeek; +import java.time.format.DateTimeFormatter; import java.time.format.TextStyle; import java.time.temporal.TemporalAccessor; import java.time.temporal.TemporalField; @@ -77,8 +80,10 @@ import org.testng.annotations.Test; /** * Test TextPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestTextParser extends AbstractTestPrinterParser { + static final Locale RUSSIAN = new Locale("ru"); + static final Locale FINNISH = new Locale("fi"); //----------------------------------------------------------------------- @DataProvider(name="error") @@ -165,6 +170,21 @@ public class TestTextParser extends AbstractTestPrinterParser { {MONTH_OF_YEAR, TextStyle.SHORT, 1, "Jan"}, {MONTH_OF_YEAR, TextStyle.SHORT, 12, "Dec"}, + + {QUARTER_OF_YEAR, TextStyle.FULL, 1, "1st quarter"}, + {QUARTER_OF_YEAR, TextStyle.FULL, 2, "2nd quarter"}, + {QUARTER_OF_YEAR, TextStyle.FULL, 3, "3rd quarter"}, + {QUARTER_OF_YEAR, TextStyle.FULL, 4, "4th quarter"}, + + {QUARTER_OF_YEAR, TextStyle.SHORT, 1, "Q1"}, + {QUARTER_OF_YEAR, TextStyle.SHORT, 2, "Q2"}, + {QUARTER_OF_YEAR, TextStyle.SHORT, 3, "Q3"}, + {QUARTER_OF_YEAR, TextStyle.SHORT, 4, "Q4"}, + + {QUARTER_OF_YEAR, TextStyle.NARROW, 1, "1"}, + {QUARTER_OF_YEAR, TextStyle.NARROW, 2, "2"}, + {QUARTER_OF_YEAR, TextStyle.NARROW, 3, "3"}, + {QUARTER_OF_YEAR, TextStyle.NARROW, 4, "4"}, }; } @@ -183,6 +203,46 @@ public class TestTextParser extends AbstractTestPrinterParser { }; } + // Test data is dependent on localized resources. + @DataProvider(name="parseStandaloneText") + Object[][] providerStandaloneText() { + // Locale, TemporalField, TextStyle, expected value, input text + return new Object[][] { + {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE, 1, "\u042f\u043d\u0432\u0430\u0440\u044c"}, + {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE, 12, "\u0414\u0435\u043a\u0430\u0431\u0440\u044c"}, + {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, 1, "\u042f\u043d\u0432."}, + {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, 12, "\u0414\u0435\u043a."}, + {FINNISH, DAY_OF_WEEK, TextStyle.FULL_STANDALONE, 2, "tiistai"}, + {FINNISH, DAY_OF_WEEK, TextStyle.SHORT_STANDALONE, 2, "ti"}, + }; + } + + @DataProvider(name="parseDayOfWeekText") + Object[][] providerDayOfWeekData() { + return new Object[][] { + // Locale, pattern, input text, expected DayOfWeek + {Locale.US, "e", "1", DayOfWeek.SUNDAY}, + {Locale.US, "ee", "01", DayOfWeek.SUNDAY}, + {Locale.US, "c", "1", DayOfWeek.SUNDAY}, + + {Locale.UK, "e", "1", DayOfWeek.MONDAY}, + {Locale.UK, "ee", "01", DayOfWeek.MONDAY}, + {Locale.UK, "c", "1", DayOfWeek.MONDAY}, + }; + } + + // Test data is dependent on localized resources. + @DataProvider(name="parseLenientText") + Object[][] providerLenientText() { + // Locale, TemporalField, expected value, input text + return new Object[][] { + {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432\u0430\u0440\u044f"}, // full format + {RUSSIAN, MONTH_OF_YEAR, 1, "\u042f\u043d\u0432\u0430\u0440\u044c"}, // full standalone + {RUSSIAN, MONTH_OF_YEAR, 1, "\u044f\u043d\u0432"}, // short format + {RUSSIAN, MONTH_OF_YEAR, 1, "\u042f\u043d\u0432."}, // short standalone + }; + } + @Test(dataProvider="parseText") public void test_parseText(TemporalField field, TextStyle style, int value, String input) throws Exception { ParsePosition pos = new ParsePosition(0); @@ -197,12 +257,32 @@ public class TestTextParser extends AbstractTestPrinterParser { assertEquals(pos.getIndex(), input.length()); } + @Test(dataProvider="parseStandaloneText") + public void test_parseStandaloneText(Locale locale, TemporalField field, TextStyle style, int expectedValue, String input) { + DateTimeFormatter formatter = getFormatter(field, style).withLocale(locale); + ParsePosition pos = new ParsePosition(0); + assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue); + assertEquals(pos.getIndex(), input.length()); + } + + @Test(dataProvider="parseDayOfWeekText") + public void test_parseDayOfWeekText(Locale locale, String pattern, String input, DayOfWeek expected) { + DateTimeFormatter formatter = getPatternFormatter(pattern).withLocale(locale); + ParsePosition pos = new ParsePosition(0); + assertEquals(DayOfWeek.from(formatter.parse(input, pos)), expected); + assertEquals(pos.getIndex(), input.length()); + } + //----------------------------------------------------------------------- @Test(dataProvider="parseText") public void test_parse_strict_caseSensitive_parseUpper(TemporalField field, TextStyle style, int value, String input) throws Exception { + if (input.equals(input.toUpperCase(Locale.ROOT))) { + // Skip if the given input is all upper case (e.g., "Q1") + return; + } setCaseSensitive(true); ParsePosition pos = new ParsePosition(0); - getFormatter(field, style).parseUnresolved(input.toUpperCase(), pos); + getFormatter(field, style).parseUnresolved(input.toUpperCase(Locale.ROOT), pos); assertEquals(pos.getErrorIndex(), 0); } @@ -210,16 +290,20 @@ public class TestTextParser extends AbstractTestPrinterParser { public void test_parse_strict_caseInsensitive_parseUpper(TemporalField field, TextStyle style, int value, String input) throws Exception { setCaseSensitive(false); ParsePosition pos = new ParsePosition(0); - assertEquals(getFormatter(field, style).parseUnresolved(input.toUpperCase(), pos).getLong(field), (long) value); + assertEquals(getFormatter(field, style).parseUnresolved(input.toUpperCase(Locale.ROOT), pos).getLong(field), (long) value); assertEquals(pos.getIndex(), input.length()); } //----------------------------------------------------------------------- @Test(dataProvider="parseText") public void test_parse_strict_caseSensitive_parseLower(TemporalField field, TextStyle style, int value, String input) throws Exception { + if (input.equals(input.toLowerCase(Locale.ROOT))) { + // Skip if the given input is all lower case (e.g., "1st quarter") + return; + } setCaseSensitive(true); ParsePosition pos = new ParsePosition(0); - getFormatter(field, style).parseUnresolved(input.toLowerCase(), pos); + getFormatter(field, style).parseUnresolved(input.toLowerCase(Locale.ROOT), pos); assertEquals(pos.getErrorIndex(), 0); } @@ -227,7 +311,7 @@ public class TestTextParser extends AbstractTestPrinterParser { public void test_parse_strict_caseInsensitive_parseLower(TemporalField field, TextStyle style, int value, String input) throws Exception { setCaseSensitive(false); ParsePosition pos = new ParsePosition(0); - assertEquals(getFormatter(field, style).parseUnresolved(input.toLowerCase(), pos).getLong(field), (long) value); + assertEquals(getFormatter(field, style).parseUnresolved(input.toLowerCase(Locale.ROOT), pos).getLong(field), (long) value); assertEquals(pos.getIndex(), input.length()); } @@ -340,4 +424,13 @@ public class TestTextParser extends AbstractTestPrinterParser { assertEquals(pos.getIndex(), 1); } + @Test(dataProvider="parseLenientText") + public void test_parseLenientText(Locale locale, TemporalField field, int expectedValue, String input) { + setStrict(false); + ParsePosition pos = new ParsePosition(0); + DateTimeFormatter formatter = getFormatter(field).withLocale(locale); + assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue); + assertEquals(pos.getIndex(), input.length()); + } + } diff --git a/jdk/test/java/time/test/java/time/format/TestTextPrinter.java b/jdk/test/java/time/test/java/time/format/TestTextPrinter.java index 43f2df31bef..662288c1733 100644 --- a/jdk/test/java/time/test/java/time/format/TestTextPrinter.java +++ b/jdk/test/java/time/test/java/time/format/TestTextPrinter.java @@ -59,30 +59,33 @@ */ package test.java.time.format; -import java.time.format.*; - import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; -import static java.time.temporal.ChronoField.MONTH_OF_YEAR; import static java.time.temporal.ChronoField.ERA; +import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.IsoFields.QUARTER_OF_YEAR; import static org.testng.Assert.assertEquals; -import java.util.Locale; - import java.time.DateTimeException; +import java.time.DayOfWeek; import java.time.LocalDate; -import java.time.temporal.TemporalField; import java.time.chrono.JapaneseChronology; -import test.java.time.temporal.MockFieldValue; +import java.time.format.DateTimeFormatter; +import java.time.format.TextStyle; +import java.time.temporal.TemporalField; +import java.util.Locale; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; +import test.java.time.temporal.MockFieldValue; /** * Test TextPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestTextPrinter extends AbstractTestPrinterParser { + static final Locale RUSSIAN = new Locale("ru"); + static final Locale FINNISH = new Locale("fi"); //----------------------------------------------------------------------- @Test(expectedExceptions=DateTimeException.class) @@ -166,15 +169,57 @@ public class TestTextPrinter extends AbstractTestPrinterParser { {MONTH_OF_YEAR, TextStyle.SHORT, 11, "Nov"}, {MONTH_OF_YEAR, TextStyle.SHORT, 12, "Dec"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 1, "J"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 2, "F"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 3, "M"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 4, "A"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 5, "M"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 6, "J"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 7, "J"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 8, "A"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 9, "S"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 10, "O"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 11, "N"}, + {MONTH_OF_YEAR, TextStyle.NARROW, 12, "D"}, + {ERA, TextStyle.FULL, 0, "Before Christ"}, {ERA, TextStyle.FULL, 1, "Anno Domini"}, {ERA, TextStyle.SHORT, 0, "BC"}, {ERA, TextStyle.SHORT, 1, "AD"}, {ERA, TextStyle.NARROW, 0, "B"}, {ERA, TextStyle.NARROW, 1, "A"}, + + {QUARTER_OF_YEAR, TextStyle.FULL, 1, "1st quarter"}, + {QUARTER_OF_YEAR, TextStyle.FULL, 2, "2nd quarter"}, + {QUARTER_OF_YEAR, TextStyle.FULL, 3, "3rd quarter"}, + {QUARTER_OF_YEAR, TextStyle.FULL, 4, "4th quarter"}, + + {QUARTER_OF_YEAR, TextStyle.SHORT, 1, "Q1"}, + {QUARTER_OF_YEAR, TextStyle.SHORT, 2, "Q2"}, + {QUARTER_OF_YEAR, TextStyle.SHORT, 3, "Q3"}, + {QUARTER_OF_YEAR, TextStyle.SHORT, 4, "Q4"}, + + {QUARTER_OF_YEAR, TextStyle.NARROW, 1, "1"}, + {QUARTER_OF_YEAR, TextStyle.NARROW, 2, "2"}, + {QUARTER_OF_YEAR, TextStyle.NARROW, 3, "3"}, + {QUARTER_OF_YEAR, TextStyle.NARROW, 4, "4"}, }; } + @DataProvider(name="print_DayOfWeekData") + Object[][] providerDayOfWeekData() { + return new Object[][] { + // Locale, pattern, expected text, input DayOfWeek + {Locale.US, "e", "1", DayOfWeek.SUNDAY}, + {Locale.US, "ee", "01", DayOfWeek.SUNDAY}, + {Locale.US, "c", "1", DayOfWeek.SUNDAY}, + + {Locale.UK, "e", "1", DayOfWeek.MONDAY}, + {Locale.UK, "ee", "01", DayOfWeek.MONDAY}, + {Locale.UK, "c", "1", DayOfWeek.MONDAY}, + }; + } + @DataProvider(name="print_JapaneseChronology") Object[][] provider_japaneseEra() { return new Object[][] { @@ -184,12 +229,32 @@ public class TestTextPrinter extends AbstractTestPrinterParser { }; }; + // Test data is dependent on localized resources. + @DataProvider(name="print_standalone") + Object[][] provider_StandaloneNames() { + return new Object[][] { + // standalone names for 2013-01-01 (Tue) + // Locale, TemporalField, TextStyle, expected text + {RUSSIAN, MONTH_OF_YEAR, TextStyle.FULL_STANDALONE, "\u042f\u043d\u0432\u0430\u0440\u044c"}, + {RUSSIAN, MONTH_OF_YEAR, TextStyle.SHORT_STANDALONE, "\u042f\u043d\u0432."}, + {FINNISH, DAY_OF_WEEK, TextStyle.FULL_STANDALONE, "tiistai"}, + {FINNISH, DAY_OF_WEEK, TextStyle.SHORT_STANDALONE, "ti"}, + }; + } + @Test(dataProvider="print") public void test_format(TemporalField field, TextStyle style, int value, String expected) throws Exception { getFormatter(field, style).formatTo(new MockFieldValue(field, value), buf); assertEquals(buf.toString(), expected); } + @Test(dataProvider="print_DayOfWeekData") + public void test_formatDayOfWeek(Locale locale, String pattern, String expected, DayOfWeek dayOfWeek) { + DateTimeFormatter formatter = getPatternFormatter(pattern).withLocale(locale); + String text = formatter.format(dayOfWeek); + assertEquals(text, expected); + } + @Test(dataProvider="print_JapaneseChronology") public void test_formatJapaneseEra(TemporalField field, TextStyle style, int value, String expected) throws Exception { LocalDate ld = LocalDate.of(2013, 1, 31); @@ -197,6 +262,12 @@ public class TestTextPrinter extends AbstractTestPrinterParser { assertEquals(buf.toString(), expected); } + @Test(dataProvider="print_standalone") + public void test_standaloneNames(Locale locale, TemporalField field, TextStyle style, String expected) { + getFormatter(field, style).withLocale(locale).formatTo(LocalDate.of(2013, 1, 1), buf); + assertEquals(buf.toString(), expected); + } + //----------------------------------------------------------------------- public void test_print_french_long() throws Exception { getFormatter(MONTH_OF_YEAR, TextStyle.FULL).withLocale(Locale.FRENCH).formatTo(LocalDate.of(2012, 1, 1), buf); diff --git a/jdk/test/java/time/test/java/time/format/TestZoneOffsetParser.java b/jdk/test/java/time/test/java/time/format/TestZoneOffsetParser.java index 2c9065b93a4..68e84a27dc4 100644 --- a/jdk/test/java/time/test/java/time/format/TestZoneOffsetParser.java +++ b/jdk/test/java/time/test/java/time/format/TestZoneOffsetParser.java @@ -73,7 +73,7 @@ import org.testng.annotations.Test; /** * Test ZoneOffsetPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestZoneOffsetParser extends AbstractTestPrinterParser { //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/format/TestZoneOffsetPrinter.java b/jdk/test/java/time/test/java/time/format/TestZoneOffsetPrinter.java index c84ad05a479..4e1b7a402c7 100644 --- a/jdk/test/java/time/test/java/time/format/TestZoneOffsetPrinter.java +++ b/jdk/test/java/time/test/java/time/format/TestZoneOffsetPrinter.java @@ -70,7 +70,7 @@ import org.testng.annotations.Test; /** * Test ZoneOffsetPrinterParser. */ -@Test(groups={"implementation"}) +@Test public class TestZoneOffsetPrinter extends AbstractTestPrinterParser { private static final ZoneOffset OFFSET_0130 = ZoneOffset.of("+01:30"); diff --git a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java index a7d63e8c47b..0175c223826 100644 --- a/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java +++ b/jdk/test/java/time/test/java/time/format/TestZoneTextPrinterParser.java @@ -23,7 +23,18 @@ package test.java.time.format; +import static org.testng.Assert.assertEquals; + import java.text.DateFormatSymbols; +import java.time.ZoneId; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatSymbols; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.format.TextStyle; +import java.time.temporal.ChronoField; +import java.time.temporal.TemporalQuery; +import java.time.zone.ZoneRulesProvider; import java.util.Arrays; import java.util.Date; import java.util.HashSet; @@ -32,24 +43,13 @@ import java.util.Random; import java.util.Set; import java.util.TimeZone; -import java.time.ZonedDateTime; -import java.time.ZoneId; -import java.time.temporal.ChronoField; -import java.time.temporal.Queries; -import java.time.format.DateTimeFormatSymbols; -import java.time.format.DateTimeFormatter; -import java.time.format.DateTimeFormatterBuilder; -import java.time.format.TextStyle; -import java.time.zone.ZoneRulesProvider; - import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import static org.testng.Assert.assertEquals; /** * Test ZoneTextPrinterParser */ -@Test(groups={"implementation"}) +@Test public class TestZoneTextPrinterParser extends AbstractTestPrinterParser { protected static DateTimeFormatter getFormatter(Locale locale, TextStyle style) { @@ -70,26 +70,23 @@ public class TestZoneTextPrinterParser extends AbstractTestPrinterParser { zdt = zdt.withDayOfYear(r.nextInt(365) + 1) .with(ChronoField.SECOND_OF_DAY, r.nextInt(86400)); for (String zid : zids) { - if (zid.equals("ROC") || - zid.startsWith("UTC") || - zid.startsWith("GMT") || zid.startsWith("Etc/GMT")) { - // UTC, GMT are treated as zone offset + if (zid.equals("ROC") || zid.startsWith("Etc/GMT")) { continue; // TBD: match jdk behavior? } zdt = zdt.withZoneSameLocal(ZoneId.of(zid)); TimeZone tz = TimeZone.getTimeZone(zid); boolean isDST = tz.inDaylightTime(new Date(zdt.toInstant().toEpochMilli())); for (Locale locale : locales) { - printText(locale, zdt, TextStyle.FULL, - tz.getDisplayName(isDST, TimeZone.LONG, locale)); - printText(locale, zdt, TextStyle.SHORT, - tz.getDisplayName(isDST, TimeZone.SHORT, locale)); + printText(locale, zdt, TextStyle.FULL, tz, + tz.getDisplayName(isDST, TimeZone.LONG, locale)); + printText(locale, zdt, TextStyle.SHORT, tz, + tz.getDisplayName(isDST, TimeZone.SHORT, locale)); } } } } - private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, String expected) { + private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String expected) { String result = getFormatter(locale, style).format(zdt); if (!result.equals(expected)) { if (result.equals("FooLocation")) { // from rules provider test if same vm @@ -97,8 +94,8 @@ public class TestZoneTextPrinterParser extends AbstractTestPrinterParser { } System.out.println("----------------"); System.out.printf("tdz[%s]%n", zdt.toString()); - System.out.printf("[%-4s, %5s] :[%s]%n", locale.toString(), style.toString(),result); - System.out.printf("%4s, %5s :[%s]%n", "", "", expected); + System.out.printf("[%-5s, %5s] :[%s]%n", locale.toString(), style.toString(),result); + System.out.printf(" %5s, %5s :[%s] %s%n", "", "", expected, zone); } assertEquals(result, expected); } @@ -153,7 +150,7 @@ public class TestZoneTextPrinterParser extends AbstractTestPrinterParser { .toFormatter(locale) .withSymbols(DateTimeFormatSymbols.of(locale)); - String ret = fmt.parse(text, Queries.zone()).getId(); + String ret = fmt.parse(text, TemporalQuery.zone()).getId(); System.out.printf("[%-5s %s] %24s -> %s(%s)%n", locale.toString(), @@ -189,7 +186,7 @@ public class TestZoneTextPrinterParser extends AbstractTestPrinterParser { if (ci) { text = text.toUpperCase(); } - String ret = fmt.parse(text, Queries.zone()).getId(); + String ret = fmt.parse(text, TemporalQuery.zone()).getId(); // TBD: need an excluding list // assertEquals(...); if (ret.equals(expected) || diff --git a/jdk/test/java/time/test/java/time/format/ZoneName.java b/jdk/test/java/time/test/java/time/format/ZoneName.java index 4ae5b43f30b..2c494462a7a 100644 --- a/jdk/test/java/time/test/java/time/format/ZoneName.java +++ b/jdk/test/java/time/test/java/time/format/ZoneName.java @@ -24,11 +24,8 @@ package test.java.time.format; import java.util.HashMap; -import java.util.HashSet; import java.util.Locale; import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; class ZoneName { diff --git a/jdk/test/java/time/test/java/time/temporal/MockFieldValue.java b/jdk/test/java/time/test/java/time/temporal/MockFieldValue.java index cceb4c89958..0cd79d7f1e9 100644 --- a/jdk/test/java/time/test/java/time/temporal/MockFieldValue.java +++ b/jdk/test/java/time/test/java/time/temporal/MockFieldValue.java @@ -59,10 +59,11 @@ */ package test.java.time.temporal; -import java.time.temporal.*; - -import java.time.DateTimeException; +import java.time.temporal.ChronoField; import java.time.temporal.TemporalAccessor; +import java.time.temporal.TemporalField; +import java.time.temporal.UnsupportedTemporalTypeException; +import java.time.temporal.ValueRange; /** * Mock simple date-time with one field-value. @@ -88,7 +89,7 @@ public final class MockFieldValue implements TemporalAccessor { if (isSupported(field)) { return field.range(); } - throw new DateTimeException("Unsupported field: " + field.getName()); + throw new UnsupportedTemporalTypeException("Unsupported field: " + field.getName()); } return field.rangeRefinedBy(this); } @@ -98,7 +99,7 @@ public final class MockFieldValue implements TemporalAccessor { if (this.field.equals(field)) { return value; } - throw new DateTimeException("Unsupported field: " + field); + throw new UnsupportedTemporalTypeException("Unsupported field: " + field); } } diff --git a/jdk/test/java/time/test/java/time/temporal/TestChronoField.java b/jdk/test/java/time/test/java/time/temporal/TestChronoField.java new file mode 100644 index 00000000000..41d464c0a72 --- /dev/null +++ b/jdk/test/java/time/test/java/time/temporal/TestChronoField.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/* + * Copyright (c) 2013, Stephen Colebourne & Michael Nascimento Santos + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * * Neither the name of JSR-310 nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package test.java.time.temporal; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.fail; + +import java.time.temporal.ChronoField; +import java.time.temporal.IsoFields; +import java.time.temporal.TemporalField; +import java.time.temporal.WeekFields; +import java.util.HashMap; +import java.util.Locale; +import java.util.Map; +import java.util.ResourceBundle; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; + +@Test +public class TestChronoField { + Map fieldMap; + + + @BeforeClass + public void initClass() { + fieldMap = new HashMap<>(); + fieldMap.put(ChronoField.ERA, "era"); + fieldMap.put(ChronoField.YEAR, "year"); + fieldMap.put(ChronoField.MONTH_OF_YEAR, "month"); + fieldMap.put(ChronoField.DAY_OF_MONTH, "day"); + fieldMap.put(ChronoField.AMPM_OF_DAY, "dayperiod"); + fieldMap.put(ChronoField.ALIGNED_WEEK_OF_YEAR, "week"); + fieldMap.put(ChronoField.DAY_OF_WEEK, "weekday"); + fieldMap.put(ChronoField.HOUR_OF_DAY, "hour"); + fieldMap.put(ChronoField.MINUTE_OF_HOUR, "minute"); + fieldMap.put(ChronoField.SECOND_OF_MINUTE, "second"); + fieldMap.put(ChronoField.OFFSET_SECONDS, "zone"); + } + + @DataProvider(name = "localeList") + Locale[] data_localeList() { + return new Locale[] { + Locale.US, + Locale.GERMAN, + Locale.JAPAN, + Locale.ROOT, + }; + } + //----------------------------------------------------------------------- + @DataProvider(name = "localeDisplayNames") + Object[][] data_localeDisplayNames() { + return new Object[][] { + {ChronoField.ERA}, + {ChronoField.YEAR}, + {ChronoField.MONTH_OF_YEAR}, + {ChronoField.DAY_OF_WEEK}, + // {ChronoField.ALIGNED_WEEK_OF_YEAR}, + {ChronoField.DAY_OF_MONTH}, + {ChronoField.AMPM_OF_DAY}, + {ChronoField.HOUR_OF_DAY}, + {ChronoField.MINUTE_OF_HOUR}, + {ChronoField.SECOND_OF_MINUTE}, + }; + } + + @Test + public void test_IsoFields_week_based_year() { + Locale locale = Locale.US; + String name = IsoFields.WEEK_OF_WEEK_BASED_YEAR.getDisplayName(locale); + assertEquals(name, "Week"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_nullIsoFields_week_based_year() { + String name = IsoFields.WEEK_OF_WEEK_BASED_YEAR.getDisplayName((Locale)null); + } + + @Test + public void test_WeekFields_week_based_year() { + Locale locale = Locale.US; + TemporalField weekOfYearField = WeekFields.SUNDAY_START.weekOfYear(); + String name = weekOfYearField.getDisplayName(locale); + assertEquals(name, "Week"); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_nullWeekFields_week_based_year() { + TemporalField weekOfYearField = WeekFields.SUNDAY_START.weekOfYear(); + String name = weekOfYearField.getDisplayName((Locale)null); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_nullLocaleChronoFieldDisplayName() { + ChronoField.YEAR.getDisplayName((Locale)null); + } + + @Test(expectedExceptions=NullPointerException.class) + public void test_nullLocaleTemporalFieldDisplayName() { + // Test the default method in TemporalField using the + // IsoFields.DAY_OF_QUARTER which does not override getDisplayName + IsoFields.DAY_OF_QUARTER.getDisplayName((Locale)null); + } +} diff --git a/jdk/test/java/time/test/java/time/temporal/TestChronoUnit.java b/jdk/test/java/time/test/java/time/temporal/TestChronoUnit.java index 0f84d39591c..eeecea1761d 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestChronoUnit.java +++ b/jdk/test/java/time/test/java/time/temporal/TestChronoUnit.java @@ -121,7 +121,11 @@ public class TestChronoUnit { @Test(dataProvider = "yearsBetween") public void test_yearsBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) { - assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); + if (expected >= 0) { + assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); + } else { + assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); + } } @Test(dataProvider = "yearsBetween") @@ -132,7 +136,11 @@ public class TestChronoUnit { @Test(dataProvider = "yearsBetween") public void test_yearsBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) { // +01:00 is later than +02:00 - assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); + if (expected >= 0) { + assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); + } else { + assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected); + } } //----------------------------------------------------------------------- @@ -186,7 +194,11 @@ public class TestChronoUnit { @Test(dataProvider = "monthsBetween") public void test_monthsBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) { - assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); + if (expected >= 0) { + assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); + } else { + assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); + } } @Test(dataProvider = "monthsBetween") @@ -197,7 +209,11 @@ public class TestChronoUnit { @Test(dataProvider = "monthsBetween") public void test_monthsBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) { // +01:00 is later than +02:00 - assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); + if (expected >= 0) { + assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); + } else { + assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected); + } } //----------------------------------------------------------------------- @@ -288,7 +304,11 @@ public class TestChronoUnit { @Test(dataProvider = "daysBetween") public void test_daysBetween_LocalDateTimeLaterTime(LocalDate start, LocalDate end, long expected) { - assertEquals(DAYS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); + if (expected >= 0) { + assertEquals(DAYS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); + } else { + assertEquals(DAYS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); + } } @Test(dataProvider = "daysBetween") @@ -299,7 +319,11 @@ public class TestChronoUnit { @Test(dataProvider = "daysBetween") public void test_daysBetween_ZonedDateLaterOffset(LocalDate start, LocalDate end, long expected) { // +01:00 is later than +02:00 - assertEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); + if (expected >= 0) { + assertEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); + } else { + assertEquals(DAYS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected); + } } //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/temporal/TestDateTimeBuilderCombinations.java b/jdk/test/java/time/test/java/time/temporal/TestDateTimeBuilderCombinations.java index 941e08e3be7..ffa9fc3c342 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestDateTimeBuilderCombinations.java +++ b/jdk/test/java/time/test/java/time/temporal/TestDateTimeBuilderCombinations.java @@ -67,8 +67,8 @@ import static java.time.temporal.ChronoField.DAY_OF_MONTH; import static java.time.temporal.ChronoField.DAY_OF_WEEK; import static java.time.temporal.ChronoField.DAY_OF_YEAR; import static java.time.temporal.ChronoField.EPOCH_DAY; -import static java.time.temporal.ChronoField.EPOCH_MONTH; import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.PROLEPTIC_MONTH; import static java.time.temporal.ChronoField.YEAR; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; @@ -92,7 +92,7 @@ public class TestDateTimeBuilderCombinations { Object[][] data_combine() { return new Object[][] { {YEAR, 2012, MONTH_OF_YEAR, 6, DAY_OF_MONTH, 3, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)}, - {EPOCH_MONTH, (2012 - 1970) * 12 + 6 - 1, DAY_OF_MONTH, 3, null, null, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)}, + {PROLEPTIC_MONTH, 2012 * 12 + 6 - 1, DAY_OF_MONTH, 3, null, null, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)}, {YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 6, DAY_OF_WEEK, 3, null, null, LocalDate.class, LocalDate.of(2012, 2, 8)}, {YEAR, 2012, DAY_OF_YEAR, 155, null, null, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)}, // {ERA, 1, YEAR_OF_ERA, 2012, DAY_OF_YEAR, 155, null, null, LocalDate.class, LocalDate.of(2012, 6, 3)}, @@ -176,9 +176,9 @@ public class TestDateTimeBuilderCombinations { {ALIGNED_DAY_OF_WEEK_IN_YEAR, 4, ALIGNED_DAY_OF_WEEK_IN_YEAR, 4L}, {ALIGNED_WEEK_OF_MONTH, 4, ALIGNED_WEEK_OF_MONTH, 4}, {ALIGNED_DAY_OF_WEEK_IN_MONTH, 3, ALIGNED_DAY_OF_WEEK_IN_MONTH, 3}, - {EPOCH_MONTH, 15, EPOCH_MONTH, null}, - {EPOCH_MONTH, 15, YEAR, 1971}, - {EPOCH_MONTH, 15, MONTH_OF_YEAR, 4}, + {PROLEPTIC_MONTH, 27, PROLEPTIC_MONTH, null}, + {PROLEPTIC_MONTH, 27, YEAR, 2}, + {PROLEPTIC_MONTH, 27, MONTH_OF_YEAR, 4}, }; } diff --git a/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java b/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java index d7397d41e64..67a40839257 100644 --- a/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java +++ b/jdk/test/java/time/test/java/time/temporal/TestDateTimeValueRange.java @@ -65,7 +65,8 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; - +import java.time.DateTimeException; +import java.time.temporal.ChronoField; import java.time.temporal.ValueRange; import org.testng.annotations.DataProvider; @@ -230,6 +231,42 @@ public class TestDateTimeValueRange extends AbstractTest { assertEquals(test.isValidIntValue(32), false); } + //----------------------------------------------------------------------- + // checkValidValue + //----------------------------------------------------------------------- + @Test(dataProvider="valid") + public void test_of_checkValidValue(long sMin, long lMin, long sMax, long lMax) { + ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax); + assertEquals(test.checkValidIntValue(sMin, null), sMin); + assertEquals(test.checkValidIntValue(lMin, null), lMin); + assertEquals(test.checkValidIntValue(sMax, null), sMax); + assertEquals(test.checkValidIntValue(lMax, null), lMax); + } + + @Test(dataProvider="valid", expectedExceptions = DateTimeException.class) + public void test_of_checkValidValueMinException(long sMin, long lMin, long sMax, long lMax) { + ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax); + test.checkValidIntValue(sMin-1, null); + } + + @Test(dataProvider="valid", expectedExceptions = DateTimeException.class) + public void test_of_checkValidValueMaxException(long sMin, long lMin, long sMax, long lMax) { + ValueRange test = ValueRange.of(sMin, lMin, sMax, lMax); + test.checkValidIntValue(lMax+1, null); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_checkValidValueUnsupported_long_long() { + ValueRange test = ValueRange.of(1, 28, Integer.MAX_VALUE + 1L); + test.checkValidIntValue(0, (ChronoField)null); + } + + @Test(expectedExceptions = DateTimeException.class) + public void test_checkValidValueInvalid_long_long() { + ValueRange test = ValueRange.of(1, 28, Integer.MAX_VALUE + 1L); + test.checkValidIntValue(Integer.MAX_VALUE + 2L, (ChronoField)null); + } + //----------------------------------------------------------------------- // equals() / hashCode() //----------------------------------------------------------------------- diff --git a/jdk/test/java/time/test/java/time/zone/TestFixedZoneRules.java b/jdk/test/java/time/test/java/time/zone/TestFixedZoneRules.java index 67b6e0a2c40..d479134c26e 100644 --- a/jdk/test/java/time/test/java/time/zone/TestFixedZoneRules.java +++ b/jdk/test/java/time/test/java/time/zone/TestFixedZoneRules.java @@ -83,7 +83,7 @@ public class TestFixedZoneRules { } //----------------------------------------------------------------------- - @Test(groups="implementation") + @Test public void test_data_nullInput() { ZoneRules test = make(OFFSET_PONE); assertEquals(test.getOffset((Instant) null), OFFSET_PONE); diff --git a/jdk/test/java/time/test/java/util/TestFormatter.java b/jdk/test/java/time/test/java/util/TestFormatter.java index 69c55f22131..f9e91874577 100644 --- a/jdk/test/java/time/test/java/util/TestFormatter.java +++ b/jdk/test/java/time/test/java/util/TestFormatter.java @@ -35,7 +35,7 @@ import static org.testng.Assert.assertEquals; /* @test * @summary Unit test for j.u.Formatter threeten date/time support */ -@Test(groups={"implementation"}) +@Test public class TestFormatter { // time diff --git a/jdk/test/java/util/Calendar/Bug8007038.java b/jdk/test/java/util/Calendar/Bug8007038.java index e4f1a66082b..e197e1266d7 100644 --- a/jdk/test/java/util/Calendar/Bug8007038.java +++ b/jdk/test/java/util/Calendar/Bug8007038.java @@ -97,7 +97,7 @@ public class Bug8007038 { } private static void checkValueRange(String calType, int field, int value, int style, Locale l, boolean isNonNull) { - String ret = CalendarDataUtility.retrieveFieldValueName(calType, field, value, style, l); + String ret = CalendarDataUtility.retrieveJavaTimeFieldValueName(calType, field, value, style, l); System.out.print("retrieveFieldValueName("+calType+", "+field+", "+value+", "+style+", "+l+")"); if ((ret != null) == isNonNull) { System.out.println(" returned "+ret); diff --git a/jdk/test/java/util/Calendar/CldrFormatNamesTest.java b/jdk/test/java/util/Calendar/CldrFormatNamesTest.java index e45444d1b84..85360726991 100644 --- a/jdk/test/java/util/Calendar/CldrFormatNamesTest.java +++ b/jdk/test/java/util/Calendar/CldrFormatNamesTest.java @@ -48,13 +48,13 @@ public class CldrFormatNamesTest { { Locale.JAPAN, "field.zone", "\u30bf\u30a4\u30e0\u30be\u30fc\u30f3", - "cldr.japanese.DatePatterns", new String[] { + "java.time.japanese.DatePatterns", new String[] { "Gy\u5e74M\u6708d\u65e5EEEE", "Gy\u5e74M\u6708d\u65e5", "Gy\u5e74M\u6708d\u65e5", "Gyy/MM/dd", }, - "cldr.roc.DatePatterns", new String[] { + "java.time.roc.DatePatterns", new String[] { "Gy\u5e74M\u6708d\u65e5EEEE", "Gy\u5e74M\u6708d\u65e5", "Gy/MM/dd", @@ -65,7 +65,7 @@ public class CldrFormatNamesTest { { Locale.PRC, "field.zone", "\u533a\u57df", - "cldr.islamic.DatePatterns", new String[] { + "java.time.islamic.DatePatterns", new String[] { "Gy\u5e74M\u6708d\u65e5EEEE", "Gy\u5e74M\u6708d\u65e5", "Gy\u5e74M\u6708d\u65e5", @@ -76,7 +76,7 @@ public class CldrFormatNamesTest { { Locale.GERMANY, "field.dayperiod", "Tagesh\u00e4lfte", - "cldr.islamic.DatePatterns", new String[] { + "java.time.islamic.DatePatterns", new String[] { "EEEE d. MMMM y G", "d. MMMM y G", "d. MMM y G", @@ -119,7 +119,7 @@ public class CldrFormatNamesTest { for (Object[] data : CLDR_DATA) { Locale locale = (Locale) data[0]; ResourceBundle rb = LocaleProviderAdapter.getResourceBundleBased() - .getLocaleResources(locale).getFormatData(); + .getLocaleResources(locale).getJavaTimeFormatData(); for (int i = 1; i < data.length; ) { String key = (String) data[i++]; Object expected = data[i++]; @@ -167,7 +167,7 @@ public class CldrFormatNamesTest { int field, int style, String fieldName) { for (int i = 0; i < expected.length; i++) { String expt = expected[i]; - String name = CalendarDataUtility.retrieveFieldValueName(calType, field, i, style, locale); + String name = CalendarDataUtility.retrieveJavaTimeFieldValueName(calType, field, i, style, locale); if (!expt.equals(name)) { errors++; System.err.printf("error: wrong %s %s name in %s: value=%d, got='%s', expected='%s'%n", diff --git a/jdk/test/java/util/Calendar/JavatimeTest.java b/jdk/test/java/util/Calendar/JavatimeTest.java index d7b211705f4..9f61229e1dc 100644 --- a/jdk/test/java/util/Calendar/JavatimeTest.java +++ b/jdk/test/java/util/Calendar/JavatimeTest.java @@ -108,17 +108,20 @@ public class JavatimeTest { // TBD: tzdt intergration if (zidStr.startsWith("SystemV") || zidStr.contains("Riyadh8") || - zidStr.equals("US/Pacific-New")) { + zidStr.equals("US/Pacific-New") || + zidStr.equals("EST") || + zidStr.equals("HST") || + zidStr.equals("MST")) { continue; } - ZoneId zid = ZoneId.of(zidStr, ZoneId.OLD_IDS_POST_2005); + ZoneId zid = ZoneId.of(zidStr, ZoneId.OLD_SHORT_IDS); if (!zid.equals(TimeZone.getTimeZone(zid).toZoneId())) { throw new RuntimeException("FAILED: zid -> tz -> zid :" + zidStr); } TimeZone tz = TimeZone.getTimeZone(zidStr); // no round-trip for alias and "GMT" if (!tz.equals(TimeZone.getTimeZone(tz.toZoneId())) && - !ZoneId.OLD_IDS_POST_2005.containsKey(zidStr) && + !ZoneId.OLD_SHORT_IDS.containsKey(zidStr) && !zidStr.startsWith("GMT")) { throw new RuntimeException("FAILED: tz -> zid -> tz :" + zidStr); } diff --git a/jdk/test/sun/text/resources/LocaleData b/jdk/test/sun/text/resources/LocaleData index 51145049ec9..87b9d44cb27 100644 --- a/jdk/test/sun/text/resources/LocaleData +++ b/jdk/test/sun/text/resources/LocaleData @@ -7661,1139 +7661,5 @@ FormatData/zh/DayNarrows/6=\u516d # bug 7195759 CurrencyNames//ZMW=ZMW -# rfe 8004489, 8006509 -FormatData//calendarname.buddhist=Buddhist Calendar -FormatData//calendarname.gregorian=Gregorian Calendar -FormatData//calendarname.gregory=Gregorian Calendar -FormatData//calendarname.islamic-civil=Islamic-Civil Calendar -FormatData//calendarname.islamic=Islamic Calendar -FormatData//calendarname.islamicc=Islamic-Civil Calendar -FormatData//calendarname.japanese=Japanese Calendar -FormatData//calendarname.roc=Minguo Calendar -FormatData//field.dayperiod=Dayperiod -FormatData//field.era=Era -FormatData//field.hour=Hour -FormatData//field.minute=Minute -FormatData//field.month=Month -FormatData//field.second=Second -FormatData//field.week=Week -FormatData//field.weekday=Day of the Week -FormatData//field.year=Year -FormatData//field.zone=Zone -FormatData//islamic.Eras/0= -FormatData//islamic.Eras/1=AH -FormatData//islamic.MonthNames/0=Muharram -FormatData//islamic.MonthNames/1=Safar -FormatData//islamic.MonthNames/2=Rabi\u02bb I -FormatData//islamic.MonthNames/3=Rabi\u02bb II -FormatData//islamic.MonthNames/4=Jumada I -FormatData//islamic.MonthNames/5=Jumada II -FormatData//islamic.MonthNames/6=Rajab -FormatData//islamic.MonthNames/7=Sha\u02bbban -FormatData//islamic.MonthNames/8=Ramadan -FormatData//islamic.MonthNames/9=Shawwal -FormatData//islamic.MonthNames/10=Dhu\u02bbl-Qi\u02bbdah -FormatData//islamic.MonthNames/11=Dhu\u02bbl-Hijjah -FormatData//islamic.MonthNames/12= -FormatData//islamic.MonthAbbreviations/0=Muh. -FormatData//islamic.MonthAbbreviations/1=Saf. -FormatData//islamic.MonthAbbreviations/2=Rab. I -FormatData//islamic.MonthAbbreviations/3=Rab. II -FormatData//islamic.MonthAbbreviations/4=Jum. I -FormatData//islamic.MonthAbbreviations/5=Jum. II -FormatData//islamic.MonthAbbreviations/6=Raj. -FormatData//islamic.MonthAbbreviations/7=Sha. -FormatData//islamic.MonthAbbreviations/8=Ram. -FormatData//islamic.MonthAbbreviations/9=Shaw. -FormatData//islamic.MonthAbbreviations/10=Dhu\u02bbl-Q. -FormatData//islamic.MonthAbbreviations/11=Dhu\u02bbl-H. -FormatData//islamic.MonthAbbreviations/12= -FormatData//islamic.DatePatterns/0=EEEE, MMMM d, y GGGG -FormatData//islamic.DatePatterns/1=MMMM d, y GGGG -FormatData//islamic.DatePatterns/2=MMM d, y GGGG -FormatData//islamic.DatePatterns/3=M/d/yy GGGG -FormatData//roc.Eras/0=Before R.O.C. -FormatData//roc.Eras/1=R.O.C. -FormatData//roc.DatePatterns/0=EEEE, GGGG y MMMM dd -FormatData//roc.DatePatterns/1=GGGG y MMMM d -FormatData//roc.DatePatterns/2=GGGG y MMM d -FormatData//roc.DatePatterns/3=G yyy-MM-dd -FormatData/ar/calendarname.buddhist=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0628\u0648\u0630\u064a -FormatData/ar/calendarname.gregorian=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a -FormatData/ar/calendarname.gregory=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0645\u064a\u0644\u0627\u062f\u064a -FormatData/ar/calendarname.islamic-civil=\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a -FormatData/ar/calendarname.islamic=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u0647\u062c\u0631\u064a -FormatData/ar/calendarname.islamicc=\u062a\u0642\u0648\u064a\u0645 \u0627\u0633\u0644\u0627\u0645\u064a \u0645\u062f\u0646\u064a -FormatData/ar/calendarname.japanese=\u0627\u0644\u062a\u0642\u0648\u064a\u0645 \u0627\u0644\u064a\u0627\u0628\u0627\u0646\u064a -FormatData/ar/calendarname.roc=\u062a\u0642\u0648\u064a\u0645 \u0645\u064a\u0646\u062c\u0648 -FormatData/ar/field.dayperiod=\u0635/\u0645 -FormatData/ar/field.era=\u0627\u0644\u0639\u0635\u0631 -FormatData/ar/field.hour=\u0627\u0644\u0633\u0627\u0639\u0627\u062a -FormatData/ar/field.minute=\u0627\u0644\u062f\u0642\u0627\u0626\u0642 -FormatData/ar/field.month=\u0627\u0644\u0634\u0647\u0631 -FormatData/ar/field.second=\u0627\u0644\u062b\u0648\u0627\u0646\u064a -FormatData/ar/field.week=\u0627\u0644\u0623\u0633\u0628\u0648\u0639 -FormatData/ar/field.weekday=\u0627\u0644\u064a\u0648\u0645 -FormatData/ar/field.year=\u0627\u0644\u0633\u0646\u0629 -FormatData/ar/field.zone=\u0627\u0644\u062a\u0648\u0642\u064a\u062a -FormatData/ar/islamic.MonthNames/0=\u0645\u062d\u0631\u0645 -FormatData/ar/islamic.MonthNames/1=\u0635\u0641\u0631 -FormatData/ar/islamic.MonthNames/2=\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644 -FormatData/ar/islamic.MonthNames/3=\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631 -FormatData/ar/islamic.MonthNames/4=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649 -FormatData/ar/islamic.MonthNames/5=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629 -FormatData/ar/islamic.MonthNames/6=\u0631\u062c\u0628 -FormatData/ar/islamic.MonthNames/7=\u0634\u0639\u0628\u0627\u0646 -FormatData/ar/islamic.MonthNames/8=\u0631\u0645\u0636\u0627\u0646 -FormatData/ar/islamic.MonthNames/9=\u0634\u0648\u0627\u0644 -FormatData/ar/islamic.MonthNames/10=\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629 -FormatData/ar/islamic.MonthNames/11=\u0630\u0648 \u0627\u0644\u062d\u062c\u0629 -FormatData/ar/islamic.MonthNames/12= -FormatData/ar/islamic.MonthAbbreviations/0=\u0645\u062d\u0631\u0645 -FormatData/ar/islamic.MonthAbbreviations/1=\u0635\u0641\u0631 -FormatData/ar/islamic.MonthAbbreviations/2=\u0631\u0628\u064a\u0639 \u0627\u0644\u0623\u0648\u0644 -FormatData/ar/islamic.MonthAbbreviations/3=\u0631\u0628\u064a\u0639 \u0627\u0644\u0622\u062e\u0631 -FormatData/ar/islamic.MonthAbbreviations/4=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0623\u0648\u0644\u0649 -FormatData/ar/islamic.MonthAbbreviations/5=\u062c\u0645\u0627\u062f\u0649 \u0627\u0644\u0622\u062e\u0631\u0629 -FormatData/ar/islamic.MonthAbbreviations/6=\u0631\u062c\u0628 -FormatData/ar/islamic.MonthAbbreviations/7=\u0634\u0639\u0628\u0627\u0646 -FormatData/ar/islamic.MonthAbbreviations/8=\u0631\u0645\u0636\u0627\u0646 -FormatData/ar/islamic.MonthAbbreviations/9=\u0634\u0648\u0627\u0644 -FormatData/ar/islamic.MonthAbbreviations/10=\u0630\u0648 \u0627\u0644\u0642\u0639\u062f\u0629 -FormatData/ar/islamic.MonthAbbreviations/11=\u0630\u0648 \u0627\u0644\u062d\u062c\u0629 -FormatData/ar/islamic.MonthAbbreviations/12= -FormatData/ar/islamic.Eras/0= -FormatData/ar/islamic.Eras/1=\u0647\u0640 -FormatData//islamic.DatePatterns/0=EEEE, MMMM d, y GGGG -FormatData//islamic.DatePatterns/1=MMMM d, y GGGG -FormatData//islamic.DatePatterns/2=MMM d, y GGGG -FormatData//islamic.DatePatterns/3=M/d/yy GGGG -FormatData/ar/roc.DatePatterns/0=EEEE\u060c d MMMM\u060c y GGGG -FormatData/ar/roc.DatePatterns/1=d MMMM\u060c y GGGG -FormatData/ar/roc.DatePatterns/2=dd\u200f/MM\u200f/y GGGG -FormatData/ar/roc.DatePatterns/3=d\u200f/M\u200f/y GGGG -FormatData/be/calendarname.buddhist=\u0431\u0443\u0434\u044b\u0441\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/calendarname.gregorian=\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/calendarname.gregory=\u0433\u0440\u044d\u0433\u0430\u0440\u044b\u044f\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/calendarname.islamic-civil=\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/calendarname.islamic=\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/calendarname.islamicc=\u043c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u043a\u0456 \u0441\u0432\u0435\u0446\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/calendarname.japanese=\u044f\u043f\u043e\u043d\u0441\u043a\u0456 \u043a\u0430\u043b\u044f\u043d\u0434\u0430\u0440 -FormatData/be/field.era=\u044d\u0440\u0430 -FormatData/be/field.hour=\u0433\u0430\u0434\u0437\u0456\u043d\u0430 -FormatData/be/field.minute=\u0445\u0432\u0456\u043b\u0456\u043d\u0430 -FormatData/be/field.month=\u043c\u0435\u0441\u044f\u0446 -FormatData/be/field.second=\u0441\u0435\u043a\u0443\u043d\u0434\u0430 -FormatData/be/field.week=\u0442\u044b\u0434\u0437\u0435\u043d\u044c -FormatData/be/field.weekday=\u0434\u0437\u0435\u043d\u044c \u0442\u044b\u0434\u043d\u044f -FormatData/be/field.year=\u0433\u043e\u0434 -FormatData/bg/calendarname.buddhist=\u0411\u0443\u0434\u0438\u0441\u0442\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.gregorian=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.gregory=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.islamic-civil=\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.islamic=\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.islamicc=\u0418\u0441\u043b\u044f\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u0435\u043d \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.japanese=\u042f\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/bg/calendarname.roc=\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u0442\u0430\u0439 -FormatData/bg/field.dayperiod=\u0434\u0435\u043d -FormatData/bg/field.era=\u0435\u0440\u0430 -FormatData/bg/field.hour=\u0447\u0430\u0441 -FormatData/bg/field.minute=\u043c\u0438\u043d\u0443\u0442\u0430 -FormatData/bg/field.month=\u043c\u0435\u0441\u0435\u0446 -FormatData/bg/field.second=\u0441\u0435\u043a\u0443\u043d\u0434\u0430 -FormatData/bg/field.week=\u0441\u0435\u0434\u043c\u0438\u0446\u0430 -FormatData/bg/field.weekday=\u0414\u0435\u043d \u043e\u0442 \u0441\u0435\u0434\u043c\u0438\u0446\u0430\u0442\u0430 -FormatData/bg/field.year=\u0433\u043e\u0434\u0438\u043d\u0430 -FormatData/bg/field.zone=\u0437\u043e\u043d\u0430 -FormatData/bg/islamic.MonthNames/0=\u043c\u0443\u0445\u0430\u0440\u0430\u043c -FormatData/bg/islamic.MonthNames/1=\u0441\u0430\u0444\u0430\u0440 -FormatData/bg/islamic.MonthNames/2=\u0440\u0430\u0431\u0438-1 -FormatData/bg/islamic.MonthNames/3=\u0440\u0430\u0431\u0438-2 -FormatData/bg/islamic.MonthNames/4=\u0434\u0436\u0443\u043c\u0430\u0434\u0430-1 -FormatData/bg/islamic.MonthNames/5=\u0434\u0436\u0443\u043c\u0430\u0434\u0430-2 -FormatData/bg/islamic.MonthNames/6=\u0440\u0430\u0434\u0436\u0430\u0431 -FormatData/bg/islamic.MonthNames/7=\u0448\u0430\u0431\u0430\u043d -FormatData/bg/islamic.MonthNames/8=\u0440\u0430\u043c\u0430\u0437\u0430\u043d -FormatData/bg/islamic.MonthNames/9=\u0428\u0430\u0432\u0430\u043b -FormatData/bg/islamic.MonthNames/10=\u0414\u0445\u0443\u043b-\u041a\u0430\u0430\u0434\u0430 -FormatData/bg/islamic.MonthNames/11=\u0414\u0445\u0443\u043b-\u0445\u0438\u0434\u0436\u0430 -FormatData/bg/islamic.MonthNames/12= -FormatData/ca/calendarname.buddhist=calendari budista -FormatData/ca/calendarname.gregorian=calendari gregori\u00e0 -FormatData/ca/calendarname.gregory=calendari gregori\u00e0 -FormatData/ca/calendarname.islamic-civil=calendari civil isl\u00e0mic -FormatData/ca/calendarname.islamic=calendari musulm\u00e0 -FormatData/ca/calendarname.islamicc=calendari civil isl\u00e0mic -FormatData/ca/calendarname.japanese=calendari japon\u00e8s -FormatData/ca/calendarname.roc=calendari de la Rep\u00fablica de Xina -FormatData/ca/field.dayperiod=a.m./p.m. -FormatData/ca/field.era=era -FormatData/ca/field.hour=hora -FormatData/ca/field.minute=minut -FormatData/ca/field.month=mes -FormatData/ca/field.second=segon -FormatData/ca/field.week=setmana -FormatData/ca/field.weekday=dia de la setmana -FormatData/ca/field.year=any -FormatData/ca/field.zone=zona -FormatData/cs/calendarname.buddhist=Buddhistick\u00fd kalend\u00e1\u0159 -FormatData/cs/calendarname.gregorian=Gregori\u00e1nsk\u00fd kalend\u00e1\u0159 -FormatData/cs/calendarname.gregory=Gregori\u00e1nsk\u00fd kalend\u00e1\u0159 -FormatData/cs/calendarname.islamic-civil=Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159 -FormatData/cs/calendarname.islamic=Muslimsk\u00fd kalend\u00e1\u0159 -FormatData/cs/calendarname.islamicc=Muslimsk\u00fd ob\u010dansk\u00fd kalend\u00e1\u0159 -FormatData/cs/calendarname.japanese=Japonsk\u00fd kalend\u00e1\u0159 -FormatData/cs/field.dayperiod=AM/PM -FormatData/cs/field.hour=Hodina -FormatData/cs/field.minute=Minuta -FormatData/cs/field.month=M\u011bs\u00edc -FormatData/cs/field.second=Sekunda -FormatData/cs/field.week=T\u00fdden -FormatData/cs/field.weekday=Den v t\u00fddnu -FormatData/cs/field.year=Rok -FormatData/cs/field.zone=\u010casov\u00e9 p\u00e1smo -FormatData/da/calendarname.buddhist=buddhistisk kalender -FormatData/da/calendarname.gregorian=gregoriansk kalender -FormatData/da/calendarname.gregory=gregoriansk kalender -FormatData/da/calendarname.islamic-civil=verdslig islamisk kalender -FormatData/da/calendarname.islamic=islamisk kalender -FormatData/da/calendarname.islamicc=verdslig islamisk kalender -FormatData/da/calendarname.japanese=japansk kalender -FormatData/da/calendarname.roc=kalender for Republikken Kina -FormatData/da/field.dayperiod=dagtid -FormatData/da/field.era=\u00e6ra -FormatData/da/field.hour=time -FormatData/da/field.minute=minut -FormatData/da/field.month=m\u00e5ned -FormatData/da/field.second=sekund -FormatData/da/field.week=uge -FormatData/da/field.weekday=ugedag -FormatData/da/field.year=\u00e5r -FormatData/da/field.zone=tidszone -FormatData/da/roc.DatePatterns/0=EEEE d. MMMM y GGGG -FormatData/da/roc.DatePatterns/1=d. MMMM y GGGG -FormatData/da/roc.DatePatterns/2=d. MMM y GGGG -FormatData/da/roc.DatePatterns/3=d/M/y G -FormatData/da/islamic.DatePatterns/0=EEEE d. MMMM y GGGG -FormatData/da/islamic.DatePatterns/1=d. MMMM y GGGG -FormatData/da/islamic.DatePatterns/2=d. MMM y GGGG -FormatData/da/islamic.DatePatterns/3=d/M/y GGGG -FormatData/de/calendarname.buddhist=Buddhistischer Kalender -FormatData/de/calendarname.gregorian=Gregorianischer Kalender -FormatData/de/calendarname.gregory=Gregorianischer Kalender -FormatData/de/calendarname.islamic-civil=B\u00fcrgerlicher islamischer Kalender -FormatData/de/calendarname.islamic=Islamischer Kalender -FormatData/de/calendarname.islamicc=B\u00fcrgerlicher islamischer Kalender -FormatData/de/calendarname.japanese=Japanischer Kalender -FormatData/de/calendarname.roc=Kalender der Republik China -FormatData/de/field.dayperiod=Tagesh\u00e4lfte -FormatData/de/field.era=Epoche -FormatData/de/field.hour=Stunde -FormatData/de/field.minute=Minute -FormatData/de/field.month=Monat -FormatData/de/field.second=Sekunde -FormatData/de/field.week=Woche -FormatData/de/field.weekday=Wochentag -FormatData/de/field.year=Jahr -FormatData/de/field.zone=Zone -FormatData/de/roc.DatePatterns/0=EEEE d. MMMM y GGGG -FormatData/de/roc.DatePatterns/1=d. MMMM y GGGG -FormatData/de/roc.DatePatterns/2=d. MMM y GGGG -FormatData/de/roc.DatePatterns/3=d.M.y G -FormatData/de/islamic.DatePatterns/0=EEEE d. MMMM y GGGG -FormatData/de/islamic.DatePatterns/1=d. MMMM y GGGG -FormatData/de/islamic.DatePatterns/2=d. MMM y GGGG -FormatData/de/islamic.DatePatterns/3=d.M.y GGGG -FormatData/el/calendarname.buddhist=\u0392\u03bf\u03c5\u03b4\u03b9\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.gregorian=\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.gregory=\u0393\u03c1\u03b7\u03b3\u03bf\u03c1\u03b9\u03b1\u03bd\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.islamic-civil=\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.islamic=\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.islamicc=\u0399\u03c3\u03bb\u03b1\u03bc\u03b9\u03ba\u03cc \u03b1\u03c3\u03c4\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.japanese=\u0399\u03b1\u03c0\u03c9\u03bd\u03b9\u03ba\u03cc \u03b7\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf -FormatData/el/calendarname.roc=\u0397\u03bc\u03b5\u03c1\u03bf\u03bb\u03cc\u03b3\u03b9\u03bf \u03c4\u03b7\u03c2 \u0394\u03b7\u03bc\u03bf\u03ba\u03c1\u03b1\u03c4\u03af\u03b1\u03c2 \u03c4\u03b7\u03c2 \u039a\u03af\u03bd\u03b1\u03c2 -FormatData/el/field.dayperiod=\u03c0.\u03bc./\u03bc.\u03bc. -FormatData/el/field.era=\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2 -FormatData/el/field.hour=\u038f\u03c1\u03b1 -FormatData/el/field.minute=\u039b\u03b5\u03c0\u03c4\u03cc -FormatData/el/field.month=\u039c\u03ae\u03bd\u03b1\u03c2 -FormatData/el/field.second=\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf -FormatData/el/field.week=\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1 -FormatData/el/field.weekday=\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2 -FormatData/el/field.year=\u0388\u03c4\u03bf\u03c2 -FormatData/el/field.zone=\u0396\u03ce\u03bd\u03b7 -FormatData/el/roc.DatePatterns/0=EEEE, d MMMM, y GGGG -FormatData/el/roc.DatePatterns/1=d MMMM, y GGGG -FormatData/el/roc.DatePatterns/2=d MMM, y GGGG -FormatData/el/roc.DatePatterns/3=d/M/y GGGG -FormatData/es/calendarname.buddhist=calendario budista -FormatData/es/calendarname.gregorian=calendario gregoriano -FormatData/es/calendarname.gregory=calendario gregoriano -FormatData/es/calendarname.islamic-civil=calendario civil isl\u00e1mico -FormatData/es/calendarname.islamic=calendario isl\u00e1mico -FormatData/es/calendarname.islamicc=calendario civil isl\u00e1mico -FormatData/es/calendarname.japanese=calendario japon\u00e9s -FormatData/es/calendarname.roc=calendario de la Rep\u00fablica de China -FormatData/es/field.dayperiod=periodo del d\u00eda -FormatData/es/field.era=era -FormatData/es/field.hour=hora -FormatData/es/field.minute=minuto -FormatData/es/field.month=mes -FormatData/es/field.second=segundo -FormatData/es/field.week=semana -FormatData/es/field.weekday=d\u00eda de la semana -FormatData/es/field.year=a\u00f1o -FormatData/es/field.zone=zona -FormatData/es/roc.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG -FormatData/es/roc.DatePatterns/1=d 'de' MMMM 'de' y GGGG -FormatData/es/roc.DatePatterns/2=dd/MM/y GGGG -FormatData/es/roc.DatePatterns/3=dd/MM/y G -FormatData/es/islamic.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG -FormatData/es/islamic.DatePatterns/1=d 'de' MMMM 'de' y GGGG -FormatData/es/islamic.DatePatterns/2=dd/MM/y GGGG -FormatData/es/islamic.DatePatterns/3=dd/MM/y GGGG -FormatData/et/calendarname.buddhist=budistlik kalender -FormatData/et/calendarname.gregorian=Gregoriuse kalender -FormatData/et/calendarname.gregory=Gregoriuse kalender -FormatData/et/calendarname.islamic-civil=islami ilmalik kalender -FormatData/et/calendarname.islamic=islamikalender -FormatData/et/calendarname.islamicc=islami ilmalik kalender -FormatData/et/calendarname.japanese=Jaapani kalender -FormatData/et/calendarname.roc=Hiina Vabariigi kalender -FormatData/et/field.dayperiod=enne/p\u00e4rast l\u00f5unat -FormatData/et/field.era=ajastu -FormatData/et/field.hour=tund -FormatData/et/field.minute=minut -FormatData/et/field.month=kuu -FormatData/et/field.second=sekund -FormatData/et/field.week=n\u00e4dal -FormatData/et/field.weekday=n\u00e4dalap\u00e4ev -FormatData/et/field.year=aasta -FormatData/et/field.zone=v\u00f6\u00f6nd -FormatData/fi/calendarname.buddhist=buddhalainen kalenteri -FormatData/fi/calendarname.gregorian=gregoriaaninen kalenteri -FormatData/fi/calendarname.gregory=gregoriaaninen kalenteri -FormatData/fi/calendarname.islamic-civil=islamilainen siviilikalenteri -FormatData/fi/calendarname.islamic=islamilainen kalenteri -FormatData/fi/calendarname.islamicc=islamilainen siviilikalenteri -FormatData/fi/calendarname.japanese=japanilainen kalenteri -FormatData/fi/calendarname.roc=Kiinan tasavallan kalenteri -FormatData/fi/field.dayperiod=vuorokaudenaika -FormatData/fi/field.era=aikakausi -FormatData/fi/field.hour=tunti -FormatData/fi/field.minute=minuutti -FormatData/fi/field.month=kuukausi -FormatData/fi/field.second=sekunti -FormatData/fi/field.week=viikko -FormatData/fi/field.weekday=viikonp\u00e4iv\u00e4 -FormatData/fi/field.year=vuosi -FormatData/fi/field.zone=aikavy\u00f6hyke -FormatData/fi/islamic.MonthNames/0=muharram -FormatData/fi/islamic.MonthNames/1=safar -FormatData/fi/islamic.MonthNames/2=rabi\u2019 al-awwal -FormatData/fi/islamic.MonthNames/3=rabi\u2019 al-akhir -FormatData/fi/islamic.MonthNames/4=d\u017eumada-l-ula -FormatData/fi/islamic.MonthNames/5=d\u017eumada-l-akhira -FormatData/fi/islamic.MonthNames/6=rad\u017eab -FormatData/fi/islamic.MonthNames/7=\u0161a\u2019ban -FormatData/fi/islamic.MonthNames/8=ramadan -FormatData/fi/islamic.MonthNames/9=\u0161awwal -FormatData/fi/islamic.MonthNames/10=dhu-l-qa\u2019da -FormatData/fi/islamic.MonthNames/11=dhu-l-hidd\u017ea -FormatData/fi/islamic.MonthNames/12= -FormatData/fi/roc.DatePatterns/0=EEEE d. MMMM y GGGG -FormatData/fi/roc.DatePatterns/1=d. MMMM y GGGG -FormatData/fi/roc.DatePatterns/2=d.M.y GGGG -FormatData/fi/roc.DatePatterns/3=d.M.y GGGG -FormatData/fi/islamic.DatePatterns/0=EEEE d. MMMM y GGGG -FormatData/fi/islamic.DatePatterns/1=d. MMMM y GGGG -FormatData/fi/islamic.DatePatterns/2=d.M.y GGGG -FormatData/fi/islamic.DatePatterns/3=d.M.y GGGG -FormatData/fr/calendarname.buddhist=Calendrier bouddhiste -FormatData/fr/calendarname.gregorian=Calendrier gr\u00e9gorien -FormatData/fr/calendarname.gregory=Calendrier gr\u00e9gorien -FormatData/fr/calendarname.islamic-civil=Calendrier civil musulman -FormatData/fr/calendarname.islamic=Calendrier musulman -FormatData/fr/calendarname.islamicc=Calendrier civil musulman -FormatData/fr/calendarname.japanese=Calendrier japonais -FormatData/fr/calendarname.roc=Calendrier r\u00e9publicain chinois -FormatData/fr/field.dayperiod=cadran -FormatData/fr/field.era=\u00e8re -FormatData/fr/field.hour=heure -FormatData/fr/field.minute=minute -FormatData/fr/field.month=mois -FormatData/fr/field.second=seconde -FormatData/fr/field.week=semaine -FormatData/fr/field.weekday=jour de la semaine -FormatData/fr/field.year=ann\u00e9e -FormatData/fr/field.zone=fuseau horaire -FormatData/fr/islamic.MonthNames/0=Mouharram -FormatData/fr/islamic.MonthNames/1=Safar -FormatData/fr/islamic.MonthNames/2=Rabi\u02bb-oul-Aououal -FormatData/fr/islamic.MonthNames/3=Rabi\u02bb-out-Tani -FormatData/fr/islamic.MonthNames/4=Djoumada-l-Oula -FormatData/fr/islamic.MonthNames/5=Djoumada-t-Tania -FormatData/fr/islamic.MonthNames/6=Radjab -FormatData/fr/islamic.MonthNames/7=Cha\u02bbban -FormatData/fr/islamic.MonthNames/8=Ramadan -FormatData/fr/islamic.MonthNames/9=Chaououal -FormatData/fr/islamic.MonthNames/10=Dou-l-Qa\u02bbda -FormatData/fr/islamic.MonthNames/11=Dou-l-Hidjja -FormatData/fr/islamic.MonthNames/12= -FormatData/fr/islamic.MonthAbbreviations/0=Mouh. -FormatData/fr/islamic.MonthAbbreviations/1=Saf. -FormatData/fr/islamic.MonthAbbreviations/2=Rabi\u02bb-oul-A. -FormatData/fr/islamic.MonthAbbreviations/3=Rabi\u02bb-out-T. -FormatData/fr/islamic.MonthAbbreviations/4=Djoum.-l-O. -FormatData/fr/islamic.MonthAbbreviations/5=Djoum.-t-T. -FormatData/fr/islamic.MonthAbbreviations/6=Radj. -FormatData/fr/islamic.MonthAbbreviations/7=Cha. -FormatData/fr/islamic.MonthAbbreviations/8=Ram. -FormatData/fr/islamic.MonthAbbreviations/9=Chaou. -FormatData/fr/islamic.MonthAbbreviations/10=Dou-l-Q. -FormatData/fr/islamic.MonthAbbreviations/11=Dou-l-H. -FormatData/fr/islamic.MonthAbbreviations/12= -FormatData/fr/islamic.Eras/0= -FormatData/fr/islamic.Eras/1=AH -FormatData/fr/roc.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/fr/roc.DatePatterns/1=d MMMM y GGGG -FormatData/fr/roc.DatePatterns/2=d MMM, y GGGG -FormatData/fr/roc.DatePatterns/3=d/M/y G -FormatData/fr/islamic.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/fr/islamic.DatePatterns/1=d MMMM y GGGG -FormatData/fr/islamic.DatePatterns/2=d MMM, y GGGG -FormatData/fr/islamic.DatePatterns/3=d/M/y GGGG -FormatData/hi_IN/calendarname.buddhist=\u092c\u094c\u0926\u094d\u0927 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.gregorian=\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.gregory=\u0917\u094d\u0930\u0947\u0917\u0930\u0940 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.islamic-civil=\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.islamic=\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.islamicc=\u0907\u0938\u094d\u0932\u093e\u092e\u0940 \u0928\u093e\u0917\u0930\u093f\u0915 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.japanese=\u091c\u093e\u092a\u093e\u0928\u0940 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/calendarname.roc=\u091a\u0940\u0928\u0940 \u0917\u0923\u0924\u0902\u0924\u094d\u0930 \u092a\u0902\u091a\u093e\u0902\u0917 -FormatData/hi_IN/field.dayperiod=\u0938\u092e\u092f \u0905\u0935\u0927\u093f -FormatData/hi_IN/field.era=\u092f\u0941\u0917 -FormatData/hi_IN/field.hour=\u0918\u0902\u091f\u093e -FormatData/hi_IN/field.minute=\u092e\u093f\u0928\u091f -FormatData/hi_IN/field.month=\u092e\u093e\u0938 -FormatData/hi_IN/field.second=\u0938\u0947\u0915\u0947\u0902\u0921 -FormatData/hi_IN/field.week=\u0938\u092a\u094d\u0924\u093e\u0939 -FormatData/hi_IN/field.weekday=\u0938\u092a\u094d\u0924\u093e\u0939 \u0915\u093e \u0926\u093f\u0928 -FormatData/hi_IN/field.year=\u0935\u0930\u094d\u0937 -FormatData/hi_IN/field.zone=\u0915\u094d\u0937\u0947\u0924\u094d\u0930 -FormatData/hr/calendarname.buddhist=budisti\u010dki kalendar -FormatData/hr/calendarname.gregorian=gregorijanski kalendar -FormatData/hr/calendarname.gregory=gregorijanski kalendar -FormatData/hr/calendarname.islamic-civil=islamski civilni kalendar -FormatData/hr/calendarname.islamic=islamski kalendar -FormatData/hr/calendarname.islamicc=islamski civilni kalendar -FormatData/hr/calendarname.japanese=japanski kalendar -FormatData/hr/calendarname.roc=kalendar Republike Kine -FormatData/hr/field.dayperiod=dio dana -FormatData/hr/field.era=era -FormatData/hr/field.hour=sat -FormatData/hr/field.minute=minuta -FormatData/hr/field.month=mjesec -FormatData/hr/field.second=sekunda -FormatData/hr/field.week=tjedan -FormatData/hr/field.weekday=dan u tjednu -FormatData/hr/field.year=godina -FormatData/hr/field.zone=zona -FormatData/hr/roc.DatePatterns/0=EEEE, d. MMMM y. GGGG -FormatData/hr/roc.DatePatterns/1=d. MMMM y. GGGG -FormatData/hr/roc.DatePatterns/2=d. M. y. GGGG -FormatData/hr/roc.DatePatterns/3=d.M.y. GGGG -FormatData/hu/calendarname.buddhist=buddhista napt\u00e1r -FormatData/hu/calendarname.gregorian=Gergely-napt\u00e1r -FormatData/hu/calendarname.gregory=Gergely-napt\u00e1r -FormatData/hu/calendarname.islamic-civil=iszl\u00e1m civil napt\u00e1r -FormatData/hu/calendarname.islamic=iszl\u00e1m napt\u00e1r -FormatData/hu/calendarname.islamicc=iszl\u00e1m civil napt\u00e1r -FormatData/hu/calendarname.japanese=jap\u00e1n napt\u00e1r -FormatData/hu/calendarname.roc=K\u00ednai k\u00f6zt\u00e1rsas\u00e1gi napt\u00e1r -FormatData/hu/field.dayperiod=napszak -FormatData/hu/field.era=\u00e9ra -FormatData/hu/field.hour=\u00f3ra -FormatData/hu/field.minute=perc -FormatData/hu/field.month=h\u00f3nap -FormatData/hu/field.second=m\u00e1sodperc -FormatData/hu/field.week=h\u00e9t -FormatData/hu/field.weekday=h\u00e9t napja -FormatData/hu/field.year=\u00e9v -FormatData/hu/field.zone=z\u00f3na -FormatData/hu/islamic.MonthNames/0=Moharrem -FormatData/hu/islamic.MonthNames/1=Safar -FormatData/hu/islamic.MonthNames/2=R\u00e9bi el avvel -FormatData/hu/islamic.MonthNames/3=R\u00e9bi el accher -FormatData/hu/islamic.MonthNames/4=Dsem\u00e1di el avvel -FormatData/hu/islamic.MonthNames/5=Dsem\u00e1di el accher -FormatData/hu/islamic.MonthNames/6=Redseb -FormatData/hu/islamic.MonthNames/7=Sab\u00e1n -FormatData/hu/islamic.MonthNames/8=Ramad\u00e1n -FormatData/hu/islamic.MonthNames/9=Sevv\u00e1l -FormatData/hu/islamic.MonthNames/10=Ds\u00fcl kade -FormatData/hu/islamic.MonthNames/11=Ds\u00fcl hedse -FormatData/hu/islamic.MonthNames/12= -FormatData/hu/islamic.Eras/0= -FormatData/hu/islamic.Eras/1=MF -FormatData/is/calendarname.buddhist=B\u00fadd\u00edskt dagatal -FormatData/is/calendarname.gregorian=Gregor\u00edskt dagatal -FormatData/is/calendarname.gregory=Gregor\u00edskt dagatal -FormatData/is/calendarname.islamic-civil=\u00cdslamskt borgaradagatal -FormatData/is/calendarname.islamic=\u00cdslamskt dagatal -FormatData/is/calendarname.islamicc=\u00cdslamskt borgaradagatal -FormatData/is/calendarname.japanese=Japanskt dagatal -FormatData/it/calendarname.buddhist=calendario buddista -FormatData/it/calendarname.gregorian=calendario gregoriano -FormatData/it/calendarname.gregory=calendario gregoriano -FormatData/it/calendarname.islamic-civil=calendario civile islamico -FormatData/it/calendarname.islamic=calendario islamico -FormatData/it/calendarname.islamicc=calendario civile islamico -FormatData/it/calendarname.japanese=calendario giapponese -FormatData/it/field.dayperiod=periodo del giorno -FormatData/it/field.era=era -FormatData/it/field.hour=ora -FormatData/it/field.minute=minuto -FormatData/it/field.month=mese -FormatData/it/field.second=secondo -FormatData/it/field.week=settimana -FormatData/it/field.weekday=giorno della settimana -FormatData/it/field.year=anno -FormatData/it/field.zone=zona -FormatData/it/roc.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/it/roc.DatePatterns/1=dd MMMM y GGGG -FormatData/it/roc.DatePatterns/2=dd/MMM/y GGGG -FormatData/it/roc.DatePatterns/3=dd/MM/y GGGG -FormatData/it/islamic.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/it/islamic.DatePatterns/1=dd MMMM y GGGG -FormatData/it/islamic.DatePatterns/2=dd/MMM/y GGGG -FormatData/it/islamic.DatePatterns/3=dd/MM/y GGGG -FormatData/iw/calendarname.buddhist=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d1\u05d5\u05d3\u05d4\u05d9\u05e1\u05d8\u05d9 -FormatData/iw/calendarname.gregorian=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9 -FormatData/iw/calendarname.gregory=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d2\u05e8\u05d2\u05d5\u05e8\u05d9\u05d0\u05e0\u05d9 -FormatData/iw/calendarname.islamic-civil=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9 -FormatData/iw/calendarname.islamic=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9 -FormatData/iw/calendarname.islamicc=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05de\u05d5\u05e1\u05dc\u05de\u05d9-\u05d0\u05d6\u05e8\u05d7\u05d9 -FormatData/iw/calendarname.japanese=\u05dc\u05d5\u05d7 \u05e9\u05e0\u05d4 \u05d9\u05e4\u05e0\u05d9 -FormatData/iw/field.dayperiod=\u05dc\u05e4\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6 -FormatData/iw/field.era=\u05ea\u05e7\u05d5\u05e4\u05d4 -FormatData/iw/field.hour=\u05e9\u05e2\u05d4 -FormatData/iw/field.minute=\u05d3\u05e7\u05d4 -FormatData/iw/field.month=\u05d7\u05d5\u05d3\u05e9 -FormatData/iw/field.second=\u05e9\u05e0\u05d9\u05d9\u05d4 -FormatData/iw/field.week=\u05e9\u05d1\u05d5\u05e2 -FormatData/iw/field.weekday=\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2 -FormatData/iw/field.year=\u05e9\u05e0\u05d4 -FormatData/iw/field.zone=\u05d0\u05d6\u05d5\u05e8 -FormatData/iw/islamic.MonthNames/0=\u05de\u05d5\u05d7\u05e8\u05dd -FormatData/iw/islamic.MonthNames/1=\u05e1\u05e4\u05e8 -FormatData/iw/islamic.MonthNames/2=\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc -FormatData/iw/islamic.MonthNames/3=\u05e8\u05d1\u05d9\u05e2 \u05d0\u05dc-\u05ea\u05e0\u05d9 -FormatData/iw/islamic.MonthNames/4=\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05d0\u05d5\u05d5\u05d0\u05dc -FormatData/iw/islamic.MonthNames/5=\u05d2\u05f3\u05d5\u05de\u05d3\u05d4 \u05d0\u05dc-\u05ea\u05e0\u05d9 -FormatData/iw/islamic.MonthNames/6=\u05e8\u05d2\u05f3\u05d0\u05d1 -FormatData/iw/islamic.MonthNames/7=\u05e9\u05e2\u05d1\u05d0\u05df -FormatData/iw/islamic.MonthNames/8=\u05e8\u05d0\u05de\u05d3\u05df -FormatData/iw/islamic.MonthNames/9=\u05e9\u05d5\u05d5\u05d0\u05dc -FormatData/iw/islamic.MonthNames/10=\u05d6\u05d5 \u05d0\u05dc-QI'DAH -FormatData/iw/islamic.MonthNames/11=\u05d6\u05d5 \u05d0\u05dc-\u05d7\u05d9\u05d2\u05f3\u05d4 -FormatData/iw/islamic.MonthNames/12= -FormatData/iw/islamic.Eras/0= -FormatData/iw/islamic.Eras/1=\u05e9\u05e0\u05ea \u05d4\u05d9\u05d2\u05f3\u05e8\u05d4 -FormatData/ja/calendarname.buddhist=\u30bf\u30a4\u4ecf\u6559\u66a6 -FormatData/ja/calendarname.gregorian=\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6] -FormatData/ja/calendarname.gregory=\u897f\u66a6[\u30b0\u30ec\u30b4\u30ea\u30aa\u66a6] -FormatData/ja/calendarname.islamic-civil=\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6 -FormatData/ja/calendarname.islamic=\u30a4\u30b9\u30e9\u30e0\u66a6 -FormatData/ja/calendarname.islamicc=\u592a\u967d\u30a4\u30b9\u30e9\u30e0\u66a6 -FormatData/ja/calendarname.japanese=\u548c\u66a6 -FormatData/ja/calendarname.roc=\u4e2d\u83ef\u6c11\u56fd\u66a6 -FormatData/ja/field.dayperiod=\u5348\u524d/\u5348\u5f8c -FormatData/ja/field.era=\u6642\u4ee3 -FormatData/ja/field.hour=\u6642 -FormatData/ja/field.minute=\u5206 -FormatData/ja/field.month=\u6708 -FormatData/ja/field.second=\u79d2 -FormatData/ja/field.week=\u9031 -FormatData/ja/field.weekday=\u66dc\u65e5 -FormatData/ja/field.year=\u5e74 -FormatData/ja/field.zone=\u30bf\u30a4\u30e0\u30be\u30fc\u30f3 -FormatData/ja/roc.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE -FormatData/ja/roc.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5 -FormatData/ja/roc.DatePatterns/2=GGGGy/MM/dd -FormatData/ja/roc.DatePatterns/3=GGGGy/MM/dd -FormatData/ko/calendarname.buddhist=\ubd88\uad50\ub825 -FormatData/ko/calendarname.gregorian=\ud0dc\uc591\ub825 -FormatData/ko/calendarname.gregory=\ud0dc\uc591\ub825 -FormatData/ko/calendarname.islamic-civil=\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825 -FormatData/ko/calendarname.islamic=\uc774\uc2ac\ub78c\ub825 -FormatData/ko/calendarname.islamicc=\uc774\uc2ac\ub78c \uc0c1\uc6a9\ub825 -FormatData/ko/calendarname.japanese=\uc77c\ubcf8\ub825 -FormatData/ko/calendarname.roc=\ub300\ub9cc\ub825 -FormatData/ko/field.dayperiod=\uc624\uc804/\uc624\ud6c4 -FormatData/ko/field.era=\uc5f0\ud638 -FormatData/ko/field.hour=\uc2dc -FormatData/ko/field.minute=\ubd84 -FormatData/ko/field.month=\uc6d4 -FormatData/ko/field.second=\ucd08 -FormatData/ko/field.week=\uc8fc -FormatData/ko/field.weekday=\uc694\uc77c -FormatData/ko/field.year=\ub144 -FormatData/ko/field.zone=\uc2dc\uac04\ub300 -FormatData/ko/roc.DatePatterns/0=GGGG y\ub144 M\uc6d4 d\uc77c EEEE -FormatData/ko/roc.DatePatterns/1=GGGG y\ub144 M\uc6d4 d\uc77c -FormatData/ko/roc.DatePatterns/2=GGGG y. M. d -FormatData/ko/roc.DatePatterns/3=GGGG y. M. d -FormatData/lt/calendarname.buddhist=Budist\u0173 kalendorius -FormatData/lt/calendarname.gregorian=Grigaliaus kalendorius -FormatData/lt/calendarname.gregory=Grigaliaus kalendorius -FormatData/lt/calendarname.islamic-civil=Pilietinis islamo kalendorius -FormatData/lt/calendarname.islamic=Islamo kalendorius -FormatData/lt/calendarname.islamicc=Pilietinis islamo kalendorius -FormatData/lt/calendarname.japanese=Japon\u0173 kalendorius -FormatData/lt/calendarname.roc=Kinijos Respublikos kalendorius -FormatData/lt/field.dayperiod=dienos metas -FormatData/lt/field.era=era -FormatData/lt/field.hour=valanda -FormatData/lt/field.minute=minut\u0117 -FormatData/lt/field.month=m\u0117nuo -FormatData/lt/field.second=sekund\u0117 -FormatData/lt/field.week=savait\u0117 -FormatData/lt/field.weekday=savait\u0117s diena -FormatData/lt/field.year=metai -FormatData/lt/field.zone=laiko juosta -FormatData/lv/calendarname.buddhist=budistu kalend\u0101rs -FormatData/lv/calendarname.gregorian=Gregora kalend\u0101rs -FormatData/lv/calendarname.gregory=Gregora kalend\u0101rs -FormatData/lv/calendarname.islamic-civil=isl\u0101ma pilso\u0146u kalend\u0101rs -FormatData/lv/calendarname.islamic=isl\u0101ma kalend\u0101rs -FormatData/lv/calendarname.islamicc=isl\u0101ma pilso\u0146u kalend\u0101rs -FormatData/lv/calendarname.japanese=jap\u0101\u0146u kalend\u0101rs -FormatData/lv/calendarname.roc=\u0136\u012bnas Republikas kalend\u0101rs -FormatData/lv/field.dayperiod=Dayperiod -FormatData/lv/field.era=\u0113ra -FormatData/lv/field.hour=Stundas -FormatData/lv/field.minute=Min\u016btes -FormatData/lv/field.month=M\u0113nesis -FormatData/lv/field.second=Sekundes -FormatData/lv/field.week=Ned\u0113\u013ca -FormatData/lv/field.weekday=Ned\u0113\u013cas diena -FormatData/lv/field.year=Gads -FormatData/lv/field.zone=Josla -FormatData/lv/islamic.MonthNames/0=muharams -FormatData/lv/islamic.MonthNames/1=safars -FormatData/lv/islamic.MonthNames/2=1. rab\u012b -FormatData/lv/islamic.MonthNames/3=2. rab\u012b -FormatData/lv/islamic.MonthNames/4=1. d\u017eum\u0101d\u0101 -FormatData/lv/islamic.MonthNames/5=2. d\u017eum\u0101d\u0101 -FormatData/lv/islamic.MonthNames/6=rad\u017eabs -FormatData/lv/islamic.MonthNames/7=\u0161abans -FormatData/lv/islamic.MonthNames/8=ramad\u0101ns -FormatData/lv/islamic.MonthNames/9=\u0161auvals -FormatData/lv/islamic.MonthNames/10=du al-kid\u0101 -FormatData/lv/islamic.MonthNames/11=du al-hid\u017e\u0101 -FormatData/lv/islamic.MonthNames/12= -FormatData/mk/calendarname.buddhist=\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.gregorian=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.gregory=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.islamic-civil=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.islamic=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.islamicc=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0433\u0440\u0430\u0453\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.japanese=\u0408\u0430\u043f\u043e\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/mk/calendarname.roc=\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u043d\u0430 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0430 \u041a\u0438\u043d\u0430 -FormatData/mk/field.dayperiod=\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435 -FormatData/mk/field.era=\u0415\u0440\u0430 -FormatData/mk/field.hour=\u0427\u0430\u0441 -FormatData/mk/field.minute=\u041c\u0438\u043d\u0443\u0442\u0430 -FormatData/mk/field.month=\u041c\u0435\u0441\u0435\u0446 -FormatData/mk/field.second=\u0421\u0435\u043a\u0443\u043d\u0434\u0430 -FormatData/mk/field.week=\u041d\u0435\u0434\u0435\u043b\u0430 -FormatData/mk/field.weekday=\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430 -FormatData/mk/field.year=\u0433\u043e\u0434\u0438\u043d\u0430 -FormatData/mk/field.zone=\u0437\u043e\u043d\u0430 -FormatData/ms/calendarname.buddhist=Kalendar Buddha -FormatData/ms/calendarname.gregorian=Kalendar Gregory -FormatData/ms/calendarname.gregory=Kalendar Gregory -FormatData/ms/calendarname.islamic-civil=Kalendar Sivil Islam -FormatData/ms/calendarname.islamic=Kalendar Islam -FormatData/ms/calendarname.islamicc=Kalendar Sivil Islam -FormatData/ms/calendarname.japanese=Kalendar Jepun -FormatData/ms/calendarname.roc=Kalendar Minguo -FormatData/ms/field.dayperiod=PG/PTG -FormatData/ms/field.hour=Jam -FormatData/ms/field.minute=Minit -FormatData/ms/field.month=Bulan -FormatData/ms/field.second=Kedua -FormatData/ms/field.week=Minggu -FormatData/ms/field.weekday=Hari dalam Minggu -FormatData/ms/field.year=Tahun -FormatData/ms/field.zone=Zon Waktu -FormatData/ms/roc.DatePatterns/0=EEEE, d MMMM y GGGG -FormatData/ms/roc.DatePatterns/1=d MMMM y GGGG -FormatData/ms/roc.DatePatterns/2=dd/MM/y GGGG -FormatData/ms/roc.DatePatterns/3=d/MM/y GGGG -FormatData/ms/islamic.DatePatterns/0=EEEE, d MMMM y GGGG -FormatData/ms/islamic.DatePatterns/1=d MMMM y GGGG -FormatData/ms/islamic.DatePatterns/2=dd/MM/y GGGG -FormatData/ms/islamic.DatePatterns/3=d/MM/y GGGG -FormatData/mt/calendarname.buddhist=Kalendarju Buddist -FormatData/mt/calendarname.gregorian=Kalendarju Gregorjan -FormatData/mt/calendarname.gregory=Kalendarju Gregorjan -FormatData/mt/calendarname.islamic-civil=Kalendarju Islamiku-\u010aivili -FormatData/mt/calendarname.islamic=Kalendarju Islamiku -FormatData/mt/calendarname.islamicc=Kalendarju Islamiku-\u010aivili -FormatData/mt/calendarname.japanese=Kalendarju \u0120appuni\u017c -FormatData/mt/field.era=Epoka -FormatData/mt/field.hour=Sieg\u0127a -FormatData/mt/field.minute=Minuta -FormatData/mt/field.month=Xahar -FormatData/mt/field.second=Sekonda -FormatData/mt/field.week=\u0120img\u0127a -FormatData/mt/field.weekday=Jum tal-\u0120img\u0127a -FormatData/mt/field.year=Sena -FormatData/mt/field.zone=\u017bona -FormatData/nl/calendarname.buddhist=Boeddhistische kalender -FormatData/nl/calendarname.gregorian=Gregoriaanse kalender -FormatData/nl/calendarname.gregory=Gregoriaanse kalender -FormatData/nl/calendarname.islamic-civil=Islamitische kalender (cyclisch) -FormatData/nl/calendarname.islamic=Islamitische kalender -FormatData/nl/calendarname.islamicc=Islamitische kalender (cyclisch) -FormatData/nl/calendarname.japanese=Japanse kalender -FormatData/nl/calendarname.roc=Kalender van de Chinese Republiek -FormatData/nl/field.dayperiod=AM/PM -FormatData/nl/field.era=Tijdperk -FormatData/nl/field.hour=Uur -FormatData/nl/field.minute=Minuut -FormatData/nl/field.month=Maand -FormatData/nl/field.second=Seconde -FormatData/nl/field.weekday=Dag van de week -FormatData/nl/field.year=Jaar -FormatData/nl/field.zone=Zone -FormatData/nl/islamic.MonthNames/0=Moeharram -FormatData/nl/islamic.MonthNames/1=Safar -FormatData/nl/islamic.MonthNames/2=Rabi\u02bba al awal -FormatData/nl/islamic.MonthNames/3=Rabi\u02bba al thani -FormatData/nl/islamic.MonthNames/4=Joemad\u02bbal awal -FormatData/nl/islamic.MonthNames/5=Joemad\u02bbal thani -FormatData/nl/islamic.MonthNames/6=Rajab -FormatData/nl/islamic.MonthNames/7=Sja\u02bbaban -FormatData/nl/islamic.MonthNames/8=Ramadan -FormatData/nl/islamic.MonthNames/9=Sjawal -FormatData/nl/islamic.MonthNames/10=Doe al ka\u02bbaba -FormatData/nl/islamic.MonthNames/11=Doe al hizja -FormatData/nl/islamic.MonthNames/12= -FormatData/nl/islamic.MonthAbbreviations/0=Moeh. -FormatData/nl/islamic.MonthAbbreviations/1=Saf. -FormatData/nl/islamic.MonthAbbreviations/2=Rab. I -FormatData/nl/islamic.MonthAbbreviations/3=Rab. II -FormatData/nl/islamic.MonthAbbreviations/4=Joem. I -FormatData/nl/islamic.MonthAbbreviations/5=Joem. II -FormatData/nl/islamic.MonthAbbreviations/6=Raj. -FormatData/nl/islamic.MonthAbbreviations/7=Sja. -FormatData/nl/islamic.MonthAbbreviations/8=Ram. -FormatData/nl/islamic.MonthAbbreviations/9=Sjaw. -FormatData/nl/islamic.MonthAbbreviations/10=Doe al k. -FormatData/nl/islamic.MonthAbbreviations/11=Doe al h. -FormatData/nl/islamic.MonthAbbreviations/12= -FormatData/nl/islamic.Eras/0= -FormatData/nl/islamic.Eras/1=Sa\u02bbna Hizjria -FormatData/nl/roc.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/nl/roc.DatePatterns/1=d MMMM y GGGG -FormatData/nl/roc.DatePatterns/2=d MMM y GGGG -FormatData/nl/roc.DatePatterns/3=dd-MM-yy G -FormatData/nl/islamic.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/nl/islamic.DatePatterns/1=d MMMM y GGGG -FormatData/nl/islamic.DatePatterns/2=d MMM y GGGG -FormatData/nl/islamic.DatePatterns/3=dd-MM-yy GGGG -FormatData/pl/calendarname.buddhist=kalendarz buddyjski -FormatData/pl/calendarname.gregorian=kalendarz gregoria\u0144ski -FormatData/pl/calendarname.gregory=kalendarz gregoria\u0144ski -FormatData/pl/calendarname.islamic-civil=kalendarz islamski (metoda obliczeniowa) -FormatData/pl/calendarname.islamic=kalendarz islamski (metoda wzrokowa) -FormatData/pl/calendarname.islamicc=kalendarz islamski (metoda obliczeniowa) -FormatData/pl/calendarname.japanese=kalendarz japo\u0144ski -FormatData/pl/calendarname.roc=kalendarz Republiki Chi\u0144skiej -FormatData/pl/field.era=Era -FormatData/pl/field.hour=Godzina -FormatData/pl/field.minute=Minuta -FormatData/pl/field.month=Miesi\u0105c -FormatData/pl/field.second=Sekunda -FormatData/pl/field.week=Tydzie\u0144 -FormatData/pl/field.weekday=Dzie\u0144 tygodnia -FormatData/pl/field.year=Rok -FormatData/pl/field.zone=Strefa -FormatData/pl/roc.DatePatterns/0=EEEE, d MMMM, y GGGG -FormatData/pl/roc.DatePatterns/1=d MMMM, y GGGG -FormatData/pl/roc.DatePatterns/2=d MMM y GGGG -FormatData/pl/roc.DatePatterns/3=dd.MM.yyyy GGGG -FormatData/pl/islamic.DatePatterns/0=EEEE, d MMMM, y GGGG -FormatData/pl/islamic.DatePatterns/1=d MMMM, y GGGG -FormatData/pl/islamic.DatePatterns/2=d MMM y GGGG -FormatData/pl/islamic.DatePatterns/3=dd.MM.yyyy GGGG -FormatData/pt/calendarname.buddhist=Calend\u00e1rio Budista -FormatData/pt/calendarname.gregorian=Calend\u00e1rio Gregoriano -FormatData/pt/calendarname.gregory=Calend\u00e1rio Gregoriano -FormatData/pt/calendarname.islamic-civil=Calend\u00e1rio Civil Isl\u00e2mico -FormatData/pt/calendarname.islamic=Calend\u00e1rio Isl\u00e2mico -FormatData/pt/calendarname.islamicc=Calend\u00e1rio Civil Isl\u00e2mico -FormatData/pt/calendarname.japanese=Calend\u00e1rio Japon\u00eas -FormatData/pt/calendarname.roc=Calend\u00e1rio da Rep\u00fablica da China -FormatData/pt/field.dayperiod=Per\u00edodo do dia -FormatData/pt/field.era=Era -FormatData/pt/field.hour=Hora -FormatData/pt/field.minute=Minuto -FormatData/pt/field.month=M\u00eas -FormatData/pt/field.second=Segundo -FormatData/pt/field.week=Semana -FormatData/pt/field.weekday=Dia da semana -FormatData/pt/field.year=Ano -FormatData/pt/field.zone=Fuso -FormatData/pt/roc.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG -FormatData/pt/roc.DatePatterns/1=d 'de' MMMM 'de' y GGGG -FormatData/pt/roc.DatePatterns/2=dd/MM/yyyy GGGG -FormatData/pt/roc.DatePatterns/3=d/M/yyyy -FormatData/pt/islamic.DatePatterns/0=EEEE, d 'de' MMMM 'de' y GGGG -FormatData/pt/islamic.DatePatterns/1=d 'de' MMMM 'de' y GGGG -FormatData/pt/islamic.DatePatterns/2=dd/MM/yyyy GGGG -FormatData/pt/islamic.DatePatterns/3=d/M/yyyy -FormatData/ro/calendarname.buddhist=calendar budist -FormatData/ro/calendarname.gregorian=calendar gregorian -FormatData/ro/calendarname.gregory=calendar gregorian -FormatData/ro/calendarname.islamic-civil=calendar islamic civil -FormatData/ro/calendarname.islamic=calendar islamic -FormatData/ro/calendarname.islamicc=calendar islamic civil -FormatData/ro/calendarname.japanese=calendar japonez -FormatData/ro/calendarname.roc=calendar al Republicii Chineze -FormatData/ro/field.dayperiod=perioada zilei -FormatData/ro/field.era=er\u0103 -FormatData/ro/field.hour=or\u0103 -FormatData/ro/field.minute=minut -FormatData/ro/field.month=lun\u0103 -FormatData/ro/field.second=secund\u0103 -FormatData/ro/field.week=s\u0103pt\u0103m\u00e2n\u0103 -FormatData/ro/field.weekday=zi a s\u0103pt\u0103m\u00e2nii -FormatData/ro/field.year=an -FormatData/ro/field.zone=zon\u0103 -FormatData/ru/calendarname.buddhist=\u0411\u0443\u0434\u0434\u0438\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.gregorian=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.gregory=\u0413\u0440\u0438\u0433\u043e\u0440\u0438\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.islamic-civil=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.islamic=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.islamicc=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438\u0439 \u0433\u0440\u0430\u0436\u0434\u0430\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.japanese=\u042f\u043f\u043e\u043d\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/calendarname.roc=\u041a\u0438\u0442\u0430\u0439\u0441\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c -FormatData/ru/field.era=\u042d\u0440\u0430 -FormatData/ru/field.hour=\u0427\u0430\u0441 -FormatData/ru/field.minute=\u041c\u0438\u043d\u0443\u0442\u0430 -FormatData/ru/field.month=\u041c\u0435\u0441\u044f\u0446 -FormatData/ru/field.second=\u0421\u0435\u043a\u0443\u043d\u0434\u0430 -FormatData/ru/field.week=\u041d\u0435\u0434\u0435\u043b\u044f -FormatData/ru/field.weekday=\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438 -FormatData/ru/field.year=\u0413\u043e\u0434 -FormatData/ru/field.zone=\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441 -FormatData/ru/islamic.MonthNames/0=\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c -FormatData/ru/islamic.MonthNames/1=\u0421\u0430\u0444\u0430\u0440 -FormatData/ru/islamic.MonthNames/2=\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c -FormatData/ru/islamic.MonthNames/3=\u0420\u0430\u0431\u0438-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440 -FormatData/ru/islamic.MonthNames/4=\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0432\u0432\u0430\u043b\u044c -FormatData/ru/islamic.MonthNames/5=\u0414\u0436\u0443\u043c\u0430\u0434-\u0443\u043b\u044c-\u0430\u0445\u0438\u0440 -FormatData/ru/islamic.MonthNames/6=\u0420\u0430\u0434\u0436\u0430\u0431 -FormatData/ru/islamic.MonthNames/7=\u0428\u0430\u0430\u0431\u0430\u043d -FormatData/ru/islamic.MonthNames/8=\u0420\u0430\u043c\u0430\u0434\u0430\u043d -FormatData/ru/islamic.MonthNames/9=\u0428\u0430\u0432\u0432\u0430\u043b\u044c -FormatData/ru/islamic.MonthNames/10=\u0417\u0443\u043b\u044c-\u041a\u0430\u0430\u0434\u0430 -FormatData/ru/islamic.MonthNames/11=\u0417\u0443\u043b\u044c-\u0425\u0438\u0434\u0436\u0436\u0430 -FormatData/ru/islamic.MonthNames/12= -FormatData/ru/roc.DatePatterns/0=EEEE, d MMMM y\u00a0'\u0433'. GGGG -FormatData/ru/roc.DatePatterns/1=d MMMM y\u00a0'\u0433'. GGGG -FormatData/ru/roc.DatePatterns/2=dd.MM.yyyy GGGG -FormatData/ru/roc.DatePatterns/3=dd.MM.yy GGGG -FormatData/ru/islamic.DatePatterns/0=EEEE, d MMMM y\u00a0'\u0433'. GGGG -FormatData/ru/islamic.DatePatterns/1=d MMMM y\u00a0'\u0433'. GGGG -FormatData/ru/islamic.DatePatterns/2=dd.MM.yyyy GGGG -FormatData/ru/islamic.DatePatterns/3=dd.MM.yy GGGG -FormatData/sk/calendarname.buddhist=Buddhistick\u00fd kalend\u00e1r -FormatData/sk/calendarname.gregorian=Gregori\u00e1nsky kalend\u00e1r -FormatData/sk/calendarname.gregory=Gregori\u00e1nsky kalend\u00e1r -FormatData/sk/calendarname.islamic-civil=Islamsk\u00fd ob\u010diansky kalend\u00e1r -FormatData/sk/calendarname.islamic=Islamsk\u00fd kalend\u00e1r -FormatData/sk/calendarname.islamicc=Islamsk\u00fd ob\u010diansky kalend\u00e1r -FormatData/sk/calendarname.japanese=Japonsk\u00fd kalend\u00e1r -FormatData/sk/field.dayperiod=\u010cas\u0165 d\u0148a -FormatData/sk/field.era=\u00c9ra -FormatData/sk/field.hour=Hodina -FormatData/sk/field.minute=Min\u00fata -FormatData/sk/field.month=Mesiac -FormatData/sk/field.second=Sekunda -FormatData/sk/field.week=T\u00fd\u017ede\u0148 -FormatData/sk/field.weekday=De\u0148 v t\u00fd\u017edni -FormatData/sk/field.year=Rok -FormatData/sk/field.zone=P\u00e1smo -FormatData/sl/calendarname.buddhist=budisti\u010dni koledar -FormatData/sl/calendarname.gregorian=gregorijanski koledar -FormatData/sl/calendarname.gregory=gregorijanski koledar -FormatData/sl/calendarname.islamic-civil=islamski civilni koledar -FormatData/sl/calendarname.islamic=islamski koledar -FormatData/sl/calendarname.islamicc=islamski civilni koledar -FormatData/sl/calendarname.japanese=japonski koledar -FormatData/sl/calendarname.roc=kitajski dr\u017eavni koledar -FormatData/sl/field.dayperiod=\u010cas dneva -FormatData/sl/field.era=Doba -FormatData/sl/field.hour=Ura -FormatData/sl/field.minute=Minuta -FormatData/sl/field.month=Mesec -FormatData/sl/field.second=Sekunda -FormatData/sl/field.week=Teden -FormatData/sl/field.weekday=Dan v tednu -FormatData/sl/field.year=Leto -FormatData/sl/field.zone=Obmo\u010dje -FormatData/sr/calendarname.buddhist=\u0411\u0443\u0434\u0438\u0441\u0442\u0438\u0447\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.gregorian=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.gregory=\u0413\u0440\u0435\u0433\u043e\u0440\u0438\u0458\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.islamic-civil=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.islamic=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.islamicc=\u0418\u0441\u043b\u0430\u043c\u0441\u043a\u0438 \u0446\u0438\u0432\u0438\u043b\u043d\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.japanese=\u0408\u0430\u043f\u0430\u043d\u0441\u043a\u0438 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/sr/calendarname.roc=\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 \u0420\u0435\u043f\u0443\u0431\u043b\u0438\u043a\u0435 \u041a\u0438\u043d\u0435 -FormatData/sr/field.dayperiod=\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435 -FormatData/sr/field.era=\u0435\u0440\u0430 -FormatData/sr/field.hour=\u0447\u0430\u0441 -FormatData/sr/field.minute=\u043c\u0438\u043d\u0443\u0442 -FormatData/sr/field.month=\u043c\u0435\u0441\u0435\u0446 -FormatData/sr/field.second=\u0441\u0435\u043a\u0443\u043d\u0434 -FormatData/sr/field.week=\u043d\u0435\u0434\u0435\u0459\u0430 -FormatData/sr/field.weekday=\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438 -FormatData/sr/field.year=\u0433\u043e\u0434\u0438\u043d\u0430 -FormatData/sr/field.zone=\u0437\u043e\u043d\u0430 -FormatData/sr/islamic.MonthNames/0=\u041c\u0443\u0440\u0430\u0445\u0430\u043c -FormatData/sr/islamic.MonthNames/1=\u0421\u0430\u0444\u0430\u0440 -FormatData/sr/islamic.MonthNames/2=\u0420\u0430\u0431\u0438\u02bb I -FormatData/sr/islamic.MonthNames/3=\u0420\u0430\u0431\u0438\u02bb II -FormatData/sr/islamic.MonthNames/4=\u0408\u0443\u043c\u0430\u0434\u0430 I -FormatData/sr/islamic.MonthNames/5=\u0408\u0443\u043c\u0430\u0434\u0430 II -FormatData/sr/islamic.MonthNames/6=\u0420\u0430\u0452\u0430\u0431 -FormatData/sr/islamic.MonthNames/7=\u0428\u0430\u02bb\u0431\u0430\u043d -FormatData/sr/islamic.MonthNames/8=\u0420\u0430\u043c\u0430\u0434\u0430\u043d -FormatData/sr/islamic.MonthNames/9=\u0428\u0430\u0432\u0430\u043b -FormatData/sr/islamic.MonthNames/10=\u0414\u0443\u02bb\u043b-\u041a\u0438\u02bb\u0434\u0430 -FormatData/sr/islamic.MonthNames/11=\u0414\u0443\u02bb\u043b-\u0445\u0438\u0452\u0430 -FormatData/sr/islamic.MonthNames/12= -FormatData/sr/islamic.Eras/0= -FormatData/sr/islamic.Eras/1=\u0410\u0425 -FormatData/sv/calendarname.buddhist=buddistisk kalender -FormatData/sv/calendarname.gregorian=gregoriansk kalender -FormatData/sv/calendarname.gregory=gregoriansk kalender -FormatData/sv/calendarname.islamic-civil=islamisk civil kalender -FormatData/sv/calendarname.islamic=islamisk kalender -FormatData/sv/calendarname.islamicc=islamisk civil kalender -FormatData/sv/calendarname.japanese=japansk kalender -FormatData/sv/calendarname.roc=kinesiska republikens kalender -FormatData/sv/field.dayperiod=fm/em -FormatData/sv/field.era=era -FormatData/sv/field.hour=timme -FormatData/sv/field.minute=minut -FormatData/sv/field.month=m\u00e5nad -FormatData/sv/field.second=sekund -FormatData/sv/field.week=vecka -FormatData/sv/field.weekday=veckodag -FormatData/sv/field.year=\u00e5r -FormatData/sv/field.zone=tidszon -FormatData/sv/roc.Eras/0=f\u00f6re R.K. -FormatData/sv/roc.Eras/1=R.K. -FormatData/sv/roc.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/sv/roc.DatePatterns/1=d MMMM y GGGG -FormatData/sv/roc.DatePatterns/2=d MMM y GGGG -FormatData/sv/roc.DatePatterns/3=GGGG y-MM-dd -FormatData/sv/islamic.DatePatterns/0=EEEE d MMMM y GGGG -FormatData/sv/islamic.DatePatterns/1=d MMMM y GGGG -FormatData/sv/islamic.DatePatterns/2=d MMM y GGGG -FormatData/sv/islamic.DatePatterns/3=GGGG y-MM-dd -FormatData/th/calendarname.buddhist=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e1e\u0e38\u0e17\u0e18 -FormatData/th/calendarname.gregorian=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19 -FormatData/th/calendarname.gregory=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e40\u0e01\u0e23\u0e01\u0e2d\u0e40\u0e23\u0e35\u0e22\u0e19 -FormatData/th/calendarname.islamic-civil=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25 -FormatData/th/calendarname.islamic=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21 -FormatData/th/calendarname.islamicc=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e2d\u0e34\u0e2a\u0e25\u0e32\u0e21\u0e0b\u0e35\u0e27\u0e34\u0e25 -FormatData/th/calendarname.japanese=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e0d\u0e35\u0e48\u0e1b\u0e38\u0e48\u0e19 -FormatData/th/calendarname.roc=\u0e1b\u0e0f\u0e34\u0e17\u0e34\u0e19\u0e44\u0e15\u0e49\u0e2b\u0e27\u0e31\u0e19 -FormatData/th/field.dayperiod=\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19 -FormatData/th/field.era=\u0e2a\u0e21\u0e31\u0e22 -FormatData/th/field.hour=\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07 -FormatData/th/field.minute=\u0e19\u0e32\u0e17\u0e35 -FormatData/th/field.month=\u0e40\u0e14\u0e37\u0e2d\u0e19 -FormatData/th/field.second=\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 -FormatData/th/field.week=\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c -FormatData/th/field.weekday=\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c -FormatData/th/field.year=\u0e1b\u0e35 -FormatData/th/field.zone=\u0e40\u0e02\u0e15 -FormatData/th/islamic.MonthNames/0=\u0e21\u0e38\u0e2e\u0e30\u0e23\u0e4c\u0e23\u0e2d\u0e21 -FormatData/th/islamic.MonthNames/1=\u0e0b\u0e2d\u0e1f\u0e32\u0e23\u0e4c -FormatData/th/islamic.MonthNames/2=\u0e23\u0e2d\u0e1a\u0e35 I -FormatData/th/islamic.MonthNames/3=\u0e23\u0e2d\u0e1a\u0e35 II -FormatData/th/islamic.MonthNames/4=\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 I -FormatData/th/islamic.MonthNames/5=\u0e08\u0e38\u0e21\u0e32\u0e14\u0e32 II -FormatData/th/islamic.MonthNames/6=\u0e23\u0e2d\u0e08\u0e31\u0e1a -FormatData/th/islamic.MonthNames/7=\u0e0a\u0e30\u0e2d\u0e30\u0e1a\u0e32\u0e19 -FormatData/th/islamic.MonthNames/8=\u0e23\u0e2d\u0e21\u0e30\u0e14\u0e2d\u0e19 -FormatData/th/islamic.MonthNames/9=\u0e40\u0e0a\u0e32\u0e27\u0e31\u0e25 -FormatData/th/islamic.MonthNames/10=\u0e14\u0e2e\u0e38\u0e38\u0e2d\u0e31\u0e25\u0e01\u0e34\u0e14\u0e30\u0e2b\u0e4c -FormatData/th/islamic.MonthNames/11=\u0e14\u0e2e\u0e38\u0e2d\u0e31\u0e25\u0e2e\u0e34\u0e08\u0e08\u0e30\u0e2b\u0e4c -FormatData/th/islamic.MonthNames/12= -FormatData/th/islamic.long.Eras/0= -FormatData/th/islamic.long.Eras/1=\u0e2e\u0e34\u0e08\u0e40\u0e23\u0e32\u0e30\u0e2b\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a -FormatData/th/islamic.Eras/0= -FormatData/th/islamic.Eras/1=\u0e2e.\u0e28. -FormatData/th/roc.DatePatterns/0=EEEE\u0e17\u0e35\u0e48 d MMMM \u0e1b\u0e35GGGG\u0e17\u0e35\u0e48 y -FormatData/th/roc.DatePatterns/1=d MMMM \u0e1b\u0e35GGGG y -FormatData/th/roc.DatePatterns/2=d MMM GGGG y -FormatData/th/roc.DatePatterns/3=d/M/yy -FormatData/tr/calendarname.buddhist=Budist Takvimi -FormatData/tr/calendarname.gregorian=Miladi Takvim -FormatData/tr/calendarname.gregory=Miladi Takvim -FormatData/tr/calendarname.islamic-civil=Arap Takvimi -FormatData/tr/calendarname.islamic=Hicri Takvim -FormatData/tr/calendarname.islamicc=Arap Takvimi -FormatData/tr/calendarname.japanese=Japon Takvimi -FormatData/tr/calendarname.roc=\u00c7in Cumhuriyeti Takvimi -FormatData/tr/field.dayperiod=AM/PM -FormatData/tr/field.era=Miladi D\u00f6nem -FormatData/tr/field.hour=Saat -FormatData/tr/field.minute=Dakika -FormatData/tr/field.month=Ay -FormatData/tr/field.second=Saniye -FormatData/tr/field.week=Hafta -FormatData/tr/field.weekday=Haftan\u0131n G\u00fcn\u00fc -FormatData/tr/field.year=Y\u0131l -FormatData/tr/field.zone=Saat Dilimi -FormatData/tr/islamic.MonthNames/0=Muharrem -FormatData/tr/islamic.MonthNames/1=Safer -FormatData/tr/islamic.MonthNames/2=Rebi\u00fclevvel -FormatData/tr/islamic.MonthNames/3=Rebi\u00fclahir -FormatData/tr/islamic.MonthNames/4=Cemaziyelevvel -FormatData/tr/islamic.MonthNames/5=Cemaziyelahir -FormatData/tr/islamic.MonthNames/6=Recep -FormatData/tr/islamic.MonthNames/7=\u015eaban -FormatData/tr/islamic.MonthNames/8=Ramazan -FormatData/tr/islamic.MonthNames/9=\u015eevval -FormatData/tr/islamic.MonthNames/10=Zilkade -FormatData/tr/islamic.MonthNames/11=Zilhicce -FormatData/tr/islamic.MonthNames/12= -FormatData/tr/roc.DatePatterns/0=dd MMMM y GGGG EEEE -FormatData/tr/roc.DatePatterns/1=dd MMMM y GGGG -FormatData/tr/roc.DatePatterns/2=dd MMM y GGGG -FormatData/tr/roc.DatePatterns/3=dd.MM.yyyy GGGG -FormatData/tr/islamic.DatePatterns/0=dd MMMM y GGGG EEEE -FormatData/tr/islamic.DatePatterns/1=dd MMMM y GGGG -FormatData/tr/islamic.DatePatterns/2=dd MMM y GGGG -FormatData/tr/islamic.DatePatterns/3=dd.MM.yyyy GGGG -FormatData/uk/calendarname.buddhist=\u0411\u0443\u0434\u0434\u0456\u0439\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.gregorian=\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.gregory=\u0413\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.islamic-civil=\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.islamic=\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.islamicc=\u041c\u0443\u0441\u0443\u043b\u044c\u043c\u0430\u043d\u0441\u044c\u043a\u0438\u0439 \u0441\u0432\u0456\u0442\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.japanese=\u042f\u043f\u043e\u043d\u0441\u044c\u043a\u0438\u0439 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440 -FormatData/uk/calendarname.roc=\u041a\u0438\u0442\u0430\u0439\u0441\u044c\u043a\u0438\u0439 \u0433\u0440\u0438\u0433\u043e\u0440\u0456\u0430\u043d\u0441\u044c\u043a\u0438\u0439 -FormatData/uk/field.dayperiod=\u0427\u0430\u0441\u0442\u0438\u043d\u0430 \u0434\u043e\u0431\u0438 -FormatData/uk/field.era=\u0415\u0440\u0430 -FormatData/uk/field.hour=\u0413\u043e\u0434\u0438\u043d\u0430 -FormatData/uk/field.minute=\u0425\u0432\u0438\u043b\u0438\u043d\u0430 -FormatData/uk/field.month=\u041c\u0456\u0441\u044f\u0446\u044c -FormatData/uk/field.second=\u0421\u0435\u043a\u0443\u043d\u0434\u0430 -FormatData/uk/field.week=\u0422\u0438\u0436\u0434\u0435\u043d\u044c -FormatData/uk/field.weekday=\u0414\u0435\u043d\u044c \u0442\u0438\u0436\u043d\u044f -FormatData/uk/field.year=\u0420\u0456\u043a -FormatData/uk/field.zone=\u0417\u043e\u043d\u0430 -FormatData/uk/islamic.MonthNames/0=\u041c\u0443\u0445\u0430\u0440\u0440\u0430\u043c -FormatData/uk/islamic.MonthNames/1=\u0421\u0430\u0444\u0430\u0440 -FormatData/uk/islamic.MonthNames/2=\u0420\u0430\u0431\u0456 I -FormatData/uk/islamic.MonthNames/3=\u0420\u0430\u0431\u0456 II -FormatData/uk/islamic.MonthNames/4=\u0414\u0436\u0443\u043c\u0430\u0434\u0430 I -FormatData/uk/islamic.MonthNames/5=\u0414\u0436\u0443\u043c\u0430\u0434\u0430 II -FormatData/uk/islamic.MonthNames/6=\u0420\u0430\u0434\u0436\u0430\u0431 -FormatData/uk/islamic.MonthNames/7=\u0428\u0430\u0430\u0431\u0430\u043d -FormatData/uk/islamic.MonthNames/8=\u0420\u0430\u043c\u0430\u0434\u0430\u043d -FormatData/uk/islamic.MonthNames/9=\u0414\u0430\u0432\u0432\u0430\u043b -FormatData/uk/islamic.MonthNames/10=\u0417\u0443-\u043b\u044c-\u043a\u0430\u0430\u0434\u0430 -FormatData/uk/islamic.MonthNames/11=\u0417\u0443-\u043b\u044c-\u0445\u0456\u0434\u0436\u0430 -FormatData/uk/islamic.MonthNames/12= -FormatData/vi/calendarname.buddhist=L\u1ecbch Ph\u1eadt Gi\u00e1o -FormatData/vi/calendarname.gregorian=L\u1ecbch Gregory -FormatData/vi/calendarname.gregory=L\u1ecbch Gregory -FormatData/vi/calendarname.islamic-civil=L\u1ecbch Islamic-Civil -FormatData/vi/calendarname.islamic=L\u1ecbch Islamic -FormatData/vi/calendarname.islamicc=L\u1ecbch Islamic-Civil -FormatData/vi/calendarname.japanese=L\u1ecbch Nh\u1eadt B\u1ea3n -FormatData/vi/calendarname.roc=L\u1ecbch Trung Hoa D\u00e2n Qu\u1ed1c -FormatData/vi/field.dayperiod=SA/CH -FormatData/vi/field.era=Th\u1eddi \u0111\u1ea1i -FormatData/vi/field.hour=Gi\u1edd -FormatData/vi/field.minute=Ph\u00fat -FormatData/vi/field.month=Th\u00e1ng -FormatData/vi/field.second=Gi\u00e2y -FormatData/vi/field.week=Tu\u1ea7n -FormatData/vi/field.weekday=Ng\u00e0y trong tu\u1ea7n -FormatData/vi/field.year=N\u0103m -FormatData/vi/field.zone=M\u00fai gi\u1edd -FormatData/vi/roc.DatePatterns/0=EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG -FormatData/vi/roc.DatePatterns/1='Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG -FormatData/vi/roc.DatePatterns/2=dd-MM-y GGGG -FormatData/vi/roc.DatePatterns/3=dd/MM/y GGGG -FormatData/vi/islamic.DatePatterns/0=EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y GGGG -FormatData/vi/islamic.DatePatterns/1='Ng\u00e0y' dd 'th\u00e1ng' M 'n\u0103m' y GGGG -FormatData/vi/islamic.DatePatterns/2=dd-MM-y GGGG -FormatData/vi/islamic.DatePatterns/3=dd/MM/y GGGG -FormatData/zh/calendarname.buddhist=\u4f5b\u6559\u65e5\u5386 -FormatData/zh/calendarname.gregorian=\u516c\u5386 -FormatData/zh/calendarname.gregory=\u516c\u5386 -FormatData/zh/calendarname.islamic-civil=\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386 -FormatData/zh/calendarname.islamic=\u4f0a\u65af\u5170\u65e5\u5386 -FormatData/zh/calendarname.islamicc=\u4f0a\u65af\u5170\u5e0c\u5409\u6765\u5386 -FormatData/zh/calendarname.japanese=\u65e5\u672c\u65e5\u5386 -FormatData/zh/calendarname.roc=\u6c11\u56fd\u65e5\u5386 -FormatData/zh/field.dayperiod=\u4e0a\u5348/\u4e0b\u5348 -FormatData/zh/field.era=\u65f6\u671f -FormatData/zh/field.hour=\u5c0f\u65f6 -FormatData/zh/field.minute=\u5206\u949f -FormatData/zh/field.month=\u6708 -FormatData/zh/field.second=\u79d2\u949f -FormatData/zh/field.week=\u5468 -FormatData/zh/field.weekday=\u5468\u5929 -FormatData/zh/field.year=\u5e74 -FormatData/zh/field.zone=\u533a\u57df -FormatData/zh/roc.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE -FormatData/zh/roc.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5 -FormatData/zh/roc.DatePatterns/2=GGGGy-M-d -FormatData/zh/roc.DatePatterns/3=GGGGy-M-d -FormatData/zh/islamic.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE -FormatData/zh/islamic.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5 -FormatData/zh/islamic.DatePatterns/2=GGGGy\u5e74M\u6708d\u65e5 -FormatData/zh/islamic.DatePatterns/3=GGGGyy-MM-dd -FormatData/zh_TW/calendarname.buddhist=\u4f5b\u6559\u66c6\u6cd5 -FormatData/zh_TW/calendarname.gregorian=\u516c\u66c6 -FormatData/zh_TW/calendarname.gregory=\u516c\u66c6 -FormatData/zh_TW/calendarname.islamic-civil=\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5 -FormatData/zh_TW/calendarname.islamic=\u4f0a\u65af\u862d\u66c6\u6cd5 -FormatData/zh_TW/calendarname.islamicc=\u4f0a\u65af\u862d\u57ce\u5e02\u66c6\u6cd5 -FormatData/zh_TW/calendarname.japanese=\u65e5\u672c\u66c6\u6cd5 -FormatData/zh_TW/calendarname.roc=\u6c11\u570b\u66c6 -FormatData/zh_TW/field.dayperiod=\u4e0a\u5348/\u4e0b\u5348 -FormatData/zh_TW/field.era=\u5e74\u4ee3 -FormatData/zh_TW/field.hour=\u5c0f\u6642 -FormatData/zh_TW/field.minute=\u5206\u9418 -FormatData/zh_TW/field.month=\u6708 -FormatData/zh_TW/field.second=\u79d2 -FormatData/zh_TW/field.week=\u9031 -FormatData/zh_TW/field.weekday=\u9031\u5929 -FormatData/zh_TW/field.year=\u5e74 -FormatData/zh_TW/roc.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE -FormatData/zh_TW/roc.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5 -FormatData/zh_TW/roc.DatePatterns/2=GGGGy/M/d -FormatData/zh_TW/roc.DatePatterns/3=GGGGy/M/d -FormatData/zh_TW/islamic.DatePatterns/0=GGGGy\u5e74M\u6708d\u65e5EEEE -FormatData/zh_TW/islamic.DatePatterns/1=GGGGy\u5e74M\u6708d\u65e5 -FormatData/zh_TW/islamic.DatePatterns/2=GGGGy/M/d -FormatData/zh_TW/islamic.DatePatterns/3=GGGGy/M/d - # bug 7114053 LocaleNames/sq/sq=shqip diff --git a/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java b/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java index f1191c6e90c..45ead085fde 100644 --- a/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java +++ b/jdk/test/sun/util/calendar/zi/TestZoneInfo310.java @@ -68,8 +68,8 @@ public class TestZoneInfo310 { } System.out.println("Compiling tz files!"); Main.main(alist.toArray(new String[alist.size()])); - ////////////////////////////////// + ////////////////////////////////// System.out.println("testing!"); ZoneInfoFile.ziDir = zidir; long t0, t1; @@ -96,11 +96,27 @@ public class TestZoneInfo310 { (t1 - t0) / 1000, zids_old.length); Arrays.sort(zids_old); + t0 = System.nanoTime(); + String[] alias_old = ZoneInfoOld.getAliasTable() + .keySet().toArray(new String[0]); + t1 = System.nanoTime(); + System.out.printf("OLD.getAliasTable()=%d, total=%d%n", + (t1 - t0) / 1000, alias_old.length); + Arrays.sort(alias_old); + + t0 = System.currentTimeMillis(); + for (String zid : zids_old) { + ZoneInfoOld.getTimeZone(zid); + } + t1 = System.currentTimeMillis(); + System.out.printf("OLD.TotalTZ()=%d (ms)%n", t1 - t0); + +/* t0 = System.nanoTime(); ZoneId.of("America/Los_Angeles").getRules(); t1 = System.nanoTime(); - System.out.printf("NEW.getTimeZone()[1]=%d%n", (t1 - t0) / 1000); - + System.out.printf("NEW.ZoneId.of()[1]=%d%n", (t1 - t0) / 1000); +*/ t0 = System.nanoTime(); TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); t1 = System.nanoTime(); @@ -123,6 +139,14 @@ public class TestZoneInfo310 { (t1 - t0) / 1000, zids_new.length); Arrays.sort(zids_new); + t0 = System.nanoTime(); + String[] alias_new = sun.util.calendar.ZoneInfo.getAliasTable() + .keySet().toArray(new String[0]); + t1 = System.nanoTime(); + System.out.printf("NEW.getAliasTable()=%d, total=%d%n", + (t1 - t0) / 1000, alias_new.length); + Arrays.sort(alias_new); + t0 = System.currentTimeMillis(); for (String zid : zids_new) { TimeZone.getTimeZone(zid); @@ -130,16 +154,14 @@ public class TestZoneInfo310 { t1 = System.currentTimeMillis(); System.out.printf("NEW.TotalTZ()=%d (ms)%n", t1 - t0); - t0 = System.currentTimeMillis(); - for (String zid : zids_old) { - ZoneInfoOld.getTimeZone(zid); - } - t1 = System.currentTimeMillis(); - System.out.printf("OLD.TotalTZ()=%d (ms)%n", t1 - t0); - if (!Arrays.equals(zids_old, zids_new)) { throw new RuntimeException(" FAILED: availableIds don't match"); } + + if (!Arrays.equals(alias_old, alias_new)) { + throw new RuntimeException(" FAILED: aliases don't match"); + } + for (String zid : zids_new) { ZoneInfoOld zi = toZoneInfoOld(TimeZone.getTimeZone(zid)); ZoneInfoOld ziOLD = (ZoneInfoOld)ZoneInfoOld.getTimeZone(zid); From dbdbff1445918612e6ba19f4dee759bd71090402 Mon Sep 17 00:00:00 2001 From: Xueming Shen Date: Fri, 12 Apr 2013 09:51:04 -0700 Subject: [PATCH 126/151] 8012123: hijrah-config-umalqura.properties is missing from makefiles/profile-includes.txt Added the hijrah-config-umalqura.properties into the list Reviewed-by: alanb --- jdk/makefiles/profile-includes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/jdk/makefiles/profile-includes.txt b/jdk/makefiles/profile-includes.txt index 0a6ada9ae15..e9672714031 100644 --- a/jdk/makefiles/profile-includes.txt +++ b/jdk/makefiles/profile-includes.txt @@ -66,6 +66,7 @@ PROFILE_1_JRE_LIB_FILES := \ ext/sunec.jar \ ext/sunjce_provider.jar \ ext/sunpkcs11.jar \ + hijrah-config-umalqura.properties \ jce.jar \ jsse.jar \ logging.properties \ From 47686a92e05d71a493fd9f0ee9c17d2fc86e79d7 Mon Sep 17 00:00:00 2001 From: Robert Field Date: Fri, 12 Apr 2013 10:02:33 -0700 Subject: [PATCH 127/151] 8011805: Update sun.tools.java class file reading/writing support to include the new constant pool entries Reviewed-by: mduigou, alanb --- .../invoke/InnerClassLambdaMetafactory.java | 2 +- .../sun/tools/java/BinaryConstantPool.java | 24 +++ .../sun/tools/java/RuntimeConstants.java | 3 + jdk/test/sun/tools/java/CFCTest.java | 181 ++++++++++++++++++ 4 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 jdk/test/sun/tools/java/CFCTest.java diff --git a/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java index f7191f7679f..9134bcf22ea 100644 --- a/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java +++ b/jdk/src/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java @@ -184,7 +184,7 @@ import java.security.PrivilegedAction; for (int i=0; i 88; + if (lam.get() == 88) { + System.out.println("Sanity passed: Lambda worked."); + } else { + throw new RuntimeException("Sanity failed: bad lambda execution"); + } + + // Verify that all the new constant pool constant types are present + String clsName = testClassPath + File.separator + testClassName + ".class"; + ClassConstantChecker ccc = new ClassConstantChecker(clsName); + ccc.checkFound(CONSTANT_METHODHANDLE); + ccc.checkFound(CONSTANT_METHODTYPE); + ccc.checkFound(CONSTANT_INVOKEDYNAMIC); + + // Heart of test: read the class file with the new constant types + exerciseClassDefinition(); + System.out.println("ClassDefinition read without failure.\n"); + } + + /** + * Failure is seen when getClassDefinition causes class read + */ + void exerciseClassDefinition() throws Exception { + BatchEnvironment env = new BatchEnvironment(System.out, + BatchEnvironment.createClassPath(testClassPath, null, null), + null); + try { + ClassDeclaration decl = env.getClassDeclaration( + Identifier.lookup(testClassName)); + decl.getClassDefinition(env); + } finally { + env.flushErrors(); + env.shutdown(); + } + } + + private class ClassConstantChecker { + + private DataInputStream in; + private boolean[] found; + + ClassConstantChecker(String clsName) throws IOException { + in = new DataInputStream(new FileInputStream(clsName)); + found = new boolean[CONSTANT_INVOKEDYNAMIC + 20]; + try { + check(); + } finally { + in.close(); + } + } + + void checkFound(int tag) throws Exception { + if (found[tag]) { + System.out.printf("Constant pool tag found: %d\n", tag); + } else { + throw new RuntimeException("Insufficient test, constant pool tag NOT found: " + tag); + } + } + + private void skip(int n) throws IOException { + if (in.skipBytes(n) != n) { + throw new EOFException(); + } + } + + private void check() throws IOException { + skip(8); // magic, version + int count = in.readUnsignedShort(); + for (int i = 1; i < count; i++) { + int j = i; + // JVM 4.4 cp_info.tag + int tag = in.readByte(); + found[tag] = true; + switch (tag) { + case CONSTANT_UTF8: + in.readUTF(); + break; + case CONSTANT_LONG: + case CONSTANT_DOUBLE: + skip(8); + break; + case CONSTANT_CLASS: + case CONSTANT_STRING: + skip(2); + break; + case CONSTANT_INTEGER: + case CONSTANT_FLOAT: + case CONSTANT_FIELD: + case CONSTANT_METHOD: + case CONSTANT_INTERFACEMETHOD: + case CONSTANT_NAMEANDTYPE: + skip(4); + break; + + case CONSTANT_METHODHANDLE: + skip(3); + break; + case CONSTANT_METHODTYPE: + skip(2); + break; + case CONSTANT_INVOKEDYNAMIC: + skip(4); + break; + + case 0: + default: + throw new ClassFormatError("invalid constant type: " + tag); + } + } + } + } +} From 3b3b7d1f738361562089825d88b8322291f30456 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Fri, 12 Apr 2013 15:21:17 -0700 Subject: [PATCH 128/151] 8012048: JDK8 b85 source with GPL header errors Reviewed-by: iris, mduigou, jjg --- common/autoconf/compare.sh.in | 2 +- common/bin/compare.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/autoconf/compare.sh.in b/common/autoconf/compare.sh.in index 2b344aac4d8..1dd9583ddda 100644 --- a/common/autoconf/compare.sh.in +++ b/common/autoconf/compare.sh.in @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/common/bin/compare.sh b/common/bin/compare.sh index 0ba46727acc..aacdc718b6f 100644 --- a/common/bin/compare.sh +++ b/common/bin/compare.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it From 6e2f758312b777c1f3f9384879356e69cc927df8 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Fri, 12 Apr 2013 15:22:08 -0700 Subject: [PATCH 129/151] 8012048: JDK8 b85 source with GPL header errors Reviewed-by: iris, mduigou, jjg --- hotspot/make/bsd/makefiles/fastdebug.make | 2 +- hotspot/src/share/vm/services/diagnosticArgument.cpp | 2 +- hotspot/test/sanity/WBApi.java | 2 +- hotspot/test/serviceability/ParserTest.java | 2 +- hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java | 2 +- .../whitebox/sun/hotspot/parser/DiagnosticCommand.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hotspot/make/bsd/makefiles/fastdebug.make b/hotspot/make/bsd/makefiles/fastdebug.make index c59310634c3..e175622ee10 100644 --- a/hotspot/make/bsd/makefiles/fastdebug.make +++ b/hotspot/make/bsd/makefiles/fastdebug.make @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/src/share/vm/services/diagnosticArgument.cpp b/hotspot/src/share/vm/services/diagnosticArgument.cpp index 5d0eb756b28..022687db416 100644 --- a/hotspot/src/share/vm/services/diagnosticArgument.cpp +++ b/hotspot/src/share/vm/services/diagnosticArgument.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/sanity/WBApi.java b/hotspot/test/sanity/WBApi.java index a9cbe21b9d2..3d926777121 100644 --- a/hotspot/test/sanity/WBApi.java +++ b/hotspot/test/sanity/WBApi.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/serviceability/ParserTest.java b/hotspot/test/serviceability/ParserTest.java index af55a9879f9..63ee9210e40 100644 --- a/hotspot/test/serviceability/ParserTest.java +++ b/hotspot/test/serviceability/ParserTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java index d5d3ab525c5..bca3c8fac70 100644 --- a/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java +++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/WhiteBox.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/hotspot/test/testlibrary/whitebox/sun/hotspot/parser/DiagnosticCommand.java b/hotspot/test/testlibrary/whitebox/sun/hotspot/parser/DiagnosticCommand.java index cc40007f823..ad4ebcc73e9 100644 --- a/hotspot/test/testlibrary/whitebox/sun/hotspot/parser/DiagnosticCommand.java +++ b/hotspot/test/testlibrary/whitebox/sun/hotspot/parser/DiagnosticCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it From 930dcf7d28a4f11b3bd7b6e42eda3b227d6d7111 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Fri, 12 Apr 2013 15:22:33 -0700 Subject: [PATCH 130/151] 8012048: JDK8 b85 source with GPL header errors Reviewed-by: iris, mduigou, jjg --- .../classes/com/sun/crypto/provider/GaloisCounterMode.java | 2 +- .../share/classes/java/util/function/DoublePredicate.java | 2 +- jdk/src/share/classes/java/util/function/IntPredicate.java | 2 +- jdk/src/share/classes/java/util/function/LongPredicate.java | 2 +- .../share/classes/java/util/function/ObjIntConsumer.java | 2 +- .../classes/java/util/function/ToDoubleBiFunction.java | 2 +- jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh | 2 +- jdk/test/java/lang/reflect/Method/IsDefaultTest.java | 2 +- jdk/test/java/net/URLConnection/RequestProperties.java | 2 +- jdk/test/java/util/Optional/BasicDouble.java | 6 +++--- jdk/test/javax/swing/text/html/7189299/bug7189299.java | 2 +- jdk/test/sun/management/jdp/JdpTest.sh | 2 +- jdk/test/sun/misc/URLClassPath/JarLoaderTest.java | 2 +- jdk/test/sun/util/calendar/zi/ZoneInfoFile.java | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/jdk/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java b/jdk/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java index a2c6cfd82ef..2f8b584e2a9 100644 --- a/jdk/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java +++ b/jdk/src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java @@ -6,7 +6,7 @@ * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code.S + * by Oracle 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 diff --git a/jdk/src/share/classes/java/util/function/DoublePredicate.java b/jdk/src/share/classes/java/util/function/DoublePredicate.java index e132f9b74d2..48f4504828f 100644 --- a/jdk/src/share/classes/java/util/function/DoublePredicate.java +++ b/jdk/src/share/classes/java/util/function/DoublePredicate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/java/util/function/IntPredicate.java b/jdk/src/share/classes/java/util/function/IntPredicate.java index 17cc49c754e..4351c75ffe7 100644 --- a/jdk/src/share/classes/java/util/function/IntPredicate.java +++ b/jdk/src/share/classes/java/util/function/IntPredicate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/java/util/function/LongPredicate.java b/jdk/src/share/classes/java/util/function/LongPredicate.java index ca542a41246..65f3e69525b 100644 --- a/jdk/src/share/classes/java/util/function/LongPredicate.java +++ b/jdk/src/share/classes/java/util/function/LongPredicate.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/java/util/function/ObjIntConsumer.java b/jdk/src/share/classes/java/util/function/ObjIntConsumer.java index fa63af5cff6..33f900101ab 100644 --- a/jdk/src/share/classes/java/util/function/ObjIntConsumer.java +++ b/jdk/src/share/classes/java/util/function/ObjIntConsumer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/src/share/classes/java/util/function/ToDoubleBiFunction.java b/jdk/src/share/classes/java/util/function/ToDoubleBiFunction.java index 8826e12dad7..a4a03e61b45 100644 --- a/jdk/src/share/classes/java/util/function/ToDoubleBiFunction.java +++ b/jdk/src/share/classes/java/util/function/ToDoubleBiFunction.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh b/jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh index 4cf63328236..4935a0cf044 100644 --- a/jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh +++ b/jdk/test/java/lang/System/MacJNUEncoding/MacJNUEncoding.sh @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/lang/reflect/Method/IsDefaultTest.java b/jdk/test/java/lang/reflect/Method/IsDefaultTest.java index 64cb5c2df4a..1dd67aeb874 100644 --- a/jdk/test/java/lang/reflect/Method/IsDefaultTest.java +++ b/jdk/test/java/lang/reflect/Method/IsDefaultTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/net/URLConnection/RequestProperties.java b/jdk/test/java/net/URLConnection/RequestProperties.java index af549e22e54..40946a6f0e1 100644 --- a/jdk/test/java/net/URLConnection/RequestProperties.java +++ b/jdk/test/java/net/URLConnection/RequestProperties.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/java/util/Optional/BasicDouble.java b/jdk/test/java/util/Optional/BasicDouble.java index 741137c38a8..841dd459e78 100644 --- a/jdk/test/java/util/Optional/BasicDouble.java +++ b/jdk/test/java/util/Optional/BasicDouble.java @@ -3,17 +3,17 @@ * 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.0 only, as + * 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.0 for more details (a copy is included in the LICENSE file that + * 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.0 along with this work; if not, write to the Free Software Foundation, + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA diff --git a/jdk/test/javax/swing/text/html/7189299/bug7189299.java b/jdk/test/javax/swing/text/html/7189299/bug7189299.java index 70d2057c89f..83862122ec2 100644 --- a/jdk/test/javax/swing/text/html/7189299/bug7189299.java +++ b/jdk/test/javax/swing/text/html/7189299/bug7189299.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/management/jdp/JdpTest.sh b/jdk/test/sun/management/jdp/JdpTest.sh index dfdea7c1938..f42bbdacee6 100644 --- a/jdk/test/sun/management/jdp/JdpTest.sh +++ b/jdk/test/sun/management/jdp/JdpTest.sh @@ -1,6 +1,6 @@ #!/bin/sh -x -# Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/misc/URLClassPath/JarLoaderTest.java b/jdk/test/sun/misc/URLClassPath/JarLoaderTest.java index cd9cbc88bf4..24a8ea80eb9 100644 --- a/jdk/test/sun/misc/URLClassPath/JarLoaderTest.java +++ b/jdk/test/sun/misc/URLClassPath/JarLoaderTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/jdk/test/sun/util/calendar/zi/ZoneInfoFile.java b/jdk/test/sun/util/calendar/zi/ZoneInfoFile.java index f0dda48c0a9..ae3e38d9800 100644 --- a/jdk/test/sun/util/calendar/zi/ZoneInfoFile.java +++ b/jdk/test/sun/util/calendar/zi/ZoneInfoFile.java @@ -5,7 +5,7 @@ * 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. Oracle designates this - * particular file as subject to the "Class-path" exception as provided + * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT From 9261edec97251eec1fed19dfd86843cda90a4442 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Fri, 12 Apr 2013 15:22:47 -0700 Subject: [PATCH 131/151] 8012048: JDK8 b85 source with GPL header errors Reviewed-by: iris, mduigou, jjg --- .../javadoc/testAnnotationOptional/TestAnnotationOptional.java | 2 +- .../javadoc/testAnnotationOptional/pkg/AnnotationOptional.java | 2 +- .../test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java | 2 +- .../com/sun/javadoc/typeAnnotations/smoke/pkg/TargetTypes.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java index ecd96852281..b85f300e81e 100644 --- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java +++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/langtools/test/com/sun/javadoc/testAnnotationOptional/pkg/AnnotationOptional.java b/langtools/test/com/sun/javadoc/testAnnotationOptional/pkg/AnnotationOptional.java index 7004c1d4344..3894f01145e 100644 --- a/langtools/test/com/sun/javadoc/testAnnotationOptional/pkg/AnnotationOptional.java +++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/pkg/AnnotationOptional.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/langtools/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java b/langtools/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java index dc8d10b1146..6a5b2af4e03 100644 --- a/langtools/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java +++ b/langtools/test/com/sun/javadoc/typeAnnotations/smoke/TestSmoke.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/langtools/test/com/sun/javadoc/typeAnnotations/smoke/pkg/TargetTypes.java b/langtools/test/com/sun/javadoc/typeAnnotations/smoke/pkg/TargetTypes.java index 24c93e3ba08..435a680233e 100644 --- a/langtools/test/com/sun/javadoc/typeAnnotations/smoke/pkg/TargetTypes.java +++ b/langtools/test/com/sun/javadoc/typeAnnotations/smoke/pkg/TargetTypes.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it From e5746718689a8bbf809e6c9663e9a5e198b477d0 Mon Sep 17 00:00:00 2001 From: David Katleman Date: Fri, 12 Apr 2013 15:22:56 -0700 Subject: [PATCH 132/151] 8012048: JDK8 b85 source with GPL header errors Reviewed-by: iris, mduigou, jjg --- .../docs/JavaScriptingProgrammersGuide.html | 24 +++++++++++++++++++ .../jdk/nashorn/api/scripting/Formatter.java | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/nashorn/docs/JavaScriptingProgrammersGuide.html b/nashorn/docs/JavaScriptingProgrammersGuide.html index dd243d3aa3c..811b29c9d51 100644 --- a/nashorn/docs/JavaScriptingProgrammersGuide.html +++ b/nashorn/docs/JavaScriptingProgrammersGuide.html @@ -1,3 +1,27 @@ + diff --git a/nashorn/src/jdk/nashorn/api/scripting/Formatter.java b/nashorn/src/jdk/nashorn/api/scripting/Formatter.java index 5cb19ed47af..a14a83e4ce3 100644 --- a/nashorn/src/jdk/nashorn/api/scripting/Formatter.java +++ b/nashorn/src/jdk/nashorn/api/scripting/Formatter.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it From 7d3f26a18f5fafe7b515a3b05c5ed232a34a1d48 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Sun, 14 Apr 2013 19:17:30 +0100 Subject: [PATCH 133/151] 8011799: CompletableFuture/Basic.java fails intermittently Reviewed-by: martin, alanb --- .../concurrent/CompletableFuture/Basic.java | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/jdk/test/java/util/concurrent/CompletableFuture/Basic.java b/jdk/test/java/util/concurrent/CompletableFuture/Basic.java index e8ed70658d9..a35c5f4ec55 100644 --- a/jdk/test/java/util/concurrent/CompletableFuture/Basic.java +++ b/jdk/test/java/util/concurrent/CompletableFuture/Basic.java @@ -486,40 +486,40 @@ public class Basic { CompletableFuture cf1 = supplyAsync(() -> 1); CompletableFuture cf2 = supplyAsync(() -> 2); cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 1 || x == 2); return x; }); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, new Object[] {1, 2}); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> 1); cf2 = supplyAsync(() -> 2); cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); return x; }); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, new Object[] {1, 2}); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> 1); cf2 = supplyAsync(() -> 2); cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); return x; }, executor); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, new Object[] {1, 2}); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> { throw new RuntimeException(); }); cf2 = supplyAsync(() -> 2); cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; }); - check(cf1.isDone() || cf2.isDone()); try { check(cf3.join() == 1); } catch (CompletionException x) { pass(); } check(cf3.isDone()); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> 1); cf2 = supplyAsync(() -> { throw new RuntimeException(); }); cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1); return x; }); - check(cf1.isDone() || cf2.isDone()); try { check(cf3.join() == 1); } catch (CompletionException x) { pass(); } check(cf3.isDone()); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> { throw new RuntimeException(); }); cf2 = supplyAsync(() -> { throw new RuntimeException(); }); cf3 = cf1.applyToEitherAsync(cf2, (x) -> { fail(); return x; }); - check(cf1.isDone() || cf2.isDone()); checkCompletedExceptionally(cf3); + check(cf1.isDone() || cf2.isDone()); } catch (Throwable t) { unexpected(t); } //---------------------------------------------------------------- @@ -531,45 +531,45 @@ public class Basic { CompletableFuture cf1 = supplyAsync(() -> 1); CompletableFuture cf2 = supplyAsync(() -> 2); cf3 = cf1.acceptEither(cf2, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); }); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, null); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = supplyAsync(() -> 1); cf2 = supplyAsync(() -> 2); cf3 = cf1.acceptEitherAsync(cf2, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); }); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, null); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = supplyAsync(() -> 1); cf2 = supplyAsync(() -> 2); cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 1 || x == 2); atomicInt.incrementAndGet(); }, executor); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, null); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); cf1 = supplyAsync(() -> { throw new RuntimeException(); }); cf2 = supplyAsync(() -> 2); cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 2); }, executor); - check(cf1.isDone() || cf2.isDone()); try { check(cf3.join() == null); } catch (CompletionException x) { pass(); } check(cf3.isDone()); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> 1); cf2 = supplyAsync(() -> { throw new RuntimeException(); }); cf3 = cf2.acceptEitherAsync(cf1, (x) -> { check(x == 1); }); - check(cf1.isDone() || cf2.isDone()); try { check(cf3.join() == null); } catch (CompletionException x) { pass(); } check(cf3.isDone()); + check(cf1.isDone() || cf2.isDone()); cf1 = supplyAsync(() -> { throw new RuntimeException(); }); cf2 = supplyAsync(() -> { throw new RuntimeException(); }); cf3 = cf2.acceptEitherAsync(cf1, (x) -> { fail(); }); - check(cf1.isDone() || cf2.isDone()); checkCompletedExceptionally(cf3); + check(cf1.isDone() || cf2.isDone()); } catch (Throwable t) { unexpected(t); } //---------------------------------------------------------------- @@ -581,50 +581,50 @@ public class Basic { CompletableFuture cf1 = runAsync(() -> { }); CompletableFuture cf2 = runAsync(() -> { }); cf3 = cf1.runAfterEither(cf2, () -> { atomicInt.incrementAndGet(); }); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, null); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { }); cf2 = runAsync(() -> { }); cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); }); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, null); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { }); cf2 = runAsync(() -> { }); cf3 = cf2.runAfterEitherAsync(cf1, () -> { atomicInt.incrementAndGet(); }, executor); - check(cf1.isDone() || cf2.isDone()); checkCompletedNormally(cf3, null); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { throw new RuntimeException(); }); cf2 = runAsync(() -> { }); cf3 = cf2.runAfterEither(cf1, () -> { atomicInt.incrementAndGet(); }); - check(cf1.isDone() || cf2.isDone()); try { check(cf3.join() == null); } catch (CompletionException x) { pass(); } check(cf3.isDone()); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { }); cf2 = runAsync(() -> { throw new RuntimeException(); }); cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); }); - check(cf1.isDone() || cf2.isDone()); try { check(cf3.join() == null); } catch (CompletionException x) { pass(); } check(cf3.isDone()); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { throw new RuntimeException(); }); cf2 = runAsync(() -> { throw new RuntimeException(); }); cf3 = cf2.runAfterEitherAsync(cf1, () -> { atomicInt.incrementAndGet(); }, executor); - check(cf1.isDone() || cf2.isDone()); checkCompletedExceptionally(cf3); + check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == before); } catch (Throwable t) { unexpected(t); } @@ -670,16 +670,16 @@ public class Basic { //---------------------------------------------------------------- // anyOf tests //---------------------------------------------------------------- - //try { - // CompletableFuture cf3; - // for (int k=0; k < 10; k++){ - // CompletableFuture cf1 = supplyAsync(() -> 1); - // CompletableFuture cf2 = supplyAsync(() -> 2); - // cf3 = CompletableFuture.anyOf(cf1, cf2); - // check(cf1.isDone() || cf2.isDone()); - // checkCompletedNormally(cf3, new Object[] {1, 2}); - // } - //} catch (Throwable t) { unexpected(t); } + try { + CompletableFuture cf3; + for (int k=0; k < 10; k++){ + CompletableFuture cf1 = supplyAsync(() -> 1); + CompletableFuture cf2 = supplyAsync(() -> 2); + cf3 = CompletableFuture.anyOf(cf1, cf2); + checkCompletedNormally(cf3, new Object[] {1, 2}); + check(cf1.isDone() || cf2.isDone()); + } + } catch (Throwable t) { unexpected(t); } //---------------------------------------------------------------- // allOf tests From d9216cb5e1c75d88dd87e19fdbbf2e4ea0b845cb Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Mon, 15 Apr 2013 16:57:01 +0400 Subject: [PATCH 134/151] 8005930: [lcms] ColorConvertOp: Alpha channel is not transferred from source to destination Reviewed-by: prr --- .../sun/java2d/cmm/lcms/LCMSTransform.java | 14 +-- .../java2d/cmm/ColorConvertOp/AlphaTest.java | 99 +++++++++++++++++++ 2 files changed, 107 insertions(+), 6 deletions(-) create mode 100644 jdk/test/sun/java2d/cmm/ColorConvertOp/AlphaTest.java diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java index de8a77c75f3..9f86dc6ade0 100644 --- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java +++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java @@ -163,13 +163,15 @@ public class LCMSTransform implements ColorTransform { public void colorConvert(BufferedImage src, BufferedImage dst) { LCMSImageLayout srcIL, dstIL; - dstIL = LCMSImageLayout.createImageLayout(dst); + if (!dst.getColorModel().hasAlpha()) { + dstIL = LCMSImageLayout.createImageLayout(dst); - if (dstIL != null) { - srcIL = LCMSImageLayout.createImageLayout(src); - if (srcIL != null) { - doTransform(srcIL, dstIL); - return; + if (dstIL != null) { + srcIL = LCMSImageLayout.createImageLayout(src); + if (srcIL != null) { + doTransform(srcIL, dstIL); + return; + } } } diff --git a/jdk/test/sun/java2d/cmm/ColorConvertOp/AlphaTest.java b/jdk/test/sun/java2d/cmm/ColorConvertOp/AlphaTest.java new file mode 100644 index 00000000000..a532aecc0cc --- /dev/null +++ b/jdk/test/sun/java2d/cmm/ColorConvertOp/AlphaTest.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +/** + * @test + * @bug 8005930 + * @summary Thest verifies that color conversion does not distort + * alpha channel in the destination image. + * + * @run main AlphaTest + */ + +import java.awt.AlphaComposite; +import java.awt.Color; +import java.awt.Graphics2D; +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.awt.image.ColorConvertOp; + +public class AlphaTest { + public static void main(String[] args) { + ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY); + + ColorConvertOp op = new ColorConvertOp(cs, null); + // create source image filled with an opaque color + BufferedImage src = createSrc(); + int srcAlpha = getAlpha(src); + + System.out.printf("Src alpha: 0x%02x\n", srcAlpha); + + // create clear (transparent black) destination image + BufferedImage dst = createDst(); + int dstAlpha = getAlpha(dst); + System.out.printf("Dst alpha: 0x%02x\n", dstAlpha); + + + dst = op.filter(src, dst); + dstAlpha = getAlpha(dst); + // we expect that destination image is opaque + // i.e. alpha is transferred from source to + // the destination + System.out.printf("Result alpha: 0x%02x\n", dstAlpha); + + if (srcAlpha != dstAlpha) { + throw new RuntimeException("Test failed!"); + } + System.out.println("Test passed"); + } + + private static BufferedImage createSrc() { + BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + + Graphics2D g = img.createGraphics(); + g.setColor(Color.red); + g.fillRect(0, 0, w, h); + g.dispose(); + + return img; + } + + private static BufferedImage createDst() { + BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB); + + Graphics2D g = img.createGraphics(); + g.setComposite(AlphaComposite.Clear); + g.fillRect(0, 0, w, h); + g.dispose(); + + return img; + } + + private static int getAlpha(BufferedImage img) { + int argb = img.getRGB(w / 2, h / 2); + return 0xff & (argb >> 24); + } + + private static final int w = 100; + private static final int h = 100; +} From 92069b97d09488f107032895f67133674a7fd5de Mon Sep 17 00:00:00 2001 From: Andrew Brygin Date: Mon, 15 Apr 2013 18:10:55 +0400 Subject: [PATCH 135/151] 8011622: Use lcms as the default color management module in jdk8 Reviewed-by: prr, vadim --- jdk/make/sun/cmm/Makefile | 3 +- jdk/make/sun/cmm/kcms/Makefile | 2 +- jdk/make/sun/cmm/lcms/Makefile | 2 +- jdk/makefiles/CompileNativeLibraries.gmk | 2 - jdk/makefiles/CopyIntoClasses.gmk | 4 +- .../sun/java2d/cmm/CMMServiceProvider.java | 37 +++++++++++++++++++ .../classes/sun/java2d/cmm/CMSManager.java | 27 +++++++++----- .../classes/sun/java2d/cmm/lcms/LCMS.java | 36 +++++++++++------- .../java2d/cmm/lcms/LcmsServiceProvider.java | 36 ++++++++++++++++++ .../sun.java2d.cmm.CMMServiceProvider | 2 + .../META-INF/services/sun.java2d.cmm.PCMM | 2 - 11 files changed, 121 insertions(+), 32 deletions(-) create mode 100644 jdk/src/share/classes/sun/java2d/cmm/CMMServiceProvider.java create mode 100644 jdk/src/share/classes/sun/java2d/cmm/lcms/LcmsServiceProvider.java create mode 100644 jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider delete mode 100644 jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM diff --git a/jdk/make/sun/cmm/Makefile b/jdk/make/sun/cmm/Makefile index 4b7710faab7..137b8d3d765 100644 --- a/jdk/make/sun/cmm/Makefile +++ b/jdk/make/sun/cmm/Makefile @@ -27,8 +27,9 @@ BUILDDIR = ../.. PRODUCT = sun include $(BUILDDIR)/common/Defs.gmk +SUBDIRS += lcms + ifdef OPENJDK - SUBDIRS += lcms ICCPROFILE_SRC_DIR = $(SHARE_SRC)/lib/cmm/lcms else # !OPENJDK SUBDIRS += kcms diff --git a/jdk/make/sun/cmm/kcms/Makefile b/jdk/make/sun/cmm/kcms/Makefile index 50b525671c5..65372af5d96 100644 --- a/jdk/make/sun/cmm/kcms/Makefile +++ b/jdk/make/sun/cmm/kcms/Makefile @@ -57,7 +57,7 @@ include $(BUILDDIR)/common/Library.gmk SERVICEDIR = $(CLASSBINDIR)/META-INF/services FILES_copy = \ - $(SERVICEDIR)/sun.java2d.cmm.PCMM + $(SERVICEDIR)/sun.java2d.cmm.CMMServiceProvider build: copy-files diff --git a/jdk/make/sun/cmm/lcms/Makefile b/jdk/make/sun/cmm/lcms/Makefile index 85b02e4960e..15afe61c3d8 100644 --- a/jdk/make/sun/cmm/lcms/Makefile +++ b/jdk/make/sun/cmm/lcms/Makefile @@ -58,7 +58,7 @@ include $(BUILDDIR)/common/Library.gmk SERVICEDIR = $(CLASSBINDIR)/META-INF/services FILES_copy = \ - $(SERVICEDIR)/sun.java2d.cmm.PCMM + $(SERVICEDIR)/sun.java2d.cmm.CMMServiceProvider build: copy-files diff --git a/jdk/makefiles/CompileNativeLibraries.gmk b/jdk/makefiles/CompileNativeLibraries.gmk index 3bcf2fd6a9b..82115aec735 100644 --- a/jdk/makefiles/CompileNativeLibraries.gmk +++ b/jdk/makefiles/CompileNativeLibraries.gmk @@ -1213,7 +1213,6 @@ BUILD_LIBRARIES += $(BUILD_LIBJSDT) ########################################################################################## -ifdef OPENJDK # TODO: Update awt lib path when awt is converted $(eval $(call SetupNativeCompilation,BUILD_LIBLCMS,\ LIBRARY:=lcms,\ @@ -1246,7 +1245,6 @@ ifdef OPENJDK BUILD_LIBRARIES += $(BUILD_LIBLCMS) $(BUILD_LIBLCMS) : $(BUILD_LIBAWT) -endif ########################################################################################## diff --git a/jdk/makefiles/CopyIntoClasses.gmk b/jdk/makefiles/CopyIntoClasses.gmk index 549a58efd68..1d6e6a0c9ca 100644 --- a/jdk/makefiles/CopyIntoClasses.gmk +++ b/jdk/makefiles/CopyIntoClasses.gmk @@ -185,10 +185,10 @@ SRC_SERVICES_FILES:=$(wildcard $(addsuffix /services/*,$(ALL_META-INF_DIRS))) ifdef OPENJDK SRC_SERVICES_FILES:=$(filter-out %sun/dc/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) - SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES)) + SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/kcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES)) else SRC_SERVICES_FILES:=$(filter-out %sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine,$(SRC_SERVICES_FILES)) - SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM,$(SRC_SERVICES_FILES)) + SRC_SERVICES_FILES:=$(filter-out %sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider,$(SRC_SERVICES_FILES)) endif # The number of services files are relatively few. If the increase in numbers, then diff --git a/jdk/src/share/classes/sun/java2d/cmm/CMMServiceProvider.java b/jdk/src/share/classes/sun/java2d/cmm/CMMServiceProvider.java new file mode 100644 index 00000000000..c3d37fbd8a9 --- /dev/null +++ b/jdk/src/share/classes/sun/java2d/cmm/CMMServiceProvider.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.java2d.cmm; + +public abstract class CMMServiceProvider { + public final PCMM getColorManagementModule() { + if (CMSManager.canCreateModule()) { + return getModule(); + } + return null; + } + + protected abstract PCMM getModule(); +} diff --git a/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java b/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java index a6df658796f..1e24504b45a 100644 --- a/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java +++ b/jdk/src/share/classes/sun/java2d/cmm/CMSManager.java @@ -52,26 +52,29 @@ public class CMSManager { return cmmImpl; } - cmmImpl = (PCMM)AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - String cmmClass = System.getProperty( - "sun.java2d.cmm", "sun.java2d.cmm.kcms.CMM"); + CMMServiceProvider spi = AccessController.doPrivileged( + new PrivilegedAction() { + public CMMServiceProvider run() { + String cmmClass = System.getProperty( + "sun.java2d.cmm", "sun.java2d.cmm.lcms.LcmsServiceProvider"); - ServiceLoader cmmLoader - = ServiceLoader.loadInstalled(PCMM.class); + ServiceLoader cmmLoader + = ServiceLoader.loadInstalled(CMMServiceProvider.class); - PCMM service = null; + CMMServiceProvider spi = null; - for (PCMM cmm : cmmLoader) { - service = cmm; + for (CMMServiceProvider cmm : cmmLoader) { + spi = cmm; if (cmm.getClass().getName().equals(cmmClass)) { break; } } - return service; + return spi; } }); + cmmImpl = spi.getColorManagementModule(); + if (cmmImpl == null) { throw new CMMException("Cannot initialize Color Management System."+ "No CM module found"); @@ -86,6 +89,10 @@ public class CMSManager { return cmmImpl; } + static synchronized boolean canCreateModule() { + return (cmmImpl == null); + } + /* CMM trace routines */ public static class CMMTracer implements PCMM { diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java index c6eae65a73a..f7ecc0b67c9 100644 --- a/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java +++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LCMS.java @@ -148,22 +148,32 @@ public class LCMS implements PCMM { public static native void initLCMS(Class Trans, Class IL, Class Pf); - /* the class initializer which loads the CMM */ - static { + private LCMS() {}; + + private static LCMS theLcms = null; + + static synchronized PCMM getModule() { + if (theLcms != null) { + return theLcms; + } + java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public Object run() { - /* We need to load awt here because of usage trace and - * disposer frameworks - */ - System.loadLibrary("awt"); - System.loadLibrary("lcms"); - return null; - } - } - ); + new java.security.PrivilegedAction() { + public Object run() { + /* We need to load awt here because of usage trace and + * disposer frameworks + */ + System.loadLibrary("awt"); + System.loadLibrary("lcms"); + return null; + } + }); initLCMS(LCMSTransform.class, LCMSImageLayout.class, ICC_Profile.class); + + theLcms = new LCMS(); + + return theLcms; } private static class TagData { diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/LcmsServiceProvider.java b/jdk/src/share/classes/sun/java2d/cmm/lcms/LcmsServiceProvider.java new file mode 100644 index 00000000000..02cc90bc718 --- /dev/null +++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/LcmsServiceProvider.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package sun.java2d.cmm.lcms; + +import sun.java2d.cmm.CMMServiceProvider; +import sun.java2d.cmm.PCMM; + +public final class LcmsServiceProvider extends CMMServiceProvider { + @Override + protected PCMM getModule() { + return LCMS.getModule(); + } +} diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider b/jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider new file mode 100644 index 00000000000..ce7ea564ffb --- /dev/null +++ b/jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.CMMServiceProvider @@ -0,0 +1,2 @@ +# Little CMS color management module +sun.java2d.cmm.lcms.LcmsServiceProvider diff --git a/jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM b/jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM deleted file mode 100644 index b30209a2220..00000000000 --- a/jdk/src/share/classes/sun/java2d/cmm/lcms/META-INF/services/sun.java2d.cmm.PCMM +++ /dev/null @@ -1,2 +0,0 @@ -# Little CMS color management module -sun.java2d.cmm.lcms.LCMS From 67e05359fc51764e5530ebf9fb5f511b232e8e7d Mon Sep 17 00:00:00 2001 From: Martin Buchholz Date: Mon, 15 Apr 2013 14:07:17 -0700 Subject: [PATCH 136/151] 8008509: 6588413 changed JNIEXPORT visibility for GCC on HSX, jdk's jni_md.h needs similar change Define JNIEXPORT to use "default" visibility where possible. Reviewed-by: coleenp, ddehaven, dcubed, anthony --- .../native/sun/java2d/loops/GraphicsPrimitiveMgr.h | 6 +++--- jdk/src/share/npt/npt.h | 8 ++++---- jdk/src/solaris/javavm/export/jni_md.h | 13 +++++++++++-- jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c | 6 +++--- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h index 5085028c223..6391354a3c4 100644 --- a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h +++ b/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h @@ -143,9 +143,9 @@ typedef struct _SurfaceType { * structure from the information present in a given Java Composite * object. */ -typedef JNIEXPORT void (JNICALL CompInfoFunc)(JNIEnv *env, - CompositeInfo *pCompInfo, - jobject Composite); +typedef void (JNICALL CompInfoFunc)(JNIEnv *env, + CompositeInfo *pCompInfo, + jobject Composite); /* * The additional information needed to implement a primitive that diff --git a/jdk/src/share/npt/npt.h b/jdk/src/share/npt/npt.h index c9cd9a3d209..4f2a5620da5 100644 --- a/jdk/src/share/npt/npt.h +++ b/jdk/src/share/npt/npt.h @@ -94,13 +94,13 @@ typedef struct { JNIEXPORT void JNICALL nptInitialize (NptEnv **pnpt, char *nptVersion, char *options); -typedef JNIEXPORT void (JNICALL *NptInitialize) - (NptEnv **pnpt, char *nptVersion, char *options); +typedef void (JNICALL *NptInitialize) + (NptEnv **pnpt, char *nptVersion, char *options); JNIEXPORT void JNICALL nptTerminate (NptEnv* npt, char *options); -typedef JNIEXPORT void (JNICALL *NptTerminate) - (NptEnv* npt, char *options); +typedef void (JNICALL *NptTerminate) + (NptEnv* npt, char *options); #ifdef __cplusplus } /* extern "C" */ diff --git a/jdk/src/solaris/javavm/export/jni_md.h b/jdk/src/solaris/javavm/export/jni_md.h index baab364c916..0f3d1ed8b0c 100644 --- a/jdk/src/solaris/javavm/export/jni_md.h +++ b/jdk/src/solaris/javavm/export/jni_md.h @@ -26,8 +26,17 @@ #ifndef _JAVASOFT_JNI_MD_H_ #define _JAVASOFT_JNI_MD_H_ -#define JNIEXPORT -#define JNIIMPORT +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif +#if (defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4) && (__GNUC_MINOR__ > 2))) || __has_attribute(visibility) + #define JNIEXPORT __attribute__((visibility("default"))) + #define JNIIMPORT __attribute__((visibility("default"))) +#else + #define JNIEXPORT + #define JNIIMPORT +#endif + #define JNICALL typedef int jint; diff --git a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c index cdb0e8f9d08..378db5850ab 100644 --- a/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c +++ b/jdk/src/solaris/native/sun/awt/awt_LoadLibrary.c @@ -43,7 +43,7 @@ static void *awtHandle = NULL; -typedef JNIEXPORT jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved); +typedef jint JNICALL JNI_OnLoad_type(JavaVM *vm, void *reserved); /* Initialize the Java VM instance variable when the library is first loaded */ @@ -206,7 +206,7 @@ Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this, jobject frame, jstring jcommand) { /* type of the old backdoor function */ - typedef JNIEXPORT void JNICALL + typedef void JNICALL XsessionWMcommand_type(JNIEnv *env, jobject this, jobject frame, jstring jcommand); @@ -234,7 +234,7 @@ Java_sun_awt_motif_XsessionWMcommand(JNIEnv *env, jobject this, JNIEXPORT void JNICALL Java_sun_awt_motif_XsessionWMcommand_New(JNIEnv *env, jobjectArray jargv) { - typedef JNIEXPORT void JNICALL + typedef void JNICALL XsessionWMcommand_New_type(JNIEnv *env, jobjectArray jargv); static XsessionWMcommand_New_type *XsessionWMcommand = NULL; From dbb722dfb0b8950f8f6699d80e3a4089967d1cd7 Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Mon, 15 Apr 2013 18:31:48 -0700 Subject: [PATCH 137/151] 8011800: Add java.util.Objects.requireNonNull(T, Supplier) Reviewed-by: alanb, dholmes, mduigou --- jdk/src/share/classes/java/util/Objects.java | 30 +++++++- .../java/util/Objects/BasicObjectsTest.java | 72 ++++++++++--------- 2 files changed, 68 insertions(+), 34 deletions(-) diff --git a/jdk/src/share/classes/java/util/Objects.java b/jdk/src/share/classes/java/util/Objects.java index 8052e05d928..a64f4e6c2e8 100644 --- a/jdk/src/share/classes/java/util/Objects.java +++ b/jdk/src/share/classes/java/util/Objects.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,8 @@ package java.util; +import java.util.function.Supplier; + /** * This class consists of {@code static} utility methods for operating * on objects. These utilities include {@code null}-safe or {@code @@ -226,4 +228,30 @@ public final class Objects { throw new NullPointerException(message); return obj; } + + /** + * Checks that the specified object reference is not {@code null} and + * throws a customized {@link NullPointerException} if it is. + * + *

      Unlike the method {@link requireNonNull(Object, String}, + * this method allows creation of the message to be deferred until + * after the null check is made. While this may confer a + * performance advantage in the non-null case, when deciding to + * call this method care should be taken that the costs of + * creating the message supplier are less than the cost of just + * creating the string message directly. + * + * @param obj the object reference to check for nullity + * @param messageSupplier supplier of the detail message to be + * used in the event that a {@code NullPointerException} is thrown + * @param the type of the reference + * @return {@code obj} if not {@code null} + * @throws NullPointerException if {@code obj} is {@code null} + * @since 1.8 + */ + public static T requireNonNull(T obj, Supplier messageSupplier) { + if (obj == null) + throw new NullPointerException(messageSupplier.get()); + return obj; + } } diff --git a/jdk/test/java/util/Objects/BasicObjectsTest.java b/jdk/test/java/util/Objects/BasicObjectsTest.java index 695b57a96bf..7f93dc4b9bc 100644 --- a/jdk/test/java/util/Objects/BasicObjectsTest.java +++ b/jdk/test/java/util/Objects/BasicObjectsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,12 +23,13 @@ /* * @test - * @bug 6797535 6889858 6891113 + * @bug 6797535 6889858 6891113 8011800 * @summary Basic tests for methods in java.util.Objects * @author Joseph D. Darcy */ import java.util.*; +import java.util.function.*; public class BasicObjectsTest { public static void main(String... args) { @@ -40,7 +41,7 @@ public class BasicObjectsTest { errors += testToString(); errors += testToString2(); errors += testCompare(); - errors += testNonNull(); + errors += testRequireNonNull(); if (errors > 0 ) throw new RuntimeException(); } @@ -158,49 +159,54 @@ public class BasicObjectsTest { return errors; } - private static int testNonNull() { + private static int testRequireNonNull() { int errors = 0; - String s; - // Test 1-arg variant + final String RNN_1 = "1-arg requireNonNull"; + final String RNN_2 = "2-arg requireNonNull"; + final String RNN_3 = "Supplier requireNonNull"; + + Function rnn1 = s -> Objects.requireNonNull(s); + Function rnn2 = s -> Objects.requireNonNull(s, "trousers"); + Function rnn3 = s -> Objects.requireNonNull(s, () -> "trousers"); + + errors += testRNN_NonNull(rnn1, RNN_1); + errors += testRNN_NonNull(rnn2, RNN_2); + errors += testRNN_NonNull(rnn3, RNN_3); + + errors += testRNN_Null(rnn1, RNN_1, null); + errors += testRNN_Null(rnn2, RNN_2, "trousers"); + errors += testRNN_Null(rnn3, RNN_3, "trousers"); + return errors; + } + + private static int testRNN_NonNull(Function testFunc, + String testFuncName) { + int errors = 0; try { - s = Objects.requireNonNull("pants"); + String s = testFunc.apply("pants"); if (s != "pants") { - System.err.printf("1-arg non-null failed to return its arg"); + System.err.printf(testFuncName + " failed to return its arg"); errors++; } } catch (NullPointerException e) { - System.err.printf("1-arg nonNull threw unexpected NPE"); + System.err.printf(testFuncName + " threw unexpected NPE"); errors++; } + return errors; + } + private static int testRNN_Null(Function testFunc, + String testFuncName, + String expectedMessage) { + int errors = 0; try { - s = Objects.requireNonNull(null); - System.err.printf("1-arg nonNull failed to throw NPE"); + String s = testFunc.apply(null); + System.err.printf(testFuncName + " failed to throw NPE"); errors++; } catch (NullPointerException e) { - // Expected - } - - // Test 2-arg variant - try { - s = Objects.requireNonNull("pants", "trousers"); - if (s != "pants") { - System.err.printf("2-arg nonNull failed to return its arg"); - errors++; - } - } catch (NullPointerException e) { - System.err.printf("2-arg nonNull threw unexpected NPE"); - errors++; - } - - try { - s = Objects.requireNonNull(null, "pantaloons"); - System.err.printf("2-arg nonNull failed to throw NPE"); - errors++; - } catch (NullPointerException e) { - if (e.getMessage() != "pantaloons") { - System.err.printf("2-arg nonNull threw NPE w/ bad detail msg"); + if (e.getMessage() != expectedMessage) { + System.err.printf(testFuncName + " threw NPE w/ bad detail msg"); errors++; } } From 23d10238b1038fee90e30a981fe4e4a1a9545e5a Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 16 Apr 2013 12:23:16 +0100 Subject: [PATCH 138/151] 8012343: Objects.requireNonNull(Object,Supplier) breaks genstubs build Reviewed-by: alanb --- jdk/src/share/classes/java/util/Objects.java | 30 +------- .../java/util/Objects/BasicObjectsTest.java | 72 +++++++++---------- 2 files changed, 34 insertions(+), 68 deletions(-) diff --git a/jdk/src/share/classes/java/util/Objects.java b/jdk/src/share/classes/java/util/Objects.java index a64f4e6c2e8..8052e05d928 100644 --- a/jdk/src/share/classes/java/util/Objects.java +++ b/jdk/src/share/classes/java/util/Objects.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,8 +25,6 @@ package java.util; -import java.util.function.Supplier; - /** * This class consists of {@code static} utility methods for operating * on objects. These utilities include {@code null}-safe or {@code @@ -228,30 +226,4 @@ public final class Objects { throw new NullPointerException(message); return obj; } - - /** - * Checks that the specified object reference is not {@code null} and - * throws a customized {@link NullPointerException} if it is. - * - *

      Unlike the method {@link requireNonNull(Object, String}, - * this method allows creation of the message to be deferred until - * after the null check is made. While this may confer a - * performance advantage in the non-null case, when deciding to - * call this method care should be taken that the costs of - * creating the message supplier are less than the cost of just - * creating the string message directly. - * - * @param obj the object reference to check for nullity - * @param messageSupplier supplier of the detail message to be - * used in the event that a {@code NullPointerException} is thrown - * @param the type of the reference - * @return {@code obj} if not {@code null} - * @throws NullPointerException if {@code obj} is {@code null} - * @since 1.8 - */ - public static T requireNonNull(T obj, Supplier messageSupplier) { - if (obj == null) - throw new NullPointerException(messageSupplier.get()); - return obj; - } } diff --git a/jdk/test/java/util/Objects/BasicObjectsTest.java b/jdk/test/java/util/Objects/BasicObjectsTest.java index 7f93dc4b9bc..695b57a96bf 100644 --- a/jdk/test/java/util/Objects/BasicObjectsTest.java +++ b/jdk/test/java/util/Objects/BasicObjectsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,13 +23,12 @@ /* * @test - * @bug 6797535 6889858 6891113 8011800 + * @bug 6797535 6889858 6891113 * @summary Basic tests for methods in java.util.Objects * @author Joseph D. Darcy */ import java.util.*; -import java.util.function.*; public class BasicObjectsTest { public static void main(String... args) { @@ -41,7 +40,7 @@ public class BasicObjectsTest { errors += testToString(); errors += testToString2(); errors += testCompare(); - errors += testRequireNonNull(); + errors += testNonNull(); if (errors > 0 ) throw new RuntimeException(); } @@ -159,54 +158,49 @@ public class BasicObjectsTest { return errors; } - private static int testRequireNonNull() { + private static int testNonNull() { int errors = 0; + String s; - final String RNN_1 = "1-arg requireNonNull"; - final String RNN_2 = "2-arg requireNonNull"; - final String RNN_3 = "Supplier requireNonNull"; - - Function rnn1 = s -> Objects.requireNonNull(s); - Function rnn2 = s -> Objects.requireNonNull(s, "trousers"); - Function rnn3 = s -> Objects.requireNonNull(s, () -> "trousers"); - - errors += testRNN_NonNull(rnn1, RNN_1); - errors += testRNN_NonNull(rnn2, RNN_2); - errors += testRNN_NonNull(rnn3, RNN_3); - - errors += testRNN_Null(rnn1, RNN_1, null); - errors += testRNN_Null(rnn2, RNN_2, "trousers"); - errors += testRNN_Null(rnn3, RNN_3, "trousers"); - return errors; - } - - private static int testRNN_NonNull(Function testFunc, - String testFuncName) { - int errors = 0; + // Test 1-arg variant try { - String s = testFunc.apply("pants"); + s = Objects.requireNonNull("pants"); if (s != "pants") { - System.err.printf(testFuncName + " failed to return its arg"); + System.err.printf("1-arg non-null failed to return its arg"); errors++; } } catch (NullPointerException e) { - System.err.printf(testFuncName + " threw unexpected NPE"); + System.err.printf("1-arg nonNull threw unexpected NPE"); errors++; } - return errors; - } - private static int testRNN_Null(Function testFunc, - String testFuncName, - String expectedMessage) { - int errors = 0; try { - String s = testFunc.apply(null); - System.err.printf(testFuncName + " failed to throw NPE"); + s = Objects.requireNonNull(null); + System.err.printf("1-arg nonNull failed to throw NPE"); errors++; } catch (NullPointerException e) { - if (e.getMessage() != expectedMessage) { - System.err.printf(testFuncName + " threw NPE w/ bad detail msg"); + // Expected + } + + // Test 2-arg variant + try { + s = Objects.requireNonNull("pants", "trousers"); + if (s != "pants") { + System.err.printf("2-arg nonNull failed to return its arg"); + errors++; + } + } catch (NullPointerException e) { + System.err.printf("2-arg nonNull threw unexpected NPE"); + errors++; + } + + try { + s = Objects.requireNonNull(null, "pantaloons"); + System.err.printf("2-arg nonNull failed to throw NPE"); + errors++; + } catch (NullPointerException e) { + if (e.getMessage() != "pantaloons") { + System.err.printf("2-arg nonNull threw NPE w/ bad detail msg"); errors++; } } From 0a5657be1cf85eacb8f0854707ee98bf0501f43b Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 16 Apr 2013 12:51:22 +0100 Subject: [PATCH 139/151] 8012237: CompletableFuture/Basic.java still fails intermittently Reviewed-by: martin --- .../concurrent/CompletableFuture/Basic.java | 81 +++++++++++++++++-- 1 file changed, 76 insertions(+), 5 deletions(-) diff --git a/jdk/test/java/util/concurrent/CompletableFuture/Basic.java b/jdk/test/java/util/concurrent/CompletableFuture/Basic.java index a35c5f4ec55..ec6909de2de 100644 --- a/jdk/test/java/util/concurrent/CompletableFuture/Basic.java +++ b/jdk/test/java/util/concurrent/CompletableFuture/Basic.java @@ -504,7 +504,7 @@ public class Basic { cf1 = supplyAsync(() -> { throw new RuntimeException(); }); cf2 = supplyAsync(() -> 2); cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; }); - try { check(cf3.join() == 1); } catch (CompletionException x) { pass(); } + try { check(cf3.join() == 2); } catch (CompletionException x) { pass(); } check(cf3.isDone()); check(cf1.isDone() || cf2.isDone()); @@ -520,6 +520,27 @@ public class Basic { cf3 = cf1.applyToEitherAsync(cf2, (x) -> { fail(); return x; }); checkCompletedExceptionally(cf3); check(cf1.isDone() || cf2.isDone()); + + final Phaser cf3Done = new Phaser(2); + cf1 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 1; }); + cf2 = supplyAsync(() -> 2); + cf3 = cf1.applyToEither(cf2, (x) -> { check(x == 2); return x; }); + checkCompletedNormally(cf3, 2); + checkCompletedNormally(cf2, 2); + check(!cf1.isDone()); + cf3Done.arrive(); + checkCompletedNormally(cf1, 1); + checkCompletedNormally(cf3, 2); + + cf1 = supplyAsync(() -> 1); + cf2 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 2; }); + cf3 = cf1.applyToEitherAsync(cf2, (x) -> { check(x == 1); return x; }); + checkCompletedNormally(cf3, 1); + checkCompletedNormally(cf1, 1); + check(!cf2.isDone()); + cf3Done.arrive(); + checkCompletedNormally(cf2, 2); + checkCompletedNormally(cf3, 1); } catch (Throwable t) { unexpected(t); } //---------------------------------------------------------------- @@ -570,6 +591,27 @@ public class Basic { cf3 = cf2.acceptEitherAsync(cf1, (x) -> { fail(); }); checkCompletedExceptionally(cf3); check(cf1.isDone() || cf2.isDone()); + + final Phaser cf3Done = new Phaser(2); + cf1 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 1; }); + cf2 = supplyAsync(() -> 2); + cf3 = cf1.acceptEither(cf2, (x) -> { check(x == 2); }); + checkCompletedNormally(cf3, null); + checkCompletedNormally(cf2, 2); + check(!cf1.isDone()); + cf3Done.arrive(); + checkCompletedNormally(cf1, 1); + checkCompletedNormally(cf3, null); + + cf1 = supplyAsync(() -> 1); + cf2 = supplyAsync(() -> { cf3Done.arriveAndAwaitAdvance(); return 2; }); + cf3 = cf1.acceptEitherAsync(cf2, (x) -> { check(x == 1); }); + checkCompletedNormally(cf3, null); + checkCompletedNormally(cf1, 1); + check(!cf2.isDone()); + cf3Done.arrive(); + checkCompletedNormally(cf2, 2); + checkCompletedNormally(cf3, null); } catch (Throwable t) { unexpected(t); } //---------------------------------------------------------------- @@ -605,19 +647,23 @@ public class Basic { cf1 = runAsync(() -> { throw new RuntimeException(); }); cf2 = runAsync(() -> { }); cf3 = cf2.runAfterEither(cf1, () -> { atomicInt.incrementAndGet(); }); - try { check(cf3.join() == null); } catch (CompletionException x) { pass(); } + try { + check(cf3.join() == null); + check(atomicInt.get() == (before + 1)); + } catch (CompletionException x) { pass(); } check(cf3.isDone()); check(cf1.isDone() || cf2.isDone()); - check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { }); cf2 = runAsync(() -> { throw new RuntimeException(); }); cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); }); - try { check(cf3.join() == null); } catch (CompletionException x) { pass(); } + try { + check(cf3.join() == null); + check(atomicInt.get() == (before + 1)); + } catch (CompletionException x) { pass(); } check(cf3.isDone()); check(cf1.isDone() || cf2.isDone()); - check(atomicInt.get() == (before + 1)); before = atomicInt.get(); cf1 = runAsync(() -> { throw new RuntimeException(); }); @@ -626,6 +672,31 @@ public class Basic { checkCompletedExceptionally(cf3); check(cf1.isDone() || cf2.isDone()); check(atomicInt.get() == before); + + final Phaser cf3Done = new Phaser(2); + before = atomicInt.get(); + cf1 = runAsync(() -> { cf3Done.arriveAndAwaitAdvance(); }); + cf2 = runAsync(() -> { }); + cf3 = cf1.runAfterEither(cf2, () -> { atomicInt.incrementAndGet(); }); + checkCompletedNormally(cf3, null); + checkCompletedNormally(cf2, null); + check(!cf1.isDone()); + check(atomicInt.get() == (before + 1)); + cf3Done.arrive(); + checkCompletedNormally(cf1, null); + checkCompletedNormally(cf3, null); + + before = atomicInt.get(); + cf1 = runAsync(() -> { }); + cf2 = runAsync(() -> { cf3Done.arriveAndAwaitAdvance(); }); + cf3 = cf1.runAfterEitherAsync(cf2, () -> { atomicInt.incrementAndGet(); }); + checkCompletedNormally(cf3, null); + checkCompletedNormally(cf1, null); + check(!cf2.isDone()); + check(atomicInt.get() == (before + 1)); + cf3Done.arrive(); + checkCompletedNormally(cf2, null); + checkCompletedNormally(cf3, null); } catch (Throwable t) { unexpected(t); } //---------------------------------------------------------------- From dc668d18a34ccc931ad481971ccab5157eccb648 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Tue, 16 Apr 2013 13:26:30 +0100 Subject: [PATCH 140/151] 8012244: java/net/Socket/asyncClose/Race.java fails intermittently on Windows Reviewed-by: alanb, dsamersoff --- .../java/net/DualStackPlainSocketImpl.java | 3 +- .../native/java/net/SocketInputStream.c | 49 ++++++++++--------- jdk/test/java/net/Socket/asyncClose/Race.java | 6 +-- 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/jdk/src/windows/classes/java/net/DualStackPlainSocketImpl.java b/jdk/src/windows/classes/java/net/DualStackPlainSocketImpl.java index 4073b9d5dba..54121b46340 100644 --- a/jdk/src/windows/classes/java/net/DualStackPlainSocketImpl.java +++ b/jdk/src/windows/classes/java/net/DualStackPlainSocketImpl.java @@ -152,8 +152,9 @@ class DualStackPlainSocketImpl extends AbstractPlainSocketImpl if (!fd.valid()) return; - close0(fdAccess.get(fd)); + final int nativefd = fdAccess.get(fd); fdAccess.set(fd, -1); + close0(nativefd); } void socketShutdown(int howto) throws IOException { diff --git a/jdk/src/windows/native/java/net/SocketInputStream.c b/jdk/src/windows/native/java/net/SocketInputStream.c index e7bb043d1c6..223424ab436 100644 --- a/jdk/src/windows/native/java/net/SocketInputStream.c +++ b/jdk/src/windows/native/java/net/SocketInputStream.c @@ -134,32 +134,35 @@ Java_java_net_SocketInputStream_socketRead0(JNIEnv *env, jobject this, (*env)->SetByteArrayRegion(env, data, off, nread, (jbyte *)bufP); } else { if (nread < 0) { - /* - * Recv failed. - */ - switch (WSAGetLastError()) { - case WSAEINTR: - JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", - "socket closed"); - break; + // Check if the socket has been closed since we last checked. + // This could be a reason for recv failing. + if ((*env)->GetIntField(env, fdObj, IO_fd_fdID) == -1) { + NET_ThrowSocketException(env, "Socket closed"); + } else { + switch (WSAGetLastError()) { + case WSAEINTR: + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", + "socket closed"); + break; - case WSAECONNRESET: - case WSAESHUTDOWN: - /* - * Connection has been reset - Windows sometimes reports - * the reset as a shutdown error. - */ - JNU_ThrowByName(env, "sun/net/ConnectionResetException", - ""); - break; + case WSAECONNRESET: + case WSAESHUTDOWN: + /* + * Connection has been reset - Windows sometimes reports + * the reset as a shutdown error. + */ + JNU_ThrowByName(env, "sun/net/ConnectionResetException", + ""); + break; - case WSAETIMEDOUT : - JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", - "Read timed out"); - break; + case WSAETIMEDOUT : + JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException", + "Read timed out"); + break; - default: - NET_ThrowCurrent(env, "recv failed"); + default: + NET_ThrowCurrent(env, "recv failed"); + } } } } diff --git a/jdk/test/java/net/Socket/asyncClose/Race.java b/jdk/test/java/net/Socket/asyncClose/Race.java index f8869394b3d..5a9585682f1 100644 --- a/jdk/test/java/net/Socket/asyncClose/Race.java +++ b/jdk/test/java/net/Socket/asyncClose/Race.java @@ -23,8 +23,8 @@ /* * @test - * @bug 8006395 - * @summary Race in async socket close on Linux + * @bug 8006395 8012244 + * @summary Tests racing code that reads and closes a Socket */ import java.io.InputStream; @@ -58,7 +58,7 @@ public class Race { Thread.sleep(50); } catch (Exception x) { if (!(x instanceof SocketException - && x.getMessage().equals("Socket closed"))) + && x.getMessage().equalsIgnoreCase("socket closed"))) x.printStackTrace(); // ok, expect Socket closed } From 12cfd3e1b4ed9097c960687dc3ff5732d85c6b98 Mon Sep 17 00:00:00 2001 From: Mike Duigou Date: Tue, 16 Apr 2013 11:17:19 -0700 Subject: [PATCH 141/151] 8004518: Add in-place operations to Map 8010122: Add defaults for ConcurrentMap operations to Map Co-authored-by: Doug Lea Co-authored-by: Henry Jen Co-authored-by: Akhil Arora Co-authored-by: Peter Levart Reviewed-by: darcy, briangoetz, mduigou, dholmes, ulfzibis --- .../share/classes/java/util/Collections.java | 351 +++++++++- jdk/src/share/classes/java/util/HashMap.java | 276 +++++++- .../share/classes/java/util/Hashtable.java | 275 +++++++- jdk/src/share/classes/java/util/Map.java | 615 +++++++++++++++++- .../java/util/concurrent/ConcurrentMap.java | 37 +- jdk/test/java/util/Map/Defaults.java | 594 +++++++++++++++++ 6 files changed, 2097 insertions(+), 51 deletions(-) create mode 100644 jdk/test/java/util/Map/Defaults.java diff --git a/jdk/src/share/classes/java/util/Collections.java b/jdk/src/share/classes/java/util/Collections.java index b6bac484dac..ad36637452b 100644 --- a/jdk/src/share/classes/java/util/Collections.java +++ b/jdk/src/share/classes/java/util/Collections.java @@ -28,6 +28,9 @@ import java.io.Serializable; import java.io.ObjectOutputStream; import java.io.IOException; import java.lang.reflect.Array; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Function; /** * This class consists exclusively of static methods that operate on or return @@ -264,8 +267,7 @@ public class Collections { } private static - int indexedBinarySearch(List> list, T key) - { + int indexedBinarySearch(List> list, T key) { int low = 0; int high = list.size()-1; @@ -441,21 +443,21 @@ public class Collections { /** * Randomly permutes the specified list using a default source of * randomness. All permutations occur with approximately equal - * likelihood.

      + * likelihood. * - * The hedge "approximately" is used in the foregoing description because + *

      The hedge "approximately" is used in the foregoing description because * default source of randomness is only approximately an unbiased source * of independently chosen bits. If it were a perfect source of randomly * chosen bits, then the algorithm would choose permutations with perfect - * uniformity.

      + * uniformity. * - * This implementation traverses the list backwards, from the last element - * up to the second, repeatedly swapping a randomly selected element into - * the "current position". Elements are randomly selected from the + *

      This implementation traverses the list backwards, from the last + * element up to the second, repeatedly swapping a randomly selected element + * into the "current position". Elements are randomly selected from the * portion of the list that runs from the first element to the current - * position, inclusive.

      + * position, inclusive. * - * This method runs in linear time. If the specified list does not + *

      This method runs in linear time. If the specified list does not * implement the {@link RandomAccess} interface and is large, this * implementation dumps the specified list into an array before shuffling * it, and dumps the shuffled array back into the list. This avoids the @@ -469,9 +471,10 @@ public class Collections { public static void shuffle(List list) { Random rnd = r; if (rnd == null) - r = rnd = new Random(); + r = rnd = new Random(); // harmless race. shuffle(list, rnd); } + private static Random r; /** @@ -1391,6 +1394,67 @@ public class Collections { public int hashCode() {return m.hashCode();} public String toString() {return m.toString();} + // Override default methods in Map + @Override + @SuppressWarnings("unchecked") + public V getOrDefault(Object k, V defaultValue) { + // Safe cast as we don't change the value + return ((Map)m).getOrDefault(k, defaultValue); + } + + @Override + public void forEach(BiConsumer action) { + m.forEach(action); + } + + @Override + public void replaceAll(BiFunction function) { + throw new UnsupportedOperationException(); + } + + @Override + public V putIfAbsent(K key, V value) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean remove(Object key, Object value) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean replace(K key, V oldValue, V newValue) { + throw new UnsupportedOperationException(); + } + + @Override + public V replace(K key, V value) { + throw new UnsupportedOperationException(); + } + + @Override + public V computeIfAbsent(K key, Function mappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V computeIfPresent(K key, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V compute(K key, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V merge(K key, V value, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + /** * We need this class in addition to UnmodifiableSet as * Map.Entries themselves permit modification of the backing Map @@ -1590,9 +1654,9 @@ public class Collections { * * Failure to follow this advice may result in non-deterministic behavior. * - *

      The returned collection does not pass the hashCode - * and equals operations through to the backing collection, but - * relies on Object's equals and hashCode methods. This is + *

      The returned collection does not pass the {@code hashCode} + * and {@code equals} operations through to the backing collection, but + * relies on {@code Object}'s equals and hashCode methods. This is * necessary to preserve the contracts of these operations in the case * that the backing collection is a set or a list.

      * @@ -2107,6 +2171,57 @@ public class Collections { public String toString() { synchronized (mutex) {return m.toString();} } + + // Override default methods in Map + @Override + public V getOrDefault(Object k, V defaultValue) { + synchronized (mutex) {return m.getOrDefault(k, defaultValue);} + } + @Override + public void forEach(BiConsumer action) { + synchronized (mutex) {m.forEach(action);} + } + @Override + public void replaceAll(BiFunction function) { + synchronized (mutex) {m.replaceAll(function);} + } + @Override + public V putIfAbsent(K key, V value) { + synchronized (mutex) {return m.putIfAbsent(key, value);} + } + @Override + public boolean remove(Object key, Object value) { + synchronized (mutex) {return m.remove(key, value);} + } + @Override + public boolean replace(K key, V oldValue, V newValue) { + synchronized (mutex) {return m.replace(key, oldValue, newValue);} + } + @Override + public V replace(K key, V value) { + synchronized (mutex) {return m.replace(key, value);} + } + @Override + public V computeIfAbsent(K key, + Function mappingFunction) { + synchronized (mutex) {return m.computeIfAbsent(key, mappingFunction);} + } + @Override + public V computeIfPresent(K key, + BiFunction remappingFunction) { + synchronized (mutex) {return m.computeIfPresent(key, remappingFunction);} + } + @Override + public V compute(K key, + BiFunction remappingFunction) { + synchronized (mutex) {return m.compute(key, remappingFunction);} + } + @Override + public V merge(K key, V value, + BiFunction remappingFunction) { + synchronized (mutex) {return m.merge(key, value, remappingFunction);} + } + private void writeObject(ObjectOutputStream s) throws IOException { synchronized (mutex) {s.defaultWriteObject();} } @@ -2326,6 +2441,8 @@ public class Collections { } public Iterator iterator() { + // JDK-6363904 - unwrapped iterator could be typecast to + // ListIterator with unsafe set() final Iterator it = c.iterator(); return new Iterator() { public boolean hasNext() { return it.hasNext(); } @@ -2652,7 +2769,7 @@ public class Collections { public List subList(int fromIndex, int toIndex) { return new CheckedRandomAccessList<>( - list.subList(fromIndex, toIndex), type); + list.subList(fromIndex, toIndex), type); } } @@ -2717,14 +2834,24 @@ public class Collections { throw new ClassCastException(badValueMsg(value)); } + private BiFunction typeCheck( + BiFunction func) { + Objects.requireNonNull(func); + return (k, v) -> { + V newValue = func.apply(k, v); + typeCheck(k, newValue); + return newValue; + }; + } + private String badKeyMsg(Object key) { return "Attempt to insert " + key.getClass() + - " key into map with key type " + keyType; + " key into map with key type " + keyType; } private String badValueMsg(Object value) { return "Attempt to insert " + value.getClass() + - " value into map with value type " + valueType; + " value into map with value type " + valueType; } CheckedMap(Map m, Class keyType, Class valueType) { @@ -2768,7 +2895,7 @@ public class Collections { Object v = e.getValue(); typeCheck(k, v); checked.add( - new AbstractMap.SimpleImmutableEntry<>((K) k, (V) v)); + new AbstractMap.SimpleImmutableEntry<>((K)k, (V)v)); } for (Map.Entry e : checked) m.put(e.getKey(), e.getValue()); @@ -2782,6 +2909,74 @@ public class Collections { return entrySet; } + // Override default methods in Map + @Override + public void forEach(BiConsumer action) { + m.forEach(action); + } + + @Override + public void replaceAll(BiFunction function) { + m.replaceAll(typeCheck(function)); + } + + @Override + public V putIfAbsent(K key, V value) { + typeCheck(key, value); + return m.putIfAbsent(key, value); + } + + @Override + public boolean remove(Object key, Object value) { + return m.remove(key, value); + } + + @Override + public boolean replace(K key, V oldValue, V newValue) { + typeCheck(key, newValue); + return m.replace(key, oldValue, newValue); + } + + @Override + public V replace(K key, V value) { + typeCheck(key, value); + return m.replace(key, value); + } + + @Override + public V computeIfAbsent(K key, + Function mappingFunction) { + Objects.requireNonNull(mappingFunction); + return m.computeIfAbsent(key, k -> { + V value = mappingFunction.apply(k); + typeCheck(k, value); + return value; + }); + } + + @Override + public V computeIfPresent(K key, + BiFunction remappingFunction) { + return m.computeIfPresent(key, typeCheck(remappingFunction)); + } + + @Override + public V compute(K key, + BiFunction remappingFunction) { + return m.compute(key, typeCheck(remappingFunction)); + } + + @Override + public V merge(K key, V value, + BiFunction remappingFunction) { + Objects.requireNonNull(remappingFunction); + return m.merge(key, value, (v1, v2) -> { + V newValue = remappingFunction.apply(v1, v2); + typeCheck(null, newValue); + return newValue; + }); + } + /** * We need this class in addition to CheckedSet as Map.Entry permits * modification of the backing Map via the setValue operation. This @@ -3456,6 +3651,67 @@ public class Collections { public int hashCode() {return 0;} + // Override default methods in Map + @Override + @SuppressWarnings("unchecked") + public V getOrDefault(Object k, V defaultValue) { + return defaultValue; + } + + @Override + public void forEach(BiConsumer action) { + Objects.requireNonNull(action); + } + + @Override + public void replaceAll(BiFunction function) { + Objects.requireNonNull(function); + } + + @Override + public V putIfAbsent(K key, V value) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean remove(Object key, Object value) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean replace(K key, V oldValue, V newValue) { + throw new UnsupportedOperationException(); + } + + @Override + public V replace(K key, V value) { + throw new UnsupportedOperationException(); + } + + @Override + public V computeIfAbsent(K key, + Function mappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V computeIfPresent(K key, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V compute(K key, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V merge(K key, V value, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + // Preserves singleton property private Object readResolve() { return EMPTY_MAP; @@ -3619,6 +3875,65 @@ public class Collections { return values; } + // Override default methods in Map + @Override + public V getOrDefault(Object key, V defaultValue) { + return eq(key, k) ? v : defaultValue; + } + + @Override + public void forEach(BiConsumer action) { + action.accept(k, v); + } + + @Override + public void replaceAll(BiFunction function) { + throw new UnsupportedOperationException(); + } + + @Override + public V putIfAbsent(K key, V value) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean remove(Object key, Object value) { + throw new UnsupportedOperationException(); + } + + @Override + public boolean replace(K key, V oldValue, V newValue) { + throw new UnsupportedOperationException(); + } + + @Override + public V replace(K key, V value) { + throw new UnsupportedOperationException(); + } + + @Override + public V computeIfAbsent(K key, + Function mappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V computeIfPresent(K key, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V compute(K key, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } + + @Override + public V merge(K key, V value, + BiFunction remappingFunction) { + throw new UnsupportedOperationException(); + } } // Miscellaneous diff --git a/jdk/src/share/classes/java/util/HashMap.java b/jdk/src/share/classes/java/util/HashMap.java index d1ac0cf16fe..b40c5c92ffa 100644 --- a/jdk/src/share/classes/java/util/HashMap.java +++ b/jdk/src/share/classes/java/util/HashMap.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,11 @@ */ package java.util; + import java.io.*; +import java.util.function.Consumer; +import java.util.function.BiFunction; +import java.util.function.Function; /** * Hash table based implementation of the Map interface. This @@ -376,6 +380,13 @@ public class HashMap return null == entry ? null : entry.getValue(); } + @Override + public V getOrDefault(Object key, V defaultValue) { + Entry entry = getEntry(key); + + return (entry == null) ? defaultValue : entry.getValue(); + } + /** * Returns true if this map contains a mapping for the * specified key. @@ -603,6 +614,261 @@ public class HashMap return (e == null ? null : e.value); } + // optimized implementations of default methods in Map + + @Override + public V putIfAbsent(K key, V value) { + if (table == EMPTY_TABLE) { + inflateTable(threshold); + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry e = (Entry)table[i]; + for(; e != null; e = e.next) { + if (e.hash == hash && Objects.equals(e.key, key)) { + if(e.value != null) { + return e.value; + } + e.value = value; + modCount++; + e.recordAccess(this); + return null; + } + } + + modCount++; + addEntry(hash, key, value, i); + return null; + } + + @Override + public boolean remove(Object key, Object value) { + if (isEmpty()) { + return false; + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry prev = (Entry)table[i]; + Entry e = prev; + + while (e != null) { + Entry next = e.next; + if (e.hash == hash && Objects.equals(e.key, key)) { + if (!Objects.equals(e.value, value)) { + return false; + } + modCount++; + size--; + if (prev == e) + table[i] = next; + else + prev.next = next; + e.recordRemoval(this); + return true; + } + prev = e; + e = next; + } + + return false; + } + + @Override + public boolean replace(K key, V oldValue, V newValue) { + if (isEmpty()) { + return false; + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry e = (Entry)table[i]; + for (; e != null; e = e.next) { + if (e.hash == hash && Objects.equals(e.key, key) && Objects.equals(e.value, oldValue)) { + e.value = newValue; + e.recordAccess(this); + return true; + } + } + + return false; + } + + @Override + public V replace(K key, V value) { + if (isEmpty()) { + return null; + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry e = (Entry)table[i]; + for (; e != null; e = e.next) { + if (e.hash == hash && Objects.equals(e.key, key)) { + V oldValue = e.value; + e.value = value; + e.recordAccess(this); + return oldValue; + } + } + + return null; + } + + @Override + public V computeIfAbsent(K key, Function mappingFunction) { + if (table == EMPTY_TABLE) { + inflateTable(threshold); + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry e = (Entry)table[i]; + for (; e != null; e = e.next) { + if (e.hash == hash && Objects.equals(e.key, key)) { + V oldValue = e.value; + return oldValue == null ? (e.value = mappingFunction.apply(key)) : oldValue; + } + } + + V newValue = mappingFunction.apply(key); + if (newValue != null) { + modCount++; + addEntry(hash, key, newValue, i); + } + + return newValue; + } + + @Override + public V computeIfPresent(K key, BiFunction remappingFunction) { + if (isEmpty()) { + return null; + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry prev = (Entry)table[i]; + Entry e = prev; + + while (e != null) { + Entry next = e.next; + if (e.hash == hash && Objects.equals(e.key, key)) { + V oldValue = e.value; + if (oldValue == null) + break; + V newValue = remappingFunction.apply(key, oldValue); + modCount++; + if (newValue == null) { + size--; + if (prev == e) + table[i] = next; + else + prev.next = next; + e.recordRemoval(this); + } else { + e.value = newValue; + e.recordAccess(this); + } + return newValue; + } + prev = e; + e = next; + } + + return null; + } + + @Override + public V compute(K key, BiFunction remappingFunction) { + if (table == EMPTY_TABLE) { + inflateTable(threshold); + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry prev = (Entry)table[i]; + Entry e = prev; + + while (e != null) { + Entry next = e.next; + if (e.hash == hash && Objects.equals(e.key, key)) { + V oldValue = e.value; + V newValue = remappingFunction.apply(key, oldValue); + if (newValue != oldValue) { + modCount++; + if (newValue == null) { + size--; + if (prev == e) + table[i] = next; + else + prev.next = next; + e.recordRemoval(this); + } else { + e.value = newValue; + e.recordAccess(this); + } + } + return newValue; + } + prev = e; + e = next; + } + + V newValue = remappingFunction.apply(key, null); + if (newValue != null) { + modCount++; + addEntry(hash, key, newValue, i); + } + + return newValue; + } + + @Override + public V merge(K key, V value, BiFunction remappingFunction) { + if (table == EMPTY_TABLE) { + inflateTable(threshold); + } + int hash = (key == null) ? 0 : hash(key); + int i = indexFor(hash, table.length); + @SuppressWarnings("unchecked") + Entry prev = (Entry)table[i]; + Entry e = prev; + + while (e != null) { + Entry next = e.next; + if (e.hash == hash && Objects.equals(e.key, key)) { + V oldValue = e.value; + V newValue = remappingFunction.apply(oldValue, value); + modCount++; + if (newValue == null) { + size--; + if (prev == e) + table[i] = next; + else + prev.next = next; + e.recordRemoval(this); + } else { + e.value = newValue; + e.recordAccess(this); + } + return newValue; + } + prev = e; + e = next; + } + + if (value != null) { + modCount++; + addEntry(hash, key, value, i); + } + + return value; + } + + // end of optimized implementations of default methods in Map + /** * Removes and returns the entry associated with the specified key * in the HashMap. Returns null if the HashMap contains no mapping @@ -697,8 +963,8 @@ public class HashMap return containsNullValue(); Entry[] tab = table; - for (int i = 0; i < tab.length ; i++) - for (Entry e = tab[i] ; e != null ; e = e.next) + for (int i = 0; i < tab.length; i++) + for (Entry e = tab[i]; e != null; e = e.next) if (value.equals(e.value)) return true; return false; @@ -709,8 +975,8 @@ public class HashMap */ private boolean containsNullValue() { Entry[] tab = table; - for (int i = 0; i < tab.length ; i++) - for (Entry e = tab[i] ; e != null ; e = e.next) + for (int i = 0; i < tab.length; i++) + for (Entry e = tab[i]; e != null; e = e.next) if (e.value == null) return true; return false; diff --git a/jdk/src/share/classes/java/util/Hashtable.java b/jdk/src/share/classes/java/util/Hashtable.java index f973c3ac718..1e38fcaa43b 100644 --- a/jdk/src/share/classes/java/util/Hashtable.java +++ b/jdk/src/share/classes/java/util/Hashtable.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,7 +24,11 @@ */ package java.util; + import java.io.*; +import java.util.function.BiConsumer; +import java.util.function.Function; +import java.util.function.BiFunction; /** * This class implements a hash table, which maps keys to values. Any @@ -455,6 +459,26 @@ public class Hashtable } } + private void addEntry(int hash, K key, V value, int index) { + modCount++; + + Entry tab[] = table; + if (count >= threshold) { + // Rehash the table if the threshold is exceeded + rehash(); + + tab = table; + hash = hash(key); + index = (hash & 0x7FFFFFFF) % tab.length; + } + + // Creates the new entry. + @SuppressWarnings("unchecked") + Entry e = (Entry) tab[index]; + tab[index] = new Entry<>(hash, key, value, e); + count++; + } + /** * Maps the specified key to the specified * value in this hashtable. Neither the key nor the @@ -492,21 +516,7 @@ public class Hashtable } } - modCount++; - if (count >= threshold) { - // Rehash the table if the threshold is exceeded - rehash(); - - tab = table; - hash = hash(key); - index = (hash & 0x7FFFFFFF) % tab.length; - } - - // Creates the new entry. - @SuppressWarnings("unchecked") - Entry e = (Entry)tab[index]; - tab[index] = new Entry<>(hash, key, value, e); - count++; + addEntry(hash, key, value, index); return null; } @@ -892,6 +902,239 @@ public class Hashtable return h; } + @Override + public synchronized V getOrDefault(Object key, V defaultValue) { + V result = get(key); + return (null == result) ? defaultValue : result; + } + + @Override + public synchronized void forEach(BiConsumer action) { + Objects.requireNonNull(action); // explicit check required in case + // table is empty. + Entry[] tab = table; + for (Entry entry : tab) { + while (entry != null) { + action.accept((K)entry.key, (V)entry.value); + entry = entry.next; + } + } + } + + @Override + public synchronized void replaceAll( + BiFunction function) { + Map.super.replaceAll(function); + } + + @Override + public synchronized V putIfAbsent(K key, V value) { + Objects.requireNonNull(value); + + // Makes sure the key is not already in the hashtable. + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry entry = (Entry)tab[index]; + for (; entry != null; entry = entry.next) { + if ((entry.hash == hash) && entry.key.equals(key)) { + V old = entry.value; + if (old == null) { + entry.value = value; + } + return old; + } + } + + addEntry(hash, key, value, index); + return null; + } + + @Override + public synchronized boolean remove(Object key, Object value) { + Objects.requireNonNull(value); + + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (Entry prev = null; e != null; prev = e, e = e.next) { + if ((e.hash == hash) && e.key.equals(key) && e.value.equals(value)) { + modCount++; + if (prev != null) { + prev.next = e.next; + } else { + tab[index] = e.next; + } + count--; + e.value = null; + return true; + } + } + return false; + } + + @Override + public synchronized boolean replace(K key, V oldValue, V newValue) { + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (; e != null; e = e.next) { + if ((e.hash == hash) && e.key.equals(key)) { + if (e.value.equals(oldValue)) { + e.value = newValue; + return true; + } else { + return false; + } + } + } + return false; + } + + @Override + public synchronized V replace(K key, V value) { + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (; e != null; e = e.next) { + if ((e.hash == hash) && e.key.equals(key)) { + V oldValue = e.value; + e.value = value; + return oldValue; + } + } + return null; + } + + @Override + public synchronized V computeIfAbsent(K key, Function mappingFunction) { + Objects.requireNonNull(mappingFunction); + + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (; e != null; e = e.next) { + if (e.hash == hash && e.key.equals(key)) { + // Hashtable not accept null value + return e.value; + } + } + + V newValue = mappingFunction.apply(key); + if (newValue != null) { + addEntry(hash, key, newValue, index); + } + + return newValue; + } + + @Override + public V computeIfPresent(K key, BiFunction remappingFunction) { + Objects.requireNonNull(remappingFunction); + + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (Entry prev = null; e != null; prev = e, e = e.next) { + if (e.hash == hash && e.key.equals(key)) { + V newValue = remappingFunction.apply(key, e.value); + if (newValue == null) { + modCount++; + if (prev != null) { + prev.next = e.next; + } else { + tab[index] = e.next; + } + count--; + } else { + e.value = newValue; + } + return newValue; + } + } + return null; + } + + @Override + public V compute(K key, BiFunction remappingFunction) { + Objects.requireNonNull(remappingFunction); + + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (Entry prev = null; e != null; prev = e, e = e.next) { + if (e.hash == hash && Objects.equals(e.key, key)) { + V newValue = remappingFunction.apply(key, e.value); + if (newValue == null) { + modCount++; + if (prev != null) { + prev.next = e.next; + } else { + tab[index] = e.next; + } + count--; + } else { + e.value = newValue; + } + return newValue; + } + } + + V newValue = remappingFunction.apply(key, null); + if (newValue != null) { + addEntry(hash, key, newValue, index); + } + + return newValue; + } + + @Override + public V merge(K key, V value, BiFunction remappingFunction) { + Objects.requireNonNull(remappingFunction); + + Entry tab[] = table; + int hash = hash(key); + int index = (hash & 0x7FFFFFFF) % tab.length; + @SuppressWarnings("unchecked") + Entry e = (Entry)tab[index]; + for (Entry prev = null; e != null; prev = e, e = e.next) { + if (e.hash == hash && e.key.equals(key)) { + V newValue = remappingFunction.apply(e.value, value); + if (newValue == null) { + modCount++; + if (prev != null) { + prev.next = e.next; + } else { + tab[index] = e.next; + } + count--; + } else { + e.value = newValue; + } + return newValue; + } + } + + if (value != null) { + addEntry(hash, key, value, index); + } + + return value; + } + /** * Save the state of the Hashtable to a stream (i.e., serialize it). * diff --git a/jdk/src/share/classes/java/util/Map.java b/jdk/src/share/classes/java/util/Map.java index 6615f56daa0..acb595d8f07 100644 --- a/jdk/src/share/classes/java/util/Map.java +++ b/jdk/src/share/classes/java/util/Map.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,6 +25,10 @@ package java.util; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Function; + /** * An object that maps keys to values. A map cannot contain duplicate keys; * each key can map to at most one value. @@ -475,4 +479,613 @@ public interface Map { */ int hashCode(); + // Defaultable methods + + /** + * Returns the value to which the specified key is mapped, + * or {@code defaultValue} if this map contains no mapping + * for the key. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @param key the key whose associated value is to be returned + * @return the value to which the specified key is mapped, or + * {@code defaultValue} if this map contains no mapping for the key + * @throws ClassCastException if the key is of an inappropriate type for + * this map + * (optional) + * @throws NullPointerException if the specified key is null and this map + * does not permit null keys + * (optional) + */ + default V getOrDefault(Object key, V defaultValue) { + V v; + return (((v = get(key)) != null) || containsKey(key)) + ? v + : defaultValue; + } + + /** + * Performs the given action on each entry in this map, in the order entries + * are returned by an entry set iterator (which may be unspecified), until + * all entries have been processed or the action throws an {@code Exception}. + * Exceptions thrown by the action are relayed to the caller. + * + *

      The default implementation should be overridden by implementations if + * they can provide a more performant implementation than an iterator-based + * one. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @implSpec The default implementation is equivalent to, for this + * {@code map}: + *

       {@code
      +     * for ((Map.Entry entry : map.entrySet())
      +     *     action.accept(entry.getKey(), entry.getValue());
      +     * }
      + * + * @param action The action to be performed for each entry + * @throws NullPointerException if the specified action is null + * @throws ConcurrentModificationException if an entry is found to be + * removed during iteration + * @since 1.8 + */ + default void forEach(BiConsumer action) { + Objects.requireNonNull(action); + for (Map.Entry entry : entrySet()) { + K k; + V v; + try { + k = entry.getKey(); + v = entry.getValue(); + } catch(IllegalStateException ise) { + throw new ConcurrentModificationException(ise); + } + action.accept(k, v); + } + } + + /** + * Replaces each entry's value with the result of invoking the given + * function on that entry, in the order entries are returned by an entry + * set iterator, until all entries have been processed or the function + * throws an exception. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @implSpec + *

      The default implementation is equivalent to, for this {@code map}: + *

       {@code
      +     * for ((Map.Entry entry : map.entrySet())
      +     *     entry.setValue(function.apply(entry.getKey(), entry.getValue()));
      +     * }
      + * + * @param function the function to apply to each entry + * @throws UnsupportedOperationException if the {@code set} operation + * is not supported by this map's entry set iterator. + * @throws ClassCastException if the class of a replacement value + * prevents it from being stored in this map + * @throws NullPointerException if the specified function is null, or the + * specified replacement value is null, and this map does not permit null + * values + * @throws ClassCastException if a replacement value is of an inappropriate + * type for this map + * (optional) + * @throws NullPointerException if function or a replacement value is null, + * and this map does not permit null keys or values + * (optional) + * @throws IllegalArgumentException if some property of a replacement value + * prevents it from being stored in this map + * (optional) + * @throws ConcurrentModificationException if an entry is found to be + * removed during iteration + * @since 1.8 + */ + default void replaceAll(BiFunction function) { + Objects.requireNonNull(function); + for (Map.Entry entry : entrySet()) { + K k; + V v; + try { + k = entry.getKey(); + v = entry.getValue(); + } catch(IllegalStateException ise) { + throw new ConcurrentModificationException(ise); + } + entry.setValue(function.apply(k, v)); + } + } + + /** + * If the specified key is not already associated with a value (or is mapped + * to {@code null}) associates it with the given value and returns + * {@code null}, else returns the current value. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @implSpec + * The default implementation is equivalent to, for this {@code + * map}: + * + *

       {@code
      +     * if (map.get(key) == null)
      +     *     return map.put(key, value);
      +     * else
      +     *     return map.get(key);
      +     * }
      + * + * @param key key with which the specified value is to be associated + * @param value value to be associated with the specified key + * @return the previous value associated with the specified key, or + * {@code 1} if there was no mapping for the key. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with the key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the key or value is of an inappropriate + * type for this map + * (optional) + * @throws NullPointerException if the specified key or value is null, + * and this map does not permit null keys or values + * (optional) + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * (optional) + * @throws ConcurrentModificationException if a modification of the map is + * detected during insertion of the value. + * @since 1.8 + */ + default V putIfAbsent(K key, V value) { + V v = get(key); + if (v == null) { + if (put(key, value) != null) { + throw new ConcurrentModificationException(); + } + } + + return v; + } + + /** + * Removes the entry for the specified key only if it is currently + * mapped to the specified value. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @implSpec + * The default implementation is equivalent to, for this {@code map}: + * + *

       {@code
      +     * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
      +     *     map.remove(key);
      +     *     return true;
      +     * } else
      +     *     return false;
      +     * }
      + * + * @param key key with which the specified value is associated + * @param value value expected to be associated with the specified key + * @return {@code true} if the value was removed + * @throws UnsupportedOperationException if the {@code remove} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the key or value is of an inappropriate + * type for this map + * (optional) + * @throws NullPointerException if the specified key or value is null, + * and this map does not permit null keys or values + * (optional) + * @since 1.8 + */ + default boolean remove(Object key, Object value) { + Object curValue = get(key); + if (!Objects.equals(curValue, value) || + (curValue == null && !containsKey(key))) { + return false; + } + remove(key); + return true; + } + + /** + * Replaces the entry for the specified key only if currently + * mapped to the specified value. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @implSpec + * The default implementation is equivalent to, for this {@code map}: + * + *

       {@code
      +     * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
      +     *     map.put(key, newValue);
      +     *     return true;
      +     * } else
      +     *     return false;
      +     * }
      + * + * @param key key with which the specified value is associated + * @param oldValue value expected to be associated with the specified key + * @param newValue value to be associated with the specified key + * @return {@code true} if the value was replaced + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the class of a specified key or value + * prevents it from being stored in this map + * @throws NullPointerException if a specified key or value is null, + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of a specified key + * or value prevents it from being stored in this map + * @since 1.8 + */ + default boolean replace(K key, V oldValue, V newValue) { + Object curValue = get(key); + if (!Objects.equals(curValue, oldValue) || + (curValue == null && !containsKey(key))) { + return false; + } + put(key, newValue); + return true; + } + + /** + * Replaces the entry for the specified key only if it is + * currently mapped to some value. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. + * + * @implSpec + * The default implementation is equivalent to, for this {@code map}: + * + *

       {@code
      +     * if (map.containsKey(key)) {
      +     *     return map.put(key, value);
      +     * } else
      +     *     return null;
      +     * }
      + * + * @param key key with which the specified value is associated + * @param value value to be associated with the specified key + * @return the previous value associated with the specified key, or + * {@code null} if there was no mapping for the key. + * (A {@code null} return can also indicate that the map + * previously associated {@code null} with the key, + * if the implementation supports null values.) + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * (optional) + * @throws NullPointerException if the specified key or value is null, + * and this map does not permit null keys or values + * @throws IllegalArgumentException if some property of the specified key + * or value prevents it from being stored in this map + * @since 1.8 + */ + default V replace(K key, V value) { + return containsKey(key) ? put(key, value) : null; + } + + /** + * If the specified key is not already associated with a value (or + * is mapped to {@code null}), attempts to compute its value using + * the given mapping function and enters it into this map unless + * {@code null}. + * + *

      If the function returns {@code null} no mapping is recorded. If + * the function itself throws an (unchecked) exception, the + * exception is rethrown, and no mapping is recorded. The most + * common usage is to construct a new object serving as an initial + * mapped value or memoized result, as in: + * + *

       {@code
      +     * map.computeIfAbsent(key, k -> new Value(f(k)));
      +     * }
      + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. In particular, all implementations of + * subinterface {@link java.util.concurrent.ConcurrentMap} must document + * whether the function is applied once atomically only if the value is not + * present. Any class that permits null values must document + * whether and how this method distinguishes absence from null mappings. + * + * @implSpec + * The default implementation is equivalent to the following + * steps for this {@code map}, then returning the current value or + * {@code null} if now absent: + * + *

       {@code
      +     * if (map.get(key) == null) {
      +     *     V newValue = mappingFunction.apply(key);
      +     *     if (newValue != null)
      +     *         map.putIfAbsent(key, newValue);
      +     * }
      +     * }
      + * + * @param key key with which the specified value is to be associated + * @param mappingFunction the function to compute a value + * @return the current (existing or computed) value associated with + * the specified key, or null if the computed value is null + * @throws NullPointerException if the specified key is null and + * this map does not support null keys, or the + * mappingFunction is null + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * (optional) + * @since 1.8 + */ + default V computeIfAbsent(K key, + Function mappingFunction) { + V v, newValue; + return ((v = get(key)) == null && + (newValue = mappingFunction.apply(key)) != null && + (v = putIfAbsent(key, newValue)) == null) ? newValue : v; + } + + /** + * If the value for the specified key is present and non-null, attempts to + * compute a new mapping given the key and its current mapped value. + * + *

      If the function returns {@code null}, the mapping is removed. If the + * function itself throws an (unchecked) exception, the exception is + * rethrown, and the current mapping is left unchanged. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. In particular, all implementations of + * subinterface {@link java.util.concurrent.ConcurrentMap} must document + * whether the function is applied once atomically only if the value is not + * present. Any class that permits null values must document + * whether and how this method distinguishes absence from null mappings. + * + * @implSpec + * The default implementation is equivalent to performing the + * following steps for this {@code map}, then returning the + * current value or {@code null} if now absent: + * + *

       {@code
      +     * if (map.get(key) != null) {
      +     *     V oldValue = map.get(key);
      +     *     V newValue = remappingFunction.apply(key, oldValue);
      +     *     if (newValue != null)
      +     *         map.replace(key, oldValue, newValue);
      +     *     else
      +     *         map.remove(key, oldValue);
      +     * }
      +     * }
      + * + * In concurrent contexts, the default implementation may retry + * these steps when multiple threads attempt updates. + * + * @param key key with which the specified value is to be associated + * @param remappingFunction the function to compute a value + * @return the new value associated with the specified key, or null if none + * @throws NullPointerException if the specified key is null and + * this map does not support null keys, or the + * remappingFunction is null + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * (optional) + * @since 1.8 + */ + default V computeIfPresent(K key, + BiFunction remappingFunction) { + V oldValue; + while ((oldValue = get(key)) != null) { + V newValue = remappingFunction.apply(key, oldValue); + if (newValue != null) { + if (replace(key, oldValue, newValue)) + return newValue; + } else if (remove(key, oldValue)) + return null; + } + return oldValue; + } + + /** + * Attempts to compute a mapping for the specified key and its + * current mapped value (or {@code null} if there is no current + * mapping). For example, to either create or append a {@code + * String msg} to a value mapping: + * + *
       {@code
      +     * map.compute(key, (k, v) -> (v == null) ? msg : v.concat(msg))}
      + * (Method {@link #merge merge()} is often simpler to use for such purposes.) + * + *

      If the function returns {@code null}, the mapping is removed (or + * remains absent if initially absent). If the function itself throws an + * (unchecked) exception, the exception is rethrown, and the current mapping + * is left unchanged. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. In particular, all implementations of + * subinterface {@link java.util.concurrent.ConcurrentMap} must document + * whether the function is applied once atomically only if the value is not + * present. Any class that permits null values must document + * whether and how this method distinguishes absence from null mappings. + * + * @implSpec + * The default implementation is equivalent to performing the following + * steps for this {@code map}, then returning the current value or + * {@code null} if absent: + * + *

       {@code
      +     * V oldValue = map.get(key);
      +     * V newValue = remappingFunction.apply(key, oldValue);
      +     * if (oldValue != null ) {
      +     *    if (newValue != null)
      +     *       map.replace(key, oldValue, newValue);
      +     *    else
      +     *       map.remove(key, oldValue);
      +     * } else {
      +     *    if (newValue != null)
      +     *       map.putIfAbsent(key, newValue);
      +     *    else
      +     *       return null;
      +     * }
      +     * }
      + * + * In concurrent contexts, the default implementation may retry + * these steps when multiple threads attempt updates. + * + * @param key key with which the specified value is to be associated + * @param remappingFunction the function to compute a value + * @return the new value associated with the specified key, or null if none + * @throws NullPointerException if the specified key is null and + * this map does not support null keys, or the + * remappingFunction is null + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * (optional) + * @since 1.8 + */ + default V compute(K key, + BiFunction remappingFunction) { + V oldValue = get(key); + for (;;) { + V newValue = remappingFunction.apply(key, oldValue); + if (oldValue != null) { + if (newValue != null) { + if (replace(key, oldValue, newValue)) + return newValue; + } else if (remove(key, oldValue)) { + return null; + } + oldValue = get(key); + } else { + if (newValue != null) { + if ((oldValue = putIfAbsent(key, newValue)) == null) + return newValue; + } else { + return null; + } + } + } + } + + /** + * If the specified key is not already associated with a value or is + * associated with null, associates it with the given value. + * Otherwise, replaces the value with the results of the given + * remapping function, or removes if the result is {@code null}. This + * method may be of use when combining multiple mapped values for a key. + * For example, to either create or append a {@code String msg} to a + * value mapping: + * + *
       {@code
      +     * map.merge(key, msg, String::concat)
      +     * }
      + * + *

      If the function returns {@code null}, the mapping is removed (or + * remains absent if initially absent). If the function itself throws an + * (unchecked) exception, the exception is rethrown, and the current mapping + * is left unchanged. + * + *

      The default implementation makes no guarantees about synchronization + * or atomicity properties of this method. Any implementation providing + * atomicity guarantees must override this method and document its + * concurrency properties. In particular, all implementations of + * subinterface {@link java.util.concurrent.ConcurrentMap} must document + * whether the function is applied once atomically only if the value is not + * present. Any class that permits null values must document + * whether and how this method distinguishes absence from null mappings. + * + * @implSpec + * The default implementation is equivalent to performing the + * following steps for this {@code map}, then returning the + * current value or {@code null} if absent: + * + *

       {@code
      +     * V oldValue = map.get(key);
      +     * V newValue = (oldValue == null) ? value :
      +     *              remappingFunction.apply(oldValue, value);
      +     * if (newValue == null)
      +     *     map.remove(key, oldValue);
      +     * else if (oldValue == null)
      +     *     map.putIfAbsent(key, newValue);
      +     * else
      +     *     map.replace(key, oldValue, newValue);
      +     * }
      + * + * In concurrent contexts, the default implementation may retry + * these steps when multiple threads attempt updates. + * + * @param key key with which the specified value is to be associated + * @param value the value to use if absent + * @param remappingFunction the function to recompute a value if present + * @return the new value associated with the specified key, or null if none + * @throws UnsupportedOperationException if the {@code put} operation + * is not supported by this map + * (optional) + * @throws ClassCastException if the class of the specified key or value + * prevents it from being stored in this map + * (optional) + * @throws NullPointerException if the specified key is null and + * this map does not support null keys, or the + * remappingFunction is null + * @since 1.8 + */ + default V merge(K key, V value, + BiFunction remappingFunction) { + V oldValue = get(key); + for (;;) { + if (oldValue != null) { + V newValue = remappingFunction.apply(oldValue, value); + if (newValue != null) { + if (replace(key, oldValue, newValue)) + return newValue; + } else if (remove(key, oldValue)) { + return null; + } + oldValue = get(key); + } else { + if (value == null) { + return null; + } + + if ((oldValue = putIfAbsent(key, value)) == null) { + return value; + } + } + } + } } diff --git a/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java b/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java index a725db6e674..fee5689db89 100644 --- a/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java +++ b/jdk/src/share/classes/java/util/concurrent/ConcurrentMap.java @@ -38,7 +38,7 @@ import java.util.Map; /** * A {@link java.util.Map} providing additional atomic - * putIfAbsent, remove, and replace methods. + * {@code putIfAbsent}, {@code remove}, and {@code replace} methods. * *

      Memory consistency effects: As with other concurrent * collections, actions in a thread prior to placing an object into a @@ -57,6 +57,21 @@ import java.util.Map; * @param the type of mapped values */ public interface ConcurrentMap extends Map { + + /** + * {@inheritDoc} + * + * @implNote This implementation assumes that the ConcurrentMap cannot + * contain null values and get() returning null unambiguously means the key + * is absent. Implementations which support null values must override this + * default implementation. + */ + @Override + default V getOrDefault(Object key, V defaultValue) { + V v; + return ((v = get(key)) != null) ? v : defaultValue; + } + /** * If the specified key is not already associated * with a value, associate it with the given value. @@ -91,7 +106,7 @@ public interface ConcurrentMap extends Map { * Removes the entry for a key only if currently mapped to a given value. * This is equivalent to *

       {@code
      -     * if (map.containsKey(key) && map.get(key).equals(value)) {
      +     * if (map.containsKey(key) && Objects.equals(map.get(key), value)) {
            *   map.remove(key);
            *   return true;
            * } else
      @@ -101,8 +116,8 @@ public interface ConcurrentMap extends Map {
            *
            * @param key key with which the specified value is associated
            * @param value value expected to be associated with the specified key
      -     * @return true if the value was removed
      -     * @throws UnsupportedOperationException if the remove operation
      +     * @return {@code true} if the value was removed
      +     * @throws UnsupportedOperationException if the {@code remove} operation
            *         is not supported by this map
            * @throws ClassCastException if the key or value is of an inappropriate
            *         type for this map
      @@ -117,7 +132,7 @@ public interface ConcurrentMap extends Map {
            * Replaces the entry for a key only if currently mapped to a given value.
            * This is equivalent to
            *  
       {@code
      -     * if (map.containsKey(key) && map.get(key).equals(oldValue)) {
      +     * if (map.containsKey(key) && Objects.equals(map.get(key), oldValue)) {
            *   map.put(key, newValue);
            *   return true;
            * } else
      @@ -128,8 +143,8 @@ public interface ConcurrentMap extends Map {
            * @param key key with which the specified value is associated
            * @param oldValue value expected to be associated with the specified key
            * @param newValue value to be associated with the specified key
      -     * @return true if the value was replaced
      -     * @throws UnsupportedOperationException if the put operation
      +     * @return {@code true} if the value was replaced
      +     * @throws UnsupportedOperationException if the {@code put} operation
            *         is not supported by this map
            * @throws ClassCastException if the class of a specified key or value
            *         prevents it from being stored in this map
      @@ -154,11 +169,11 @@ public interface ConcurrentMap extends Map {
            * @param key key with which the specified value is associated
            * @param value value to be associated with the specified key
            * @return the previous value associated with the specified key, or
      -     *         null if there was no mapping for the key.
      -     *         (A null return can also indicate that the map
      -     *         previously associated null with the key,
      +     *         {@code null} if there was no mapping for the key.
      +     *         (A {@code null} return can also indicate that the map
      +     *         previously associated {@code null} with the key,
            *         if the implementation supports null values.)
      -     * @throws UnsupportedOperationException if the put operation
      +     * @throws UnsupportedOperationException if the {@code put} operation
            *         is not supported by this map
            * @throws ClassCastException if the class of the specified key or value
            *         prevents it from being stored in this map
      diff --git a/jdk/test/java/util/Map/Defaults.java b/jdk/test/java/util/Map/Defaults.java
      new file mode 100644
      index 00000000000..92a2cb30b69
      --- /dev/null
      +++ b/jdk/test/java/util/Map/Defaults.java
      @@ -0,0 +1,594 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +/*
      + * @test
      + * @bug 8010122 8004518
      + * @summary Test Map default methods
      + * @author Mike Duigou
      + * @run testng Defaults
      + */
      +import java.util.AbstractMap;
      +import java.util.AbstractSet;
      +import java.util.ArrayList;
      +import java.util.Arrays;
      +import java.util.Collection;
      +import java.util.Collections;
      +import java.util.EnumMap;
      +import java.util.HashMap;
      +import java.util.Hashtable;
      +import java.util.IdentityHashMap;
      +import java.util.Iterator;
      +import java.util.LinkedHashMap;
      +import java.util.Map;
      +import java.util.TreeMap;
      +import java.util.Set;
      +import java.util.WeakHashMap;
      +import java.util.concurrent.ConcurrentMap;
      +import java.util.concurrent.ConcurrentHashMap;
      +import java.util.concurrent.ConcurrentSkipListMap;
      +import java.util.function.Supplier;
      +
      +import org.testng.annotations.Test;
      +import org.testng.annotations.DataProvider;
      +import static org.testng.Assert.fail;
      +import static org.testng.Assert.assertEquals;
      +import static org.testng.Assert.assertTrue;
      +import static org.testng.Assert.assertFalse;
      +import static org.testng.Assert.assertNull;
      +import static org.testng.Assert.assertSame;
      +
      +public class Defaults {
      +
      +    @Test(dataProvider = "Nulls Map")
      +    public void testGetOrDefaultNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertSame(map.get(null), map.getOrDefault(null, EXTRA_VALUE), "values should match");
      +    }
      +
      +    @Test(dataProvider = "Map")
      +    public void testGetOrDefault(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]), "expected key missing");
      +        assertSame(map.get(KEYS[1]), map.getOrDefault(KEYS[1], EXTRA_VALUE), "values should match");
      +        assertFalse(map.containsKey(EXTRA_KEY), "expected absent key");
      +        assertSame(map.getOrDefault(EXTRA_KEY, EXTRA_VALUE), EXTRA_VALUE, "value not returned as default");
      +        assertNull(map.getOrDefault(EXTRA_KEY, null), "null not returned as default");
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testPutIfAbsentNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertNull(map.putIfAbsent(null, EXTRA_VALUE), "previous not null");
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertSame(map.get(null), EXTRA_VALUE, "unexpected value");
      +        assertSame(map.putIfAbsent(null, null), EXTRA_VALUE, "previous not expected value");
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertSame(map.get(null), EXTRA_VALUE, "unexpected value");
      +        assertSame(map.remove(null), EXTRA_VALUE, "removed unexpected value");
      +
      +        assertFalse(map.containsKey(null), description + ": key present after remove");
      +        assertNull(map.putIfAbsent(null, null), "previous not null");
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertNull(map.putIfAbsent(null, EXTRA_VALUE), "previous not null");
      +        assertSame(map.get(null), EXTRA_VALUE, "value not expected");
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testPutIfAbsent(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object expected = map.get(KEYS[1]);
      +        assertTrue(null == expected || expected == VALUES[1]);
      +        assertSame(map.putIfAbsent(KEYS[1], EXTRA_VALUE), expected);
      +        assertSame(map.get(KEYS[1]), expected);
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertSame(map.putIfAbsent(EXTRA_KEY, EXTRA_VALUE), null);
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +    }
      +
      +    @Test(dataProvider = "Nulls Map")
      +    public void testForEach(String description, Map map) {
      +        IntegerEnum[] EACH_KEY = new IntegerEnum[map.size()];
      +
      +        map.forEach((k, v) -> {
      +            int idx = (null == k) ? 0 : k.ordinal(); // substitute for index.
      +            assertNull(EACH_KEY[idx]);
      +            EACH_KEY[idx] = (idx == 0) ? KEYS[0] : k; // substitute for comparison.
      +            assertSame(v, map.get(k));
      +        });
      +
      +        assertEquals(KEYS, EACH_KEY);
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public static void testRemoveNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertFalse(map.remove(null, EXTRA_VALUE), description);
      +        assertTrue(map.containsKey(null));
      +        assertNull(map.get(null));
      +        assertTrue(map.remove(null, null));
      +        assertFalse(map.containsKey(null));
      +        assertNull(map.get(null));
      +        assertFalse(map.remove(null, null));
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public static void testRemove(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object expected = map.get(KEYS[1]);
      +        assertTrue(null == expected || expected == VALUES[1]);
      +        assertFalse(map.remove(KEYS[1], EXTRA_VALUE), description);
      +        assertSame(map.get(KEYS[1]), expected);
      +        assertTrue(map.remove(KEYS[1], expected));
      +        assertNull(map.get(KEYS[1]));
      +        assertFalse(map.remove(KEYS[1], expected));
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertFalse(map.remove(EXTRA_KEY, EXTRA_VALUE));
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testReplaceKVNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertSame(map.replace(null, EXTRA_VALUE), null);
      +        assertSame(map.get(null), EXTRA_VALUE);
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testReplaceKV(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object expected = map.get(KEYS[1]);
      +        assertTrue(null == expected || expected == VALUES[1]);
      +        assertSame(map.replace(KEYS[1], EXTRA_VALUE), expected);
      +        assertSame(map.get(KEYS[1]), EXTRA_VALUE);
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertNull(map.replace(EXTRA_KEY, EXTRA_VALUE));
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertNull(map.get(EXTRA_KEY));
      +        assertNull(map.put(EXTRA_KEY, EXTRA_VALUE));
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +        assertSame(map.replace(EXTRA_KEY, (String)expected), EXTRA_VALUE);
      +        assertSame(map.get(EXTRA_KEY), expected);
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testReplaceKVVNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertFalse(map.replace(null, EXTRA_VALUE, EXTRA_VALUE));
      +        assertNull(map.get(null));
      +        assertTrue(map.replace(null, null, EXTRA_VALUE));
      +        assertSame(map.get(null), EXTRA_VALUE);
      +        assertTrue(map.replace(null, EXTRA_VALUE, EXTRA_VALUE));
      +        assertSame(map.get(null), EXTRA_VALUE);
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testReplaceKVV(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object expected = map.get(KEYS[1]);
      +        assertTrue(null == expected || expected == VALUES[1]);
      +        assertFalse(map.replace(KEYS[1], EXTRA_VALUE, EXTRA_VALUE));
      +        assertSame(map.get(KEYS[1]), expected);
      +        assertTrue(map.replace(KEYS[1], (String)expected, EXTRA_VALUE));
      +        assertSame(map.get(KEYS[1]), EXTRA_VALUE);
      +        assertTrue(map.replace(KEYS[1], EXTRA_VALUE, EXTRA_VALUE));
      +        assertSame(map.get(KEYS[1]), EXTRA_VALUE);
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertFalse(map.replace(EXTRA_KEY, EXTRA_VALUE, EXTRA_VALUE));
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertNull(map.get(EXTRA_KEY));
      +        assertNull(map.put(EXTRA_KEY, EXTRA_VALUE));
      +        assertTrue(map.containsKey(EXTRA_KEY));
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +        assertTrue(map.replace(EXTRA_KEY, EXTRA_VALUE, EXTRA_VALUE));
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testComputeIfAbsentNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertSame(map.computeIfAbsent(null, (k) -> EXTRA_VALUE), EXTRA_VALUE, description);
      +        assertSame(map.get(null), EXTRA_VALUE, description);
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testComputeIfAbsent(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object expected = map.get(KEYS[1]);
      +        assertTrue(null == expected || expected == VALUES[1], description + String.valueOf(expected));
      +        expected = (null == expected) ? EXTRA_VALUE : expected;
      +        assertSame(map.computeIfAbsent(KEYS[1], (k) -> EXTRA_VALUE), expected, description);
      +        assertSame(map.get(KEYS[1]), expected, description);
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertSame(map.computeIfAbsent(EXTRA_KEY, (k) -> EXTRA_VALUE), EXTRA_VALUE);
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testComputeIfPresentNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null));
      +        assertNull(map.get(null));
      +        assertSame(map.computeIfPresent(null, (k, v) -> {
      +            fail();
      +            return EXTRA_VALUE;
      +        }), null, description);
      +        assertTrue(map.containsKey(null));
      +        assertSame(map.get(null), null, description);
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testComputeIfPresent(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object value = map.get(KEYS[1]);
      +        assertTrue(null == value || value == VALUES[1], description + String.valueOf(value));
      +        Object expected = (null == value) ? null : EXTRA_VALUE;
      +        assertSame(map.computeIfPresent(KEYS[1], (k, v) -> {
      +            assertSame(v, value);
      +            return EXTRA_VALUE;
      +        }), expected, description);
      +        assertSame(map.get(KEYS[1]), expected, description);
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertSame(map.computeIfPresent(EXTRA_KEY, (k, v) -> {
      +            fail();
      +            return EXTRA_VALUE;
      +        }), null);
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertSame(map.get(EXTRA_KEY), null);
      +    }
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testComputeNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertSame(map.compute(null, (k, v) -> {
      +            assertSame(k, null);
      +            assertNull(v);
      +            return EXTRA_VALUE;
      +        }), EXTRA_VALUE, description);
      +        assertTrue(map.containsKey(null));
      +        assertSame(map.get(null), EXTRA_VALUE, description);
      +        assertSame(map.remove(null), EXTRA_VALUE, "removed value not expected");
      +        assertFalse(map.containsKey(null), "null key present");
      +        assertSame(map.compute(null, (k, v) -> {
      +            assertSame(k, null);
      +            assertNull(v);
      +            return null;
      +        }), null, description);
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testCompute(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object value = map.get(KEYS[1]);
      +        assertTrue(null == value || value == VALUES[1], description + String.valueOf(value));
      +        assertSame(map.compute(KEYS[1], (k, v) -> {
      +            assertSame(k, KEYS[1]);
      +            assertSame(v, value);
      +            return EXTRA_VALUE;
      +        }), EXTRA_VALUE, description);
      +        assertSame(map.get(KEYS[1]), EXTRA_VALUE, description);
      +        assertNull(map.compute(KEYS[1], (k, v) -> {
      +            assertSame(v, EXTRA_VALUE);
      +            return null;
      +        }), description);
      +        assertFalse(map.containsKey(KEYS[1]));
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertSame(map.compute(EXTRA_KEY, (k, v) -> {
      +            assertNull(v);
      +            return EXTRA_VALUE;
      +        }), EXTRA_VALUE);
      +        assertTrue(map.containsKey(EXTRA_KEY));
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +    }
      +
      +
      +    @Test(dataProvider = "R/W Nulls Map")
      +    public void testMergeNulls(String description, Map map) {
      +        assertTrue(map.containsKey(null), "null key absent");
      +        assertNull(map.get(null), "value not null");
      +        assertSame(map.merge(null, EXTRA_VALUE, (v, vv) -> {
      +            assertNull(v);
      +            assertSame(vv, EXTRA_VALUE);
      +            return vv;
      +        }), EXTRA_VALUE, description);
      +        assertTrue(map.containsKey(null));
      +        assertSame(map.get(null), EXTRA_VALUE, description);
      +    }
      +
      +    @Test(dataProvider = "R/W Map")
      +    public void testMerge(String description, Map map) {
      +        assertTrue(map.containsKey(KEYS[1]));
      +        Object value = map.get(KEYS[1]);
      +        assertTrue(null == value || value == VALUES[1], description + String.valueOf(value));
      +        assertSame(map.merge(KEYS[1], EXTRA_VALUE, (v, vv) -> {
      +            assertSame(v, value);
      +            assertSame(vv, EXTRA_VALUE);
      +            return vv;
      +        }), EXTRA_VALUE, description);
      +        assertSame(map.get(KEYS[1]), EXTRA_VALUE, description);
      +        assertNull(map.merge(KEYS[1], EXTRA_VALUE, (v, vv) -> {
      +            assertSame(v, EXTRA_VALUE);
      +            assertSame(vv, EXTRA_VALUE);
      +            return null;
      +        }), description);
      +        assertFalse(map.containsKey(KEYS[1]));
      +
      +        assertFalse(map.containsKey(EXTRA_KEY));
      +        assertSame(map.merge(EXTRA_KEY, EXTRA_VALUE, (v, vv) -> {
      +            assertNull(v);
      +            assertSame(vv, EXTRA_VALUE);
      +            return EXTRA_VALUE;
      +        }), EXTRA_VALUE);
      +        assertTrue(map.containsKey(EXTRA_KEY));
      +        assertSame(map.get(EXTRA_KEY), EXTRA_VALUE);
      +    }
      +
      +    enum IntegerEnum {
      +
      +        e0, e1, e2, e3, e4, e5, e6, e7, e8, e9,
      +        e10, e11, e12, e13, e14, e15, e16, e17, e18, e19,
      +        e20, e21, e22, e23, e24, e25, e26, e27, e28, e29,
      +        e30, e31, e32, e33, e34, e35, e36, e37, e38, e39,
      +        e40, e41, e42, e43, e44, e45, e46, e47, e48, e49,
      +        e50, e51, e52, e53, e54, e55, e56, e57, e58, e59,
      +        e60, e61, e62, e63, e64, e65, e66, e67, e68, e69,
      +        e70, e71, e72, e73, e74, e75, e76, e77, e78, e79,
      +        e80, e81, e82, e83, e84, e85, e86, e87, e88, e89,
      +        e90, e91, e92, e93, e94, e95, e96, e97, e98, e99,
      +        EXTRA_KEY;
      +        public static final int SIZE = values().length;
      +    };
      +    private static final int TEST_SIZE = IntegerEnum.SIZE - 1;
      +    /**
      +     * Realized keys ensure that there is always a hard ref to all test objects.
      +     */
      +    private static final IntegerEnum[] KEYS = new IntegerEnum[TEST_SIZE];
      +    /**
      +     * Realized values ensure that there is always a hard ref to all test
      +     * objects.
      +     */
      +    private static final String[] VALUES = new String[TEST_SIZE];
      +
      +    static {
      +        IntegerEnum[] keys = IntegerEnum.values();
      +        for (int each = 0; each < TEST_SIZE; each++) {
      +            KEYS[each] = keys[each];
      +            VALUES[each] = String.valueOf(each);
      +        }
      +    }
      +    private static final IntegerEnum EXTRA_KEY = IntegerEnum.EXTRA_KEY;
      +    private static final String EXTRA_VALUE = String.valueOf(TEST_SIZE);
      +
      +    @DataProvider(name = "Map", parallel = true)
      +    public static Iterator allNullsMapProvider() {
      +        return makeAllMaps().iterator();
      +    }
      +
      +    @DataProvider(name = "Nulls Map", parallel = true)
      +    public static Iterator allMapProvider() {
      +        return makeRWMaps(true).iterator();
      +    }
      +
      +    @DataProvider(name = "R/W Map", parallel = true)
      +    public static Iterator rwMapProvider() {
      +        return makeRWMapsNoNulls().iterator();
      +    }
      +
      +    @DataProvider(name = "R/W Nulls Map", parallel = true)
      +    public static Iterator rwNullsMapProvider() {
      +        return makeRWMaps(true).iterator();
      +    }
      +
      +    private static Collection makeAllMapsNoNulls() {
      +        Collection all = new ArrayList<>();
      +
      +        all.addAll(makeRWMaps(false));
      +        all.addAll(makeRWNoNullsMaps());
      +        all.addAll(makeROMaps(false));
      +
      +        return all;
      +    }
      +
      +    private static Collection makeRWMapsNoNulls() {
      +        Collection all = new ArrayList<>();
      +
      +        all.addAll(makeRWMaps(false));
      +        all.addAll(makeRWNoNullsMaps());
      +
      +        return all;
      +    }
      +
      +    private static Collection makeAllMaps() {
      +        Collection all = new ArrayList<>();
      +
      +        all.addAll(makeROMaps(false));
      +        all.addAll(makeRWMaps(false));
      +        all.addAll(makeRWNoNullsMaps());
      +        all.addAll(makeRWMaps(true));
      +        all.addAll(makeROMaps(true));
      +
      +        return all;
      +    }
      +
      +    private static Collection makeAllRWMaps() {
      +        Collection all = new ArrayList<>();
      +
      +        all.addAll(makeRWMaps(false));
      +        all.addAll(makeRWNoNullsMaps());
      +        all.addAll(makeRWMaps(true));
      +
      +        return all;
      +    }
      +
      +    private static Collection makeRWMaps(boolean nulls) {
      +        return Arrays.asList(
      +            new Object[]{"HashMap", makeMap(HashMap::new, nulls)},
      +            new Object[]{"IdentityHashMap", makeMap(IdentityHashMap::new, nulls)},
      +            new Object[]{"LinkedHashMap", makeMap(LinkedHashMap::new, nulls)},
      +            new Object[]{"WeakHashMap", makeMap(WeakHashMap::new, nulls)},
      +            new Object[]{"Collections.checkedMap(HashMap)", Collections.checkedMap(makeMap(HashMap::new, nulls), IntegerEnum.class, String.class)},
      +            new Object[]{"Collections.synchronizedMap(HashMap)", Collections.synchronizedMap(makeMap(HashMap::new, nulls))},
      +            new Object[]{"ExtendsAbstractMap", makeMap(ExtendsAbstractMap::new, nulls)});
      +    }
      +
      +    private static Collection makeRWNoNullsMaps() {
      +        return Arrays.asList(
      +            // null hostile
      +            new Object[]{"EnumMap", makeMap(() -> new EnumMap(IntegerEnum.class), false)},
      +            new Object[]{"Hashtable", makeMap(Hashtable::new, false)},
      +            new Object[]{"TreeMap", makeMap(TreeMap::new, false)},
      +            new Object[]{"ConcurrentHashMap", makeMap(ConcurrentHashMap::new, false)},
      +            new Object[]{"ConcurrentSkipListMap", makeMap(ConcurrentSkipListMap::new, false)},
      +            new Object[]{"Collections.checkedMap(ConcurrentHashMap)", Collections.checkedMap(makeMap(ConcurrentHashMap::new, false), IntegerEnum.class, String.class)},
      +            new Object[]{"Collections.synchronizedMap(EnumMap)", Collections.synchronizedMap(makeMap(() -> new EnumMap(IntegerEnum.class), false))},
      +            new Object[]{"ImplementsConcurrentMap", makeMap(ImplementsConcurrentMap::new, false)});
      +    }
      +
      +    private static Collection makeROMaps(boolean nulls) {
      +        return Arrays.asList(new Object[][]{
      +            new Object[]{"Collections.unmodifiableMap(HashMap)", Collections.unmodifiableMap(makeMap(HashMap::new, nulls))}
      +        });
      +    }
      +
      +    private static Map makeMap(Supplier> supplier, boolean nulls) {
      +        Map result = supplier.get();
      +
      +        for (int each = 0; each < TEST_SIZE; each++) {
      +            if (nulls) {
      +                result.put((each == 0) ? null : KEYS[each], null);
      +            } else {
      +                result.put(KEYS[each], VALUES[each]);
      +            }
      +        }
      +
      +        return result;
      +    }
      +
      +    public interface Thrower {
      +
      +        public void run() throws T;
      +    }
      +
      +    public static  void assertThrows(Thrower thrower, Class throwable) {
      +        assertThrows(thrower, throwable, null);
      +    }
      +
      +    public static  void assertThrows(Thrower thrower, Class throwable, String message) {
      +        Throwable result;
      +        try {
      +            thrower.run();
      +            result = null;
      +        } catch (Throwable caught) {
      +            result = caught;
      +        }
      +
      +        assertInstance(result, throwable,
      +            (null != message)
      +            ? message
      +            : "Failed to throw " + throwable.getCanonicalName());
      +    }
      +
      +    public static  void assertInstance(T actual, Class expected) {
      +        assertInstance(expected.isInstance(actual), null);
      +    }
      +
      +    public static  void assertInstance(T actual, Class expected, String message) {
      +        assertTrue(expected.isInstance(actual), message);
      +    }
      +
      +    /**
      +     * A simple mutable map implementation that provides only default
      +     * implementations of all methods. ie. none of the Map interface default
      +     * methods have overridden implementations.
      +     *
      +     * @param  Type of keys
      +     * @param  Type of values
      +     */
      +    public static class ExtendsAbstractMap, K, V> extends AbstractMap {
      +
      +        protected final M map;
      +
      +        public ExtendsAbstractMap() { this( (M) new HashMap()); }
      +
      +        protected ExtendsAbstractMap(M map) { this.map = map; }
      +
      +        public Set> entrySet() {
      +            return new AbstractSet>() {
      +                public int size() {
      +                    return map.size();
      +                }
      +
      +                public Iterator> iterator() {
      +                    final Iterator> source = map.entrySet().iterator();
      +                    return new Iterator>() {
      +                       public boolean hasNext() { return source.hasNext(); }
      +                       public Map.Entry next() { return source.next(); }
      +                       public void remove() { source.remove(); }
      +                    };
      +                }
      +
      +                public boolean add(Map.Entry e) {
      +                    return map.entrySet().add(e);
      +                }
      +            };
      +        }
      +
      +        public V put(K key, V value) {
      +            return map.put(key, value);
      +        }
      +    }
      +
      +    /**
      +     * A simple mutable concurrent map implementation that provides only default
      +     * implementations of all methods. ie. none of the ConcurrentMap interface
      +     * default methods have overridden implementations.
      +     *
      +     * @param  Type of keys
      +     * @param  Type of values
      +     */
      +    public static class ImplementsConcurrentMap extends ExtendsAbstractMap, K, V> implements ConcurrentMap {
      +        public ImplementsConcurrentMap() { super(new ConcurrentHashMap()); }
      +
      +        // ConcurrentMap reabstracts these methods
      +
      +        public V replace(K k, V v) { return map.replace(k, v); };
      +
      +        public boolean replace(K k, V v, V vv) { return map.replace(k, v, vv); };
      +
      +        public boolean remove(Object k, Object v) { return map.remove(k, v); }
      +
      +        public V putIfAbsent(K k, V v) { return map.putIfAbsent(k, v); }
      +    }
      +}
      
      From dfcf6055a75dc3dbe35503674e7b61e266e59046 Mon Sep 17 00:00:00 2001
      From: Weijun Wang 
      Date: Wed, 17 Apr 2013 10:15:33 +0800
      Subject: [PATCH 142/151] 8011124: Make KerberosTime immutable
      
      Reviewed-by: xuelei
      ---
       .../classes/sun/security/krb5/KrbApReq.java   |  12 +-
       .../sun/security/krb5/KrbAppMessage.java      |  14 +-
       .../classes/sun/security/krb5/KrbCred.java    |   2 +-
       .../classes/sun/security/krb5/KrbTgsReq.java  |   3 +-
       .../security/krb5/internal/KerberosTime.java  | 202 ++++++------------
       .../security/krb5/internal/KrbCredInfo.java   |  12 +-
       .../security/krb5/internal/LastReqEntry.java  |   2 +-
       .../security/krb5/internal/PAEncTSEnc.java    |   2 +-
       .../krb5/internal/ccache/Credentials.java     |  42 ++--
       jdk/test/sun/security/krb5/MicroTime.java     |   6 +-
       10 files changed, 110 insertions(+), 187 deletions(-)
      
      diff --git a/jdk/src/share/classes/sun/security/krb5/KrbApReq.java b/jdk/src/share/classes/sun/security/krb5/KrbApReq.java
      index 535bb0dc52f..2bc01f693f5 100644
      --- a/jdk/src/share/classes/sun/security/krb5/KrbApReq.java
      +++ b/jdk/src/share/classes/sun/security/krb5/KrbApReq.java
      @@ -204,7 +204,7 @@ public class KrbApReq {
               int usage)
               throws KrbException, IOException {
       
      -        ctime = new KerberosTime(KerberosTime.NOW);
      +        ctime = KerberosTime.now();
               init(options,
                    tgs_creds.ticket,
                    tgs_creds.key,
      @@ -287,14 +287,14 @@ public class KrbApReq {
               authenticator = new Authenticator(temp2);
               ctime = authenticator.ctime;
               cusec = authenticator.cusec;
      -        authenticator.ctime.setMicroSeconds(authenticator.cusec);
      +        authenticator.ctime =
      +                authenticator.ctime.withMicroSeconds(authenticator.cusec);
       
               if (!authenticator.cname.equals(enc_ticketPart.cname)) {
                   throw new KrbApErrException(Krb5.KRB_AP_ERR_BADMATCH);
               }
       
      -        KerberosTime currTime = new KerberosTime(KerberosTime.NOW);
      -        if (!authenticator.ctime.inClockSkew(currTime))
      +        if (!authenticator.ctime.inClockSkew())
                   throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
       
               // start to check if it is a replay attack.
      @@ -304,7 +304,7 @@ public class KrbApReq {
               if (table.get(time, authenticator.cname.toString()) != null) {
                   throw new KrbApErrException(Krb5.KRB_AP_ERR_REPEAT);
               } else {
      -            table.put(client, time, currTime.getTime());
      +            table.put(client, time, System.currentTimeMillis());
               }
       
               if (initiator != null) {
      @@ -329,7 +329,7 @@ public class KrbApReq {
               // else
               //    save authenticator to check for later
       
      -        KerberosTime now = new KerberosTime(KerberosTime.NOW);
      +        KerberosTime now = KerberosTime.now();
       
               if ((enc_ticketPart.starttime != null &&
                    enc_ticketPart.starttime.greaterThanWRTClockSkew(now)) ||
      diff --git a/jdk/src/share/classes/sun/security/krb5/KrbAppMessage.java b/jdk/src/share/classes/sun/security/krb5/KrbAppMessage.java
      index cf19cf98242..47aa1681a1a 100644
      --- a/jdk/src/share/classes/sun/security/krb5/KrbAppMessage.java
      +++ b/jdk/src/share/classes/sun/security/krb5/KrbAppMessage.java
      @@ -71,12 +71,18 @@ abstract class KrbAppMessage {
               }
       
               if (packetTimestamp != null) {
      -            packetTimestamp.setMicroSeconds(packetUsec);
      -            if (!packetTimestamp.inClockSkew())
      +            if (packetUsec != null) {
      +                packetTimestamp =
      +                    packetTimestamp.withMicroSeconds(packetUsec.intValue());
      +            }
      +            if (!packetTimestamp.inClockSkew()) {
                       throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
      -        } else
      -            if (timestampRequired)
      +            }
      +        } else {
      +            if (timestampRequired) {
                       throw new KrbApErrException(Krb5.KRB_AP_ERR_SKEW);
      +            }
      +        }
       
               // XXX check replay cache
               // if (rcache.repeated(packetTimestamp, packetUsec, packetSAddress))
      diff --git a/jdk/src/share/classes/sun/security/krb5/KrbCred.java b/jdk/src/share/classes/sun/security/krb5/KrbCred.java
      index 9a131811959..64dada1d35e 100644
      --- a/jdk/src/share/classes/sun/security/krb5/KrbCred.java
      +++ b/jdk/src/share/classes/sun/security/krb5/KrbCred.java
      @@ -103,7 +103,7 @@ public class KrbCred {
                                                      delegatedCreds.renewTill, tgService,
                                                      delegatedCreds.cAddr);
       
      -        timeStamp = new KerberosTime(KerberosTime.NOW);
      +        timeStamp = KerberosTime.now();
               KrbCredInfo[] credInfos = {credInfo};
               EncKrbCredPart encPart =
                   new EncKrbCredPart(credInfos,
      diff --git a/jdk/src/share/classes/sun/security/krb5/KrbTgsReq.java b/jdk/src/share/classes/sun/security/krb5/KrbTgsReq.java
      index 9cd84c6d9a4..32263b53770 100644
      --- a/jdk/src/share/classes/sun/security/krb5/KrbTgsReq.java
      +++ b/jdk/src/share/classes/sun/security/krb5/KrbTgsReq.java
      @@ -147,8 +147,7 @@ public class KrbTgsReq {
       
               princName = cname;
               servName = sname;
      -        ctime = new KerberosTime(KerberosTime.NOW);
      -
      +        ctime = KerberosTime.now();
       
               // check if they are valid arguments. The optional fields
               // should be  consistent with settings in KDCOptions.
      diff --git a/jdk/src/share/classes/sun/security/krb5/internal/KerberosTime.java b/jdk/src/share/classes/sun/security/krb5/internal/KerberosTime.java
      index ce141419f83..3beaac873ce 100644
      --- a/jdk/src/share/classes/sun/security/krb5/internal/KerberosTime.java
      +++ b/jdk/src/share/classes/sun/security/krb5/internal/KerberosTime.java
      @@ -30,18 +30,20 @@
       
       package sun.security.krb5.internal;
       
      -import java.util.TimeZone;
      -import sun.security.util.*;
      +import sun.security.krb5.Asn1Exception;
       import sun.security.krb5.Config;
       import sun.security.krb5.KrbException;
      -import sun.security.krb5.Asn1Exception;
      -import java.util.Date;
      -import java.util.GregorianCalendar;
      -import java.util.Calendar;
      +import sun.security.util.DerInputStream;
      +import sun.security.util.DerOutputStream;
      +import sun.security.util.DerValue;
      +
       import java.io.IOException;
      +import java.util.Calendar;
      +import java.util.Date;
      +import java.util.TimeZone;
       
       /**
      - * Implements the ASN.1 KerberosTime type.
      + * Implements the ASN.1 KerberosTime type. This is an immutable class.
        *
        * 
        * KerberosTime    ::= GeneralizedTime -- with no fractional seconds
      @@ -62,55 +64,38 @@ import java.io.IOException;
        * same class can be used as a precise timestamp in Authenticator etc.
        */
       
      -public class KerberosTime implements Cloneable {
      +public class KerberosTime {
       
      -    private long kerberosTime; // milliseconds since epoch, a Date.getTime() value
      -    private int  microSeconds; // the last three digits of the microsecond value
      +    private final long kerberosTime; // milliseconds since epoch, Date.getTime()
      +    private final int  microSeconds; // last 3 digits of the real microsecond
       
           // The time when this class is loaded. Used in setNow()
           private static long initMilli = System.currentTimeMillis();
           private static long initMicro = System.nanoTime() / 1000;
       
      -    private static long syncTime;
           private static boolean DEBUG = Krb5.DEBUG;
       
      -    public static final boolean NOW = true;
      -    public static final boolean UNADJUSTED_NOW = false;
      -
      -    public KerberosTime(long time) {
      -        kerberosTime = time;
      -    }
      -
      +    // Do not make this public. It's a little confusing that micro
      +    // is only the last 3 digits of microsecond.
           private KerberosTime(long time, int micro) {
               kerberosTime = time;
               microSeconds = micro;
           }
       
      -    public Object clone() {
      -        return new KerberosTime(kerberosTime, microSeconds);
      +    /**
      +     * Creates a KerberosTime object from milliseconds since epoch.
      +     */
      +    public KerberosTime(long time) {
      +        this(time, 0);
           }
       
           // This constructor is used in the native code
           // src/windows/native/sun/security/krb5/NativeCreds.c
           public KerberosTime(String time) throws Asn1Exception {
      -        kerberosTime = toKerberosTime(time);
      -    }
      -
      -    /**
      -     * Constructs a KerberosTime object.
      -     * @param encoding a DER-encoded data.
      -     * @exception Asn1Exception if an error occurs while decoding an ASN1 encoded data.
      -     * @exception IOException if an I/O error occurs while reading encoded data.
      -     */
      -    public KerberosTime(DerValue encoding) throws Asn1Exception, IOException {
      -        GregorianCalendar calendar = new GregorianCalendar();
      -        Date temp = encoding.getGeneralizedTime();
      -        kerberosTime = temp.getTime();
      +        this(toKerberosTime(time), 0);
           }
       
           private static long toKerberosTime(String time) throws Asn1Exception {
      -        // this method only used by KerberosTime class.
      -
               // ASN.1 GeneralizedTime format:
       
               // "19700101000000Z"
      @@ -133,30 +118,34 @@ public class KerberosTime implements Cloneable {
                            Integer.parseInt(time.substring(8, 10)),
                            Integer.parseInt(time.substring(10, 12)),
                            Integer.parseInt(time.substring(12, 14)));
      -
      -        //The Date constructor assumes the setting are local relative
      -        //and converts the time to UTC before storing it.  Since we
      -        //want the internal representation to correspond to local
      -        //and not UTC time we subtract the UTC time offset.
      -        return (calendar.getTime().getTime());
      -
      -    }
      -
      -    // should be moved to sun.security.krb5.util class
      -    public static String zeroPad(String s, int length) {
      -        StringBuffer temp = new StringBuffer(s);
      -        while (temp.length() < length)
      -            temp.insert(0, '0');
      -        return temp.toString();
      +        return calendar.getTimeInMillis();
           }
       
      +    /**
      +     * Creates a KerberosTime object from a Date object.
      +     */
           public KerberosTime(Date time) {
      -        kerberosTime = time.getTime(); // (time.getTimezoneOffset() * 60000L);
      +        this(time.getTime(), 0);
           }
       
      -    public KerberosTime(boolean initToNow) {
      -        if (initToNow) {
      -            setNow();
      +    /**
      +     * Creates a KerberosTime object for now. It uses System.nanoTime()
      +     * to get a more precise time than "new Date()".
      +     */
      +    public static KerberosTime now() {
      +        long newMilli = System.currentTimeMillis();
      +        long newMicro = System.nanoTime() / 1000;
      +        long microElapsed = newMicro - initMicro;
      +        long calcMilli = initMilli + microElapsed/1000;
      +        if (calcMilli - newMilli > 100 || newMilli - calcMilli > 100) {
      +            if (DEBUG) {
      +                System.out.println("System time adjusted");
      +            }
      +            initMilli = newMilli;
      +            initMicro = newMicro;
      +            return new KerberosTime(newMilli, 0);
      +        } else {
      +            return new KerberosTime(calcMilli, (int)(microElapsed % 1000));
               }
           }
       
      @@ -169,13 +158,13 @@ public class KerberosTime implements Cloneable {
               calendar.clear();
       
               calendar.setTimeInMillis(kerberosTime);
      -        return zeroPad(Integer.toString(calendar.get(Calendar.YEAR)), 4) +
      -            zeroPad(Integer.toString(calendar.get(Calendar.MONTH) + 1), 2) +
      -            zeroPad(Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)), 2) +
      -            zeroPad(Integer.toString(calendar.get(Calendar.HOUR_OF_DAY)), 2) +
      -            zeroPad(Integer.toString(calendar.get(Calendar.MINUTE)), 2) +
      -            zeroPad(Integer.toString(calendar.get(Calendar.SECOND)), 2) + 'Z';
      -
      +        return String.format("%04d%02d%02d%02d%02d%02dZ",
      +                calendar.get(Calendar.YEAR),
      +                calendar.get(Calendar.MONTH) + 1,
      +                calendar.get(Calendar.DAY_OF_MONTH),
      +                calendar.get(Calendar.HOUR_OF_DAY),
      +                calendar.get(Calendar.MINUTE),
      +                calendar.get(Calendar.SECOND));
           }
       
           /**
      @@ -194,40 +183,8 @@ public class KerberosTime implements Cloneable {
               return kerberosTime;
           }
       
      -
      -    public void setTime(Date time) {
      -        kerberosTime = time.getTime(); // (time.getTimezoneOffset() * 60000L);
      -        microSeconds = 0;
      -    }
      -
      -    public void setTime(long time) {
      -        kerberosTime = time;
      -        microSeconds = 0;
      -    }
      -
           public Date toDate() {
      -        Date temp = new Date(kerberosTime);
      -        temp.setTime(temp.getTime());
      -        return temp;
      -    }
      -
      -    public void setNow() {
      -        long newMilli = System.currentTimeMillis();
      -        long newMicro = System.nanoTime() / 1000;
      -        long microElapsed = newMicro - initMicro;
      -        long calcMilli = initMilli + microElapsed/1000;
      -        if (calcMilli - newMilli > 100 || newMilli - calcMilli > 100) {
      -            if (DEBUG) {
      -                System.out.println("System time adjusted");
      -            }
      -            initMilli = newMilli;
      -            initMicro = newMicro;
      -            setTime(newMilli);
      -            microSeconds = 0;
      -        } else {
      -            setTime(calcMilli);
      -            microSeconds = (int)(microElapsed % 1000);
      -        }
      +        return new Date(kerberosTime);
           }
       
           public int getMicroSeconds() {
      @@ -235,45 +192,25 @@ public class KerberosTime implements Cloneable {
               return temp_long.intValue() + microSeconds;
           }
       
      -    public void setMicroSeconds(int usec) {
      -        microSeconds = usec % 1000;
      -        Integer temp_int = new Integer(usec);
      -        long temp_long = temp_int.longValue() / 1000L;
      -        kerberosTime = kerberosTime - (kerberosTime % 1000L) + temp_long;
      +    /**
      +     * Returns a new KerberosTime object with the original seconds
      +     * and the given microseconds.
      +     */
      +    public KerberosTime withMicroSeconds(int usec) {
      +        return new KerberosTime(
      +                kerberosTime - kerberosTime%1000L + usec/1000L,
      +                usec%1000);
           }
       
      -    public void setMicroSeconds(Integer usec) {
      -        if (usec != null) {
      -            microSeconds = usec.intValue() % 1000;
      -            long temp_long = usec.longValue() / 1000L;
      -            kerberosTime = kerberosTime - (kerberosTime % 1000L) + temp_long;
      -        }
      -    }
      -
      -    public boolean inClockSkew(int clockSkew) {
      -        KerberosTime now = new KerberosTime(KerberosTime.NOW);
      -
      -        if (java.lang.Math.abs(kerberosTime - now.kerberosTime) >
      -            clockSkew * 1000L)
      -            return false;
      -        return true;
      +    private boolean inClockSkew(int clockSkew) {
      +        return java.lang.Math.abs(kerberosTime - System.currentTimeMillis())
      +                <= clockSkew * 1000L;
           }
       
           public boolean inClockSkew() {
               return inClockSkew(getDefaultSkew());
           }
       
      -    public boolean inClockSkew(int clockSkew, KerberosTime now) {
      -        if (java.lang.Math.abs(kerberosTime - now.kerberosTime) >
      -            clockSkew * 1000L)
      -            return false;
      -        return true;
      -    }
      -
      -    public boolean inClockSkew(KerberosTime time) {
      -        return inClockSkew(getDefaultSkew(), time);
      -    }
      -
           public boolean greaterThanWRTClockSkew(KerberosTime time, int clockSkew) {
               if ((kerberosTime - time.kerberosTime) > clockSkew * 1000L)
                   return true;
      @@ -317,24 +254,22 @@ public class KerberosTime implements Cloneable {
               return temp_long.intValue();
           }
       
      -    public void setSeconds(int sec) {
      -        Integer temp_int = new Integer(sec);
      -        kerberosTime = temp_int.longValue() * 1000L;
      -    }
      -
           /**
            * Parse (unmarshal) a kerberostime from a DER input stream.  This form
            * parsing might be used when expanding a value which is part of
            * a constructed sequence and uses explicitly tagged type.
            *
            * @exception Asn1Exception on error.
      -     * @param data the Der input stream value, which contains one or more marshaled value.
      +     * @param data the Der input stream value, which contains
      +     *             one or more marshaled value.
            * @param explicitTag tag number.
            * @param optional indicates if this data field is optional
            * @return an instance of KerberosTime.
            *
            */
      -    public static KerberosTime parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException {
      +    public static KerberosTime parse(
      +            DerInputStream data, byte explicitTag, boolean optional)
      +            throws Asn1Exception, IOException {
               if ((optional) && (((byte)data.peekByte() & (byte)0x1F)!= explicitTag))
                   return null;
               DerValue der = data.getDerValue();
      @@ -343,7 +278,8 @@ public class KerberosTime implements Cloneable {
               }
               else {
                   DerValue subDer = der.getData().getDerValue();
      -            return new KerberosTime(subDer);
      +            Date temp = subDer.getGeneralizedTime();
      +            return new KerberosTime(temp.getTime(), 0);
               }
           }
       
      diff --git a/jdk/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java b/jdk/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java
      index 4acf451cc6c..18fa7412fac 100644
      --- a/jdk/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java
      +++ b/jdk/src/share/classes/sun/security/krb5/internal/KrbCredInfo.java
      @@ -187,14 +187,10 @@ public class KrbCredInfo {
                   kcred.pname = (PrincipalName)pname.clone();
               if (flags != null)
                   kcred.flags = (TicketFlags)flags.clone();
      -        if (authtime != null)
      -            kcred.authtime = (KerberosTime)authtime.clone();
      -        if (starttime != null)
      -            kcred.starttime = (KerberosTime)starttime.clone();
      -        if (endtime != null)
      -            kcred.endtime = (KerberosTime)endtime.clone();
      -        if (renewTill != null)
      -            kcred.renewTill = (KerberosTime)renewTill.clone();
      +        kcred.authtime = authtime;
      +        kcred.starttime = starttime;
      +        kcred.endtime = endtime;
      +        kcred.renewTill = renewTill;
               if (sname != null)
                   kcred.sname = (PrincipalName)sname.clone();
               if (caddr != null)
      diff --git a/jdk/src/share/classes/sun/security/krb5/internal/LastReqEntry.java b/jdk/src/share/classes/sun/security/krb5/internal/LastReqEntry.java
      index fa4ae0a5e11..396d3b8df03 100644
      --- a/jdk/src/share/classes/sun/security/krb5/internal/LastReqEntry.java
      +++ b/jdk/src/share/classes/sun/security/krb5/internal/LastReqEntry.java
      @@ -90,7 +90,7 @@ public class LastReqEntry {
           public Object clone() {
               LastReqEntry newEntry = new LastReqEntry();
               newEntry.lrType = lrType;
      -        newEntry.lrValue = (KerberosTime)lrValue.clone();
      +        newEntry.lrValue = lrValue;
               return newEntry;
           }
       }
      diff --git a/jdk/src/share/classes/sun/security/krb5/internal/PAEncTSEnc.java b/jdk/src/share/classes/sun/security/krb5/internal/PAEncTSEnc.java
      index e5f2f755be9..83375647046 100644
      --- a/jdk/src/share/classes/sun/security/krb5/internal/PAEncTSEnc.java
      +++ b/jdk/src/share/classes/sun/security/krb5/internal/PAEncTSEnc.java
      @@ -65,7 +65,7 @@ public class PAEncTSEnc {
           }
       
           public PAEncTSEnc() {
      -        KerberosTime now = new KerberosTime(KerberosTime.NOW);
      +        KerberosTime now = KerberosTime.now();
               pATimeStamp = now;
               pAUSec = new Integer(now.getMicroSeconds());
           }
      diff --git a/jdk/src/share/classes/sun/security/krb5/internal/ccache/Credentials.java b/jdk/src/share/classes/sun/security/krb5/internal/ccache/Credentials.java
      index f27a1588ec3..7128545a25a 100644
      --- a/jdk/src/share/classes/sun/security/krb5/internal/ccache/Credentials.java
      +++ b/jdk/src/share/classes/sun/security/krb5/internal/ccache/Credentials.java
      @@ -68,14 +68,11 @@ public class Credentials {
               sname = (PrincipalName) new_sname.clone();
               key = (EncryptionKey) new_key.clone();
       
      -        authtime = (KerberosTime) new_authtime.clone();
      -        if (new_starttime != null) {
      -            starttime = (KerberosTime) new_starttime.clone();
      -        }
      -        endtime = (KerberosTime) new_endtime.clone();
      -        if (new_renewTill != null) {
      -            renewTill = (KerberosTime) new_renewTill.clone();
      -        }
      +        authtime = new_authtime;
      +        starttime = new_starttime;
      +        endtime = new_endtime;
      +        renewTill = new_renewTill;
      +
               if (new_caddr != null) {
                   caddr = (HostAddresses) new_caddr.clone();
               }
      @@ -104,14 +101,11 @@ public class Credentials {
               ticket = (Ticket) kdcRep.ticket.clone();
               key = (EncryptionKey) kdcRep.encKDCRepPart.key.clone();
               flags = (TicketFlags) kdcRep.encKDCRepPart.flags.clone();
      -        authtime = (KerberosTime) kdcRep.encKDCRepPart.authtime.clone();
      -        if (kdcRep.encKDCRepPart.starttime != null) {
      -            starttime = (KerberosTime) kdcRep.encKDCRepPart.starttime.clone();
      -        }
      -        endtime = (KerberosTime) kdcRep.encKDCRepPart.endtime.clone();
      -        if (kdcRep.encKDCRepPart.renewTill != null) {
      -            renewTill = (KerberosTime) kdcRep.encKDCRepPart.renewTill.clone();
      -        }
      +        authtime = kdcRep.encKDCRepPart.authtime;
      +        starttime = kdcRep.encKDCRepPart.starttime;
      +        endtime = kdcRep.encKDCRepPart.endtime;
      +        renewTill = kdcRep.encKDCRepPart.renewTill;
      +
               sname = (PrincipalName) kdcRep.encKDCRepPart.sname.clone();
               caddr = (HostAddresses) kdcRep.encKDCRepPart.caddr.clone();
               secondTicket = (Ticket) new_secondTicket.clone();
      @@ -128,18 +122,10 @@ public class Credentials {
               sname = (PrincipalName) kdcRep.encKDCRepPart.sname.clone();
               cname = (PrincipalName) kdcRep.cname.clone();
               key = (EncryptionKey) kdcRep.encKDCRepPart.key.clone();
      -        authtime = (KerberosTime) kdcRep.encKDCRepPart.authtime.clone();
      -        if (kdcRep.encKDCRepPart.starttime != null) {
      -            starttime = (KerberosTime) kdcRep.encKDCRepPart.starttime.clone();
      -        } else {
      -            starttime = null;
      -        }
      -        endtime = (KerberosTime) kdcRep.encKDCRepPart.endtime.clone();
      -        if (kdcRep.encKDCRepPart.renewTill != null) {
      -            renewTill = (KerberosTime) kdcRep.encKDCRepPart.renewTill.clone();
      -        } else {
      -            renewTill = null;
      -        }
      +        authtime = kdcRep.encKDCRepPart.authtime;
      +        starttime = kdcRep.encKDCRepPart.starttime;
      +        endtime = kdcRep.encKDCRepPart.endtime;
      +        renewTill = kdcRep.encKDCRepPart.renewTill;
               // if (kdcRep.msgType == Krb5.KRB_AS_REP) {
               //    isEncInSKey = false;
               //    secondTicket = null;
      diff --git a/jdk/test/sun/security/krb5/MicroTime.java b/jdk/test/sun/security/krb5/MicroTime.java
      index 6bbf8b8e974..e22f330df32 100644
      --- a/jdk/test/sun/security/krb5/MicroTime.java
      +++ b/jdk/test/sun/security/krb5/MicroTime.java
      @@ -22,7 +22,7 @@
        */
       /*
        * @test
      - * @bug 6882687
      + * @bug 6882687 8011124
        * @summary KerberosTime too imprecise
        */
       
      @@ -32,11 +32,11 @@ public class MicroTime {
           public static void main(String[] args) throws Exception {
               // We count how many different KerberosTime values
               // can be acquired within one second.
      -        KerberosTime t1 = new KerberosTime(true);
      +        KerberosTime t1 = KerberosTime.now();
               KerberosTime last = t1;
               int count = 0;
               while (true) {
      -            KerberosTime t2 = new KerberosTime(true);
      +            KerberosTime t2 = KerberosTime.now();
                   if (t2.getTime() - t1.getTime() > 1000) break;
                   if (!last.equals(t2)) {
                       last = t2;
      
      From 176ed8d94c997a2880d06882358304125b93e43a Mon Sep 17 00:00:00 2001
      From: Mandy Chung <mchung@openjdk.org>
      Date: Tue, 16 Apr 2013 21:39:52 -0700
      Subject: [PATCH 143/151] 8010117: Annotate jdk caller sensitive methods with
       @sun.reflect.CallerSensitive
      
      Reviewed-by: jrose, alanb, twisti
      ---
       jdk/make/java/java/FILES_c.gmk                |   1 -
       jdk/make/java/java/mapfile-vers               |   2 -
       jdk/make/java/java/reorder-i586               |   1 -
       jdk/make/java/java/reorder-sparc              |   1 -
       jdk/make/java/java/reorder-sparcv9            |   1 -
       jdk/makefiles/mapfiles/libjava/mapfile-vers   |   2 -
       jdk/makefiles/mapfiles/libjava/reorder-sparc  |   1 -
       .../mapfiles/libjava/reorder-sparcv9          |   1 -
       jdk/makefiles/mapfiles/libjava/reorder-x86    |   1 -
       jdk/src/share/classes/java/lang/Class.java    | 141 ++++++------
       .../share/classes/java/lang/ClassLoader.java  |  47 ++--
       jdk/src/share/classes/java/lang/Package.java  |   8 +-
       jdk/src/share/classes/java/lang/Runtime.java  |   8 +-
       .../classes/java/lang/SecurityManager.java    |   3 +-
       jdk/src/share/classes/java/lang/System.java   |  13 +-
       jdk/src/share/classes/java/lang/Thread.java   |   9 +-
       .../java/lang/invoke/BoundMethodHandle.java   |   4 +-
       .../classes/java/lang/invoke/MemberName.java  |  13 +-
       .../java/lang/invoke/MethodHandleImpl.java    |   8 +-
       .../java/lang/invoke/MethodHandleNatives.java | 121 +---------
       .../java/lang/invoke/MethodHandleProxies.java |   5 +-
       .../java/lang/invoke/MethodHandles.java       | 169 ++++++++------
       .../java/lang/reflect/Constructor.java        |   5 +-
       .../classes/java/lang/reflect/Field.java      | 147 ++++++++++--
       .../classes/java/lang/reflect/Method.java     |   5 +-
       .../classes/java/lang/reflect/Proxy.java      |  51 +++--
       .../java/security/AccessController.java       |  36 +--
       .../share/classes/java/sql/DriverManager.java |  68 +++---
       .../classes/java/util/ResourceBundle.java     |  33 ++-
       .../atomic/AtomicIntegerFieldUpdater.java     |  13 +-
       .../atomic/AtomicLongFieldUpdater.java        |  17 +-
       .../atomic/AtomicReferenceFieldUpdater.java   |  13 +-
       .../classes/java/util/logging/Logger.java     |  13 +-
       .../javax/script/ScriptEngineManager.java     |  13 +-
       jdk/src/share/classes/sun/misc/Unsafe.java    |  10 +-
       .../sun/reflect/CallerSensitive.java}         |  22 +-
       .../share/classes/sun/reflect/Reflection.java |  38 ++-
       jdk/src/share/javavm/export/jvm.h             |  17 +-
       jdk/src/share/native/java/lang/ClassLoader.c  |  18 --
       .../share/native/java/lang/SecurityManager.c  |   1 -
       jdk/src/share/native/sun/reflect/Reflection.c |   4 +-
       jdk/test/Makefile                             |   2 +-
       .../CallerSensitiveFinder.java                | 216 ++++++++++++++++++
       .../reflect/CallerSensitive/MethodFinder.java | 201 ++++++++++++++++
       .../MissingCallerSensitive.java               |  65 ++++++
       .../reflect/Reflection/GetCallerClass.java    |  37 +++
       .../Reflection/GetCallerClassTest.java        | 113 +++++++++
       .../reflect/Reflection/GetCallerClassTest.sh  |  68 ++++++
       48 files changed, 1267 insertions(+), 519 deletions(-)
       rename jdk/src/share/{native/java/lang/ResourceBundle.c => classes/sun/reflect/CallerSensitive.java} (70%)
       create mode 100644 jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java
       create mode 100644 jdk/test/sun/reflect/CallerSensitive/MethodFinder.java
       create mode 100644 jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java
       create mode 100644 jdk/test/sun/reflect/Reflection/GetCallerClass.java
       create mode 100644 jdk/test/sun/reflect/Reflection/GetCallerClassTest.java
       create mode 100644 jdk/test/sun/reflect/Reflection/GetCallerClassTest.sh
      
      diff --git a/jdk/make/java/java/FILES_c.gmk b/jdk/make/java/java/FILES_c.gmk
      index 617780a42af..d01b0c29563 100644
      --- a/jdk/make/java/java/FILES_c.gmk
      +++ b/jdk/make/java/java/FILES_c.gmk
      @@ -48,7 +48,6 @@ FILES_c = \
       	Proxy.c \
       	RandomAccessFile.c \
       	RandomAccessFile_md.c \
      -	ResourceBundle.c \
       	Runtime.c \
       	SecurityManager.c \
       	Shutdown.c \
      diff --git a/jdk/make/java/java/mapfile-vers b/jdk/make/java/java/mapfile-vers
      index dc20bed7b9e..ca33582de6b 100644
      --- a/jdk/make/java/java/mapfile-vers
      +++ b/jdk/make/java/java/mapfile-vers
      @@ -134,7 +134,6 @@ SUNWprivate_1.1 {
       		Java_java_lang_ClassLoader_00024NativeLibrary_load;
       		Java_java_lang_ClassLoader_00024NativeLibrary_unload;
       		Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
      -		Java_java_lang_ClassLoader_getCaller; 
       		Java_java_lang_ClassLoader_registerNatives;
       		Java_java_lang_Compiler_registerNatives;
       		Java_java_lang_Double_longBitsToDouble;
      @@ -233,7 +232,6 @@ SUNWprivate_1.1 {
       		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
       		Java_java_security_AccessController_getStackAccessControlContext;
       		Java_java_security_AccessController_getInheritedAccessControlContext;
      -		Java_java_util_ResourceBundle_getClassContext;
       		Java_java_util_TimeZone_getSystemTimeZoneID;
       		Java_java_util_TimeZone_getSystemGMTOffsetID;
       		Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
      diff --git a/jdk/make/java/java/reorder-i586 b/jdk/make/java/java/reorder-i586
      index fc3202a8439..86fd4a53c3e 100644
      --- a/jdk/make/java/java/reorder-i586
      +++ b/jdk/make/java/java/reorder-i586
      @@ -73,7 +73,6 @@ text: .text%writeBytes;
       # Test Sleep
       # Test IntToString
       # Test LoadToolkit
      -text: .text%Java_java_util_ResourceBundle_getClassContext;
       text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
       text: .text%JNU_GetEnv;
       text: .text%Java_java_io_UnixFileSystem_checkAccess;
      diff --git a/jdk/make/java/java/reorder-sparc b/jdk/make/java/java/reorder-sparc
      index 090f0001da2..6293ec799a7 100644
      --- a/jdk/make/java/java/reorder-sparc
      +++ b/jdk/make/java/java/reorder-sparc
      @@ -78,7 +78,6 @@ text: .text%writeBytes;
       # Test Sleep
       # Test IntToString
       # Test LoadToolkit
      -text: .text%Java_java_util_ResourceBundle_getClassContext;
       text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
       text: .text%JNU_GetEnv;
       text: .text%Java_java_io_UnixFileSystem_checkAccess;
      diff --git a/jdk/make/java/java/reorder-sparcv9 b/jdk/make/java/java/reorder-sparcv9
      index b20b45ab960..29a530d8096 100644
      --- a/jdk/make/java/java/reorder-sparcv9
      +++ b/jdk/make/java/java/reorder-sparcv9
      @@ -74,7 +74,6 @@ text: .text%writeBytes;
       # Test Sleep
       # Test IntToString
       # Test LoadToolkit
      -text: .text%Java_java_util_ResourceBundle_getClassContext;
       text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
       text: .text%JNU_GetEnv;
       text: .text%Java_java_io_UnixFileSystem_checkAccess;
      diff --git a/jdk/makefiles/mapfiles/libjava/mapfile-vers b/jdk/makefiles/mapfiles/libjava/mapfile-vers
      index dc20bed7b9e..ca33582de6b 100644
      --- a/jdk/makefiles/mapfiles/libjava/mapfile-vers
      +++ b/jdk/makefiles/mapfiles/libjava/mapfile-vers
      @@ -134,7 +134,6 @@ SUNWprivate_1.1 {
       		Java_java_lang_ClassLoader_00024NativeLibrary_load;
       		Java_java_lang_ClassLoader_00024NativeLibrary_unload;
       		Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib;
      -		Java_java_lang_ClassLoader_getCaller; 
       		Java_java_lang_ClassLoader_registerNatives;
       		Java_java_lang_Compiler_registerNatives;
       		Java_java_lang_Double_longBitsToDouble;
      @@ -233,7 +232,6 @@ SUNWprivate_1.1 {
       		Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedExceptionAction_2Ljava_security_AccessControlContext_2;
       		Java_java_security_AccessController_getStackAccessControlContext;
       		Java_java_security_AccessController_getInheritedAccessControlContext;
      -		Java_java_util_ResourceBundle_getClassContext;
       		Java_java_util_TimeZone_getSystemTimeZoneID;
       		Java_java_util_TimeZone_getSystemGMTOffsetID;
       		Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8;
      diff --git a/jdk/makefiles/mapfiles/libjava/reorder-sparc b/jdk/makefiles/mapfiles/libjava/reorder-sparc
      index 32f9aaf2d8e..b64537e3edd 100644
      --- a/jdk/makefiles/mapfiles/libjava/reorder-sparc
      +++ b/jdk/makefiles/mapfiles/libjava/reorder-sparc
      @@ -78,7 +78,6 @@ text: .text%writeBytes;
       # Test Sleep
       # Test IntToString
       # Test LoadToolkit
      -text: .text%Java_java_util_ResourceBundle_getClassContext;
       text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
       text: .text%JNU_GetEnv;
       text: .text%Java_java_io_UnixFileSystem_checkAccess;
      diff --git a/jdk/makefiles/mapfiles/libjava/reorder-sparcv9 b/jdk/makefiles/mapfiles/libjava/reorder-sparcv9
      index d64cb957793..8e6d249a440 100644
      --- a/jdk/makefiles/mapfiles/libjava/reorder-sparcv9
      +++ b/jdk/makefiles/mapfiles/libjava/reorder-sparcv9
      @@ -74,7 +74,6 @@ text: .text%writeBytes;
       # Test Sleep
       # Test IntToString
       # Test LoadToolkit
      -text: .text%Java_java_util_ResourceBundle_getClassContext;
       text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
       text: .text%JNU_GetEnv;
       text: .text%Java_java_io_UnixFileSystem_checkAccess;
      diff --git a/jdk/makefiles/mapfiles/libjava/reorder-x86 b/jdk/makefiles/mapfiles/libjava/reorder-x86
      index deb78fb9799..ff4836f4612 100644
      --- a/jdk/makefiles/mapfiles/libjava/reorder-x86
      +++ b/jdk/makefiles/mapfiles/libjava/reorder-x86
      @@ -73,7 +73,6 @@ text: .text%writeBytes;
       # Test Sleep
       # Test IntToString
       # Test LoadToolkit
      -text: .text%Java_java_util_ResourceBundle_getClassContext;
       text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
       text: .text%JNU_GetEnv;
       text: .text%Java_java_io_UnixFileSystem_checkAccess;
      diff --git a/jdk/src/share/classes/java/lang/Class.java b/jdk/src/share/classes/java/lang/Class.java
      index 5fd388d657d..5593f2b4898 100644
      --- a/jdk/src/share/classes/java/lang/Class.java
      +++ b/jdk/src/share/classes/java/lang/Class.java
      @@ -53,6 +53,7 @@ import java.util.Map;
       import java.util.HashMap;
       import java.util.Objects;
       import sun.misc.Unsafe;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.ConstantPool;
       import sun.reflect.Reflection;
       import sun.reflect.ReflectionFactory;
      @@ -250,9 +251,11 @@ public final class Class<T> implements java.io.Serializable,
            *            by this method fails
            * @exception ClassNotFoundException if the class cannot be located
            */
      +    @CallerSensitive
           public static Class<?> forName(String className)
                       throws ClassNotFoundException {
      -        return forName0(className, true, ClassLoader.getCallerClassLoader());
      +        return forName0(className, true,
      +                        ClassLoader.getClassLoader(Reflection.getCallerClass()));
           }
       
       
      @@ -317,6 +320,7 @@ public final class Class<T> implements java.io.Serializable,
            * @see       java.lang.ClassLoader
            * @since     1.2
            */
      +    @CallerSensitive
           public static Class<?> forName(String name, boolean initialize,
                                          ClassLoader loader)
               throws ClassNotFoundException
      @@ -324,7 +328,7 @@ public final class Class<T> implements java.io.Serializable,
               if (sun.misc.VM.isSystemDomainLoader(loader)) {
                   SecurityManager sm = System.getSecurityManager();
                   if (sm != null) {
      -                ClassLoader ccl = ClassLoader.getCallerClassLoader();
      +                ClassLoader ccl = ClassLoader.getClassLoader(Reflection.getCallerClass());
                       if (!sun.misc.VM.isSystemDomainLoader(ccl)) {
                           sm.checkPermission(
                               SecurityConstants.GET_CLASSLOADER_PERMISSION);
      @@ -386,18 +390,14 @@ public final class Class<T> implements java.io.Serializable,
            *             </ul>
            *
            */
      +    @CallerSensitive
           public T newInstance()
               throws InstantiationException, IllegalAccessException
           {
               if (System.getSecurityManager() != null) {
      -            checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), false);
      +            checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), false);
               }
      -        return newInstance0();
      -    }
       
      -    private T newInstance0()
      -        throws InstantiationException, IllegalAccessException
      -    {
               // NOTE: the following code may not be strictly correct under
               // the current Java memory model.
       
      @@ -432,7 +432,7 @@ public final class Class<T> implements java.io.Serializable,
               // Security check (same as in java.lang.reflect.Constructor)
               int modifiers = tmpConstructor.getModifiers();
               if (!Reflection.quickCheckMemberAccess(this, modifiers)) {
      -            Class<?> caller = Reflection.getCallerClass(3);
      +            Class<?> caller = Reflection.getCallerClass();
                   if (newInstanceCallerCache != caller) {
                       Reflection.ensureMemberAccess(caller, this, null, modifiers);
                       newInstanceCallerCache = caller;
      @@ -674,16 +674,14 @@ public final class Class<T> implements java.io.Serializable,
            * @see SecurityManager#checkPermission
            * @see java.lang.RuntimePermission
            */
      +    @CallerSensitive
           public ClassLoader getClassLoader() {
               ClassLoader cl = getClassLoader0();
               if (cl == null)
                   return null;
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            ClassLoader ccl = ClassLoader.getCallerClassLoader();
      -            if (ClassLoader.needsClassLoaderPermissionCheck(ccl, cl)) {
      -                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      -            }
      +            ClassLoader.checkClassLoaderPermission(cl, Reflection.getCallerClass());
               }
               return cl;
           }
      @@ -1392,11 +1390,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Class<?>[] getClasses() {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), false);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), false);
       
               // Privileged so this implementation can look at DECLARED classes,
               // something the caller might not have privilege to do.  The code here
      @@ -1467,11 +1463,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Field[] getFields() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
               return copyFields(privateGetPublicFields(null));
           }
       
      @@ -1518,11 +1512,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Method[] getMethods() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
               return copyMethods(privateGetPublicMethods());
           }
       
      @@ -1567,11 +1559,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Constructor<?>[] getConstructors() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
               return copyConstructors(privateGetDeclaredConstructors(true));
           }
       
      @@ -1625,12 +1615,10 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Field getField(String name)
               throws NoSuchFieldException, SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
               Field field = getField0(name);
               if (field == null) {
                   throw new NoSuchFieldException(name);
      @@ -1710,12 +1698,10 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Method getMethod(String name, Class<?>... parameterTypes)
               throws NoSuchMethodException, SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
               Method method = getMethod0(name, parameterTypes);
               if (method == null) {
                   throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
      @@ -1764,12 +1750,10 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Constructor<T> getConstructor(Class<?>... parameterTypes)
               throws NoSuchMethodException, SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.PUBLIC, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.PUBLIC, Reflection.getCallerClass(), true);
               return getConstructor0(parameterTypes, Member.PUBLIC);
           }
       
      @@ -1807,11 +1791,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Class<?>[] getDeclaredClasses() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), false);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), false);
               return getDeclaredClasses0();
           }
       
      @@ -1851,11 +1833,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Field[] getDeclaredFields() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
               return copyFields(privateGetDeclaredFields(false));
           }
       
      @@ -1899,11 +1879,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Method[] getDeclaredMethods() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
               return copyMethods(privateGetDeclaredMethods(false));
           }
       
      @@ -1944,11 +1922,9 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Constructor<?>[] getDeclaredConstructors() throws SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
               return copyConstructors(privateGetDeclaredConstructors(false));
           }
       
      @@ -1987,12 +1963,10 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Field getDeclaredField(String name)
               throws NoSuchFieldException, SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
               Field field = searchFields(privateGetDeclaredFields(false), name);
               if (field == null) {
                   throw new NoSuchFieldException(name);
      @@ -2042,12 +2016,10 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Method getDeclaredMethod(String name, Class<?>... parameterTypes)
               throws NoSuchMethodException, SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
               Method method = searchMethods(privateGetDeclaredMethods(false), name, parameterTypes);
               if (method == null) {
                   throw new NoSuchMethodException(getName() + "." + name + argumentTypesToString(parameterTypes));
      @@ -2092,12 +2064,10 @@ public final class Class<T> implements java.io.Serializable,
            *
            * @since JDK1.1
            */
      +    @CallerSensitive
           public Constructor<T> getDeclaredConstructor(Class<?>... parameterTypes)
               throws NoSuchMethodException, SecurityException {
      -        // be very careful not to change the stack depth of this
      -        // checkMemberAccess call for security reasons
      -        // see java.lang.SecurityManager.checkMemberAccess
      -        checkMemberAccess(Member.DECLARED, ClassLoader.getCallerClassLoader(), true);
      +        checkMemberAccess(Member.DECLARED, Reflection.getCallerClass(), true);
               return getConstructor0(parameterTypes, Member.DECLARED);
           }
       
      @@ -2255,23 +2225,40 @@ public final class Class<T> implements java.io.Serializable,
            */
           static native Class<?> getPrimitiveClass(String name);
       
      +    private static boolean isCheckMemberAccessOverridden(SecurityManager smgr) {
      +        if (smgr.getClass() == SecurityManager.class) return false;
      +
      +        Class<?>[] paramTypes = new Class<?>[] {Class.class, int.class};
      +        return smgr.getClass().getMethod0("checkMemberAccess", paramTypes).
      +                getDeclaringClass() != SecurityManager.class;
      +    }
       
           /*
            * Check if client is allowed to access members.  If access is denied,
            * throw a SecurityException.
            *
      -     * Be very careful not to change the stack depth of this checkMemberAccess
      -     * call for security reasons.
      -     * See java.lang.SecurityManager.checkMemberAccess.
      -     *
            * <p> Default policy: allow all clients access with normal Java access
            * control.
            */
      -    private void checkMemberAccess(int which, ClassLoader ccl, boolean checkProxyInterfaces) {
      -        SecurityManager s = System.getSecurityManager();
      +    private void checkMemberAccess(int which, Class<?> caller, boolean checkProxyInterfaces) {
      +        final SecurityManager s = System.getSecurityManager();
               if (s != null) {
      -            s.checkMemberAccess(this, which);
      -            ClassLoader cl = getClassLoader0();
      +            final ClassLoader ccl = ClassLoader.getClassLoader(caller);
      +            final ClassLoader cl = getClassLoader0();
      +            if (!isCheckMemberAccessOverridden(s)) {
      +                // Inlined SecurityManager.checkMemberAccess
      +                if (which != Member.PUBLIC) {
      +                    if (ccl != cl) {
      +                        s.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION);
      +                    }
      +                }
      +            } else {
      +                // Don't refactor; otherwise break the stack depth for
      +                // checkMemberAccess of subclasses of SecurityManager as specified.
      +                s.checkMemberAccess(this, which);
      +            }
      +
      +
                   if (ReflectUtil.needsPackageAccessCheck(ccl, cl)) {
                       String name = this.getName();
                       int i = name.lastIndexOf('.');
      diff --git a/jdk/src/share/classes/java/lang/ClassLoader.java b/jdk/src/share/classes/java/lang/ClassLoader.java
      index c41280d3c79..8d0205f54f1 100644
      --- a/jdk/src/share/classes/java/lang/ClassLoader.java
      +++ b/jdk/src/share/classes/java/lang/ClassLoader.java
      @@ -55,6 +55,7 @@ import sun.misc.CompoundEnumeration;
       import sun.misc.Resource;
       import sun.misc.URLClassPath;
       import sun.misc.VM;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
       import sun.security.util.SecurityConstants;
       
      @@ -1159,11 +1160,6 @@ public abstract class ClassLoader {
               return java.util.Collections.emptyEnumeration();
           }
       
      -    // index 0: java.lang.ClassLoader.class
      -    // index 1: the immediate caller of index 0.
      -    // index 2: the immediate caller of index 1.
      -    private static native Class<? extends ClassLoader> getCaller(int index);
      -
           /**
            * Registers the caller as parallel capable.</p>
            * The registration succeeds if and only if all of the following
      @@ -1179,8 +1175,11 @@ public abstract class ClassLoader {
            *
            * @since   1.7
            */
      +    @CallerSensitive
           protected static boolean registerAsParallelCapable() {
      -        return ParallelLoaders.register(getCaller(1));
      +        Class<? extends ClassLoader> callerClass =
      +            Reflection.getCallerClass().asSubclass(ClassLoader.class);
      +        return ParallelLoaders.register(callerClass);
           }
       
           /**
      @@ -1340,15 +1339,13 @@ public abstract class ClassLoader {
            *
            * @since  1.2
            */
      +    @CallerSensitive
           public final ClassLoader getParent() {
               if (parent == null)
                   return null;
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            ClassLoader ccl = getCallerClassLoader();
      -            if (needsClassLoaderPermissionCheck(ccl, this)) {
      -                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      -            }
      +            checkClassLoaderPermission(this, Reflection.getCallerClass());
               }
               return parent;
           }
      @@ -1408,6 +1405,7 @@ public abstract class ClassLoader {
            *
            * @revised  1.4
            */
      +    @CallerSensitive
           public static ClassLoader getSystemClassLoader() {
               initSystemClassLoader();
               if (scl == null) {
      @@ -1415,10 +1413,7 @@ public abstract class ClassLoader {
               }
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            ClassLoader ccl = getCallerClassLoader();
      -            if (needsClassLoaderPermissionCheck(ccl, scl)) {
      -                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      -            }
      +            checkClassLoaderPermission(scl, Reflection.getCallerClass());
               }
               return scl;
           }
      @@ -1471,8 +1466,8 @@ public abstract class ClassLoader {
           // class loader 'from' is same as class loader 'to' or an ancestor
           // of 'to'.  The class loader in a system domain can access
           // any class loader.
      -    static boolean needsClassLoaderPermissionCheck(ClassLoader from,
      -                                                   ClassLoader to)
      +    private static boolean needsClassLoaderPermissionCheck(ClassLoader from,
      +                                                           ClassLoader to)
           {
               if (from == to)
                   return false;
      @@ -1483,13 +1478,8 @@ public abstract class ClassLoader {
               return !to.isAncestor(from);
           }
       
      -    // Returns the invoker's class loader, or null if none.
      -    // NOTE: This must always be invoked when there is exactly one intervening
      -    // frame from the core libraries on the stack between this method's
      -    // invocation and the desired invoker.
      -    static ClassLoader getCallerClassLoader() {
      -        // NOTE use of more generic Reflection.getCallerClass()
      -        Class<?> caller = Reflection.getCallerClass(3);
      +    // Returns the class's class loader, or null if none.
      +    static ClassLoader getClassLoader(Class<?> caller) {
               // This can be null if the VM is requesting it
               if (caller == null) {
                   return null;
      @@ -1498,6 +1488,17 @@ public abstract class ClassLoader {
               return caller.getClassLoader0();
           }
       
      +    static void checkClassLoaderPermission(ClassLoader cl, Class<?> caller) {
      +        SecurityManager sm = System.getSecurityManager();
      +        if (sm != null) {
      +            // caller can be null if the VM is requesting it
      +            ClassLoader ccl = getClassLoader(caller);
      +            if (needsClassLoaderPermissionCheck(ccl, cl)) {
      +                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      +            }
      +        }
      +    }
      +
           // The class loader for the system
           // @GuardedBy("ClassLoader.class")
           private static ClassLoader scl;
      diff --git a/jdk/src/share/classes/java/lang/Package.java b/jdk/src/share/classes/java/lang/Package.java
      index 7d1d38db64d..d22e3ece462 100644
      --- a/jdk/src/share/classes/java/lang/Package.java
      +++ b/jdk/src/share/classes/java/lang/Package.java
      @@ -49,6 +49,8 @@ import java.util.HashMap;
       import java.util.Iterator;
       
       import sun.net.www.ParseUtil;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       
       import java.lang.annotation.Annotation;
       
      @@ -273,8 +275,9 @@ public class Package implements java.lang.reflect.AnnotatedElement {
            * @return the package of the requested name. It may be null if no package
            *          information is available from the archive or codebase.
            */
      +    @CallerSensitive
           public static Package getPackage(String name) {
      -        ClassLoader l = ClassLoader.getCallerClassLoader();
      +        ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass());
               if (l != null) {
                   return l.getPackage(name);
               } else {
      @@ -294,8 +297,9 @@ public class Package implements java.lang.reflect.AnnotatedElement {
            * @return a new array of packages known to the callers {@code ClassLoader}
            * instance.  An zero length array is returned if none are known.
            */
      +    @CallerSensitive
           public static Package[] getPackages() {
      -        ClassLoader l = ClassLoader.getCallerClassLoader();
      +        ClassLoader l = ClassLoader.getClassLoader(Reflection.getCallerClass());
               if (l != null) {
                   return l.getPackages();
               } else {
      diff --git a/jdk/src/share/classes/java/lang/Runtime.java b/jdk/src/share/classes/java/lang/Runtime.java
      index ada915dbb60..6275e2859d0 100644
      --- a/jdk/src/share/classes/java/lang/Runtime.java
      +++ b/jdk/src/share/classes/java/lang/Runtime.java
      @@ -27,6 +27,8 @@ package java.lang;
       
       import java.io.*;
       import java.util.StringTokenizer;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       
       /**
        * Every Java application has a single instance of class
      @@ -790,8 +792,9 @@ public class Runtime {
            * @see        java.lang.SecurityException
            * @see        java.lang.SecurityManager#checkLink(java.lang.String)
            */
      +    @CallerSensitive
           public void load(String filename) {
      -        load0(System.getCallerClass(), filename);
      +        load0(Reflection.getCallerClass(), filename);
           }
       
           synchronized void load0(Class<?> fromClass, String filename) {
      @@ -850,8 +853,9 @@ public class Runtime {
            * @see        java.lang.SecurityException
            * @see        java.lang.SecurityManager#checkLink(java.lang.String)
            */
      +    @CallerSensitive
           public void loadLibrary(String libname) {
      -        loadLibrary0(System.getCallerClass(), libname);
      +        loadLibrary0(Reflection.getCallerClass(), libname);
           }
       
           synchronized void loadLibrary0(Class<?> fromClass, String libname) {
      diff --git a/jdk/src/share/classes/java/lang/SecurityManager.java b/jdk/src/share/classes/java/lang/SecurityManager.java
      index 31664dc6cb2..ca187630528 100644
      --- a/jdk/src/share/classes/java/lang/SecurityManager.java
      +++ b/jdk/src/share/classes/java/lang/SecurityManager.java
      @@ -36,10 +36,10 @@ import java.net.SocketPermission;
       import java.net.NetPermission;
       import java.util.Hashtable;
       import java.net.InetAddress;
      -import java.lang.reflect.Member;
       import java.lang.reflect.*;
       import java.net.URL;
       
      +import sun.reflect.CallerSensitive;
       import sun.security.util.SecurityConstants;
       
       /**
      @@ -1679,6 +1679,7 @@ class SecurityManager {
            * @since JDK1.1
            * @see        #checkPermission(java.security.Permission) checkPermission
            */
      +    @CallerSensitive
           public void checkMemberAccess(Class<?> clazz, int which) {
               if (clazz == null) {
                   throw new NullPointerException("class can't be null");
      diff --git a/jdk/src/share/classes/java/lang/System.java b/jdk/src/share/classes/java/lang/System.java
      index 9d1663ae819..c7f69f5e496 100644
      --- a/jdk/src/share/classes/java/lang/System.java
      +++ b/jdk/src/share/classes/java/lang/System.java
      @@ -35,6 +35,7 @@ import java.security.AllPermission;
       import java.nio.channels.Channel;
       import java.nio.channels.spi.SelectorProvider;
       import sun.nio.ch.Interruptible;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
       import sun.security.util.SecurityConstants;
       import sun.reflect.annotation.AnnotationType;
      @@ -1072,8 +1073,9 @@ public final class System {
            * @see        java.lang.Runtime#load(java.lang.String)
            * @see        java.lang.SecurityManager#checkLink(java.lang.String)
            */
      +    @CallerSensitive
           public static void load(String filename) {
      -        Runtime.getRuntime().load0(getCallerClass(), filename);
      +        Runtime.getRuntime().load0(Reflection.getCallerClass(), filename);
           }
       
           /**
      @@ -1107,8 +1109,9 @@ public final class System {
            * @see        java.lang.Runtime#loadLibrary(java.lang.String)
            * @see        java.lang.SecurityManager#checkLink(java.lang.String)
            */
      +    @CallerSensitive
           public static void loadLibrary(String libname) {
      -        Runtime.getRuntime().loadLibrary0(getCallerClass(), libname);
      +        Runtime.getRuntime().loadLibrary0(Reflection.getCallerClass(), libname);
           }
       
           /**
      @@ -1245,10 +1248,4 @@ public final class System {
                   }
               });
           }
      -
      -    /* returns the class of the caller. */
      -    static Class<?> getCallerClass() {
      -        // NOTE use of more generic Reflection.getCallerClass()
      -        return Reflection.getCallerClass(3);
      -    }
       }
      diff --git a/jdk/src/share/classes/java/lang/Thread.java b/jdk/src/share/classes/java/lang/Thread.java
      index 8aab573ded7..e418f1f9a93 100644
      --- a/jdk/src/share/classes/java/lang/Thread.java
      +++ b/jdk/src/share/classes/java/lang/Thread.java
      @@ -37,6 +37,8 @@ import java.util.concurrent.ConcurrentHashMap;
       import java.util.concurrent.ConcurrentMap;
       import java.util.concurrent.locks.LockSupport;
       import sun.nio.ch.Interruptible;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       import sun.security.util.SecurityConstants;
       
       
      @@ -1443,15 +1445,14 @@ class Thread implements Runnable {
            *
            * @since 1.2
            */
      +    @CallerSensitive
           public ClassLoader getContextClassLoader() {
               if (contextClassLoader == null)
                   return null;
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            ClassLoader ccl = ClassLoader.getCallerClassLoader();
      -            if (ClassLoader.needsClassLoaderPermissionCheck(ccl, contextClassLoader)) {
      -                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      -            }
      +            ClassLoader.checkClassLoaderPermission(contextClassLoader,
      +                                                   Reflection.getCallerClass());
               }
               return contextClassLoader;
           }
      diff --git a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
      index 9bbc09c32ce..846920a59a9 100644
      --- a/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
      +++ b/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java
      @@ -709,7 +709,9 @@ import jdk.internal.org.objectweb.asm.Type;
                   InvokerBytecodeGenerator.maybeDump(className, classFile);
                   Class<? extends BoundMethodHandle> bmhClass =
                       //UNSAFE.defineAnonymousClass(BoundMethodHandle.class, classFile, null).asSubclass(BoundMethodHandle.class);
      -                UNSAFE.defineClass(className, classFile, 0, classFile.length).asSubclass(BoundMethodHandle.class);
      +                UNSAFE.defineClass(className, classFile, 0, classFile.length,
      +                                   BoundMethodHandle.class.getClassLoader(), null)
      +                    .asSubclass(BoundMethodHandle.class);
                   UNSAFE.ensureClassInitialized(bmhClass);
       
                   return bmhClass;
      diff --git a/jdk/src/share/classes/java/lang/invoke/MemberName.java b/jdk/src/share/classes/java/lang/invoke/MemberName.java
      index da8edae1153..59096015acc 100644
      --- a/jdk/src/share/classes/java/lang/invoke/MemberName.java
      +++ b/jdk/src/share/classes/java/lang/invoke/MemberName.java
      @@ -391,10 +391,11 @@ import java.util.Objects;
       
           // private flags, not part of RECOGNIZED_MODIFIERS:
           static final int
      -            IS_METHOD      = MN_IS_METHOD,      // method (not constructor)
      -            IS_CONSTRUCTOR = MN_IS_CONSTRUCTOR, // constructor
      -            IS_FIELD       = MN_IS_FIELD,       // field
      -            IS_TYPE        = MN_IS_TYPE;        // nested type
      +            IS_METHOD        = MN_IS_METHOD,        // method (not constructor)
      +            IS_CONSTRUCTOR   = MN_IS_CONSTRUCTOR,   // constructor
      +            IS_FIELD         = MN_IS_FIELD,         // field
      +            IS_TYPE          = MN_IS_TYPE,          // nested type
      +            CALLER_SENSITIVE = MN_CALLER_SENSITIVE; // @CallerSensitive annotation detected
       
           static final int ALL_ACCESS = Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED;
           static final int ALL_KINDS = IS_METHOD | IS_CONSTRUCTOR | IS_FIELD | IS_TYPE;
      @@ -430,6 +431,10 @@ import java.util.Objects;
           public boolean isPackage() {
               return !testAnyFlags(ALL_ACCESS);
           }
      +    /** Query whether this member has a CallerSensitive annotation. */
      +    public boolean isCallerSensitive() {
      +        return testAllFlags(CALLER_SENSITIVE);
      +    }
       
           /** Utility method to query whether this member is accessible from a given lookup class. */
           public boolean isAccessibleFrom(Class<?> lookupClass) {
      diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java
      index a18a7a484a8..8efbda80614 100644
      --- a/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java
      +++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java
      @@ -34,6 +34,8 @@ import sun.invoke.empty.Empty;
       import sun.invoke.util.ValueConversions;
       import sun.invoke.util.VerifyType;
       import sun.invoke.util.Wrapper;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       import static java.lang.invoke.LambdaForm.*;
       import static java.lang.invoke.MethodHandleStatics.*;
       import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
      @@ -891,9 +893,11 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
                   }
               }
       
      +        @CallerSensitive
               private static boolean checkCallerClass(Class<?> expected, Class<?> expected2) {
      -            final int FRAME_COUNT_ARG = 2;  // [0] Reflection [1] BindCaller [2] Expected
      -            Class<?> actual = sun.reflect.Reflection.getCallerClass(FRAME_COUNT_ARG);
      +            // This method is called via MH_checkCallerClass and so it's
      +            // correct to ask for the immediate caller here.
      +            Class<?> actual = Reflection.getCallerClass();
                   if (actual != expected && actual != expected2)
                       throw new InternalError("found "+actual.getName()+", expected "+expected.getName()
                                               +(expected == expected2 ? "" : ", or else "+expected2.getName()));
      diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
      index db072126e1f..06e61a7dd8b 100644
      --- a/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
      +++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleNatives.java
      @@ -26,7 +26,6 @@
       package java.lang.invoke;
       
       import java.lang.invoke.MethodHandles.Lookup;
      -import java.lang.reflect.AccessibleObject;
       import java.lang.reflect.Field;
       import static java.lang.invoke.MethodHandleNatives.Constants.*;
       import static java.lang.invoke.MethodHandleStatics.*;
      @@ -34,7 +33,7 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
       
       /**
        * The JVM interface for the method handles package is all here.
      - * This is an interface internal and private to an implemetantion of JSR 292.
      + * This is an interface internal and private to an implementation of JSR 292.
        * <em>This class is not part of the JSR 292 standard.</em>
        * @author jrose
        */
      @@ -101,6 +100,7 @@ class MethodHandleNatives {
                       MN_IS_CONSTRUCTOR      = 0x00020000, // constructor
                       MN_IS_FIELD            = 0x00040000, // field
                       MN_IS_TYPE             = 0x00080000, // nested type
      +                MN_CALLER_SENSITIVE    = 0x00100000, // @CallerSensitive annotation detected
                       MN_REFERENCE_KIND_SHIFT = 24, // refKind
                       MN_REFERENCE_KIND_MASK = 0x0F000000 >> MN_REFERENCE_KIND_SHIFT,
                       // The SEARCH_* bits are not for MN.flags but for the matchFlags argument of MHN.getMembers:
      @@ -391,129 +391,24 @@ class MethodHandleNatives {
            * I.e., does it call Reflection.getCallerClass or a similer method
            * to ask about the identity of its caller?
            */
      -    // FIXME: Replace this pattern match by an annotation @sun.reflect.CallerSensitive.
           static boolean isCallerSensitive(MemberName mem) {
               if (!mem.isInvocable())  return false;  // fields are not caller sensitive
      +
      +        return mem.isCallerSensitive() || canBeCalledVirtual(mem);
      +    }
      +
      +    static boolean canBeCalledVirtual(MemberName mem) {
      +        assert(mem.isInvocable());
               Class<?> defc = mem.getDeclaringClass();
               switch (mem.getName()) {
      -        case "doPrivileged":
      -        case "doPrivilegedWithCombiner":
      -            return defc == java.security.AccessController.class;
               case "checkMemberAccess":
                   return canBeCalledVirtual(mem, java.lang.SecurityManager.class);
      -        case "getUnsafe":
      -            return defc == sun.misc.Unsafe.class;
      -        case "lookup":
      -            return defc == java.lang.invoke.MethodHandles.class;
      -        case "findStatic":
      -        case "findVirtual":
      -        case "findConstructor":
      -        case "findSpecial":
      -        case "findGetter":
      -        case "findSetter":
      -        case "findStaticGetter":
      -        case "findStaticSetter":
      -        case "bind":
      -        case "unreflect":
      -        case "unreflectSpecial":
      -        case "unreflectConstructor":
      -        case "unreflectGetter":
      -        case "unreflectSetter":
      -            return defc == java.lang.invoke.MethodHandles.Lookup.class;
      -        case "invoke":
      -            return defc == java.lang.reflect.Method.class;
      -        case "get":
      -        case "getBoolean":
      -        case "getByte":
      -        case "getChar":
      -        case "getShort":
      -        case "getInt":
      -        case "getLong":
      -        case "getFloat":
      -        case "getDouble":
      -        case "set":
      -        case "setBoolean":
      -        case "setByte":
      -        case "setChar":
      -        case "setShort":
      -        case "setInt":
      -        case "setLong":
      -        case "setFloat":
      -        case "setDouble":
      -            return defc == java.lang.reflect.Field.class;
      -        case "newInstance":
      -            if (defc == java.lang.reflect.Constructor.class)  return true;
      -            if (defc == java.lang.Class.class)  return true;
      -            break;
      -        case "forName":
      -        case "getClassLoader":
      -        case "getClasses":
      -        case "getFields":
      -        case "getMethods":
      -        case "getConstructors":
      -        case "getDeclaredClasses":
      -        case "getDeclaredFields":
      -        case "getDeclaredMethods":
      -        case "getDeclaredConstructors":
      -        case "getField":
      -        case "getMethod":
      -        case "getConstructor":
      -        case "getDeclaredField":
      -        case "getDeclaredMethod":
      -        case "getDeclaredConstructor":
      -            return defc == java.lang.Class.class;
      -        case "getConnection":
      -        case "getDriver":
      -        case "getDrivers":
      -        case "deregisterDriver":
      -            return defc == getClass("java.sql.DriverManager");
      -        case "newUpdater":
      -            if (defc == java.util.concurrent.atomic.AtomicIntegerFieldUpdater.class)  return true;
      -            if (defc == java.util.concurrent.atomic.AtomicLongFieldUpdater.class)  return true;
      -            if (defc == java.util.concurrent.atomic.AtomicReferenceFieldUpdater.class)  return true;
      -            break;
               case "getContextClassLoader":
                   return canBeCalledVirtual(mem, java.lang.Thread.class);
      -        case "getPackage":
      -        case "getPackages":
      -            return defc == java.lang.Package.class;
      -        case "getParent":
      -        case "getSystemClassLoader":
      -            return defc == java.lang.ClassLoader.class;
      -        case "load":
      -        case "loadLibrary":
      -            if (defc == java.lang.Runtime.class)  return true;
      -            if (defc == java.lang.System.class)  return true;
      -            break;
      -        case "getCallerClass":
      -            if (defc == sun.reflect.Reflection.class)  return true;
      -            if (defc == java.lang.System.class)  return true;
      -            break;
      -        case "getCallerClassLoader":
      -            return defc == java.lang.ClassLoader.class;
      -        case "registerAsParallelCapable":
      -            return canBeCalledVirtual(mem, java.lang.ClassLoader.class);
      -        case "getProxyClass":
      -        case "newProxyInstance":
      -            return defc == java.lang.reflect.Proxy.class;
      -        case "asInterfaceInstance":
      -            return defc == java.lang.invoke.MethodHandleProxies.class;
      -        case "getBundle":
      -        case "clearCache":
      -            return defc == java.util.ResourceBundle.class;
               }
               return false;
           }
       
      -    // avoid static dependency to a class in other modules
      -    private static Class<?> getClass(String cn) {
      -        try {
      -            return Class.forName(cn, false,
      -                                 MethodHandleNatives.class.getClassLoader());
      -        } catch (ClassNotFoundException e) {
      -            throw new InternalError(e);
      -        }
      -    }
           static boolean canBeCalledVirtual(MemberName symbolicRef, Class<?> definingClass) {
               Class<?> symbolicRefClass = symbolicRef.getDeclaringClass();
               if (symbolicRefClass == definingClass)  return true;
      diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java b/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
      index ade1630dcfb..641f2eeea51 100644
      --- a/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
      +++ b/jdk/src/share/classes/java/lang/invoke/MethodHandleProxies.java
      @@ -30,6 +30,7 @@ import java.security.AccessController;
       import java.security.PrivilegedAction;
       import sun.invoke.WrapperInstance;
       import java.util.ArrayList;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
       import sun.reflect.misc.ReflectUtil;
       
      @@ -137,14 +138,14 @@ public class MethodHandleProxies {
           // entry points, must be covered by hand-written or automatically
           // generated adapter classes.
           //
      +    @CallerSensitive
           public static
           <T> T asInterfaceInstance(final Class<T> intfc, final MethodHandle target) {
               if (!intfc.isInterface() || !Modifier.isPublic(intfc.getModifiers()))
                   throw new IllegalArgumentException("not a public interface: "+intfc.getName());
               final MethodHandle mh;
               if (System.getSecurityManager() != null) {
      -            final int CALLER_FRAME = 2; // 0: Reflection, 1: asInterfaceInstance, 2: caller
      -            final Class<?> caller = Reflection.getCallerClass(CALLER_FRAME);
      +            final Class<?> caller = Reflection.getCallerClass();
                   final ClassLoader ccl = caller != null ? caller.getClassLoader() : null;
                   ReflectUtil.checkProxyPackageAccess(ccl, intfc);
                   mh = ccl != null ? bindCaller(target, caller) : target;
      diff --git a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java
      index d443e4c4597..fa3cb607855 100644
      --- a/jdk/src/share/classes/java/lang/invoke/MethodHandles.java
      +++ b/jdk/src/share/classes/java/lang/invoke/MethodHandles.java
      @@ -26,13 +26,17 @@
       package java.lang.invoke;
       
       import java.lang.reflect.*;
      -import sun.invoke.util.ValueConversions;
      -import sun.invoke.util.VerifyAccess;
      -import sun.invoke.util.Wrapper;
      +import java.security.AccessController;
      +import java.security.PrivilegedAction;
       import java.util.List;
       import java.util.ArrayList;
       import java.util.Arrays;
      +import sun.invoke.util.ValueConversions;
      +import sun.invoke.util.VerifyAccess;
      +import sun.invoke.util.Wrapper;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
      +import sun.security.util.SecurityConstants;
       import static java.lang.invoke.MethodHandleStatics.*;
       import static java.lang.invoke.MethodHandleNatives.Constants.*;
       
      @@ -65,8 +69,9 @@ public class MethodHandles {
            * This lookup object is a <em>capability</em> which may be delegated to trusted agents.
            * Do not store it in place where untrusted code can access it.
            */
      +    @CallerSensitive
           public static Lookup lookup() {
      -        return new Lookup();
      +        return new Lookup(Reflection.getCallerClass());
           }
       
           /**
      @@ -416,18 +421,11 @@ public class MethodHandles {
                * for method handle creation.
                * Must be called by from a method in this package,
                * which in turn is called by a method not in this package.
      -         * <p>
      -         * Also, don't make it private, lest javac interpose
      -         * an access$N method.
                */
      -        Lookup() {
      -            this(getCallerClassAtEntryPoint(false), ALL_MODES);
      -            // make sure we haven't accidentally picked up a privileged class:
      -            checkUnprivilegedlookupClass(lookupClass);
      -        }
      -
               Lookup(Class<?> lookupClass) {
                   this(lookupClass, ALL_MODES);
      +            // make sure we haven't accidentally picked up a privileged class:
      +            checkUnprivilegedlookupClass(lookupClass);
               }
       
               private Lookup(Class<?> lookupClass, int allowedModes) {
      @@ -554,20 +552,6 @@ public class MethodHandles {
                   }
               }
       
      -        /* Obtain the external caller class, when called from Lookup.<init> or a first-level subroutine. */
      -        private static Class<?> getCallerClassAtEntryPoint(boolean inSubroutine) {
      -            final int CALLER_DEPTH = 4;
      -            //  Stack for the constructor entry point (inSubroutine=false):
      -            // 0: Reflection.getCC, 1: getCallerClassAtEntryPoint,
      -            // 2: Lookup.<init>, 3: MethodHandles.*, 4: caller
      -            //  The stack is slightly different for a subroutine of a Lookup.find* method:
      -            // 2: Lookup.*, 3: Lookup.find*.*, 4: caller
      -            // Note:  This should be the only use of getCallerClass in this file.
      -            assert(Reflection.getCallerClass(CALLER_DEPTH-2) == Lookup.class);
      -            assert(Reflection.getCallerClass(CALLER_DEPTH-1) == (inSubroutine ? Lookup.class : MethodHandles.class));
      -            return Reflection.getCallerClass(CALLER_DEPTH);
      -        }
      -
               /**
                * Produces a method handle for a static method.
                * The type of the method handle will be that of the method.
      @@ -594,12 +578,14 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public
               MethodHandle findStatic(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
                   MemberName method = resolveOrFail(REF_invokeStatic, refc, name, type);
      -            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
      -            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
      -            return getDirectMethod(REF_invokeStatic, refc, method, callerClass);
      +            Class<?> callerClass = Reflection.getCallerClass();
      +            checkSecurityManager(refc, method, callerClass);
      +            return getDirectMethod(REF_invokeStatic, refc, method,
      +                                   findBoundCallerClass(method, callerClass));
               }
       
               /**
      @@ -645,6 +631,7 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findVirtual(Class<?> refc, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
                   if (refc == MethodHandle.class) {
                       MethodHandle mh = findVirtualForMH(name, type);
      @@ -652,9 +639,10 @@ public class MethodHandles {
                   }
                   byte refKind = (refc.isInterface() ? REF_invokeInterface : REF_invokeVirtual);
                   MemberName method = resolveOrFail(refKind, refc, name, type);
      -            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
      -            Class<?> callerClass = findBoundCallerClass(method);
      -            return getDirectMethod(refKind, refc, method, callerClass);
      +            Class<?> callerClass = Reflection.getCallerClass();
      +            checkSecurityManager(refc, method, callerClass);
      +            return getDirectMethod(refKind, refc, method,
      +                                   findBoundCallerClass(method, callerClass));
               }
               private MethodHandle findVirtualForMH(String name, MethodType type) {
                   // these names require special lookups because of the implicit MethodType argument
      @@ -691,10 +679,11 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findConstructor(Class<?> refc, MethodType type) throws NoSuchMethodException, IllegalAccessException {
                   String name = "<init>";
                   MemberName ctor = resolveOrFail(REF_newInvokeSpecial, refc, name, type);
      -            checkSecurityManager(refc, ctor);  // stack walk magic: do not refactor
      +            checkSecurityManager(refc, ctor, Reflection.getCallerClass());
                   return getDirectConstructor(refc, ctor);
               }
       
      @@ -732,14 +721,16 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findSpecial(Class<?> refc, String name, MethodType type,
                                               Class<?> specialCaller) throws NoSuchMethodException, IllegalAccessException {
                   checkSpecialCaller(specialCaller);
                   Lookup specialLookup = this.in(specialCaller);
                   MemberName method = specialLookup.resolveOrFail(REF_invokeSpecial, refc, name, type);
      -            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
      -            Class<?> callerClass = findBoundCallerClass(method);
      -            return specialLookup.getDirectMethod(REF_invokeSpecial, refc, method, callerClass);
      +            Class<?> callerClass = Reflection.getCallerClass();
      +            checkSecurityManager(refc, method, callerClass);
      +            return specialLookup.getDirectMethod(REF_invokeSpecial, refc, method,
      +                                                 findBoundCallerClass(method, callerClass));
               }
       
               /**
      @@ -759,9 +750,10 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
                   MemberName field = resolveOrFail(REF_getField, refc, name, type);
      -            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
      +            checkSecurityManager(refc, field, Reflection.getCallerClass());
                   return getDirectField(REF_getField, refc, field);
               }
       
      @@ -782,9 +774,10 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
                   MemberName field = resolveOrFail(REF_putField, refc, name, type);
      -            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
      +            checkSecurityManager(refc, field, Reflection.getCallerClass());
                   return getDirectField(REF_putField, refc, field);
               }
       
      @@ -804,9 +797,10 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findStaticGetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
                   MemberName field = resolveOrFail(REF_getStatic, refc, name, type);
      -            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
      +            checkSecurityManager(refc, field, Reflection.getCallerClass());
                   return getDirectField(REF_getStatic, refc, field);
               }
       
      @@ -826,9 +820,10 @@ public class MethodHandles {
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle findStaticSetter(Class<?> refc, String name, Class<?> type) throws NoSuchFieldException, IllegalAccessException {
                   MemberName field = resolveOrFail(REF_putStatic, refc, name, type);
      -            checkSecurityManager(refc, field);  // stack walk magic: do not refactor
      +            checkSecurityManager(refc, field, Reflection.getCallerClass());
                   return getDirectField(REF_putStatic, refc, field);
               }
       
      @@ -878,12 +873,14 @@ return mh1;
                *                              <a href="MethodHandles.Lookup.html#secmgr">refuses access</a>
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle bind(Object receiver, String name, MethodType type) throws NoSuchMethodException, IllegalAccessException {
                   Class<? extends Object> refc = receiver.getClass(); // may get NPE
                   MemberName method = resolveOrFail(REF_invokeSpecial, refc, name, type);
      -            checkSecurityManager(refc, method);  // stack walk magic: do not refactor
      -            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
      -            MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method, callerClass);
      +            Class<?> callerClass = Reflection.getCallerClass();
      +            checkSecurityManager(refc, method, callerClass);
      +            MethodHandle mh = getDirectMethodNoRestrict(REF_invokeSpecial, refc, method,
      +                                                        findBoundCallerClass(method, callerClass));
                   return mh.bindReceiver(receiver).setVarargs(method);
               }
       
      @@ -908,13 +905,14 @@ return mh1;
                *                                is set and {@code asVarargsCollector} fails
                * @throws NullPointerException if the argument is null
                */
      +        @CallerSensitive
               public MethodHandle unreflect(Method m) throws IllegalAccessException {
                   MemberName method = new MemberName(m);
                   byte refKind = method.getReferenceKind();
                   if (refKind == REF_invokeSpecial)
                       refKind = REF_invokeVirtual;
                   assert(method.isMethod());
      -            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
      +            Class<?> callerClass = findBoundCallerClass(method, Reflection.getCallerClass());
                   Lookup lookup = m.isAccessible() ? IMPL_LOOKUP : this;
                   return lookup.getDirectMethod(refKind, method.getDeclaringClass(), method, callerClass);
               }
      @@ -940,12 +938,13 @@ return mh1;
                *                                is set and {@code asVarargsCollector} fails
                * @throws NullPointerException if any argument is null
                */
      +        @CallerSensitive
               public MethodHandle unreflectSpecial(Method m, Class<?> specialCaller) throws IllegalAccessException {
                   checkSpecialCaller(specialCaller);
                   Lookup specialLookup = this.in(specialCaller);
                   MemberName method = new MemberName(m, true);
                   assert(method.isMethod());
      -            Class<?> callerClass = findBoundCallerClass(method);  // stack walk magic: do not refactor
      +            Class<?> callerClass = findBoundCallerClass(method, Reflection.getCallerClass());
                   // ignore m.isAccessible:  this is a new kind of access
                   return specialLookup.getDirectMethod(REF_invokeSpecial, method.getDeclaringClass(), method, callerClass);
               }
      @@ -1050,20 +1049,35 @@ return mh1;
                * If this lookup object has private access, then the caller class is the lookupClass.
                * Otherwise, it is the caller of the currently executing public API method (e.g., findVirtual).
                * This is the same caller class as is used by checkSecurityManager.
      -         * This function performs stack walk magic: do not refactor it.
                */
      -        Class<?> findBoundCallerClass(MemberName m) {
      +        Class<?> findBoundCallerClass(MemberName m, Class<?> callerAtEntryPoint) {
                   Class<?> callerClass = null;
                   if (MethodHandleNatives.isCallerSensitive(m)) {
                       // Do not refactor this to a more "logical" place, since it is stack walk magic.
                       // Note that this is the same expression as in Step 2 below in checkSecurityManager.
                       callerClass = ((allowedModes & PRIVATE) != 0
                                      ? lookupClass  // for strong access modes, no extra check
      -                               // next line does stack walk magic; do not refactor:
      -                               : getCallerClassAtEntryPoint(true));
      +                               : callerAtEntryPoint);
                   }
                   return callerClass;
               }
      +
      +        /**
      +         * Determine whether a security manager has an overridden
      +         * SecurityManager.checkMemberAccess method.
      +         */
      +        private boolean isCheckMemberAccessOverridden(SecurityManager sm) {
      +            final Class<? extends SecurityManager> cls = sm.getClass();
      +            if (cls == SecurityManager.class) return false;
      +
      +            try {
      +                return cls.getMethod("checkMemberAccess", Class.class, int.class).
      +                    getDeclaringClass() != SecurityManager.class;
      +            } catch (NoSuchMethodException e) {
      +                throw new InternalError("should not reach here");
      +            }
      +        }
      +
               /**
                * Perform necessary <a href="MethodHandles.Lookup.html#secmgr">access checks</a>.
                * Determines a trustable caller class to compare with refc, the symbolic reference class.
      @@ -1071,46 +1085,55 @@ return mh1;
                * Otherwise, it is the caller of the currently executing public API method (e.g., findVirtual).
                * This function performs stack walk magic: do not refactor it.
                */
      -        void checkSecurityManager(Class<?> refc, MemberName m) {
      +        void checkSecurityManager(Class<?> refc, MemberName m, Class<?> caller) {
                   SecurityManager smgr = System.getSecurityManager();
                   if (smgr == null)  return;
                   if (allowedModes == TRUSTED)  return;
      +
      +            final boolean overridden = isCheckMemberAccessOverridden(smgr);
                   // Step 1:
      -            smgr.checkMemberAccess(refc, Member.PUBLIC);
      +            {
      +                // Default policy is to allow Member.PUBLIC; no need to check
      +                // permission if SecurityManager is the default implementation
      +                final int which = Member.PUBLIC;
      +                final Class<?> clazz = refc;
      +                if (overridden) {
      +                    // Don't refactor; otherwise break the stack depth for
      +                    // checkMemberAccess of subclasses of SecurityManager as specified.
      +                    smgr.checkMemberAccess(clazz, which);
      +                }
      +            }
      +
                   // Step 2:
                   Class<?> callerClass = ((allowedModes & PRIVATE) != 0
                                           ? lookupClass  // for strong access modes, no extra check
      -                                    // next line does stack walk magic; do not refactor:
      -                                    : getCallerClassAtEntryPoint(true));
      +                                    : caller);
                   if (!VerifyAccess.classLoaderIsAncestor(lookupClass, refc) ||
                       (callerClass != lookupClass &&
                        !VerifyAccess.classLoaderIsAncestor(callerClass, refc)))
                       smgr.checkPackageAccess(VerifyAccess.getPackageName(refc));
      +
                   // Step 3:
                   if (m.isPublic()) return;
                   Class<?> defc = m.getDeclaringClass();
      -            smgr.checkMemberAccess(defc, Member.DECLARED);  // STACK WALK HERE
      +            {
      +                // Inline SecurityManager.checkMemberAccess
      +                final int which = Member.DECLARED;
      +                final Class<?> clazz = defc;
      +                if (!overridden) {
      +                    if (caller.getClassLoader() != clazz.getClassLoader()) {
      +                        smgr.checkPermission(SecurityConstants.CHECK_MEMBER_ACCESS_PERMISSION);
      +                    }
      +                } else {
      +                    // Don't refactor; otherwise break the stack depth for
      +                    // checkMemberAccess of subclasses of SecurityManager as specified.
      +                    smgr.checkMemberAccess(clazz, which);
      +                }
      +            }
      +
                   // Step 4:
                   if (defc != refc)
                       smgr.checkPackageAccess(VerifyAccess.getPackageName(defc));
      -
      -            // Comment from SM.checkMemberAccess, where which=DECLARED:
      -            /*
      -             * stack depth of 4 should be the caller of one of the
      -             * methods in java.lang.Class that invoke checkMember
      -             * access. The stack should look like:
      -             *
      -             * someCaller                        [3]
      -             * java.lang.Class.someReflectionAPI [2]
      -             * java.lang.Class.checkMemberAccess [1]
      -             * SecurityManager.checkMemberAccess [0]
      -             *
      -             */
      -            // For us it is this stack:
      -            // someCaller                        [3]
      -            // Lookup.findSomeMember             [2]
      -            // Lookup.checkSecurityManager       [1]
      -            // SecurityManager.checkMemberAccess [0]
               }
       
               void checkMethod(byte refKind, Class<?> refc, MemberName m) throws IllegalAccessException {
      diff --git a/jdk/src/share/classes/java/lang/reflect/Constructor.java b/jdk/src/share/classes/java/lang/reflect/Constructor.java
      index 14a515fe949..0ed60dc375b 100644
      --- a/jdk/src/share/classes/java/lang/reflect/Constructor.java
      +++ b/jdk/src/share/classes/java/lang/reflect/Constructor.java
      @@ -25,6 +25,7 @@
       
       package java.lang.reflect;
       
      +import sun.reflect.CallerSensitive;
       import sun.reflect.ConstructorAccessor;
       import sun.reflect.Reflection;
       import sun.reflect.generics.repository.ConstructorRepository;
      @@ -392,14 +393,14 @@ public final class Constructor<T> extends Executable {
            * @exception ExceptionInInitializerError if the initialization provoked
            *              by this method fails.
            */
      +    @CallerSensitive
           public T newInstance(Object ... initargs)
               throws InstantiationException, IllegalAccessException,
                      IllegalArgumentException, InvocationTargetException
           {
               if (!override) {
                   if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      -                Class<?> caller = Reflection.getCallerClass(2);
      -
      +                Class<?> caller = Reflection.getCallerClass();
                       checkAccess(caller, clazz, null, modifiers);
                   }
               }
      diff --git a/jdk/src/share/classes/java/lang/reflect/Field.java b/jdk/src/share/classes/java/lang/reflect/Field.java
      index bd2b9ef929f..a25223f68c1 100644
      --- a/jdk/src/share/classes/java/lang/reflect/Field.java
      +++ b/jdk/src/share/classes/java/lang/reflect/Field.java
      @@ -25,6 +25,7 @@
       
       package java.lang.reflect;
       
      +import sun.reflect.CallerSensitive;
       import sun.reflect.FieldAccessor;
       import sun.reflect.Reflection;
       import sun.reflect.generics.repository.FieldRepository;
      @@ -376,9 +377,16 @@ class Field extends AccessibleObject implements Member {
            * @exception ExceptionInInitializerError if the initialization provoked
            *              by this method fails.
            */
      +    @CallerSensitive
           public Object get(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).get(obj);
           }
       
      @@ -404,9 +412,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#get
            */
      +    @CallerSensitive
           public boolean getBoolean(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getBoolean(obj);
           }
       
      @@ -432,9 +447,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#get
            */
      +    @CallerSensitive
           public byte getByte(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getByte(obj);
           }
       
      @@ -462,9 +484,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see Field#get
            */
      +    @CallerSensitive
           public char getChar(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getChar(obj);
           }
       
      @@ -492,9 +521,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#get
            */
      +    @CallerSensitive
           public short getShort(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getShort(obj);
           }
       
      @@ -522,9 +558,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#get
            */
      +    @CallerSensitive
           public int getInt(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getInt(obj);
           }
       
      @@ -552,9 +595,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#get
            */
      +    @CallerSensitive
           public long getLong(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getLong(obj);
           }
       
      @@ -582,9 +632,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see Field#get
            */
      +    @CallerSensitive
           public float getFloat(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getFloat(obj);
           }
       
      @@ -612,9 +669,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#get
            */
      +    @CallerSensitive
           public double getDouble(Object obj)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               return getFieldAccessor(obj).getDouble(obj);
           }
       
      @@ -684,9 +748,16 @@ class Field extends AccessibleObject implements Member {
            * @exception ExceptionInInitializerError if the initialization provoked
            *              by this method fails.
            */
      +    @CallerSensitive
           public void set(Object obj, Object value)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).set(obj, value);
           }
       
      @@ -714,9 +785,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setBoolean(Object obj, boolean z)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setBoolean(obj, z);
           }
       
      @@ -744,9 +822,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setByte(Object obj, byte b)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setByte(obj, b);
           }
       
      @@ -774,9 +859,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setChar(Object obj, char c)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setChar(obj, c);
           }
       
      @@ -804,9 +896,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setShort(Object obj, short s)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setShort(obj, s);
           }
       
      @@ -834,9 +933,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setInt(Object obj, int i)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setInt(obj, i);
           }
       
      @@ -864,9 +970,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setLong(Object obj, long l)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setLong(obj, l);
           }
       
      @@ -894,9 +1007,16 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setFloat(Object obj, float f)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setFloat(obj, f);
           }
       
      @@ -924,20 +1044,26 @@ class Field extends AccessibleObject implements Member {
            *              by this method fails.
            * @see       Field#set
            */
      +    @CallerSensitive
           public void setDouble(Object obj, double d)
               throws IllegalArgumentException, IllegalAccessException
           {
      +        if (!override) {
      +            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      +                Class<?> caller = Reflection.getCallerClass();
      +                checkAccess(caller, clazz, obj, modifiers);
      +            }
      +        }
               getFieldAccessor(obj).setDouble(obj, d);
           }
       
      -    // Convenience routine which performs security checks
      +    // security check is done before calling this method
           private FieldAccessor getFieldAccessor(Object obj)
               throws IllegalAccessException
           {
      -        doSecurityCheck(obj);
               boolean ov = override;
      -        FieldAccessor a = (ov)? overrideFieldAccessor : fieldAccessor;
      -        return (a != null)? a : acquireFieldAccessor(ov);
      +        FieldAccessor a = (ov) ? overrideFieldAccessor : fieldAccessor;
      +        return (a != null) ? a : acquireFieldAccessor(ov);
           }
       
           // NOTE that there is no synchronization used here. It is correct
      @@ -982,19 +1108,6 @@ class Field extends AccessibleObject implements Member {
               }
           }
       
      -    // NOTE: be very careful if you change the stack depth of this
      -    // routine. The depth of the "getCallerClass" call is hardwired so
      -    // that the compiler can have an easier time if this gets inlined.
      -    private void doSecurityCheck(Object obj) throws IllegalAccessException {
      -        if (!override) {
      -            if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      -                Class<?> caller = Reflection.getCallerClass(4);
      -
      -                checkAccess(caller, clazz, obj, modifiers);
      -            }
      -        }
      -    }
      -
           /**
            * @throws NullPointerException {@inheritDoc}
            * @since 1.5
      diff --git a/jdk/src/share/classes/java/lang/reflect/Method.java b/jdk/src/share/classes/java/lang/reflect/Method.java
      index 1caddd6f522..7c7abe43dff 100644
      --- a/jdk/src/share/classes/java/lang/reflect/Method.java
      +++ b/jdk/src/share/classes/java/lang/reflect/Method.java
      @@ -25,6 +25,7 @@
       
       package java.lang.reflect;
       
      +import sun.reflect.CallerSensitive;
       import sun.reflect.MethodAccessor;
       import sun.reflect.Reflection;
       import sun.reflect.generics.repository.MethodRepository;
      @@ -472,14 +473,14 @@ public final class Method extends Executable {
            * @exception ExceptionInInitializerError if the initialization
            * provoked by this method fails.
            */
      +    @CallerSensitive
           public Object invoke(Object obj, Object... args)
               throws IllegalAccessException, IllegalArgumentException,
                  InvocationTargetException
           {
               if (!override) {
                   if (!Reflection.quickCheckMemberAccess(clazz, modifiers)) {
      -                Class<?> caller = Reflection.getCallerClass(1);
      -
      +                Class<?> caller = Reflection.getCallerClass();
                       checkAccess(caller, clazz, obj, modifiers);
                   }
               }
      diff --git a/jdk/src/share/classes/java/lang/reflect/Proxy.java b/jdk/src/share/classes/java/lang/reflect/Proxy.java
      index e946ba3226d..2dd06020b26 100644
      --- a/jdk/src/share/classes/java/lang/reflect/Proxy.java
      +++ b/jdk/src/share/classes/java/lang/reflect/Proxy.java
      @@ -39,6 +39,8 @@ import java.util.Set;
       import java.util.List;
       import java.util.WeakHashMap;
       import sun.misc.ProxyGenerator;
      +import sun.misc.VM;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
       import sun.reflect.misc.ReflectUtil;
       import sun.security.util.SecurityConstants;
      @@ -408,28 +410,21 @@ public class Proxy implements java.io.Serializable {
            * @throws  NullPointerException if the {@code interfaces} array
            *          argument or any of its elements are {@code null}
            */
      +    @CallerSensitive
           public static Class<?> getProxyClass(ClassLoader loader,
                                                Class<?>... interfaces)
               throws IllegalArgumentException
      -    {
      -        return getProxyClass0(loader, interfaces); // stack walk magic: do not refactor
      -    }
      -
      -    private static void checkProxyLoader(ClassLoader ccl,
      -                                         ClassLoader loader)
           {
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            if (loader == null && ccl != null) {
      -                if (!ProxyAccessHelper.allowNullLoader) {
      -                    sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      -                }
      -            }
      +            checkProxyAccess(Reflection.getCallerClass(), loader, interfaces);
               }
      +
      +        return getProxyClass0(loader, interfaces);
           }
       
           /*
      -     * Generate a proxy class (caller-sensitive).
      +     * Check permissions required to create a Proxy class.
            *
            * To define a proxy class, it performs the access checks as in
            * Class.forName (VM will invoke ClassLoader.checkPackageAccess):
      @@ -446,17 +441,28 @@ public class Proxy implements java.io.Serializable {
            * will throw IllegalAccessError when the generated proxy class is
            * being defined via the defineClass0 method.
            */
      -    private static Class<?> getProxyClass0(ClassLoader loader,
      -                                           Class<?>... interfaces) {
      +    private static void checkProxyAccess(Class<?> caller,
      +                                         ClassLoader loader,
      +                                         Class<?>... interfaces)
      +    {
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            final int CALLER_FRAME = 3; // 0: Reflection, 1: getProxyClass0 2: Proxy 3: caller
      -            final Class<?> caller = Reflection.getCallerClass(CALLER_FRAME);
      -            final ClassLoader ccl = caller.getClassLoader();
      -            checkProxyLoader(ccl, loader);
      +            ClassLoader ccl = caller.getClassLoader();
      +            if (VM.isSystemDomainLoader(loader) && !VM.isSystemDomainLoader(ccl)) {
      +                if (!ProxyAccessHelper.allowNullLoader) {
      +                    sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      +                }
      +            }
                   ReflectUtil.checkProxyPackageAccess(ccl, interfaces);
               }
      +    }
       
      +    /**
      +     * Generate a proxy class.  Must call the checkProxyAccess method
      +     * to perform permission checks before calling this.
      +     */
      +    private static Class<?> getProxyClass0(ClassLoader loader,
      +                                           Class<?>... interfaces) {
               if (interfaces.length > 65535) {
                   throw new IllegalArgumentException("interface limit exceeded");
               }
      @@ -698,6 +704,7 @@ public class Proxy implements java.io.Serializable {
            *          if the invocation handler, {@code h}, is
            *          {@code null}
            */
      +    @CallerSensitive
           public static Object newProxyInstance(ClassLoader loader,
                                                 Class<?>[] interfaces,
                                                 InvocationHandler h)
      @@ -707,10 +714,15 @@ public class Proxy implements java.io.Serializable {
                   throw new NullPointerException();
               }
       
      +        final SecurityManager sm = System.getSecurityManager();
      +        if (sm != null) {
      +            checkProxyAccess(Reflection.getCallerClass(), loader, interfaces);
      +        }
      +
               /*
                * Look up or generate the designated proxy class.
                */
      -        Class<?> cl = getProxyClass0(loader, interfaces); // stack walk magic: do not refactor
      +        Class<?> cl = getProxyClass0(loader, interfaces);
       
               /*
                * Invoke its constructor with the designated invocation handler.
      @@ -718,7 +730,6 @@ public class Proxy implements java.io.Serializable {
               try {
                   final Constructor<?> cons = cl.getConstructor(constructorParams);
                   final InvocationHandler ih = h;
      -            SecurityManager sm = System.getSecurityManager();
                   if (sm != null && ProxyAccessHelper.needsNewInstanceCheck(cl)) {
                       // create proxy instance with doPrivilege as the proxy class may
                       // implement non-public interfaces that requires a special permission
      diff --git a/jdk/src/share/classes/java/security/AccessController.java b/jdk/src/share/classes/java/security/AccessController.java
      index 4e790ffc8da..e7fbe737a8e 100644
      --- a/jdk/src/share/classes/java/security/AccessController.java
      +++ b/jdk/src/share/classes/java/security/AccessController.java
      @@ -26,6 +26,8 @@
       package java.security;
       
       import sun.security.util.Debug;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       
       /**
        * <p> The AccessController class is used for access control operations
      @@ -264,6 +266,7 @@ public final class AccessController {
            * @see java.security.DomainCombiner
            */
       
      +    @CallerSensitive
           public static native <T> T doPrivileged(PrivilegedAction<T> action);
       
           /**
      @@ -288,14 +291,15 @@ public final class AccessController {
            *
            * @since 1.6
            */
      +    @CallerSensitive
           public static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action) {
      -
               AccessControlContext acc = getStackAccessControlContext();
               if (acc == null) {
                   return AccessController.doPrivileged(action);
               }
               DomainCombiner dc = acc.getAssignedCombiner();
      -        return AccessController.doPrivileged(action, preserveCombiner(dc));
      +        return AccessController.doPrivileged(action,
      +                                             preserveCombiner(dc, Reflection.getCallerClass()));
           }
       
       
      @@ -326,6 +330,7 @@ public final class AccessController {
            * @see #doPrivileged(PrivilegedAction)
            * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
            */
      +    @CallerSensitive
           public static native <T> T doPrivileged(PrivilegedAction<T> action,
                                                   AccessControlContext context);
       
      @@ -353,6 +358,7 @@ public final class AccessController {
            * @see #doPrivilegedWithCombiner(PrivilegedExceptionAction)
            * @see java.security.DomainCombiner
            */
      +    @CallerSensitive
           public static native <T> T
               doPrivileged(PrivilegedExceptionAction<T> action)
               throws PrivilegedActionException;
      @@ -383,34 +389,29 @@ public final class AccessController {
            *
            * @since 1.6
            */
      -    public static <T> T doPrivilegedWithCombiner
      -        (PrivilegedExceptionAction<T> action) throws PrivilegedActionException {
      -
      +    @CallerSensitive
      +    public static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action)
      +        throws PrivilegedActionException
      +    {
               AccessControlContext acc = getStackAccessControlContext();
               if (acc == null) {
                   return AccessController.doPrivileged(action);
               }
               DomainCombiner dc = acc.getAssignedCombiner();
      -        return AccessController.doPrivileged(action, preserveCombiner(dc));
      +        return AccessController.doPrivileged(action,
      +                                             preserveCombiner(dc, Reflection.getCallerClass()));
           }
       
           /**
            * preserve the combiner across the doPrivileged call
            */
      -    private static AccessControlContext preserveCombiner
      -                                        (DomainCombiner combiner) {
      -
      -        /**
      -         * callerClass[0] = Reflection.getCallerClass
      -         * callerClass[1] = AccessController.preserveCombiner
      -         * callerClass[2] = AccessController.doPrivileged
      -         * callerClass[3] = caller
      -         */
      -        final Class<?> callerClass = sun.reflect.Reflection.getCallerClass(3);
      +    private static AccessControlContext preserveCombiner(DomainCombiner combiner,
      +                                                         Class<?> caller)
      +    {
               ProtectionDomain callerPd = doPrivileged
                   (new PrivilegedAction<ProtectionDomain>() {
                   public ProtectionDomain run() {
      -                return callerClass.getProtectionDomain();
      +                return caller.getProtectionDomain();
                   }
               });
       
      @@ -455,6 +456,7 @@ public final class AccessController {
            * @see #doPrivileged(PrivilegedAction)
            * @see #doPrivileged(PrivilegedExceptionAction,AccessControlContext)
            */
      +    @CallerSensitive
           public static native <T> T
               doPrivileged(PrivilegedExceptionAction<T> action,
                            AccessControlContext context)
      diff --git a/jdk/src/share/classes/java/sql/DriverManager.java b/jdk/src/share/classes/java/sql/DriverManager.java
      index a97595da5d1..b0d8decf40b 100644
      --- a/jdk/src/share/classes/java/sql/DriverManager.java
      +++ b/jdk/src/share/classes/java/sql/DriverManager.java
      @@ -30,6 +30,7 @@ import java.util.ServiceLoader;
       import java.security.AccessController;
       import java.security.PrivilegedAction;
       import java.util.concurrent.CopyOnWriteArrayList;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
       
       
      @@ -192,14 +193,11 @@ public class DriverManager {
            * has been exceeded and has at least tried to cancel the
            * current database connection attempt
            */
      +    @CallerSensitive
           public static Connection getConnection(String url,
               java.util.Properties info) throws SQLException {
       
      -        // Gets the classloader of the code that called this method, may
      -        // be null.
      -        ClassLoader callerCL = DriverManager.getCallerClassLoader();
      -
      -        return (getConnection(url, info, callerCL));
      +        return (getConnection(url, info, Reflection.getCallerClass()));
           }
       
           /**
      @@ -226,14 +224,11 @@ public class DriverManager {
            * has been exceeded and has at least tried to cancel the
            * current database connection attempt
            */
      +    @CallerSensitive
           public static Connection getConnection(String url,
               String user, String password) throws SQLException {
               java.util.Properties info = new java.util.Properties();
       
      -        // Gets the classloader of the code that called this method, may
      -        // be null.
      -        ClassLoader callerCL = DriverManager.getCallerClassLoader();
      -
               if (user != null) {
                   info.put("user", user);
               }
      @@ -241,7 +236,7 @@ public class DriverManager {
                   info.put("password", password);
               }
       
      -        return (getConnection(url, info, callerCL));
      +        return (getConnection(url, info, Reflection.getCallerClass()));
           }
       
           /**
      @@ -259,16 +254,12 @@ public class DriverManager {
            * has been exceeded and has at least tried to cancel the
            * current database connection attempt
            */
      +    @CallerSensitive
           public static Connection getConnection(String url)
               throws SQLException {
       
               java.util.Properties info = new java.util.Properties();
      -
      -        // Gets the classloader of the code that called this method, may
      -        // be null.
      -        ClassLoader callerCL = DriverManager.getCallerClassLoader();
      -
      -        return (getConnection(url, info, callerCL));
      +        return (getConnection(url, info, Reflection.getCallerClass()));
           }
       
           /**
      @@ -282,21 +273,20 @@ public class DriverManager {
            * that can connect to the given URL
            * @exception SQLException if a database access error occurs
            */
      +    @CallerSensitive
           public static Driver getDriver(String url)
               throws SQLException {
       
               println("DriverManager.getDriver(\"" + url + "\")");
       
      -        // Gets the classloader of the code that called this method, may
      -        // be null.
      -        ClassLoader callerCL = DriverManager.getCallerClassLoader();
      +        Class<?> callerClass = Reflection.getCallerClass();
       
               // Walk through the loaded registeredDrivers attempting to locate someone
               // who understands the given URL.
               for (DriverInfo aDriver : registeredDrivers) {
                   // If the caller does not have permission to load the driver then
                   // skip it.
      -            if(isDriverAllowed(aDriver.driver, callerCL)) {
      +            if(isDriverAllowed(aDriver.driver, callerClass)) {
                       try {
                           if(aDriver.driver.acceptsURL(url)) {
                               // Success!
      @@ -350,20 +340,18 @@ public class DriverManager {
            * @param driver the JDBC Driver to drop
            * @exception SQLException if a database access error occurs
            */
      +    @CallerSensitive
           public static synchronized void deregisterDriver(Driver driver)
               throws SQLException {
               if (driver == null) {
                   return;
               }
       
      -        // Gets the classloader of the code that called this method,
      -        // may be null.
      -        ClassLoader callerCL = DriverManager.getCallerClassLoader();
               println("DriverManager.deregisterDriver: " + driver);
       
               DriverInfo aDriver = new DriverInfo(driver);
               if(registeredDrivers.contains(aDriver)) {
      -            if (isDriverAllowed(driver, callerCL)) {
      +            if (isDriverAllowed(driver, Reflection.getCallerClass())) {
                        registeredDrivers.remove(aDriver);
                   } else {
                       // If the caller does not have permission to load the driver then
      @@ -384,18 +372,17 @@ public class DriverManager {
            *
            * @return the list of JDBC Drivers loaded by the caller's class loader
            */
      +    @CallerSensitive
           public static java.util.Enumeration<Driver> getDrivers() {
               java.util.Vector<Driver> result = new java.util.Vector<>();
       
      -        // Gets the classloader of the code that called this method, may
      -        // be null.
      -        ClassLoader callerCL = DriverManager.getCallerClassLoader();
      +        Class<?> callerClass = Reflection.getCallerClass();
       
               // Walk through the loaded registeredDrivers.
               for(DriverInfo aDriver : registeredDrivers) {
                   // If the caller does not have permission to load the driver then
                   // skip it.
      -            if(isDriverAllowed(aDriver.driver, callerCL)) {
      +            if(isDriverAllowed(aDriver.driver, callerClass)) {
                       result.addElement(aDriver.driver);
                   } else {
                       println("    skipping: " + aDriver.getClass().getName());
      @@ -493,17 +480,13 @@ public class DriverManager {
       
           //------------------------------------------------------------------------
       
      -    // Internal method used to get the caller's class loader.
      -    // Replaces the call to the native method
      -    private static ClassLoader getCallerClassLoader() {
      -        Class<?> cc = Reflection.getCallerClass(3);
      -        ClassLoader cl = (cc != null) ? cc.getClassLoader() : null;
      -        return cl;
      -    }
      -
      -
           // Indicates whether the class object that would be created if the code calling
           // DriverManager is accessible.
      +    private static boolean isDriverAllowed(Driver driver, Class<?> caller) {
      +        ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
      +        return isDriverAllowed(driver, callerCL);
      +    }
      +
           private static boolean isDriverAllowed(Driver driver, ClassLoader classLoader) {
               boolean result = false;
               if(driver != null) {
      @@ -586,18 +569,19 @@ public class DriverManager {
       
           //  Worker method called by the public getConnection() methods.
           private static Connection getConnection(
      -        String url, java.util.Properties info, ClassLoader callerCL) throws SQLException {
      +        String url, java.util.Properties info, Class<?> caller) throws SQLException {
               /*
                * When callerCl is null, we should check the application's
                * (which is invoking this class indirectly)
                * classloader, so that the JDBC driver class outside rt.jar
                * can be loaded from here.
                */
      +        ClassLoader callerCL = caller != null ? caller.getClassLoader() : null;
               synchronized(DriverManager.class) {
      -          // synchronize loading of the correct classloader.
      -          if(callerCL == null) {
      -              callerCL = Thread.currentThread().getContextClassLoader();
      -           }
      +            // synchronize loading of the correct classloader.
      +            if (callerCL == null) {
      +                callerCL = Thread.currentThread().getContextClassLoader();
      +            }
               }
       
               if(url == null) {
      diff --git a/jdk/src/share/classes/java/util/ResourceBundle.java b/jdk/src/share/classes/java/util/ResourceBundle.java
      index 6d341dc304e..0d52daa9c48 100644
      --- a/jdk/src/share/classes/java/util/ResourceBundle.java
      +++ b/jdk/src/share/classes/java/util/ResourceBundle.java
      @@ -57,6 +57,8 @@ import java.util.concurrent.ConcurrentMap;
       import java.util.jar.JarEntry;
       import java.util.spi.ResourceBundleControlProvider;
       
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       import sun.util.locale.BaseLocale;
       import sun.util.locale.LocaleObjectCache;
       
      @@ -440,14 +442,10 @@ public abstract class ResourceBundle {
       
           /*
            * Automatic determination of the ClassLoader to be used to load
      -     * resources on behalf of the client.  N.B. The client is getLoader's
      -     * caller's caller.
      +     * resources on behalf of the client.
            */
      -    private static ClassLoader getLoader() {
      -        Class<?>[] stack = getClassContext();
      -        /* Magic number 2 identifies our caller's caller */
      -        Class<?> c = stack[2];
      -        ClassLoader cl = (c == null) ? null : c.getClassLoader();
      +    private static ClassLoader getLoader(Class<?> caller) {
      +        ClassLoader cl = caller == null ? null : caller.getClassLoader();
               if (cl == null) {
                   // When the caller's loader is the boot class loader, cl is null
                   // here. In that case, ClassLoader.getSystemClassLoader() may
      @@ -461,8 +459,6 @@ public abstract class ResourceBundle {
               return cl;
           }
       
      -    private static native Class<?>[] getClassContext();
      -
           /**
            * A wrapper of ClassLoader.getSystemClassLoader().
            */
      @@ -746,11 +742,11 @@ public abstract class ResourceBundle {
            *     if no resource bundle for the specified base name can be found
            * @return a resource bundle for the given base name and the default locale
            */
      +    @CallerSensitive
           public static final ResourceBundle getBundle(String baseName)
           {
               return getBundleImpl(baseName, Locale.getDefault(),
      -                             /* must determine loader here, else we break stack invariant */
      -                             getLoader(),
      +                             getLoader(Reflection.getCallerClass()),
                                    getDefaultControl(baseName));
           }
       
      @@ -788,11 +784,11 @@ public abstract class ResourceBundle {
            *        needed.
            * @since 1.6
            */
      +    @CallerSensitive
           public static final ResourceBundle getBundle(String baseName,
                                                        Control control) {
               return getBundleImpl(baseName, Locale.getDefault(),
      -                             /* must determine loader here, else we break stack invariant */
      -                             getLoader(),
      +                             getLoader(Reflection.getCallerClass()),
                                    control);
           }
       
      @@ -817,12 +813,12 @@ public abstract class ResourceBundle {
            *        if no resource bundle for the specified base name can be found
            * @return a resource bundle for the given base name and locale
            */
      +    @CallerSensitive
           public static final ResourceBundle getBundle(String baseName,
                                                        Locale locale)
           {
               return getBundleImpl(baseName, locale,
      -                             /* must determine loader here, else we break stack invariant */
      -                             getLoader(),
      +                             getLoader(Reflection.getCallerClass()),
                                    getDefaultControl(baseName));
           }
       
      @@ -863,11 +859,11 @@ public abstract class ResourceBundle {
            *        needed.
            * @since 1.6
            */
      +    @CallerSensitive
           public static final ResourceBundle getBundle(String baseName, Locale targetLocale,
                                                        Control control) {
               return getBundleImpl(baseName, targetLocale,
      -                             /* must determine loader here, else we break stack invariant */
      -                             getLoader(),
      +                             getLoader(Reflection.getCallerClass()),
                                    control);
           }
       
      @@ -1721,8 +1717,9 @@ public abstract class ResourceBundle {
            * @since 1.6
            * @see ResourceBundle.Control#getTimeToLive(String,Locale)
            */
      +    @CallerSensitive
           public static final void clearCache() {
      -        clearCache(getLoader());
      +        clearCache(getLoader(Reflection.getCallerClass()));
           }
       
           /**
      diff --git a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
      index 4a8d1df5a63..e761b6ec73d 100644
      --- a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
      +++ b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
      @@ -37,6 +37,9 @@ package java.util.concurrent.atomic;
       import java.util.function.IntUnaryOperator;
       import java.util.function.IntBinaryOperator;
       import sun.misc.Unsafe;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
      +
       import java.lang.reflect.Field;
       import java.lang.reflect.Modifier;
       import java.security.AccessController;
      @@ -77,8 +80,9 @@ public abstract class AtomicIntegerFieldUpdater<T> {
            * or the field is inaccessible to the caller according to Java language
            * access control
            */
      +    @CallerSensitive
           public static <U> AtomicIntegerFieldUpdater<U> newUpdater(Class<U> tclass, String fieldName) {
      -        return new AtomicIntegerFieldUpdaterImpl<U>(tclass, fieldName);
      +        return new AtomicIntegerFieldUpdaterImpl<U>(tclass, fieldName, Reflection.getCallerClass());
           }
       
           /**
      @@ -365,9 +369,11 @@ public abstract class AtomicIntegerFieldUpdater<T> {
               private final Class<T> tclass;
               private final Class<?> cclass;
       
      -        AtomicIntegerFieldUpdaterImpl(final Class<T> tclass, final String fieldName) {
      +        AtomicIntegerFieldUpdaterImpl(final Class<T> tclass,
      +                                      final String fieldName,
      +                                      final Class<?> caller)
      +        {
                   final Field field;
      -            final Class<?> caller;
                   final int modifiers;
                   try {
                       field = AccessController.doPrivileged(
      @@ -376,7 +382,6 @@ public abstract class AtomicIntegerFieldUpdater<T> {
                                   return tclass.getDeclaredField(fieldName);
                               }
                           });
      -                caller = sun.reflect.Reflection.getCallerClass(3);
                       modifiers = field.getModifiers();
                       sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                           caller, tclass, null, modifiers);
      diff --git a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java
      index e5c6e8a0044..7ac0e73d601 100644
      --- a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java
      +++ b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java
      @@ -37,6 +37,9 @@ package java.util.concurrent.atomic;
       import java.util.function.LongUnaryOperator;
       import java.util.function.LongBinaryOperator;
       import sun.misc.Unsafe;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
      +
       import java.lang.reflect.Field;
       import java.lang.reflect.Modifier;
       import java.security.AccessController;
      @@ -77,11 +80,13 @@ public abstract class AtomicLongFieldUpdater<T> {
            * or the field is inaccessible to the caller according to Java language
            * access control
            */
      +    @CallerSensitive
           public static <U> AtomicLongFieldUpdater<U> newUpdater(Class<U> tclass, String fieldName) {
      +        Class<?> caller = Reflection.getCallerClass();
               if (AtomicLong.VM_SUPPORTS_LONG_CAS)
      -            return new CASUpdater<U>(tclass, fieldName);
      +            return new CASUpdater<U>(tclass, fieldName, caller);
               else
      -            return new LockedUpdater<U>(tclass, fieldName);
      +            return new LockedUpdater<U>(tclass, fieldName, caller);
           }
       
           /**
      @@ -365,9 +370,8 @@ public abstract class AtomicLongFieldUpdater<T> {
               private final Class<T> tclass;
               private final Class<?> cclass;
       
      -        CASUpdater(final Class<T> tclass, final String fieldName) {
      +        CASUpdater(final Class<T> tclass, final String fieldName, final Class<?> caller) {
                   final Field field;
      -            final Class<?> caller;
                   final int modifiers;
                   try {
                       field = AccessController.doPrivileged(
      @@ -376,7 +380,6 @@ public abstract class AtomicLongFieldUpdater<T> {
                                   return tclass.getDeclaredField(fieldName);
                               }
                           });
      -                caller = sun.reflect.Reflection.getCallerClass(3);
                       modifiers = field.getModifiers();
                       sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                           caller, tclass, null, modifiers);
      @@ -490,9 +493,8 @@ public abstract class AtomicLongFieldUpdater<T> {
               private final Class<T> tclass;
               private final Class<?> cclass;
       
      -        LockedUpdater(final Class<T> tclass, final String fieldName) {
      +        LockedUpdater(final Class<T> tclass, final String fieldName, final Class<?> caller) {
                   Field field = null;
      -            Class<?> caller = null;
                   int modifiers = 0;
                   try {
                       field = AccessController.doPrivileged(
      @@ -501,7 +503,6 @@ public abstract class AtomicLongFieldUpdater<T> {
                                   return tclass.getDeclaredField(fieldName);
                               }
                           });
      -                caller = sun.reflect.Reflection.getCallerClass(3);
                       modifiers = field.getModifiers();
                       sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                           caller, tclass, null, modifiers);
      diff --git a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java
      index 933e5e4fc92..2cd0e1df369 100644
      --- a/jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java
      +++ b/jdk/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java
      @@ -37,6 +37,9 @@ package java.util.concurrent.atomic;
       import java.util.function.UnaryOperator;
       import java.util.function.BinaryOperator;
       import sun.misc.Unsafe;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
      +
       import java.lang.reflect.Field;
       import java.lang.reflect.Modifier;
       import java.security.AccessController;
      @@ -96,10 +99,12 @@ public abstract class AtomicReferenceFieldUpdater<T, V> {
            * or the field is inaccessible to the caller according to Java language
            * access control
            */
      +    @CallerSensitive
           public static <U, W> AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass, Class<W> vclass, String fieldName) {
               return new AtomicReferenceFieldUpdaterImpl<U,W>(tclass,
                                                               vclass,
      -                                                        fieldName);
      +                                                        fieldName,
      +                                                        Reflection.getCallerClass());
           }
       
           /**
      @@ -297,10 +302,11 @@ public abstract class AtomicReferenceFieldUpdater<T, V> {
       
               AtomicReferenceFieldUpdaterImpl(final Class<T> tclass,
                                               Class<V> vclass,
      -                                        final String fieldName) {
      +                                        final String fieldName,
      +                                        final Class<?> caller)
      +        {
                   final Field field;
                   final Class<?> fieldClass;
      -            final Class<?> caller;
                   final int modifiers;
                   try {
                       field = AccessController.doPrivileged(
      @@ -309,7 +315,6 @@ public abstract class AtomicReferenceFieldUpdater<T, V> {
                                   return tclass.getDeclaredField(fieldName);
                               }
                           });
      -                caller = sun.reflect.Reflection.getCallerClass(3);
                       modifiers = field.getModifiers();
                       sun.reflect.misc.ReflectUtil.ensureMemberAccess(
                           caller, tclass, null, modifiers);
      diff --git a/jdk/src/share/classes/java/util/logging/Logger.java b/jdk/src/share/classes/java/util/logging/Logger.java
      index c8f8fae0702..20bba2671b6 100644
      --- a/jdk/src/share/classes/java/util/logging/Logger.java
      +++ b/jdk/src/share/classes/java/util/logging/Logger.java
      @@ -36,6 +36,8 @@ import java.util.MissingResourceException;
       import java.util.ResourceBundle;
       import java.util.concurrent.CopyOnWriteArrayList;
       import java.util.function.Supplier;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
       
       /**
        * A Logger object is used to log messages for a specific
      @@ -333,13 +335,10 @@ public class Logger {
               }
           }
       
      -    private static Logger demandLogger(String name, String resourceBundleName) {
      +    private static Logger demandLogger(String name, String resourceBundleName, Class<?> caller) {
               LogManager manager = LogManager.getLogManager();
               SecurityManager sm = System.getSecurityManager();
               if (sm != null && !SystemLoggerHelper.disableCallerCheck) {
      -            // 0: Reflection 1: Logger.demandLogger 2: Logger.getLogger 3: caller
      -            final int SKIP_FRAMES = 3;
      -            Class<?> caller = sun.reflect.Reflection.getCallerClass(SKIP_FRAMES);
                   if (caller.getClassLoader() == null) {
                       return manager.demandSystemLogger(name, resourceBundleName);
                   }
      @@ -377,6 +376,7 @@ public class Logger {
       
           // Synchronization is not required here. All synchronization for
           // adding a new Logger object is handled by LogManager.addLogger().
      +    @CallerSensitive
           public static Logger getLogger(String name) {
               // This method is intentionally not a wrapper around a call
               // to getLogger(name, resourceBundleName). If it were then
      @@ -388,7 +388,7 @@ public class Logger {
               // would throw an IllegalArgumentException in the second call
               // because the wrapper would result in an attempt to replace
               // the existing "resourceBundleForFoo" with null.
      -        return demandLogger(name, null);
      +        return demandLogger(name, null, Reflection.getCallerClass());
           }
       
           /**
      @@ -434,8 +434,9 @@ public class Logger {
       
           // Synchronization is not required here. All synchronization for
           // adding a new Logger object is handled by LogManager.addLogger().
      +    @CallerSensitive
           public static Logger getLogger(String name, String resourceBundleName) {
      -        Logger result = demandLogger(name, resourceBundleName);
      +        Logger result = demandLogger(name, resourceBundleName, Reflection.getCallerClass());
       
               // MissingResourceException or IllegalArgumentException can be
               // thrown by setupResourceInfo().
      diff --git a/jdk/src/share/classes/javax/script/ScriptEngineManager.java b/jdk/src/share/classes/javax/script/ScriptEngineManager.java
      index 480c69a605c..7ce42d89298 100644
      --- a/jdk/src/share/classes/javax/script/ScriptEngineManager.java
      +++ b/jdk/src/share/classes/javax/script/ScriptEngineManager.java
      @@ -28,6 +28,7 @@ import java.util.*;
       import java.security.*;
       import java.util.ServiceLoader;
       import java.util.ServiceConfigurationError;
      +import sun.reflect.CallerSensitive;
       import sun.reflect.Reflection;
       import sun.security.util.SecurityConstants;
       
      @@ -60,9 +61,10 @@ public class ScriptEngineManager  {
            *
            * @see java.lang.Thread#getContextClassLoader
            */
      +    @CallerSensitive
           public ScriptEngineManager() {
               ClassLoader ctxtLoader = Thread.currentThread().getContextClassLoader();
      -        if (canCallerAccessLoader(ctxtLoader)) {
      +        if (canCallerAccessLoader(ctxtLoader, Reflection.getCallerClass())) {
                   if (DEBUG) System.out.println("using " + ctxtLoader);
                   init(ctxtLoader);
               } else {
      @@ -419,10 +421,10 @@ public class ScriptEngineManager  {
           /** Global bindings associated with script engines created by this manager. */
           private Bindings globalScope;
       
      -    private boolean canCallerAccessLoader(ClassLoader loader) {
      +    private boolean canCallerAccessLoader(ClassLoader loader, Class<?> caller) {
               SecurityManager sm = System.getSecurityManager();
               if (sm != null) {
      -            ClassLoader callerLoader = getCallerClassLoader();
      +            ClassLoader callerLoader = getClassLoader(caller);
                   if (!sun.misc.VM.isSystemDomainLoader(callerLoader)) {
                       if (loader != callerLoader || !isAncestor(loader, callerLoader)) {
                           try {
      @@ -438,10 +440,9 @@ public class ScriptEngineManager  {
               return true;
           }
       
      -    // Note that this code is same as ClassLoader.getCallerClassLoader().
      +    // Note that this code is same as ClassLoader.getClassLoader().
           // But, that method is package private and hence we can't call here.
      -    private ClassLoader getCallerClassLoader() {
      -        Class<?> caller = Reflection.getCallerClass(3);
      +    private ClassLoader getClassLoader(Class<?> caller) {
               if (caller == null) {
                   return null;
               }
      diff --git a/jdk/src/share/classes/sun/misc/Unsafe.java b/jdk/src/share/classes/sun/misc/Unsafe.java
      index 8f45c867de0..25fb99e2639 100644
      --- a/jdk/src/share/classes/sun/misc/Unsafe.java
      +++ b/jdk/src/share/classes/sun/misc/Unsafe.java
      @@ -28,6 +28,9 @@ package sun.misc;
       import java.security.*;
       import java.lang.reflect.*;
       
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
      +
       
       /**
        * A collection of methods for performing low-level, unsafe operations.
      @@ -80,9 +83,10 @@ public final class Unsafe {
            *             <code>checkPropertiesAccess</code> method doesn't allow
            *             access to the system properties.
            */
      +    @CallerSensitive
           public static Unsafe getUnsafe() {
      -        Class<?> cc = sun.reflect.Reflection.getCallerClass(2);
      -        if (!VM.isSystemDomainLoader(cc.getClassLoader()))
      +        Class<?> caller = Reflection.getCallerClass();
      +        if (!VM.isSystemDomainLoader(caller.getClassLoader()))
                   throw new SecurityException("Unsafe");
               return theUnsafe;
           }
      @@ -817,8 +821,6 @@ public final class Unsafe {
                                              ClassLoader loader,
                                              ProtectionDomain protectionDomain);
       
      -    public native Class<?> defineClass(String name, byte[] b, int off, int len);
      -
           /**
            * Define a class but do not make it known to the class loader or system dictionary.
            * <p>
      diff --git a/jdk/src/share/native/java/lang/ResourceBundle.c b/jdk/src/share/classes/sun/reflect/CallerSensitive.java
      similarity index 70%
      rename from jdk/src/share/native/java/lang/ResourceBundle.c
      rename to jdk/src/share/classes/sun/reflect/CallerSensitive.java
      index 8914eb374ff..19e47cdd5ea 100644
      --- a/jdk/src/share/native/java/lang/ResourceBundle.c
      +++ b/jdk/src/share/classes/sun/reflect/CallerSensitive.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -23,13 +23,19 @@
        * questions.
        */
       
      -#include "jni.h"
      -#include "jvm.h"
      +package sun.reflect;
       
      -#include "java_util_ResourceBundle.h"
      +import java.lang.annotation.*;
      +import static java.lang.annotation.ElementType.*;
       
      -JNIEXPORT jobjectArray JNICALL
      -Java_java_util_ResourceBundle_getClassContext(JNIEnv *env, jobject this)
      -{
      -    return JVM_GetClassContext(env);
      +/**
      + * A method annotated @CallerSensitive is sensitive to its calling class,
      + * via {@link sun.reflect.Reflection#getCallerClass Reflection.getCallerClass},
      + * or via some equivalent.
      + *
      + * @author John R. Rose
      + */
      +@Retention(RetentionPolicy.RUNTIME)
      +@Target({CONSTRUCTOR, METHOD})
      +public @interface CallerSensitive {
       }
      diff --git a/jdk/src/share/classes/sun/reflect/Reflection.java b/jdk/src/share/classes/sun/reflect/Reflection.java
      index fb559826969..274705fc249 100644
      --- a/jdk/src/share/classes/sun/reflect/Reflection.java
      +++ b/jdk/src/share/classes/sun/reflect/Reflection.java
      @@ -51,16 +51,11 @@ public class Reflection {
               methodFilterMap = new HashMap<>();
           }
       
      -    /** Returns the class of the method <code>realFramesToSkip</code>
      -        frames up the stack (zero-based), ignoring frames associated
      -        with java.lang.reflect.Method.invoke() and its implementation.
      -        The first frame is that associated with this method, so
      -        <code>getCallerClass(0)</code> returns the Class object for
      -        sun.reflect.Reflection. Frames associated with
      -        java.lang.reflect.Method.invoke() and its implementation are
      -        completely ignored and do not count toward the number of "real"
      -        frames skipped. */
      -    public static native Class<?> getCallerClass(int realFramesToSkip);
      +    /** Returns the class of the caller of the method calling this method,
      +        ignoring frames associated with java.lang.reflect.Method.invoke()
      +        and its implementation. */
      +    @CallerSensitive
      +    public static native Class<?> getCallerClass();
       
           /** Retrieves the access flags written to the class file. For
               inner classes these flags may differ from those returned by
      @@ -321,4 +316,27 @@ public class Reflection {
               }
               return newMembers;
           }
      +
      +    /**
      +     * Tests if the given method is caller-sensitive and the declaring class
      +     * is defined by either the bootstrap class loader or extension class loader.
      +     */
      +    public static boolean isCallerSensitive(Method m) {
      +        final ClassLoader loader = m.getDeclaringClass().getClassLoader();
      +        if (sun.misc.VM.isSystemDomainLoader(loader) || isExtClassLoader(loader))  {
      +            return m.isAnnotationPresent(CallerSensitive.class);
      +        }
      +        return false;
      +    }
      +
      +    private static boolean isExtClassLoader(ClassLoader loader) {
      +        ClassLoader cl = ClassLoader.getSystemClassLoader();
      +        while (cl != null) {
      +            if (cl.getParent() == null && cl == loader) {
      +                return true;
      +            }
      +            cl = cl.getParent();
      +        }
      +        return false;
      +    }
       }
      diff --git a/jdk/src/share/javavm/export/jvm.h b/jdk/src/share/javavm/export/jvm.h
      index 44b0be576d4..f10019a92ec 100644
      --- a/jdk/src/share/javavm/export/jvm.h
      +++ b/jdk/src/share/javavm/export/jvm.h
      @@ -350,16 +350,21 @@ JVM_NewMultiArray(JNIEnv *env, jclass eltClass, jintArray dim);
       /*
        * java.lang.Class and java.lang.ClassLoader
        */
      +
      +#define JVM_DEPTH -1
      +
       /*
      - * Returns the class in which the code invoking the native method
      - * belongs.
      + * Returns the immediate caller class of the native method invoking
      + * JVM_GetCallerClass.  The Method.invoke and other frames due to
      + * reflection machinery are skipped.
        *
      - * Note that in JDK 1.1, native methods did not create a frame.
      - * In 1.2, they do. Therefore native methods like Class.forName
      - * can no longer look at the current frame for the caller class.
      + * The depth parameter must be -1 (JVM_DEPTH). The caller is expected
      + * to be marked with sun.reflect.CallerSensitive.  The JVM will throw
      + * an error if it is not marked propertly.
        */
       JNIEXPORT jclass JNICALL
      -JVM_GetCallerClass(JNIEnv *env, int n);
      +JVM_GetCallerClass(JNIEnv *env, int depth);
      +
       
       /*
        * Find primitive classes
      diff --git a/jdk/src/share/native/java/lang/ClassLoader.c b/jdk/src/share/native/java/lang/ClassLoader.c
      index 776b2dd24e7..f6d0583990c 100644
      --- a/jdk/src/share/native/java/lang/ClassLoader.c
      +++ b/jdk/src/share/native/java/lang/ClassLoader.c
      @@ -492,24 +492,6 @@ Java_java_lang_ClassLoader_00024NativeLibrary_find
           (*env)->ReleaseStringUTFChars(env, name, cname);
           return res;
       }
      -
      -JNIEXPORT jobject JNICALL
      -Java_java_lang_ClassLoader_getCaller(JNIEnv *env, jclass cls, jint index)
      -{
      -    jobjectArray jcallerStack;
      -    int len;
      -
      -    jcallerStack = JVM_GetClassContext(env);
      -    if ((*env)->ExceptionCheck(env)) {
      -        return NULL;
      -    }
      -    len = (*env)->GetArrayLength(env, jcallerStack);
      -    if (index < len) {
      -        return (*env)->GetObjectArrayElement(env, jcallerStack, index);
      -    }
      -    return NULL;
      -}
      -
       /*
        * Class:     java_lang_ClassLoader_NativeLibrary
        * Method:    findBuiltinLib
      diff --git a/jdk/src/share/native/java/lang/SecurityManager.c b/jdk/src/share/native/java/lang/SecurityManager.c
      index 397e30bb99a..a815df5300f 100644
      --- a/jdk/src/share/native/java/lang/SecurityManager.c
      +++ b/jdk/src/share/native/java/lang/SecurityManager.c
      @@ -29,7 +29,6 @@
       
       #include "java_lang_SecurityManager.h"
       #include "java_lang_ClassLoader.h"
      -#include "java_util_ResourceBundle.h"
       
       /*
        * Make sure a security manager instance is initialized.
      diff --git a/jdk/src/share/native/sun/reflect/Reflection.c b/jdk/src/share/native/sun/reflect/Reflection.c
      index 5a92d9ef385..46cfa570e1c 100644
      --- a/jdk/src/share/native/sun/reflect/Reflection.c
      +++ b/jdk/src/share/native/sun/reflect/Reflection.c
      @@ -27,9 +27,9 @@
       #include "sun_reflect_Reflection.h"
       
       JNIEXPORT jclass JNICALL Java_sun_reflect_Reflection_getCallerClass
      -(JNIEnv *env, jclass unused, jint depth)
      +(JNIEnv *env, jclass unused)
       {
      -    return JVM_GetCallerClass(env, depth);
      +    return JVM_GetCallerClass(env, JVM_DEPTH); // JVM_DEPTH is only the expected value
       }
       
       JNIEXPORT jint JNICALL Java_sun_reflect_Reflection_getClassAccessFlags
      diff --git a/jdk/test/Makefile b/jdk/test/Makefile
      index bd3a8d3b23a..289e208ee9d 100644
      --- a/jdk/test/Makefile
      +++ b/jdk/test/Makefile
      @@ -478,7 +478,7 @@ jdk_io: $(call TestDirs, java/io)
       # Stable agentvm testruns (minus items from PROBLEM_LIST)
       JDK_ALL_TARGETS += jdk_lang
       JDK_DEFAULT_TARGETS += jdk_lang
      -jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc vm)
      +jdk_lang: $(call TestDirs, java/lang sun/invoke sun/misc sun/reflect vm)
       	$(call RunAgentvmBatch)
       
       # Stable othervm testruns (minus items from PROBLEM_LIST)
      diff --git a/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java b/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java
      new file mode 100644
      index 00000000000..8dbb23503fc
      --- /dev/null
      +++ b/jdk/test/sun/reflect/CallerSensitive/CallerSensitiveFinder.java
      @@ -0,0 +1,216 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import com.sun.tools.classfile.*;
      +import com.sun.tools.jdeps.ClassFileReader;
      +import static com.sun.tools.classfile.ConstantPool.*;
      +import java.io.File;
      +import java.io.IOException;
      +import java.nio.file.FileVisitResult;
      +import java.nio.file.Files;
      +import java.nio.file.Path;
      +import java.nio.file.Paths;
      +import java.nio.file.SimpleFileVisitor;
      +import java.nio.file.attribute.BasicFileAttributes;
      +import java.util.ArrayList;
      +import java.util.List;
      +import java.util.Set;
      +import java.util.concurrent.Callable;
      +import java.util.concurrent.ExecutionException;
      +import java.util.concurrent.ExecutorService;
      +import java.util.concurrent.Executors;
      +import java.util.concurrent.FutureTask;
      +
      +/*
      + * @test
      + * @bug 8010117
      + * @summary Verify if CallerSensitive methods are annotated with
      + *          sun.reflect.CallerSensitive annotation
      + * @build CallerSensitiveFinder MethodFinder
      + * @run main/othervm/timeout=900 -mx600m CallerSensitiveFinder
      + */
      +public class CallerSensitiveFinder extends MethodFinder {
      +    private static int numThreads = 3;
      +    private static boolean verbose = false;
      +    public static void main(String[] args) throws Exception {
      +        List<Path> classes = new ArrayList<>();
      +        String testclasses = System.getProperty("test.classes", ".");
      +        int i = 0;
      +        while (i < args.length) {
      +            String arg = args[i++];
      +            if (arg.equals("-v")) {
      +                verbose = true;
      +            } else {
      +                Path p = Paths.get(testclasses, arg);
      +                if (!p.toFile().exists()) {
      +                    throw new IllegalArgumentException(arg + " does not exist");
      +                }
      +                classes.add(p);
      +            }
      +        }
      +        if (classes.isEmpty()) {
      +            classes.addAll(PlatformClassPath.getJREClasses());
      +        }
      +        final String method = "sun/reflect/Reflection.getCallerClass";
      +        CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method);
      +
      +        List<String> errors = csfinder.run(classes);
      +        if (!errors.isEmpty()) {
      +            throw new RuntimeException(errors.size() +
      +                    " caller-sensitive methods are missing @CallerSensitive annotation");
      +        }
      +    }
      +
      +    private final List<String> csMethodsMissingAnnotation = new ArrayList<>();
      +    public CallerSensitiveFinder(String... methods) {
      +        super(methods);
      +    }
      +
      +    public List<String> run(List<Path> classes) throws IOException, InterruptedException,
      +            ExecutionException, ConstantPoolException
      +    {
      +        ExecutorService pool = Executors.newFixedThreadPool(numThreads);
      +        for (Path path : classes) {
      +            ClassFileReader reader = ClassFileReader.newInstance(path.toFile());
      +            for (ClassFile cf : reader.getClassFiles()) {
      +                String classFileName = cf.getName();
      +                // for each ClassFile
      +                //    parse constant pool to find matching method refs
      +                //      parse each method (caller)
      +                //      - visit and find method references matching the given method name
      +                pool.submit(getTask(cf));
      +            }
      +        }
      +        waitForCompletion();
      +        pool.shutdown();
      +        return csMethodsMissingAnnotation;
      +    }
      +
      +    private static final String CALLER_SENSITIVE_ANNOTATION = "Lsun/reflect/CallerSensitive;";
      +    private static boolean isCallerSensitive(Method m, ConstantPool cp)
      +            throws ConstantPoolException
      +    {
      +        RuntimeAnnotations_attribute attr =
      +            (RuntimeAnnotations_attribute)m.attributes.get(Attribute.RuntimeVisibleAnnotations);
      +        int index = 0;
      +        if (attr != null) {
      +            for (int i = 0; i < attr.annotations.length; i++) {
      +                Annotation ann = attr.annotations[i];
      +                String annType = cp.getUTF8Value(ann.type_index);
      +                if (CALLER_SENSITIVE_ANNOTATION.equals(annType)) {
      +                    return true;
      +                }
      +            }
      +        }
      +        return false;
      +    }
      +
      +    public void referenceFound(ClassFile cf, Method m, Set<Integer> refs)
      +            throws ConstantPoolException
      +    {
      +        String name = String.format("%s#%s %s", cf.getName(),
      +                                    m.getName(cf.constant_pool),
      +                                    m.descriptor.getValue(cf.constant_pool));
      +        if (!CallerSensitiveFinder.isCallerSensitive(m, cf.constant_pool)) {
      +            csMethodsMissingAnnotation.add(name);
      +            System.err.println("Missing @CallerSensitive: " + name);
      +        } else {
      +            if (verbose) {
      +                System.out.format("@CS  %s%n", name);
      +            }
      +        }
      +    }
      +
      +    private final List<FutureTask<String>> tasks = new ArrayList<FutureTask<String>>();
      +    private FutureTask<String> getTask(final ClassFile cf) {
      +        FutureTask<String> task = new FutureTask<String>(new Callable<String>() {
      +            public String call() throws Exception {
      +                return parse(cf);
      +            }
      +        });
      +        tasks.add(task);
      +        return task;
      +    }
      +
      +    private void waitForCompletion() throws InterruptedException, ExecutionException {
      +        for (FutureTask<String> t : tasks) {
      +            String s = t.get();
      +        }
      +        System.out.println("Parsed " + tasks.size() + " classfiles");
      +    }
      +
      +    static class PlatformClassPath {
      +        static List<Path> getJREClasses() throws IOException {
      +            List<Path> result = new ArrayList<Path>();
      +            Path home = Paths.get(System.getProperty("java.home"));
      +
      +            if (home.endsWith("jre")) {
      +                // jar files in <javahome>/jre/lib
      +                // skip <javahome>/lib
      +                result.addAll(addJarFiles(home.resolve("lib")));
      +            } else if (home.resolve("lib").toFile().exists()) {
      +                // either a JRE or a jdk build image
      +                File classes = home.resolve("classes").toFile();
      +                if (classes.exists() && classes.isDirectory()) {
      +                    // jdk build outputdir
      +                    result.add(classes.toPath());
      +                }
      +                // add other JAR files
      +                result.addAll(addJarFiles(home.resolve("lib")));
      +            } else {
      +                throw new RuntimeException("\"" + home + "\" not a JDK home");
      +            }
      +            return result;
      +        }
      +
      +        static List<Path> addJarFiles(final Path root) throws IOException {
      +            final List<Path> result = new ArrayList<Path>();
      +            final Path ext = root.resolve("ext");
      +            Files.walkFileTree(root, new SimpleFileVisitor<Path>() {
      +                @Override
      +                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
      +                        throws IOException {
      +                    if (dir.equals(root) || dir.equals(ext)) {
      +                        return FileVisitResult.CONTINUE;
      +                    } else {
      +                        // skip other cobundled JAR files
      +                        return FileVisitResult.SKIP_SUBTREE;
      +                    }
      +                }
      +
      +                @Override
      +                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
      +                        throws IOException {
      +                    File f = file.toFile();
      +                    String fn = f.getName();
      +                    // parse alt-rt.jar as well
      +                    if (fn.endsWith(".jar") && !fn.equals("jfxrt.jar")) {
      +                        result.add(file);
      +                    }
      +                    return FileVisitResult.CONTINUE;
      +                }
      +            });
      +            return result;
      +        }
      +    }
      +}
      diff --git a/jdk/test/sun/reflect/CallerSensitive/MethodFinder.java b/jdk/test/sun/reflect/CallerSensitive/MethodFinder.java
      new file mode 100644
      index 00000000000..8ea78866dae
      --- /dev/null
      +++ b/jdk/test/sun/reflect/CallerSensitive/MethodFinder.java
      @@ -0,0 +1,201 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import java.util.*;
      +import com.sun.tools.classfile.*;
      +import static com.sun.tools.classfile.ConstantPool.*;
      +import com.sun.tools.classfile.Instruction.TypeKind;
      +
      +/**
      + * MethodFinder utility class to find references to the given methods.
      + */
      +public abstract class MethodFinder {
      +    final List<String> methods;
      +    public MethodFinder(String... methods) {
      +        this.methods = Arrays.asList(methods);
      +    }
      +
      +    /**
      +     * A callback method will be invoked when a method referencing
      +     * any of the lookup methods.
      +     *
      +     * @param cf ClassFile
      +     * @param m Method
      +     * @param refs Set of constant pool indices that reference the methods
      +     *             matching the given lookup method names
      +     */
      +    public abstract void referenceFound(ClassFile cf, Method m, Set<Integer> refs)
      +            throws ConstantPoolException;
      +
      +    public String parse(ClassFile cf) throws ConstantPoolException {
      +        List<Integer> cprefs = new ArrayList<Integer>();
      +        int index = 1;
      +        for (ConstantPool.CPInfo cpInfo : cf.constant_pool.entries()) {
      +            if (cpInfo.accept(cpVisitor, null)) {
      +                cprefs.add(index);
      +            }
      +            index += cpInfo.size();
      +        }
      +
      +        if (!cprefs.isEmpty()) {
      +            for (Method m : cf.methods) {
      +                Set<Integer> refs = new HashSet<Integer>();
      +                Code_attribute c_attr = (Code_attribute) m.attributes.get(Attribute.Code);
      +                if (c_attr != null) {
      +                    for (Instruction instr : c_attr.getInstructions()) {
      +                        int idx = instr.accept(codeVisitor, cprefs);
      +                        if (idx > 0) {
      +                            refs.add(idx);
      +                        }
      +                    }
      +                }
      +                if (refs.size() > 0) {
      +                    referenceFound(cf, m, refs);
      +                }
      +            }
      +        }
      +        return cprefs.isEmpty() ? "" : cf.getName();
      +    }
      +
      +    private ConstantPool.Visitor<Boolean,Void> cpVisitor =
      +            new ConstantPool.Visitor<Boolean,Void>()
      +    {
      +        private boolean matches(CPRefInfo info) {
      +            try {
      +                CONSTANT_NameAndType_info nat = info.getNameAndTypeInfo();
      +                return matches(info.getClassName(), nat.getName(), nat.getType());
      +            } catch (ConstantPoolException ex) {
      +                return false;
      +            }
      +        }
      +
      +        private boolean matches(String cn, String name, String type) {
      +            return methods.contains(cn + "." + name);
      +        }
      +
      +        public Boolean visitClass(CONSTANT_Class_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info info, Void p) {
      +            return matches(info);
      +        }
      +
      +        public Boolean visitMethodref(CONSTANT_Methodref_info info, Void p) {
      +            return matches(info);
      +        }
      +
      +        public Boolean visitDouble(CONSTANT_Double_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitFieldref(CONSTANT_Fieldref_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitFloat(CONSTANT_Float_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitInteger(CONSTANT_Integer_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitInvokeDynamic(CONSTANT_InvokeDynamic_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitLong(CONSTANT_Long_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitNameAndType(CONSTANT_NameAndType_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitMethodHandle(CONSTANT_MethodHandle_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitMethodType(CONSTANT_MethodType_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitString(CONSTANT_String_info info, Void p) {
      +            return false;
      +        }
      +
      +        public Boolean visitUtf8(CONSTANT_Utf8_info info, Void p) {
      +            return false;
      +        }
      +    };
      +
      +    private Instruction.KindVisitor<Integer, List<Integer>> codeVisitor =
      +            new Instruction.KindVisitor<Integer, List<Integer>>()
      +    {
      +        public Integer visitNoOperands(Instruction instr, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitArrayType(Instruction instr, TypeKind kind, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitBranch(Instruction instr, int offset, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitConstantPoolRef(Instruction instr, int index, List<Integer> p) {
      +            return p.contains(index) ? index : 0;
      +        }
      +
      +        public Integer visitConstantPoolRefAndValue(Instruction instr, int index, int value, List<Integer> p) {
      +            return p.contains(index) ? index : 0;
      +        }
      +
      +        public Integer visitLocal(Instruction instr, int index, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitLocalAndValue(Instruction instr, int index, int value, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitTableSwitch(Instruction instr, int default_, int low, int high, int[] offsets, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitValue(Instruction instr, int value, List<Integer> p) {
      +            return 0;
      +        }
      +
      +        public Integer visitUnknown(Instruction instr, List<Integer> p) {
      +            return 0;
      +        }
      +    };
      +}
      +
      diff --git a/jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java b/jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java
      new file mode 100644
      index 00000000000..c60a8d0eca5
      --- /dev/null
      +++ b/jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java
      @@ -0,0 +1,65 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +
      +/*
      + * @test
      + * @bug 8010117
      + * @summary Test CallerSensitiveFinder to find missing annotation
      + * @compile -XDignore.symbol.file MissingCallerSensitive.java
      + * @build CallerSensitiveFinder MethodFinder
      + * @run main MissingCallerSensitive
      + */
      +
      +import java.nio.file.Path;
      +import java.nio.file.Paths;
      +import java.util.*;
      +public class MissingCallerSensitive {
      +    public static void main(String[] args) throws Exception {
      +        String testclasses = System.getProperty("test.classes", ".");
      +        List<Path> classes = new ArrayList<>();
      +        classes.add(Paths.get(testclasses, "MissingCallerSensitive.class"));
      +
      +        final String method = "sun/reflect/Reflection.getCallerClass";
      +        CallerSensitiveFinder csfinder = new CallerSensitiveFinder(method);
      +        List<String> errors = csfinder.run(classes);
      +        if (errors.size() != 1) {
      +            throw new RuntimeException("Unexpected number of methods found: " + errors.size());
      +        }
      +        String m = errors.get(0);
      +        if (!m.startsWith("MissingCallerSensitive#missingCallerSensitiveAnnotation")) {
      +            throw new RuntimeException("Unexpected method missing annotation: " + m);
      +        }
      +    }
      +
      +    @sun.reflect.CallerSensitive
      +    public ClassLoader getCallerLoader() {
      +        Class<?> c = sun.reflect.Reflection.getCallerClass();
      +        return c.getClassLoader();
      +    }
      +
      +    public ClassLoader missingCallerSensitiveAnnotation() {
      +        Class<?> c = sun.reflect.Reflection.getCallerClass();
      +        return c.getClassLoader();
      +    }
      +}
      diff --git a/jdk/test/sun/reflect/Reflection/GetCallerClass.java b/jdk/test/sun/reflect/Reflection/GetCallerClass.java
      new file mode 100644
      index 00000000000..8c822a5f517
      --- /dev/null
      +++ b/jdk/test/sun/reflect/Reflection/GetCallerClass.java
      @@ -0,0 +1,37 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +package boot;
      +
      +public class GetCallerClass {
      +    @sun.reflect.CallerSensitive
      +    public ClassLoader getCallerLoader() {
      +        Class<?> c = sun.reflect.Reflection.getCallerClass();
      +        return c.getClassLoader();
      +    }
      +
      +    public ClassLoader missingCallerSensitiveAnnotation() {
      +        Class<?> c = sun.reflect.Reflection.getCallerClass();
      +        return c.getClassLoader();
      +    }
      +}
      diff --git a/jdk/test/sun/reflect/Reflection/GetCallerClassTest.java b/jdk/test/sun/reflect/Reflection/GetCallerClassTest.java
      new file mode 100644
      index 00000000000..3e96f4b0a70
      --- /dev/null
      +++ b/jdk/test/sun/reflect/Reflection/GetCallerClassTest.java
      @@ -0,0 +1,113 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import boot.GetCallerClass;
      +import java.lang.reflect.*;
      +import sun.reflect.CallerSensitive;
      +import sun.reflect.Reflection;
      +
      +public class GetCallerClassTest {
      +    private final GetCallerClass gcc;   // boot.GetCallerClass is in bootclasspath
      +    GetCallerClassTest() {
      +        this.gcc = new GetCallerClass();
      +    }
      +
      +    public static void main(String[] args) throws Exception {
      +        GetCallerClassTest gcct = new GetCallerClassTest();
      +        // ensure methods are annotated with @CallerSensitive
      +        ensureAnnotationPresent(boot.GetCallerClass.class, "getCallerLoader", true);
      +        ensureAnnotationPresent(GetCallerClassTest.class, "testNonSystemMethod", false);
      +        // call Reflection.getCallerClass from bootclasspath with and without @CS
      +        gcct.testCallerSensitiveMethods();
      +        // call Reflection.getCallerClass from classpath with @CS
      +        gcct.testNonSystemMethod();
      +    }
      +
      +    private static void ensureAnnotationPresent(Class<?> c, String name, boolean cs)
      +        throws NoSuchMethodException
      +    {
      +        Method m = c.getDeclaredMethod(name);
      +        if (!m.isAnnotationPresent(CallerSensitive.class)) {
      +            throw new RuntimeException("@CallerSensitive not present in method " + m);
      +        }
      +        if (Reflection.isCallerSensitive(m) != cs) {
      +            throw new RuntimeException("Unexpected: isCallerSensitive returns " +
      +                Reflection.isCallerSensitive(m));
      +        }
      +    }
      +
      +    private void testCallerSensitiveMethods() {
      +        try {
      +            ClassLoader cl = gcc.getCallerLoader();
      +            if (cl != GetCallerClassTest.class.getClassLoader()) {
      +                throw new RuntimeException("mismatched class loader");
      +            }
      +            gcc.missingCallerSensitiveAnnotation();
      +            throw new RuntimeException("getCallerLoader not marked with @CallerSensitive");
      +        } catch (InternalError e) {
      +            StackTraceElement[] stackTrace = e.getStackTrace();
      +            checkStackTrace(stackTrace, e);
      +            if (!stackTrace[1].getClassName().equals(GetCallerClass.class.getName()) ||
      +                !stackTrace[1].getMethodName().equals("missingCallerSensitiveAnnotation")) {
      +                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
      +            }
      +            if (!stackTrace[2].getClassName().equals(GetCallerClassTest.class.getName()) ||
      +                !stackTrace[2].getMethodName().equals("testCallerSensitiveMethods")) {
      +                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
      +            }
      +            System.out.println("Expected error: " + e.getMessage());
      +        }
      +    }
      +
      +    @CallerSensitive
      +    private void testNonSystemMethod() {
      +        try {
      +            Class<?> c = Reflection.getCallerClass();
      +            throw new RuntimeException("@CallerSensitive testNonSystemMethods not supported");
      +        } catch (InternalError e) {
      +            StackTraceElement[] stackTrace = e.getStackTrace();
      +            checkStackTrace(stackTrace, e);
      +            if (!stackTrace[1].getClassName().equals(GetCallerClassTest.class.getName()) ||
      +                !stackTrace[1].getMethodName().equals("testNonSystemMethod")) {
      +                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
      +            }
      +            if (!stackTrace[2].getClassName().equals(GetCallerClassTest.class.getName()) ||
      +                !stackTrace[2].getMethodName().equals("main")) {
      +                throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
      +            }
      +            System.out.println("Expected error: " + e.getMessage());
      +        }
      +    }
      +
      +    private void checkStackTrace(StackTraceElement[] stackTrace, Error e) {
      +        if (stackTrace.length < 3) {
      +            throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
      +        }
      +
      +        if (!stackTrace[0].getClassName().equals("sun.reflect.Reflection") ||
      +            !stackTrace[0].getMethodName().equals("getCallerClass")) {
      +            throw new RuntimeException("Unexpected error: " + e.getMessage(), e);
      +        }
      +
      +    }
      +}
      diff --git a/jdk/test/sun/reflect/Reflection/GetCallerClassTest.sh b/jdk/test/sun/reflect/Reflection/GetCallerClassTest.sh
      new file mode 100644
      index 00000000000..b6337096320
      --- /dev/null
      +++ b/jdk/test/sun/reflect/Reflection/GetCallerClassTest.sh
      @@ -0,0 +1,68 @@
      +#
      +# Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      +#
      +# This code is free software; you can redistribute it and/or modify it
      +# 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      +# or visit www.oracle.com if you need additional information or have any
      +# questions.
      +#
      +
      +# @test
      +# @bug 8010117
      +# @summary Test if the VM enforces sun.reflect.Reflection.getCallerClass 
      +#          be called by methods annotated with sun.reflect.CallerSensitive
      +#
      +# @run shell GetCallerClassTest.sh
      +
      +if [ "${TESTSRC}" = "" ]
      +then
      +  echo "TESTSRC not set.  Test cannot execute.  Failed."
      +  exit 1
      +fi
      +echo "TESTSRC=${TESTSRC}"
      +if [ "${TESTJAVA}" = "" ]
      +then
      +  echo "TESTJAVA not set.  Test cannot execute.  Failed."
      +  exit 1
      +fi
      +echo "TESTJAVA=${TESTJAVA}"
      +if [ "${COMPILEJAVA}" = "" ]
      +then
      +  COMPILEJAVA="${TESTJAVA}"
      +fi
      +echo "COMPILEJAVA=${COMPILEJAVA}"
      +if [ "${TESTCLASSES}" = "" ]
      +then
      +  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
      +  exit 1
      +fi
      +
      +BCP=${TESTCLASSES}/bcp
      +rm -rf ${BCP}
      +mkdir ${BCP}
      +
      +# Compile GetCallerClass in bootclasspath
      +${COMPILEJAVA}/bin/javac ${TESTTOOLVMOPTS} \
      +     -XDignore.symbol.file \
      +     -d ${BCP} ${TESTSRC}/GetCallerClass.java  || exit 1
      +
      +${COMPILEJAVA}/bin/javac ${TESTTOOLVMOPTS} \
      +     -XDignore.symbol.file -Xbootclasspath/a:${BCP} \
      +     -d ${TESTCLASSES} ${TESTSRC}/GetCallerClassTest.java  || exit 2
      +
      +${TESTJAVA}/bin/java ${TESTVMOPTS} -Xbootclasspath/a:${BCP} \
      +     -cp ${TESTCLASSES} GetCallerClassTest || exit 3
      
      From fc3e45929e225e9c7ecdd3070718dc912acbb069 Mon Sep 17 00:00:00 2001
      From: Yong Jeffrey Huang <yhuang@openjdk.org>
      Date: Tue, 16 Apr 2013 22:28:47 -0700
      Subject: [PATCH 144/151] 8011977: ISO 4217 Amendment Number 155
      
      Reviewed-by: naoto
      ---
       jdk/src/share/classes/java/util/CurrencyData.properties | 6 +++---
       jdk/test/java/util/Currency/tablea1.txt                 | 8 ++++----
       2 files changed, 7 insertions(+), 7 deletions(-)
      
      diff --git a/jdk/src/share/classes/java/util/CurrencyData.properties b/jdk/src/share/classes/java/util/CurrencyData.properties
      index 198558d05a3..4783af39505 100644
      --- a/jdk/src/share/classes/java/util/CurrencyData.properties
      +++ b/jdk/src/share/classes/java/util/CurrencyData.properties
      @@ -1,5 +1,5 @@
       #
      -# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
      +# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
       # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       #
       # This code is free software; you can redistribute it and/or modify it
      @@ -28,7 +28,7 @@ formatVersion=1
       # Version of the currency code information in this class.
       # It is a serial number that accompanies with each amendment.
       
      -dataVersion=154
      +dataVersion=155
       
       # List of all valid ISO 4217 currency codes.
       # To ensure compatibility, do not remove codes.
      @@ -585,7 +585,7 @@ ZW=ZWL
       minor0=\
           ADP-BEF-BIF-BYB-BYR-CLF-CLP-DJF-ESP-GNF-\
           GRD-ISK-ITL-JPY-KMF-KRW-LUF-MGF-PYG-PTE-RWF-\
      -    TPE-TRL-VND-VUV-XAF-XOF-XPF
      +    TPE-TRL-UGX-VND-VUV-XAF-XOF-XPF
       minor1=
       minor3=\
           BHD-IQD-JOD-KWD-LYD-OMR-TND
      diff --git a/jdk/test/java/util/Currency/tablea1.txt b/jdk/test/java/util/Currency/tablea1.txt
      index ea142da7d33..40af4631257 100644
      --- a/jdk/test/java/util/Currency/tablea1.txt
      +++ b/jdk/test/java/util/Currency/tablea1.txt
      @@ -1,12 +1,12 @@
       #
       #
      -# Amendments up until ISO 4217 AMENDMENT NUMBER 154
      -#   (As of 31 August 2012)
      +# Amendments up until ISO 4217 AMENDMENT NUMBER 155
      +#   (As of 11 April 2013)
       #
       
       # Version
       FILEVERSION=1
      -DATAVERSION=154
      +DATAVERSION=155
       
       # ISO 4217 currency data
       AF	AFN	971	2
      @@ -256,7 +256,7 @@ TR	TRY	949	2
       TM	TMT	934	2
       TC	USD	840	2
       TV	AUD	36	2
      -UG	UGX	800	2
      +UG	UGX	800	0
       UA	UAH	980	2
       AE	AED	784	2
       GB	GBP	826	2
      
      From aefbf5bd89ead8723d8f73a3d6dbd7f048eebc3b Mon Sep 17 00:00:00 2001
      From: Alan Bateman <alanb@openjdk.org>
      Date: Wed, 17 Apr 2013 16:11:19 +0100
      Subject: [PATCH 145/151] 8012019: (fc) Thread.interrupt triggers hang in
       FileChannelImpl.pread (win)
      
      Reviewed-by: chegar
      ---
       .../sun/nio/ch/DatagramChannelImpl.java       |   4 +-
       .../classes/sun/nio/ch/FileChannelImpl.java   |  30 +++-
       jdk/src/share/classes/sun/nio/ch/IOUtil.java  |  22 ++-
       .../classes/sun/nio/ch/NativeDispatcher.java  |  16 +-
       .../ch/SimpleAsynchronousFileChannelImpl.java |   4 +-
       .../classes/sun/nio/ch/SocketChannelImpl.java |   4 +-
       .../sun/nio/ch/FileDispatcherImpl.java        |   9 +-
       .../classes/sun/nio/ch/SinkChannelImpl.java   |   2 +-
       .../classes/sun/nio/ch/SourceChannelImpl.java |   2 +-
       .../ch/UnixAsynchronousSocketChannelImpl.java |   8 +-
       .../sun/nio/ch/FileDispatcherImpl.java        |  21 +--
       .../FileChannel/InterruptDeadlock.java        | 137 ++++++++++++++++++
       12 files changed, 213 insertions(+), 46 deletions(-)
       create mode 100644 jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java
      
      diff --git a/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
      index cdd5b3c2a80..4e41a9aa1b8 100644
      --- a/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
      +++ b/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
      @@ -538,7 +538,7 @@ class DatagramChannelImpl
                           return 0;
                       readerThread = NativeThread.current();
                       do {
      -                    n = IOUtil.read(fd, buf, -1, nd, readLock);
      +                    n = IOUtil.read(fd, buf, -1, nd);
                       } while ((n == IOStatus.INTERRUPTED) && isOpen());
                       return IOStatus.normalize(n);
                   } finally {
      @@ -594,7 +594,7 @@ class DatagramChannelImpl
                           return 0;
                       writerThread = NativeThread.current();
                       do {
      -                    n = IOUtil.write(fd, buf, -1, nd, writeLock);
      +                    n = IOUtil.write(fd, buf, -1, nd);
                       } while ((n == IOStatus.INTERRUPTED) && isOpen());
                       return IOStatus.normalize(n);
                   } finally {
      diff --git a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java
      index a9b9791666b..ac9be90f210 100644
      --- a/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java
      +++ b/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java
      @@ -140,7 +140,7 @@ public class FileChannelImpl
                       if (!isOpen())
                           return 0;
                       do {
      -                    n = IOUtil.read(fd, dst, -1, nd, positionLock);
      +                    n = IOUtil.read(fd, dst, -1, nd);
                       } while ((n == IOStatus.INTERRUPTED) && isOpen());
                       return IOStatus.normalize(n);
                   } finally {
      @@ -192,7 +192,7 @@ public class FileChannelImpl
                       if (!isOpen())
                           return 0;
                       do {
      -                    n = IOUtil.write(fd, src, -1, nd, positionLock);
      +                    n = IOUtil.write(fd, src, -1, nd);
                       } while ((n == IOStatus.INTERRUPTED) && isOpen());
                       return IOStatus.normalize(n);
                   } finally {
      @@ -671,6 +671,17 @@ public class FileChannelImpl
               if (!readable)
                   throw new NonReadableChannelException();
               ensureOpen();
      +        if (nd.needsPositionLock()) {
      +            synchronized (positionLock) {
      +                return readInternal(dst, position);
      +            }
      +        } else {
      +            return readInternal(dst, position);
      +        }
      +    }
      +
      +    private int readInternal(ByteBuffer dst, long position) throws IOException {
      +        assert !nd.needsPositionLock() || Thread.holdsLock(positionLock);
               int n = 0;
               int ti = -1;
               try {
      @@ -679,7 +690,7 @@ public class FileChannelImpl
                   if (!isOpen())
                       return -1;
                   do {
      -                n = IOUtil.read(fd, dst, position, nd, positionLock);
      +                n = IOUtil.read(fd, dst, position, nd);
                   } while ((n == IOStatus.INTERRUPTED) && isOpen());
                   return IOStatus.normalize(n);
               } finally {
      @@ -697,6 +708,17 @@ public class FileChannelImpl
               if (!writable)
                   throw new NonWritableChannelException();
               ensureOpen();
      +        if (nd.needsPositionLock()) {
      +            synchronized (positionLock) {
      +                return writeInternal(src, position);
      +            }
      +        } else {
      +            return writeInternal(src, position);
      +        }
      +    }
      +
      +    private int writeInternal(ByteBuffer src, long position) throws IOException {
      +        assert !nd.needsPositionLock() || Thread.holdsLock(positionLock);
               int n = 0;
               int ti = -1;
               try {
      @@ -705,7 +727,7 @@ public class FileChannelImpl
                   if (!isOpen())
                       return -1;
                   do {
      -                n = IOUtil.write(fd, src, position, nd, positionLock);
      +                n = IOUtil.write(fd, src, position, nd);
                   } while ((n == IOStatus.INTERRUPTED) && isOpen());
                   return IOStatus.normalize(n);
               } finally {
      diff --git a/jdk/src/share/classes/sun/nio/ch/IOUtil.java b/jdk/src/share/classes/sun/nio/ch/IOUtil.java
      index 7846486ecc8..6f45da73d10 100644
      --- a/jdk/src/share/classes/sun/nio/ch/IOUtil.java
      +++ b/jdk/src/share/classes/sun/nio/ch/IOUtil.java
      @@ -44,11 +44,11 @@ public class IOUtil {
           private IOUtil() { }                // No instantiation
       
           static int write(FileDescriptor fd, ByteBuffer src, long position,
      -                     NativeDispatcher nd, Object lock)
      +                     NativeDispatcher nd)
               throws IOException
           {
               if (src instanceof DirectBuffer)
      -            return writeFromNativeBuffer(fd, src, position, nd, lock);
      +            return writeFromNativeBuffer(fd, src, position, nd);
       
               // Substitute a native buffer
               int pos = src.position();
      @@ -62,7 +62,7 @@ public class IOUtil {
                   // Do not update src until we see how many bytes were written
                   src.position(pos);
       
      -            int n = writeFromNativeBuffer(fd, bb, position, nd, lock);
      +            int n = writeFromNativeBuffer(fd, bb, position, nd);
                   if (n > 0) {
                       // now update src
                       src.position(pos + n);
      @@ -74,8 +74,7 @@ public class IOUtil {
           }
       
           private static int writeFromNativeBuffer(FileDescriptor fd, ByteBuffer bb,
      -                                           long position, NativeDispatcher nd,
      -                                             Object lock)
      +                                             long position, NativeDispatcher nd)
               throws IOException
           {
               int pos = bb.position();
      @@ -89,7 +88,7 @@ public class IOUtil {
               if (position != -1) {
                   written = nd.pwrite(fd,
                                       ((DirectBuffer)bb).address() + pos,
      -                                rem, position, lock);
      +                                rem, position);
               } else {
                   written = nd.write(fd, ((DirectBuffer)bb).address() + pos, rem);
               }
      @@ -184,18 +183,18 @@ public class IOUtil {
           }
       
           static int read(FileDescriptor fd, ByteBuffer dst, long position,
      -                    NativeDispatcher nd, Object lock)
      +                    NativeDispatcher nd)
               throws IOException
           {
               if (dst.isReadOnly())
                   throw new IllegalArgumentException("Read-only buffer");
               if (dst instanceof DirectBuffer)
      -            return readIntoNativeBuffer(fd, dst, position, nd, lock);
      +            return readIntoNativeBuffer(fd, dst, position, nd);
       
               // Substitute a native buffer
               ByteBuffer bb = Util.getTemporaryDirectBuffer(dst.remaining());
               try {
      -            int n = readIntoNativeBuffer(fd, bb, position, nd, lock);
      +            int n = readIntoNativeBuffer(fd, bb, position, nd);
                   bb.flip();
                   if (n > 0)
                       dst.put(bb);
      @@ -206,8 +205,7 @@ public class IOUtil {
           }
       
           private static int readIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb,
      -                                            long position, NativeDispatcher nd,
      -                                            Object lock)
      +                                            long position, NativeDispatcher nd)
               throws IOException
           {
               int pos = bb.position();
      @@ -220,7 +218,7 @@ public class IOUtil {
               int n = 0;
               if (position != -1) {
                   n = nd.pread(fd, ((DirectBuffer)bb).address() + pos,
      -                         rem, position, lock);
      +                         rem, position);
               } else {
                   n = nd.read(fd, ((DirectBuffer)bb).address() + pos, rem);
               }
      diff --git a/jdk/src/share/classes/sun/nio/ch/NativeDispatcher.java b/jdk/src/share/classes/sun/nio/ch/NativeDispatcher.java
      index 4752ce8e389..bcc507d549e 100644
      --- a/jdk/src/share/classes/sun/nio/ch/NativeDispatcher.java
      +++ b/jdk/src/share/classes/sun/nio/ch/NativeDispatcher.java
      @@ -38,8 +38,16 @@ abstract class NativeDispatcher
           abstract int read(FileDescriptor fd, long address, int len)
               throws IOException;
       
      -    int pread(FileDescriptor fd, long address, int len,
      -                             long position, Object lock) throws IOException
      +    /**
      +     * Returns {@code true} if pread/pwrite needs to be synchronized with
      +     * position sensitive methods.
      +     */
      +    boolean needsPositionLock() {
      +        return false;
      +    }
      +
      +    int pread(FileDescriptor fd, long address, int len, long position)
      +        throws IOException
           {
               throw new IOException("Operation Unsupported");
           }
      @@ -50,8 +58,8 @@ abstract class NativeDispatcher
           abstract int write(FileDescriptor fd, long address, int len)
               throws IOException;
       
      -    int pwrite(FileDescriptor fd, long address, int len,
      -                             long position, Object lock) throws IOException
      +    int pwrite(FileDescriptor fd, long address, int len, long position)
      +        throws IOException
           {
               throw new IOException("Operation Unsupported");
           }
      diff --git a/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
      index ede531bd024..741abf733fd 100644
      --- a/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
      +++ b/jdk/src/share/classes/sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
      @@ -318,7 +318,7 @@ public class SimpleAsynchronousFileChannelImpl
                       try {
                           begin();
                           do {
      -                        n = IOUtil.read(fdObj, dst, position, nd, null);
      +                        n = IOUtil.read(fdObj, dst, position, nd);
                           } while ((n == IOStatus.INTERRUPTED) && isOpen());
                           if (n < 0 && !isOpen())
                               throw new AsynchronousCloseException();
      @@ -372,7 +372,7 @@ public class SimpleAsynchronousFileChannelImpl
                       try {
                           begin();
                           do {
      -                        n = IOUtil.write(fdObj, src, position, nd, null);
      +                        n = IOUtil.write(fdObj, src, position, nd);
                           } while ((n == IOStatus.INTERRUPTED) && isOpen());
                           if (n < 0 && !isOpen())
                               throw new AsynchronousCloseException();
      diff --git a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
      index 9696038ecbf..22be8fb6efd 100644
      --- a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
      +++ b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
      @@ -356,7 +356,7 @@ class SocketChannelImpl
                       // except that the shutdown operation plays the role of
                       // nd.preClose().
                       for (;;) {
      -                    n = IOUtil.read(fd, buf, -1, nd, readLock);
      +                    n = IOUtil.read(fd, buf, -1, nd);
                           if ((n == IOStatus.INTERRUPTED) && isOpen()) {
                               // The system call was interrupted but the channel
                               // is still open, so retry
      @@ -447,7 +447,7 @@ class SocketChannelImpl
                           writerThread = NativeThread.current();
                       }
                       for (;;) {
      -                    n = IOUtil.write(fd, buf, -1, nd, writeLock);
      +                    n = IOUtil.write(fd, buf, -1, nd);
                           if ((n == IOStatus.INTERRUPTED) && isOpen())
                               continue;
                           return IOStatus.normalize(n);
      diff --git a/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java b/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java
      index 79f238dc7de..37c1d5b9098 100644
      --- a/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java
      +++ b/jdk/src/solaris/classes/sun/nio/ch/FileDispatcherImpl.java
      @@ -46,8 +46,9 @@ class FileDispatcherImpl extends FileDispatcher
               return read0(fd, address, len);
           }
       
      -    int pread(FileDescriptor fd, long address, int len,
      -                             long position, Object lock) throws IOException {
      +    int pread(FileDescriptor fd, long address, int len, long position)
      +        throws IOException
      +    {
               return pread0(fd, address, len, position);
           }
       
      @@ -59,8 +60,8 @@ class FileDispatcherImpl extends FileDispatcher
               return write0(fd, address, len);
           }
       
      -    int pwrite(FileDescriptor fd, long address, int len,
      -                             long position, Object lock) throws IOException
      +    int pwrite(FileDescriptor fd, long address, int len, long position)
      +        throws IOException
           {
               return pwrite0(fd, address, len, position);
           }
      diff --git a/jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java
      index e99c184f8e9..d388dd47fd8 100644
      --- a/jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java
      +++ b/jdk/src/solaris/classes/sun/nio/ch/SinkChannelImpl.java
      @@ -165,7 +165,7 @@ class SinkChannelImpl
                           return 0;
                       thread = NativeThread.current();
                       do {
      -                    n = IOUtil.write(fd, src, -1, nd, lock);
      +                    n = IOUtil.write(fd, src, -1, nd);
                       } while ((n == IOStatus.INTERRUPTED) && isOpen());
                       return IOStatus.normalize(n);
                   } finally {
      diff --git a/jdk/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java
      index b6b005ae315..cc374127e97 100644
      --- a/jdk/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java
      +++ b/jdk/src/solaris/classes/sun/nio/ch/SourceChannelImpl.java
      @@ -165,7 +165,7 @@ class SourceChannelImpl
                           return 0;
                       thread = NativeThread.current();
                       do {
      -                    n = IOUtil.read(fd, dst, -1, nd, lock);
      +                    n = IOUtil.read(fd, dst, -1, nd);
                       } while ((n == IOStatus.INTERRUPTED) && isOpen());
                       return IOStatus.normalize(n);
                   } finally {
      diff --git a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java
      index d7fccc9d558..33859f03529 100644
      --- a/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java
      +++ b/jdk/src/solaris/classes/sun/nio/ch/UnixAsynchronousSocketChannelImpl.java
      @@ -384,7 +384,7 @@ class UnixAsynchronousSocketChannelImpl
                   if (scattering) {
                       n = (int)IOUtil.read(fd, readBuffers, nd);
                   } else {
      -                n = IOUtil.read(fd, readBuffer, -1, nd, null);
      +                n = IOUtil.read(fd, readBuffer, -1, nd);
                   }
                   if (n == IOStatus.UNAVAILABLE) {
                       // spurious wakeup, is this possible?
      @@ -505,7 +505,7 @@ class UnixAsynchronousSocketChannelImpl
                       if (isScatteringRead) {
                           n = (int)IOUtil.read(fd, dsts, nd);
                       } else {
      -                    n = IOUtil.read(fd, dst, -1, nd, null);
      +                    n = IOUtil.read(fd, dst, -1, nd);
                       }
                   }
       
      @@ -579,7 +579,7 @@ class UnixAsynchronousSocketChannelImpl
                   if (gathering) {
                       n = (int)IOUtil.write(fd, writeBuffers, nd);
                   } else {
      -                n = IOUtil.write(fd, writeBuffer, -1, nd, null);
      +                n = IOUtil.write(fd, writeBuffer, -1, nd);
                   }
                   if (n == IOStatus.UNAVAILABLE) {
                       // spurious wakeup, is this possible?
      @@ -688,7 +688,7 @@ class UnixAsynchronousSocketChannelImpl
                       if (isGatheringWrite) {
                           n = (int)IOUtil.write(fd, srcs, nd);
                       } else {
      -                    n = IOUtil.write(fd, src, -1, nd, null);
      +                    n = IOUtil.write(fd, src, -1, nd);
                       }
                   }
       
      diff --git a/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java b/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java
      index 276c6199a12..de3c4f9f705 100644
      --- a/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java
      +++ b/jdk/src/windows/classes/sun/nio/ch/FileDispatcherImpl.java
      @@ -49,18 +49,21 @@ class FileDispatcherImpl extends FileDispatcher
               this(false);
           }
       
      +    @Override
      +    boolean needsPositionLock() {
      +        return true;
      +    }
      +
           int read(FileDescriptor fd, long address, int len)
               throws IOException
           {
               return read0(fd, address, len);
           }
       
      -    int pread(FileDescriptor fd, long address, int len,
      -                             long position, Object lock) throws IOException
      +    int pread(FileDescriptor fd, long address, int len, long position)
      +        throws IOException
           {
      -        synchronized(lock) {
      -            return pread0(fd, address, len, position);
      -        }
      +        return pread0(fd, address, len, position);
           }
       
           long readv(FileDescriptor fd, long address, int len) throws IOException {
      @@ -71,12 +74,10 @@ class FileDispatcherImpl extends FileDispatcher
               return write0(fd, address, len, append);
           }
       
      -    int pwrite(FileDescriptor fd, long address, int len,
      -                             long position, Object lock) throws IOException
      +    int pwrite(FileDescriptor fd, long address, int len, long position)
      +        throws IOException
           {
      -        synchronized(lock) {
      -            return pwrite0(fd, address, len, position);
      -        }
      +        return pwrite0(fd, address, len, position);
           }
       
           long writev(FileDescriptor fd, long address, int len) throws IOException {
      diff --git a/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java b/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java
      new file mode 100644
      index 00000000000..102d7db900d
      --- /dev/null
      +++ b/jdk/test/java/nio/channels/FileChannel/InterruptDeadlock.java
      @@ -0,0 +1,137 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +/* @test
      + * @bug 8012019
      + * @summary Tests interruption of threads doing position-based read methods in
      + *   an attempt to provoke a deadlock between position sensitive and position
      + *   insensitive methods
      + */
      +import java.nio.ByteBuffer;
      +import java.nio.channels.*;
      +import java.nio.file.*;
      +import static java.nio.file.StandardOpenOption.*;
      +
      +public class InterruptDeadlock {
      +
      +    /**
      +     * A thread that continuously reads from a FileChannel with
      +     * read(ByteBuffer,long). The thread terminates when interrupted and/or
      +     * the FileChannel is closed.
      +     */
      +    static class Reader extends Thread {
      +        final FileChannel fc;
      +        volatile Exception exception;
      +
      +        Reader(FileChannel fc) {
      +            this.fc = fc;
      +        }
      +
      +        @Override
      +        public void run() {
      +            ByteBuffer bb = ByteBuffer.allocate(1024);
      +            try {
      +                long pos = 0L;
      +                for (;;) {
      +                    bb.clear();
      +                    int n = fc.read(bb, pos);
      +                    if (n > 0)
      +                        pos += n;
      +                    // fc.size is important here as it is position sensitive
      +                    if (pos > fc.size())
      +                        pos = 0L;
      +                }
      +            } catch (ClosedChannelException x) {
      +                System.out.println(x.getClass() + " (expected)");
      +            } catch (Exception unexpected) {
      +                this.exception = unexpected;
      +            }
      +        }
      +
      +        Exception exception() {
      +            return exception;
      +        }
      +
      +        static Reader startReader(FileChannel fc) {
      +            Reader r = new Reader(fc);
      +            r.start();
      +            return r;
      +        }
      +    }
      +
      +    // the number of reader threads to start
      +    private static final int READER_COUNT = 4;
      +
      +    public static void main(String[] args) throws Exception {
      +        Path file = Paths.get("data.txt");
      +        try (FileChannel fc = FileChannel.open(file, CREATE, TRUNCATE_EXISTING, WRITE)) {
      +            fc.position(1024L * 1024L);
      +            fc.write(ByteBuffer.wrap(new byte[1]));
      +        }
      +
      +        Reader[] readers = new Reader[READER_COUNT];
      +
      +        for (int i=1; i<=20; i++) {
      +            System.out.format("Iteration: %s%n", i);
      +
      +            try (FileChannel fc = FileChannel.open(file)) {
      +                boolean failed = false;
      +
      +                // start reader threads
      +                for (int j=0; j<READER_COUNT; j++) {
      +                    readers[j] = Reader.startReader(fc);
      +                }
      +
      +                // give readers a bit of time to get started (not strictly required)
      +                Thread.sleep(100);
      +
      +                // interrupt and wait for the readers to terminate
      +                for (Reader r: readers) {
      +                    r.interrupt();
      +                }
      +                for (Reader r: readers) {
      +                    try {
      +                        r.join(10000);
      +                        Exception e = r.exception();
      +                        if (e != null) {
      +                            System.err.println("Reader thread failed with: " + e);
      +                            failed = true;
      +                        }
      +                    } catch (InterruptedException x) {
      +                        System.err.println("Reader thread did not terminte");
      +                        failed = true;
      +                    }
      +                }
      +
      +                // the channel should not be open at this point
      +                if (fc.isOpen()) {
      +                    System.err.println("FileChannel was not closed");
      +                    failed = true;
      +                }
      +
      +                if (failed)
      +                    throw new RuntimeException("Test failed - see log for details");
      +            }
      +        }
      +    }
      +}
      
      From bdcf6abb461d382d395e37441830dd68974cdcf3 Mon Sep 17 00:00:00 2001
      From: Coleen Phillimore <coleenp@openjdk.org>
      Date: Wed, 17 Apr 2013 12:50:45 -0400
      Subject: [PATCH 146/151] 8009531: Crash when redefining class with annotated
       method
      
      Add code to annotated methods and command line flags to the tests to verify bug above
      
      Reviewed-by: acorn, sspitsyn, dcubed, dholmes, alanb
      ---
       .../lang/instrument/RedefineMethodWithAnnotations.sh   |  5 +++--
       .../RedefineMethodWithAnnotationsTarget.java           | 10 ++++++++--
       .../RedefineMethodWithAnnotationsTarget_2.java         | 10 ++++++++--
       3 files changed, 19 insertions(+), 6 deletions(-)
      
      diff --git a/jdk/test/java/lang/instrument/RedefineMethodWithAnnotations.sh b/jdk/test/java/lang/instrument/RedefineMethodWithAnnotations.sh
      index 9bde206f17a..b8f869cd02a 100644
      --- a/jdk/test/java/lang/instrument/RedefineMethodWithAnnotations.sh
      +++ b/jdk/test/java/lang/instrument/RedefineMethodWithAnnotations.sh
      @@ -68,11 +68,12 @@ cp "${TESTSRC}"/RedefineMethodWithAnnotationsAnnotations.java \
           RedefineMethodWithAnnotationsAnnotations.java
       
       "${JAVA}" ${TESTVMOPTS} -javaagent:RedefineMethodWithAnnotationsAgent.jar \
      +    -XX:+StressLdcRewrite -XX:+IgnoreUnrecognizedVMOptions \
           -cp "${TESTCLASSES}" RedefineMethodWithAnnotationsApp > output.log 2>&1
       cat output.log
       
      -MESG="Exception"
      -grep "$MESG" output.log
      +MESG="Exception|fatal"
      +egrep "$MESG" output.log
       result=$?
       if [ "$result" = 0 ]; then
           echo "FAIL: found '$MESG' in the test output"
      diff --git a/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget.java b/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget.java
      index 6cfbe21eb89..2b67e09871a 100644
      --- a/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget.java
      +++ b/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget.java
      @@ -27,7 +27,13 @@
        */
       public class RedefineMethodWithAnnotationsTarget {
           public void annotatedMethod(@ParameterAnnotation(
      -            value = ParameterAnnotation.STRING_VALUE_1) String parameter) { }
      +            value = ParameterAnnotation.STRING_VALUE_1) String parameter) {
      +        System.out.println("First version of annotatedMethod(String)");
      +        System.out.println("parameter is " + parameter);
      +    }
           public void annotatedMethod(@ParameterAnnotation(
      -            value = ParameterAnnotation.INT_VALUE_1) int parameter) { }
      +            value = ParameterAnnotation.INT_VALUE_1) int parameter) {
      +        System.out.println("First version of annotatedMethod(int)");
      +        System.out.println("parameter is " + parameter);
      +    }
       }
      diff --git a/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget_2.java b/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget_2.java
      index 85c43047231..eb71d2ab80f 100644
      --- a/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget_2.java
      +++ b/jdk/test/java/lang/instrument/RedefineMethodWithAnnotationsTarget_2.java
      @@ -29,7 +29,13 @@
        */
       public class RedefineMethodWithAnnotationsTarget {
           public void annotatedMethod(@ParameterAnnotation(
      -            value = ParameterAnnotation.INT_VALUE_2) int parameter) { }
      +            value = ParameterAnnotation.INT_VALUE_2) int parameter) {
      +        System.out.println("Second version of annotatedMethod(int)");
      +        System.out.println("parameter is " + parameter);
      +     }
           public void annotatedMethod(@ParameterAnnotation(
      -            value = ParameterAnnotation.STRING_VALUE_2) String parameter) { }
      +            value = ParameterAnnotation.STRING_VALUE_2) String parameter) {
      +        System.out.println("Second version of annotatedMethod(String)");
      +        System.out.println("parameter is " + parameter);
      +    }
       }
      
      From 25b15c78377de43593c91d18e4ed3fcbbe3e6234 Mon Sep 17 00:00:00 2001
      From: Brian Goetz <brian.goetz@oracle.com>
      Date: Wed, 17 Apr 2013 11:39:52 -0700
      Subject: [PATCH 147/151] 8010953: Add primitive summary statistics utils
      
      Reviewed-by: mduigou, dholmes, chegar, darcy
      ---
       .../java/util/DoubleSummaryStatistics.java    | 187 ++++++++++++++++++
       .../java/util/IntSummaryStatistics.java       | 170 ++++++++++++++++
       .../java/util/LongSummaryStatistics.java      | 182 +++++++++++++++++
       3 files changed, 539 insertions(+)
       create mode 100644 jdk/src/share/classes/java/util/DoubleSummaryStatistics.java
       create mode 100644 jdk/src/share/classes/java/util/IntSummaryStatistics.java
       create mode 100644 jdk/src/share/classes/java/util/LongSummaryStatistics.java
      
      diff --git a/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java b/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java
      new file mode 100644
      index 00000000000..fb79c56660b
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/DoubleSummaryStatistics.java
      @@ -0,0 +1,187 @@
      +/*
      + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import java.util.function.DoubleConsumer;
      +
      +/**
      + * A state object for collecting statistics such as count, min, max, sum, and
      + * average.
      + *
      + * <p>This class is designed to work with (though does not require)
      + * {@linkplain java.util.stream streams}. For example, you can compute
      + * summary statistics on a stream of doubles with:
      + * <pre> {@code
      + * DoubleSummaryStatistics stats = doubleStream.collect(DoubleSummaryStatistics::new,
      + *     DoubleSummaryStatistics::accept,
      + *     DoubleSummaryStatistics::combine);
      + * }</pre>
      + *
      + * <p>{@code DoubleSummaryStatistics} can be used as a
      + * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
      + * target for a {@linkplain java.util.stream.Stream stream}. For example:
      + *
      + * <pre> {@code
      + * DoubleSummaryStatistics stats = people.stream()
      + *     .collect(Collectors.toDoubleSummaryStatistics(Person::getWeight));
      + *}</pre>
      + *
      + * This computes, in a single pass, the count of people, as well as the minimum,
      + * maximum, sum, and average of their weights.
      + *
      + * @implNote This implementation is not thread safe. However, it is safe to use
      + * {@link java.util.stream.Collectors#toDoubleSummaryStatistics(java.util.function.ToDoubleFunction)
      + * Collectors.toDoubleStatistics()} on a parallel stream, because the parallel
      + * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
      + * provides the necessary partitioning, isolation, and merging of results for
      + * safe and efficient parallel execution.
      + * @since 1.8
      + */
      +public class DoubleSummaryStatistics implements DoubleConsumer {
      +    private long count;
      +    private double sum;
      +    private double min = Double.POSITIVE_INFINITY;
      +    private double max = Double.NEGATIVE_INFINITY;
      +
      +    /**
      +     * Construct an empty instance with zero count, zero sum,
      +     * {@code Double.POSITIVE_INFINITY} min, {@code Double.NEGATIVE_INFINITY}
      +     * max and zero average.
      +     */
      +    public DoubleSummaryStatistics() { }
      +
      +    /**
      +     * Records another value into the summary information.
      +     *
      +     * @param value the input value
      +     */
      +    @Override
      +    public void accept(double value) {
      +        ++count;
      +        sum += value;
      +        min = Math.min(min, value);
      +        max = Math.max(max, value);
      +    }
      +
      +    /**
      +     * Combines the state of another {@code DoubleSummaryStatistics} into this
      +     * one.
      +     *
      +     * @param other another {@code DoubleSummaryStatistics}
      +     * @throws NullPointerException if {@code other} is null
      +     */
      +    public void combine(DoubleSummaryStatistics other) {
      +        count += other.count;
      +        sum += other.sum;
      +        min = Math.min(min, other.min);
      +        max = Math.max(max, other.max);
      +    }
      +
      +    /**
      +     * Return the count of values recorded.
      +     *
      +     * @return the count of values
      +     */
      +    public final long getCount() {
      +        return count;
      +    }
      +
      +    /**
      +     * Returns the sum of values recorded, or zero if no values have been
      +     * recorded. The sum returned can vary depending upon the order in which
      +     * values are recorded. This is due to accumulated rounding error in
      +     * addition of values of differing magnitudes. Values sorted by increasing
      +     * absolute magnitude tend to yield more accurate results.  If any recorded
      +     * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
      +     * sum will be {@code NaN}.
      +     *
      +     * @return the sum of values, or zero if none
      +     */
      +    public final double getSum() {
      +        return sum;
      +    }
      +
      +    /**
      +     * Returns the minimum recorded value, {@code Double.NaN} if any recorded
      +     * value was NaN or {@code Double.POSITIVE_INFINITY} if no values were
      +     * recorded. Unlike the numerical comparison operators, this method
      +     * considers negative zero to be strictly smaller than positive zero.
      +     *
      +     * @return the minimum recorded value, {@code Double.NaN} if any recorded
      +     * value was NaN or {@code Double.POSITIVE_INFINITY} if no values were
      +     * recorded
      +     */
      +    public final double getMin() {
      +        return min;
      +    }
      +
      +    /**
      +     * Returns the maximum recorded value, {@code Double.NaN} if any recorded
      +     * value was NaN or {@code Double.NEGATIVE_INFINITY} if no values were
      +     * recorded. Unlike the numerical comparison operators, this method
      +     * considers negative zero to be strictly smaller than positive zero.
      +     *
      +     * @return the maximum recorded value, {@code Double.NaN} if any recorded
      +     * value was NaN or {@code Double.NEGATIVE_INFINITY} if no values were
      +     * recorded
      +     */
      +    public final double getMax() {
      +        return max;
      +    }
      +
      +    /**
      +     * Returns the average of values recorded, or zero if no values have been
      +     * recorded. The average returned can vary depending upon the order in
      +     * which values are recorded. This is due to accumulated rounding error in
      +     * addition of values of differing magnitudes. Values sorted by increasing
      +     * absolute magnitude tend to yield more accurate results. If any recorded
      +     * value is a {@code NaN} or the sum is at any point a {@code NaN} then the
      +     * average will be {@code NaN}.
      +     *
      +     * @return the average of values, or zero if none
      +     */
      +    public final double getAverage() {
      +        return getCount() > 0 ? getSum() / getCount() : 0.0d;
      +    }
      +
      +    /**
      +     * {@inheritDoc}
      +     *
      +     * Returns a non-empty string representation of this object suitable for
      +     * debugging. The exact presentation format is unspecified and may vary
      +     * between implementations and versions.
      +     */
      +    @Override
      +    public String toString() {
      +        return String.format(
      +            "%s{count=%d, sum=%f, min=%f, average=%f, max=%f}",
      +            this.getClass().getSimpleName(),
      +            getCount(),
      +            getSum(),
      +            getMin(),
      +            getAverage(),
      +            getMax());
      +    }
      +}
      diff --git a/jdk/src/share/classes/java/util/IntSummaryStatistics.java b/jdk/src/share/classes/java/util/IntSummaryStatistics.java
      new file mode 100644
      index 00000000000..f179e67478b
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/IntSummaryStatistics.java
      @@ -0,0 +1,170 @@
      +/*
      + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import java.util.function.IntConsumer;
      +
      +/**
      + * A state object for collecting statistics such as count, min, max, sum, and
      + * average.
      + *
      + * <p>This class is designed to work with (though does not require)
      + * {@linkplain java.util.stream streams}. For example, you can compute
      + * summary statistics on a stream of ints with:
      + * <pre> {@code
      + * IntSummaryStatistics stats = intStream.collect(IntSummaryStatistics::new,
      + *     IntSummaryStatistics::accept,
      + *     IntSummaryStatistics::combine);
      + * }</pre>
      + *
      + * <p>{@code IntSummaryStatistics} can be used as a
      + * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
      + * target for a {@linkplain java.util.stream.Stream stream}. For example:
      + *
      + * <pre> {@code
      + * IntSummaryStatistics stats = people.stream()
      + *     .collect(Collectors.toIntSummaryStatistics(Person::getDependents));
      + *}</pre>
      + *
      + * This computes, in a single pass, the count of people, as well as the minimum,
      + * maximum, sum, and average of their number of dependents.
      + *
      + * @implNote This implementation is not thread safe. However, it is safe to use
      + * {@link java.util.stream.Collectors#toIntSummaryStatistics(java.util.function.ToIntFunction)
      + * Collectors.toIntStatistics()} on a parallel stream, because the parallel
      + * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
      + * provides the necessary partitioning, isolation, and merging of results for
      + * safe and efficient parallel execution.
      + *
      + * <p>This implementation does not check for overflow of the sum.
      + * @since 1.8
      + */
      +public class IntSummaryStatistics implements IntConsumer {
      +    private long count;
      +    private long sum;
      +    private int min = Integer.MAX_VALUE;
      +    private int max = Integer.MIN_VALUE;
      +
      +    /**
      +     * Construct an empty instance with zero count, zero sum,
      +     * {@code Integer.MAX_VALUE} min, {@code Integer.MIN_VALUE} max and zero
      +     * average.
      +     */
      +    public IntSummaryStatistics() { }
      +
      +    /**
      +     * Records a new value into the summary information
      +     *
      +     * @param value the input value
      +     */
      +    @Override
      +    public void accept(int value) {
      +        ++count;
      +        sum += value;
      +        min = Math.min(min, value);
      +        max = Math.max(max, value);
      +    }
      +
      +    /**
      +     * Combines the state of another {@code IntSummaryStatistics} into this one.
      +     *
      +     * @param other another {@code IntSummaryStatistics}
      +     * @throws NullPointerException if {@code other} is null
      +     */
      +    public void combine(IntSummaryStatistics other) {
      +        count += other.count;
      +        sum += other.sum;
      +        min = Math.min(min, other.min);
      +        max = Math.max(max, other.max);
      +    }
      +
      +    /**
      +     * Returns the count of values recorded.
      +     *
      +     * @return the count of values
      +     */
      +    public final long getCount() {
      +        return count;
      +    }
      +
      +    /**
      +     * Returns the sum of values recorded, or zero if no values have been
      +     * recorded.
      +     *
      +     * @return the sum of values, or zero if none
      +     */
      +    public final long getSum() {
      +        return sum;
      +    }
      +
      +    /**
      +     * Returns the minimum value recorded, or {@code Integer.MAX_VALUE} if no
      +     * values have been recorded.
      +     *
      +     * @return the minimum value, or {@code Integer.MAX_VALUE} if none
      +     */
      +    public final int getMin() {
      +        return min;
      +    }
      +
      +    /**
      +     * Returns the maximum value recorded, or {@code Integer.MIN_VALUE} if no
      +     * values have been recorded.
      +     *
      +     * @return the maximum value, or {@code Integer.MIN_VALUE} if none
      +     */
      +    public final int getMax() {
      +        return max;
      +    }
      +
      +    /**
      +     * Returns the average of values recorded, or zero if no values have been
      +     * recorded.
      +     *
      +     * @return the average of values, or zero if none
      +     */
      +    public final double getAverage() {
      +        return getCount() > 0 ? (double) getSum() / getCount() : 0.0d;
      +    }
      +
      +    @Override
      +    /**
      +     * {@inheritDoc}
      +     *
      +     * Returns a non-empty string representation of this object suitable for
      +     * debugging. The exact presentation format is unspecified and may vary
      +     * between implementations and versions.
      +     */
      +    public String toString() {
      +        return String.format(
      +            "%s{count=%d, sum=%d, min=%d, average=%d, max=%d}",
      +            this.getClass().getSimpleName(),
      +            getCount(),
      +            getSum(),
      +            getMin(),
      +            getAverage(),
      +            getMax());
      +    }
      +}
      diff --git a/jdk/src/share/classes/java/util/LongSummaryStatistics.java b/jdk/src/share/classes/java/util/LongSummaryStatistics.java
      new file mode 100644
      index 00000000000..3c7b7aee561
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/LongSummaryStatistics.java
      @@ -0,0 +1,182 @@
      +/*
      + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import java.util.function.IntConsumer;
      +import java.util.function.LongConsumer;
      +
      +/**
      + * A state object for collecting statistics such as count, min, max, sum, and
      + * average.
      + *
      + * <p>This class is designed to work with (though does not require)
      + * {@linkplain java.util.stream streams}. For example, you can compute
      + * summary statistics on a stream of longs with:
      + * <pre> {@code
      + * LongSummaryStatistics stats = longStream.collect(LongSummaryStatistics::new,
      + *     LongSummaryStatistics::accept,
      + *     LongSummaryStatistics::combine);
      + * }</pre>
      + *
      + * <p>{@code LongSummaryStatistics} can be used as a
      + * {@linkplain java.util.stream.Stream#reduce(java.util.function.BinaryOperator) reduction}
      + * target for a {@linkplain java.util.stream.Stream stream}. For example:
      + *
      + * <pre> {@code
      + * LongSummaryStatistics stats = people.stream()
      + *     .collect(Collectors.toLongSummaryStatistics(Person::getAge));
      + *}</pre>
      + *
      + * This computes, in a single pass, the count of people, as well as the minimum,
      + * maximum, sum, and average of their ages in milliseconds.
      + *
      + * @implNote This implementation is not thread safe. However, it is safe to use
      + * {@link java.util.stream.Collectors#toLongSummaryStatistics(java.util.function.ToLongFunction)
      + * Collectors.toLongStatistics()} on a parallel stream, because the parallel
      + * implementation of {@link java.util.stream.Stream#collect Stream.collect()}
      + * provides the necessary partitioning, isolation, and merging of results for
      + * safe and efficient parallel execution.
      + *
      + * <p>This implementation does not check for overflow of the sum.
      + * @since 1.8
      + */
      +public class LongSummaryStatistics implements LongConsumer, IntConsumer {
      +    private long count;
      +    private long sum;
      +    private long min = Long.MAX_VALUE;
      +    private long max = Long.MIN_VALUE;
      +
      +    /**
      +     * Construct an empty instance with zero count, zero sum,
      +     * {@code Long.MAX_VALUE} min, {@code Long.MIN_VALUE} max and zero
      +     * average.
      +     */
      +    public LongSummaryStatistics() { }
      +
      +    /**
      +     * Records a new {@code int} value into the summary information.
      +     *
      +     * @param value the input value
      +     */
      +    @Override
      +    public void accept(int value) {
      +        accept((long) value);
      +    }
      +
      +    /**
      +     * Records a new {@code long} value into the summary information.
      +     *
      +     * @param value the input value
      +     */
      +    @Override
      +    public void accept(long value) {
      +        ++count;
      +        sum += value;
      +        min = Math.min(min, value);
      +        max = Math.max(max, value);
      +    }
      +
      +    /**
      +     * Combines the state of another {@code LongSummaryStatistics} into this
      +     * one.
      +     *
      +     * @param other another {@code LongSummaryStatistics}
      +     * @throws NullPointerException if {@code other} is null
      +     */
      +    public void combine(LongSummaryStatistics other) {
      +        count += other.count;
      +        sum += other.sum;
      +        min = Math.min(min, other.min);
      +        max = Math.max(max, other.max);
      +    }
      +
      +    /**
      +     * Returns the count of values recorded.
      +     *
      +     * @return the count of values
      +     */
      +    public final long getCount() {
      +        return count;
      +    }
      +
      +    /**
      +     * Returns the sum of values recorded, or zero if no values have been
      +     * recorded.
      +     *
      +     * @return the sum of values, or zero if none
      +     */
      +    public final long getSum() {
      +        return sum;
      +    }
      +
      +    /**
      +     * Returns the minimum value recorded, or {@code Long.MAX_VALUE} if no
      +     * values have been recorded.
      +     *
      +     * @return the minimum value, or {@code Long.MAX_VALUE} if none
      +     */
      +    public final long getMin() {
      +        return min;
      +    }
      +
      +    /**
      +     * Returns the maximum value recorded, or {@code Long.MIN_VALUE} if no
      +     * values have been recorded
      +     *
      +     * @return the maximum value, or {@code Long.MIN_VALUE} if none
      +     */
      +    public final long getMax() {
      +        return max;
      +    }
      +
      +    /**
      +     * Returns the average of values recorded, or zero if no values have been
      +     * recorded.
      +     *
      +     * @return The average of values, or zero if none
      +     */
      +    public final double getAverage() {
      +        return getCount() > 0 ? (double) getSum() / getCount() : 0.0d;
      +    }
      +
      +    @Override
      +    /**
      +     * {@inheritDoc}
      +     *
      +     * Returns a non-empty string representation of this object suitable for
      +     * debugging. The exact presentation format is unspecified and may vary
      +     * between implementations and versions.
      +     */
      +    public String toString() {
      +        return String.format(
      +            "%s{count=%d, sum=%d, min=%d, average=%d, max=%d}",
      +            this.getClass().getSimpleName(),
      +            getCount(),
      +            getSum(),
      +            getMin(),
      +            getAverage(),
      +            getMax());
      +    }
      +}
      
      From fa54d97a102e2dee36b592ef170de00f90958578 Mon Sep 17 00:00:00 2001
      From: Mandy Chung <mchung@openjdk.org>
      Date: Wed, 17 Apr 2013 12:04:15 -0700
      Subject: [PATCH 148/151] 8004260: dynamic proxy class should have the same
       Java language access as the proxy interfaces
      
      Reviewed-by: alanb, jrose, jdn
      ---
       .../classes/java/lang/reflect/Proxy.java      | 187 ++++++++-------
       .../java/lang/reflect/ReflectPermission.java  |  26 ++-
       .../classes/sun/misc/ProxyGenerator.java      |  93 +++++---
       .../reflect/annotation/AnnotationParser.java  |  15 +-
       .../share/classes/sun/rmi/server/Util.java    |  16 +-
       .../classes/sun/tracing/ProviderSkeleton.java |   8 +-
       .../nonPublicProxy/NonPublicProxyClass.java   | 215 ++++++++++++++++++
       .../Proxy/nonPublicProxy/SimpleProxy.java     |  68 ++++++
       .../reflect/Proxy/nonPublicProxy/p/Bar.java   |  26 +++
       .../reflect/Proxy/nonPublicProxy/p/Foo.java   |  26 +++
       .../loadProxyClasses/security.policy          |   3 +
       11 files changed, 537 insertions(+), 146 deletions(-)
       create mode 100644 jdk/test/java/lang/reflect/Proxy/nonPublicProxy/NonPublicProxyClass.java
       create mode 100644 jdk/test/java/lang/reflect/Proxy/nonPublicProxy/SimpleProxy.java
       create mode 100644 jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Bar.java
       create mode 100644 jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Foo.java
      
      diff --git a/jdk/src/share/classes/java/lang/reflect/Proxy.java b/jdk/src/share/classes/java/lang/reflect/Proxy.java
      index 2dd06020b26..e6de8b77956 100644
      --- a/jdk/src/share/classes/java/lang/reflect/Proxy.java
      +++ b/jdk/src/share/classes/java/lang/reflect/Proxy.java
      @@ -28,7 +28,6 @@ package java.lang.reflect;
       import java.lang.ref.Reference;
       import java.lang.ref.WeakReference;
       import java.security.AccessController;
      -import java.security.Permission;
       import java.security.PrivilegedAction;
       import java.util.Arrays;
       import java.util.Collections;
      @@ -53,16 +52,14 @@ import sun.security.util.SecurityConstants;
        * <p>To create a proxy for some interface {@code Foo}:
        * <pre>
        *     InvocationHandler handler = new MyInvocationHandler(...);
      - *     Class proxyClass = Proxy.getProxyClass(
      - *         Foo.class.getClassLoader(), new Class[] { Foo.class });
      - *     Foo f = (Foo) proxyClass.
      - *         getConstructor(new Class[] { InvocationHandler.class }).
      - *         newInstance(new Object[] { handler });
      + *     Class&lt;?&gt; proxyClass = Proxy.getProxyClass(Foo.class.getClassLoader(), Foo.class);
      + *     Foo f = (Foo) proxyClass.getConstructor(InvocationHandler.class).
      + *                     newInstance(handler);
        * </pre>
        * or more simply:
        * <pre>
        *     Foo f = (Foo) Proxy.newProxyInstance(Foo.class.getClassLoader(),
      - *                                          new Class[] { Foo.class },
      + *                                          new Class&lt;?&gt;[] { Foo.class },
        *                                          handler);
        * </pre>
        *
      @@ -91,7 +88,11 @@ import sun.security.util.SecurityConstants;
        * <p>A proxy class has the following properties:
        *
        * <ul>
      - * <li>Proxy classes are public, final, and not abstract.
      + * <li>Proxy classes are <em>public, final, and not abstract</em> if
      + * all proxy interfaces are public.</li>
      + *
      + * <li>Proxy classes are <em>non-public, final, and not abstract</em> if
      + * any of the proxy interfaces is non-public.</li>
        *
        * <li>The unqualified name of a proxy class is unspecified.  The space
        * of class names that begin with the string {@code "$Proxy"}
      @@ -273,76 +274,17 @@ public class Proxy implements java.io.Serializable {
            * @param   h the invocation handler for this proxy instance
            */
           protected Proxy(InvocationHandler h) {
      -        doNewInstanceCheck();
               this.h = h;
           }
       
      -    private static class ProxyAccessHelper {
      -        // The permission is implementation specific.
      -        static final Permission PROXY_PERMISSION =
      -            new ReflectPermission("proxyConstructorNewInstance");
      -        // These system properties are defined to provide a short-term
      -        // workaround if customers need to disable the new security checks.
      -        static final boolean allowNewInstance;
      -        static final boolean allowNullLoader;
      -        static {
      -            allowNewInstance = getBooleanProperty("sun.reflect.proxy.allowsNewInstance");
      -            allowNullLoader = getBooleanProperty("sun.reflect.proxy.allowsNullLoader");
      -        }
      -
      -        private static boolean getBooleanProperty(final String key) {
      -            String s = AccessController.doPrivileged(new PrivilegedAction<String>() {
      -                public String run() {
      -                    return System.getProperty(key);
      -                }
      -            });
      -            return Boolean.valueOf(s);
      -        }
      -
      -        static boolean needsNewInstanceCheck(Class<?> proxyClass) {
      -            if (!Proxy.isProxyClass(proxyClass) || allowNewInstance) {
      -                return false;
      -            }
      -
      -            if (proxyClass.getName().startsWith(ReflectUtil.PROXY_PACKAGE + ".")) {
      -                // all proxy interfaces are public
      -                return false;
      -            }
      -            for (Class<?> intf : proxyClass.getInterfaces()) {
      -                if (!Modifier.isPublic(intf.getModifiers())) {
      -                    return true;
      -                }
      -            }
      -            return false;
      -        }
      -    }
      -
      -    /*
      -     * Access check on a proxy class that implements any non-public interface.
      -     *
      -     * @throws  SecurityException if a security manager exists, and
      -     *          the caller does not have the permission.
      -     */
      -    private void doNewInstanceCheck() {
      -        SecurityManager sm = System.getSecurityManager();
      -        Class<?> proxyClass = this.getClass();
      -        if (sm != null && ProxyAccessHelper.needsNewInstanceCheck(proxyClass)) {
      -            try {
      -                sm.checkPermission(ProxyAccessHelper.PROXY_PERMISSION);
      -            } catch (SecurityException e) {
      -                throw new SecurityException("Not allowed to construct a Proxy "
      -                        + "instance that implements a non-public interface", e);
      -            }
      -        }
      -    }
      -
           /**
            * Returns the {@code java.lang.Class} object for a proxy class
            * given a class loader and an array of interfaces.  The proxy class
            * will be defined by the specified class loader and will implement
      -     * all of the supplied interfaces.  If a proxy class for the same
      -     * permutation of interfaces has already been defined by the class
      -     * loader, then the existing proxy class will be returned; otherwise,
      +     * all of the supplied interfaces.  If any of the given interfaces
      +     * is non-public, the proxy class will be non-public. If a proxy class
      +     * for the same permutation of interfaces has already been defined by the
      +     * class loader, then the existing proxy class will be returned; otherwise,
            * a proxy class for those interfaces will be generated dynamically
            * and defined by the class loader.
            *
      @@ -407,6 +349,22 @@ public class Proxy implements java.io.Serializable {
            * @throws  IllegalArgumentException if any of the restrictions on the
            *          parameters that may be passed to {@code getProxyClass}
            *          are violated
      +     * @throws  SecurityException if a security manager, <em>s</em>, is present
      +     *          and any of the following conditions is met:
      +     *          <ul>
      +     *             <li> the given {@code loader} is {@code null} and
      +     *             the caller's class loader is not {@code null} and the
      +     *             invocation of {@link SecurityManager#checkPermission
      +     *             s.checkPermission} with
      +     *             {@code RuntimePermission("getClassLoader")} permission
      +     *             denies access.</li>
      +     *             <li> the caller's class loader is not the same as or an
      +     *             ancestor of the class loader for the current class and
      +     *             invocation of {@link SecurityManager#checkPackageAccess
      +     *             s.checkPackageAccess()} denies access to any one of the
      +     *             given proxy interfaces.</li>
      +     *          </ul>
      +
            * @throws  NullPointerException if the {@code interfaces} array
            *          argument or any of its elements are {@code null}
            */
      @@ -449,9 +407,7 @@ public class Proxy implements java.io.Serializable {
               if (sm != null) {
                   ClassLoader ccl = caller.getClassLoader();
                   if (VM.isSystemDomainLoader(loader) && !VM.isSystemDomainLoader(ccl)) {
      -                if (!ProxyAccessHelper.allowNullLoader) {
      -                    sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
      -                }
      +                sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION);
                   }
                   ReflectUtil.checkProxyPackageAccess(ccl, interfaces);
               }
      @@ -593,6 +549,7 @@ public class Proxy implements java.io.Serializable {
       
               try {
                   String proxyPkg = null;     // package to define proxy class in
      +            int accessFlags = Modifier.PUBLIC | Modifier.FINAL;
       
                   /*
                    * Record the package of a non-public proxy interface so that the
      @@ -602,6 +559,7 @@ public class Proxy implements java.io.Serializable {
                   for (int i = 0; i < interfaces.length; i++) {
                       int flags = interfaces[i].getModifiers();
                       if (!Modifier.isPublic(flags)) {
      +                    accessFlags = Modifier.FINAL;
                           String name = interfaces[i].getName();
                           int n = name.lastIndexOf('.');
                           String pkg = ((n == -1) ? "" : name.substring(0, n + 1));
      @@ -637,7 +595,7 @@ public class Proxy implements java.io.Serializable {
                        * Generate the specified proxy class.
                        */
                       byte[] proxyClassFile = ProxyGenerator.generateProxyClass(
      -                    proxyName, interfaces);
      +                    proxyName, interfaces, accessFlags);
                       try {
                           proxyClass = defineClass0(loader, proxyName,
                               proxyClassFile, 0, proxyClassFile.length);
      @@ -678,12 +636,7 @@ public class Proxy implements java.io.Serializable {
           /**
            * Returns an instance of a proxy class for the specified interfaces
            * that dispatches method invocations to the specified invocation
      -     * handler.  This method is equivalent to:
      -     * <pre>
      -     *     Proxy.getProxyClass(loader, interfaces).
      -     *         getConstructor(new Class[] { InvocationHandler.class }).
      -     *         newInstance(new Object[] { handler });
      -     * </pre>
      +     * handler.
            *
            * <p>{@code Proxy.newProxyInstance} throws
            * {@code IllegalArgumentException} for the same reasons that
      @@ -699,6 +652,27 @@ public class Proxy implements java.io.Serializable {
            * @throws  IllegalArgumentException if any of the restrictions on the
            *          parameters that may be passed to {@code getProxyClass}
            *          are violated
      +     * @throws  SecurityException if a security manager, <em>s</em>, is present
      +     *          and any of the following conditions is met:
      +     *          <ul>
      +     *          <li> the given {@code loader} is {@code null} and
      +     *               the caller's class loader is not {@code null} and the
      +     *               invocation of {@link SecurityManager#checkPermission
      +     *               s.checkPermission} with
      +     *               {@code RuntimePermission("getClassLoader")} permission
      +     *               denies access;</li>
      +     *          <li> the caller's class loader is not the same as or an
      +     *               ancestor of the class loader for the current class and
      +     *               invocation of {@link SecurityManager#checkPackageAccess
      +     *               s.checkPackageAccess()} denies access to any one of the
      +     *               given proxy interfaces.</li>
      +     *          <li> any of the given proxy interfaces is non-public and the
      +     *               caller class is not in the same {@linkplain Package runtime package}
      +     *               as the non-public interface and the invocation of
      +     *               {@link SecurityManager#checkPermission s.checkPermission} with
      +     *               {@code ReflectPermission("newProxyInPackage.{package name}")}
      +     *               permission denies access.</li>
      +     *          </ul>
            * @throws  NullPointerException if the {@code interfaces} array
            *          argument or any of its elements are {@code null}, or
            *          if the invocation handler, {@code h}, is
      @@ -728,24 +702,61 @@ public class Proxy implements java.io.Serializable {
                * Invoke its constructor with the designated invocation handler.
                */
               try {
      +            if (sm != null) {
      +                checkNewProxyPermission(Reflection.getCallerClass(), cl);
      +            }
      +
                   final Constructor<?> cons = cl.getConstructor(constructorParams);
                   final InvocationHandler ih = h;
      -            if (sm != null && ProxyAccessHelper.needsNewInstanceCheck(cl)) {
      -                // create proxy instance with doPrivilege as the proxy class may
      -                // implement non-public interfaces that requires a special permission
      -                return AccessController.doPrivileged(new PrivilegedAction<Object>() {
      -                    public Object run() {
      -                        return newInstance(cons, ih);
      +            if (!Modifier.isPublic(cl.getModifiers())) {
      +                AccessController.doPrivileged(new PrivilegedAction<Void>() {
      +                    public Void run() {
      +                        cons.setAccessible(true);
      +                        return null;
                           }
                       });
      +            }
      +            return cons.newInstance(new Object[]{h});
      +        } catch (IllegalAccessException|InstantiationException e) {
      +            throw new InternalError(e.toString(), e);
      +        } catch (InvocationTargetException e) {
      +            Throwable t = e.getCause();
      +            if (t instanceof RuntimeException) {
      +                throw (RuntimeException) t;
                   } else {
      -                return newInstance(cons, ih);
      +                throw new InternalError(t.toString(), t);
                   }
               } catch (NoSuchMethodException e) {
                   throw new InternalError(e.toString(), e);
               }
           }
       
      +    private static void checkNewProxyPermission(Class<?> caller, Class<?> proxyClass) {
      +        SecurityManager sm = System.getSecurityManager();
      +        if (sm != null) {
      +            String pcn = proxyClass.getName();
      +            if (pcn.startsWith(ReflectUtil.PROXY_PACKAGE + ".")) {
      +                // all proxy interfaces are public
      +                return;
      +            }
      +
      +            ClassLoader ccl = caller.getClassLoader();
      +            ClassLoader pcl = proxyClass.getClassLoader();
      +
      +            // do permission check if the caller is in a different runtime package
      +            // of the proxy class
      +            int n = pcn.lastIndexOf('.');
      +            String pkg = (n == -1) ? "" : pcn.substring(0, n);
      +
      +            n = caller.getName().lastIndexOf('.');
      +            String callerPkg = (n == -1) ? "" : caller.getName().substring(0, n);
      +
      +            if (pcl != ccl || !pkg.equals(callerPkg)) {
      +                sm.checkPermission(new ReflectPermission("newProxyInPackage." + pkg));
      +            }
      +        }
      +    }
      +
           private static Object newInstance(Constructor<?> cons, InvocationHandler h) {
               try {
                   return cons.newInstance(new Object[] {h} );
      diff --git a/jdk/src/share/classes/java/lang/reflect/ReflectPermission.java b/jdk/src/share/classes/java/lang/reflect/ReflectPermission.java
      index 635da52d857..6570e792242 100644
      --- a/jdk/src/share/classes/java/lang/reflect/ReflectPermission.java
      +++ b/jdk/src/share/classes/java/lang/reflect/ReflectPermission.java
      @@ -26,12 +26,7 @@
       package java.lang.reflect;
       
       /**
      - * The Permission class for reflective operations.  A
      - * ReflectPermission is a <em>named permission</em> and has no
      - * actions.  The only name currently defined is {@code suppressAccessChecks},
      - * which allows suppressing the standard Java language access checks
      - * -- for public, default (package) access, protected, and private
      - * members -- performed by reflected objects at their point of use.
      + * The Permission class for reflective operations.
        * <P>
        * The following table
        * provides a summary description of what the permission allows,
      @@ -47,11 +42,21 @@ package java.lang.reflect;
        *
        * <tr>
        *   <td>suppressAccessChecks</td>
      - *   <td>ability to access
      - * fields and invoke methods in a class. Note that this includes
      - * not only public, but protected and private fields and methods as well.</td>
      + *   <td>ability to suppress the standard Java language access checks
      + *       on fields and methods in a class; allow access not only public members
      + *       but also allow access to default (package) access, protected,
      + *       and private members.</td>
        *   <td>This is dangerous in that information (possibly confidential) and
      - * methods normally unavailable would be accessible to malicious code.</td>
      + *       methods normally unavailable would be accessible to malicious code.</td>
      + * </tr>
      + * <tr>
      + *   <td>newProxyInPackage.{package name}</td>
      + *   <td>ability to create a proxy instance in the specified package of which
      + *       the non-public interface that the proxy class implements.</td>
      + *   <td>This gives code access to classes in packages to which it normally
      + *       does not have access and the dynamic proxy class is in the system
      + *       protection domain. Malicious code may use these classes to
      + *       help in its attempt to compromise security in the system.</td>
        * </tr>
        *
        * </table>
      @@ -63,6 +68,7 @@ package java.lang.reflect;
        * @see Field#set
        * @see Method#invoke
        * @see Constructor#newInstance
      + * @see Proxy#newProxyInstance
        *
        * @since 1.2
        */
      diff --git a/jdk/src/share/classes/sun/misc/ProxyGenerator.java b/jdk/src/share/classes/sun/misc/ProxyGenerator.java
      index 752553419f4..dd93aa092e0 100644
      --- a/jdk/src/share/classes/sun/misc/ProxyGenerator.java
      +++ b/jdk/src/share/classes/sun/misc/ProxyGenerator.java
      @@ -27,11 +27,14 @@ package sun.misc;
       
       import java.io.ByteArrayOutputStream;
       import java.io.DataOutputStream;
      -import java.io.FileOutputStream;
      +import java.io.File;
       import java.io.IOException;
       import java.io.OutputStream;
       import java.lang.reflect.Array;
       import java.lang.reflect.Method;
      +import java.nio.file.Files;
      +import java.nio.file.Path;
      +import java.nio.file.Paths;
       import java.util.ArrayList;
       import java.util.HashMap;
       import java.util.LinkedList;
      @@ -314,12 +317,25 @@ public class ProxyGenerator {
                       "sun.misc.ProxyGenerator.saveGeneratedFiles")).booleanValue();
       
           /**
      -     * Generate a proxy class given a name and a list of proxy interfaces.
      +     * Generate a public proxy class given a name and a list of proxy interfaces.
            */
           public static byte[] generateProxyClass(final String name,
      -                                            Class[] interfaces)
      +                                            Class<?>[] interfaces) {
      +        return generateProxyClass(name, interfaces, (ACC_PUBLIC | ACC_FINAL | ACC_SUPER));
      +    }
      +
      +    /**
      +     * Generate a proxy class given a name and a list of proxy interfaces.
      +     *
      +     * @param name        the class name of the proxy class
      +     * @param interfaces  proxy interfaces
      +     * @param accessFlags access flags of the proxy class
      +    */
      +    public static byte[] generateProxyClass(final String name,
      +                                            Class<?>[] interfaces,
      +                                            int accessFlags)
           {
      -        ProxyGenerator gen = new ProxyGenerator(name, interfaces);
      +        ProxyGenerator gen = new ProxyGenerator(name, interfaces, accessFlags);
               final byte[] classFile = gen.generateClassFile();
       
               if (saveGeneratedFiles) {
      @@ -327,10 +343,16 @@ public class ProxyGenerator {
                   new java.security.PrivilegedAction<Void>() {
                       public Void run() {
                           try {
      -                        FileOutputStream file =
      -                            new FileOutputStream(dotToSlash(name) + ".class");
      -                        file.write(classFile);
      -                        file.close();
      +                        int i = name.lastIndexOf('.');
      +                        Path path;
      +                        if (i > 0) {
      +                            Path dir = Paths.get(name.substring(0, i).replace('.', File.separatorChar));
      +                            Files.createDirectories(dir);
      +                            path = dir.resolve(name.substring(i+1, name.length()) + ".class");
      +                        } else {
      +                            path = Paths.get(name + ".class");
      +                        }
      +                        Files.write(path, classFile);
                               return null;
                           } catch (IOException e) {
                               throw new InternalError(
      @@ -364,21 +386,23 @@ public class ProxyGenerator {
           /** proxy interfaces */
           private Class[] interfaces;
       
      +    /** proxy class access flags */
      +    private int accessFlags;
      +
           /** constant pool of class being generated */
           private ConstantPool cp = new ConstantPool();
       
           /** FieldInfo struct for each field of generated class */
      -    private List<FieldInfo> fields = new ArrayList<FieldInfo>();
      +    private List<FieldInfo> fields = new ArrayList<>();
       
           /** MethodInfo struct for each method of generated class */
      -    private List<MethodInfo> methods = new ArrayList<MethodInfo>();
      +    private List<MethodInfo> methods = new ArrayList<>();
       
           /**
            * maps method signature string to list of ProxyMethod objects for
            * proxy methods with that signature
            */
      -    private Map<String, List<ProxyMethod>> proxyMethods =
      -        new HashMap<String,List<ProxyMethod>>();
      +    private Map<String, List<ProxyMethod>> proxyMethods = new HashMap<>();
       
           /** count of ProxyMethod objects added to proxyMethods */
           private int proxyMethodCount = 0;
      @@ -390,9 +414,10 @@ public class ProxyGenerator {
            * A ProxyGenerator object contains the state for the ongoing
            * generation of a particular proxy class.
            */
      -    private ProxyGenerator(String className, Class[] interfaces) {
      +    private ProxyGenerator(String className, Class<?>[] interfaces, int accessFlags) {
               this.className = className;
               this.interfaces = interfaces;
      +        this.accessFlags = accessFlags;
           }
       
           /**
      @@ -422,10 +447,9 @@ public class ProxyGenerator {
                * earlier interfaces precedence over later ones with duplicate
                * methods.
                */
      -        for (int i = 0; i < interfaces.length; i++) {
      -            Method[] methods = interfaces[i].getMethods();
      -            for (int j = 0; j < methods.length; j++) {
      -                addProxyMethod(methods[j], interfaces[i]);
      +        for (Class<?> intf : interfaces) {
      +            for (Method m : intf.getMethods()) {
      +                addProxyMethod(m, intf);
                   }
               }
       
      @@ -480,8 +504,8 @@ public class ProxyGenerator {
                */
               cp.getClass(dotToSlash(className));
               cp.getClass(superclassName);
      -        for (int i = 0; i < interfaces.length; i++) {
      -            cp.getClass(dotToSlash(interfaces[i].getName()));
      +        for (Class<?> intf: interfaces) {
      +            cp.getClass(dotToSlash(intf.getName()));
               }
       
               /*
      @@ -508,7 +532,7 @@ public class ProxyGenerator {
                   cp.write(dout);             // (write constant pool)
       
                                               // u2 access_flags;
      -            dout.writeShort(ACC_PUBLIC | ACC_FINAL | ACC_SUPER);
      +            dout.writeShort(accessFlags);
                                               // u2 this_class;
                   dout.writeShort(cp.getClass(dotToSlash(className)));
                                               // u2 super_class;
      @@ -517,9 +541,9 @@ public class ProxyGenerator {
                                               // u2 interfaces_count;
                   dout.writeShort(interfaces.length);
                                               // u2 interfaces[interfaces_count];
      -            for (int i = 0; i < interfaces.length; i++) {
      +            for (Class<?> intf : interfaces) {
                       dout.writeShort(cp.getClass(
      -                    dotToSlash(interfaces[i].getName())));
      +                    dotToSlash(intf.getName())));
                   }
       
                                               // u2 fields_count;
      @@ -576,7 +600,7 @@ public class ProxyGenerator {
                            * compatibly with the throws clauses of both
                            * overridden methods.
                            */
      -                    List<Class<?>> legalExceptions = new ArrayList<Class<?>>();
      +                    List<Class<?>> legalExceptions = new ArrayList<>();
                           collectCompatibleTypes(
                               exceptionTypes, pm.exceptionTypes, legalExceptions);
                           collectCompatibleTypes(
      @@ -588,7 +612,7 @@ public class ProxyGenerator {
                       }
                   }
               } else {
      -            sigmethods = new ArrayList<ProxyMethod>(3);
      +            sigmethods = new ArrayList<>(3);
                   proxyMethods.put(sig, sigmethods);
               }
               sigmethods.add(new ProxyMethod(name, parameterTypes, returnType,
      @@ -618,7 +642,7 @@ public class ProxyGenerator {
                * List of return types that are not yet known to be
                * assignable from ("covered" by) any of the others.
                */
      -        LinkedList<Class<?>> uncoveredReturnTypes = new LinkedList<Class<?>>();
      +        LinkedList<Class<?>> uncoveredReturnTypes = new LinkedList<>();
       
           nextNewReturnType:
               for (ProxyMethod pm : methods) {
      @@ -833,8 +857,8 @@ public class ProxyGenerator {
                                               // u2 number_of_exceptions;
                   out.writeShort(declaredExceptions.length);
                               // u2 exception_index_table[number_of_exceptions];
      -            for (int i = 0; i < declaredExceptions.length; i++) {
      -                out.writeShort(declaredExceptions[i]);
      +            for (short value : declaredExceptions) {
      +                out.writeShort(value);
                   }
               }
       
      @@ -1525,11 +1549,11 @@ public class ProxyGenerator {
                                                      Class<?>[] with,
                                                      List<Class<?>> list)
           {
      -        for (int i = 0; i < from.length; i++) {
      -            if (!list.contains(from[i])) {
      -                for (int j = 0; j < with.length; j++) {
      -                    if (with[j].isAssignableFrom(from[i])) {
      -                        list.add(from[i]);
      +        for (Class<?> fc: from) {
      +            if (!list.contains(fc)) {
      +                for (Class<?> wc: with) {
      +                    if (wc.isAssignableFrom(fc)) {
      +                        list.add(fc);
                               break;
                           }
                       }
      @@ -1559,15 +1583,14 @@ public class ProxyGenerator {
            * need to be caught.
            */
           private static List<Class<?>> computeUniqueCatchList(Class<?>[] exceptions) {
      -        List<Class<?>> uniqueList = new ArrayList<Class<?>>();
      +        List<Class<?>> uniqueList = new ArrayList<>();
                                                       // unique exceptions to catch
       
               uniqueList.add(Error.class);            // always catch/rethrow these
               uniqueList.add(RuntimeException.class);
       
           nextException:
      -        for (int i = 0; i < exceptions.length; i++) {
      -            Class<?> ex = exceptions[i];
      +        for (Class<?> ex: exceptions) {
                   if (ex.isAssignableFrom(Throwable.class)) {
                       /*
                        * If Throwable is declared to be thrown by the proxy method,
      diff --git a/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java b/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java
      index a980a9126ef..ae15f249464 100644
      --- a/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java
      +++ b/jdk/src/share/classes/sun/reflect/annotation/AnnotationParser.java
      @@ -30,6 +30,8 @@ import java.util.*;
       import java.nio.ByteBuffer;
       import java.nio.BufferUnderflowException;
       import java.lang.reflect.*;
      +import java.security.AccessController;
      +import java.security.PrivilegedAction;
       import sun.reflect.ConstantPool;
       
       import sun.reflect.generics.parser.SignatureParser;
      @@ -253,12 +255,15 @@ public class AnnotationParser {
            * Returns an annotation of the given type backed by the given
            * member -> value map.
            */
      -    public static Annotation annotationForMap(
      -        Class<? extends Annotation> type, Map<String, Object> memberValues)
      +    public static Annotation annotationForMap(final Class<? extends Annotation> type,
      +                                              final Map<String, Object> memberValues)
           {
      -        return (Annotation) Proxy.newProxyInstance(
      -            type.getClassLoader(), new Class<?>[] { type },
      -            new AnnotationInvocationHandler(type, memberValues));
      +        return AccessController.doPrivileged(new PrivilegedAction<Annotation>() {
      +            public Annotation run() {
      +                return (Annotation) Proxy.newProxyInstance(
      +                    type.getClassLoader(), new Class<?>[] { type },
      +                    new AnnotationInvocationHandler(type, memberValues));
      +            }});
           }
       
           /**
      diff --git a/jdk/src/share/classes/sun/rmi/server/Util.java b/jdk/src/share/classes/sun/rmi/server/Util.java
      index 54f571175f8..0f6c7ddee50 100644
      --- a/jdk/src/share/classes/sun/rmi/server/Util.java
      +++ b/jdk/src/share/classes/sun/rmi/server/Util.java
      @@ -48,6 +48,7 @@ import java.security.AccessController;
       import java.security.MessageDigest;
       import java.security.DigestOutputStream;
       import java.security.NoSuchAlgorithmException;
      +import java.security.PrivilegedAction;
       import java.util.ArrayList;
       import java.util.Collections;
       import java.util.Map;
      @@ -140,17 +141,20 @@ public final class Util {
                   return createStub(remoteClass, clientRef);
               }
       
      -        ClassLoader loader = implClass.getClassLoader();
      -        Class[] interfaces = getRemoteInterfaces(implClass);
      -        InvocationHandler handler =
      +        final ClassLoader loader = implClass.getClassLoader();
      +        final Class[] interfaces = getRemoteInterfaces(implClass);
      +        final InvocationHandler handler =
                   new RemoteObjectInvocationHandler(clientRef);
       
               /* REMIND: private remote interfaces? */
       
               try {
      -            return (Remote) Proxy.newProxyInstance(loader,
      -                                                   interfaces,
      -                                                   handler);
      +            return AccessController.doPrivileged(new PrivilegedAction<Remote>() {
      +                public Remote run() {
      +                    return (Remote) Proxy.newProxyInstance(loader,
      +                                                           interfaces,
      +                                                           handler);
      +                }});
               } catch (IllegalArgumentException e) {
                   throw new StubNotFoundException("unable to create proxy", e);
               }
      diff --git a/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java b/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java
      index 51a94472184..ca5e58fbc6c 100644
      --- a/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java
      +++ b/jdk/src/share/classes/sun/tracing/ProviderSkeleton.java
      @@ -130,8 +130,12 @@ public abstract class ProviderSkeleton implements InvocationHandler, Provider {
            */
           @SuppressWarnings("unchecked")
           public <T extends Provider> T newProxyInstance() {
      -        return (T)Proxy.newProxyInstance(providerType.getClassLoader(),
      -               new Class<?>[] { providerType }, this);
      +        final InvocationHandler ih = this;
      +        return AccessController.doPrivileged(new PrivilegedAction<T>() {
      +            public T run() {
      +               return (T)Proxy.newProxyInstance(providerType.getClassLoader(),
      +                   new Class<?>[] { providerType }, ih);
      +            }});
           }
       
           /**
      diff --git a/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/NonPublicProxyClass.java b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/NonPublicProxyClass.java
      new file mode 100644
      index 00000000000..62d1fde39f0
      --- /dev/null
      +++ b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/NonPublicProxyClass.java
      @@ -0,0 +1,215 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import java.lang.reflect.Constructor;
      +import java.lang.reflect.InvocationHandler;
      +import java.lang.reflect.Method;
      +import java.lang.reflect.Modifier;
      +import java.lang.reflect.Proxy;
      +import java.lang.reflect.ReflectPermission;
      +import java.security.AccessControlException;
      +import java.security.CodeSource;
      +import java.security.Permission;
      +import java.security.PermissionCollection;
      +import java.security.Permissions;
      +import java.security.Policy;
      +import java.security.ProtectionDomain;
      +import java.security.SecurityPermission;
      +import java.util.*;
      +
      +/*
      + * @test
      + * @bug 8004260
      + * @summary Test proxy classes that implement non-public interface
      + *
      + * @build p.Foo
      + * @run main/othervm NonPublicProxyClass grant
      + * @run main/othervm NonPublicProxyClass deny
      + * @run main/othervm NonPublicProxyClass
      + */
      +public class NonPublicProxyClass {
      +    public interface PublicInterface {
      +        void foo();
      +    }
      +    interface NonPublicInterface {
      +        void bar();
      +    }
      +
      +    public static void main(String[] args) throws Exception {
      +        ClassLoader loader = ClassLoader.getSystemClassLoader();
      +        Class<?> zipConstantsClass = Class.forName("java.util.zip.ZipConstants", false, null);
      +        Class<?> fooClass = Class.forName("p.Foo");
      +
      +        NonPublicProxyClass test1 =
      +            new NonPublicProxyClass(loader, PublicInterface.class, NonPublicInterface.class);
      +        NonPublicProxyClass test2 =
      +            new NonPublicProxyClass(loader, fooClass, PublicInterface.class);
      +        NonPublicProxyClass test3 =
      +            new NonPublicProxyClass(null, zipConstantsClass);
      +
      +        if (args.length == 1) {
      +            switch (args[0]) {
      +                case "grant": Policy.setPolicy(new NewInstancePolicy(true));
      +                              break;
      +                case "deny" : Policy.setPolicy(new NewInstancePolicy(false));
      +                              break;
      +                default: throw new IllegalArgumentException(args[0]);
      +            }
      +            System.setSecurityManager(new SecurityManager());
      +        }
      +
      +        test1.run();
      +        test2.run();
      +        test3.run();
      +        System.out.format("Test passed: security %s%n",
      +            (args.length == 0 ? "manager not installed" : Policy.getPolicy()));
      +    }
      +
      +    private final ClassLoader loader;
      +    private final Class<?>[] interfaces;
      +    private final InvocationHandler handler = newInvocationHandler();
      +    private Class<?> proxyClass;
      +    public NonPublicProxyClass(ClassLoader loader, Class<?> ... intfs) {
      +        this.loader = loader;
      +        this.interfaces = intfs;
      +    }
      +
      +    public void run() throws Exception {
      +        boolean hasAccess = loader != null || hasAccess();
      +        try {
      +            proxyClass = Proxy.getProxyClass(loader, interfaces);
      +            if (!hasAccess) {
      +                throw new RuntimeException("should have no permission to create proxy class");
      +            }
      +        } catch (AccessControlException e) {
      +            if (hasAccess) {
      +                throw e;
      +            }
      +            if (e.getPermission().getClass() != RuntimePermission.class ||
      +                    !e.getPermission().getName().equals("getClassLoader")) {
      +                throw e;
      +            }
      +            return;
      +        }
      +
      +        if (Modifier.isPublic(proxyClass.getModifiers())) {
      +            throw new RuntimeException(proxyClass + " must be non-public");
      +        }
      +        newProxyInstance();
      +        newInstanceFromConstructor(proxyClass);
      +    }
      +
      +    private boolean hasAccess() {
      +        if (System.getSecurityManager() == null) {
      +            return true;
      +        }
      +        NewInstancePolicy policy = NewInstancePolicy.class.cast(Policy.getPolicy());
      +        return policy.grant;
      +    }
      +
      +    private final static String NEW_PROXY_IN_PKG = "newProxyInPackage.";
      +    private void newProxyInstance() {
      +        // expect newProxyInstance to succeed if it's in the same runtime package
      +        int i = proxyClass.getName().lastIndexOf('.');
      +        String pkg = (i != -1) ? proxyClass.getName().substring(0, i) : "";
      +        boolean hasAccess = pkg.isEmpty() || hasAccess();
      +        try {
      +            Proxy.newProxyInstance(loader, interfaces, handler);
      +            if (!hasAccess) {
      +                throw new RuntimeException("ERROR: Proxy.newProxyInstance should fail " + proxyClass);
      +            }
      +        } catch (AccessControlException e) {
      +            if (hasAccess) {
      +                throw e;
      +            }
      +            if (e.getPermission().getClass() != ReflectPermission.class ||
      +                    !e.getPermission().getName().equals(NEW_PROXY_IN_PKG + pkg)) {
      +                throw e;
      +            }
      +        }
      +    }
      +
      +    private void newInstanceFromConstructor(Class<?> proxyClass)
      +        throws Exception
      +    {
      +        // expect newInstance to succeed if it's in the same runtime package
      +        boolean isSamePackage = proxyClass.getName().lastIndexOf('.') == -1;
      +        try {
      +            Constructor cons = proxyClass.getConstructor(InvocationHandler.class);
      +            cons.newInstance(newInvocationHandler());
      +            if (!isSamePackage) {
      +                throw new RuntimeException("ERROR: Constructor.newInstance should not succeed");
      +            }
      +        }  catch (IllegalAccessException e) {
      +            if (isSamePackage) {
      +                throw e;
      +            }
      +        }
      +    }
      +
      +    private static InvocationHandler newInvocationHandler() {
      +        return new InvocationHandler() {
      +            public Object invoke(Object proxy, Method method, Object[] args)
      +                    throws Throwable {
      +                Class<?>[] intfs = proxy.getClass().getInterfaces();
      +                System.out.println("Proxy for " + Arrays.toString(intfs)
      +                        + " " + method.getName() + " is being invoked");
      +                return null;
      +            }
      +        };
      +    }
      +
      +    static class NewInstancePolicy extends Policy {
      +        final PermissionCollection permissions = new Permissions();
      +        final boolean grant;
      +        NewInstancePolicy(boolean grant) {
      +            this.grant = grant;
      +            permissions.add(new SecurityPermission("getPolicy"));
      +            if (grant) {
      +                permissions.add(new RuntimePermission("getClassLoader"));
      +                permissions.add(new ReflectPermission(NEW_PROXY_IN_PKG + "p"));
      +                permissions.add(new ReflectPermission(NEW_PROXY_IN_PKG + "java.util.zip"));
      +            }
      +        }
      +        public PermissionCollection getPermissions(ProtectionDomain domain) {
      +            return permissions;
      +        }
      +
      +        public PermissionCollection getPermissions(CodeSource codesource) {
      +            return permissions;
      +        }
      +
      +        public boolean implies(ProtectionDomain domain, Permission perm) {
      +            return permissions.implies(perm);
      +        }
      +
      +        public String toString() {
      +            StringBuilder sb = new StringBuilder("policy: ");
      +            Enumeration<Permission> perms = permissions.elements();
      +            while (perms.hasMoreElements()) {
      +                sb.append("\n").append(perms.nextElement().toString());
      +            }
      +            return sb.toString();
      +        }
      +    }
      +}
      diff --git a/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/SimpleProxy.java b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/SimpleProxy.java
      new file mode 100644
      index 00000000000..2d4554fd77d
      --- /dev/null
      +++ b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/SimpleProxy.java
      @@ -0,0 +1,68 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import java.lang.reflect.*;
      +import java.security.*;
      +import java.util.Arrays;
      +
      +/*
      + * @test
      + * @bug 8004260
      + * @summary Test making a proxy instance that implements a non-public
      + *          interface with and without security manager installed
      + * @build p.Foo p.Bar
      + * @run main SimpleProxy
      + */
      +public class SimpleProxy {
      +    public static void main(String[] args) throws Exception {
      +        ClassLoader loader = SimpleProxy.class.getClassLoader();
      +        Class<?> fooClass = Class.forName("p.Foo");
      +        Class<?> barClass = Class.forName("p.Bar");
      +
      +        makeProxy(loader, fooClass);
      +
      +        System.setSecurityManager(new SecurityManager());
      +        try {
      +            makeProxy(loader, barClass);
      +            throw new RuntimeException("should fail to new proxy instance of a non-public interface");
      +        } catch (AccessControlException e) {
      +            if (e.getPermission().getClass() != ReflectPermission.class ||
      +                    !e.getPermission().getName().equals("newProxyInPackage.p")) {
      +                throw e;
      +            }
      +        }
      +    }
      +
      +    private static void makeProxy(ClassLoader loader, Class<?> cls) {
      +        Class<?>[] intfs = new Class<?>[] { cls };
      +        Proxy.newProxyInstance(loader, intfs, new InvocationHandler() {
      +            public Object invoke(Object proxy, Method method, Object[] args)
      +                    throws Throwable {
      +                Class<?>[] intfs = proxy.getClass().getInterfaces();
      +                System.out.println("Proxy for " + Arrays.toString(intfs)
      +                        + " " + method.getName() + " is being invoked");
      +                return null;
      +            }
      +        });
      +    }
      +}
      diff --git a/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Bar.java b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Bar.java
      new file mode 100644
      index 00000000000..86e96ba43d6
      --- /dev/null
      +++ b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Bar.java
      @@ -0,0 +1,26 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +package p;
      +interface Bar {
      +}
      diff --git a/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Foo.java b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Foo.java
      new file mode 100644
      index 00000000000..704a7ccdd5b
      --- /dev/null
      +++ b/jdk/test/java/lang/reflect/Proxy/nonPublicProxy/p/Foo.java
      @@ -0,0 +1,26 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +package p;
      +interface Foo {
      +}
      diff --git a/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy b/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy
      index 3ba44491aca..06773567405 100644
      --- a/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy
      +++ b/jdk/test/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy
      @@ -16,6 +16,9 @@ grant {
           permission java.lang.RuntimePermission "getClassLoader";
           permission java.lang.RuntimePermission "setContextClassLoader";
       
      +    permission java.lang.reflect.ReflectPermission "newProxyInPackage.";
      +    permission java.lang.reflect.ReflectPermission "newProxyInPackage.java.util.zip";
      +
           // used by TestLibrary to determine test environment
           permission java.util.PropertyPermission "test.classes", "read";
           permission java.util.PropertyPermission "test.src", "read";
      
      From 95fadac5c68da24e9cca5a0fc70bfcba6027a352 Mon Sep 17 00:00:00 2001
      From: Brian Goetz <briangoetz@openjdk.org>
      Date: Tue, 16 Apr 2013 13:51:53 -0400
      Subject: [PATCH 149/151] 8010096: Initial java.util.Spliterator putback
      
      Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
      Co-authored-by: Doug Lea <dl@cs.oswego.edu>
      Reviewed-by: mduigou, alanb, chegar, darcy
      ---
       .../com/sun/tools/jdi/EventSetImpl.java       |    5 +
       jdk/src/share/classes/java/lang/Iterable.java |   37 +-
       jdk/src/share/classes/java/util/Arrays.java   |  170 +-
       .../share/classes/java/util/Collection.java   |   32 +-
       jdk/src/share/classes/java/util/Iterator.java |   35 +-
       jdk/src/share/classes/java/util/List.java     |   28 +-
       .../classes/java/util/PrimitiveIterator.java  |  274 +++
       jdk/src/share/classes/java/util/Set.java      |   27 +-
       .../share/classes/java/util/SortedSet.java    |   41 +-
       .../share/classes/java/util/Spliterator.java  |  835 +++++++
       .../share/classes/java/util/Spliterators.java | 2154 +++++++++++++++++
       jdk/src/share/classes/java/util/Tripwire.java |   69 +
       .../SpliteratorLateBindingFailFastTest.java   |  357 +++
       ...SpliteratorTraversingAndSplittingTest.java | 1257 ++++++++++
       14 files changed, 5310 insertions(+), 11 deletions(-)
       create mode 100644 jdk/src/share/classes/java/util/PrimitiveIterator.java
       create mode 100644 jdk/src/share/classes/java/util/Spliterator.java
       create mode 100644 jdk/src/share/classes/java/util/Spliterators.java
       create mode 100644 jdk/src/share/classes/java/util/Tripwire.java
       create mode 100644 jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java
       create mode 100644 jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java
      
      diff --git a/jdk/src/share/classes/com/sun/tools/jdi/EventSetImpl.java b/jdk/src/share/classes/com/sun/tools/jdi/EventSetImpl.java
      index eb5f9a3ef09..946478081db 100644
      --- a/jdk/src/share/classes/com/sun/tools/jdi/EventSetImpl.java
      +++ b/jdk/src/share/classes/com/sun/tools/jdi/EventSetImpl.java
      @@ -851,6 +851,11 @@ public class EventSetImpl extends ArrayList<Event> implements EventSet {
               }
           }
       
      +    @Override
      +    public Spliterator<Event> spliterator() {
      +        return Spliterators.spliterator(this, Spliterator.DISTINCT);
      +    }
      +
           /* below make this unmodifiable */
       
           public boolean add(Event o){
      diff --git a/jdk/src/share/classes/java/lang/Iterable.java b/jdk/src/share/classes/java/lang/Iterable.java
      index a47319243f0..8d46dbfe5ff 100644
      --- a/jdk/src/share/classes/java/lang/Iterable.java
      +++ b/jdk/src/share/classes/java/lang/Iterable.java
      @@ -22,26 +22,55 @@
        * or visit www.oracle.com if you need additional information or have any
        * questions.
        */
      -
       package java.lang;
       
       import java.util.Iterator;
      +import java.util.Objects;
      +import java.util.function.Consumer;
       
       /**
        * Implementing this interface allows an object to be the target of
      - * the "foreach" statement.
      + * the "for-each loop" statement. See
      + * <strong>
      + * <a href="{@docRoot}/../technotes/guides/language/foreach.html">For-each Loop</a>
      + * </strong>
        *
        * @param <T> the type of elements returned by the iterator
        *
        * @since 1.5
      + * @jls 14.14.2 The enhanced for statement
        */
       @FunctionalInterface
       public interface Iterable<T> {
      -
           /**
      -     * Returns an iterator over a set of elements of type T.
      +     * Returns an iterator over elements of type {@code T}.
            *
            * @return an Iterator.
            */
           Iterator<T> iterator();
      +
      +    /**
      +     * Performs the given action on the contents of the {@code Iterable}, in the
      +     * order elements occur when iterating, until all elements have been
      +     * processed or the action throws an exception.  Errors or runtime
      +     * exceptions thrown by the action are relayed to the caller.
      +     *
      +     * @implSpec
      +     * <p>The default implementation behaves as if:
      +     * <pre>{@code
      +     *     for (T t : this)
      +     *         action.accept(t);
      +     * }</pre>
      +     *
      +     * @param action The action to be performed for each element
      +     * @throws NullPointerException if the specified action is null
      +     * @since 1.8
      +     */
      +    default void forEach(Consumer<? super T> action) {
      +        Objects.requireNonNull(action);
      +        for (T t : this) {
      +            action.accept(t);
      +        }
      +    }
       }
      +
      diff --git a/jdk/src/share/classes/java/util/Arrays.java b/jdk/src/share/classes/java/util/Arrays.java
      index ee7f48f3507..e513398683b 100644
      --- a/jdk/src/share/classes/java/util/Arrays.java
      +++ b/jdk/src/share/classes/java/util/Arrays.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -3518,6 +3518,11 @@ public class Arrays {
               public boolean contains(Object o) {
                   return indexOf(o) != -1;
               }
      +
      +        @Override
      +        public Spliterator<E> spliterator() {
      +            return Spliterators.spliterator(a, Spliterator.ORDERED);
      +        }
           }
       
           /**
      @@ -4300,4 +4305,167 @@ public class Arrays {
               buf.append(']');
               dejaVu.remove(a);
           }
      +
      +    /**
      +     * Creates a {@link Spliterator} covering all of the specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param <T> Type of elements
      +     * @param array The array, assumed to be unmodified during use
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @since 1.8
      +     */
      +    public static <T> Spliterator<T> spliterator(T[] array) {
      +        return Spliterators.spliterator(array,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator} covering the specified range of the
      +     * specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param <T> Type of elements
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @since 1.8
      +     */
      +    public static <T> Spliterator<T> spliterator(T[] array, int fromIndex, int toIndex) {
      +        return Spliterators.spliterator(array, fromIndex, toIndex,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator.OfInt} covering all of the specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @since 1.8
      +     */
      +    public static Spliterator.OfInt spliterator(int[] array) {
      +        return Spliterators.spliterator(array,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator.OfInt} covering the specified range of the
      +     * specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @since 1.8
      +     */
      +    public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex) {
      +        return Spliterators.spliterator(array, fromIndex, toIndex,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator.OfLong} covering all of the specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @since 1.8
      +     */
      +    public static Spliterator.OfLong spliterator(long[] array) {
      +        return Spliterators.spliterator(array,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator.OfLong} covering the specified range of the
      +     * specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @since 1.8
      +     */
      +    public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex) {
      +        return Spliterators.spliterator(array, fromIndex, toIndex,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator.OfDouble} covering all of the specified
      +     * array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @since 1.8
      +     */
      +    public static Spliterator.OfDouble spliterator(double[] array) {
      +        return Spliterators.spliterator(array,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
      +
      +    /**
      +     * Creates a {@link Spliterator.OfDouble} covering the specified range of
      +     * the specified array.
      +     *
      +     * <p>The spliterator reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#SUBSIZED}, {@link Spliterator#ORDERED}, and
      +     * {@link Spliterator#IMMUTABLE}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @return A spliterator from the array
      +     * @throws NullPointerException if the specified array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @since 1.8
      +     */
      +    public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex) {
      +        return Spliterators.spliterator(array, fromIndex, toIndex,
      +                                        Spliterator.ORDERED | Spliterator.IMMUTABLE);
      +    }
       }
      diff --git a/jdk/src/share/classes/java/util/Collection.java b/jdk/src/share/classes/java/util/Collection.java
      index cbb39aab8ff..a09e8c362d9 100644
      --- a/jdk/src/share/classes/java/util/Collection.java
      +++ b/jdk/src/share/classes/java/util/Collection.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -104,6 +104,12 @@ package java.util;
        * <a href="{@docRoot}/../technotes/guides/collections/index.html">
        * Java Collections Framework</a>.
        *
      + * @implSpec
      + * The default method implementations (inherited or otherwise) do not apply any
      + * synchronization protocol.  If a {@code Collection} implementation has a
      + * specific synchronization protocol, then it must override default
      + * implementations to apply that protocol.
      + *
        * @param <E> the type of elements in this collection
        *
        * @author  Josh Bloch
      @@ -453,4 +459,28 @@ public interface Collection<E> extends Iterable<E> {
            * @see Object#equals(Object)
            */
           int hashCode();
      +
      +    /**
      +     * Creates a {@link Spliterator} over the elements in this collection.
      +     *
      +     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED}.
      +     * Implementations should document the reporting of additional
      +     * characteristic values.
      +     *
      +     * @implSpec
      +     * The default implementation creates a
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
      +     * from the collections's {@code Iterator}.  The spliterator inherits the
      +     * <em>fail-fast</em> properties of the collection's iterator.
      +     *
      +     * @implNote
      +     * The created {@code Spliterator} additionally reports
      +     * {@link Spliterator#SUBSIZED}.
      +     *
      +     * @return a {@code Spliterator} over the elements in this collection
      +     * @since 1.8
      +     */
      +    default Spliterator<E> spliterator() {
      +        return Spliterators.spliterator(this, 0);
      +    }
       }
      diff --git a/jdk/src/share/classes/java/util/Iterator.java b/jdk/src/share/classes/java/util/Iterator.java
      index 29ee0337a1d..4420d04995f 100644
      --- a/jdk/src/share/classes/java/util/Iterator.java
      +++ b/jdk/src/share/classes/java/util/Iterator.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -25,6 +25,8 @@
       
       package java.util;
       
      +import java.util.function.Consumer;
      +
       /**
        * An iterator over a collection.  {@code Iterator} takes the place of
        * {@link Enumeration} in the Java Collections Framework.  Iterators
      @@ -75,6 +77,10 @@ public interface Iterator<E> {
            * iteration is in progress in any way other than by calling this
            * method.
            *
      +     * @implSpec
      +     * The default implementation throws an instance of
      +     * {@link UnsupportedOperationException} and performs no other action.
      +     *
            * @throws UnsupportedOperationException if the {@code remove}
            *         operation is not supported by this iterator
            *
      @@ -83,5 +89,30 @@ public interface Iterator<E> {
            *         been called after the last call to the {@code next}
            *         method
            */
      -    void remove();
      +    default void remove() {
      +        throw new UnsupportedOperationException("remove");
      +    }
      +
      +    /**
      +     * Performs the given action for each remaining element, in the order
      +     * elements occur when iterating, until all elements have been processed or
      +     * the action throws an exception.  Errors or runtime exceptions thrown by
      +     * the action are relayed to the caller.
      +     *
      +     * @implSpec
      +     * <p>The default implementation behaves as if:
      +     * <pre>{@code
      +     *     while (hasNext())
      +     *         action.accept(next());
      +     * }</pre>
      +     *
      +     * @param action The action to be performed for each element
      +     * @throws NullPointerException if the specified action is null
      +     * @since 1.8
      +     */
      +    default void forEachRemaining(Consumer<? super E> action) {
      +        Objects.requireNonNull(action);
      +        while (hasNext())
      +            action.accept(next());
      +    }
       }
      diff --git a/jdk/src/share/classes/java/util/List.java b/jdk/src/share/classes/java/util/List.java
      index d8c57741bd6..734b231646e 100644
      --- a/jdk/src/share/classes/java/util/List.java
      +++ b/jdk/src/share/classes/java/util/List.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -597,4 +597,30 @@ public interface List<E> extends Collection<E> {
            *         fromIndex &gt; toIndex</tt>)
            */
           List<E> subList(int fromIndex, int toIndex);
      +
      +    /**
      +     * Creates a {@link Spliterator} over the elements in this list.
      +     *
      +     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED} and
      +     * {@link Spliterator#ORDERED}.  Implementations should document the
      +     * reporting of additional characteristic values.
      +     *
      +     * @implSpec
      +     * The default implementation creates a
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
      +     * from the list's {@code Iterator}.  The spliterator inherits the
      +     * <em>fail-fast</em> properties of the collection's iterator.
      +     *
      +     * @implNote
      +     * The created {@code Spliterator} additionally reports
      +     * {@link Spliterator#SUBSIZED}.
      +     *
      +     * @return a {@code Spliterator} over the elements in this list
      +     * @since 1.8
      +     */
      +    @Override
      +    default Spliterator<E> spliterator() {
      +        return Spliterators.spliterator(this, Spliterator.ORDERED);
      +    }
       }
      +
      diff --git a/jdk/src/share/classes/java/util/PrimitiveIterator.java b/jdk/src/share/classes/java/util/PrimitiveIterator.java
      new file mode 100644
      index 00000000000..d4e032e7430
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/PrimitiveIterator.java
      @@ -0,0 +1,274 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import java.util.function.Consumer;
      +import java.util.function.DoubleConsumer;
      +import java.util.function.IntConsumer;
      +import java.util.function.LongConsumer;
      +
      +/**
      + * A base type for primitive specializations of {@code Iterator}.  Specialized
      + * subtypes are provided for {@link OfInt int}, {@link OfLong long}, and
      + * {@link OfDouble double} values.
      + *
      + * <p>The specialized subtype default implementations of {@link Iterator#next}
      + * and {@link Iterator#forEachRemaining(java.util.function.Consumer)} box
      + * primitive values to instances of their corresponding wrapper class.  Such
      + * boxing may offset any advantages gained when using the primitive
      + * specializations.  To avoid boxing, the corresponding primitive-based methods
      + * should be used.  For example, {@link PrimitiveIterator.OfInt#nextInt()} and
      + * {@link PrimitiveIterator.OfInt#forEachRemaining(java.util.function.IntConsumer)}
      + * should be used in preference to {@link PrimitiveIterator.OfInt#next()} and
      + * {@link PrimitiveIterator.OfInt#forEachRemaining(java.util.function.Consumer)}.
      + *
      + * <p>Iteration of primitive values using boxing-based methods
      + * {@link Iterator#next next()} and
      + * {@link Iterator#forEachRemaining(java.util.function.Consumer) forEachRemaining()},
      + * does not affect the order in which the values, transformed to boxed values,
      + * are encountered.
      + *
      + * @implNote
      + * If the boolean system property {@code org.openjdk.java.util.stream.tripwire}
      + * is set to {@code true} then diagnostic warnings are reported if boxing of
      + * primitive values occur when operating on primitive subtype specializations.
      + *
      + * @param <T> the boxed type of the primitive type
      + * @since 1.8
      + */
      +public interface PrimitiveIterator<T> extends Iterator<T> {
      +
      +    /**
      +     * An Iterator specialized for {@code int} values.
      +     * @since 1.8
      +     */
      +    public static interface OfInt extends PrimitiveIterator<Integer> {
      +
      +        /**
      +         * Returns the next {@code int} element in the iteration.
      +         *
      +         * @return the next {@code int} element in the iteration
      +         * @throws NoSuchElementException if the iteration has no more elements
      +         */
      +        int nextInt();
      +
      +        /**
      +         * Performs the given action for each remaining element, in the order
      +         * elements occur when iterating, until all elements have been processed
      +         * or the action throws an exception.  Errors or runtime exceptions
      +         * thrown by the action are relayed to the caller.
      +         *
      +         * @implSpec
      +         * <p>The default implementation behaves as if:
      +         * <pre>{@code
      +         *     while (hasNext())
      +         *         action.accept(nextInt());
      +         * }</pre>
      +         *
      +         * @param action The action to be performed for each element
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        default void forEachRemaining(IntConsumer action) {
      +            while (hasNext())
      +                action.accept(nextInt());
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * The default implementation boxes the result of calling
      +         * {@link #nextInt()}, and returns that boxed result.
      +         */
      +        @Override
      +        default Integer next() {
      +            if (Tripwire.ENABLED)
      +                Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.nextInt()");
      +            return nextInt();
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code IntConsumer} then it is cast
      +         * to {@code IntConsumer} and passed to {@link #forEachRemaining};
      +         * otherwise the action is adapted to an instance of
      +         * {@code IntConsumer}, by boxing the argument of {@code IntConsumer},
      +         * and then passed to {@link #forEachRemaining}.
      +         */
      +        @Override
      +        default void forEachRemaining(Consumer<? super Integer> action) {
      +            if (action instanceof IntConsumer) {
      +                forEachRemaining((IntConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.forEachRemainingInt(action::accept)");
      +                forEachRemaining((IntConsumer) action::accept);
      +            }
      +        }
      +
      +    }
      +
      +    /**
      +     * An Iterator specialized for {@code long} values.
      +     * @since 1.8
      +     */
      +    public static interface OfLong extends PrimitiveIterator<Long> {
      +
      +        /**
      +         * Returns the next {@code long} element in the iteration.
      +         *
      +         * @return the next {@code long} element in the iteration
      +         * @throws NoSuchElementException if the iteration has no more elements
      +         */
      +        long nextLong();
      +
      +        /**
      +         * Performs the given action for each remaining element, in the order
      +         * elements occur when iterating, until all elements have been processed
      +         * or the action throws an exception.  Errors or runtime exceptions
      +         * thrown by the action are relayed to the caller.
      +         *
      +         * @implSpec
      +         * <p>The default implementation behaves as if:
      +         * <pre>{@code
      +         *     while (hasNext())
      +         *         action.accept(nextLong());
      +         * }</pre>
      +         *
      +         * @param action The action to be performed for each element
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        default void forEachRemaining(LongConsumer action) {
      +            while (hasNext())
      +                action.accept(nextLong());
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * The default implementation boxes the result of calling
      +         * {@link #nextLong()}, and returns that boxed result.
      +         */
      +        @Override
      +        default Long next() {
      +            if (Tripwire.ENABLED)
      +                Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfLong.nextLong()");
      +            return nextLong();
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code LongConsumer} then it is cast
      +         * to {@code LongConsumer} and passed to {@link #forEachRemaining};
      +         * otherwise the action is adapted to an instance of
      +         * {@code LongConsumer}, by boxing the argument of {@code LongConsumer},
      +         * and then passed to {@link #forEachRemaining}.
      +         */
      +        @Override
      +        default void forEachRemaining(Consumer<? super Long> action) {
      +            if (action instanceof LongConsumer) {
      +                forEachRemaining((LongConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfLong.forEachRemainingLong(action::accept)");
      +                forEachRemaining((LongConsumer) action::accept);
      +            }
      +        }
      +    }
      +
      +    /**
      +     * An Iterator specialized for {@code double} values.
      +     * @since 1.8
      +     */
      +    public static interface OfDouble extends PrimitiveIterator<Double> {
      +
      +        /**
      +         * Returns the next {@code double} element in the iteration.
      +         *
      +         * @return the next {@code double} element in the iteration
      +         * @throws NoSuchElementException if the iteration has no more elements
      +         */
      +        double nextDouble();
      +
      +        /**
      +         * Performs the given action for each remaining element, in the order
      +         * elements occur when iterating, until all elements have been processed
      +         * or the action throws an exception.  Errors or runtime exceptions
      +         * thrown by the action are relayed to the caller.
      +         *
      +         * @implSpec
      +         * <p>The default implementation behaves as if:
      +         * <pre>{@code
      +         *     while (hasNext())
      +         *         action.accept(nextDouble());
      +         * }</pre>
      +         *
      +         * @param action The action to be performed for each element
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        default void forEachRemaining(DoubleConsumer action) {
      +            while (hasNext())
      +                action.accept(nextDouble());
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * The default implementation boxes the result of calling
      +         * {@link #nextDouble()}, and returns that boxed result.
      +         */
      +        @Override
      +        default Double next() {
      +            if (Tripwire.ENABLED)
      +                Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfDouble.nextLong()");
      +            return nextDouble();
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code DoubleConsumer} then it is
      +         * cast to {@code DoubleConsumer} and passed to
      +         * {@link #forEachRemaining}; otherwise the action is adapted to
      +         * an instance of {@code DoubleConsumer}, by boxing the argument of
      +         * {@code DoubleConsumer}, and then passed to
      +         * {@link #forEachRemaining}.
      +         */
      +        @Override
      +        default void forEachRemaining(Consumer<? super Double> action) {
      +            if (action instanceof DoubleConsumer) {
      +                forEachRemaining((DoubleConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfDouble.forEachRemainingDouble(action::accept)");
      +                forEachRemaining((DoubleConsumer) action::accept);
      +            }
      +        }
      +    }
      +}
      diff --git a/jdk/src/share/classes/java/util/Set.java b/jdk/src/share/classes/java/util/Set.java
      index d64ae29adc0..78da633f1da 100644
      --- a/jdk/src/share/classes/java/util/Set.java
      +++ b/jdk/src/share/classes/java/util/Set.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -382,4 +382,29 @@ public interface Set<E> extends Collection<E> {
            * @see Set#equals(Object)
            */
           int hashCode();
      +
      +    /**
      +     * Creates a {@code Spliterator} over the elements in this set.
      +     *
      +     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED} and
      +     * {@link Spliterator#DISTINCT}.  Implementations should document the
      +     * reporting of additional characteristic values.
      +     *
      +     * @implSpec
      +     * The default implementation creates a
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
      +     * from the set's {@code Iterator}.  The spliterator inherits the
      +     * <em>fail-fast</em> properties of the collection's iterator.
      +     *
      +     * @implNote
      +     * The created {@code Spliterator} additionally reports
      +     * {@link Spliterator#SUBSIZED}.
      +     *
      +     * @return a {@code Spliterator} over the elements in this set
      +     * @since 1.8
      +     */
      +    @Override
      +    default Spliterator<E> spliterator() {
      +        return Spliterators.spliterator(this, Spliterator.DISTINCT);
      +    }
       }
      diff --git a/jdk/src/share/classes/java/util/SortedSet.java b/jdk/src/share/classes/java/util/SortedSet.java
      index ad04e98b458..367d775083f 100644
      --- a/jdk/src/share/classes/java/util/SortedSet.java
      +++ b/jdk/src/share/classes/java/util/SortedSet.java
      @@ -1,5 +1,5 @@
       /*
      - * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
      @@ -219,4 +219,43 @@ public interface SortedSet<E> extends Set<E> {
            * @throws NoSuchElementException if this set is empty
            */
           E last();
      +
      +    /**
      +     * Creates a {@code Spliterator} over the elements in this sorted set.
      +     *
      +     * <p>The {@code Spliterator} reports {@link Spliterator#SIZED},
      +     * {@link Spliterator#DISTINCT}, {@link Spliterator#SORTED} and
      +     * {@link Spliterator#ORDERED}.  Implementations should document the
      +     * reporting of additional characteristic values.
      +     *
      +     * <p>The spliterator's comparator (see
      +     * {@link java.util.Spliterator#getComparator()}) must be {@code null} if
      +     * the sorted set's comparator (see {@link #comparator()}) is {@code null}.
      +     * Otherwise, the spliterator's comparator must be the same as or impose the
      +     * same total ordering as the sorted set's comparator.
      +     *
      +     * @implSpec
      +     * The default implementation creates a
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em> spliterator
      +     * from the sorted set's {@code Iterator}.  The spliterator inherits the
      +     * <em>fail-fast</em> properties of the collection's iterator.  The
      +     * spliterator's comparator is the same as the sorted set's comparator.
      +     *
      +     * @implNote
      +     * The created {@code Spliterator} additionally reports
      +     * {@link Spliterator#SUBSIZED}.
      +     *
      +     * @return a {@code Spliterator} over the elements in this sorted set
      +     * @since 1.8
      +     */
      +    @Override
      +    default Spliterator<E> spliterator() {
      +        return new Spliterators.IteratorSpliterator<E>(
      +                this, Spliterator.DISTINCT | Spliterator.SORTED | Spliterator.ORDERED) {
      +            @Override
      +            public Comparator<? super E> getComparator() {
      +                return SortedSet.this.comparator();
      +            }
      +        };
      +    }
       }
      diff --git a/jdk/src/share/classes/java/util/Spliterator.java b/jdk/src/share/classes/java/util/Spliterator.java
      new file mode 100644
      index 00000000000..bb3532673e4
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/Spliterator.java
      @@ -0,0 +1,835 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import java.util.function.Consumer;
      +import java.util.function.DoubleConsumer;
      +import java.util.function.IntConsumer;
      +import java.util.function.LongConsumer;
      +
      +/**
      + * An object for traversing and partitioning elements of a source.  The source
      + * of elements covered by a Spliterator could be, for example, an array, a
      + * {@link Collection}, an IO channel, or a generator function.
      + *
      + * <p>A Spliterator may traverse elements individually ({@link
      + * #tryAdvance tryAdvance()}) or sequentially in bulk
      + * ({@link #forEachRemaining forEachRemaining()}).
      + *
      + * <p>A Spliterator may also partition off some of its elements (using
      + * {@link #trySplit}) as another Spliterator, to be used in
      + * possibly-parallel operations.  Operations using a Spliterator that
      + * cannot split, or does so in a highly imbalanced or inefficient
      + * manner, are unlikely to benefit from parallelism.  Traversal
      + * and splitting exhaust elements; each Spliterator is useful for only a single
      + * bulk computation.
      + *
      + * <p>A Spliterator also reports a set of {@link #characteristics()} of its
      + * structure, source, and elements from among {@link #ORDERED},
      + * {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED}, {@link #NONNULL},
      + * {@link #IMMUTABLE}, {@link #CONCURRENT}, and {@link #SUBSIZED}. These may
      + * be employed by Spliterator clients to control, specialize or simplify
      + * computation.  For example, a Spliterator for a {@link Collection} would
      + * report {@code SIZED}, a Spliterator for a {@link Set} would report
      + * {@code DISTINCT}, and a Spliterator for a {@link SortedSet} would also
      + * report {@code SORTED}.  Characteristics are reported as a simple unioned bit
      + * set.
      + *
      + * Some characteristics additionally constrain method behavior; for example if
      + * {@code ORDERED}, traversal methods must conform to their documented ordering.
      + * New characteristics may be defined in the future, so implementors should not
      + * assign meanings to unlisted values.
      + *
      + * <p><a name="binding"/>A Spliterator that does not report {@code IMMUTABLE} or
      + * {@code CONCURRENT} is expected to have a documented policy concerning:
      + * when the spliterator <em>binds</em> to the element source; and detection of
      + * structural interference of the element source detected after binding.  A
      + * <em>late-binding</em> Spliterator binds to the source of elements at the
      + * point of first traversal, first split, or first query for estimated size,
      + * rather than at the time the Spliterator is created.  A Spliterator that is
      + * not <em>late-binding</em> binds to the source of elements at the point of
      + * construction or first invocation of any method.  Modifications made to the
      + * source prior to binding are reflected when the Spliterator is traversed.
      + * After binding a Spliterator should, on a best-effort basis, throw
      + * {@link ConcurrentModificationException} if structural interference is
      + * detected.  Spliterators that do this are called <em>fail-fast</em>.
      + *
      + * <p>Spliterators can provide an estimate of the number of remaining elements
      + * via the {@link #estimateSize} method.  Ideally, as reflected in characteristic
      + * {@link #SIZED}, this value corresponds exactly to the number of elements
      + * that would be encountered in a successful traversal.  However, even when not
      + * exactly known, an estimated value value may still be useful to operations
      + * being performed on the source, such as helping to determine whether it is
      + * preferable to split further or traverse the remaining elements sequentially.
      + *
      + * <p>Despite their obvious utility in parallel algorithms, spliterators are not
      + * expected to be thread-safe; instead, implementations of parallel algorithms
      + * using spliterators should ensure that the spliterator is only used by one
      + * thread at a time.  This is generally easy to attain via <em>serial
      + * thread-confinement</em>, which often is a natural consequence of typical
      + * parallel algorithms that work by recursive decomposition.  A thread calling
      + * {@link #trySplit()} may hand over the returned Spliterator to another thread,
      + * which in turn may traverse or further split that Spliterator.  The behaviour
      + * of splitting and traversal is undefined if two or more threads operate
      + * concurrently on the same spliterator.  If the original thread hands a
      + * spliterator off to another thread for processing, it is best if that handoff
      + * occurs before any elements are consumed with {@link #tryAdvance(Consumer)
      + * tryAdvance()}, as certain guarantees (such as the accuracy of
      + * {@link #estimateSize()} for {@code SIZED} spliterators) are only valid before
      + * traversal has begun.
      + *
      + * <p>Primitive subtype specializations of {@code Spliterator} are provided for
      + * {@link OfInt int}, {@link OfLong long}, and {@link OfDouble double} values.
      + * The subtype default implementations of
      + * {@link Spliterator#tryAdvance(java.util.function.Consumer)}
      + * and {@link Spliterator#forEachRemaining(java.util.function.Consumer)} box
      + * primitive values to instances of their corresponding wrapper class.  Such
      + * boxing may undermine any performance advantages gained by using the primitive
      + * specializations.  To avoid boxing, the corresponding primitive-based methods
      + * should be used.  For example,
      + * {@link Spliterator.OfInt#tryAdvance(java.util.function.IntConsumer)}
      + * and {@link Spliterator.OfInt#forEachRemaining(java.util.function.IntConsumer)}
      + * should be used in preference to
      + * {@link Spliterator.OfInt#tryAdvance(java.util.function.Consumer)} and
      + * {@link Spliterator.OfInt#forEachRemaining(java.util.function.Consumer)}.
      + * Traversal of primitive values using boxing-based methods
      + * {@link #tryAdvance tryAdvance()} and
      + * {@link #forEachRemaining(java.util.function.Consumer) forEachRemaining()}
      + * does not affect the order in which the values, transformed to boxed values,
      + * are encountered.
      + *
      + * @apiNote
      + * <p>Spliterators, like {@code Iterators}s, are for traversing the elements of
      + * a source.  The {@code Spliterator} API was designed to support efficient
      + * parallel traversal in addition to sequential traversal, by supporting
      + * decomposition as well as single-element iteration.  In addition, the
      + * protocol for accessing elements via a Spliterator is designed to impose
      + * smaller per-element overhead than {@code Iterator}, and to avoid the inherent
      + * race involved in having separate methods for {@code hasNext()} and
      + * {@code next()}.
      + *
      + * <p>For mutable sources, arbitrary and non-deterministic behavior may occur if
      + * the source is structurally interfered with (elements added, replaced, or
      + * removed) between the time that the Spliterator binds to its data source and
      + * the end of traversal.  For example, such interference will produce arbitrary,
      + * non-deterministic results when using the {@code java.util.stream} framework.
      + *
      + * <p>Structural interference of a source can be managed in the following ways
      + * (in approximate order of decreasing desirability):
      + * <ul>
      + * <li>The source cannot be structurally interfered with.
      + * </br>For example, an instance of
      + * {@link java.util.concurrent.CopyOnWriteArrayList} is an immutable source.
      + * A Spliterator created from the source reports a characteristic of
      + * {@code IMMUTABLE}.</li>
      + * <li>The source manages concurrent modifications.
      + * </br>For example, a key set of a {@link java.util.concurrent.ConcurrentHashMap}
      + * is a concurrent source.  A Spliterator created from the source reports a
      + * characteristic of {@code CONCURRENT}.</li>
      + * <li>The mutable source provides a late-binding and fail-fast Spliterator.
      + * </br>Late binding narrows the window during which interference can affect
      + * the calculation; fail-fast detects, on a best-effort basis, that structural
      + * interference has occurred after traversal has commenced and throws
      + * {@link ConcurrentModificationException}.  For example, {@link ArrayList},
      + * and many other non-concurrent {@code Collection} classes in the JDK, provide
      + * a late-binding, fail-fast spliterator.</li>
      + * <li>The mutable source provides a non-late-binding but fail-fast Spliterator.
      + * </br>The source increases the likelihood of throwing
      + * {@code ConcurrentModificationException} since the window of potential
      + * interference is larger.</li>
      + * <li>The mutable source provides a late-binding and non-fail-fast Spliterator.
      + * </br>The source risks arbitrary, non-deterministic behavior after traversal
      + * has commenced since interference is not detected.
      + * </li>
      + * <li>The mutable source provides a non-late-binding and non-fail-fast
      + * Spliterator.
      + * </br>The source increases the risk of arbitrary, non-deterministic behavior
      + * since non-detected interference may occur after construction.
      + * </li>
      + * </ul>
      + *
      + * <p><b>Example.</b> Here is a class (not a very useful one, except
      + * for illustration) that maintains an array in which the actual data
      + * are held in even locations, and unrelated tag data are held in odd
      + * locations. Its Spliterator ignores the tags.
      + *
      + * <pre> {@code
      + * class TaggedArray<T> {
      + *   private final Object[] elements; // immutable after construction
      + *   TaggedArray(T[] data, Object[] tags) {
      + *     int size = data.length;
      + *     if (tags.length != size) throw new IllegalArgumentException();
      + *     this.elements = new Object[2 * size];
      + *     for (int i = 0, j = 0; i < size; ++i) {
      + *       elements[j++] = data[i];
      + *       elements[j++] = tags[i];
      + *     }
      + *   }
      + *
      + *   public Spliterator<T> spliterator() {
      + *     return new TaggedArraySpliterator<>(elements, 0, elements.length);
      + *   }
      + *
      + *   static class TaggedArraySpliterator<T> implements Spliterator<T> {
      + *     private final Object[] array;
      + *     private int origin; // current index, advanced on split or traversal
      + *     private final int fence; // one past the greatest index
      + *
      + *     TaggedArraySpliterator(Object[] array, int origin, int fence) {
      + *       this.array = array; this.origin = origin; this.fence = fence;
      + *     }
      + *
      + *     public void forEachRemaining(Consumer<? super T> action) {
      + *       for (; origin < fence; origin += 2)
      + *         action.accept((T) array[origin]);
      + *     }
      + *
      + *     public boolean tryAdvance(Consumer<? super T> action) {
      + *       if (origin < fence) {
      + *         action.accept((T) array[origin]);
      + *         origin += 2;
      + *         return true;
      + *       }
      + *       else // cannot advance
      + *         return false;
      + *     }
      + *
      + *     public Spliterator<T> trySplit() {
      + *       int lo = origin; // divide range in half
      + *       int mid = ((lo + fence) >>> 1) & ~1; // force midpoint to be even
      + *       if (lo < mid) { // split out left half
      + *         origin = mid; // reset this Spliterator's origin
      + *         return new TaggedArraySpliterator<>(array, lo, mid);
      + *       }
      + *       else       // too small to split
      + *         return null;
      + *     }
      + *
      + *     public long estimateSize() {
      + *       return (long)((fence - origin) / 2);
      + *     }
      + *
      + *     public int characteristics() {
      + *       return ORDERED | SIZED | IMMUTABLE | SUBSIZED;
      + *     }
      + *   }
      + * }}</pre>
      + *
      + * <p>As an example how a parallel computation framework, such as the
      + * {@code java.util.stream} package, would use Spliterator in a parallel
      + * computation, here is one way to implement an associated parallel forEach,
      + * that illustrates the primary usage idiom of splitting off subtasks until
      + * the estimated amount of work is small enough to perform
      + * sequentially. Here we assume that the order of processing across
      + * subtasks doesn't matter; different (forked) tasks may further split
      + * and process elements concurrently in undetermined order.  This
      + * example uses a {@link java.util.concurrent.CountedCompleter};
      + * similar usages apply to other parallel task constructions.
      + *
      + * <pre>{@code
      + * static <T> void parEach(TaggedArray<T> a, Consumer<T> action) {
      + *   Spliterator<T> s = a.spliterator();
      + *   long targetBatchSize = s.estimateSize() / (ForkJoinPool.getCommonPoolParallelism() * 8);
      + *   new ParEach(null, s, action, targetBatchSize).invoke();
      + * }
      + *
      + * static class ParEach<T> extends CountedCompleter<Void> {
      + *   final Spliterator<T> spliterator;
      + *   final Consumer<T> action;
      + *   final long targetBatchSize;
      + *
      + *   ParEach(ParEach<T> parent, Spliterator<T> spliterator,
      + *           Consumer<T> action, long targetBatchSize) {
      + *     super(parent);
      + *     this.spliterator = spliterator; this.action = action;
      + *     this.targetBatchSize = targetBatchSize;
      + *   }
      + *
      + *   public void compute() {
      + *     Spliterator<T> sub;
      + *     while (spliterator.estimateSize() > targetBatchSize &&
      + *            (sub = spliterator.trySplit()) != null) {
      + *       addToPendingCount(1);
      + *       new ParEach<>(this, sub, action, targetBatchSize).fork();
      + *     }
      + *     spliterator.forEachRemaining(action);
      + *     propagateCompletion();
      + *   }
      + * }}</pre>
      + *
      + * @implNote
      + * If the boolean system property {@code org.openjdk.java.util.stream.tripwire}
      + * is set to {@code true} then diagnostic warnings are reported if boxing of
      + * primitive values occur when operating on primitive subtype specializations.
      + *
      + * @see Collection
      + * @since 1.8
      + */
      +public interface Spliterator<T> {
      +    /**
      +     * If a remaining element exists, performs the given action on it,
      +     * returning {@code true}; else returns {@code false}.  If this
      +     * Spliterator is {@link #ORDERED} the action is performed on the
      +     * next element in encounter order.  Exceptions thrown by the
      +     * action are relayed to the caller.
      +     *
      +     * @param action The action
      +     * @return {@code false} if no remaining elements existed
      +     * upon entry to this method, else {@code true}.
      +     * @throws NullPointerException if the specified action is null
      +     */
      +    boolean tryAdvance(Consumer<? super T> action);
      +
      +    /**
      +     * Performs the given action for each remaining element, sequentially in
      +     * the current thread, until all elements have been processed or the action
      +     * throws an exception.  If this Spliterator is {@link #ORDERED}, actions
      +     * are performed in encounter order.  Exceptions thrown by the action
      +     * are relayed to the caller.
      +     *
      +     * @implSpec
      +     * The default implementation repeatedly invokes {@link #tryAdvance} until
      +     * it returns {@code false}.  It should be overridden whenever possible.
      +     *
      +     * @param action The action
      +     * @throws NullPointerException if the specified action is null
      +     */
      +    default void forEachRemaining(Consumer<? super T> action) {
      +        do { } while (tryAdvance(action));
      +    }
      +
      +    /**
      +     * If this spliterator can be partitioned, returns a Spliterator
      +     * covering elements, that will, upon return from this method, not
      +     * be covered by this Spliterator.
      +     *
      +     * <p>If this Spliterator is {@link #ORDERED}, the returned Spliterator
      +     * must cover a strict prefix of the elements.
      +     *
      +     * <p>Unless this Spliterator covers an infinite number of elements,
      +     * repeated calls to {@code trySplit()} must eventually return {@code null}.
      +     * Upon non-null return:
      +     * <ul>
      +     * <li>the value reported for {@code estimateSize()} before splitting,
      +     * if not already zero or {@code Long.MAX_VALUE}, must, after splitting, be
      +     * greater than {@code estimateSize()} for this and the returned
      +     * Spliterator; and</li>
      +     * <li>if this Spliterator is {@code SUBSIZED}, then {@code estimateSize()}
      +     * for this spliterator before splitting must be equal to the sum of
      +     * {@code estimateSize()} for this and the returned Spliterator after
      +     * splitting.</li>
      +     * </ul>
      +     *
      +     * <p>This method may return {@code null} for any reason,
      +     * including emptiness, inability to split after traversal has
      +     * commenced, data structure constraints, and efficiency
      +     * considerations.
      +     *
      +     * @apiNote
      +     * An ideal {@code trySplit} method efficiently (without
      +     * traversal) divides its elements exactly in half, allowing
      +     * balanced parallel computation.  Many departures from this ideal
      +     * remain highly effective; for example, only approximately
      +     * splitting an approximately balanced tree, or for a tree in
      +     * which leaf nodes may contain either one or two elements,
      +     * failing to further split these nodes.  However, large
      +     * deviations in balance and/or overly inefficient {@code
      +     * trySplit} mechanics typically result in poor parallel
      +     * performance.
      +     *
      +     * @return a {@code Spliterator} covering some portion of the
      +     * elements, or {@code null} if this spliterator cannot be split
      +     */
      +    Spliterator<T> trySplit();
      +
      +    /**
      +     * Returns an estimate of the number of elements that would be
      +     * encountered by a {@link #forEachRemaining} traversal, or returns {@link
      +     * Long#MAX_VALUE} if infinite, unknown, or too expensive to compute.
      +     *
      +     * <p>If this Spliterator is {@link #SIZED} and has not yet been partially
      +     * traversed or split, or this Spliterator is {@link #SUBSIZED} and has
      +     * not yet been partially traversed, this estimate must be an accurate
      +     * count of elements that would be encountered by a complete traversal.
      +     * Otherwise, this estimate may be arbitrarily inaccurate, but must decrease
      +     * as specified across invocations of {@link #trySplit}.
      +     *
      +     * @apiNote
      +     * Even an inexact estimate is often useful and inexpensive to compute.
      +     * For example, a sub-spliterator of an approximately balanced binary tree
      +     * may return a value that estimates the number of elements to be half of
      +     * that of its parent; if the root Spliterator does not maintain an
      +     * accurate count, it could estimate size to be the power of two
      +     * corresponding to its maximum depth.
      +     *
      +     * @return the estimated size, or {@code Long.MAX_VALUE} if infinite,
      +     *         unknown, or too expensive to compute.
      +     */
      +    long estimateSize();
      +
      +    /**
      +     * Convenience method that returns {@link #estimateSize()} if this
      +     * Spliterator is {@link #SIZED}, else {@code -1}.
      +     * @implSpec
      +     * The default returns the result of {@code estimateSize()} if the
      +     * Spliterator reports a characteristic of {@code SIZED}, and {@code -1}
      +     * otherwise.
      +     *
      +     * @return the exact size, if known, else {@code -1}.
      +     */
      +    default long getExactSizeIfKnown() {
      +        return (characteristics() & SIZED) == 0 ? -1L : estimateSize();
      +    }
      +
      +    /**
      +     * Returns a set of characteristics of this Spliterator and its
      +     * elements. The result is represented as ORed values from {@link
      +     * #ORDERED}, {@link #DISTINCT}, {@link #SORTED}, {@link #SIZED},
      +     * {@link #NONNULL}, {@link #IMMUTABLE}, {@link #CONCURRENT},
      +     * {@link #SUBSIZED}.  Repeated calls to {@code characteristics()} on
      +     * a given spliterator should always return the same result.
      +     *
      +     * <p>If a Spliterator reports an inconsistent set of
      +     * characteristics (either those returned from a single invocation
      +     * or across multiple invocations), no guarantees can be made
      +     * about any computation using this Spliterator.
      +     *
      +     * @return a representation of characteristics
      +     */
      +    int characteristics();
      +
      +    /**
      +     * Returns {@code true} if this Spliterator's {@link
      +     * #characteristics} contain all of the given characteristics.
      +     *
      +     * @implSpec
      +     * The default implementation returns true if the corresponding bits
      +     * of the given characteristics are set.
      +     *
      +     * @return {@code true} if all the specified characteristics are present,
      +     * else {@code false}
      +     */
      +    default boolean hasCharacteristics(int characteristics) {
      +        return (characteristics() & characteristics) == characteristics;
      +    }
      +
      +    /**
      +     * If this Spliterator's source is {@link #SORTED} by a {@link Comparator},
      +     * returns that {@code Comparator}. If the source is {@code SORTED} in
      +     * {@linkplain Comparable natural order, returns {@code null}.  Otherwise,
      +     * if the source is not {@code SORTED}, throws {@link IllegalStateException}.
      +     *
      +     * @implSpec
      +     * The default implementation always throws {@link IllegalStateException}.
      +     *
      +     * @return a Comparator, or {@code null} if the elements are sorted in the
      +     * natural order.
      +     * @throws IllegalStateException if the spliterator does not report
      +     *         a characteristic of {@code SORTED}.
      +     */
      +    default Comparator<? super T> getComparator() {
      +        throw new IllegalStateException();
      +    }
      +
      +    /**
      +     * Characteristic value signifying that an encounter order is defined for
      +     * elements. If so, this Spliterator guarantees that method
      +     * {@link #trySplit} splits a strict prefix of elements, that method
      +     * {@link #tryAdvance} steps by one element in prefix order, and that
      +     * {@link #forEachRemaining} performs actions in encounter order.
      +     *
      +     * <p>A {@link Collection} has an encounter order if the corresponding
      +     * {@link Collection#iterator} documents an order. If so, the encounter
      +     * order is the same as the documented order. Otherwise, a collection does
      +     * not have an encounter order.
      +     *
      +     * @apiNote Encounter order is guaranteed to be ascending index order for
      +     * any {@link List}. But no order is guaranteed for hash-based collections
      +     * such as {@link HashSet}. Clients of a Spliterator that reports
      +     * {@code ORDERED} are expected to preserve ordering constraints in
      +     * non-commutative parallel computations.
      +     */
      +    public static final int ORDERED    = 0x00000010;
      +
      +    /**
      +     * Characteristic value signifying that, for each pair of
      +     * encountered elements {@code x, y}, {@code !x.equals(y)}. This
      +     * applies for example, to a Spliterator based on a {@link Set}.
      +     */
      +    public static final int DISTINCT   = 0x00000001;
      +
      +    /**
      +     * Characteristic value signifying that encounter order follows a defined
      +     * sort order. If so, method {@link #getComparator()} returns the associated
      +     * Comparator, or {@code null} if all elements are {@link Comparable} and
      +     * are sorted by their natural ordering.
      +     *
      +     * <p>A Spliterator that reports {@code SORTED} must also report
      +     * {@code ORDERED}.
      +     *
      +     * @apiNote The spliterators for {@code Collection} classes in the JDK that
      +     * implement {@link NavigableSet} or {@link SortedSet} report {@code SORTED}.
      +     */
      +    public static final int SORTED     = 0x00000004;
      +
      +    /**
      +     * Characteristic value signifying that the value returned from
      +     * {@code estimateSize()} prior to traversal or splitting represents a
      +     * finite size that, in the absence of structural source modification,
      +     * represents an exact count of the number of elements that would be
      +     * encountered by a complete traversal.
      +     *
      +     * @apiNote Most Spliterators for Collections, that cover all elements of a
      +     * {@code Collection} report this characteristic. Sub-spliterators, such as
      +     * those for {@link HashSet}, that cover a sub-set of elements and
      +     * approximate their reported size do not.
      +     */
      +    public static final int SIZED      = 0x00000040;
      +
      +    /**
      +     * Characteristic value signifying that the source guarantees that
      +     * encountered elements will not be {@code null}. (This applies,
      +     * for example, to most concurrent collections, queues, and maps.)
      +     */
      +    public static final int NONNULL    = 0x00000100;
      +
      +    /**
      +     * Characteristic value signifying that the element source cannot be
      +     * structurally modified; that is, elements cannot be added, replaced, or
      +     * removed, so such changes cannot occur during traversal. A Spliterator
      +     * that does not report {@code IMMUTABLE} or {@code CONCURRENT} is expected
      +     * to have a documented policy (for example throwing
      +     * {@link ConcurrentModificationException}) concerning structural
      +     * interference detected during traversal.
      +     */
      +    public static final int IMMUTABLE  = 0x00000400;
      +
      +    /**
      +     * Characteristic value signifying that the element source may be safely
      +     * concurrently modified (allowing additions, replacements, and/or removals)
      +     * by multiple threads without external synchronization. If so, the
      +     * Spliterator is expected to have a documented policy concerning the impact
      +     * of modifications during traversal.
      +     *
      +     * <p>A top-level Spliterator should not report {@code CONCURRENT} and
      +     * {@code SIZED}, since the finite size, if known, may change if the source
      +     * is concurrently modified during traversal. Such a Spliterator is
      +     * inconsistent and no guarantees can be made about any computation using
      +     * that Spliterator. Sub-spliterators may report {@code SIZED} if the
      +     * sub-split size is known and additions or removals to the source are not
      +     * reflected when traversing.
      +     *
      +     * @apiNote Most concurrent collections maintain a consistency policy
      +     * guaranteeing accuracy with respect to elements present at the point of
      +     * Spliterator construction, but possibly not reflecting subsequent
      +     * additions or removals.
      +     */
      +    public static final int CONCURRENT = 0x00001000;
      +
      +    /**
      +     * Characteristic value signifying that all Spliterators resulting from
      +     * {@code trySplit()} will be both {@link #SIZED} and {@link #SUBSIZED}.
      +     * (This means that all child Spliterators, whether direct or indirect, will
      +     * be {@code SIZED}.)
      +     *
      +     * <p>A Spliterator that does not report {@code SIZED} as required by
      +     * {@code SUBSIZED} is inconsistent and no guarantees can be made about any
      +     * computation using that Spliterator.
      +     *
      +     * @apiNote Some spliterators, such as the top-level spliterator for an
      +     * approximately balanced binary tree, will report {@code SIZED} but not
      +     * {@code SUBSIZED}, since it is common to know the size of the entire tree
      +     * but not the exact sizes of subtrees.
      +     */
      +    public static final int SUBSIZED = 0x00004000;
      +
      +    /**
      +     * A Spliterator specialized for {@code int} values.
      +     * @since 1.8
      +     */
      +    public interface OfInt extends Spliterator<Integer> {
      +
      +        @Override
      +        OfInt trySplit();
      +
      +        /**
      +         * If a remaining element exists, performs the given action on it,
      +         * returning {@code true}; else returns {@code false}.  If this
      +         * Spliterator is {@link #ORDERED} the action is performed on the
      +         * next element in encounter order.  Exceptions thrown by the
      +         * action are relayed to the caller.
      +         *
      +         * @param action The action
      +         * @return {@code false} if no remaining elements existed
      +         * upon entry to this method, else {@code true}.
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        boolean tryAdvance(IntConsumer action);
      +
      +        /**
      +         * Performs the given action for each remaining element, sequentially in
      +         * the current thread, until all elements have been processed or the
      +         * action throws an exception.  If this Spliterator is {@link #ORDERED},
      +         * actions are performed in encounter order.  Exceptions thrown by the
      +         * action are relayed to the caller.
      +         *
      +         * @implSpec
      +         * The default implementation repeatedly invokes {@link #tryAdvance}
      +         * until it returns {@code false}.  It should be overridden whenever
      +         * possible.
      +         *
      +         * @param action The action
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        default void forEachRemaining(IntConsumer action) {
      +            do { } while (tryAdvance(action));
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code IntConsumer} then it is cast
      +         * to {@code IntConsumer} and passed to
      +         * {@link #tryAdvance(java.util.function.IntConsumer)}; otherwise
      +         * the action is adapted to an instance of {@code IntConsumer}, by
      +         * boxing the argument of {@code IntConsumer}, and then passed to
      +         * {@link #tryAdvance(java.util.function.IntConsumer)}.
      +         */
      +        @Override
      +        default boolean tryAdvance(Consumer<? super Integer> action) {
      +            if (action instanceof IntConsumer) {
      +                return tryAdvance((IntConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(),
      +                                  "{0} calling Spliterator.OfInt.tryAdvance((IntConsumer) action::accept)");
      +                return tryAdvance((IntConsumer) action::accept);
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code IntConsumer} then it is cast
      +         * to {@code IntConsumer} and passed to
      +         * {@link #forEachRemaining(java.util.function.IntConsumer)}; otherwise
      +         * the action is adapted to an instance of {@code IntConsumer}, by
      +         * boxing the argument of {@code IntConsumer}, and then passed to
      +         * {@link #forEachRemaining(java.util.function.IntConsumer)}.
      +         */
      +        @Override
      +        default void forEachRemaining(Consumer<? super Integer> action) {
      +            if (action instanceof IntConsumer) {
      +                forEachRemaining((IntConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(),
      +                                  "{0} calling Spliterator.OfInt.forEachRemaining((IntConsumer) action::accept)");
      +                forEachRemaining((IntConsumer) action::accept);
      +            }
      +        }
      +    }
      +
      +    /**
      +     * A Spliterator specialized for {@code long} values.
      +     * @since 1.8
      +     */
      +    public interface OfLong extends Spliterator<Long> {
      +
      +        @Override
      +        OfLong trySplit();
      +
      +        /**
      +         * If a remaining element exists, performs the given action on it,
      +         * returning {@code true}; else returns {@code false}.  If this
      +         * Spliterator is {@link #ORDERED} the action is performed on the
      +         * next element in encounter order.  Exceptions thrown by the
      +         * action are relayed to the caller.
      +         *
      +         * @param action The action
      +         * @return {@code false} if no remaining elements existed
      +         * upon entry to this method, else {@code true}.
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        boolean tryAdvance(LongConsumer action);
      +
      +        /**
      +         * Performs the given action for each remaining element, sequentially in
      +         * the current thread, until all elements have been processed or the
      +         * action throws an exception.  If this Spliterator is {@link #ORDERED},
      +         * actions are performed in encounter order.  Exceptions thrown by the
      +         * action are relayed to the caller.
      +         *
      +         * @implSpec
      +         * The default implementation repeatedly invokes {@link #tryAdvance}
      +         * until it returns {@code false}.  It should be overridden whenever
      +         * possible.
      +         *
      +         * @param action The action
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        default void forEachRemaining(LongConsumer action) {
      +            do { } while (tryAdvance(action));
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code LongConsumer} then it is cast
      +         * to {@code LongConsumer} and passed to
      +         * {@link #tryAdvance(java.util.function.LongConsumer)}; otherwise
      +         * the action is adapted to an instance of {@code LongConsumer}, by
      +         * boxing the argument of {@code LongConsumer}, and then passed to
      +         * {@link #tryAdvance(java.util.function.LongConsumer)}.
      +         */
      +        @Override
      +        default boolean tryAdvance(Consumer<? super Long> action) {
      +            if (action instanceof LongConsumer) {
      +                return tryAdvance((LongConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(),
      +                                  "{0} calling Spliterator.OfLong.tryAdvance((LongConsumer) action::accept)");
      +                return tryAdvance((LongConsumer) action::accept);
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code LongConsumer} then it is cast
      +         * to {@code LongConsumer} and passed to
      +         * {@link #forEachRemaining(java.util.function.LongConsumer)}; otherwise
      +         * the action is adapted to an instance of {@code LongConsumer}, by
      +         * boxing the argument of {@code LongConsumer}, and then passed to
      +         * {@link #forEachRemaining(java.util.function.LongConsumer)}.
      +         */
      +        @Override
      +        default void forEachRemaining(Consumer<? super Long> action) {
      +            if (action instanceof LongConsumer) {
      +                forEachRemaining((LongConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(),
      +                                  "{0} calling Spliterator.OfLong.forEachRemaining((LongConsumer) action::accept)");
      +                forEachRemaining((LongConsumer) action::accept);
      +            }
      +        }
      +    }
      +
      +    /**
      +     * A Spliterator specialized for {@code double} values.
      +     * @since 1.8
      +     */
      +    public interface OfDouble extends Spliterator<Double> {
      +
      +        @Override
      +        OfDouble trySplit();
      +
      +        /**
      +         * If a remaining element exists, performs the given action on it,
      +         * returning {@code true}; else returns {@code false}.  If this
      +         * Spliterator is {@link #ORDERED} the action is performed on the
      +         * next element in encounter order.  Exceptions thrown by the
      +         * action are relayed to the caller.
      +         *
      +         * @param action The action
      +         * @return {@code false} if no remaining elements existed
      +         * upon entry to this method, else {@code true}.
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        boolean tryAdvance(DoubleConsumer action);
      +
      +        /**
      +         * Performs the given action for each remaining element, sequentially in
      +         * the current thread, until all elements have been processed or the
      +         * action throws an exception.  If this Spliterator is {@link #ORDERED},
      +         * actions are performed in encounter order.  Exceptions thrown by the
      +         * action are relayed to the caller.
      +         *
      +         * @implSpec
      +         * The default implementation repeatedly invokes {@link #tryAdvance}
      +         * until it returns {@code false}.  It should be overridden whenever
      +         * possible.
      +         *
      +         * @param action The action
      +         * @throws NullPointerException if the specified action is null
      +         */
      +        default void forEachRemaining(DoubleConsumer action) {
      +            do { } while (tryAdvance(action));
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code DoubleConsumer} then it is
      +         * cast to {@code DoubleConsumer} and passed to
      +         * {@link #tryAdvance(java.util.function.DoubleConsumer)}; otherwise
      +         * the action is adapted to an instance of {@code DoubleConsumer}, by
      +         * boxing the argument of {@code DoubleConsumer}, and then passed to
      +         * {@link #tryAdvance(java.util.function.DoubleConsumer)}.
      +         */
      +        @Override
      +        default boolean tryAdvance(Consumer<? super Double> action) {
      +            if (action instanceof DoubleConsumer) {
      +                return tryAdvance((DoubleConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(),
      +                                  "{0} calling Spliterator.OfDouble.tryAdvance((DoubleConsumer) action::accept)");
      +                return tryAdvance((DoubleConsumer) action::accept);
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         * @implSpec
      +         * If the action is an instance of {@code DoubleConsumer} then it is
      +         * cast to {@code DoubleConsumer} and passed to
      +         * {@link #forEachRemaining(java.util.function.DoubleConsumer)};
      +         * otherwise the action is adapted to an instance of
      +         * {@code DoubleConsumer}, by boxing the argument of
      +         * {@code DoubleConsumer}, and then passed to
      +         * {@link #forEachRemaining(java.util.function.DoubleConsumer)}.
      +         */
      +        @Override
      +        default void forEachRemaining(Consumer<? super Double> action) {
      +            if (action instanceof DoubleConsumer) {
      +                forEachRemaining((DoubleConsumer) action);
      +            }
      +            else {
      +                if (Tripwire.ENABLED)
      +                    Tripwire.trip(getClass(),
      +                                  "{0} calling Spliterator.OfDouble.forEachRemaining((DoubleConsumer) action::accept)");
      +                forEachRemaining((DoubleConsumer) action::accept);
      +            }
      +        }
      +    }
      +}
      diff --git a/jdk/src/share/classes/java/util/Spliterators.java b/jdk/src/share/classes/java/util/Spliterators.java
      new file mode 100644
      index 00000000000..860f37a812b
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/Spliterators.java
      @@ -0,0 +1,2154 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import java.util.function.Consumer;
      +import java.util.function.DoubleConsumer;
      +import java.util.function.IntConsumer;
      +import java.util.function.LongConsumer;
      +
      +/**
      + * Static classes and methods for operating on or creating instances of
      + * {@link Spliterator} and its primitive specializations
      + * {@link Spliterator.OfInt}, {@link Spliterator.OfLong}, and
      + * {@link Spliterator.OfDouble}.
      + *
      + * @see Spliterator
      + * @since 1.8
      + */
      +public final class Spliterators {
      +
      +    // Suppresses default constructor, ensuring non-instantiability.
      +    private Spliterators() {}
      +
      +    // Empty spliterators
      +
      +    /**
      +     * Creates an empty {@code Spliterator}
      +     *
      +     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
      +     * {@link Spliterator#SUBSIZED}.  Calls to
      +     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
      +     *
      +     * @param <T> Type of elements
      +     * @return An empty spliterator
      +     */
      +    @SuppressWarnings("unchecked")
      +    public static <T> Spliterator<T> emptySpliterator() {
      +        return (Spliterator<T>) EMPTY_SPLITERATOR;
      +    }
      +
      +    private static final Spliterator<Object> EMPTY_SPLITERATOR =
      +            new EmptySpliterator.OfRef<>();
      +
      +    /**
      +     * Creates an empty {@code Spliterator.OfInt}
      +     *
      +     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
      +     * {@link Spliterator#SUBSIZED}.  Calls to
      +     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
      +     *
      +     * @return An empty spliterator
      +     */
      +    public static Spliterator.OfInt emptyIntSpliterator() {
      +        return EMPTY_INT_SPLITERATOR;
      +    }
      +
      +    private static final Spliterator.OfInt EMPTY_INT_SPLITERATOR =
      +            new EmptySpliterator.OfInt();
      +
      +    /**
      +     * Creates an empty {@code Spliterator.OfLong}
      +     *
      +     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
      +     * {@link Spliterator#SUBSIZED}.  Calls to
      +     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
      +     *
      +     * @return An empty spliterator
      +     */
      +    public static Spliterator.OfLong emptyLongSpliterator() {
      +        return EMPTY_LONG_SPLITERATOR;
      +    }
      +
      +    private static final Spliterator.OfLong EMPTY_LONG_SPLITERATOR =
      +            new EmptySpliterator.OfLong();
      +
      +    /**
      +     * Creates an empty {@code Spliterator.OfDouble}
      +     *
      +     * <p>The empty spliterator reports {@link Spliterator#SIZED} and
      +     * {@link Spliterator#SUBSIZED}.  Calls to
      +     * {@link java.util.Spliterator#trySplit()} always return {@code null}.
      +     *
      +     * @return An empty spliterator
      +     */
      +    public static Spliterator.OfDouble emptyDoubleSpliterator() {
      +        return EMPTY_DOUBLE_SPLITERATOR;
      +    }
      +
      +    private static final Spliterator.OfDouble EMPTY_DOUBLE_SPLITERATOR =
      +            new EmptySpliterator.OfDouble();
      +
      +    // Array-based spliterators
      +
      +    /**
      +     * Creates a {@code Spliterator} covering the elements of a given array,
      +     * using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(Object[])}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report; it is common to
      +     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
      +     *
      +     * @param <T> Type of elements
      +     * @param array The array, assumed to be unmodified during use
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @see Arrays#spliterator(Object[])
      +     */
      +    public static <T> Spliterator<T> spliterator(Object[] array,
      +                                                 int additionalCharacteristics) {
      +        return new ArraySpliterator<>(Objects.requireNonNull(array),
      +                                      additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator} covering a range of elements of a given
      +     * array, using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(Object[])}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report; it is common to
      +     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
      +     *
      +     * @param <T> Type of elements
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @see Arrays#spliterator(Object[], int, int)
      +     */
      +    public static <T> Spliterator<T> spliterator(Object[] array, int fromIndex, int toIndex,
      +                                                 int additionalCharacteristics) {
      +        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
      +        return new ArraySpliterator<>(array, fromIndex, toIndex, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfInt} covering the elements of a given array,
      +     * using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(int[])}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report; it is common to
      +     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @see Arrays#spliterator(int[])
      +     */
      +    public static Spliterator.OfInt spliterator(int[] array,
      +                                                int additionalCharacteristics) {
      +        return new IntArraySpliterator(Objects.requireNonNull(array), additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfInt} covering a range of elements of a
      +     * given array, using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(int[], int, int)}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report; it is common to
      +     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @see Arrays#spliterator(int[], int, int)
      +     */
      +    public static Spliterator.OfInt spliterator(int[] array, int fromIndex, int toIndex,
      +                                                int additionalCharacteristics) {
      +        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
      +        return new IntArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfLong} covering the elements of a given array,
      +     * using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(long[])}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report; it is common to
      +     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @see Arrays#spliterator(long[])
      +     */
      +    public static Spliterator.OfLong spliterator(long[] array,
      +                                                 int additionalCharacteristics) {
      +        return new LongArraySpliterator(Objects.requireNonNull(array), additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfLong} covering a range of elements of a
      +     * given array, using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(long[], int, int)}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report.  (For example, if it is
      +     * known the array will not be further modified, specify {@code IMMUTABLE};
      +     * if the array data is considered to have an an encounter order, specify
      +     * {@code ORDERED}).  The method {@link Arrays#spliterator(long[], int, int)} can
      +     * often be used instead, which returns a spliterator that reports
      +     * {@code SIZED}, {@code SUBSIZED}, {@code IMMUTABLE}, and {@code ORDERED}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @see Arrays#spliterator(long[], int, int)
      +     */
      +    public static Spliterator.OfLong spliterator(long[] array, int fromIndex, int toIndex,
      +                                                 int additionalCharacteristics) {
      +        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
      +        return new LongArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfDouble} covering the elements of a given array,
      +     * using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(double[])}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report; it is common to
      +     * additionally specify {@code IMMUTABLE} and {@code ORDERED}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @see Arrays#spliterator(double[])
      +     */
      +    public static Spliterator.OfDouble spliterator(double[] array,
      +                                                   int additionalCharacteristics) {
      +        return new DoubleArraySpliterator(Objects.requireNonNull(array), additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfDouble} covering a range of elements of a
      +     * given array, using a customized set of spliterator characteristics.
      +     *
      +     * <p>This method is provided as an implementation convenience for
      +     * Spliterators which store portions of their elements in arrays, and need
      +     * fine control over Spliterator characteristics.  Most other situations in
      +     * which a Spliterator for an array is needed should use
      +     * {@link Arrays#spliterator(double[], int, int)}.
      +     *
      +     * <p>The returned spliterator always reports the characteristics
      +     * {@code SIZED} and {@code SUBSIZED}.  The caller may provide additional
      +     * characteristics for the spliterator to report.  (For example, if it is
      +     * known the array will not be further modified, specify {@code IMMUTABLE};
      +     * if the array data is considered to have an an encounter order, specify
      +     * {@code ORDERED}).  The method {@link Arrays#spliterator(long[], int, int)} can
      +     * often be used instead, which returns a spliterator that reports
      +     * {@code SIZED}, {@code SUBSIZED}, {@code IMMUTABLE}, and {@code ORDERED}.
      +     *
      +     * @param array The array, assumed to be unmodified during use
      +     * @param fromIndex The least index (inclusive) to cover
      +     * @param toIndex One past the greatest index to cover
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator for an array
      +     * @throws NullPointerException if the given array is {@code null}
      +     * @throws ArrayIndexOutOfBoundsException if {@code fromIndex} is negative,
      +     *         {@code toIndex} is less than {@code fromIndex}, or
      +     *         {@code toIndex} is greater than the array size
      +     * @see Arrays#spliterator(double[], int, int)
      +     */
      +    public static Spliterator.OfDouble spliterator(double[] array, int fromIndex, int toIndex,
      +                                                   int additionalCharacteristics) {
      +        checkFromToBounds(Objects.requireNonNull(array).length, fromIndex, toIndex);
      +        return new DoubleArraySpliterator(array, fromIndex, toIndex, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Validate inclusive start index and exclusive end index against the length
      +     * of an array.
      +     * @param arrayLength The length of the array
      +     * @param origin The inclusive start index
      +     * @param fence The exclusive end index
      +     * @throws ArrayIndexOutOfBoundsException if the start index is greater than
      +     * the end index, if the start index is negative, or the end index is
      +     * greater than the array length
      +     */
      +    private static void checkFromToBounds(int arrayLength, int origin, int fence) {
      +        if (origin > fence) {
      +            throw new IllegalArgumentException(
      +                    "origin(" + origin + ") > fence(" + fence + ")");
      +        }
      +        if (origin < 0) {
      +            throw new ArrayIndexOutOfBoundsException(origin);
      +        }
      +        if (fence > arrayLength) {
      +            throw new ArrayIndexOutOfBoundsException(fence);
      +        }
      +    }
      +
      +    // Iterator-based spliterators
      +
      +    /**
      +     * Creates a {@code Spliterator} using the given collection's
      +     * {@link java.util.Collection#iterator()} as the source of elements, and
      +     * reporting its {@link java.util.Collection#size()} as its initial size.
      +     *
      +     * <p>The spliterator is
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the collection's iterator, and
      +     * implements {@code trySplit} to permit limited parallelism.
      +     *
      +     * @param <T> Type of elements
      +     * @param c The collection
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given collection is {@code null}
      +     */
      +    public static <T> Spliterator<T> spliterator(Collection<? extends T> c,
      +                                                 int additionalCharacteristics) {
      +        return new IteratorSpliterator<>(Objects.requireNonNull(c),
      +                                         additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator} using a given {@code Iterator}
      +     * as the source of elements, and with a given initially reported size.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned, or the initially reported
      +     * size is not equal to the actual number of elements in the source.
      +     *
      +     * @param <T> Type of elements
      +     * @param iterator The iterator for the source
      +     * @param size The number of elements in the source, to be reported as
      +     *        initial {@code estimateSize}
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static <T> Spliterator<T> spliterator(Iterator<? extends T> iterator,
      +                                                 long size,
      +                                                 int additionalCharacteristics) {
      +        return new IteratorSpliterator<>(Objects.requireNonNull(iterator), size,
      +                                         additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator} using a given {@code Iterator}
      +     * as the source of elements, with no initial size estimate.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned.
      +     *
      +     * @param <T> Type of elements
      +     * @param iterator The iterator for the source
      +     * @param characteristics Properties of this spliterator's source
      +     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
      +     *        ignored and are not reported.)
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static <T> Spliterator<T> spliteratorUnknownSize(Iterator<? extends T> iterator,
      +                                                            int characteristics) {
      +        return new IteratorSpliterator<>(Objects.requireNonNull(iterator), characteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfInt} using a given
      +     * {@code IntStream.IntIterator} as the source of elements, and with a given
      +     * initially reported size.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned, or the initially reported
      +     * size is not equal to the actual number of elements in the source.
      +     *
      +     * @param iterator The iterator for the source
      +     * @param size The number of elements in the source, to be reported as
      +     *        initial {@code estimateSize}.
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static Spliterator.OfInt spliterator(PrimitiveIterator.OfInt iterator,
      +                                                long size,
      +                                                int additionalCharacteristics) {
      +        return new IntIteratorSpliterator(Objects.requireNonNull(iterator),
      +                                          size, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfInt} using a given
      +     * {@code IntStream.IntIterator} as the source of elements, with no initial
      +     * size estimate.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned.
      +     *
      +     * @param iterator The iterator for the source
      +     * @param characteristics Properties of this spliterator's source
      +     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
      +     *        ignored and are not reported.)
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static Spliterator.OfInt spliteratorUnknownSize(PrimitiveIterator.OfInt iterator,
      +                                                           int characteristics) {
      +        return new IntIteratorSpliterator(Objects.requireNonNull(iterator), characteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfLong} using a given
      +     * {@code LongStream.LongIterator} as the source of elements, and with a
      +     * given initially reported size.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned, or the initially reported
      +     * size is not equal to the actual number of elements in the source.
      +     *
      +     * @param iterator The iterator for the source
      +     * @param size The number of elements in the source, to be reported as
      +     *        initial {@code estimateSize}.
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static Spliterator.OfLong spliterator(PrimitiveIterator.OfLong iterator,
      +                                                 long size,
      +                                                 int additionalCharacteristics) {
      +        return new LongIteratorSpliterator(Objects.requireNonNull(iterator),
      +                                           size, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfLong} using a given
      +     * {@code LongStream.LongIterator} as the source of elements, with no
      +     * initial size estimate.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned.
      +     *
      +     * @param iterator The iterator for the source
      +     * @param characteristics Properties of this spliterator's source
      +     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
      +     *        ignored and are not reported.)
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static Spliterator.OfLong spliteratorUnknownSize(PrimitiveIterator.OfLong iterator,
      +                                                            int characteristics) {
      +        return new LongIteratorSpliterator(Objects.requireNonNull(iterator), characteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfDouble} using a given
      +     * {@code DoubleStream.DoubleIterator} as the source of elements, and with a
      +     * given initially reported size.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned, or the initially reported
      +     * size is not equal to the actual number of elements in the source.
      +     *
      +     * @param iterator The iterator for the source
      +     * @param size The number of elements in the source, to be reported as
      +     *        initial {@code estimateSize}
      +     * @param additionalCharacteristics Additional spliterator characteristics
      +     *        of this spliterator's source or elements beyond {@code SIZED} and
      +     *        {@code SUBSIZED} which are are always reported
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static Spliterator.OfDouble spliterator(PrimitiveIterator.OfDouble iterator,
      +                                                   long size,
      +                                                   int additionalCharacteristics) {
      +        return new DoubleIteratorSpliterator(Objects.requireNonNull(iterator),
      +                                             size, additionalCharacteristics);
      +    }
      +
      +    /**
      +     * Creates a {@code Spliterator.OfDouble} using a given
      +     * {@code DoubleStream.DoubleIterator} as the source of elements, with no
      +     * initial size estimate.
      +     *
      +     * <p>The spliterator is not
      +     * <em><a href="Spliterator.html#binding">late-binding</a></em>, inherits
      +     * the <em>fail-fast</em> properties of the iterator, and implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>Traversal of elements should be accomplished through the spliterator.
      +     * The behaviour of splitting and traversal is undefined if the iterator is
      +     * operated on after the spliterator is returned.
      +     *
      +     * @param iterator The iterator for the source
      +     * @param characteristics Properties of this spliterator's source
      +     *        or elements ({@code SIZED} and {@code SUBSIZED}, if supplied, are
      +     *        ignored and are not reported.)
      +     * @return A spliterator from an iterator
      +     * @throws NullPointerException if the given iterator is {@code null}
      +     */
      +    public static Spliterator.OfDouble spliteratorUnknownSize(PrimitiveIterator.OfDouble iterator,
      +                                                              int characteristics) {
      +        return new DoubleIteratorSpliterator(Objects.requireNonNull(iterator), characteristics);
      +    }
      +
      +    // Iterators from Spliterators
      +
      +    /**
      +     * Creates an {@code Iterator} from a {@code Spliterator}.
      +     *
      +     * <p>Traversal of elements should be accomplished through the iterator.
      +     * The behaviour of traversal is undefined if the spliterator is operated
      +     * after the iterator is returned.
      +     *
      +     * @param <T> Type of elements
      +     * @param spliterator The spliterator
      +     * @return An iterator
      +     * @throws NullPointerException if the given spliterator is {@code null}
      +     */
      +    public static<T> Iterator<T> iteratorFromSpliterator(Spliterator<? extends T> spliterator) {
      +        Objects.requireNonNull(spliterator);
      +        class Adapter implements Iterator<T>, Consumer<T> {
      +            boolean valueReady = false;
      +            T nextElement;
      +
      +            @Override
      +            public void accept(T t) {
      +                valueReady = true;
      +                nextElement = t;
      +            }
      +
      +            @Override
      +            public boolean hasNext() {
      +                if (!valueReady)
      +                    spliterator.tryAdvance(this);
      +                return valueReady;
      +            }
      +
      +            @Override
      +            public T next() {
      +                if (!valueReady && !hasNext())
      +                    throw new NoSuchElementException();
      +                else {
      +                    valueReady = false;
      +                    return nextElement;
      +                }
      +            }
      +        }
      +
      +        return new Adapter();
      +    }
      +
      +    /**
      +     * Creates an {@code PrimitiveIterator.OfInt} from a
      +     * {@code Spliterator.OfInt}.
      +     *
      +     * <p>Traversal of elements should be accomplished through the iterator.
      +     * The behaviour of traversal is undefined if the spliterator is operated
      +     * after the iterator is returned.
      +     *
      +     * @param spliterator The spliterator
      +     * @return An iterator
      +     * @throws NullPointerException if the given spliterator is {@code null}
      +     */
      +    public static PrimitiveIterator.OfInt iteratorFromSpliterator(Spliterator.OfInt spliterator) {
      +        Objects.requireNonNull(spliterator);
      +        class Adapter implements PrimitiveIterator.OfInt, IntConsumer {
      +            boolean valueReady = false;
      +            int nextElement;
      +
      +            @Override
      +            public void accept(int t) {
      +                valueReady = true;
      +                nextElement = t;
      +            }
      +
      +            @Override
      +            public boolean hasNext() {
      +                if (!valueReady)
      +                    spliterator.tryAdvance(this);
      +                return valueReady;
      +            }
      +
      +            @Override
      +            public int nextInt() {
      +                if (!valueReady && !hasNext())
      +                    throw new NoSuchElementException();
      +                else {
      +                    valueReady = false;
      +                    return nextElement;
      +                }
      +            }
      +        }
      +
      +        return new Adapter();
      +    }
      +
      +    /**
      +     * Creates an {@code PrimitiveIterator.OfLong} from a
      +     * {@code Spliterator.OfLong}.
      +     *
      +     * <p>Traversal of elements should be accomplished through the iterator.
      +     * The behaviour of traversal is undefined if the spliterator is operated
      +     * after the iterator is returned.
      +     *
      +     * @param spliterator The spliterator
      +     * @return An iterator
      +     * @throws NullPointerException if the given spliterator is {@code null}
      +     */
      +    public static PrimitiveIterator.OfLong iteratorFromSpliterator(Spliterator.OfLong spliterator) {
      +        Objects.requireNonNull(spliterator);
      +        class Adapter implements PrimitiveIterator.OfLong, LongConsumer {
      +            boolean valueReady = false;
      +            long nextElement;
      +
      +            @Override
      +            public void accept(long t) {
      +                valueReady = true;
      +                nextElement = t;
      +            }
      +
      +            @Override
      +            public boolean hasNext() {
      +                if (!valueReady)
      +                    spliterator.tryAdvance(this);
      +                return valueReady;
      +            }
      +
      +            @Override
      +            public long nextLong() {
      +                if (!valueReady && !hasNext())
      +                    throw new NoSuchElementException();
      +                else {
      +                    valueReady = false;
      +                    return nextElement;
      +                }
      +            }
      +        }
      +
      +        return new Adapter();
      +    }
      +
      +    /**
      +     * Creates an {@code PrimitiveIterator.OfDouble} from a
      +     * {@code Spliterator.OfDouble}.
      +     *
      +     * <p>Traversal of elements should be accomplished through the iterator.
      +     * The behaviour of traversal is undefined if the spliterator is operated
      +     * after the iterator is returned.
      +     *
      +     * @param spliterator The spliterator
      +     * @return An iterator
      +     * @throws NullPointerException if the given spliterator is {@code null}
      +     */
      +    public static PrimitiveIterator.OfDouble iteratorFromSpliterator(Spliterator.OfDouble spliterator) {
      +        Objects.requireNonNull(spliterator);
      +        class Adapter implements PrimitiveIterator.OfDouble, DoubleConsumer {
      +            boolean valueReady = false;
      +            double nextElement;
      +
      +            @Override
      +            public void accept(double t) {
      +                valueReady = true;
      +                nextElement = t;
      +            }
      +
      +            @Override
      +            public boolean hasNext() {
      +                if (!valueReady)
      +                    spliterator.tryAdvance(this);
      +                return valueReady;
      +            }
      +
      +            @Override
      +            public double nextDouble() {
      +                if (!valueReady && !hasNext())
      +                    throw new NoSuchElementException();
      +                else {
      +                    valueReady = false;
      +                    return nextElement;
      +                }
      +            }
      +        }
      +
      +        return new Adapter();
      +    }
      +
      +    // Implementations
      +
      +    private static abstract class EmptySpliterator<T, S extends Spliterator<T>, C> {
      +
      +        EmptySpliterator() { }
      +
      +        public S trySplit() {
      +            return null;
      +        }
      +
      +        public boolean tryAdvance(C consumer) {
      +            Objects.requireNonNull(consumer);
      +            return false;
      +        }
      +
      +        public void forEachRemaining(C consumer) {
      +            Objects.requireNonNull(consumer);
      +        }
      +
      +        public long estimateSize() {
      +            return 0;
      +        }
      +
      +        public int characteristics() {
      +            return Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        private static final class OfRef<T>
      +                extends EmptySpliterator<T, Spliterator<T>, Consumer<? super T>>
      +                implements Spliterator<T> {
      +            OfRef() { }
      +        }
      +
      +        private static final class OfInt
      +                extends EmptySpliterator<Integer, Spliterator.OfInt, IntConsumer>
      +                implements Spliterator.OfInt {
      +            OfInt() { }
      +        }
      +
      +        private static final class OfLong
      +                extends EmptySpliterator<Long, Spliterator.OfLong, LongConsumer>
      +                implements Spliterator.OfLong {
      +            OfLong() { }
      +        }
      +
      +        private static final class OfDouble
      +                extends EmptySpliterator<Double, Spliterator.OfDouble, DoubleConsumer>
      +                implements Spliterator.OfDouble {
      +            OfDouble() { }
      +        }
      +    }
      +
      +    // Array-based spliterators
      +
      +    /**
      +     * A Spliterator designed for use by sources that traverse and split
      +     * elements maintained in an unmodifiable {@code Object[]} array.
      +     */
      +    static final class ArraySpliterator<T> implements Spliterator<T> {
      +        /**
      +         * The array, explicitly typed as Object[]. Unlike in some other
      +         * classes (see for example CR 6260652), we do not need to
      +         * screen arguments to ensure they are exactly of type Object[]
      +         * so long as no methods write into the array or serialize it,
      +         * which we ensure here by defining this class as final.
      +         */
      +        private final Object[] array;
      +        private int index;        // current index, modified on advance/split
      +        private final int fence;  // one past last index
      +        private final int characteristics;
      +
      +        /**
      +         * Creates a spliterator covering all of the given array.
      +         * @param array the array, assumed to be unmodified during use
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         * of this spliterator's source or elements beyond {@code SIZED} and
      +         * {@code SUBSIZED} which are are always reported
      +         */
      +        public ArraySpliterator(Object[] array, int additionalCharacteristics) {
      +            this(array, 0, array.length, additionalCharacteristics);
      +        }
      +
      +        /**
      +         * Creates a spliterator covering the given array and range
      +         * @param array the array, assumed to be unmodified during use
      +         * @param origin the least index (inclusive) to cover
      +         * @param fence one past the greatest index to cover
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         * of this spliterator's source or elements beyond {@code SIZED} and
      +         * {@code SUBSIZED} which are are always reported
      +         */
      +        public ArraySpliterator(Object[] array, int origin, int fence, int additionalCharacteristics) {
      +            this.array = array;
      +            this.index = origin;
      +            this.fence = fence;
      +            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        @Override
      +        public Spliterator<T> trySplit() {
      +            int lo = index, mid = (lo + fence) >>> 1;
      +            return (lo >= mid)
      +                   ? null
      +                   : new ArraySpliterator<>(array, lo, index = mid, characteristics);
      +        }
      +
      +        @SuppressWarnings("unchecked")
      +        @Override
      +        public void forEachRemaining(Consumer<? super T> action) {
      +            Object[] a; int i, hi; // hoist accesses and checks from loop
      +            if (action == null)
      +                throw new NullPointerException();
      +            if ((a = array).length >= (hi = fence) &&
      +                (i = index) >= 0 && i < (index = hi)) {
      +                do { action.accept((T)a[i]); } while (++i < hi);
      +            }
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(Consumer<? super T> action) {
      +            if (action == null)
      +                throw new NullPointerException();
      +            if (index >= 0 && index < fence) {
      +                @SuppressWarnings("unchecked") T e = (T) array[index++];
      +                action.accept(e);
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() { return (long)(fence - index); }
      +
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +
      +        @Override
      +        public Comparator<? super T> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    /**
      +     * A Spliterator.OfInt designed for use by sources that traverse and split
      +     * elements maintained in an unmodifiable {@code int[]} array.
      +     */
      +    static final class IntArraySpliterator implements Spliterator.OfInt {
      +        private final int[] array;
      +        private int index;        // current index, modified on advance/split
      +        private final int fence;  // one past last index
      +        private final int characteristics;
      +
      +        /**
      +         * Creates a spliterator covering all of the given array.
      +         * @param array the array, assumed to be unmodified during use
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         *        of this spliterator's source or elements beyond {@code SIZED} and
      +         *        {@code SUBSIZED} which are are always reported
      +         */
      +        public IntArraySpliterator(int[] array, int additionalCharacteristics) {
      +            this(array, 0, array.length, additionalCharacteristics);
      +        }
      +
      +        /**
      +         * Creates a spliterator covering the given array and range
      +         * @param array the array, assumed to be unmodified during use
      +         * @param origin the least index (inclusive) to cover
      +         * @param fence one past the greatest index to cover
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         *        of this spliterator's source or elements beyond {@code SIZED} and
      +         *        {@code SUBSIZED} which are are always reported
      +         */
      +        public IntArraySpliterator(int[] array, int origin, int fence, int additionalCharacteristics) {
      +            this.array = array;
      +            this.index = origin;
      +            this.fence = fence;
      +            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        @Override
      +        public OfInt trySplit() {
      +            int lo = index, mid = (lo + fence) >>> 1;
      +            return (lo >= mid)
      +                   ? null
      +                   : new IntArraySpliterator(array, lo, index = mid, characteristics);
      +        }
      +
      +        @Override
      +        public void forEachRemaining(IntConsumer action) {
      +            int[] a; int i, hi; // hoist accesses and checks from loop
      +            if (action == null)
      +                throw new NullPointerException();
      +            if ((a = array).length >= (hi = fence) &&
      +                (i = index) >= 0 && i < (index = hi)) {
      +                do { action.accept(a[i]); } while (++i < hi);
      +            }
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(IntConsumer action) {
      +            if (action == null)
      +                throw new NullPointerException();
      +            if (index >= 0 && index < fence) {
      +                action.accept(array[index++]);
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() { return (long)(fence - index); }
      +
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +
      +        @Override
      +        public Comparator<? super Integer> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    /**
      +     * A Spliterator.OfLong designed for use by sources that traverse and split
      +     * elements maintained in an unmodifiable {@code int[]} array.
      +     */
      +    static final class LongArraySpliterator implements Spliterator.OfLong {
      +        private final long[] array;
      +        private int index;        // current index, modified on advance/split
      +        private final int fence;  // one past last index
      +        private final int characteristics;
      +
      +        /**
      +         * Creates a spliterator covering all of the given array.
      +         * @param array the array, assumed to be unmodified during use
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         *        of this spliterator's source or elements beyond {@code SIZED} and
      +         *        {@code SUBSIZED} which are are always reported
      +         */
      +        public LongArraySpliterator(long[] array, int additionalCharacteristics) {
      +            this(array, 0, array.length, additionalCharacteristics);
      +        }
      +
      +        /**
      +         * Creates a spliterator covering the given array and range
      +         * @param array the array, assumed to be unmodified during use
      +         * @param origin the least index (inclusive) to cover
      +         * @param fence one past the greatest index to cover
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         *        of this spliterator's source or elements beyond {@code SIZED} and
      +         *        {@code SUBSIZED} which are are always reported
      +         */
      +        public LongArraySpliterator(long[] array, int origin, int fence, int additionalCharacteristics) {
      +            this.array = array;
      +            this.index = origin;
      +            this.fence = fence;
      +            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        @Override
      +        public OfLong trySplit() {
      +            int lo = index, mid = (lo + fence) >>> 1;
      +            return (lo >= mid)
      +                   ? null
      +                   : new LongArraySpliterator(array, lo, index = mid, characteristics);
      +        }
      +
      +        @Override
      +        public void forEachRemaining(LongConsumer action) {
      +            long[] a; int i, hi; // hoist accesses and checks from loop
      +            if (action == null)
      +                throw new NullPointerException();
      +            if ((a = array).length >= (hi = fence) &&
      +                (i = index) >= 0 && i < (index = hi)) {
      +                do { action.accept(a[i]); } while (++i < hi);
      +            }
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(LongConsumer action) {
      +            if (action == null)
      +                throw new NullPointerException();
      +            if (index >= 0 && index < fence) {
      +                action.accept(array[index++]);
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() { return (long)(fence - index); }
      +
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +
      +        @Override
      +        public Comparator<? super Long> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    /**
      +     * A Spliterator.OfDouble designed for use by sources that traverse and split
      +     * elements maintained in an unmodifiable {@code int[]} array.
      +     */
      +    static final class DoubleArraySpliterator implements Spliterator.OfDouble {
      +        private final double[] array;
      +        private int index;        // current index, modified on advance/split
      +        private final int fence;  // one past last index
      +        private final int characteristics;
      +
      +        /**
      +         * Creates a spliterator covering all of the given array.
      +         * @param array the array, assumed to be unmodified during use
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         *        of this spliterator's source or elements beyond {@code SIZED} and
      +         *        {@code SUBSIZED} which are are always reported
      +         */
      +        public DoubleArraySpliterator(double[] array, int additionalCharacteristics) {
      +            this(array, 0, array.length, additionalCharacteristics);
      +        }
      +
      +        /**
      +         * Creates a spliterator covering the given array and range
      +         * @param array the array, assumed to be unmodified during use
      +         * @param origin the least index (inclusive) to cover
      +         * @param fence one past the greatest index to cover
      +         * @param additionalCharacteristics Additional spliterator characteristics
      +         *        of this spliterator's source or elements beyond {@code SIZED} and
      +         *        {@code SUBSIZED} which are are always reported
      +         */
      +        public DoubleArraySpliterator(double[] array, int origin, int fence, int additionalCharacteristics) {
      +            this.array = array;
      +            this.index = origin;
      +            this.fence = fence;
      +            this.characteristics = additionalCharacteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        @Override
      +        public OfDouble trySplit() {
      +            int lo = index, mid = (lo + fence) >>> 1;
      +            return (lo >= mid)
      +                   ? null
      +                   : new DoubleArraySpliterator(array, lo, index = mid, characteristics);
      +        }
      +
      +        @Override
      +        public void forEachRemaining(DoubleConsumer action) {
      +            double[] a; int i, hi; // hoist accesses and checks from loop
      +            if (action == null)
      +                throw new NullPointerException();
      +            if ((a = array).length >= (hi = fence) &&
      +                (i = index) >= 0 && i < (index = hi)) {
      +                do { action.accept(a[i]); } while (++i < hi);
      +            }
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(DoubleConsumer action) {
      +            if (action == null)
      +                throw new NullPointerException();
      +            if (index >= 0 && index < fence) {
      +                action.accept(array[index++]);
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() { return (long)(fence - index); }
      +
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +
      +        @Override
      +        public Comparator<? super Double> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    //
      +
      +    /**
      +     * An abstract {@code Spliterator} that implements {@code trySplit} to
      +     * permit limited parallelism.
      +     *
      +     * <p>An extending class need only
      +     * implement {@link #tryAdvance(java.util.function.Consumer) tryAdvance}.
      +     * The extending class should override
      +     * {@link #forEachRemaining(java.util.function.Consumer) forEach} if it can
      +     * provide a more performant implementation.
      +     *
      +     * @apiNote
      +     * This class is a useful aid for creating a spliterator when it is not
      +     * possible or difficult to efficiently partition elements in a manner
      +     * allowing balanced parallel computation.
      +     *
      +     * <p>An alternative to using this class, that also permits limited
      +     * parallelism, is to create a spliterator from an iterator
      +     * (see {@link #spliterator(Iterator, long, int)}.  Depending on the
      +     * circumstances using an iterator may be easier or more convenient than
      +     * extending this class, such as when there is already an iterator
      +     * available to use.
      +     *
      +     * @see #spliterator(Iterator, long, int)
      +     * @since 1.8
      +     */
      +    public static abstract class AbstractSpliterator<T> implements Spliterator<T> {
      +        static final int BATCH_UNIT = 1 << 10;  // batch array size increment
      +        static final int MAX_BATCH = 1 << 25;  // max batch array size;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator reporting the given estimated size and
      +         * additionalCharacteristics.
      +         *
      +         * @param est the estimated size of this spliterator if known, otherwise
      +         *        {@code Long.MAX_VALUE}.
      +         * @param additionalCharacteristics properties of this spliterator's
      +         *        source or elements.  If {@code SIZED} is reported then this
      +         *        spliterator will additionally report {@code SUBSIZED}.
      +         */
      +        protected AbstractSpliterator(long est, int additionalCharacteristics) {
      +            this.est = est;
      +            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
      +                                   ? additionalCharacteristics | Spliterator.SUBSIZED
      +                                   : additionalCharacteristics;
      +        }
      +
      +        static final class HoldingConsumer<T> implements Consumer<T> {
      +            Object value;
      +
      +            @Override
      +            public void accept(T value) {
      +                this.value = value;
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * This implementation permits limited parallelism.
      +         */
      +        @Override
      +        public Spliterator<T> trySplit() {
      +            /*
      +             * Split into arrays of arithmetically increasing batch
      +             * sizes.  This will only improve parallel performance if
      +             * per-element Consumer actions are more costly than
      +             * transferring them into an array.  The use of an
      +             * arithmetic progression in split sizes provides overhead
      +             * vs parallelism bounds that do not particularly favor or
      +             * penalize cases of lightweight vs heavyweight element
      +             * operations, across combinations of #elements vs #cores,
      +             * whether or not either are known.  We generate
      +             * O(sqrt(#elements)) splits, allowing O(sqrt(#cores))
      +             * potential speedup.
      +             */
      +            HoldingConsumer<T> holder = new HoldingConsumer<>();
      +            long s = est;
      +            if (s > 1 && tryAdvance(holder)) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                Object[] a;
      +                try {
      +                    a = new Object[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new ArraySpliterator<>(a, 0, j, characteristics());
      +            }
      +            return null;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the estimated size as reported when
      +         * created and, if the estimate size is known, decreases in size when
      +         * split.
      +         */
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the characteristics as reported when
      +         * created.
      +         */
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +    }
      +
      +    /**
      +     * An abstract {@code Spliterator.OfInt} that implements {@code trySplit} to
      +     * permit limited parallelism.
      +     *
      +     * <p>To implement a spliterator an extending class need only
      +     * implement {@link #tryAdvance(java.util.function.IntConsumer)}
      +     * tryAdvance}.  The extending class should override
      +     * {@link #forEachRemaining(java.util.function.IntConsumer)} forEach} if it
      +     * can provide a more performant implementation.
      +     *
      +     * @apiNote
      +     * This class is a useful aid for creating a spliterator when it is not
      +     * possible or difficult to efficiently partition elements in a manner
      +     * allowing balanced parallel computation.
      +     *
      +     * <p>An alternative to using this class, that also permits limited
      +     * parallelism, is to create a spliterator from an iterator
      +     * (see {@link #spliterator(java.util.PrimitiveIterator.OfInt, long, int)}.
      +     * Depending on the circumstances using an iterator may be easier or more
      +     * convenient than extending this class. For example, if there is already an
      +     * iterator available to use then there is no need to extend this class.
      +     *
      +     * @see #spliterator(java.util.PrimitiveIterator.OfInt, long, int)
      +     * @since 1.8
      +     */
      +    public static abstract class AbstractIntSpliterator implements Spliterator.OfInt {
      +        static final int MAX_BATCH = AbstractSpliterator.MAX_BATCH;
      +        static final int BATCH_UNIT = AbstractSpliterator.BATCH_UNIT;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator reporting the given estimated size and
      +         * characteristics.
      +         *
      +         * @param est the estimated size of this spliterator if known, otherwise
      +         *        {@code Long.MAX_VALUE}.
      +         * @param additionalCharacteristics properties of this spliterator's
      +         *        source or elements.  If {@code SIZED} is reported then this
      +         *        spliterator will additionally report {@code SUBSIZED}.
      +         */
      +        protected AbstractIntSpliterator(long est, int additionalCharacteristics) {
      +            this.est = est;
      +            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
      +                                   ? additionalCharacteristics | Spliterator.SUBSIZED
      +                                   : additionalCharacteristics;
      +        }
      +
      +        static final class HoldingIntConsumer implements IntConsumer {
      +            int value;
      +
      +            @Override
      +            public void accept(int value) {
      +                this.value = value;
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * This implementation permits limited parallelism.
      +         */
      +        @Override
      +        public Spliterator.OfInt trySplit() {
      +            HoldingIntConsumer holder = new HoldingIntConsumer();
      +            long s = est;
      +            if (s > 1 && tryAdvance(holder)) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                int[] a;
      +                try {
      +                    a = new int[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new IntArraySpliterator(a, 0, j, characteristics());
      +            }
      +            return null;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the estimated size as reported when
      +         * created and, if the estimate size is known, decreases in size when
      +         * split.
      +         */
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the characteristics as reported when
      +         * created.
      +         */
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +    }
      +
      +    /**
      +     * An abstract {@code Spliterator.OfLong} that implements {@code trySplit}
      +     * to permit limited parallelism.
      +     *
      +     * <p>To implement a spliterator an extending class need only
      +     * implement {@link #tryAdvance(java.util.function.LongConsumer)}
      +     * tryAdvance}.  The extending class should override
      +     * {@link #forEachRemaining(java.util.function.LongConsumer)} forEach} if it
      +     * can provide a more performant implementation.
      +     *
      +     * @apiNote
      +     * This class is a useful aid for creating a spliterator when it is not
      +     * possible or difficult to efficiently partition elements in a manner
      +     * allowing balanced parallel computation.
      +     *
      +     * <p>An alternative to using this class, that also permits limited
      +     * parallelism, is to create a spliterator from an iterator
      +     * (see {@link #spliterator(java.util.PrimitiveIterator.OfLong, long, int)}.
      +     * Depending on the circumstances using an iterator may be easier or more
      +     * convenient than extending this class. For example, if there is already an
      +     * iterator available to use then there is no need to extend this class.
      +     *
      +     * @see #spliterator(java.util.PrimitiveIterator.OfLong, long, int)
      +     * @since 1.8
      +     */
      +    public static abstract class AbstractLongSpliterator implements Spliterator.OfLong {
      +        static final int MAX_BATCH = AbstractSpliterator.MAX_BATCH;
      +        static final int BATCH_UNIT = AbstractSpliterator.BATCH_UNIT;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator reporting the given estimated size and
      +         * characteristics.
      +         *
      +         * @param est the estimated size of this spliterator if known, otherwise
      +         *        {@code Long.MAX_VALUE}.
      +         * @param additionalCharacteristics properties of this spliterator's
      +         *        source or elements.  If {@code SIZED} is reported then this
      +         *        spliterator will additionally report {@code SUBSIZED}.
      +         */
      +        protected AbstractLongSpliterator(long est, int additionalCharacteristics) {
      +            this.est = est;
      +            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
      +                                   ? additionalCharacteristics | Spliterator.SUBSIZED
      +                                   : additionalCharacteristics;
      +        }
      +
      +        static final class HoldingLongConsumer implements LongConsumer {
      +            long value;
      +
      +            @Override
      +            public void accept(long value) {
      +                this.value = value;
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * This implementation permits limited parallelism.
      +         */
      +        @Override
      +        public Spliterator.OfLong trySplit() {
      +            HoldingLongConsumer holder = new HoldingLongConsumer();
      +            long s = est;
      +            if (s > 1 && tryAdvance(holder)) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                long[] a;
      +                try {
      +                    a = new long[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new LongArraySpliterator(a, 0, j, characteristics());
      +            }
      +            return null;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the estimated size as reported when
      +         * created and, if the estimate size is known, decreases in size when
      +         * split.
      +         */
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the characteristics as reported when
      +         * created.
      +         */
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +    }
      +
      +    /**
      +     * An abstract {@code Spliterator.OfDouble} that implements
      +     * {@code trySplit} to permit limited parallelism.
      +     *
      +     * <p>To implement a spliterator an extending class need only
      +     * implement {@link #tryAdvance(java.util.function.DoubleConsumer)}
      +     * tryAdvance}.  The extending class should override
      +     * {@link #forEachRemaining(java.util.function.DoubleConsumer)} forEach} if
      +     * it can provide a more performant implementation.
      +     *
      +     * @apiNote
      +     * This class is a useful aid for creating a spliterator when it is not
      +     * possible or difficult to efficiently partition elements in a manner
      +     * allowing balanced parallel computation.
      +     *
      +     * <p>An alternative to using this class, that also permits limited
      +     * parallelism, is to create a spliterator from an iterator
      +     * (see {@link #spliterator(java.util.PrimitiveIterator.OfDouble, long, int)}.
      +     * Depending on the circumstances using an iterator may be easier or more
      +     * convenient than extending this class. For example, if there is already an
      +     * iterator available to use then there is no need to extend this class.
      +     *
      +     * @see #spliterator(java.util.PrimitiveIterator.OfDouble, long, int)
      +     * @since 1.8
      +     */
      +    public static abstract class AbstractDoubleSpliterator implements Spliterator.OfDouble {
      +        static final int MAX_BATCH = AbstractSpliterator.MAX_BATCH;
      +        static final int BATCH_UNIT = AbstractSpliterator.BATCH_UNIT;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator reporting the given estimated size and
      +         * characteristics.
      +         *
      +         * @param est the estimated size of this spliterator if known, otherwise
      +         *        {@code Long.MAX_VALUE}.
      +         * @param additionalCharacteristics properties of this spliterator's
      +         *        source or elements.  If {@code SIZED} is reported then this
      +         *        spliterator will additionally report {@code SUBSIZED}.
      +         */
      +        protected AbstractDoubleSpliterator(long est, int additionalCharacteristics) {
      +            this.est = est;
      +            this.characteristics = ((additionalCharacteristics & Spliterator.SIZED) != 0)
      +                                   ? additionalCharacteristics | Spliterator.SUBSIZED
      +                                   : additionalCharacteristics;
      +        }
      +
      +        static final class HoldingDoubleConsumer implements DoubleConsumer {
      +            double value;
      +
      +            @Override
      +            public void accept(double value) {
      +                this.value = value;
      +            }
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * This implementation permits limited parallelism.
      +         */
      +        @Override
      +        public Spliterator.OfDouble trySplit() {
      +            HoldingDoubleConsumer holder = new HoldingDoubleConsumer();
      +            long s = est;
      +            if (s > 1 && tryAdvance(holder)) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                double[] a;
      +                try {
      +                    a = new double[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = holder.value; } while (++j < n && tryAdvance(holder));
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new DoubleArraySpliterator(a, 0, j, characteristics());
      +            }
      +            return null;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the estimated size as reported when
      +         * created and, if the estimate size is known, decreases in size when
      +         * split.
      +         */
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        /**
      +         * {@inheritDoc}
      +         *
      +         * @implSpec
      +         * This implementation returns the characteristics as reported when
      +         * created.
      +         */
      +        @Override
      +        public int characteristics() {
      +            return characteristics;
      +        }
      +    }
      +
      +    // Iterator-based Spliterators
      +
      +    /**
      +     * A Spliterator using a given Iterator for element
      +     * operations. The spliterator implements {@code trySplit} to
      +     * permit limited parallelism.
      +     */
      +    static class IteratorSpliterator<T> implements Spliterator<T> {
      +        static final int BATCH_UNIT = 1 << 10;  // batch array size increment
      +        static final int MAX_BATCH = 1 << 25;  // max batch array size;
      +        private final Collection<? extends T> collection; // null OK
      +        private Iterator<? extends T> it;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator using the given given
      +         * collection's {@link java.util.Collection#iterator()) for traversal,
      +         * and reporting its {@link java.util.Collection#size()) as its initial
      +         * size.
      +         *
      +         * @param c the collection
      +         * @param characteristics properties of this spliterator's
      +         *        source or elements.
      +         */
      +        public IteratorSpliterator(Collection<? extends T> collection, int characteristics) {
      +            this.collection = collection;
      +            this.it = null;
      +            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        /**
      +         * Creates a spliterator using the given iterator
      +         * for traversal, and reporting the given initial size
      +         * and characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param size the number of elements in the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public IteratorSpliterator(Iterator<? extends T> iterator, long size, int characteristics) {
      +            this.collection = null;
      +            this.it = iterator;
      +            this.est = size;
      +            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        /**
      +         * Creates a spliterator using the given iterator
      +         * for traversal, and reporting the given initial size
      +         * and characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public IteratorSpliterator(Iterator<? extends T> iterator, int characteristics) {
      +            this.collection = null;
      +            this.it = iterator;
      +            this.est = Long.MAX_VALUE;
      +            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
      +        }
      +
      +        @Override
      +        public Spliterator<T> trySplit() {
      +            /*
      +             * Split into arrays of arithmetically increasing batch
      +             * sizes.  This will only improve parallel performance if
      +             * per-element Consumer actions are more costly than
      +             * transferring them into an array.  The use of an
      +             * arithmetic progression in split sizes provides overhead
      +             * vs parallelism bounds that do not particularly favor or
      +             * penalize cases of lightweight vs heavyweight element
      +             * operations, across combinations of #elements vs #cores,
      +             * whether or not either are known.  We generate
      +             * O(sqrt(#elements)) splits, allowing O(sqrt(#cores))
      +             * potential speedup.
      +             */
      +            Iterator<? extends T> i;
      +            long s;
      +            if ((i = it) == null) {
      +                i = it = collection.iterator();
      +                s = est = (long) collection.size();
      +            }
      +            else
      +                s = est;
      +            if (s > 1 && i.hasNext()) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                Object[] a;
      +                try {
      +                    a = new Object[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = i.next(); } while (++j < n && i.hasNext());
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new ArraySpliterator<>(a, 0, j, characteristics);
      +            }
      +            return null;
      +        }
      +
      +        @Override
      +        public void forEachRemaining(Consumer<? super T> action) {
      +            if (action == null) throw new NullPointerException();
      +            Iterator<? extends T> i;
      +            if ((i = it) == null) {
      +                i = it = collection.iterator();
      +                est = (long)collection.size();
      +            }
      +            i.forEachRemaining(action);
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(Consumer<? super T> action) {
      +            if (action == null) throw new NullPointerException();
      +            if (it == null) {
      +                it = collection.iterator();
      +                est = (long) collection.size();
      +            }
      +            if (it.hasNext()) {
      +                action.accept(it.next());
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() {
      +            if (it == null) {
      +                it = collection.iterator();
      +                return est = (long)collection.size();
      +            }
      +            return est;
      +        }
      +
      +        @Override
      +        public int characteristics() { return characteristics; }
      +
      +        @Override
      +        public Comparator<? super T> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    /**
      +     * A Spliterator.OfInt using a given IntStream.IntIterator for element
      +     * operations. The spliterator implements {@code trySplit} to
      +     * permit limited parallelism.
      +     */
      +    static final class IntIteratorSpliterator implements Spliterator.OfInt {
      +        static final int BATCH_UNIT = IteratorSpliterator.BATCH_UNIT;
      +        static final int MAX_BATCH = IteratorSpliterator.MAX_BATCH;
      +        private PrimitiveIterator.OfInt it;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator using the given iterator
      +         * for traversal, and reporting the given initial size
      +         * and characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param size the number of elements in the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public IntIteratorSpliterator(PrimitiveIterator.OfInt iterator, long size, int characteristics) {
      +            this.it = iterator;
      +            this.est = size;
      +            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        /**
      +         * Creates a spliterator using the given iterator for a
      +         * source of unknown size, reporting the given
      +         * characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public IntIteratorSpliterator(PrimitiveIterator.OfInt iterator, int characteristics) {
      +            this.it = iterator;
      +            this.est = Long.MAX_VALUE;
      +            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
      +        }
      +
      +        @Override
      +        public OfInt trySplit() {
      +            PrimitiveIterator.OfInt i = it;
      +            long s = est;
      +            if (s > 1 && i.hasNext()) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                int[] a;
      +                try {
      +                    a = new int[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = i.nextInt(); } while (++j < n && i.hasNext());
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new IntArraySpliterator(a, 0, j, characteristics);
      +            }
      +            return null;
      +        }
      +
      +        @Override
      +        public void forEachRemaining(IntConsumer action) {
      +            if (action == null) throw new NullPointerException();
      +            it.forEachRemaining(action);
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(IntConsumer action) {
      +            if (action == null) throw new NullPointerException();
      +            if (it.hasNext()) {
      +                action.accept(it.nextInt());
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        @Override
      +        public int characteristics() { return characteristics; }
      +
      +        @Override
      +        public Comparator<? super Integer> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    static final class LongIteratorSpliterator implements Spliterator.OfLong {
      +        static final int BATCH_UNIT = IteratorSpliterator.BATCH_UNIT;
      +        static final int MAX_BATCH = IteratorSpliterator.MAX_BATCH;
      +        private PrimitiveIterator.OfLong it;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator using the given iterator
      +         * for traversal, and reporting the given initial size
      +         * and characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param size the number of elements in the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public LongIteratorSpliterator(PrimitiveIterator.OfLong iterator, long size, int characteristics) {
      +            this.it = iterator;
      +            this.est = size;
      +            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        /**
      +         * Creates a spliterator using the given iterator for a
      +         * source of unknown size, reporting the given
      +         * characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public LongIteratorSpliterator(PrimitiveIterator.OfLong iterator, int characteristics) {
      +            this.it = iterator;
      +            this.est = Long.MAX_VALUE;
      +            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
      +        }
      +
      +        @Override
      +        public OfLong trySplit() {
      +            PrimitiveIterator.OfLong i = it;
      +            long s = est;
      +            if (s > 1 && i.hasNext()) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                long[] a;
      +                try {
      +                    a = new long[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = i.nextLong(); } while (++j < n && i.hasNext());
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new LongArraySpliterator(a, 0, j, characteristics);
      +            }
      +            return null;
      +        }
      +
      +        @Override
      +        public void forEachRemaining(LongConsumer action) {
      +            if (action == null) throw new NullPointerException();
      +            it.forEachRemaining(action);
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(LongConsumer action) {
      +            if (action == null) throw new NullPointerException();
      +            if (it.hasNext()) {
      +                action.accept(it.nextLong());
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        @Override
      +        public int characteristics() { return characteristics; }
      +
      +        @Override
      +        public Comparator<? super Long> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +
      +    static final class DoubleIteratorSpliterator implements Spliterator.OfDouble {
      +        static final int BATCH_UNIT = IteratorSpliterator.BATCH_UNIT;
      +        static final int MAX_BATCH = IteratorSpliterator.MAX_BATCH;
      +        private PrimitiveIterator.OfDouble it;
      +        private final int characteristics;
      +        private long est;             // size estimate
      +        private int batch;            // batch size for splits
      +
      +        /**
      +         * Creates a spliterator using the given iterator
      +         * for traversal, and reporting the given initial size
      +         * and characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param size the number of elements in the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public DoubleIteratorSpliterator(PrimitiveIterator.OfDouble iterator, long size, int characteristics) {
      +            this.it = iterator;
      +            this.est = size;
      +            this.characteristics = characteristics | Spliterator.SIZED | Spliterator.SUBSIZED;
      +        }
      +
      +        /**
      +         * Creates a spliterator using the given iterator for a
      +         * source of unknown size, reporting the given
      +         * characteristics.
      +         *
      +         * @param iterator the iterator for the source
      +         * @param characteristics properties of this spliterator's
      +         * source or elements.
      +         */
      +        public DoubleIteratorSpliterator(PrimitiveIterator.OfDouble iterator, int characteristics) {
      +            this.it = iterator;
      +            this.est = Long.MAX_VALUE;
      +            this.characteristics = characteristics & ~(Spliterator.SIZED | Spliterator.SUBSIZED);
      +        }
      +
      +        @Override
      +        public OfDouble trySplit() {
      +            PrimitiveIterator.OfDouble i = it;
      +            long s = est;
      +            if (s > 1 && i.hasNext()) {
      +                int n = batch + BATCH_UNIT;
      +                if (n > s)
      +                    n = (int) s;
      +                if (n > MAX_BATCH)
      +                    n = MAX_BATCH;
      +                double[] a;
      +                try {
      +                    a = new double[n];
      +                } catch (OutOfMemoryError oome) {
      +                    return null;
      +                }
      +                int j = 0;
      +                do { a[j] = i.nextDouble(); } while (++j < n && i.hasNext());
      +                batch = j;
      +                if (est != Long.MAX_VALUE)
      +                    est -= j;
      +                return new DoubleArraySpliterator(a, 0, j, characteristics);
      +            }
      +            return null;
      +        }
      +
      +        @Override
      +        public void forEachRemaining(DoubleConsumer action) {
      +            if (action == null) throw new NullPointerException();
      +            it.forEachRemaining(action);
      +        }
      +
      +        @Override
      +        public boolean tryAdvance(DoubleConsumer action) {
      +            if (action == null) throw new NullPointerException();
      +            if (it.hasNext()) {
      +                action.accept(it.nextDouble());
      +                return true;
      +            }
      +            return false;
      +        }
      +
      +        @Override
      +        public long estimateSize() {
      +            return est;
      +        }
      +
      +        @Override
      +        public int characteristics() { return characteristics; }
      +
      +        @Override
      +        public Comparator<? super Double> getComparator() {
      +            if (hasCharacteristics(Spliterator.SORTED))
      +                return null;
      +            throw new IllegalStateException();
      +        }
      +    }
      +}
      diff --git a/jdk/src/share/classes/java/util/Tripwire.java b/jdk/src/share/classes/java/util/Tripwire.java
      new file mode 100644
      index 00000000000..d1bd39ee486
      --- /dev/null
      +++ b/jdk/src/share/classes/java/util/Tripwire.java
      @@ -0,0 +1,69 @@
      +/*
      + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * under the terms of the GNU General Public License version 2 only, as
      + * published by the Free Software Foundation.  Oracle designates this
      + * particular file as subject to the "Classpath" exception as provided
      + * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +package java.util;
      +
      +import sun.util.logging.PlatformLogger;
      +
      +import java.security.AccessController;
      +import java.security.PrivilegedAction;
      +
      +/**
      + * Utility class for detecting inadvertent uses of boxing in
      + * {@code java.util} classes.  The detection is turned on or off based on
      + * whether the system property {@code org.openjdk.java.util.stream.tripwire} is
      + * considered {@code true} according to {@link Boolean#getBoolean(String)}.
      + * This should normally be turned off for production use.
      + *
      + * @apiNote
      + * Typical usage would be for boxing code to do:
      + * <pre>{@code
      + *     if (Tripwire.ENABLED)
      + *         Tripwire.trip(getClass(), "{0} calling PrimitiveIterator.OfInt.nextInt()");
      + * }</pre>
      + *
      + * @since 1.8
      + */
      +final class Tripwire {
      +    private static final String TRIPWIRE_PROPERTY = "org.openjdk.java.util.stream.tripwire";
      +
      +    /** Should debugging checks be enabled? */
      +    static final boolean ENABLED = AccessController.doPrivileged(
      +            (PrivilegedAction<Boolean>) () -> Boolean.getBoolean(TRIPWIRE_PROPERTY));
      +
      +    private Tripwire() { }
      +
      +    /**
      +     * Produces a log warning, using {@code PlatformLogger.getLogger(className)},
      +     * using the supplied message.  The class name of {@code trippingClass} will
      +     * be used as the first parameter to the message.
      +     *
      +     * @param trippingClass Name of the class generating the message
      +     * @param msg A message format string of the type expected by
      +     * {@link PlatformLogger}
      +     */
      +    static void trip(Class<?> trippingClass, String msg) {
      +        PlatformLogger.getLogger(trippingClass.getName()).warning(msg, trippingClass.getName());
      +    }
      +}
      diff --git a/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java b/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java
      new file mode 100644
      index 00000000000..ba8d538765e
      --- /dev/null
      +++ b/jdk/test/java/util/Spliterator/SpliteratorLateBindingFailFastTest.java
      @@ -0,0 +1,357 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +import org.testng.annotations.DataProvider;
      +import org.testng.annotations.Test;
      +
      +import java.util.ArrayList;
      +import java.util.Arrays;
      +import java.util.Collection;
      +import java.util.Collections;
      +import java.util.ConcurrentModificationException;
      +import java.util.HashMap;
      +import java.util.HashSet;
      +import java.util.LinkedHashMap;
      +import java.util.LinkedHashSet;
      +import java.util.LinkedList;
      +import java.util.List;
      +import java.util.Map;
      +import java.util.PriorityQueue;
      +import java.util.Set;
      +import java.util.Spliterator;
      +import java.util.Stack;
      +import java.util.TreeMap;
      +import java.util.TreeSet;
      +import java.util.Vector;
      +import java.util.WeakHashMap;
      +import java.util.function.Consumer;
      +import java.util.function.Function;
      +import java.util.function.Supplier;
      +
      +import static org.testng.Assert.*;
      +
      +/**
      + * @test
      + * @summary Spliterator last-binding and fail-fast tests
      + * @run testng SpliteratorLateBindingFailFastTest
      + */
      +
      +@Test
      +public class SpliteratorLateBindingFailFastTest {
      +
      +    private interface Source<T> {
      +        Collection<T> asCollection();
      +        void update();
      +    }
      +
      +    private static class SpliteratorDataBuilder<T> {
      +        final List<Object[]> data;
      +
      +        final T newValue;
      +
      +        final List<T> exp;
      +
      +        final Map<T, T> mExp;
      +
      +        SpliteratorDataBuilder(List<Object[]> data, T newValue, List<T> exp) {
      +            this.data = data;
      +            this.newValue = newValue;
      +            this.exp = exp;
      +            this.mExp = createMap(exp);
      +        }
      +
      +        Map<T, T> createMap(List<T> l) {
      +            Map<T, T> m = new LinkedHashMap<>();
      +            for (T t : l) {
      +                m.put(t, t);
      +            }
      +            return m;
      +        }
      +
      +        void add(String description, Supplier<Source<?>> s) {
      +            description = joiner(description).toString();
      +            data.add(new Object[]{description, s});
      +        }
      +
      +        void addCollection(Function<Collection<T>, ? extends Collection<T>> f) {
      +            class CollectionSource implements Source<T> {
      +                final Collection<T> c = f.apply(exp);
      +
      +                final Consumer<Collection<T>> updater;
      +
      +                CollectionSource(Consumer<Collection<T>> updater) {
      +                    this.updater = updater;
      +                }
      +
      +                @Override
      +                public Collection<T> asCollection() {
      +                    return c;
      +                }
      +
      +                @Override
      +                public void update() {
      +                    updater.accept(c);
      +                }
      +            }
      +
      +            String description = "new " + f.apply(Collections.<T>emptyList()).getClass().getName() + ".spliterator() ";
      +            add(description + "ADD", () -> new CollectionSource(c -> c.add(newValue)));
      +            add(description + "REMOVE", () -> new CollectionSource(c -> c.remove(c.iterator().next())));
      +        }
      +
      +        void addList(Function<Collection<T>, ? extends List<T>> l) {
      +            // @@@ If collection is instance of List then add sub-list tests
      +            addCollection(l);
      +        }
      +
      +        void addMap(Function<Map<T, T>, ? extends Map<T, T>> mapConstructor) {
      +            class MapSource<U> implements Source<U> {
      +                final Map<T, T> m = mapConstructor.apply(mExp);
      +
      +                final Collection<U> c;
      +
      +                final Consumer<Map<T, T>> updater;
      +
      +                MapSource(Function<Map<T, T>, Collection<U>> f, Consumer<Map<T, T>> updater) {
      +                    this.c = f.apply(m);
      +                    this.updater = updater;
      +                }
      +
      +                @Override
      +                public Collection<U> asCollection() {
      +                    return c;
      +                }
      +
      +                @Override
      +                public void update() {
      +                    updater.accept(m);
      +                }
      +            }
      +
      +            Map<String, Consumer<Map<T, T>>> actions = new HashMap<>();
      +            actions.put("ADD", m -> m.put(newValue, newValue));
      +            actions.put("REMOVE", m -> m.remove(m.keySet().iterator().next()));
      +
      +            String description = "new " + mapConstructor.apply(Collections.<T, T>emptyMap()).getClass().getName();
      +            for (Map.Entry<String, Consumer<Map<T, T>>> e : actions.entrySet()) {
      +                add(description + ".keySet().spliterator() " + e.getKey(),
      +                    () -> new MapSource<T>(m -> m.keySet(), e.getValue()));
      +                add(description + ".values().spliterator() " + e.getKey(),
      +                    () -> new MapSource<T>(m -> m.values(), e.getValue()));
      +                add(description + ".entrySet().spliterator() " + e.getKey(),
      +                    () -> new MapSource<Map.Entry<T, T>>(m -> m.entrySet(), e.getValue()));
      +            }
      +        }
      +
      +        StringBuilder joiner(String description) {
      +            return new StringBuilder(description).
      +                    append(" {").
      +                    append("size=").append(exp.size()).
      +                    append("}");
      +        }
      +    }
      +
      +    static Object[][] spliteratorDataProvider;
      +
      +    @DataProvider(name = "Source")
      +    public static Object[][] spliteratorDataProvider() {
      +        if (spliteratorDataProvider != null) {
      +            return spliteratorDataProvider;
      +        }
      +
      +        List<Object[]> data = new ArrayList<>();
      +        SpliteratorDataBuilder<Integer> db = new SpliteratorDataBuilder<>(data, 5, Arrays.asList(1, 2, 3, 4));
      +
      +        // Collections
      +
      +        db.addList(ArrayList::new);
      +
      +        db.addList(LinkedList::new);
      +
      +        db.addList(Vector::new);
      +
      +
      +        db.addCollection(HashSet::new);
      +
      +        db.addCollection(LinkedHashSet::new);
      +
      +        db.addCollection(TreeSet::new);
      +
      +
      +        db.addCollection(c -> { Stack<Integer> s = new Stack<>(); s.addAll(c); return s;});
      +
      +        db.addCollection(PriorityQueue::new);
      +
      +        // ArrayDeque fails some tests since it's fail-fast support is weaker
      +        // than other collections and limited to detecting most, but not all,
      +        // removals.  It probably requires it's own test since it is difficult
      +        // to abstract out the conditions under which it fails-fast.
      +//        db.addCollection(ArrayDeque::new);
      +
      +        // Maps
      +
      +        db.addMap(HashMap::new);
      +
      +        db.addMap(LinkedHashMap::new);
      +
      +        // This fails when run through jrteg but passes when run though
      +        // ant
      +//        db.addMap(IdentityHashMap::new);
      +
      +        db.addMap(WeakHashMap::new);
      +
      +        // @@@  Descending maps etc
      +        db.addMap(TreeMap::new);
      +
      +        return spliteratorDataProvider = data.toArray(new Object[0][]);
      +    }
      +
      +    @Test(dataProvider = "Source")
      +    public <T> void lateBindingTestWithForEach(String description, Supplier<Source<T>> ss) {
      +        Source<T> source = ss.get();
      +        Collection<T> c = source.asCollection();
      +        Spliterator<T> s = c.spliterator();
      +
      +        source.update();
      +
      +        Set<T> r = new HashSet<>();
      +        s.forEachRemaining(r::add);
      +
      +        assertEquals(r, new HashSet<>(c));
      +    }
      +
      +    @Test(dataProvider = "Source")
      +    public <T> void lateBindingTestWithTryAdvance(String description, Supplier<Source<T>> ss) {
      +        Source<T> source = ss.get();
      +        Collection<T> c = source.asCollection();
      +        Spliterator<T> s = c.spliterator();
      +
      +        source.update();
      +
      +        Set<T> r = new HashSet<>();
      +        while (s.tryAdvance(r::add)) { }
      +
      +        assertEquals(r, new HashSet<>(c));
      +    }
      +
      +    @Test(dataProvider = "Source")
      +    public <T> void lateBindingTestWithCharacteritics(String description, Supplier<Source<T>> ss) {
      +        Source<T> source = ss.get();
      +        Collection<T> c = source.asCollection();
      +        Spliterator<T> s = c.spliterator();
      +        s.characteristics();
      +
      +        Set<T> r = new HashSet<>();
      +        s.forEachRemaining(r::add);
      +
      +        assertEquals(r, new HashSet<>(c));
      +    }
      +
      +
      +    @Test(dataProvider = "Source")
      +    public <T> void testFailFastTestWithTryAdvance(String description, Supplier<Source<T>> ss) {
      +        {
      +            Source<T> source = ss.get();
      +            Collection<T> c = source.asCollection();
      +            Spliterator<T> s = c.spliterator();
      +
      +            s.tryAdvance(e -> {
      +            });
      +            source.update();
      +
      +            executeAndCatch(() -> s.tryAdvance(e -> { }));
      +        }
      +
      +        {
      +            Source<T> source = ss.get();
      +            Collection<T> c = source.asCollection();
      +            Spliterator<T> s = c.spliterator();
      +
      +            s.tryAdvance(e -> {
      +            });
      +            source.update();
      +
      +            executeAndCatch(() -> s.forEachRemaining(e -> {
      +            }));
      +        }
      +    }
      +
      +    @Test(dataProvider = "Source")
      +    public <T> void testFailFastTestWithForEach(String description, Supplier<Source<T>> ss) {
      +        Source<T> source = ss.get();
      +        Collection<T> c = source.asCollection();
      +        Spliterator<T> s = c.spliterator();
      +
      +        executeAndCatch(() -> s.forEachRemaining(e -> {
      +            source.update();
      +        }));
      +    }
      +
      +    @Test(dataProvider = "Source")
      +    public <T> void testFailFastTestWithEstimateSize(String description, Supplier<Source<T>> ss) {
      +        {
      +            Source<T> source = ss.get();
      +            Collection<T> c = source.asCollection();
      +            Spliterator<T> s = c.spliterator();
      +
      +            s.estimateSize();
      +            source.update();
      +
      +            executeAndCatch(() -> s.tryAdvance(e -> { }));
      +        }
      +
      +        {
      +            Source<T> source = ss.get();
      +            Collection<T> c = source.asCollection();
      +            Spliterator<T> s = c.spliterator();
      +
      +            s.estimateSize();
      +            source.update();
      +
      +            executeAndCatch(() -> s.forEachRemaining(e -> {
      +            }));
      +        }
      +    }
      +
      +    private void executeAndCatch(Runnable r) {
      +        executeAndCatch(ConcurrentModificationException.class, r);
      +    }
      +
      +    private void executeAndCatch(Class<? extends Exception> expected, Runnable r) {
      +        Exception caught = null;
      +        try {
      +            r.run();
      +        }
      +        catch (Exception e) {
      +            caught = e;
      +        }
      +
      +        assertNotNull(caught,
      +                      String.format("No Exception was thrown, expected an Exception of %s to be thrown",
      +                                    expected.getName()));
      +        assertTrue(expected.isInstance(caught),
      +                   String.format("Exception thrown %s not an instance of %s",
      +                                 caught.getClass().getName(), expected.getName()));
      +    }
      +
      +}
      diff --git a/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java
      new file mode 100644
      index 00000000000..046cfa079f1
      --- /dev/null
      +++ b/jdk/test/java/util/Spliterator/SpliteratorTraversingAndSplittingTest.java
      @@ -0,0 +1,1257 @@
      +/*
      + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
      + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
      + *
      + * This code is free software; you can redistribute it and/or modify it
      + * 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
      + * or visit www.oracle.com if you need additional information or have any
      + * questions.
      + */
      +
      +/**
      + * @test
      + * @summary Spliterator traversing and splitting tests
      + * @run testng SpliteratorTraversingAndSplittingTest
      + */
      +
      +import org.testng.annotations.DataProvider;
      +import org.testng.annotations.Test;
      +
      +import java.util.AbstractCollection;
      +import java.util.AbstractList;
      +import java.util.AbstractSet;
      +import java.util.ArrayDeque;
      +import java.util.ArrayList;
      +import java.util.Arrays;
      +import java.util.Collection;
      +import java.util.Collections;
      +import java.util.Comparator;
      +import java.util.Deque;
      +import java.util.HashMap;
      +import java.util.HashSet;
      +import java.util.IdentityHashMap;
      +import java.util.Iterator;
      +import java.util.LinkedHashMap;
      +import java.util.LinkedHashSet;
      +import java.util.LinkedList;
      +import java.util.List;
      +import java.util.Map;
      +import java.util.PriorityQueue;
      +import java.util.Set;
      +import java.util.SortedSet;
      +import java.util.Spliterator;
      +import java.util.Spliterators;
      +import java.util.Stack;
      +import java.util.TreeMap;
      +import java.util.TreeSet;
      +import java.util.Vector;
      +import java.util.WeakHashMap;
      +import java.util.concurrent.ArrayBlockingQueue;
      +import java.util.concurrent.ConcurrentHashMap;
      +import java.util.concurrent.ConcurrentLinkedQueue;
      +import java.util.concurrent.ConcurrentSkipListMap;
      +import java.util.concurrent.ConcurrentSkipListSet;
      +import java.util.concurrent.CopyOnWriteArrayList;
      +import java.util.concurrent.CopyOnWriteArraySet;
      +import java.util.concurrent.LinkedBlockingDeque;
      +import java.util.concurrent.LinkedBlockingQueue;
      +import java.util.concurrent.LinkedTransferQueue;
      +import java.util.concurrent.PriorityBlockingQueue;
      +import java.util.function.Consumer;
      +import java.util.function.DoubleConsumer;
      +import java.util.function.Function;
      +import java.util.function.IntConsumer;
      +import java.util.function.LongConsumer;
      +import java.util.function.Supplier;
      +import java.util.function.UnaryOperator;
      +
      +import static org.testng.Assert.*;
      +import static org.testng.Assert.assertEquals;
      +
      +@Test
      +public class SpliteratorTraversingAndSplittingTest {
      +
      +    private static List<Integer> SIZES = Arrays.asList(0, 1, 10, 100, 1000);
      +
      +    private static class SpliteratorDataBuilder<T> {
      +        List<Object[]> data;
      +
      +        List<T> exp;
      +
      +        Map<T, T> mExp;
      +
      +        SpliteratorDataBuilder(List<Object[]> data, List<T> exp) {
      +            this.data = data;
      +            this.exp = exp;
      +            this.mExp = createMap(exp);
      +        }
      +
      +        Map<T, T> createMap(List<T> l) {
      +            Map<T, T> m = new LinkedHashMap<>();
      +            for (T t : l) {
      +                m.put(t, t);
      +            }
      +            return m;
      +        }
      +
      +        void add(String description, Collection<?> expected, Supplier<Spliterator<?>> s) {
      +            description = joiner(description).toString();
      +            data.add(new Object[]{description, expected, s});
      +        }
      +
      +        void add(String description, Supplier<Spliterator<?>> s) {
      +            add(description, exp, s);
      +        }
      +
      +        void addCollection(Function<Collection<T>, ? extends Collection<T>> c) {
      +            add("new " + c.apply(Collections.<T>emptyList()).getClass().getName() + ".spliterator()",
      +                () -> c.apply(exp).spliterator());
      +        }
      +
      +        void addList(Function<Collection<T>, ? extends List<T>> l) {
      +            // @@@ If collection is instance of List then add sub-list tests
      +            addCollection(l);
      +        }
      +
      +        void addMap(Function<Map<T, T>, ? extends Map<T, T>> m) {
      +            String description = "new " + m.apply(Collections.<T, T>emptyMap()).getClass().getName();
      +            add(description + ".keySet().spliterator()", () -> m.apply(mExp).keySet().spliterator());
      +            add(description + ".values().spliterator()", () -> m.apply(mExp).values().spliterator());
      +            add(description + ".entrySet().spliterator()", mExp.entrySet(), () -> m.apply(mExp).entrySet().spliterator());
      +        }
      +
      +        StringBuilder joiner(String description) {
      +            return new StringBuilder(description).
      +                    append(" {").
      +                    append("size=").append(exp.size()).
      +                    append("}");
      +        }
      +    }
      +
      +    static Object[][] spliteratorDataProvider;
      +
      +    @DataProvider(name = "Spliterator<Integer>")
      +    public static Object[][] spliteratorDataProvider() {
      +        if (spliteratorDataProvider != null) {
      +            return spliteratorDataProvider;
      +        }
      +
      +        List<Object[]> data = new ArrayList<>();
      +        for (int size : SIZES) {
      +            List<Integer> exp = listIntRange(size);
      +            SpliteratorDataBuilder<Integer> db = new SpliteratorDataBuilder<>(data, exp);
      +
      +            // Direct spliterator methods
      +
      +            db.add("Spliterators.spliterator(Collection, ...)",
      +                   () -> Spliterators.spliterator(exp, 0));
      +
      +            db.add("Spliterators.spliterator(Iterator, ...)",
      +                   () -> Spliterators.spliterator(exp.iterator(), exp.size(), 0));
      +
      +            db.add("Spliterators.spliteratorUnknownSize(Iterator, ...)",
      +                   () -> Spliterators.spliteratorUnknownSize(exp.iterator(), 0));
      +
      +            db.add("Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Spliterator ), ...)",
      +                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(exp.spliterator()), exp.size(), 0));
      +
      +            db.add("Spliterators.spliterator(T[], ...)",
      +                   () -> Spliterators.spliterator(exp.toArray(new Integer[0]), 0));
      +
      +            db.add("Arrays.spliterator(T[], ...)",
      +                   () -> Arrays.spliterator(exp.toArray(new Integer[0])));
      +
      +            class SpliteratorFromIterator extends Spliterators.AbstractSpliterator<Integer> {
      +                Iterator<Integer> it;
      +
      +                SpliteratorFromIterator(Iterator<Integer> it, long est) {
      +                    super(est, Spliterator.SIZED);
      +                    this.it = it;
      +                }
      +
      +                @Override
      +                public boolean tryAdvance(Consumer<? super Integer> action) {
      +                    if (it.hasNext()) {
      +                        action.accept(it.next());
      +                        return true;
      +                    }
      +                    else {
      +                        return false;
      +                    }
      +                }
      +            }
      +            db.add("new Spliterators.AbstractAdvancingSpliterator()",
      +                   () -> new SpliteratorFromIterator(exp.iterator(), exp.size()));
      +
      +            // Collections
      +
      +            // default method implementations
      +
      +            class AbstractCollectionImpl extends AbstractCollection<Integer> {
      +                Collection<Integer> c;
      +
      +                AbstractCollectionImpl(Collection<Integer> c) {
      +                    this.c = c;
      +                }
      +
      +                @Override
      +                public Iterator<Integer> iterator() {
      +                    return c.iterator();
      +                }
      +
      +                @Override
      +                public int size() {
      +                    return c.size();
      +                }
      +            }
      +            db.addCollection(
      +                    c -> new AbstractCollectionImpl(c));
      +
      +            class AbstractListImpl extends AbstractList<Integer> {
      +                List<Integer> l;
      +
      +                AbstractListImpl(Collection<Integer> c) {
      +                    this.l = new ArrayList<>(c);
      +                }
      +
      +                @Override
      +                public Integer get(int index) {
      +                    return l.get(index);
      +                }
      +
      +                @Override
      +                public int size() {
      +                    return l.size();
      +                }
      +            }
      +            db.addCollection(
      +                    c -> new AbstractListImpl(c));
      +
      +            class AbstractSetImpl extends AbstractSet<Integer> {
      +                Set<Integer> s;
      +
      +                AbstractSetImpl(Collection<Integer> c) {
      +                    this.s = new HashSet<>(c);
      +                }
      +
      +                @Override
      +                public Iterator<Integer> iterator() {
      +                    return s.iterator();
      +                }
      +
      +                @Override
      +                public int size() {
      +                    return s.size();
      +                }
      +            }
      +            db.addCollection(
      +                    c -> new AbstractSetImpl(c));
      +
      +            class AbstractSortedSetImpl extends AbstractSet<Integer> implements SortedSet<Integer> {
      +                SortedSet<Integer> s;
      +
      +                AbstractSortedSetImpl(Collection<Integer> c) {
      +                    this.s = new TreeSet<>(c);
      +                }
      +
      +                @Override
      +                public Iterator<Integer> iterator() {
      +                    return s.iterator();
      +                }
      +
      +                @Override
      +                public int size() {
      +                    return s.size();
      +                }
      +
      +                @Override
      +                public Comparator<? super Integer> comparator() {
      +                    return s.comparator();
      +                }
      +
      +                @Override
      +                public SortedSet<Integer> subSet(Integer fromElement, Integer toElement) {
      +                    return s.subSet(fromElement, toElement);
      +                }
      +
      +                @Override
      +                public SortedSet<Integer> headSet(Integer toElement) {
      +                    return s.headSet(toElement);
      +                }
      +
      +                @Override
      +                public SortedSet<Integer> tailSet(Integer fromElement) {
      +                    return s.tailSet(fromElement);
      +                }
      +
      +                @Override
      +                public Integer first() {
      +                    return s.first();
      +                }
      +
      +                @Override
      +                public Integer last() {
      +                    return s.last();
      +                }
      +
      +                @Override
      +                public Spliterator<Integer> spliterator() {
      +                    return SortedSet.super.spliterator();
      +                }
      +            }
      +            db.addCollection(
      +                    c -> new AbstractSortedSetImpl(c));
      +
      +            //
      +
      +            db.add("Arrays.asList().spliterator()",
      +                   () -> Spliterators.spliterator(Arrays.asList(exp.toArray(new Integer[0])), 0));
      +
      +            db.addList(ArrayList::new);
      +
      +            db.addList(LinkedList::new);
      +
      +            db.addList(Vector::new);
      +
      +
      +            db.addCollection(HashSet::new);
      +
      +            db.addCollection(LinkedHashSet::new);
      +
      +            db.addCollection(TreeSet::new);
      +
      +
      +            db.addCollection(c -> { Stack<Integer> s = new Stack<>(); s.addAll(c); return s;});
      +
      +            db.addCollection(PriorityQueue::new);
      +
      +            db.addCollection(ArrayDeque::new);
      +
      +
      +            db.addCollection(ConcurrentSkipListSet::new);
      +
      +            if (size > 0) {
      +                db.addCollection(c -> {
      +                    ArrayBlockingQueue<Integer> abq = new ArrayBlockingQueue<>(size);
      +                    abq.addAll(c);
      +                    return abq;
      +                });
      +            }
      +
      +            db.addCollection(PriorityBlockingQueue::new);
      +
      +            db.addCollection(LinkedBlockingQueue::new);
      +
      +            db.addCollection(LinkedTransferQueue::new);
      +
      +            db.addCollection(ConcurrentLinkedQueue::new);
      +
      +            db.addCollection(LinkedBlockingDeque::new);
      +
      +            db.addCollection(CopyOnWriteArrayList::new);
      +
      +            db.addCollection(CopyOnWriteArraySet::new);
      +
      +            if (size == 1) {
      +                db.addCollection(c -> Collections.singleton(exp.get(0)));
      +                db.addCollection(c -> Collections.singletonList(exp.get(0)));
      +            }
      +
      +            // @@@ Collections.synchronized/unmodifiable/checked wrappers
      +
      +            // Maps
      +
      +            db.addMap(HashMap::new);
      +
      +            db.addMap(LinkedHashMap::new);
      +
      +            db.addMap(IdentityHashMap::new);
      +
      +            db.addMap(WeakHashMap::new);
      +
      +            // @@@  Descending maps etc
      +            db.addMap(TreeMap::new);
      +
      +            db.addMap(ConcurrentHashMap::new);
      +
      +            db.addMap(ConcurrentSkipListMap::new);
      +        }
      +
      +        return spliteratorDataProvider = data.toArray(new Object[0][]);
      +    }
      +
      +    private static List<Integer> listIntRange(int upTo) {
      +        List<Integer> exp = new ArrayList<>();
      +        for (int i = 0; i < upTo; i++)
      +            exp.add(i);
      +        return Collections.unmodifiableList(exp);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testForEach(String description, Collection exp, Supplier<Spliterator> s) {
      +        testForEach(exp, s, (Consumer<Object> b) -> b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testTryAdvance(String description, Collection exp, Supplier<Spliterator> s) {
      +        testTryAdvance(exp, s, (Consumer<Object> b) -> b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testMixedTryAdvanceForEach(String description, Collection exp, Supplier<Spliterator> s) {
      +        testMixedTryAdvanceForEach(exp, s, (Consumer<Object> b) -> b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testSplitAfterFullTraversal(String description, Collection exp, Supplier<Spliterator> s) {
      +        testSplitAfterFullTraversal(s, (Consumer<Object> b) -> b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testSplitOnce(String description, Collection exp, Supplier<Spliterator> s) {
      +        testSplitOnce(exp, s, (Consumer<Object> b) -> b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testSplitSixDeep(String description, Collection exp, Supplier<Spliterator> s) {
      +        testSplitSixDeep(exp, s, (Consumer<Object> b) -> b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator<Integer>")
      +    @SuppressWarnings({"unchecked", "rawtypes"})
      +    public void testSplitUntilNull(String description, Collection exp, Supplier<Spliterator> s) {
      +        testSplitUntilNull(exp, s, (Consumer<Object> b) -> b);
      +    }
      +
      +    //
      +
      +    private static class SpliteratorOfIntDataBuilder {
      +        List<Object[]> data;
      +
      +        List<Integer> exp;
      +
      +        SpliteratorOfIntDataBuilder(List<Object[]> data, List<Integer> exp) {
      +            this.data = data;
      +            this.exp = exp;
      +        }
      +
      +        void add(String description, List<Integer> expected, Supplier<Spliterator.OfInt> s) {
      +            description = joiner(description).toString();
      +            data.add(new Object[]{description, expected, s});
      +        }
      +
      +        void add(String description, Supplier<Spliterator.OfInt> s) {
      +            add(description, exp, s);
      +        }
      +
      +        StringBuilder joiner(String description) {
      +            return new StringBuilder(description).
      +                    append(" {").
      +                    append("size=").append(exp.size()).
      +                    append("}");
      +        }
      +    }
      +
      +    static Object[][] spliteratorOfIntDataProvider;
      +
      +    @DataProvider(name = "Spliterator.OfInt")
      +    public static Object[][] spliteratorOfIntDataProvider() {
      +        if (spliteratorOfIntDataProvider != null) {
      +            return spliteratorOfIntDataProvider;
      +        }
      +
      +        List<Object[]> data = new ArrayList<>();
      +        for (int size : SIZES) {
      +            int exp[] = arrayIntRange(size);
      +            SpliteratorOfIntDataBuilder db = new SpliteratorOfIntDataBuilder(data, listIntRange(size));
      +
      +            db.add("Spliterators.spliterator(int[], ...)",
      +                   () -> Spliterators.spliterator(exp, 0));
      +
      +            db.add("Arrays.spliterator(int[], ...)",
      +                   () -> Arrays.spliterator(exp));
      +
      +            db.add("Spliterators.spliterator(PrimitiveIterator.OfInt, ...)",
      +                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), exp.length, 0));
      +
      +            db.add("Spliterators.spliteratorUnknownSize(PrimitiveIterator.OfInt, ...)",
      +                   () -> Spliterators.spliteratorUnknownSize(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), 0));
      +
      +            class IntSpliteratorFromArray extends Spliterators.AbstractIntSpliterator {
      +                int[] a;
      +                int index = 0;
      +
      +                IntSpliteratorFromArray(int[] a) {
      +                    super(a.length, Spliterator.SIZED);
      +                    this.a = a;
      +                }
      +
      +                @Override
      +                public boolean tryAdvance(IntConsumer action) {
      +                    if (index < a.length) {
      +                        action.accept(a[index++]);
      +                        return true;
      +                    }
      +                    else {
      +                        return false;
      +                    }
      +                }
      +            }
      +            db.add("new Spliterators.AbstractIntAdvancingSpliterator()",
      +                   () -> new IntSpliteratorFromArray(exp));
      +        }
      +
      +        return spliteratorOfIntDataProvider = data.toArray(new Object[0][]);
      +    }
      +
      +    private static int[] arrayIntRange(int upTo) {
      +        int[] exp = new int[upTo];
      +        for (int i = 0; i < upTo; i++)
      +            exp[i] = i;
      +        return exp;
      +    }
      +
      +    private static UnaryOperator<Consumer<Integer>> intBoxingConsumer() {
      +        class BoxingAdapter implements Consumer<Integer>, IntConsumer {
      +            private final Consumer<Integer> b;
      +
      +            BoxingAdapter(Consumer<Integer> b) {
      +                this.b = b;
      +            }
      +
      +            @Override
      +            public void accept(Integer value) {
      +                throw new IllegalStateException();
      +            }
      +
      +            @Override
      +            public void accept(int value) {
      +                b.accept(value);
      +            }
      +        }
      +
      +        return b -> new BoxingAdapter(b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntForEach(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testForEach(exp, s, intBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntTryAdvance(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testTryAdvance(exp, s, intBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntMixedTryAdvanceForEach(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testMixedTryAdvanceForEach(exp, s, intBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntSplitAfterFullTraversal(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testSplitAfterFullTraversal(s, intBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntSplitOnce(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testSplitOnce(exp, s, intBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntSplitSixDeep(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testSplitSixDeep(exp, s, intBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfInt")
      +    public void testIntSplitUntilNull(String description, Collection<Integer> exp, Supplier<Spliterator.OfInt> s) {
      +        testSplitUntilNull(exp, s, intBoxingConsumer());
      +    }
      +
      +    //
      +
      +    private static class SpliteratorOfLongDataBuilder {
      +        List<Object[]> data;
      +
      +        List<Long> exp;
      +
      +        SpliteratorOfLongDataBuilder(List<Object[]> data, List<Long> exp) {
      +            this.data = data;
      +            this.exp = exp;
      +        }
      +
      +        void add(String description, List<Long> expected, Supplier<Spliterator.OfLong> s) {
      +            description = joiner(description).toString();
      +            data.add(new Object[]{description, expected, s});
      +        }
      +
      +        void add(String description, Supplier<Spliterator.OfLong> s) {
      +            add(description, exp, s);
      +        }
      +
      +        StringBuilder joiner(String description) {
      +            return new StringBuilder(description).
      +                    append(" {").
      +                    append("size=").append(exp.size()).
      +                    append("}");
      +        }
      +    }
      +
      +    static Object[][] spliteratorOfLongDataProvider;
      +
      +    @DataProvider(name = "Spliterator.OfLong")
      +    public static Object[][] spliteratorOfLongDataProvider() {
      +        if (spliteratorOfLongDataProvider != null) {
      +            return spliteratorOfLongDataProvider;
      +        }
      +
      +        List<Object[]> data = new ArrayList<>();
      +        for (int size : SIZES) {
      +            long exp[] = arrayLongRange(size);
      +            SpliteratorOfLongDataBuilder db = new SpliteratorOfLongDataBuilder(data, listLongRange(size));
      +
      +            db.add("Spliterators.spliterator(long[], ...)",
      +                   () -> Spliterators.spliterator(exp, 0));
      +
      +            db.add("Arrays.spliterator(long[], ...)",
      +                   () -> Arrays.spliterator(exp));
      +
      +            db.add("Spliterators.spliterator(PrimitiveIterator.OfLong, ...)",
      +                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), exp.length, 0));
      +
      +            db.add("Spliterators.spliteratorUnknownSize(PrimitiveIterator.OfLong, ...)",
      +                   () -> Spliterators.spliteratorUnknownSize(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), 0));
      +
      +            class LongSpliteratorFromArray extends Spliterators.AbstractLongSpliterator {
      +                long[] a;
      +                int index = 0;
      +
      +                LongSpliteratorFromArray(long[] a) {
      +                    super(a.length, Spliterator.SIZED);
      +                    this.a = a;
      +                }
      +
      +                @Override
      +                public boolean tryAdvance(LongConsumer action) {
      +                    if (index < a.length) {
      +                        action.accept(a[index++]);
      +                        return true;
      +                    }
      +                    else {
      +                        return false;
      +                    }
      +                }
      +            }
      +            db.add("new Spliterators.AbstractLongAdvancingSpliterator()",
      +                   () -> new LongSpliteratorFromArray(exp));
      +        }
      +
      +        return spliteratorOfLongDataProvider = data.toArray(new Object[0][]);
      +    }
      +
      +    private static List<Long> listLongRange(int upTo) {
      +        List<Long> exp = new ArrayList<>();
      +        for (long i = 0; i < upTo; i++)
      +            exp.add(i);
      +        return Collections.unmodifiableList(exp);
      +    }
      +
      +    private static long[] arrayLongRange(int upTo) {
      +        long[] exp = new long[upTo];
      +        for (int i = 0; i < upTo; i++)
      +            exp[i] = i;
      +        return exp;
      +    }
      +
      +    private static UnaryOperator<Consumer<Long>> longBoxingConsumer() {
      +        class BoxingAdapter implements Consumer<Long>, LongConsumer {
      +            private final Consumer<Long> b;
      +
      +            BoxingAdapter(Consumer<Long> b) {
      +                this.b = b;
      +            }
      +
      +            @Override
      +            public void accept(Long value) {
      +                throw new IllegalStateException();
      +            }
      +
      +            @Override
      +            public void accept(long value) {
      +                b.accept(value);
      +            }
      +        }
      +
      +        return b -> new BoxingAdapter(b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongForEach(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testForEach(exp, s, longBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongTryAdvance(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testTryAdvance(exp, s, longBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongMixedTryAdvanceForEach(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testMixedTryAdvanceForEach(exp, s, longBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongSplitAfterFullTraversal(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testSplitAfterFullTraversal(s, longBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongSplitOnce(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testSplitOnce(exp, s, longBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongSplitSixDeep(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testSplitSixDeep(exp, s, longBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfLong")
      +    public void testLongSplitUntilNull(String description, Collection<Long> exp, Supplier<Spliterator.OfLong> s) {
      +        testSplitUntilNull(exp, s, longBoxingConsumer());
      +    }
      +
      +    //
      +
      +    private static class SpliteratorOfDoubleDataBuilder {
      +        List<Object[]> data;
      +
      +        List<Double> exp;
      +
      +        SpliteratorOfDoubleDataBuilder(List<Object[]> data, List<Double> exp) {
      +            this.data = data;
      +            this.exp = exp;
      +        }
      +
      +        void add(String description, List<Double> expected, Supplier<Spliterator.OfDouble> s) {
      +            description = joiner(description).toString();
      +            data.add(new Object[]{description, expected, s});
      +        }
      +
      +        void add(String description, Supplier<Spliterator.OfDouble> s) {
      +            add(description, exp, s);
      +        }
      +
      +        StringBuilder joiner(String description) {
      +            return new StringBuilder(description).
      +                    append(" {").
      +                    append("size=").append(exp.size()).
      +                    append("}");
      +        }
      +    }
      +
      +    static Object[][] spliteratorOfDoubleDataProvider;
      +
      +    @DataProvider(name = "Spliterator.OfDouble")
      +    public static Object[][] spliteratorOfDoubleDataProvider() {
      +        if (spliteratorOfDoubleDataProvider != null) {
      +            return spliteratorOfDoubleDataProvider;
      +        }
      +
      +        List<Object[]> data = new ArrayList<>();
      +        for (int size : SIZES) {
      +            double exp[] = arrayDoubleRange(size);
      +            SpliteratorOfDoubleDataBuilder db = new SpliteratorOfDoubleDataBuilder(data, listDoubleRange(size));
      +
      +            db.add("Spliterators.spliterator(double[], ...)",
      +                   () -> Spliterators.spliterator(exp, 0));
      +
      +            db.add("Arrays.spliterator(double[], ...)",
      +                   () -> Arrays.spliterator(exp));
      +
      +            db.add("Spliterators.spliterator(PrimitiveIterator.OfDouble, ...)",
      +                   () -> Spliterators.spliterator(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), exp.length, 0));
      +
      +            db.add("Spliterators.spliteratorUnknownSize(PrimitiveIterator.OfDouble, ...)",
      +                   () -> Spliterators.spliteratorUnknownSize(Spliterators.iteratorFromSpliterator(Arrays.spliterator(exp)), 0));
      +
      +            class DoubleSpliteratorFromArray extends Spliterators.AbstractDoubleSpliterator {
      +                double[] a;
      +                int index = 0;
      +
      +                DoubleSpliteratorFromArray(double[] a) {
      +                    super(a.length, Spliterator.SIZED);
      +                    this.a = a;
      +                }
      +
      +                @Override
      +                public boolean tryAdvance(DoubleConsumer action) {
      +                    if (index < a.length) {
      +                        action.accept(a[index++]);
      +                        return true;
      +                    }
      +                    else {
      +                        return false;
      +                    }
      +                }
      +            }
      +            db.add("new Spliterators.AbstractDoubleAdvancingSpliterator()",
      +                   () -> new DoubleSpliteratorFromArray(exp));
      +        }
      +
      +        return spliteratorOfDoubleDataProvider = data.toArray(new Object[0][]);
      +    }
      +
      +    private static List<Double> listDoubleRange(int upTo) {
      +        List<Double> exp = new ArrayList<>();
      +        for (double i = 0; i < upTo; i++)
      +            exp.add(i);
      +        return Collections.unmodifiableList(exp);
      +    }
      +
      +    private static double[] arrayDoubleRange(int upTo) {
      +        double[] exp = new double[upTo];
      +        for (int i = 0; i < upTo; i++)
      +            exp[i] = i;
      +        return exp;
      +    }
      +
      +    private static UnaryOperator<Consumer<Double>> doubleBoxingConsumer() {
      +        class BoxingAdapter implements Consumer<Double>, DoubleConsumer {
      +            private final Consumer<Double> b;
      +
      +            BoxingAdapter(Consumer<Double> b) {
      +                this.b = b;
      +            }
      +
      +            @Override
      +            public void accept(Double value) {
      +                throw new IllegalStateException();
      +            }
      +
      +            @Override
      +            public void accept(double value) {
      +                b.accept(value);
      +            }
      +        }
      +
      +        return b -> new BoxingAdapter(b);
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleForEach(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testForEach(exp, s, doubleBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleTryAdvance(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testTryAdvance(exp, s, doubleBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleMixedTryAdvanceForEach(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testMixedTryAdvanceForEach(exp, s, doubleBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleSplitAfterFullTraversal(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testSplitAfterFullTraversal(s, doubleBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleSplitOnce(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testSplitOnce(exp, s, doubleBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleSplitSixDeep(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testSplitSixDeep(exp, s, doubleBoxingConsumer());
      +    }
      +
      +    @Test(dataProvider = "Spliterator.OfDouble")
      +    public void testDoubleSplitUntilNull(String description, Collection<Double> exp, Supplier<Spliterator.OfDouble> s) {
      +        testSplitUntilNull(exp, s, doubleBoxingConsumer());
      +    }
      +
      +    //
      +
      +    private static <T, S extends Spliterator<T>> void testForEach(
      +            Collection<T> exp,
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        S spliterator = supplier.get();
      +        long sizeIfKnown = spliterator.getExactSizeIfKnown();
      +        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
      +
      +        ArrayList<T> fromForEach = new ArrayList<>();
      +        spliterator = supplier.get();
      +        Consumer<T> addToFromForEach = boxingAdapter.apply(fromForEach::add);
      +        spliterator.forEachRemaining(addToFromForEach);
      +
      +        // Assert that forEach now produces no elements
      +        spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
      +        // Assert that tryAdvance now produce no elements
      +        spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
      +
      +        // assert that size, tryAdvance, and forEach are consistent
      +        if (sizeIfKnown >= 0) {
      +            assertEquals(sizeIfKnown, exp.size());
      +        }
      +        assertEquals(fromForEach.size(), exp.size());
      +
      +        assertContents(fromForEach, exp, isOrdered);
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void testTryAdvance(
      +            Collection<T> exp,
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        S spliterator = supplier.get();
      +        long sizeIfKnown = spliterator.getExactSizeIfKnown();
      +        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
      +
      +        spliterator = supplier.get();
      +        ArrayList<T> fromTryAdvance = new ArrayList<>();
      +        Consumer<T> addToFromTryAdvance = boxingAdapter.apply(fromTryAdvance::add);
      +        while (spliterator.tryAdvance(addToFromTryAdvance)) { }
      +
      +        // Assert that forEach now produces no elements
      +        spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
      +        // Assert that tryAdvance now produce no elements
      +        spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
      +
      +        // assert that size, tryAdvance, and forEach are consistent
      +        if (sizeIfKnown >= 0) {
      +            assertEquals(sizeIfKnown, exp.size());
      +        }
      +        assertEquals(fromTryAdvance.size(), exp.size());
      +
      +        assertContents(fromTryAdvance, exp, isOrdered);
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void testMixedTryAdvanceForEach(
      +            Collection<T> exp,
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        S spliterator = supplier.get();
      +        long sizeIfKnown = spliterator.getExactSizeIfKnown();
      +        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
      +
      +        // tryAdvance first few elements, then forEach rest
      +        ArrayList<T> dest = new ArrayList<>();
      +        spliterator = supplier.get();
      +        Consumer<T> addToDest = boxingAdapter.apply(dest::add);
      +        for (int i = 0; i < 10 && spliterator.tryAdvance(addToDest); i++) { }
      +        spliterator.forEachRemaining(addToDest);
      +
      +        // Assert that forEach now produces no elements
      +        spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
      +        // Assert that tryAdvance now produce no elements
      +        spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
      +
      +        if (sizeIfKnown >= 0) {
      +            assertEquals(sizeIfKnown, dest.size());
      +        }
      +        assertEquals(dest.size(), exp.size());
      +
      +        if (isOrdered) {
      +            assertEquals(dest, exp);
      +        }
      +        else {
      +            assertContentsUnordered(dest, exp);
      +        }
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void testSplitAfterFullTraversal(
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        // Full traversal using tryAdvance
      +        Spliterator<T> spliterator = supplier.get();
      +        while (spliterator.tryAdvance(boxingAdapter.apply(e -> { }))) { }
      +        Spliterator<T> split = spliterator.trySplit();
      +        assertNull(split);
      +
      +        // Full traversal using forEach
      +        spliterator = supplier.get();
      +        spliterator.forEachRemaining(boxingAdapter.apply(e -> {
      +        }));
      +        split = spliterator.trySplit();
      +        assertNull(split);
      +
      +        // Full traversal using tryAdvance then forEach
      +        spliterator = supplier.get();
      +        spliterator.tryAdvance(boxingAdapter.apply(e -> { }));
      +        spliterator.forEachRemaining(boxingAdapter.apply(e -> {
      +        }));
      +        split = spliterator.trySplit();
      +        assertNull(split);
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void testSplitOnce(
      +            Collection<T> exp,
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        S spliterator = supplier.get();
      +        long sizeIfKnown = spliterator.getExactSizeIfKnown();
      +        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
      +
      +        ArrayList<T> fromSplit = new ArrayList<>();
      +        Spliterator<T> s1 = supplier.get();
      +        Spliterator<T> s2 = s1.trySplit();
      +        long s1Size = s1.getExactSizeIfKnown();
      +        long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0;
      +        Consumer<T> addToFromSplit = boxingAdapter.apply(fromSplit::add);
      +        if (s2 != null)
      +            s2.forEachRemaining(addToFromSplit);
      +        s1.forEachRemaining(addToFromSplit);
      +
      +        if (sizeIfKnown >= 0) {
      +            assertEquals(sizeIfKnown, fromSplit.size());
      +            if (s1Size >= 0 && s2Size >= 0)
      +                assertEquals(sizeIfKnown, s1Size + s2Size);
      +        }
      +        assertContents(fromSplit, exp, isOrdered);
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void testSplitSixDeep(
      +            Collection<T> exp,
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        S spliterator = supplier.get();
      +        boolean isOrdered = spliterator.hasCharacteristics(Spliterator.ORDERED);
      +
      +        for (int depth=0; depth < 6; depth++) {
      +            List<T> dest = new ArrayList<>();
      +            spliterator = supplier.get();
      +
      +            assertSpliterator(spliterator);
      +
      +            // verify splitting with forEach
      +            visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), false);
      +            assertContents(dest, exp, isOrdered);
      +
      +            // verify splitting with tryAdvance
      +            dest.clear();
      +            spliterator = supplier.get();
      +            visit(depth, 0, dest, spliterator, boxingAdapter, spliterator.characteristics(), true);
      +            assertContents(dest, exp, isOrdered);
      +        }
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void visit(int depth, int curLevel,
      +                              List<T> dest, S spliterator, UnaryOperator<Consumer<T>> boxingAdapter,
      +                              int rootCharacteristics, boolean useTryAdvance) {
      +        if (curLevel < depth) {
      +            long beforeSize = spliterator.getExactSizeIfKnown();
      +            Spliterator<T> split = spliterator.trySplit();
      +            if (split != null) {
      +                assertSpliterator(split, rootCharacteristics);
      +                assertSpliterator(spliterator, rootCharacteristics);
      +
      +                if ((rootCharacteristics & Spliterator.SUBSIZED) != 0 &&
      +                    (rootCharacteristics & Spliterator.SIZED) != 0) {
      +                    assertEquals(beforeSize, split.estimateSize() + spliterator.estimateSize());
      +                }
      +                visit(depth, curLevel + 1, dest, split, boxingAdapter, rootCharacteristics, useTryAdvance);
      +            }
      +            visit(depth, curLevel + 1, dest, spliterator, boxingAdapter, rootCharacteristics, useTryAdvance);
      +        }
      +        else {
      +            long sizeIfKnown = spliterator.getExactSizeIfKnown();
      +            if (useTryAdvance) {
      +                Consumer<T> addToDest = boxingAdapter.apply(dest::add);
      +                int count = 0;
      +                while (spliterator.tryAdvance(addToDest)) {
      +                    ++count;
      +                }
      +
      +                if (sizeIfKnown >= 0)
      +                    assertEquals(sizeIfKnown, count);
      +
      +                // Assert that forEach now produces no elements
      +                spliterator.forEachRemaining(boxingAdapter.apply(e -> fail("Spliterator.forEach produced an element after spliterator exhausted: " + e)));
      +
      +                Spliterator<T> split = spliterator.trySplit();
      +                assertNull(split);
      +            }
      +            else {
      +                List<T> leafDest = new ArrayList<>();
      +                Consumer<T> addToLeafDest = boxingAdapter.apply(leafDest::add);
      +                spliterator.forEachRemaining(addToLeafDest);
      +
      +                if (sizeIfKnown >= 0)
      +                    assertEquals(sizeIfKnown, leafDest.size());
      +
      +                // Assert that forEach now produces no elements
      +                spliterator.tryAdvance(boxingAdapter.apply(e -> fail("Spliterator.tryAdvance produced an element after spliterator exhausted: " + e)));
      +
      +                Spliterator<T> split = spliterator.trySplit();
      +                assertNull(split);
      +
      +                dest.addAll(leafDest);
      +            }
      +        }
      +    }
      +
      +    private static <T, S extends Spliterator<T>> void testSplitUntilNull(
      +            Collection<T> exp,
      +            Supplier<S> supplier,
      +            UnaryOperator<Consumer<T>> boxingAdapter) {
      +        Spliterator<T> s = supplier.get();
      +        boolean isOrdered = s.hasCharacteristics(Spliterator.ORDERED);
      +        assertSpliterator(s);
      +
      +        List<T> splits = new ArrayList<>();
      +        Consumer<T> c = boxingAdapter.apply(splits::add);
      +
      +        testSplitUntilNull(new SplitNode<T>(c, s));
      +        assertContents(splits, exp, isOrdered);
      +    }
      +
      +    private static class SplitNode<T> {
      +        // Constant for every node
      +        final Consumer<T> c;
      +        final int rootCharacteristics;
      +
      +        final Spliterator<T> s;
      +
      +        SplitNode(Consumer<T> c, Spliterator<T> s) {
      +            this(c, s.characteristics(), s);
      +        }
      +
      +        private SplitNode(Consumer<T> c, int rootCharacteristics, Spliterator<T> s) {
      +            this.c = c;
      +            this.rootCharacteristics = rootCharacteristics;
      +            this.s = s;
      +        }
      +
      +        SplitNode<T> fromSplit(Spliterator<T> split) {
      +            return new SplitNode<>(c, rootCharacteristics, split);
      +        }
      +    }
      +
      +    /**
      +     * Set the maximum stack capacity to 0.25MB. This should be more than enough to detect a bad spliterator
      +     * while not unduly disrupting test infrastructure given the test data sizes that are used are small.
      +     * Note that j.u.c.ForkJoinPool sets the max queue size to 64M (1 << 26).
      +     */
      +    private static final int MAXIMUM_STACK_CAPACITY = 1 << 18; // 0.25MB
      +
      +    private static <T> void testSplitUntilNull(SplitNode<T> e) {
      +        // Use an explicit stack to avoid a StackOverflowException when testing a Spliterator
      +        // that when repeatedly split produces a right-balanced (and maybe degenerate) tree, or
      +        // for a spliterator that is badly behaved.
      +        Deque<SplitNode<T>> stack = new ArrayDeque<>();
      +        stack.push(e);
      +
      +        int iteration = 0;
      +        while (!stack.isEmpty()) {
      +            assertTrue(iteration++ < MAXIMUM_STACK_CAPACITY, "Exceeded maximum stack modification count of 1 << 18");
      +
      +            e = stack.pop();
      +            Spliterator<T> parentAndRightSplit = e.s;
      +
      +            long parentEstimateSize = parentAndRightSplit.estimateSize();
      +            assertTrue(parentEstimateSize >= 0,
      +                       String.format("Split size estimate %d < 0", parentEstimateSize));
      +
      +            long parentSize = parentAndRightSplit.getExactSizeIfKnown();
      +            Spliterator<T> leftSplit = parentAndRightSplit.trySplit();
      +            if (leftSplit == null) {
      +                parentAndRightSplit.forEachRemaining(e.c);
      +                continue;
      +            }
      +
      +            assertSpliterator(leftSplit, e.rootCharacteristics);
      +            assertSpliterator(parentAndRightSplit, e.rootCharacteristics);
      +
      +            if (parentEstimateSize != Long.MAX_VALUE && leftSplit.estimateSize() > 0 && parentAndRightSplit.estimateSize() > 0) {
      +                assertTrue(leftSplit.estimateSize() < parentEstimateSize,
      +                           String.format("Left split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
      +                assertTrue(parentAndRightSplit.estimateSize() < parentEstimateSize,
      +                            String.format("Right split size estimate %d >= parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
      +            }
      +            else {
      +                assertTrue(leftSplit.estimateSize() <= parentEstimateSize,
      +                    String.format("Left split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
      +                assertTrue(parentAndRightSplit.estimateSize() <= parentEstimateSize,
      +                    String.format("Right split size estimate %d > parent split size estimate %d", leftSplit.estimateSize(), parentEstimateSize));
      +            }
      +
      +            long leftSize = leftSplit.getExactSizeIfKnown();
      +            long rightSize = parentAndRightSplit.getExactSizeIfKnown();
      +            if (parentSize >= 0 && leftSize >= 0 && rightSize >= 0)
      +                assertEquals(parentSize, leftSize + rightSize,
      +                             String.format("exact left split size %d + exact right split size %d != parent exact split size %d",
      +                                           leftSize, rightSize, parentSize));
      +
      +            // Add right side to stack first so left side is popped off first
      +            stack.push(e.fromSplit(parentAndRightSplit));
      +            stack.push(e.fromSplit(leftSplit));
      +        }
      +    }
      +
      +    private static void assertSpliterator(Spliterator<?> s, int rootCharacteristics) {
      +        if ((rootCharacteristics & Spliterator.SUBSIZED) != 0) {
      +            assertTrue(s.hasCharacteristics(Spliterator.SUBSIZED),
      +                       "Child split is not SUBSIZED when root split is SUBSIZED");
      +        }
      +        assertSpliterator(s);
      +    }
      +
      +    private static void assertSpliterator(Spliterator<?> s) {
      +        if (s.hasCharacteristics(Spliterator.SUBSIZED)) {
      +            assertTrue(s.hasCharacteristics(Spliterator.SIZED));
      +        }
      +        if (s.hasCharacteristics(Spliterator.SIZED)) {
      +            assertTrue(s.estimateSize() != Long.MAX_VALUE);
      +            assertTrue(s.getExactSizeIfKnown() >= 0);
      +        }
      +        try {
      +            s.getComparator();
      +            assertTrue(s.hasCharacteristics(Spliterator.SORTED));
      +        } catch (IllegalStateException e) {
      +            assertFalse(s.hasCharacteristics(Spliterator.SORTED));
      +        }
      +    }
      +
      +    private static<T> void assertContents(Collection<T> actual, Collection<T> expected, boolean isOrdered) {
      +        if (isOrdered) {
      +            assertEquals(actual, expected);
      +        }
      +        else {
      +            assertContentsUnordered(actual, expected);
      +        }
      +    }
      +
      +    private static<T> void assertContentsUnordered(Iterable<T> actual, Iterable<T> expected) {
      +        assertEquals(toBoxedMultiset(actual), toBoxedMultiset(expected));
      +    }
      +
      +    private static <T> Map<T, Integer> toBoxedMultiset(Iterable<T> c) {
      +        Map<T, Integer> result = new HashMap<>();
      +        c.forEach(e -> {
      +            if (result.containsKey(e)) result.put(e, result.get(e) + 1);
      +            else result.put(e, 1);
      +        });
      +        return result;
      +    }
      +}
      
      From cb3ec7f7b470b461165882cd763bf67d5a9a5020 Mon Sep 17 00:00:00 2001
      From: "J. Duke" <duke@openjdk.org>
      Date: Wed, 5 Jul 2017 18:49:17 +0200
      Subject: [PATCH 150/151] Added tag jdk8-b85 for changeset 1872c1252909
      
      ---
       .hgtags | 1 +
       1 file changed, 1 insertion(+)
      
      diff --git a/.hgtags b/.hgtags
      index a689628fb73..2e7fa07b9bc 100644
      --- a/.hgtags
      +++ b/.hgtags
      @@ -206,3 +206,4 @@ e41d716405b209d3eddef8bd4240cec2bd34dcca jdk8-b81
       5e8c55025644730385a6f8fa029ecdb2d2c98a07 jdk8-b82
       bcebd3fdefc91abb9d7fa0c5af6211b3f8720da6 jdk8-b83
       d7ad0dfaa41151bd3a9ae46725b0aec3730a9cd0 jdk8-b84
      +1872c12529090e1c1dbf567f02ad7ae6231b8f0c jdk8-b85
      
      From 93c2ae0ff2b331d9f86c58083db642f035fe2a86 Mon Sep 17 00:00:00 2001
      From: David Katleman <katleman@openjdk.org>
      Date: Thu, 18 Apr 2013 10:30:25 -0700
      Subject: [PATCH 151/151] Added tag jdk8-b86 for changeset 8344675901d3
      
      ---
       jdk/.hgtags | 1 +
       1 file changed, 1 insertion(+)
      
      diff --git a/jdk/.hgtags b/jdk/.hgtags
      index ef6e16f2fe3..cc1dd780285 100644
      --- a/jdk/.hgtags
      +++ b/jdk/.hgtags
      @@ -207,3 +207,4 @@ c0f8022eba536dcdc8aae659005b33f3982b9368 jdk8-b81
       ac519af51769e92c51b597a730974e8607357709 jdk8-b83
       7b4721e4edb4e1c65e9c839a70d7cc67f81c7632 jdk8-b84
       296676d534c52888c36e305a2bf7f345c4ca70f8 jdk8-b85
      +7989cd0cc3a9149864589438ee2c949015d8aa9a jdk8-b86